I’m looking for some advice on how to become a better user of the Rhino API.
I have several curves that are collections of lines and arcs (can’t be too uncommon) and I would like to preserve the internal lines and arcs as well as some of the benefits of PolyCurves vs. Nurbs Curves, for example being able to split/explode cleanly. What is the best/most efficient way to directly assemble/force PolyCurves in Rhino Common?
I imagine something like the following should be possible:
new_polycurve = Rhino.Geometry.PolyCurve([arc1, arc2, line1], tolerance)
but of course that doesn’t work
The API doc on PolyCurve suggests Curve.JoinCurve as a way to accomplish the above, however I cannot use JoinCurve with arcs and line segments… I feel like I must be missing something that is presumably obvious to others.
I have hitherto found it easiest to just cast everything into Nurbs curves prior to joining and keep a copy of the underlying arc or line objects for reference as needed. This is a workaround I would like to stop using. It can become a particular issue when I want to explode a curve later down the line and often end up with several arc segments where I should have a single arc segment (then I get to write some very unnecessary feeling logic).
Thanks.