I have a lot of imported vectors with loops and redundant points. This is causing errors when using those vectors to generate surfaces. The source of the vectors is Adobe Illustrator and another designer.
I would like to remove redundant nodes/ control points as well as loops from them without having to do it manually.
I can’t seem to find the appropriate commands in the curve edit tools.
When I load this vector into my CAM software I get a million nodes stacked on top of each other as well as loops, but the redundant nodes are much worse than the loops. I can at least see the loops when I inspect the curves in zoom. I have no way (that I am aware of) to detect control points on top of each other in Rhino.
Hi Jon - here is a hack-o py script that might help, though I’m not sure I’d run it on all the curves at once… Use RunPythonScript and point it at the attached file once you’ve saved it off, or use
! _-RunPythonScipt "Full path to py file inside double quotes"
Thanks, I will try that. I have never ran scripts in rhino before. I saw another post on the forum here concerning ‘overkill’ and someone suggested make2d which I tried but still makes for a ‘clear’ surface when I planar curve panel. It’s almost as if Rhino reads the vectors backwards and forms an anti surface.
Hi Jon - this is most likely a consequence of loops in the curves. CurveBoolean should help that.
BTW, the script above drops a point where the dups are removed, just as a kind of feedback, and, since you are likely to be doing this in stages, it’s possible to move the curves to another layer or something as they are ‘processed’ so you know where you are.
I have ran the script you provided, thank you for that. I have also ran curve boolean. It still makes the same result. Perhaps I’m not doing something correctly with the curve boolean?
Here is the processed outer vector and surface, post cullstackedcrv and boolean. Just wondering if the stacked curve python sketch reads stacked points on a curve as well? Artcam sees stacked points in addition to loops, which may be gone now.
Hi Jon - it looks like the current render mesh settings are not able to negotiate the complex curve. Set the mesh to be finer - File menu > Properties > Mesh > Custom > Down arrow, set Maximum Distance Edge to Surface to .001 and aspect ratio to 6… does that clean it up?
Also, maybe uncheck ‘Simple planes’
as I pare away at this surface using the trim command I start to see the rendering pixelate and then begin to fail to display. How can I maximize my render mesh settings?
Hello - Try RebuildEdges on that surface… might or might not help… the problem is almost certainly still related to the complexity of the perimeter curve.
Hello - Making planar surfaces from these ultra intricate curves is going to get messy from time to time I’d say - we’ll just have to deal with the problems as they arise. For example, you can try FitCrv with a fairly tight tolerance - say .0001 on these curves and see if you get anything useful out the other end.
Considering what time might be involved in making the repairs downstream, it might be more effective and less expensive to have the excessive points reduced at the source. Astute Graphics makes plugins for Adobe Illustrator and two have functionality designed to reduce excessive points without altering the shape of the design.
Have the designer test Vector First Aid and Vector Scribe with the artwork. There is a trial available that allows saving so the artwork could be processed without any purchase.
@cdordoni ; in a perfect world I could ask the designer to tweak settings and then relay those to me for future reference. Thanks for the suggestions, I will look into those plug ins. I probably should have Illustrator on hand for myself so I can produce my own in house traces from bitmaps to avoid this problem entirely. This issue has improved my understanding of Rhino and is making me a better modeler so it’s good to know how to dig myself out of holes
@pascal ; without that script you provided I would never have been able to detect and solve those redundant points. I will be asking a few of my friends who speak python fluently to modify this sketch to allow for full automation. Meaning find the points and then delete them, separate but not delete vector loops, and close all open curves that were opened by point deletion only.
I ran the script after successful boolean curves, sometimes those would fail and I needed to flip seams or manually remove loops.
After the script has completed it leaves a single point on the curves start and end point which needs to be deleted manually, I wish it didn’t do this.
Any suggestions on how to make this process better would be greatly appreciated. I will share the script here.