Rayshoot not recognizing empty geometry

python

#1

I am trying to use rayshoot to detect if the geometry is in a location or not. However, the method is not recognizing the geometery and seems to be using a bounding box. I attached the files and a screenshot of the issue. Is this a bug in the API, or how can I fix it?ray shoot (1).py (557 Bytes)

ray shoot (1).3dm (50.7 KB)


#2

Hi @Mat_S,

RayShoot computes point intersections that occur when shooting a ray to a collection of
surfaces. Your object is a trimmed surface or brep so it finds the intersection with the untrimmed surface.

See this tread for a workaround.

c.


#3

Thanks for this info. Has mcneel decided they will ever fix this, or are just going to leave in that major caveat?


#4

Hi @Mat_S, i guess there is nothing to fix as the method does what it describes in the helpfile. It is possible to write a ShootRay method though, which supports trimmed surfaces and meshes using the available methods in RhinoCommon using Python scripting.

c.


(Dale Fugier) #5

It’s on the to-do list.

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

– Dale