cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
2024 Technology Preview Program

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

GDL
About building parametric objects with GDL.
SOLVED!

Voids in GDL

Ingolf
Advocate

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?

Ingolf Sundfør, Bricklayer, Author of several Real Life Problem Solving Books for Archicaddicts in Norway.
PC/i7/W11/ArchiCAD 6.5-27
1 ACCEPTED SOLUTION

Accepted Solutions
Solution

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.

BarryKelly_0-1698128906630.png

 

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

View solution in original post

12 REPLIES 12
runxel
Legend

Yes, that's possible. You should look in to the SUBGROUP command.

Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

«Furthermore, I consider that Carth... yearly releases must be destroyed»

Thanks for a swift answer. I suspected the Subgroup. But how to script a Block and a void with Subgroup?

Ingolf Sundfør, Bricklayer, Author of several Real Life Problem Solving Books for Archicaddicts in Norway.
PC/i7/W11/ArchiCAD 6.5-27

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

Apple iMac Intel i9 / macOS Sonoma / AC27UKI (most recent builds.. if they work)
Barry Kelly
Moderator

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

 

BarryKelly_0-1698110212664.png

 

 

The -1 mask means the following nodes will cut a hole.

 

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

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?

Ingolf Sundfør, Bricklayer, Author of several Real Life Problem Solving Books for Archicaddicts in Norway.
PC/i7/W11/ArchiCAD 6.5-27
Solution

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.

BarryKelly_0-1698128906630.png

 

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

Hello DGSketcher

The link https://gdl.graphisoft.com/gdl-basics/advanced-3d-components will probably help me on track. Thank you 🙂

Ingolf Sundfør, Bricklayer, Author of several Real Life Problem Solving Books for Archicaddicts in Norway.
PC/i7/W11/ArchiCAD 6.5-27

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

Ingolf_0-1698130093032.png

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? 🤔

 

Ingolf Sundfør, Bricklayer, Author of several Real Life Problem Solving Books for Archicaddicts in Norway.
PC/i7/W11/ArchiCAD 6.5-27

 

Expand the editing tool bar (3 dots) at the top where you type your reply.

 

BarryKelly_0-1698131155772.png

 

That will create the code box.

 

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!