Rhino 7 Intersection.RayShoot() limitation / Improvement suggestions

I’ve found a limitation / improvement suggestion for the new Intersection.RayShoot() method in Rhino 7:

Rhino.Geometry.Intersect.RayShootEvent[] RayShoot(System.Collections.Generic.IEnumerable<Rhino.Geometry.GeometryBase> geometry, Rhino.Geometry.Ray3d ray, int maxReflections)

If I want to only perform the RayShoot on a subset of faces from a Brep, I extract the faces and store the ones I want to evaluate in a list. The RayShootEvent I expect in say the example below, should stores the GeometryIndex and BrepFaceIndex of the faces as they exist in the Brep BrepFaceList, but it seems that calling Brep.Faces and iterating through the list to store only the faces I need creates new instances of the BrepFace’s which therefore do not share the same FaceIndex’s or SurfaceIndex’s as those found in the BrepFaceList. Subsequently the results from the RayShootEvent do not correlate with the original brep which is severely limiting.

Yep, it’s on the list.

https://mcneel.myjetbrains.com/youtrack/issue/RH-13351

– Dale

1 Like