cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Developer forum

Subgroup operation performance

jc4d
Advocate

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.

jc4d_0-1666597023985.png

 

 

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
2 REPLIES 2

Solution
MetalFingerz
Enthusiast

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 :

01.png

 

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

jc4d
Advocate

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

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!