ok. so a client provided a drawing and we convert them into dxf's so that our industrial machines can translate them into programs. the problem with this polyline is that it is made of over 4000 lines which is too many "nodes" for our machine to handle. normally what i would do, is re draw this which takes up a chunk of my valuable time. we just absorbed another company and are taking on all of their business so time is precious. any ideas on how to make this polyline have less nodes? also, our machines will only recognize CLOSED POLYLINES. nothing 3d or any splines. Please help me!!
FILE IS ATTACHED.
Solved! Go to Solution.
Solved by Kent1Cooper. Go to Solution.
Hi,
>> how to make this polyline have less nodes?
Question back: can you define a rule which of the vertices are not important?
You can write tools to remove vertices, but saying reduce the vertices also means your geometry is not the same anymore. And when you are feeding your machines with less detailed data you'll get objects with less accuracy.
>> which is too many "nodes" for our machine to handle
I'm always wondering why (in the digital area) a number of 4000 or so is an issue, but what is the maximum number of points your machine can handle?
+ can your system work with arcs in polylines?
- alfred -
Hi drewpeacock44,
I have recently made a .net program to simplify polylines with many points by setting a maximum deviation from the original polyline. I have used this to simplify your polyline.
Please find attached a file with your cog simplified from 4025 points to 1599 or even 401 points.
It looks like your file is already a simplification of a polyline with arc segments. This means some precision was already lost in that translation. I have set my program to 0.0005 and 0.005 inches deviation from your original to reduce the amount of points.
It is up to you to decide if this deviation from the original cog is acceptable.
I hope this helps.
I'm not sure if this LISP will work in this particular case.
According to your website, the LISP will delete extra vertices on collinear segments. In this case there are very few colinear segments as far as I can see.
Straightening of arc segments is also not applicable in this case. From the file it looks like this was already done before it was sent to drewpeacock44.
@R.Gerritsen4967 wrote:
...
I'm not sure if this LISP will work in this particular case.
According to your website, the LISP will delete extra vertices on collinear segments. In this case there are very few colinear segments ....
It certainly will. It will delete extra vertices between collinear segments in addition to reducing the number otherwise. The point in mentioning collinear straightening in their comments [their website, not mine] was the "regardless of distance" aspect -- it is not limited in collinear stretches by the limitation you put on the maximum non-collinear distance between vertices to straighten.
I used it on their sample drawing, using 0.1 as the maximum distance to straighten and keeping the default 15-degree-bend limitation, and it reduced the number of vertices from 4025 to 1175. Using 0.25 for the maximum distance to straighten reduced it to 476, and using 0.5 to 326, but at that point it's starting to look noticeably kinked. @Anonymous, you can experiment with different bend-angle limitations as well as different maximum distances, to get the best result for your purposes.
Perhaps check our app CLEANVECT we posted on the Autodesk Exchange App Store. It /may be of use for this. Also we have some Join and some Boundary apps to convert to outlines to make more compatible with manufacturing.
Link: https://apps.autodesk.com/ACD/en/Detail/Index?id=4697472511467238968&appLang=en&os=Win32_64
-CDS
Hi R.Gerritsen4967,
I have recently made a .net program to simplify polylines with many points by setting a maximum deviation from the original polyline. I have used this to simplify your polyline.
Could you please share .Net code? I'm looking for exact realization and for the moment found only Lisp realization for such functionality.
Regards,
Roman
Hello @Anonymous ,
I used this link as a starting point:
https://forums.autodesk.com/t5/net/simplify-polyline/m-p/6218460/highlight/true?nobounce#M47907
For my own program I modified this a bit, but the most important part was found in the above link.
Greetings,
We have a few Apps that will do this plus more but one in particular is our CLEANVECT app. See the app program here -> https://apps.autodesk.com/ACD/en/Detail/Index?id=4697472511467238968&appLang=en&os=Win32_64
Geoff Sylvester
CAD Design Software
San Jose, CA 95132
Can't find what you're looking for? Ask the community or share your knowledge.