GDL
About building parametric objects with GDL.
SOLVED!

Using GDL to write parameterized iron chains

yongler
Enthusiast

In some scenic spots in Hangzhou, China, chains are used as railings, and the top of pagodas is fixed with iron chains. Like the picture. This kind of iron chain is written in GDL language. The hot spot at one end can be dragged, and the sag arc in the middle can also be controlled. Another key parameter is that each iron ring rotates by 90 °

20230325202137505.jpg 20230326150528.jpg

 

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

For those of us who ever toyed with the idea of trying to learn gdl, this has been beautiful to read and terrifying at the same time.  I congratulate you all guys

 

Cheers!

View solution in original post

18 REPLIES 18
Hmooslechner
Moderator

Interesting - i tried to code somethng like that, but unfortunately, i was not able to do the maths on that.  How can we get this?

AC5.5-AC27EduAut, PC-Win10, MacbookAirM1, MacbookM1Max, Win-I7+Nvidia
Barry Kelly
Moderator

The math for the curve should be pretty straight forward.

I believe it is called a catenary curve.

 

The link in the chain is another matter, and one I probably wouldn't attempt.

The link itself would be quite easy and the rotating 90° for each alternate link is also quite easy.

In a straight line it would be no problem.

But for each link in the curve, you will have to calculate the position in the curve and how much it deviates along the length axis for that particular link.

That will be the tricky part, and I am sure it can be done mathematically, but it is a bit beyond me (a bit of Googling or chatGPT maybe?)

 

The coding may or may not end up quite concise and not too large, but the polygon count of the final object cold be a great hindrance to your model.

I would consider modelling as a TUBE (either square profile or thin rectangle rather than round) and applying a chain surface material (might not map correctly on a round profile).

 

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

i did somethings like this:  https://bimcomponents.com/GSM/Details/25256 

 

You discribed my "mathematical problems" on that very well. You have the curve, but You must get the same distances for the Chain-link-parts ON THIS CURVE.  I could not solve that by myself.

AC5.5-AC27EduAut, PC-Win10, MacbookAirM1, MacbookM1Max, Win-I7+Nvidia

The current version is an arc curve, not a gravity parabola😥. The calculation of the distribution of each link on the circular arc curve is relatively easy.

I will send the gsm file later.

yongler
Enthusiast

The gsm file is here:

Wow.Great ! This is the real gravity curve

Its a very simple solution and nobody will see the difference to "a real catenary curve" as long, as its sufficiantly tightened.  Well done. Very well done!

 

Hmooslechner_1-1679814279559.png

 

 

AC5.5-AC27EduAut, PC-Win10, MacbookAirM1, MacbookM1Max, Win-I7+Nvidia

It seems that ChatGPT doesn't understand GDL yet, so GDLer hasn't been replaced so quickly 🤔

ChatGPT can only learn from resources it can find on the web, and we struggle with that when it comes to understanding GDL. 😂

 

It can't help you with the GDL side of things, but it might be able to give you a formulae to calculate the angle of each link in the curve.

 

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

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!