cancel
Showing results for
Did you mean:
cancel
Showing results 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!

# Subgroup operation performance

Expert

Hello,

I have to create a "box" with control over the top most face angle, for it I'm using a SPRISM_ command. Now, the thing is I would need to have a thickness on the side faces and not having the top and bottom faces.

To get the result I'm going after,  I'm using a subgroup subtraction where I cut a box from the SPRISM_, not sure if this is the wisest way on solving this problem without affecting the performance or there is another solution.

``````GROUP "Out"
GOSUB 10
ENDGROUP

GROUP "In"
GOSUB 20
ENDGROUP

result_1 = SUBGROUP("In", "Out")

PLACEGROUP result_1
KILLGROUP "Out"
KILLGROUP "In"

END

10:
PRISM_	4,15,
0.1,0.1,15,
0.1,B-0.1,15,
A-0.1,B-0.1,15,
A-0.1,0.1,15
RETURN

20:
SPRISM_ mat ,mat, mat,
4,
0, B, 0, 0, 1, -15.0, !xb, yb, xe, ye, h, angle,
0,0,15,
0,B,15,
A,B,15,
A,0,15
RETURN``````

Juan

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Hello @jc4d ,

SPRISM_ like other PRISMs  accepts holes directly in the command.

For example :

``````SPRISM_ 2, 2, 2,
10, -1, -1, 1, -1, 1.5, 15,
-1, -1, 15,
1, -1, 15,
1, 1, 15,
-1, 1, 15,
-1, -1, -1,    ! contour
-0.8, -0.8, 15,
0.8, -0.8, 15,
0.8, 0.8, 15,
-0.8, 0.8, 15,
-0.8, -0.8, -1    ! hole``````

Would give this :

I think it's a more efficient than having to do solid operations.

2 REPLIES 2
Solution

Hello @jc4d ,

SPRISM_ like other PRISMs  accepts holes directly in the command.

For example :

``````SPRISM_ 2, 2, 2,
10, -1, -1, 1, -1, 1.5, 15,
-1, -1, 15,
1, -1, 15,
1, 1, 15,
-1, 1, 15,
-1, -1, -1,    ! contour
-0.8, -0.8, 15,
0.8, -0.8, 15,
0.8, 0.8, 15,
-0.8, 0.8, 15,
-0.8, -0.8, -1    ! hole``````

Would give this :

I think it's a more efficient than having to do solid operations.

Expert

Thank you @MetalFingerz . I'm glad to know that it is possible to create holes directly in the SPRISM_ as well.👍