Problem 419 - Bug in creation of planar surfaces of G4BREPSolidPCone
Summary: Bug in creation of planar surfaces of G4BREPSolidPCone
Status: CLOSED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: geometry/solids (show other problems)
Version: 4.1
Hardware: All All
: P2 normal
Assignee: Radovan.Chytracek
URL:
Depends on:
Blocks:
 
Reported: 2002-10-16 09:49 CEST by Radovan.Chytracek
Modified: 2002-10-16 10:00 CEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Radovan.Chytracek 2002-10-16 09:49:58 CEST
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 );
Comment 1 Radovan.Chytracek 2002-10-16 09:57:59 CEST
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);
>     }