sonicfoki.blogg.se

Ray geometry
Ray geometry





TaskDialog.Show("Distance", "Distance to floor: " + String.Format("", line.Length)) SketchPlane sketchPlane = SketchPlane.Create(doc, plane) Plane plane = .NewPlane(new XYZ(1, 0, 0), line.GetEndPoint(0)) Create a model curve to show the distance Line line = CalculateLineAboveFloor(doc, skylight) Selection selection = įoreach (Element e in selection.Elements)įamilyInstance instance = e as FamilyInstance īool isWindow = (.IntegerValue = (int)BuiltInCategory.OST_Windows) īool isHostedByRoof = (.IntegerValue = (int)BuiltInCategory.OST_Roofs) Public Result Execute(ExternalCommandData revit, ref string message, ElementSet elements)ĭocument doc = Public class RayProjection : IExternalCommand An application can also use this distance to take on some interesting problems involving analyzing the in place geometry of the model.Ĭode Region: Measuring Distance using Ray Projection An application can use this distance to exclude items too far from the origin for a particular geometric analysis. This is the distance between the origin of the ray and the intersection point. The ReferenceWithContext return includes a proximity parameter. The FindNearest() method behaves similarly to the Find() method, but only returns the intersected reference nearest to the ray origin. If interested only in true physical intersections an application should discard all references whose Reference is of type Element. Some element references returned will have a corresponding geometric object which is also intersected (for example, rays passing through openings in walls will intersect the wall and the opening element). This object contains the intersected reference, which can be both the elements and geometric references which intersect the ray. The Find() method returns a collection of ReferenceWithContext objects which match the ReferenceIntersector’s criteria. There are two methods to project a ray, both of which take as input the origin of the ray and its direction. The FindReferenceTarget enumeration includes the options: Element, Mesh, Edge, Curve, Face or All. ReferenceIntersector(ICollection, FindReferenceTarget, View3D)Ĭonstructs a ReferenceIntersector which is set to return intersections from any of a set of target elements. ReferenceIntersector(ElementId, FindReferenceTarget, View3D)Ĭonstructs a ReferenceIntersector which is set to return intersections from a single target element only. ReferenceIntersector(ElementFilter, FindReferenceTarget, View3D)Ĭonstructs a ReferenceIntersector which is set to return intersections from any element which passes the filter. Constructs a ReferenceIntersector which is set to return intersections from all elements and representing all reference target types.







Ray geometry