2022-04-07 11:43 AM - last edited on 2024-09-24 10:30 AM by Doreena Deng
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?
2022-04-07 01:08 PM
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°.
Barry.
2022-04-07 01:56 PM - edited 2022-04-07 03:46 PM
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:
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.
2022-04-07 03:51 PM
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.
2022-04-08 11:09 AM
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?
2022-04-13 11:59 AM
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.