cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Developer forum

Creating/Adding polygon (holes) in a zone [SOLVED]

ReignBough
Booster
Figure 1

I have the following zones, walls and a polygon (using polyline). The polygon is used as the boundary for the main zone.

Figure 2 (manual)
  • I created the main zone polygon (MZP) by following the vertices of the polyline as the guide.
  • Then, I started adding subpolygon (holes) in to it that are the same sizes as the other zones. That is, 1 zone is to 1 subpolygon.
Figure 3 (API)
  • Using the API, I created the MZP using the polyline's elem.polyLine.poly and its corresponding polygon values on memo (coords, pends, parcs, vertexIDs).
  • Then, I go through all the existing zone elements and add/insert (APIAny_InsertSubPolyID) their polygon (elem[idx].zone.poly and the corresponding memo values) to MZP.
Question

How can I generate the same output as the manual? What I mean is, I still want to have those (2) small zones using the API.
~ReignBough~
ARCHICAD 24 INT 4018 FULL (from AC18)
Windows 10 Pro, Intel Core i7-4790 CPU @ 3.60GHz, 32.0GB RAM, 64-bit OS
1 REPLY 1

ReignBough
Booster
I found a clipper that will do the operations I needed, which includes difference, intersection, XOR and union.

But of course, you still need to create the zone and holes using ACAPI_Element_Create() and ACAPI_Goodies(APIAny_InsertSubPolyID) based on the polygons created by the clipper.
~ReignBough~
ARCHICAD 24 INT 4018 FULL (from AC18)
Windows 10 Pro, Intel Core i7-4790 CPU @ 3.60GHz, 32.0GB RAM, 64-bit OS

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!