This line keeps outputting a goo and I need a Line or Curve output.
*curves = a list of Lines/LineCurves, I have tried both
joined_curve = rg.Curve.JoinCurves(curves)
This line keeps outputting a goo and I need a Line or Curve output.
*curves = a list of Lines/LineCurves, I have tried both
joined_curve = rg.Curve.JoinCurves(curves)
Hi @jmarsh ,
are you trying to do this with RhinoCommon? In RhinoCommon Curve.JoinCurves returns an array of Curves
https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.curve/joincurves
It needs to be an array because maybe the result of you joining 10 curves is 3 curves. Also note that this is a static method, to be called directly from the Curve base class.
Curve[] res = Curve.JoinCurves(crvsToJoin);
crvsToJoin is simply a List of Curves
List<Curve> crvsToJoin;
Anyway, if you formulate the question and the problem better and more precise, maybe we could help you more.
Greetings,
Milos
Yes, RhinoCommon.
Here is the full function. It’s now returning the unjoined curves although Join_Status varies with True/False values so that 5 sets should be joining.
def construct_points(x1, y1, z1, z2):
# Create point at (x1, y1, z1)
point1 = rg.Point3d(x1, y1, z1)
# Create point at (x1, y1, z2)
point2 = rg.Point3d(x1, y1, z2)
# Create a curve between point1 and point2
control_points = (point1, point2)
curve = rg.NurbsCurve.CreateControlPointCurve(control_points)
curves = [curve]
if Join_Status == True:
joined_curves = rg.Curve.JoinCurves(curves)
Final_Curves = (joined_curves)
else:
Final_Curves = (curves)
return Final_Curves
Final_Curves = construct_points(x1, y1, z1, z2)