Any reason why fitCrv can’t work on degree 1 curves? I’ve taken a section through a rather rough mesh, and would like to somewhat smartly clean it up. FitCrv seems like it would be a decent tool to do this within my tolerance. Or am I missing something that would work better? SimplifyCrv doesn’t quite have the destructive power I need here.
FitCrv does not work on polyline type objects unfortunately. What does work is either a Python script (my implementation attached below) or the Grasshopper “Reduce” component (which access the same RhinoCommon method as far as I know). You input a tolerance and the noise below the tolerance level is removed. What it does not do is change any polyline vertices, it just eliminates any that are within tolerance, thus reducing the number of segments. The curve remains a polyline.
So - I just noticed rebuildcrvnonuniform doesn’t have a degree option?
I was trying to simplify something like the below into something degree 1ish without needing to redraw them all. Perhaps there’s a way of checking certain angles at breakpoints to create point objects, and doing a closed polyline through them, with Grasshopper.
hmm - not much of a result. Fitcrv does okay. I mean, so long as the break points are in the right place (fortunately they were), I can explode, rebuild at 2,d1 and I have a polyline. Would be interesting to see something which handles a more tricky case though, like the OP I guess.
Thanks Michael - yeah, so I guess any ‘FitCrv’ tool that worked with degree one, would no longer be using the same technique as it does for other degrees.