May 30, 2016 at 16:05 #2483
I try to display a grid of items in a custom polygon.
I define a polygon with 3 hotspots, then I test a grid of points via the Polygon Operations Macro to know if the point is inside and I draw the item if it is inside.
I often encounter strange results. Some points are considered on the contour of the polygon they are not …
I did not find where the error or the bug, it happens only with specific value.
I enclose a simplified version of the object with default values causing the problem …
June 8, 2016 at 13:41 #2492
This forum does not seem very active but perhaps it lacked a question to my previous post …
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?
Thank you in advance,
June 28, 2016 at 14:30 #2593
The macro you are calling returns “On edge” status for points that lie on the line of the edge, even if they are outside the start-end segment. You could check in your code if that is the case.
The official library doesn’t use this macro with the OPERATION_POINT_INSIDE_POLYGON parameter.
Software Engineer, Library Team
June 28, 2016 at 14:53 #2594
Thank you for your answer, I was losing hope !
You give me a good line of research, I had not noticed that the unwanted items were located on the extensions of segments.
Unfortunately, my final object will not only have 3 segments, I do not know yet how to get out. Perhaps, I may do this by writing a function to determine if an item is on a segment.
Thanks for your help !
You must be logged in to reply to this topic.