Bug in creation of begin and end planar surfaces of G4BREPSolidPCone This happens in the cases where RMIN == 0.0 and RMAX > 0.0. For example profile of such a solid could be: +--+ | | | +--+ | | | +--+ | | +--+ parameters showing that faulty behaviour are: G4double zVals[4] = { 14300, 26000, 26000, 27000 }; G4double rMins[4] = { 0, 0, 0, 0 }; G4double rMaxs[4] = { 3000, 3000, 1000, 1000 }; G4BREPSolidPCone *solid = new G4BREPSolidPCone( "BREPPcone", 0.0*rad, twopi*rad, 4, zVals[0], zVals, rMins, rMaxs );
Fix is on G4 CVS HEAD, rev. 1.27 Here follows the CVS diff of the fix: Index: G4BREPSolidPCone.cc =================================================================== RCS file: /afs/cern.ch/sw/geant4/cvs/geant4/source/geometry/solids/BREPS/src/G4BREPS olidPCone.cc,v retrieving revision 1.26 retrieving revision 1.27 diff -r1.26 -r1.27 23c23 < // $Id: G4BREPSolidPCone.cc,v 1.26 2002/03/11 19:09:37 radoone Exp $ --- > // $Id: G4BREPSolidPCone.cc,v 1.27 2002/10/16 14:40:19 radoone Exp $ 364,368c364,370 < tmp = new G4CircularCurve; < tmp->Init(G4Axis2Placement3D(PlaneDir, PlaneAxis, Origin), RMIN[0]); < tmp->SetBounds(ArcStart1a, ArcStart1a); < tmp->SetSameSense(0); < cv.push_back(tmp); --- > if( RMIN[0] > 0.0 ) { > tmp = new G4CircularCurve; > tmp->Init(G4Axis2Placement3D(PlaneDir, PlaneAxis, Origin), RMIN[0]); > tmp->SetBounds(ArcStart1a, ArcStart1a); > tmp->SetSameSense(0); > cv.push_back(tmp); > } 392,397c394,400 < tmp = new G4CircularCurve; < tmp->Init(G4Axis2Placement3D(PlaneDir, PlaneAxis, LocalOrigin), < RMIN[sections]); < tmp->SetBounds(ArcStart2a, ArcStart2a); < tmp->SetSameSense(0); < cv.push_back(tmp); --- > if( RMIN[sections] > 0.0 ) { > tmp = new G4CircularCurve; > tmp->Init(G4Axis2Placement3D(PlaneDir, PlaneAxis, LocalOrigin), RMIN [sections]); > tmp->SetBounds(ArcStart2a, ArcStart2a); > tmp->SetSameSense(0); > cv.push_back(tmp); > }