BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

GDL beginners question

Anonymous
Not applicable
I'm trying to learn something about GDL script, because I want to make my own objects parametric.
Therefore I studied the cookbook 4 chair example of the beginners guide.
I build a chair in metric according to the manual, but when it comes to making everything parametric I get lost, because of the strange variable of the legs of the chair. The legs are made of the cone.
Leg diamater = lsec
But what means lsec/3, lsec/2 and I even saw somewhere lsec/8.
Can somebody explane to me the meaning of the numbers and the /
Thanks in advance
9 REPLIES 9
Erich
Contributor
lsec is your parametric variable. The "/" just indicates the math division operation and the numbers are the denominators. So lsec/2 is just half the values of the variable lsec and lsec/3 is one third.

HTH
Erich

AC 19 6006 & AC 20
Mac OS 10.11.5
15" Retina MacBook Pro 2.6
27" iMac Retina 5K
Barry Kelly
Moderator
And '*' (asterisk) is multiplication if ever you see that.

Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Erich
Contributor
Take a look at the Operators section of the GDL Reference Guide that is located in your help menu in ArchiCAD. It will give you these basic operators as well as those that are a bit more obtuse. In the US version this section is on page 261 for the ArchiCAD 18 version. It should be somewhere near that point in your copy.
Erich

AC 19 6006 & AC 20
Mac OS 10.11.5
15" Retina MacBook Pro 2.6
27" iMac Retina 5K
Anonymous
Not applicable
Thank you Erich and Barry for the explanation.
But why must I divide in three or two parts?
Because before I could take the parametric step, I wrote the script of the chair with cone and block and the dimensions on the X, Y and Z.
CONE 0.5,0.015,0.03,90,90 and the leg was there.
Now I must make this parametric, and then I don't get it anymore
CONE sthit,lsec/3,lsec/2,90,90
Why is that?
Barry Kelly
Moderator
'sthit' is the length of the cone so you need to create a length parameter called 'sthit' in your parameter list to control it.

'lsec' is the radius of the cone (leg) so again you need a length parameter called 'lsec' to control it.

So instead of using actual fixed numbers in your CONE command you now have parameters that the user will be able to see in the object settings and by changing the values in those parameters the user can control the length and width of the chair legs.


In your CONE command example instead of using one parameter for the base width and another for the top width you are simple using the same radius (lsec) but divided by 3 for the base and divided by 2 for the top.
This way you are guaranteed that the base will always be smaller than the top.

The divide by 3 or 2 are arbitrary figures - they could be anything you want to get the desired ratio between the top and base cone radii.

If you use two separate parameters for base and top then you can control them independently so you could make the base and top any width you want.

The '90,90' at the end is just then angle of the base and top ends of the cone - 90 is perpendicular to the axis of the cone length.

Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
Barry wrote:
'sthit' is the length of the cone ...
Had to read that twice
Barry Kelly
Moderator
s2art wrote:
Barry wrote:
'sthit' is the length of the cone ...
Had to read that twice
I had to be careful not to make a typo.

Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
Studying the cookbook 4 I came to the chapter of the curved chair back.
Instead of simply copying the examples I try to understand the BPRIM_ and the formula to make it parametric.
Can someone explain (90-atn((A/2/bbulg))*2 and rad=(a/2/sin(angl) when the chord is 45 cm and the bulge is 8 cm.
I tried to find a tutorial on youtube but that failed sofar.
sinceV6
Advocate
Hi. There's really not much that can be explained. The formula is to get the radius of a circle based on chord length and depth. It's simple trigonometry.

I'm not really sure the formula is correct. I did my own study on the subject. There is some info online.

If you are asking about the functions, they are GDL circular functions.

bbulg, angl and rad are variables (or parameters, whatever the case)
atn returns arc tangent(of angle).
sin returns sine(of angle)

human readable formatted formulas would be:
(90 - arcTangentOf( (chordLength/2)/chordDepth ) * 2

rad = (chordLength/2) / sineOf(angleData)

Best regards.
Learn and get certified!