Basic question about constructing composite shapes in TGeo

Hi,

I have four shapes from which I would like to subtract three of them from the other.

This means: The shape A is the one which shall remain.
And B, C and D are shapes I want to subtract from it.

In case of A, B and C it works for (A-B)-©.
Also for (A-B)-(D).

But how to do that for B, C and D?
With the help of https://root.cern.ch/root/html534/guides/users-guide/Geometry.html#units I don’t get it and hence, I tried lots of combinations.
Can someone please figure that out (so I can drop other mistakes)?
Thank you in advance!

I guess @agheata can help you.

Hi,
The expression is evaluated from left to right, parentheses get precedence at a given level. So you can do:
A-B-C-D
A-(B+C+D)
((A-B)-C)-D
A-(B+C)-D

Thanks! Does that mean all these variants are the same?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.