Divide Curve with targetted Point Number

Hi all,

I need help in dividing a curve, as shown in the attached figure, based on either a specific number of segments or target points.
Ideally, I’d like the segmentation to be tighter (i.e., with smaller segment lengths or based on angle tolerance) in curved sections.

While it’s relatively easy to split and divide manually for a single curve, but it becomes quite difficult when processing multiple curves/lines.

If i used curve to lines will produce like this figure with randomly number of point/segment number. It would be more beneficial if I could adjust the number of points/segments and remove points on relatively straight sections.

Thx

Hi @Muhammad_Zakaria,

You might start with the Curve to Polyline (ToPoly) component, and harvest the resulting curve points.

– Dale

Good case for these now-classics:

Curve division density wise - Grasshopper

Also remember SimplifyCrv.

Interesting link. Far be it for me to criticise anything Daniel Piker does, but the following script seems to do much the same with less:


Divide Curve with targetted Point Number_vr1.gh (17.8 KB)

First, the curve is culled of its straight segments. Then the curved sections are sorted by their length and a division count for the the curves determined on the basis of the shortest curve. Dividing a curve by equally spaced parameters will naturally give tighter division spacings to tighter curvatures. It is just a matter of finding the correct division number based on the curves’ true length.