Where is problem ??
There’s really no need for lines 2 and 3, since you’re already funnelling in the line and circle(s)!
Just make sure that you set the Type hint for both inputs to ghDoc Object when Geometry (rhinoscriptsyntax). Additionally, either set the circle input to List Input or pass in
rs.ExtendCurve() expects a list of boundary object ids, not a single one.
a = rs.ExtendCurve(li, 0, 1, [ci])
It works. Thank you budy .
Hey budy. I need your advice again. Its similiar function, but another mistake.
What is wrong ? My input 3 mm line. I need to extend curves, but how ?
Thank you for your time
Have you changed the type hint of the line input? It should be set to ghDoc Object when Geometry (rhinoscriptsyntax)!
Yes , i try it.vedeni_vrtaku.gh (3.6 KB)
Doesn’t seem like it!
Since you’re programming with rhinoscriptsyntax, the geometry inputs should be ghDoc Object when Geometry (rhinoscriptsyntax). This way a GUID is passed in, instead of a geometry object. Geometry objects are to be used with RhinoCommon.
rs.GetReal() can only be used in Rhino, not Grasshopper!
In Grasshopper, you use the inputs to provide geometry and other values to the script!!
Here’s the revised script:
import rhinoscriptsyntax as rs if line: if not length: length = 0.0 extcrv = rs.ExtendCurveLength(line, 2, 2, length)
vedeni_vrtaku_2.gh (2.5 KB)
You are best. Im trying to create my grasshopper definition to Python code. Im using code for hand surgery. You save a life to someone …
Does somebody get his/her fingers extended?