<?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: Zone Polygon with different Construction method in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Zone-Polygon-with-different-Construction-method/m-p/125212#M5727</link>
    <description>alright, I resolved this problem,Just replace one line&lt;BR /&gt;
&lt;BR /&gt;
ACAPI_Database(APIDb_GetAdditionalPolyID,&amp;amp;elem&lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;.zone.refPoly_id,&amp;amp;elemMemo,NULL);&lt;BR /&gt;
			//ACAPI_Element_GetMemo(elem&lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;.header.guid,&amp;amp;elemMemo);&lt;BR /&gt;
&lt;BR /&gt;
 &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_redface.gif" style="display : inline;" /&gt; &lt;BR /&gt;
&lt;BR /&gt;
thanks.</description>
    <pubDate>Tue, 05 Mar 2013 07:35:57 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-03-05T07:35:57Z</dc:date>
    <item>
      <title>Zone Polygon with different Construction method</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Zone-Polygon-with-different-Construction-method/m-p/125211#M5726</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi,&lt;BR /&gt;For now I am trying to fetch Zone's outline with API,first all I placed a Rectangular Wall with Center Construction method.And placed a Zone in the area with Inner Edge Construction method.(figure 1)&lt;BR /&gt;&lt;BR /&gt;I use some code with snippet:&lt;BR /&gt;//------------------------Code--------------------------&lt;BR /&gt;//elem&lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt; with ZoneTypeID&lt;BR /&gt;&lt;BR /&gt;ACAPI_Element_GetMemo(elem&lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;.header.guid,&amp;amp;elemMemo);&lt;BR /&gt;&lt;BR /&gt;for (int j = 1; j &amp;lt;= elem&lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;.zone.poly.nSubPolys; j++)&lt;BR /&gt;{&lt;BR /&gt;begInd = (*elemMemo.pends) [j-1] + 1;&lt;BR /&gt;endInd = (*elemMemo.pends) ;&lt;BR /&gt;&lt;BR /&gt;for (int x = begInd; x &amp;lt; endInd; x++,wallIdx++)&lt;BR /&gt;{&lt;BR /&gt;begC = (*elemMemo.coords) ;&lt;BR /&gt;endC = (*elemMemo.coords) [x+1];&lt;BR /&gt;&lt;BR /&gt;arcInd = FindArc (*elemMemo.parcs, elem&lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;.zone.poly.nArcs, x);&lt;BR /&gt;if(arcInd != -1)&lt;BR /&gt;{&lt;BR /&gt;Walls[wallIdx].type = WALLTYPE_ARC;&lt;BR /&gt;ArcGetOrigo(&amp;amp;begC,&amp;amp;endC,(*elemMemo.parcs)[arcInd].arcAngle,&amp;amp;arcC);&lt;BR /&gt;Walls[wallIdx].arcCenterX = arcC.x;&lt;BR /&gt;Walls[wallIdx].arcCenterY = arcC.y;&lt;BR /&gt;&lt;BR /&gt;diameter = DistCPtr(&amp;amp;begC,&amp;amp;arcC) * 2;&lt;BR /&gt;&lt;BR /&gt;Walls[wallIdx].len = (diameter * PI * ((*elemMemo.parcs)[arcInd].arcAngle * RADDEG) / 360);&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;Walls[wallIdx].type = WALLTYPE_LINEAR;&lt;BR /&gt;Walls[wallIdx].len = DistCPtr(&amp;amp;begC,&amp;amp;endC);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Walls[wallIdx].pt1X = begC.x;&lt;BR /&gt;Walls[wallIdx].pt1Y = begC.y;&lt;BR /&gt;Walls[wallIdx].pt2X = endC.x;&lt;BR /&gt;Walls[wallIdx].pt2Y = endC.y;&lt;BR /&gt;&lt;BR /&gt;Log("Extract Wall begC: endC: Length:[%f]",&lt;BR /&gt;Walls[wallIdx].pt1X,Walls[wallIdx].pt1Y,Walls[wallIdx].pt2X,Walls[wallIdx].pt2Y,&lt;BR /&gt;Walls[wallIdx].len);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;ACAPI_DisposeElemMemoHdls(&amp;amp;elemMemo);&lt;BR /&gt;//------------------------Code End---------------------&lt;BR /&gt;&lt;BR /&gt;I fetched all the four Wall with following Values:&lt;BR /&gt;&lt;BR /&gt;[14:54:01.976]:Extract Wall begC: endC: Length:[3.880000]&lt;BR /&gt;[14:54:01.976]:Extract Wall begC: endC: Length:[3.880000]&lt;BR /&gt;[14:54:01.976]:Extract Wall begC: endC: Length:[3.880000]&lt;BR /&gt;[14:54:01.976]:Extract Wall begC: endC: Length:[3.880000]&lt;BR /&gt;&lt;BR /&gt;Of course The Area of Zone is 3.88 * 3.88 = 15.54 square meter,Just the same as the figure showed.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The problem is,When I change the constriction method with Zone to "Reference Line" with Gross Polygon(figure 2) with 16 square meter&lt;BR /&gt;&lt;BR /&gt;I expecting With the same code, I'll get the "expanded Polygon with Zone",But I got the same result with that...&lt;BR /&gt;&lt;BR /&gt;[15:02:34.235]:Extract Wall begC: endC: Length:[3.880000]&lt;BR /&gt;[15:02:34.235]:Extract Wall begC: endC: Length:[3.880000]&lt;BR /&gt;[15:02:34.235]:Extract Wall begC: endC: Length:[3.880000]&lt;BR /&gt;[15:02:34.235]:Extract Wall begC: endC: Length:[3.880000]&lt;BR /&gt;&lt;BR /&gt;How can I fetch the "right" Zone outline just like Reference Line Method showed?&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/DIV&gt;&lt;BR /&gt;&lt;IMG src="http://community.graphisoft.com/t5/image/serverpage/image-id/71119iA29761E13D6220B6/image-size/large?v=v2&amp;amp;px=999" border="0" alt="2.png" title="2.png" /&gt;</description>
      <pubDate>Wed, 02 Aug 2023 13:24:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Zone-Polygon-with-different-Construction-method/m-p/125211#M5726</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-02T13:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: Zone Polygon with different Construction method</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Zone-Polygon-with-different-Construction-method/m-p/125212#M5727</link>
      <description>alright, I resolved this problem,Just replace one line&lt;BR /&gt;
&lt;BR /&gt;
ACAPI_Database(APIDb_GetAdditionalPolyID,&amp;amp;elem&lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;.zone.refPoly_id,&amp;amp;elemMemo,NULL);&lt;BR /&gt;
			//ACAPI_Element_GetMemo(elem&lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;.header.guid,&amp;amp;elemMemo);&lt;BR /&gt;
&lt;BR /&gt;
 &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_redface.gif" style="display : inline;" /&gt; &lt;BR /&gt;
&lt;BR /&gt;
thanks.</description>
      <pubDate>Tue, 05 Mar 2013 07:35:57 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Zone-Polygon-with-different-Construction-method/m-p/125212#M5727</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-05T07:35:57Z</dc:date>
    </item>
  </channel>
</rss>

