Rayshoot vs Shootray vs On_Shoot

Is there a summary (or detailed information) on the implementation for rayshoot, shootray, and onshoot? Below is what I think I have found, please update or correct me:

From what I can find; rayshoot is in rhinocommon, shootray is rhinoscriptsyntax, and onshoot is the opennurbs.

rayshoot takes a geometrybase and shootray takes an array. Is shootray just calling rayshoot and doing the geometry conversion? Is this written in C++ or is there a cost to running rayshoot in a loop that would be higher than shootray?

onshoot is similar in functionality to rayshoot, but is through the opennurbs and not rhinocommon. Is there a difference in how the calculation is performed/ how the geometry is compared?

Is there another c++ sdk version, or is this the line->mesh/surface intersection?

Are all of these at the lowest level a line with a length the size of the model and doing a line/object intersection, or is there some other implementation method?

Thank you

Hi @Mat_S,

The class in the Rhino C/C++ SDK is ON_RayShooter, which shoots a ray at a surface or collection of surfaces.

Both Intersection.RayShoot (RhinoCommon) and ShootRay (rhinoscriptsyntax) eventually call this C++ class.

There no version of ON_RayShooter that supports meshes. It has been asked for.


ON_RayShooter does use Rhino’s curve-surface intersector.

– Dale

1 Like

Thank you Dale, this helps.