Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.
SOLVED!

"ResizeContour" does not work as expected

runxel
Legend
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:


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....
Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Peter Baksa
Graphisoft
Graphisoft
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.
Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest

View solution in original post

5 REPLIES 5
Lingwisyer
Guru
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?

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win10 | R5 2600 | 16GB | GTX1660 
runxel
Legend
No solution, GS?
Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»
Pertti Paasky
Advocate
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.
- AC-24 FIN - WIN 10 - HP Zbook -
“A winner is just a loser who tried one more time.”
George M. Moore, Jr.
Solution
Peter Baksa
Graphisoft
Graphisoft
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.
Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest
runxel
Legend
Peter wrote:
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.
Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»