Author Topic: Polyline area value  (Read 687 times)

0 Members and 1 Guest are viewing this topic.

dwaschnia

  • Mosquito
  • Posts: 13
Polyline area value
« on: December 22, 2022, 05:41:29 AM »
Hi,

does anyone know why I get 2 different values for the area of the polyline (attached dwg) when I click on it and when I select it with this code: (vla-get-area (vlax-ename->vla-object (car (entsel)))) ?
(see also attached image for clarification)

Lee Mac

  • Seagull
  • Posts: 12915
  • London, England
Re: Polyline area value
« Reply #1 on: December 22, 2022, 08:20:05 AM »
It's likely the self-intersecting areas of your polyline - using the AREA command with the Object option, I receive an output different to both of your examples.

You can prove this by exploding the polyline, trimming/removing the overlapping lines to leave the 'islands' and then converting the result to a region:



Such region then has a consistent area of 805.4531.


didier

  • Newt
  • Posts: 48
  • expatrié
Re: Polyline area value
« Reply #2 on: December 22, 2022, 03:30:42 PM »
Bonjour

By reconstructing the perimeter and the islands in separate polylines then by making a hatching with choice of objects we obtain the value of 805.4331.
When you ask the properties of the polyline in the deposed drawing, AutoCAD don't give the value of the area.
It is a good indication of polyline defect.
see the image of the two polylines
Amicalement
eternal beginner ...
my english is not fluent ...