Good day!
I have found a strange issue with G4Extruded solid. I generated 3,4,5,6-angle prisms (scintillator) with the Radius 7.5mm. The 4,5 -angle prisms demonstrated clearly visible distortion when I generated a VRML scene to check how it looks. Please see the images…
I used exact code like yours:
const G4int nsect = 3; //3,4,5,6
std::vector<G4TwoVector> polygon(nsect);
G4double ang = twopi / nsect;
G4double dR = 7.5 * mm.;
for (G4int i = 0; i < nsect; ++i)
{
G4double phi = i * ang;
G4double cosphi = std::cos(phi);
G4double sinphi = std::sin(phi);
polygon[i].set(dR * cosphi, dR * sinphi);
}
G4TwoVector offsetA(0., 0.), offsetB(0., 0.);
G4double scaleA = 1., scaleB = 1.;
G4VSolid* solidScint1 = new G4ExtrudedSolid("Extruded", polygon, fScint1Thickness / 2, offsetA, scaleA, offsetB, scaleB);
Additionally, when I run “/geometry/test/run” command, it reports that there are overlapped volumes between my elements, and I see it on the distorted pictures. For 6-angle prism, all works fine!!
What can be wrong??? float->int rounding in some places???
Sincerely Yours,
Vyacheslav Porosev