Hi folks,
I need a big Help.
I’m starting learning how to script Py in GH.
I want to build a better OffsetCrvOnSrf because the orignal GH component looks worst than the Rhino one.
The idea is to call the Rhino one and iterate the offst of the last created crv many times.
This my script:
import Rhino
import ghpythonlib.treehelpers as th
i= 0
Curves = []
Crvs=[]
LayerTree = []
for i in Distances:
Curve = Rhino.Geometry.Curve.OffsetOnSurface(Curve, Surface, i, 0.005)
Crvs.append(Curve)
layerTree = th.list_to_tree(Crvs, source=[0,0])
Curves = layerTree
Hello,
It is telling you that in line 20 it expects a curve object but actually gets a list - how do you initialise Curve? You could try one of the following solutions:
try Curve = Rhino.Geometry.Curve.OffsetOnSurface(Curve[0], Surface, i, 0.005)
switch curve from a list input to a single object input
add a loop for curve in curves to loop over multiple input curves and offset them all.
Thanks, but I can’t make it working.
Here’s the original script maybe is a problem on how I set the input Type.
If you have the chance to give it a look I would really appreciate it.
Thanks.
Apologize for not giving you the geometry.
The problem is that it doesn’t work neither with a single crv.
Reading the output it says “multiplecrv” object.
Do you advise me how to convert a multiple crv into a single crv?
I tried rebuild but nothing.