Home › Forums › Problems and solutions in GDL › 3D modelling › PGON defintion – help
Tagged: 3d, pgon, primitives
This topic contains 2 replies, has 2 voices, and was last updated by Pavel Čapek 1 year, 5 months ago.

AuthorPosts

September 19, 2017 at 08:17 #3553
Hello,
I have a question for PGON definition. I follow gdl documentation http://gdl.graphisoft.com/referenceguide/primitiveelements. 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.
Pavel Čapek
BIM Project 
October 31, 2017 at 16:41 #3643
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 counterclockwise 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
Software Engineer, Library Team
GRAPHISOFT SE 
October 31, 2017 at 16:53 #3644
Hi Péter,
Thank you for your answer. After a while I discovered this by trial and error method. But I definitely make a revision of my code by your advice.Pavel Čapek
BIM Project 
AuthorPosts
You must be logged in to reply to this topic.