Projects one or more points onto one or more surfaces or polysurfaces.
rhinoscriptsyntax.ProjectPointToSurface (points, surface_ids, direction)
rhinoscript.pointvector.ProjectPointToSurface (points, surface_ids, direction)
points |
Required. One or more 3-D points to project. |
surface_ids |
Required. The identifiers of one or more surface or polysurface 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
surface = rs.GetObject("Select surface to project onto", rs.filter.surface)
objects = rs.GetObjects("Select points to project", rs.filter.point)
points = [rs.PointCoordinates(obj) for obj in objects]
# Project down...
results = rs.ProjectPointToSurface(points, surface, (0,0,-1))
rs.AddPoints(results)