The Global Archicad Community

Stay informed. Get help. Share your knowledge.

Everything about using Libraries and Library Parts - Doors/Windows/Objects/Stairs etc. (Example: How can I display a Transom above my Door?)

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, Gordana Radonic, nbalogh, mnguyen, gkmethy, Gergely Feher

#323696
If you use the "ResizeContour" operation of the PolygonOperations-Addon I would expect that the resulting polygon is offsetted in all directions.
But clearly something terrible has happened here:

offset.png
offset.png (9.37 KiB) Viewed 357 times

You see, the "start" point of the closed (!) polygon was not taken into account in the right manner. Now I have this corner chamfered away, gone for good.
The expected behaviour should be of course a new rectangle....
#323712
Reminds me of when you try to offset a polygon that is not closed in AutoCAD... Is there a way to ensure that the input polygon is closed?
#324265
Hi, can You share Your object placed in a .pla file? No other way I can comment this problem. Polygon operations usually work fine. Maybe there is something wrong with the initial data. I have found some bugs in the add-on and example objects.
#324430
Hi runxel,

the problem is probably that when working with dicts, PolyOperations "ResizeContour" expects a polygon whose last point is not the same as the first.

Dict polygons always have to be closed, polylines can be open or closed. A closed polyline/polygon means the last point is not the same as the first (think of it as auto-closed). An open polyline has one more vertices than edges.
#325914
Peter Baksa wrote: Fri Apr 09, 2021 3:07 pm the problem is probably that when working with dicts, PolyOperations "ResizeContour" expects a polygon whose last point is not the same as the first.

Dict polygons always have to be closed, polylines can be open or closed. A closed polyline/polygon means the last point is not the same as the first (think of it as auto-closed). An open polyline has one more vertices than edges.
Thank you Péter! That is exactly the right hint.
What I did was to insert a final new point which is coincident with the first point. When doing that the result will look like in my picture above.
Would be great if this info of auto-closing polygons could be a bit more prominent in the manual.
It was also quite unclear for me why there is a distinction made between polygons and polylines in the first place.