Home › Forums › Problems and solutions in GDL › 3D modelling › PGON defintion – help › Reply To: PGON defintion – help
Hi Pavel,
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.
Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SE