Rebuilding curves

I hope my example is attached here.

Turning on points in the example will illustrate my question.
The curves are imported from some other cad system.
Rhino loads them as degree 1 and I would like to rebuild the curves to degree 3 for reproduction and greatly reduce the point count.
Curiously Rhino’s rebuild command is not based on the current set tolerances but rather asks for a point count. Is there a way I can rebuild the curves considering there are 6971 curves in the original file that I would like to handle in this manner? test3 example.3dm (49.1 KB)

Hi Michael- FitCrv will help here.

-Pascal

Hi Pascal,
Just one caveat here, if the input curves are polylines, then FitCrv will not necessarily hold the tolerances specified in the command (longtime limitation)…

From the help:
When the input to the FitCrv command is a polyline, the FitCrv command treats the polyline vertices as a list of points, and it tries to compute a curve that goes near the points but has a reasonable number of control points. The FitCrv command is meant for polylines with many closely spaced points.

Currently I prefer using Grasshopper for this stuff…

–Mitch

FitCrv doesn’t do a thing. I am not familiar with Grasshopper. Any scripting that would help?

FitCrv cleaned up your curves pretty well here- not sure what you are after- see if the attached is OK: test3 example_FitCrv_point01.3dm (41.8 KB)

-Pascal

Assigned to Rhino for Windows category.

Attached is a comparison of FitCrv - which actually does work OK for these relatively smooth and evenly spaced polylines - and my Grasshopper polyline reconstruction definition - which I mostly designed for fixing jagged terrain curves. Pascal’s result has fewer points (about 50% reduction of original), mine has less reduction (only about 35%) but perhaps more smoothness in spots and closer to the original. FitCrv is obviously easier to use… :smile:

–Mitch

Comparison.3dm (104.4 KB)

thanks for all your checking, but neither works for my needs. I don’t think Rhino can easily do on multiple curves as well as Adobe Illustrator. I ran the curves through CS6. It does a fine job of smoothing then simplifying the curves based on my input tolerance (precision).

Hi Michael- can you please post or the result from AI?

thanks.

-Pascal

Sure thing. Illustrator simplified all 6971 curves in about 2 seconds on my machine.
Thanks for everything and happy holidays to all.test3 AI.3dm (148.3 KB)

Hmm, interesting… Not very accurate, but nice point distribution, only 145 points. Never considered Illustrator for that purpose… Wonder how it will do with terrain curves…

I actually prefer the result from Grasshopper (much closer to the original), I can reduce the result to around 200 points without too much loss of accuracy…

–Mitch

loss of accuracy is not an issue for me in this case. remember this is 2d output from something like autocad and will be used for illustration purposes in a patent application.
Curious thing though. Illustrator considers a degree 3 point as a 1 point with 2 control handles. Rhino considers the same single point as 3 points. There are only 38 points showing in illustrator CS6

Illustrator doesn’t show you all the points. Illustrator curves are composed of joined cubic Bézier splines, each span has 4 points - you can see this if you re-import them into Rhino.

–Mitch

I too find major inconsistencies in attempting to use fitcrv to smooth and simplify dense deg1 curves. I often use AI’s path>simplify feature to quickly process jobs that would be tedious at best in Rhino. This makes me sad of course because I love Rhino’s curve manipulation tools for so many different things, and would like to stay in Rhino land completely.
Attached, a sample of something I deal with all the time. Some overly dense fonts to cut, received from a customer. Curves are deg 1, with way too many segments making the curves. It takes multiple setting changes to make this work with fitcrv, and even then its not as accurate a solution as AI’s. Note the verticals of the B get all wacked out with a setting that is fine for the other parts of the letterforms. Changing the setting to #2 makes that part better but now blows out the verticals in the ‘bowl’ part of the B.
AI gets it done in one operation.
Mitch, I need to get my hands on your GH def to give that a try. I can find that in the GH category in this forum?

edit: now upload working for me.b27-simplify tests.3dm (191.7 KB)

carvecream, can you please send me the file? pascal@mcneel.com

thanks,

-Pascal

sent. thank you Pascal.