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
Isn't the curve that a bridge of this type forms a catenary ?
I have heard that the mathematical description of the catenary curve
involves hyperbolic trig functions.
There was a discussion several years ago about how to script
this curve in GDL which does not have hyperbolic functions.
Peter Devlin
Anonymous
Not applicable
you're right

catenary

for anyone that's interested...

http://en.wikipedia.org/wiki/Catenary



bill
Frank Beister
Moderator
OK. We don't have a hyperbolic cosine, but there's a substitution. See Hyperbolic function.

I see, I will think about it again.

EDIT:
I know it's in german, but the java-applet is eye opening:
http://www.arndt-bruenner.de/mathe/java/kettenlinie.htm
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
Anonymous
Not applicable
Frank,
I just went to Yahoo Groups GDL Talk and did a search for "catenary"
and found the discussion I mentioned before. It was two years ago and
DNC was working on how to script a chain object.
The thread might give you some info you could use.
Thanks,
Peter Devlin
Frank Beister
Moderator
Thanks Peter,

tonight I integrated the formula of the german math site and it works, but as in your mentioned thread the main point is the defining of the parameter a. I haven't found a solution for the right value to get a defined apex point.
But maybe it's not unsolveable. All discussions I read to this issue took a given rope of a certain lenght and tried calculate the line. But the length isn't a parameter I'm interested in, the value of sagging is defining my line. For the lenght-bounded calculation it isn't trivial to find the correct parable either. Mr. Bruenner writes there is nothing less to solve the following formula for a:
L=(-dx·ln((SQR(a2·dx^4+2·a·dx^2·dy+dx^2+dy^2)-a·dx^2-dy)·(SQR(a^2·dx^4-2·a·dx^2·dy+dx^2+dy^2)-a·dx^2+dy)/dx^2)/(4·a)+(a·dx^2-dy)·SQR(a^2·dx^4-2·a·dx^2·dy+dx^2+dy^2)/(4·a·dx)+sqr(a^2·dx^4+2·a·dx^2·dy+dx^2+dy^2)·(dy/(4·a·dx)+dx/4))/dx
I have contacted the author of the site. Maybe he can help. He is a math teacher and speaks german, what is not bad in this case. 😉

As far as I will have something usable, I will post it.

... to be continued.
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
gerd
Participant
just to make it a little less easy: 😉
I have read a little in some webpages about structure analysis: the weight of the cable (and also g) doesn't influence the form of the catenary directly. but: most cables are elastic, so it normally gets longer if the load gets higher.

but I think, in a first step we should ignore this...
it will be not important, if the points of suspension and the sagging are the parameters, then only the original length of cable to reach the planned geometry is different.


best regards, gerd
Frank Beister
Moderator
but I think, in a first step we should ignore this...
you have a good day, isn't it? Ahhh... friday, I see.
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
Frank Beister
Moderator
Here comes a not stable working first result. For certain flat or small cables there is still a "negative argument in logaritm" error. It can't be worked around. Its still a bug.

The formula is integrated and a raw aprroximation loop for the factor "a" is implemented. You can switch on to show the approximation curve for the value. It shows the difference of sagging.
Now I have found a math lesson-pdf with a proper working approximation algorithm. I will give it a try later.

EDIT: Old version deleted. See next posting for newer one.
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
Frank Beister
Moderator
Here are two final versions: One for AC7 and one for AC8.1+ with moveable hotspots. You can show a side view of the cable/rope in floor plan to adjust construction. To compare with a 'simple' parable you can show its graph in 2D/3D too.
I have implemented two iteration algorithm: bisection and regula falsi. Bisection is faster under the (adjustable) tolreance than regula falsi, which needs sometimes the maximum of allowed iteration steps (# of steps can be printed) and keeps above. The approximation curve, which can be made visible, is the aberration of the aproxximated sagging to aim, depending of the factor a in the catenary formula.

[No proof for correctness or no data loss in case of endless loops.]
If it's in practical use, it woud be nice to get a pict.

@gerd
Yes, it's possible to integrate it into a net like tentmaker does. Easiest way would be to take the COONS statement with four catenary lines around, but this will only sag in one direction (z). The top view is again a quadrangle. One could combine it (e.g. f(x)*g(x)) with a "sagging" in x/y, but this would not be a realistic or physical correct line for shure. And without this the effort to approximate against a hyperbolic cosine makes not really sense. Then it will be better to use a spline.
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
Anonymous
Not applicable
Frank,
I just downloaded the catenary library part and opened the scripts.
That is one awesome piece of GDL scripting.

I am having a great time playing around with the settings.

I checked script in the 3D script 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 have to check but I did not know that Archicad warns you when
an un-initialized variable is encountered in the script. At least in the
past, I thought AC just assigned a zero value in such situations and
did not warn.

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.

Wonderful object, thank you.
Peter Devlin