Hi!
I’m trying to implement a subtraction solid for the first time. I’m trying with the below code but the expected subtraction is not working, is there something clearly wrong with the code that I am misunderstanding?
G4Box * BoxTest = new G4Box("TestBox", 10*cm, 10*cm, 2*cm);
G4Box * Hole = new G4Box("BoxHole", 5*cm, 5*cm, 2*cm);
G4SubtractionSolid* Holey = new G4SubtractionSolid("Holey",
BoxTest,
Hole,
0,
G4ThreeVector(0 *cm,0 *cm, 0*cm));
G4LogicalVolume* logicHoley = new G4LogicalVolume(Holey, Steel,
"logicHoley",
0, 0, 0);
HoleyPhysical = new G4PVPlacement(0, //rotation
G4ThreeVector(0,0,-10*cm), //location
logicHoley, //logic volume
"HoleyPhys", //name
worldLogic, //mother volume
false,
0, //copy number
true); //check overlaps
Thank you!