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 Scripting the Following

toman311
Enthusiast
I am trying to make a parametric door leaf that can be used in multiple projects. It's a custom cabinet door, but it will be saved as a custom door leaf. I attached a picture of the profile that I don't know how to GDL script. I am hoping someone on this website can explain to me how this would be possible. The goal is to model that profile and have it be parametric.

I have been drawing through GDL script to make my custom cabinet doors, but I don't know how to script this.

woodmont-panel-profiles-only-2013.jpg
>ArchiCAD 23, 7000 USA FULL

>iMac, 27-inch, 2020, Processor: 3.8 GHz 8-Core Intel Core i7, Memory: 64 GB 2667 MHz DDR4, Graphics: AMD Radeon Pro 5500 XT 8 GB
13 REPLIES 13
sinceV6
Advocate
Hi.
If you are thinking of scripting this as a profile to be extruded along a polyline, look into "Additional status codes" in the GDL manual.
toman311
Enthusiast
That's just it. I really don't know how to go about doing this kind of profile. Thanks for the tip. I will check that!
>ArchiCAD 23, 7000 USA FULL

>iMac, 27-inch, 2020, Processor: 3.8 GHz 8-Core Intel Core i7, Memory: 64 GB 2667 MHz DDR4, Graphics: AMD Radeon Pro 5500 XT 8 GB
toman311
Enthusiast
I tried extruding along a polyline and I got an error when turning the corner.
I attached a screen shot of the problem.

The problem is that when I try and turn a 90 degree turn the outside edges don't form a corner (my script is off a bit so it's not a perfect 90 degree turn, but the problem would still be the same). They instead turn at angles.
>ArchiCAD 23, 7000 USA FULL

>iMac, 27-inch, 2020, Processor: 3.8 GHz 8-Core Intel Core i7, Memory: 64 GB 2667 MHz DDR4, Graphics: AMD Radeon Pro 5500 XT 8 GB
toman311
Enthusiast
Here's another view attached.
>ArchiCAD 23, 7000 USA FULL

>iMac, 27-inch, 2020, Processor: 3.8 GHz 8-Core Intel Core i7, Memory: 64 GB 2667 MHz DDR4, Graphics: AMD Radeon Pro 5500 XT 8 GB
toman311
Enthusiast
I've tried another way, but I am having trouble. I ALMOST got it though. Can anyone help me with this problem?

I attached a photo of how far I have gotten. I want to do the intersection tool so I can get the corners. I made the curves out of "PRISM_". I made each curved piece into a separate group. I then try the Intersect Group option and I can never bring the new group into the project. I am not sure what to do. I'll post the code that I have up to the point of it working.


GROUP "RCLeft"
J7=1
R=1
H=3
ADDx R
ADDy -R
!9
PRISM_ 9, H,
-R, R, 15,
COS(180)*R, SIN(180)*R, 64+15,
COS(165)*R, SIN(165)*R, 64+15,
COS(150)*R, SIN(150)*R, 64+15,
COS(135)*R, SIN(135)*R, 64+15,
COS(120)*R, SIN(120)*R, 64+15,
COS(105)*R, SIN(105)*R, 64+15,
COS(90)*R, SIN(90)*R, 64+15,
-R, R, 15
!20
MATERIAL "Mtl-Zinc"
DEL 2
ENDGROUP

GROUP "RCTop"
J7=1
R=1
H=3
ADDx R
ADDy -R
ADDz -R
PRISM_ 9, H,
-R, R, 15,
COS(180)*R, SIN(180)*R, 64+15,
COS(165)*R, SIN(165)*R, 64+15,
COS(150)*R, SIN(150)*R, 64+15,
COS(135)*R, SIN(135)*R, 64+15,
COS(120)*R, SIN(120)*R, 64+15,
COS(105)*R, SIN(105)*R, 64+15,
COS(90)*R, SIN(90)*R, 64+15,
-R, R, 15

