Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Vertex removal lisp?

7 REPLIES 7
Reply
Message 1 of 8
Bazzatron
7750 Views, 7 Replies

Vertex removal lisp?

Hi all,

 

I don't suppose there exists a lisp or method other than PEDIT that would automatically delete vertices that are unecessary.

 

I have a set of plans that seem to have been drawn...interestingly.

 

A lot of polylines have these seemingly arbitrary vertices that break up longer straight lines.

 

Ideally I'd like something that would compare Vertex A, B and C, if they all share an X or a Y, remove Vertex B (assuming that A, B and C are sequential vertices on one Polyline) - perhaps with a way of adding an adjustable tolerance.

 

Tall order I know, but here's hoping someone finds this an interesting enough problem to solve!

 

Thanks for the read! Smiley Happy

7 REPLIES 7
Message 2 of 8
braudpat
in reply to: Bazzatron

 

Hello from France

 

I am using since about 7 years a superb routine from Gilles (gile) - A french "crazy" developper !

The routine AVX_DVX runs on PLines : LW, 2D, 3D

 

Command:  AVX    to Add a VerteX

Command : DVX    to Del/erase a VerteX

 

Thks to Gilles, Bye, Pat

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


Message 3 of 8
murray-clack
in reply to: braudpat

My "long way 'round" method is to EXPLODE the polyline and then run the command OVERKILL which will find overlapping lines and delete them, and then I just PEDIT them back together.

 

1. Enter the EXPLODE command and select the Pline

2. Enter the OVERKILL command and when prompted to "select objects", enter P for previous objects.

3. When the OVERKILL dialog appears, click the OK button

4. Enter the PEDIT command and select one of the remaining lines

5. Enter J for Join...

6. When prompted to select objects to join, enter P for Previous, and press Enter and finish the command like you normally would

 

Message 4 of 8
dbroad
in reply to: Bazzatron

You can use the vlax curve functions to help you determine whether successive points fit on a particular curve or straight line according to a set of rules.  It has worked for me.  The first derivative is the slope.  By comparing the slope of successive segments you can determine whether or not to eliminate the connecting vertex.  The second derivative is the curvature at a point.

Architect, Registered NC, VA, SC, & GA.
Message 5 of 8
braudpat
in reply to: dbroad

Hello

 

Sorry I haven't understand that you want eliminate many vertex on many plines (to simplify them) in one shot ! !

 

Have you an AutoCAD MAP or CIVIL around you because the MAPCLEAN command will do the job ?

 

Bye, Pat

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


Message 6 of 8
jggerth1
in reply to: Bazzatron

a term you can search on is WEED.LSP, or Polyline simplification.  There are probably a couple of hundred routines around that can do pline modifcations and strip out excess vertices.

 

And as was mentioned, MapClean is in Map3d and civil3d if you can get access to thoes.

Message 7 of 8
vandenoosterkamp
in reply to: jggerth1

In some drawings all of the above mentioned solutions are not working. I guess that at some point the dbase is too full or something like that. I have extra vertices in a straight polyline that won't go away when using overkill or mapclean. I picked a wcs close to the objects because in some cases that already helps to make Acad do what you want. However when I copy just that polyline to a new drawing both overkill and mapclean work like a charm.

Quite annoying imo and I hope to see this taken care of in a future version because it's malfunctioning for years already.
Message 8 of 8
rilesblomenkamp
in reply to: braudpat

Hallelujah!! 🙌

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost