| Summary: | Possible bug in geometry/solids/specific/src/G4ExtrudedSolid.cc | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Guilherme Lima <lima> |
| Component: | geometry/solids | Assignee: | Ivana Hrivnacova <ivana> |
| Status: | RESOLVED FIXED | ||
| Severity: | trivial | CC: | zmarshal |
| Priority: | P5 | ||
| Version: | 9.1 | ||
| Hardware: | All | ||
| OS: | All | ||
A typo: obviously the patch should write fNz-1 rather than fHz. Sorry for the confusion. Guilherme Thanks for the report. Problem now assigned to the author of G4ExtrudedSolid. The proposed fix is correct; the bug was introduced when we moved from a solid with 2 z-sides only to a general case. Now corrected in CVS. |
A piece of code looks pretty suspicious around line 543 of geometry/solid/specific/src/G4ExtrudedSolid.cc: ---------- good = AddFacet( new G4QuadrangularFacet( GetVertex(fNz-1, 3), GetVertex(fNz-1, 2), GetVertex(fNz-1, 1), GetVertex(1, 0), ABSOLUTE) ); ----------- I think that to be consistent, the first argument to GetVertex() should be always fNz-1, otherwise the vertices returned may belong to distinct, inconsistent polygons. Therefore, my proposed patch is here: ---------- good = AddFacet( new G4QuadrangularFacet( GetVertex(fNz-1, 3), GetVertex(fNz-1, 2), GetVertex(fNz-1, 1), GetVertex(fHz-1, 0), ABSOLUTE) ); ----------- Thanks, Guilherme