GDL
About building parametric objects with GDL.

Solid operations with macros

jc4d
Expert

Hello,

 

I have a door macro as a subroutine and a door handle as another subroutine. What I'm looking after is to perform a solid operation where the handle cuts the door, is it possible?

 

Hope I made myself clear 😅

Juan

 

4 REPLIES 4
Barry Kelly
Moderator

Sure you need to look at the GROUP commands.

I haven't done it with macros but I think it should work the same.

 

Place the door macro call in one GROUP.

The handle macro call in another GROUP

Then SUBGROUP to subtract the handle from the door.

Then PLACEGROUP for the result.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Thank you, just tried but is not working for me, I'm probably doing something wrong.

GROUP "door"
GOSUB 200
ENDGROUP
PLACEGROUP "door"

GROUP "kuppi"
ADDx -0.25
ADDy 0.05
ADDz 0.01
GOSUB 420
DEL 3
ENDGROUP
PLACEGROUP "kuppi"

Result_1 = SUBGROUP("door","kuppi")

PLACEGROUP Result_1
KILLGROUP "door"
KILLGROUP "kuppi"

 

Juan

Sorry, when you said macro, I thought you were CALLing macros.

Subroutines are fine.

 

What you have should work, but comment out the PLACEGROUP lines for "door" & "kuppi".

You don't need to place those, just place the result.

 

You are actually placing them twice.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Oh yes, I'm calling the macro in the subroutine, sorry for the mess up 😅

Of course there is a END statement before the subroutines

202:
CALL door01_macro PARAMETERS all
RETURN

420:
CALL kuppi_macro PARAMETERS ALL
RETURN

 

Juan

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!