Hi @dale,
while porting some code to Rhino 7 initially written in Rhino 6, i’ve found an issue i do not fully understand. Using below example code in Rhino 6, i get a single ray hit on the example box (this is the expected result):
import Rhino
import scriptcontext
import rhinoscriptsyntax as rs
def DoSomething():
brep_id = rs.GetObject("Brep", rs.filter.polysurface, True, False)
if not brep_id: return
brep = rs.coercebrep(brep_id, True)
origin = Rhino.Geometry.Point3d.Origin
vector = Rhino.Geometry.Vector3d.ZAxis * -1
ray = Rhino.Geometry.Ray3d(origin, vector)
pts = Rhino.Geometry.Intersect.Intersection.RayShoot(ray, [brep], 1)
for index, pt in enumerate(pts):
rs.AddTextDot(index, pt)
DoSomething()
Box.3dm (60.6 KB)
Running the same code in Rhino 7 results in 2 hit points, but the number of maxReflections
is set to 1. The second hit looks like a reflection of the first hit. Is this a bug ?
thanks,
c.