C# - Reduce / Simplify Polyline Vertices

C# - Reduce / Simplify Polyline Vertices

cadVDJ3M
Enthusiast Enthusiast
848 Views
2 Replies
Message 1 of 3

C# - Reduce / Simplify Polyline Vertices

cadVDJ3M
Enthusiast
Enthusiast

Hello.

I would like to reduce the unnecessary vertices of a Polyline. Like the vertices that are highlighted in red in the image below.

 

Does anyone have an efficient solution?

cadVDJ3M_0-1648750168486.png


I think of going through all the vertices checking the angle, and when it matches I could remove a vertex. But I think it would have problems in case of arcs.

Thank you.

0 Likes
Accepted solutions (1)
849 Views
2 Replies
Replies (2)
Message 2 of 3

_gile
Consultant
Consultant
Accepted solution

Hi,

You should have a look at this reply.

 



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 3 of 3

cadVDJ3M
Enthusiast
Enthusiast
Perfect... Thank you..
0 Likes