Hi, I’m trying to import a point cloud and then patch it using Python, but I am having trouble figuring out how to either control the settings using rs.Command or use a point cloud with Rhino.Geometry.Brep.CreatePatch(). I need to use point clouds because I intend to work with hundreds of thousands of points eventually. Any advice?
Here’s my script:
import rhinoscriptsyntax as rs import Rhino pointcloud = rs.Command("-_Import C:\Temp\pointcloud.xyz _Enter") rs.Command("-_Patch pointcloud")
I haven’t figured out the synatx for the settings for Patch via rs.Command(). I tried the following for example with no success:
rs.Command("-_Patch pointcloud PointSpacing=1 _USpans=4 _VSpans=4 _Stiffness=4")
rs.Command("-_Patch pointcloud 1 4 4 4")
With Rhino.Geometry.Brep.CreatePatch(), my GeometryBase is not an IEnumerable. Is this because it is a point cloud and not a list or array of points? Any advice?
Rhino.Geometry.Brep.CreatePatch(pointcloud, 4, 4)
Rhino.Geometry.NurbsSurface.CreateFromPoints(pointcloud, 4, 4, 3, 3)
And here is a small ascii point cloud to import for testing: pointcloud.zip (200 Bytes)