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.)
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.
Library Platform, Software Engineer GRAPHISOFT SE