Replace splitted curve with a merged single curve?

I have a curve created by intersecting a planar surface with a 3D shape (a mesh) and it follows, the resulting intersection curve consists of a zillion short curves (cannot be rebuilt). What is the simplest way to make this mess into an optimized single NURBS curve?

Or is there perhaps a better way to generate the intersection curve in the first place? (I may also have to repeat the task, so I may look into using Grasshopper for this at a later point in time)

Fig 1: The CPs are actually start and end points of the small curve stumps …

// Rolf

did you try CurveThroughPolyline?

Your intersection should be a polyline (a very dense one from the looks of it). The intersection is quite literal with one polyline segment for each mesh facet the intersection passes through. You will unfortunately not be able to convert that to a NURBS curve with many fewer control points without losing fidelity. Curve>Freeform>Fit to Polyline ( _CurveThroughPolyline) will give you a NURBS curve with the same number of points as the original polyline.

You can reduce the number of points in the polyline while staying within a given tolerance with the Grasshopper Reduce component or a Python script which uses the same algorithm. But it stays a polyline. Any other form of rebuilding will alter the shape significantly.

–Mitch

and FitCrv does a precise job on such curves usually, to reduce the amount of points after you made a NURBS out of it of course. Mitch still ignores that :stuck_out_tongue_winking_eye:

Yep, I suppose I’m ignorant about this one… Would love to learn though, can you give me some good settings with the attached?

FitCrv2.3dm (1.7 MB)

Thx, --Mitch

Thank you both @Helvetosaur and @RichardZ, if I can get to the point when I can run FitCrv I’d be happy, and it seem I will be happy! :slight_smile: I would be fine if the final curve would end up within 0.1 mm of the original.

However, I tried converting the curve, but no luck. It says that “Some curves where not polylines and were skipped”, and so the result is full of gaps, and the stumps remain being stumps … :frowning:

If anyone can try on my curves and tell me how to get the desired single polyline I’d be very very happy.

test_curves_to_polycurve.3dm (129.4 KB)

// Rolf

Hi Mitch,

the problem is that your polylines have many “zigzag” spots. Try if AngleTolerance=180 with a fitting tolerance of 0.001 or so is acceptable.

Jess

Hm, I thought I had already tried that, but obviously I must have forgotten to join the curves before trying Rebuild.

But now I’m very very happy. :slight_smile:

// Rolf

I think we have a new tag-line for Rhino.

-Pascal

2 Likes