GDL
About building parametric objects with GDL.

2D Length for Railing panel?

MinhNguyen
Expert

Hi all,

I'm getting started with GDL, so please excuse me foe the dumb question!

To get the 3D length of the railing panel I can use RAILINGPANEL_GEOMETRY to get the coordinates of the points and subtract to get the length. But this one doesn't work in 2D. I tried the same trick with RAIL2D_FULL_POLYGON_GEOM but it doesn't work. Maybe I got lucky and have the 3D one working without thoroughly understand how it behaves. Can someone show me how I can get the panel's length in 2D script?

Thanks a lot in advance!

BIM Manager
DKO Architecture - HCMC

12 REPLIES 12

ToperBarrientos_0-1692327067498.png

Hi.

Kindly investigate this.

 

 

Apple M1 Pro CPU
RAM 32 GB
1 TB OS: Ventura 13.1

Hi, not sure if this is an answer to my question?

BIM Manager
DKO Architecture - HCMC

Hi Minh.

Im sorry for some glare answer.

What i mean is try to open the railing tool.. fr. there, several gdl scripts will open.

Then, go to the macro for 2d, & check the relevant 2d coordinates of the panel length.

Apple M1 Pro CPU
RAM 32 GB
1 TB OS: Ventura 13.1
MinhNguyen
Expert

Ah, thanks for the info! What I'm trying to build is a custom railing panel from scratch, and I need the panel's length in each segment for calculation. I succeeded with RAILINGPANEL_GEOMETRY in 3D script to get the value, but couldn't find its equivalent in 2D script 😞

BIM Manager
DKO Architecture - HCMC

Barry Kelly
Moderator

I created my own panel once.

If I remember correctly, I just used an existing panel and changed the 3D part of the script to show what I wanted.

I left the 2D script alone as it is just a symbolic representation and I was happy with that.

It will adjust automatically as you adjust the post spacing or segment lengths.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
MinhNguyen
Expert

Thanks Barry!

Then maybe I will frame my question differently:

Is there a way to get the length of the panel into 2D script of the panel? Like we put dimensions for the panel on floor plan, but to have the value calculated and useable in GDL (whether its 2D script or Parameters, I just need the numbers out for calculation)

MinhNguyen_0-1692349882867.png

 

BIM Manager
DKO Architecture - HCMC

I haven't tried getting lengths in 2D.

I see there are commands to get info in 3D but not so much in 2D

There is ... RAIL_CONNECTING_POSTS

Something about a proportional value for the position of posts where 1 is the overall length (of I assume the segment).

So maybe you can deduce the panel length from that, but it all sounds a bit difficult.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Peter Baksa
Graphisoft
Graphisoft

Hi,

You can't get the 3D length in 2D of the panel object. The projected length can be calculated from RAIL2D_FULL_POLYLINE_GEOM.

For labels there is RAILING_3DLENGTH, but that is the whole railing's length.

In IES individual projected lengths can be listed as Width.

Péter Baksa
Software Engineer, Library
Graphisoft SE, Budapest

Hi Peter,

That's awesome! I was looking into RAIL2D_FULL_POLYLINE_GEOM but can't figure out how to use it.

If I use RAIL2D_FULL_POLYLINE_GEOM[2][1] - RAIL2D_FULL_POLYLINE_GEOM[1][1] like what I did in the 3D script, unfortunately it doesn't work.

Can you please show me how this command should work?

Thank you so much in advance!

BIM Manager
DKO Architecture - HCMC