September 19, 2017 at 08:17 #3553
I have a question for PGON definition. I follow gdl documentation http://gdl.graphisoft.com/reference-guide/primitive-elements. But I don’t understand on which base is set a MINUS or NONE sign for edge indexes.
A negative index changes the direction of the stored normal vector or edge to the opposite in the polygon.
(The stored vector or edge does not change; other polygons can refer to it using the original orientation with a positive index.)
Thank you for an answer.
October 31, 2017 at 16:41 #3643
To define polygons, you have to list the indices of it’s edges. These indices are generated internally, incremented after each EDGE command, and reset to 1 with the BASE command. The edges have a direction. If you include an edge with -ID, the GDL interpreter will include the edge in opposite direction. The edge directions of a polygon should form a continuous counter-clockwise loop. When you have two neighboring polygons with a common edge, going counterclockwise around both polygons means that the common edge will be positive direction in one polygon, and negative in the other. The negative ID is a shortcut for reusing the same edge in opposite direction, you don’t have to define them twice.
If you include an edge with ID = 0, the following edges will define a hole. The edge directions of holes should form a continuous clockwise loop.
I hope this gets you closer to understanding.
Software Engineer, Library Team
October 31, 2017 at 16:53 #3644
You must be logged in to reply to this topic.