Code Red > AutoLISP (Vanilla / Visual)

How to simplify a lwpolyline with 5000+ vertices in it?

(1/2) > >>

Vikram:
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

kpblc:
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.

Vikram:
Thanks for your reply Sir.Now I also have attached dwg file. I will try your method

kpblc:
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.

Vikram:
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

Navigation

[0] Message Index

[#] Next page

Go to full version