We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
ā2023-10-23 10:07 PM - last edited on ā2024-09-26 01:48 PM by Doreena Deng
I want to make a Block in GDL with an internal hole, the object made in the simplest possible way. Of course I can make four walls and a roof and make a Block with a hole that way, but I want to make two Blocks, one regular and one smaller void-Block. Is there a command for void in GDL?
Solved! Go to Solution.
ā2023-10-24 08:29 AM - edited ā2023-10-24 08:30 AM
Ah, you want a hollow block with 6 sides still?
You could add slabs (prisms) to the top and bottom to plug the hole.
But easy with GROUPs.
GROUP "box"
BLOCK 1, 1, 1
ENDGROUP
GROUP "void"
ADD 0.2, 0.2, 0.2
BLOCK 0.6, 0.6, 0.6
DEL 1
ENDGROUP
result = SUBGROUP ("box","void")
PLACEGROUP result
This is the wire frame view.
Barry.
ā2023-10-23 11:02 PM
Yes, that's possible. You should look in to the SUBGROUP command.
ā2023-10-23 11:06 PM
Thanks for a swift answer. I suspected the Subgroup. But how to script a Block and a void with Subgroup?
ā2023-10-23 11:20 PM
Here's a couple of links you might like to explore...
https://gdl.graphisoft.com/gdl-basics/advanced-3d-components
https://gdl.graphisoft.com/reference-guide/solid-geometry-commands
ā2023-10-24 03:17 AM
BLOCK and BRICK can not have a hole directly scripted in them.
You can use GROUPs as others have suggested and SUBGROUP one from the other.
Not hard, but you need to know how the grouping works.
I would just use the PRISM_ command (or its variations.
PRISM_ 10, 1.0,
0.0, 0.0, 15,
1.0, 0.0, 15,
1.0, 1.0, 15,
0.0, 1.0, 15,
0.0, 0.0, -1,
0.2, 0.2, 15,
0.8, 0.2, 15,
0.8, 0.8, 15,
0.2, 0.8, 15,
0.2, 0.2, -1
The -1 mask means the following nodes will cut a hole.
Barry.
ā2023-10-24 08:18 AM
Thank you Barry. But: I need a script where the hole does not cut all the way through the cube. That will probably not be possible in your otherwise elegant solution?
ā2023-10-24 08:29 AM - edited ā2023-10-24 08:30 AM
Ah, you want a hollow block with 6 sides still?
You could add slabs (prisms) to the top and bottom to plug the hole.
But easy with GROUPs.
GROUP "box"
BLOCK 1, 1, 1
ENDGROUP
GROUP "void"
ADD 0.2, 0.2, 0.2
BLOCK 0.6, 0.6, 0.6
DEL 1
ENDGROUP
result = SUBGROUP ("box","void")
PLACEGROUP result
This is the wire frame view.
Barry.
ā2023-10-24 08:31 AM
Hello DGSketcher
The link https://gdl.graphisoft.com/gdl-basics/advanced-3d-components will probably help me on track. Thank you š
ā2023-10-24 08:53 AM
That worked well, and not a too complex formula. I changed it so I could see the void from the botom š
Material 4
GROUP "box"
BLOCK 1, 1, 1
ENDGROUP
GROUP "void"
ADD 0.2, 0.2, 0
BLOCK 0.6, 0.6, 0.6
DEL 1
ENDGROUP
result = SUBGROUP ("box","void")
PLACEGROUP result
How did you do the list (with the GDL-script) in your answer? How did you place the list in a grey box with a slider? š¤
ā2023-10-24 09:06 AM - edited ā2023-10-24 09:07 AM
Expand the editing tool bar (3 dots) at the top where you type your reply.
That will create the code box.
Barry.