This discussion is a continuation of the issues previously discussed under these threads:
http://www.grasshopper3d.com/forum/topics/convert-curve-to-arc
http://www.grasshopper3d.com/forum/topics/convert-nurbs-curve-to-arcs
I am attaching a file which shows a manual method of converting nurbs curves to a set of arcs where a G1 continuity is maintained at each segmentation. Since this process is recursive, I think it would be best handled with coding it, which I am starting to learn but have a long way to go.
I am puttingg this out there to get your feedback on the method and its possible automation. Ideally, the user would be able to 'set the resolution': this example achieves the solution with 10 arcs. It is an assumption that more segments would result in a smaller deviation.
The locations start/end points and therefore the radii of the arcs (represented by sliders in the example) would ideally be determined through a recursive process where the health of the solution is determined through minimizing deviation from the original curve.
I look forward to your comments.
David Rutten
I whipped up a bi-arc fitter that uses length division. The benefit is that it allows you to place a variable amount of segments without stringing components together, but of course it is a terrible solution because it doesn't make smaller arcs on parts with high curvature.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
May 22, 2012
Fred Becquelin
Lunchbox does that... try it
then a couple seconds of galapagos and you have it
Or as David says you can divide the curve curvature-wise
May 22, 2012
Jaume Mercader
I know this discussion is rather old, but I'll leave this python script here, that does just what you need. Bonus: it also recognizes line-like segments, so the output is always lines and arcs.
Be warned though, I'm not an expert coder. It crashes when executing large curves or big sets of items. Make sure the curves you input are somewhere between the range of 0-10m.
CNCSimplifyNURBS_cmd.py
May 3, 2018