<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Creating/Adding polygon (holes) in a zone in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Creating-Adding-polygon-holes-in-a-zone-SOLVED/m-p/214629#M5826</link>
    <description>I found a clipper that will do the operations I needed, which includes difference, intersection, XOR and union.&lt;BR /&gt;
&lt;BR /&gt;
But of course, you still need to create the zone and holes using &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_Element_Create()&lt;E&gt;&lt;/E&gt; and &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_Goodies(APIAny_InsertSubPolyID)&lt;E&gt;&lt;/E&gt; based on the polygons created by the clipper.</description>
    <pubDate>Wed, 11 Dec 2013 08:01:59 GMT</pubDate>
    <dc:creator>ReignBough</dc:creator>
    <dc:date>2013-12-11T08:01:59Z</dc:date>
    <item>
      <title>Creating/Adding polygon (holes) in a zone [SOLVED]</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Creating-Adding-polygon-holes-in-a-zone-SOLVED/m-p/214628#M5825</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;STRONG&gt;Figure 1&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;I have the following zones, walls and a polygon (using polyline). The polygon is used as the boundary for the main zone. &lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Figure 2&lt;/STRONG&gt; (manual)
&lt;UL&gt;
&lt;LI&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;I created the main zone polygon (MZP) by following the vertices of the polyline as the guide.&lt;/LI&gt;
&lt;LI&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;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.&lt;/LI&gt;
&lt;/UL&gt;
&lt;S&gt;&lt;S&gt;&lt;STRONG&gt;Figure 3&lt;/STRONG&gt; (API) &lt;S&gt;&lt;/S&gt;&lt;/S&gt;&lt;/S&gt;
&lt;UL&gt;
&lt;LI&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Using the API, I created the MZP using the polyline's &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;elem.polyLine.poly and its corresponding polygon values on memo (&lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;coords, &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;pends, &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;parcs, &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;vertexIDs).&lt;/LI&gt;
&lt;LI&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Then, I go through all the existing zone elements and add/insert (&lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;APIAny_InsertSubPolyID) their polygon (&lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;elem[idx].zone.poly and the corresponding memo values) to MZP.&lt;/LI&gt;
&lt;/UL&gt;
&lt;S&gt;&lt;S&gt;&lt;STRONG&gt;Question&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;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.&lt;/S&gt;&lt;/S&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 01 Aug 2023 16:55:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Creating-Adding-polygon-holes-in-a-zone-SOLVED/m-p/214628#M5825</guid>
      <dc:creator>ReignBough</dc:creator>
      <dc:date>2023-08-01T16:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Creating/Adding polygon (holes) in a zone</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Creating-Adding-polygon-holes-in-a-zone-SOLVED/m-p/214629#M5826</link>
      <description>I found a clipper that will do the operations I needed, which includes difference, intersection, XOR and union.&lt;BR /&gt;
&lt;BR /&gt;
But of course, you still need to create the zone and holes using &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_Element_Create()&lt;E&gt;&lt;/E&gt; and &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_Goodies(APIAny_InsertSubPolyID)&lt;E&gt;&lt;/E&gt; based on the polygons created by the clipper.</description>
      <pubDate>Wed, 11 Dec 2013 08:01:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Creating-Adding-polygon-holes-in-a-zone-SOLVED/m-p/214629#M5826</guid>
      <dc:creator>ReignBough</dc:creator>
      <dc:date>2013-12-11T08:01:59Z</dc:date>
    </item>
  </channel>
</rss>

