We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

Custom GDL Object Help

Anonymous
Not applicable
I am trying to create a custom toe kick for a cabinet that is parametrically linked to the cabinet.

The cabinet is a custom cabinet also created in GDL and I am having issues with the points that I have defined are not creating the correct object.

The first photo is the creation of the Toe Kick at the height location and look I want on a 2' wide cabinet base. I wrote the coordinates of the prism in a way that would translate parametrically but it does not.

The second photo is what happens when the A dimension is stretched to 3'

The third photo is the piece of code for this particular object


I am relatively new to GDL and any help with writing this piece of the code would be appreciated.

2'.PNG
7 REPLIES 7
Anonymous
Not applicable
Image 2
Anonymous
Not applicable
Image 3
Code.PNG
David Maudlin
Rockstar
dtp81390:

I do not understand the logic of your code, but can see that the "y" argument in the status=3000 parts does nothing. Try changing this argument to any number, including zero, and the shape of the Prism_ remains the same. I would suggest using the status=4000 code instead; it will just take some trigonometry to calculate the center point and angle. It has been quite a while since I tried using the status=3000, but my recollection is that it never gave me the results I wanted, maybe this is the problem; I have used the status=4000 successfully.

You should add a Signature to your Profile (click the Profile button near the top of this page) with your ArchiCAD version and operating system (see mine for an example) for more accurate help in this forum.

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC27 USA • iMac 27" 4.0GHz Quad-core i7 OSX11 | 24 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
Anonymous
Not applicable
Thank you for the input. I realized that it wasn't not so much the code but it was the math associated with it. The radius of the arc is not proportional in the way that I had it written. Although I have not had time to test out the new formula and see if it works I believe that it will with the right math. I will post the results and if I continue to have issues I will ask.
Anonymous
Not applicable
The only problem I've had with the status 3000 is when it goes the wrong way around the center point. Clearly this is not your problem so that status seems appropriate.

The problem is how you are calculating the center point. The y-axis value of the point needs to increase such that the height of the chord offset remains the same. I sketched a quick solution but I'm on my iPad and it seems I can't add an attachment. Hopefully the following will help...

You can use the height of the kickspace (b) and half the width (a) to get the partial chord length (c) from the bottom to the center of the kick:

c = sqr(a^2 + b^2)

You can then get the angle from:

ang = atn(b/a)

And the radius of the arc from:

r = (c * 0.5)/sin(ang)

The y-axis offset of the center point is then:

ctr_y = r - b

You will notice that the tan function makes the increase exponential so that the radius will approach infinity as the arc width gets larger and the kick height remains the same.


BTW: (A - y)/2 + y/2 = (A + y)/2
The latter expression seems easier to follow.

Also, I recommend steering clear of using single letter variables for GDL scripts in general, for all sorts of reasons, but particularly "y" and "x" and "z" since they imply a special relationship to the coordinate system. It's not a functional requirement, just one way to help keep the brain from getting twisted in knots.
Anonymous
Not applicable
David wrote:
It has been quite a while since I tried using the status=3000, but my recollection is that it never gave me the results I wanted, maybe this is the problem; I have used the status=4000 successfully.
David, from memory, status code 3000 is fine for absolute value of angle < 180.
Beyond 180, you need to repeat this command.
I think this is undocumented.
David Maudlin
Rockstar
Olivier:

I think since the direction of the angle cannot be controlled with the 3000 status code, then ArchiCAD is using the smaller angle for the given center point and end point. This is another reason I prefer the 4000 status code, the angle can be positive or negative, controlling the direction of the arc.

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC27 USA • iMac 27" 4.0GHz Quad-core i7 OSX11 | 24 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14