GDL
About building parametric objects with GDL.

How to create a road junction with free shape and rotation ability

Partha02
Contributor

Hello, I'm creating a Road junction using the GDL object. In this junction, there are three objects.
The first one is the junction object and the second one is the transition object which is used
to blend the road profiles with the junction and last but not least the sidewalk object.
Here, the junction and sidewalk objects are created using the PRISM_ element, and the transition object
is created using the MESH_ element.Screenshot 2022-09-02 143227.png

Here, we can make the flat object but when we perform some
rotation in the objects using the ROTX command then the objects get some extra elevation which
is not expected.

Partha02_0-1662108273734.png

 

Now, I want an element where I can create a free shape and also perform some rotation also
why is there an extra elevation in this object?

eg: 

Partha02_1-1662108405883.png

 

2 REPLIES 2
Palawat
Advocate

It's difficult to find the culprit from just the code you showed. First, I would check if the data you "PUT" in the buffer is correct. If so, it's probably due to multiple transformations (ADD, ROT, ...) used in the linear fashion when placing multiple parts.

What I would do is to place the first part (either road, transition or junction) then use "DEL" to reset the global location to the library part's origin, then place another object and clear the transformation again. It's more work but it's the best way to make sure that the transformation added to the previous part won't affect the latter.

Archicad 26, Windows 10, Corei7 3.4 GHz, 16 GB Ram.
https://www.indigofigs.com
https://www.facebook.com/indigofigs
Peter Baksa
Graphisoft
Graphisoft

Hi,

 

GDL objects don't work in the plan's coordinate system, they have their own. Their level 0 corresponds to the bottom offset in the plan.

Transformation commands work on the coordinates of the whole object, not the center of gravity of individual commands. By using rotx you are rotating around the local X axis, so if the model is far from the X axis, it will be elevated.

Further explanation:

https://gdl.Graphisoft.com/gdl-basics/coordinates-and-transformations

https://gdl.Graphisoft.com/reference-guide/coordinate-transformations

 

 

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest