Created attachment 792 [details] File with bugged geometry In my geometry I need a plate with biconical hole. For this I initially created G4Box and G4GenericPolycone solids (specific values are not important): G4Box* solidPlateTMP = new G4Box("solidPlateTMP", 5, 5, 2); double Zs[] = { -2.1, 0, 2.1}; double Rs[] = {2, 1, 2}; G4GenericPolycone* solidHole = new G4GenericPolycone("solidHole", 177.*deg, 273.*deg, 3, Rs, Zs); And then create the solid I need: G4SubtractionSolid* solidPlate = new G4SubtractionSolid("solidPlate", solidPlateTMP, solidHole, 0, G4ThreeVector(5, 5, 0)); // hole center axis is at the plate's corner.
Created attachment 793 [details] Minimal code reproducing the problem (Sorry, accidentally sent unfinished bug report) As said earlier, G4GenericPolycone resulted in incorrect geometry shown in the attachment#1 [details]. Using G4Polycone with the same parameters instead, however, gives expected result. In the attachment#2 [details] is the minimal code which reproduces the problem. After compilation running ./Geant4_bug produces .wrl geometry file with the bug. If program is run with -f option it will produce .wrl file with correct geometry.
Created attachment 794 [details] G4GenericPolycone
Created attachment 795 [details] G4Polycone
Geant4 worked correctly, the reason of the issue is that the solids constructed with G4GenericPolycone and G4Polycone have different shape, please see the images in the attachments.