TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Vikram on November 06, 2019, 01:24:55 AM
-
Hi!
I have a lwpolyline with 5000+ vertices in it. I actually used pedit.lisp made by Kent Cooper but it is not supporting for the lwpolyline with so many vertices.My intellicad crashes when I use it. But it works fine with 2000+ vertices.
Basically I want to obtain smooth curve out of numerious small lines. So I convert this small lines in polyline by using pedit and then I spline it.I couldn't use pldiet.lisp on spline so I have to again explode that spline and convert it into polyline again.When I explode it it I get 5000 vertices. Intially I have 700 points but after exloding I get so many points.
So these following things can help me
1) If I could simplify the polyline after I spline it. For Eg: Pedit->Join->Spline->Simplify
(pldiet wont support spline that's why I have to go Pedit->Join->Spline->Explode->Pedit->Join->Simplify )
2)If I could explode the polyline in minimum vertices with help of some routine.
I have attached the drawing for reference test2.dxf
-
How did you get dxf file with repeated entity handles? AutoCAD 2018 can't open this dxf, and I have no time to edit it manually. Attach dwg file.
P.S. Without opening file: try to ise _.pedit command at first part of your lines, then repeat this command to another part, and repeat it until you get good enough result.
-
Thanks for your reply Sir.Now I also have attached dwg file. I will try your method
-
I think you have to erase duplicated vertexes and segments. Use _.overkill command.
Secondary try to use pl-tools: https://forum.dwg.ru/showthread.php?t=8284 . Maybe it could help you.
-
Those tools gave me a high hope! they looks useful. But unfortunately it didn't work for me.It threw error bad argument.
PS: I'm using IntelliCad
-
Mr Sanders did quite a job on that Rolling_Ball tool for sure. I'm gonna spend some time learning from that.
-
For what purpose Rolling ball tool was used? Do you have the lisp file of its?
-
Here is Kent Coopers latest version of Pldiet. I hope it works.
https://forums.autodesk.com/t5/autocad-forum/reduce-polyline-points/m-p/9117542/highlight/true#M998626 (https://forums.autodesk.com/t5/autocad-forum/reduce-polyline-points/m-p/9117542/highlight/true#M998626)
-
See if this Result is what u need :
Then I will offer u its code !!!!
-
Maybe this can help (by gile):
http://www.theswamp.org/index.php?topic=55415.msg596112#msg596112
http://www.theswamp.org/index.php?topic=19865.msg244892#msg244892