GDL
About building parametric objects with GDL.

Mirror end railing post

Rico
Booster

I've created a custom railing post in gdl which is asymmetric. I would like the last post in the railing to be mirrored but I can't work out how to do that.

 

Is there a way to get the post index or something like that in gdl?

iMac 27" 5K • macOS 10.15.7 Catalina • 40GB RAM | ArchiCAD 24 5004 FRA
Ryzen Threadripper 3970X • Windows 10 • 64GB RAM | ArchiCAD 24 Solo UKI
5 REPLIES 5
Barry Kelly
Moderator

I am assuming you are just using your custom post in the rail tool?

If so, after you place your railing, go into EDIT mode and select the post and rotate it 180°.

 

BarryKelly_0-1649329621464.png

 

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

Hi Barry,

 

Yes I'm using it with the railing tool but rotating it won't work. Among other things, I want it to be customisable using MVO, and be smart enough to know when it's at the start of the railing and when it's at the end without me having to manually edit individual elements of the railing

 

Here is the profile in plan:

Rico_0-1649332260740.png

You see rotating it wouldn't work. It would need to be mirrored. I managed to use a workaround with MUL -1 if the railing sub-element has a specific ID but I would like it to be more automatic than that.

iMac 27" 5K • macOS 10.15.7 Catalina • 40GB RAM | ArchiCAD 24 5004 FRA
Ryzen Threadripper 3970X • Windows 10 • 64GB RAM | ArchiCAD 24 Solo UKI

Maybe an if statement that dictates to mirror if the post is at a certain railing coordinate.

I haven't messed with railing code for a while but it's all in the gdl pdf.

 

I've been trying the RAILINGEND_DIRECTION_AND_ANGLE[n][1] coordinate. Presumably if the x-coordinate is negative then it's the start of the railing and if it's positive then it's the end.

 

The problem is I don't know how to use it in the if statement. I've been learning gdl for the last few months but I'm still struggling with arrays. How do I get the [n] to reference the current railing node?

iMac 27" 5K • macOS 10.15.7 Catalina • 40GB RAM | ArchiCAD 24 5004 FRA
Ryzen Threadripper 3970X • Windows 10 • 64GB RAM | ArchiCAD 24 Solo UKI

Hi,

 

RAILINGEND_DIRECTION_AND_ANGLE is not applicable to posts.

The post's origin is always (0,0,0). Currently there is no data available to support this idea.

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

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!