Polygon operations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2009-11-26 04:10 PM
Please!!!
I can't find my way in using this function.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2009-11-26 07:37 PM
Would be helpful to put your AC version in your signature.
AC12:
AC13:
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2009-11-27 10:38 AM
but i was more thinking about the Polyop extension (ch=INITADDONSCOPE ("PolyOperations ", "", "")) which is said by Zsolt to be a more effective way to do such operations.
Although I will look with this macro.
But that would be very very very nice to see just a little example of use of the extension to see how we can use it. The source containers etc.. are a bit difficult to understand from scratch.
Maybe there is an object in the library using it?
Thanks in advance,
olivier
AC v13, winVista

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2009-11-27 11:49 AM
You can download it from http://www.graphisoft.com/support/developer/downloads/
The extension is much more effective and capable than the macro indeed!
Regards,
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2009-11-27 04:40 PM
BTW I have been trying to use the polyoperations macro to calculate areas, but it appears to me that the results are bit different than what they should be. (if i draw a polygon and see the area)
Is that a bug?
You can't use the addon to calculate areas, can you?
(in that case it is not documented in the manual)
thanks,
regards,
olivier

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2009-11-27 06:05 PM
Olivier wrote:It can be considered as a bug, sure. Please report the details and we'll see about the priority.
I have been trying to use the polyoperations macro to calculate areas, but it appears to me that the results are bit different than what they should be. (if i draw a polygon and see the area)
Is that a bug?
Olivier wrote:The documentation is complete - consequently there is no area calculation. One reason to include it would be to completely replace the old macro...
You can't use the addon to calculate areas, can you?
(in that case it is not documented in the manual)
Regards,
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2009-11-30 01:49 PM
----
area=0
tempNumPnts = nsp/3
areaLX = get(1) ! Last point
areaLY = get(1)
!!ziiz=get(1)
areaFX = areaLX ! First point
areaFY = areaLY
for areaI=1 to tempNumPnts-1
areaX = get(1)
areaY = get(1)
!!ziiz=get(1)
area = area + (areaX + areaLX) * (areaY - areaLY) * 0.5
areaLX = areaX
areaLY = areaY
next areaI
area = area + (areaFX + get(1)) * (areaFY - get(1)) * 0.5
-------
I add this in the beginning to give my polygon:
-------
for i=1 to vardim1(ac_coords)
put ac_coords
next i
------
ac_coords comes from the accessories API
but the resulting area is totally false...
I don't understand this code anyway which should call 3 times "get" per loop but "gets" only 2 times per loop.
Is there something obvious that I missed?
Thanks in advance,
Olivier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2009-12-01 09:17 AM
--
for areaI=1 to tempNumPnts-1
---
should be
--
for areaI=1 to tempNumPnts-2
--
now it seems to work.
However it doesn't work if there are holes in the polygon.
Some more work should fix this second problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2009-12-01 09:39 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2009-12-01 10:54 AM
Regs,
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...