Is there a setting I don’t know of that can force CreatePatch to look the same as MeshPatch?
My workaround now is to add points from a bigger bounding rectangle to generate an OuterPolyline and then delete the faces generated that are connected to these extra 4 points, but that seems like an unnecessary workaround.
Are there a simpler solution to get the same result?
Thanks, I don’t know what the edge rule means, but you made me explore, and it is the divisions settings! I had that at 32, if I remember correctly somebody told me to use that waaay back in the days and I have used it since… if I set it to 1 then it works fine.
I understand what this means now:
divisions Only used when a outerBoundary has not been provided. When that is the case, division becomes the number of divisions each side of the surface’s perimeter will be divided into to create an outer boundary to work with.
Sorry for your trouble and thanks for the help Scott!
And in case somebody stumples upon this when trying to do the same, here is a sample script for you:
Simple CreatePatch from points only script
import rhinoscriptsyntax as rs
import Rhino
import scriptcontext as sc
def meshPatch(points):
### --- CREATING THE MESH SURFACE
outerBoundary = None
tol=sc.doc.ModelAngleToleranceRadians
pullbackSurface = None
innerBothSideCurves = None
innerBoundaryCurves = None
innerPoints = points
trimback = True
divisions = 1
patch=Rhino.Geometry.Mesh.CreatePatch(outerBoundary,tol,pullbackSurface,innerBoundaryCurves,innerBothSideCurves,innerPoints ,trimback,divisions)
return patch
point_ids = rs.GetObjects("Select points", rs.filter.point, preselect=True)
if point_ids:
points = []
for point_id in point_ids:
point = rs.coerce3dpoint(point_id)
points.append(point)
mesh = meshPatch(points)
if len(mesh.Faces)>1:
sc.doc.Objects.AddMesh(mesh)