Turn Any Type of Curve into Lines

Here’s a Graph that can convert any type of curve(s) into lines!
Yes, even those weird Splines and Ellipses will conform into straight geometry.
Just make a selection from a plan or drafting view and use the slider to control minimum segment length.

Make Lines.dyn (67.4 KB)
Dynamo Release 2.0; No Packages Required

This Graph is a companion to Ultra Hatch.
Now hatch patterns can easily be made from Curved Lines as well as straight ones!

4 Likes

I see you have three versions of the same conversion and each one is getting a more refined result. Is there an easy way to set a MAX segment length? I’m still getting mixed results even with my MIN length set to 0.05in. Attached image shows original on left (Green) and converted lines on right (Black).

There are a couple of options here. You could try scaling up the curves before running the script, then scaling back down. But if you are feeling more adventurous, you could try editing the graph. I think the input that feeds in the minimum size is grouped in blue.
I set it to 0.05 probably because of tolerances. If the lines get too small, revit won’t let you create them.

Cheers @dcmasten1 !!
Great script, that helped me achieve what I was looking for (create Room Layout Sheets with curved shaped rooms).
Thanks!
Just a note that if the nodes managing curved lines are not fed with something (i.e if all elements are lines), then it returns an error, which freaks my users out. I found a workaround by creating lines instead (snip attached if anyone needs the same fix).
Again, thank you so much!!

Oh, and if someone else has the same goal as me, and needs the lines created in lieu of the curve to replace the curve to the end, I added “+1” in the calculation formula, to give me the last point.
I share the tip as it took me a while to understand why the arcs were not 100% replaced by lines ^^