Dear all,
I’m tring to use CreatePatch command in ghpython.
This is the code:
import rhinoscriptsyntax as rs
import Rhino as Rhino
import Rhino.Geometry as Geometry
geometry = C #this is a collection of three curves
startingSurface = None
uSpans = 4
vSpans = 4
trim = True
tangency = True
pointSpacing = 2.0
flexibility = 2.0
surfacePull = 2.0
fixEdges=[True,True,True]
tolerance=0.1
Srf = Geometry.Brep.CreatePatch(geometry, startingSurface, uSpans, vSpans, trim, tangency, pointSpacing, flexibility, surfacePull, fixEdges, tolerance)
C is a collection of three curves.
The code is simple but it doesn’t work.
Can someone help me?
kev.r
(Kevin)
2
Have a look at this.
import rhinoscriptsyntax as rs
import Rhino as Rhino
import Rhino.Geometry as Geometry
from System.Collections.Generic import List
from System import Array
geometry = List[Rhino.Geometry.GeometryBase]()
for crv in C: geometry.Add(crv)
startingSurface = None
uSpans = 4
vSpans = 4
trim = True
tangency = True
pointSpacing = 2.0
flexibility = 2.0
surfacePull = 1.0
fixEdges = [False, False, False, False] # Array of four elements (per docs.)
tolerance=0.1
Srf = Geometry.Brep.CreatePatch(geometry,
startingSurface,
uSpans,
vSpans,
trim,
tangency,
pointSpacing,
flexibility,
surfacePull,
Array[bool](fixEdges),
tolerance)
230724_CreatePatch_python.gh (7.1 KB)
-Kevin
Thank you Kevin,
I tested your script but it doesn’t fit my purpose. My aim is to fill the space between the three curves as in the picture.
kev.r
(Kevin)
4
I was just trying to get your script working with basic input curves.
Why can’t you use the native Patch component?
Perhaps if you would describe the problem you’re trying to solve, someone could help.
-Kevin