<?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: ChamferPolygon2DDataContour and ChamferPolygon2DDataVertex can not get chamfer polygon in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/ChamferPolygon2DDataContour-and-ChamferPolygon2DDataVertex-can/m-p/293957#M4110</link>
    <description>&lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt;  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt;  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt; Maybe I found the problem.When I use this polygon data with clockwise, it always gets the resulting polygon null,but err=NoError.&lt;BR /&gt;
Now I have no problem when changing polygon data to counterclockwise. I can get the resulting polygon&lt;BR /&gt;
success.</description>
    <pubDate>Tue, 05 Jun 2018 07:05:02 GMT</pubDate>
    <dc:creator>leilei</dc:creator>
    <dc:date>2018-06-05T07:05:02Z</dc:date>
    <item>
      <title>ChamferPolygon2DDataContour and ChamferPolygon2DDataVertex can not get chamfer polygon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ChamferPolygon2DDataContour-and-ChamferPolygon2DDataVertex-can/m-p/293956#M4109</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hello! I get a zone Polygon2DData,when I test the ChamferPolygon2DDataContour and ChamferPolygon2DDataVertex with chamfered the zone polygon,the return err=NoError,But the resulting polygon is always zero count,Has anyone used these functions? &lt;IMG style="display: inline;" src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" border="0" /&gt; &lt;IMG style="display: inline;" src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" border="0" /&gt; &lt;IMG style="display: inline;" src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" border="0" /&gt; &lt;IMG style="display: inline;" src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" border="0" /&gt; &lt;IMG style="display: inline;" src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" border="0" /&gt; &lt;IMG style="display: inline;" src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" border="0" /&gt; &lt;BR /&gt;&lt;BR /&gt;Test code below this:&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;static GSErrCode	ChamferPolygonWithRadius(Geometry::Polygon2DData&amp;amp; polygon2DData, vector&amp;lt;double&amp;gt; dRadius)
{
	GSErrCode err = NoError;

	////1.ChamferPolygon2DDataContour test
	//GS::VAArray&amp;lt;Geometry::Polygon2DData&amp;gt; chamPolys;
	//err = ChamferPolygon2DDataContour(polygon2DData, 1, 1.5, &amp;amp;chamPolys);
	//WriteReport_Alert("count is%d", chamPolys.GetItemCount());
	//WriteReport_Alert("err=%d", err);
	//if (err == NoError &amp;amp;&amp;amp; chamPolys.GetItemCount() == 1)
	//	Geometry::CopyPolygon2DData(&amp;amp;polygon2DData, chamPolys[1]);

	//for (UIndex iResPoly = 1; iResPoly &amp;lt;= chamPolys.GetItemCount(); iResPoly++)
	//	Geometry::FreePolygon2DData(&amp;amp;chamPolys[iResPoly]);


	//2.ChamferPolygon2DDataVertex test
	Int32 minIndex = std::min(Int32(dRadius.size()), Int32(polygon2DData.nVertices));
	WriteReport_Alert("maxindex%d", minIndex);
	Int32 nvIndex = 0;
	for (Int32 i = 0; i &amp;lt; minIndex; i++)
	{
		if (IS_ZERO(dRadius&lt;I&gt;))
			continue;
		GS::VAArray&amp;lt;Geometry::Polygon2DData&amp;gt; chamPolys;
		err = ChamferPolygon2DDataVertex(polygon2DData, i+1, dRadius&lt;I&gt;, &amp;amp;chamPolys);
		WriteReport_Alert("count is%d", chamPolys.GetItemCount());
		WriteReport_Alert("err=%d", err);
		if (err == NoError &amp;amp;&amp;amp; chamPolys.GetItemCount() == 1)
			Geometry::CopyPolygon2DData(&amp;amp;polygon2DData, chamPolys[1]);

		for (UIndex iResPoly = 1; iResPoly &amp;lt;= chamPolys.GetItemCount(); iResPoly++)
			Geometry::FreePolygon2DData(&amp;amp;chamPolys[iResPoly]);
		
	}
	return err;
}
&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 06 Dec 2022 12:33:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ChamferPolygon2DDataContour-and-ChamferPolygon2DDataVertex-can/m-p/293956#M4109</guid>
      <dc:creator>leilei</dc:creator>
      <dc:date>2022-12-06T12:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: ChamferPolygon2DDataContour and ChamferPolygon2DDataVertex can not get chamfer polygon</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ChamferPolygon2DDataContour-and-ChamferPolygon2DDataVertex-can/m-p/293957#M4110</link>
      <description>&lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt;  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt;  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt; Maybe I found the problem.When I use this polygon data with clockwise, it always gets the resulting polygon null,but err=NoError.&lt;BR /&gt;
Now I have no problem when changing polygon data to counterclockwise. I can get the resulting polygon&lt;BR /&gt;
success.</description>
      <pubDate>Tue, 05 Jun 2018 07:05:02 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ChamferPolygon2DDataContour-and-ChamferPolygon2DDataVertex-can/m-p/293957#M4110</guid>
      <dc:creator>leilei</dc:creator>
      <dc:date>2018-06-05T07:05:02Z</dc:date>
    </item>
  </channel>
</rss>

