I am trying to define a simple boolean union solid made of a parallelepiped and a trapezoid. The code looks like this:
G4Box *box = new G4Box("box", 5., 50., 50.);
G4Trd *trap = new G4Trd("trap", 5., 5., 50., 20., 30.);
G4UnionSolid *solid =
new G4UnionSolid("solid", box, trap, nullptr, G4ThreeVector(0., 0., 80.));
Placing a volume, it looks like this in the OpenGL visualizer:
At first sight it’s ok, but zooming near to the contact surface I get this:
The trapezoid seems displaced along Z (vertical direction on the bottom figure) and Y (horizontal). Could this be due to rounding errors? It seems strange to me given the actual numbers in the code, but I’m not an expert. Or could this be just a visualization error? Generally speaking, is this something to be worried about relatively to the correctness of the simulation?
Thanks in advance for any help.