DEL 2
ENDGROUP
!45
PLACEGROUP "RCLeft"
ROTy 90
ROTx 270
ADDx -R
PLACEGROUP "RCTop"
DEL 3

!Here's the code that I am having trouble with below.

Corner01=ISECTGROUP{2}("RCTop", "RCLeft")

PLACEGROUP Corner01
KILLGROUP "RCLeft"
KILLGROUP "RCTop"
KILLGROUP "Corner01"

!I can't bring the intersected corner into existence. I would really appreciate
!some help or if anyone can direct me to some information.
>ArchiCAD 23, 7000 USA FULL

>iMac, 27-inch, 2020, Processor: 3.8 GHz 8-Core Intel Core i7, Memory: 64 GB 2667 MHz DDR4, Graphics: AMD Radeon Pro 5500 XT 8 GB
Look up the GDL Cookbook 4, by David Nicholson-Cole. The PDF is freely (legally freely) available all over the Internet.
Check out especially TUBE and TUBEA, and just for the heck of it PUT&GET.
That is if you want to go the way of the tube —with what you already know, it seems to me that you might be able to do what you want by creating a block/prism/whatever and subtracting shapes from it. (I may be getting your overall intent wrong though.)
Also, in case you are fed up with scripting polylines from scratch, check out 'stealing' from Archicad.
toman311
Enthusiast
Thanks! I'll definitely look into that PDF.

Also, I am trying to create shapes using Solid Element Operations (they might be called a little different in GDL, but I can't remember at the moment) and assemble them into the overall form that I want. The model would have to be parametric, so I thought that could be possible with the way I was trying.
>ArchiCAD 23, 7000 USA FULL

>iMac, 27-inch, 2020, Processor: 3.8 GHz 8-Core Intel Core i7, Memory: 64 GB 2667 MHz DDR4, Graphics: AMD Radeon Pro 5500 XT 8 GB
sinceV6
Advocate
Hi.
Don't take my word for it... as I haven't tested, but I think you should put your transformations inside group definitions. There's no need to place groups to do operations. Once they are defined, you call them directly to the operations, and they are called in their defined positions. Read the GDL documentation, if I remember correctly, there's an explanation in group definitions regarding transformations and even an example of this.

You're not seeing the result because
1. The geometry of the two initial groups would overlap the result; so just place the groups to check positions.
2. There might be missing parameters in ISECTGROUP{2} <-- version 2 of the ISECTGROUP command.

Another thing you can do, is to look into CUTPLANE. For the type of thing you are trying to do, it'll be far easier to do: in essence, you'll define two cut planes for each piece, and trim an extended piece to 45° at the ends. You could even do it once with some clever scripting and place the result in the required sides.

Hope that helps.
Best regards.
sinceV6
Advocate
Hi.
Try this code to understand. Make a new object and paste in 3D script.
You can play with the transformation variable tr at the beginning. Try 0.75 for example.

tr = 1

GROUP "BLOCK1"
BLOCK A, B, ZZYZX
ENDGROUP

!ADD tr,tr,tr  !<-- You can uncomment this and won't have an effect on group definitions, but will do in the general object transformations

GROUP "BLOCK2"
ADD tr,tr,tr
SPHERE A/2
DEL 1 !<--- keep an eye on transformations inside groups
ENDGROUP

!!This block will place groups in defined positions, and apply a transformation to the sphere group, but won't work for ISECT command.
!MODEL WIRE
!PLACEGROUP "BLOCK1"
!ADD tr,tr,tr
!PLACEGROUP "BLOCK2"
!DEL 1

MODEL SOLID

INTER = ISECTGROUP("BLOCK1", "BLOCK2")
PLACEGROUP INTER

!!This block will show original groups positions. Comment this to hide groups.
MODEL WIRE
PLACEGROUP "BLOCK1"
PLACEGROUP "BLOCK2"
Best regards.
Learn and get certified!