Import Geant4 11.2.0 source tree
This commit is contained in:
@@ -116,9 +116,12 @@ G4BooleanSolid::~G4BooleanSolid()
|
||||
|
||||
G4BooleanSolid::G4BooleanSolid(const G4BooleanSolid& rhs)
|
||||
: G4VSolid (rhs), fPtrSolidA(rhs.fPtrSolidA), fPtrSolidB(rhs.fPtrSolidB),
|
||||
fCubicVolume(rhs.fCubicVolume), fStatistics(rhs.fStatistics),
|
||||
fCubVolEpsilon(rhs.fCubVolEpsilon), fAreaAccuracy(rhs.fAreaAccuracy),
|
||||
fSurfaceArea(rhs.fSurfaceArea), createdDisplacedSolid(rhs.createdDisplacedSolid)
|
||||
fCubicVolume(rhs.fCubicVolume), fSurfaceArea(rhs.fSurfaceArea),
|
||||
fCubVolStatistics(rhs.fCubVolStatistics),
|
||||
fAreaStatistics(rhs.fAreaStatistics),
|
||||
fCubVolEpsilon(rhs.fCubVolEpsilon),
|
||||
fAreaAccuracy(rhs.fAreaAccuracy),
|
||||
createdDisplacedSolid(rhs.createdDisplacedSolid)
|
||||
{
|
||||
fPrimitives.resize(0); fPrimitivesSurfaceArea = 0.;
|
||||
}
|
||||
@@ -140,10 +143,11 @@ G4BooleanSolid& G4BooleanSolid::operator = (const G4BooleanSolid& rhs)
|
||||
// Copy data
|
||||
//
|
||||
fPtrSolidA= rhs.fPtrSolidA; fPtrSolidB= rhs.fPtrSolidB;
|
||||
fStatistics= rhs.fStatistics; fCubVolEpsilon= rhs.fCubVolEpsilon;
|
||||
fAreaAccuracy= rhs.fAreaAccuracy; fCubicVolume= rhs.fCubicVolume;
|
||||
fSurfaceArea= rhs.fSurfaceArea;
|
||||
fCubicVolume= rhs.fCubicVolume; fSurfaceArea= rhs.fSurfaceArea;
|
||||
fCubVolStatistics = rhs.fCubVolStatistics; fCubVolEpsilon = rhs.fCubVolEpsilon;
|
||||
fAreaStatistics = rhs.fAreaStatistics; fAreaAccuracy = rhs.fAreaAccuracy;
|
||||
createdDisplacedSolid= rhs.createdDisplacedSolid;
|
||||
|
||||
fRebuildPolyhedron = false;
|
||||
delete fpPolyhedron; fpPolyhedron = nullptr;
|
||||
fPrimitives.resize(0); fPrimitivesSurfaceArea = 0.;
|
||||
@@ -414,13 +418,13 @@ G4BooleanSolid::StackPolyhedron(HepPolyhedronProcessor& processor,
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Estimate Cubic Volume (capacity) and store it for reuse.
|
||||
// Estimate Cubic Volume (capacity) and cache it for reuse.
|
||||
|
||||
G4double G4BooleanSolid::GetCubicVolume()
|
||||
{
|
||||
if(fCubicVolume < 0.)
|
||||
{
|
||||
fCubicVolume = EstimateCubicVolume(fStatistics,fCubVolEpsilon);
|
||||
fCubicVolume = EstimateCubicVolume(fCubVolStatistics, fCubVolEpsilon);
|
||||
}
|
||||
return fCubicVolume;
|
||||
}
|
||||
|
||||
@@ -1005,8 +1005,7 @@ G4Polyhedron* G4MultiUnion::CreatePolyhedron() const
|
||||
else
|
||||
{
|
||||
G4VSolid* solidA = GetSolid(0);
|
||||
auto solidAPolyhedron =
|
||||
dynamic_cast<G4PolyhedronArbitrary*>(solidA->GetPolyhedron());
|
||||
auto solidAPolyhedron =solidA->GetPolyhedron();
|
||||
|
||||
const G4Transform3D transform0 = GetTransformation(0);
|
||||
G4DisplacedSolid dispSolidA("placedA", solidA, transform0);
|
||||
|
||||
@@ -607,8 +607,9 @@ G4double G4SubtractionSolid::GetCubicVolume()
|
||||
bminB.x() < bmaxA.x() && bminB.y() < bmaxA.y() && bminB.z() < bmaxA.z();
|
||||
if ( canIntersect )
|
||||
{
|
||||
G4IntersectionSolid intersectVol( "Temporary-Intersection-for-Union",
|
||||
G4IntersectionSolid intersectVol( "Temporary-Intersection-for-Subtraction",
|
||||
fPtrSolidA, fPtrSolidB );
|
||||
intersectVol.SetCubVolStatistics(100000);
|
||||
intersection = intersectVol.GetCubicVolume();
|
||||
}
|
||||
|
||||
|
||||
@@ -574,6 +574,7 @@ G4double G4UnionSolid::GetCubicVolume()
|
||||
{
|
||||
G4IntersectionSolid intersectVol( "Temporary-Intersection-for-Union",
|
||||
fPtrSolidA, fPtrSolidB );
|
||||
intersectVol.SetCubVolStatistics(100000);
|
||||
intersection = intersectVol.GetCubicVolume();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user