Removing only one face of a box

Hello,

I am trying to make a box without one of its surfaces. I have realized I must use G4SubtractionSolid, but I am having no success in making a solution to remove only one face of the cube correctly. Therefore, I would be glad to learn a good solution to this problem.

Thank you!

1 Like

Boxes (G4Box) in Geant4 are not “hollow containers”. They are solid volumes. You can’t just “remove a face” the way you’re imagining.

For a “box container”, consider a cardboard carton. In Geant4, that volume would consist of the six (or five, in your case) panels of cardboard, each with a finite, but small, thickness.

You can construct this in Geant4 in four completely different ways.

  1. Use G4Polyhedra and make it as a single volume, by defining appropriate R-Z planes and specifying that you want four sides.

  2. Use G4SubtractionSolid and subtract a G4Box corresponding to the inner empty region from a G4Box corresponding to the outer solid region.

  3. Use G4UnionSolid (or better, G4MultiUnion to build your hollow box out of five flat G4Box panels, with appropriate orientation and center positions.

  4. You can also place a G4Box of air or vacuum as a daughter volume of your solid box. But if you have anything going “inside the box”, you would then have to place them as daughters of that air/vacuum volume.

3 Likes

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