Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Swining Bridge

Red
Advocate
Is it possible to script a tube/cylinder to be 30’ long and sag down in the mid 2’? What I’m using it for is a swinging bridge. Or is there a better way to achieve this?

sb.jpg
Thanks,
Red
i7 8700k
ROG Strix Z390-E MoBo
64gb RAM
EVGA GeForce GTX 2080
_______________________
http://www.facebook.com/flatcreekdesignstn
http://www.sraarchitects.biz
21 REPLIES 21
Anonymous
Not applicable
Very nice bit of scripting indeed... I envy your GDL abilities (and math abilities.. lol) I really need to start learning GDL... I'm good with C++ and the more I look into GDL the more aimilarities I notice, so hopefully one day I can create some beautiful scripts like yours...

Oh and I got an error when I tried to emulate a suspension bridge cable and used 1200 metres for the length

cheers,
dan
Frank Beister
Moderator
Oh and I got an error when I tried to emulate a suspension bridge cable and used 1200 metres for the length
I have to check it. The iteration loop to get the not calculatable parameter "a" of the formula is not the bigh math or programming. To get the margins to iterate between is the problem. I have to guess it, what I do before the iteration. Maybe there's a bug or a missing if_then. I will have a look at it. Maybe one can see it in the altering of the approximation curve.

and got an error when
"show curve + alternate" is checked.
The error was zzyxz is not a valid parameter at line .... (notice zzyzx is misspelled)
Easy to fix of course.
I defined a few raw codomain for the parameters, but they are not complete. negative sagging should be prevented. If you calculate the alternates too, it is possible, that they get values, which cause errors. If the script works without the alternate lines it should be OK. The lines are for amusement anyway.
I did not know that Archicad warns you when
an un-initialized variable is encountered in the script.
I don't know, what you mean.
Now all I have to do is figure out how to "GET" the path for the parabola and your object will draw not only a catenary but a parabola in 3D.
This isn't that hard.

There's still missing to calculate the line as arc and its perpared yet to span it not by sagging but by length of the line.
It would be nice to get parts of an ellipse, but its not exact defined by two points and one tangent.
The error was zzyxz is not a valid parameter at line .... (notice zzyzx is misspelled)
Easy to fix of course.
I had seen it. It's an easter egg to proof, who is paying attention.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm