0

As a complete newbie to Lisp, I was wondering if I could kindly request your assistance in modifying some pre-existing code that I came across online from How to simplify a polyline in AutoCAD?. Any guidance or support you can provide would be immensely appreciated.

CAD of what I'm looking to get: CAD

Middle section zoomed in: Middle section

Right-hand section zoomed in: Right-hand section

I would like to remove any points in the polyline that are closer to each other than any other non-adjacent points. Additionally, I need to eliminate any choke points. It's crucial that the straightened line remains within the closed loop, and the vertices should not extend beyond the existing polyline or closed loop line.

I added CAD drawing images to show what I want to achieve. To explain the problem further: I was wanting to is remove the vertexes like this code does but once it removes vertexes I don't want the new polygon vertexes to have line segments that outside of the original. Also, I want a part of the code to see if there are non-adjacent vertices that are closer than adjacent vertices that go above a threshold of our deciding (if there is no threshold then we could end up removing vertices that are one long straight line). This is to remove choke shape that you can see in the example drawing provided below.

Thank you so much for your time and consideration. I truly value any help you can offer! :)

Destroy666
  • 5,299
  • 7
  • 16
  • 35

0 Answers0