Projects one or more points onto one or more meshes.
rhinoscriptsyntax.ProjectPointToMesh (points, mesh_ids, direction)
rhinoscript.mesh.ProjectPointToMesh (points, mesh_ids, direction)
points |
Required. One or more 3-D points to project. |
mesh_ids |
Required. The identifiers of the mesh objects to project onto. |
direction |
Required. The direction (3-D vector) to project the points. |
List |
A list of 3-D points if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
mesh = rs.GetObject("Select mesh to project onto", rs.filter.mesh)
objects = rs.GetObjects("Select points to project", rs.filter.point)
points = [rs.PointCoordinates(obj) for obj in objects]
# project down...
results = rs.ProjectPointToMesh(points, mesh, (0,0,-1))
rs.AddPoints( results )