Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4174

Rhino common api

$
0
0

I tried using ArcCurve and LineCurve but the joinCurve is still not working i also checked if they are touching.
The creation of curves is successful but when I use JoinCurves in the end it gives an input type error again

# Define width and height

width = 3
height = 3

# Define the line

z = -radius - height
start_point_line = Rhino.Geometry.Point3d(0, -width / 2, z)
end_point_line = Rhino.Geometry.Point3d(0, width / 2, z)

line = Rhino.Geometry.LineCurve(start_point_line, end_point_line)

# Add the line to the document

model.Objects.AddCurve(line)

# Define the arc

start_arc_point = Rhino.Geometry.Point3d(0, width / 2, -radius - width)
end_arc_point = Rhino.Geometry.Point3d(0, -width / 2, -radius - width)
arc_point = Rhino.Geometry.Point3d(0, 0, -radius)
arc = Rhino.Geometry.Arc(start_arc_point, arc_point, end_arc_point)

# Create an ArcCurve from the Arc

arc_curve = Rhino.Geometry.ArcCurve(arc)

# Add the arc curve to the document

model.Objects.AddCurve(arc_curve)

# Ensure the curves are in a list

curves = [line, arc_curve]
joined_curves = Rhino.Geometry.Curve.JoinCurves(curves)

5 posts - 4 participants

Read full topic


Viewing all articles
Browse latest Browse all 4174

Latest Images

Trending Articles



Latest Images