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

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 | Graphisoft Insider Panelist | 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 |

POSIWID ā€“ The Purpose Of a System Is What It Does /// Ā«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!