<?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 Point inside a polygon using Polygon Operations Macro in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Point-inside-a-polygon-using-Polygon-Operations-Macro/m-p/290483#M7600</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;Hi !&lt;BR /&gt;
&lt;BR /&gt;
First of all, english isn't my native langage, forgive me if my message isn't correct english  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt;&lt;BR /&gt;
&lt;BR /&gt;
I post a message in official Graphisoft forum (&lt;A href="http://gdl.graphisoft.com" target="_blank"&gt;http://gdl.graphisoft.com&lt;/A&gt;) but without any answer yet ...&lt;BR /&gt;
&lt;BR /&gt;
----&lt;BR /&gt;
&lt;BR /&gt;
I try to display a grid of items in a custom polygon.&lt;BR /&gt;
&lt;BR /&gt;
I define a polygon with 3 hotspots, then I test a grid of points with the Polygon Operations Macro to know if the point are inside. I draw the item if the point is inside or on the contour of the polygon.&lt;BR /&gt;
&lt;BR /&gt;
I often encounter strange results. Some points are considered on the contour of the polygon even they are not …&lt;BR /&gt;
&lt;BR /&gt;
I did not find where the error or the bug is, it happens only with specific value.&lt;BR /&gt;
&lt;BR /&gt;
I enclose a simplified version of the object with default values causing the problem …&lt;BR /&gt;
&lt;BR /&gt;
Did someone or object of the official library use this macro for this purpose? Have you ever noticed this bad behavior ? Is there a way around this problem?&lt;BR /&gt;
&lt;BR /&gt;
Thank you in advance,&lt;BR /&gt;
SimPey.&lt;/R&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 08 Jun 2016 12:54:53 GMT</pubDate>
    <dc:creator>psylo</dc:creator>
    <dc:date>2016-06-08T12:54:53Z</dc:date>
    <item>
      <title>Point inside a polygon using Polygon Operations Macro</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Point-inside-a-polygon-using-Polygon-Operations-Macro/m-p/290483#M7600</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;Hi !&lt;BR /&gt;
&lt;BR /&gt;
First of all, english isn't my native langage, forgive me if my message isn't correct english  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt;&lt;BR /&gt;
&lt;BR /&gt;
I post a message in official Graphisoft forum (&lt;A href="http://gdl.graphisoft.com" target="_blank"&gt;http://gdl.graphisoft.com&lt;/A&gt;) but without any answer yet ...&lt;BR /&gt;
&lt;BR /&gt;
----&lt;BR /&gt;
&lt;BR /&gt;
I try to display a grid of items in a custom polygon.&lt;BR /&gt;
&lt;BR /&gt;
I define a polygon with 3 hotspots, then I test a grid of points with the Polygon Operations Macro to know if the point are inside. I draw the item if the point is inside or on the contour of the polygon.&lt;BR /&gt;
&lt;BR /&gt;
I often encounter strange results. Some points are considered on the contour of the polygon even they are not …&lt;BR /&gt;
&lt;BR /&gt;
I did not find where the error or the bug is, it happens only with specific value.&lt;BR /&gt;
&lt;BR /&gt;
I enclose a simplified version of the object with default values causing the problem …&lt;BR /&gt;
&lt;BR /&gt;
Did someone or object of the official library use this macro for this purpose? Have you ever noticed this bad behavior ? Is there a way around this problem?&lt;BR /&gt;
&lt;BR /&gt;
Thank you in advance,&lt;BR /&gt;
SimPey.&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 Jun 2016 12:54:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Point-inside-a-polygon-using-Polygon-Operations-Macro/m-p/290483#M7600</guid>
      <dc:creator>psylo</dc:creator>
      <dc:date>2016-06-08T12:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Point inside a polygon using Polygon Operations Macro</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Point-inside-a-polygon-using-Polygon-Operations-Macro/m-p/290484#M7601</link>
      <description>Example image&lt;BR /&gt;&lt;IMG src="https://community.graphisoft.com/t5/image/serverpage/image-id/37073i65AF770B917860CC/image-size/large?v=v2&amp;amp;px=999" border="0" alt="test polygon operation macro.jpg" title="test polygon operation macro.jpg" /&gt;</description>
      <pubDate>Wed, 08 Jun 2016 12:56:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Point-inside-a-polygon-using-Polygon-Operations-Macro/m-p/290484#M7601</guid>
      <dc:creator>psylo</dc:creator>
      <dc:date>2016-06-08T12:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Point inside a polygon using Polygon Operations Macro</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Point-inside-a-polygon-using-Polygon-Operations-Macro/m-p/290485#M7602</link>
      <description>Try this:&lt;BR /&gt;
Lines 41-42&lt;BR /&gt;
!		IF ret=1 OR ret=3 OR ret=4 THEN&lt;BR /&gt;
		IF ret=1 OR  ret=4 THEN  &lt;BR /&gt;
Maybe ret=3 means that the point is on the line but not necessarily between the points.&lt;BR /&gt;
Perhaps You should test it properly but it worked fine by me.</description>
      <pubDate>Mon, 11 Jul 2016 15:10:02 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Point-inside-a-polygon-using-Polygon-Operations-Macro/m-p/290485#M7602</guid>
      <dc:creator>Pertti Paasky</dc:creator>
      <dc:date>2016-07-11T15:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Point inside a polygon using Polygon Operations Macro</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Point-inside-a-polygon-using-Polygon-Operations-Macro/m-p/290486#M7603</link>
      <description>Hello !&lt;BR /&gt;
&lt;BR /&gt;
I forgot to update this message with Graphisoft official response I got on the GDL forum (&lt;A href="http://gdl.graphisoft.com/forums/topic/point-inside-a-polygon-using-polygon-operations-macro/" target="_blank"&gt;&lt;LINK_TEXT text="http://gdl.graphisoft.com/forums/topic/ ... ons-macro/"&gt;http://gdl.graphisoft.com/forums/topic/point-inside-a-polygon-using-polygon-operations-macro/&lt;/LINK_TEXT&gt;&lt;/A&gt;).&lt;BR /&gt;
&lt;BR /&gt;
You have well spotted the problem: the macro will not only find if a point is on a segment of the contour but also on the lines formed by the segments of the contour.&lt;BR /&gt;
&lt;BR /&gt;
Too bad ! It looks like a bug to me but I do not think it will being fixed!&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your help.</description>
      <pubDate>Tue, 12 Jul 2016 09:28:44 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Point-inside-a-polygon-using-Polygon-Operations-Macro/m-p/290486#M7603</guid>
      <dc:creator>psylo</dc:creator>
      <dc:date>2016-07-12T09:28:44Z</dc:date>
    </item>
  </channel>
</rss>

