# Segment Curve by Length - Accounting for Radius

Hi,

I am trying to take a curve with a radius and divide it into 1500mm straight sections. I almost have a script working, but my straight sections change in length depending on the radius of the curve.

How do I GH to give me 1500 segments regardless of radius?

Hope this makes sense. Thanks in Advance.

Segment Curve.gh (15.6 KB)
Segment Curves.3dm (119.8 KB)

Assigned to Grasshopper category

1 Like

Hello
You can have a look at this discussion

I also have a small component in Nautilus plugin to do that
Wrap must be set to true.

curve divide distance.gh (8.8 KB)

Hello,

I believe OOTB component will work for you too â€¦

Regards,

Pavel

1 Like

For sure I forgot this one , it was the reason I added and â€śsâ€ť to my component name !!!
By the way if @rismail88 wants to use the maximum of its curve he can use Galapagos to obtain a distance that will minimize the last part.

curve divide distance minimize last.gh (10.0 KB)

I apologize if I didnâ€™t explain myself clearly.

I would like to rebuild the input curve (green crv) to the black one using straight sections while maintaining the overall geometry.

I realize both curve wonâ€™t be identical but if I could get them as close as possible that would save me a lot of time.

Thank you,
Rahman

Hi Rismail,

itÂ´s all about setting the rules at the first place. In other words you must find your own answers for this - â€śstraight sections while maintaining the overall geometryâ€ť - what does that mean for me? What is crucial? What can be omitted?

In your example file - two curves with different curvatures must have different distances between two points, when you set the division parameter along the length of the curve. Set the division by the distance, not by the length.

Please look at the below attached script. These are just few basic ways you can rebuild smooth curve to polyline. There are other methods as well. Please look at how each method sets different results.

Best regards,

Pavel

CrvDivisionExample.gh (11.4 KB)

1 Like

you should have a look at Curve to Polyline component

`divide distance` component is what you are after, it will divide curve with exact equal distance of point to point same as polyline.
also you can right click on curve component and choose â€śinternalizeâ€ť ,this will copy the curve from Rhino View to Grasshopper component and no more need to upload *.3dm with *.gh
Segment Curve_001.gh (16.2 KB)

Thank you, divide distance was the solution. I apologize for not catching your suggestions a few days ago - but it looks like I was overthinking the issue at hand.

Thank you both.

1 Like