rhinocommon icon indicating copy to clipboard operation
rhinocommon copied to clipboard

Rhino 7 Intersection.RayShoot() limitation / Improvement suggestions

Open ThomasMahon opened this issue 4 years ago • 0 comments

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 store 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.

image

Also, I did post this on the Rhino Forum, but it seems better placed here.

ThomasMahon avatar Aug 22 '20 14:08 ThomasMahon