Returns the vertices of the polyline curves generated by contouring a mesh object.
rhinoscript.mesh.MeshContourPoints( mesh_id, start_point, end_point, interval=None, remove_coincident_points=False)
mesh_id |
Required. String or Guid. The identifier of a mesh object. |
start_point |
Required. List of 3 numbers of Point3d. The 3-D starting point of a center line. |
end_point |
Required. List of 3 numbers or Point3d. The 3-D ending point of a center line. |
interval |
Optional. Number. The distance between contour curves. If omitted, the interval will be equal to the diagonal distance of the object's bounding box divided by 50. |
remove_coincident_points |
Optional. Boolean. Remove coincident points. If True, and the polyline curves from which the contour point are taken are closed, then duplicate starting and ending points of the polyline curve will not be returned. The default is to return duplicate starting and ending points (False). |
List |
A list of 3-D point lists, one for each contour, if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select mesh", rs.filter.mesh )
start = rs.GetPoint("Base point of center line")
end = rs.GetPoint("Endpoint of center line", start)
contours = rs.MeshContourPoints(obj, start, end)
if contours:
for contour in contours: rs.AddPointCloud(contour)