102 if (
this == &rhs) {
return *
this; }
130 message <<
"Illegal call to G4VSolid::ComputeDimensions()" <<
G4endl
131 <<
"Method not overloaded by derived class !";
132 G4Exception(
"G4VSolid::ComputeDimensions()",
"GeomMgt0003",
143 message <<
"Not implemented for solid: "
145 <<
"Returning origin.";
146 G4Exception(
"G4VSolid::GetPointOnSurface()",
"GeomMgt1001",
178 G4int cubVolStatistics = 1000000;
194 G4double px,py,pz,minX,maxX,
minY,
maxY,minZ,
maxZ,
volume,halfepsilon;
211 if(nStat < 100) nStat = 100;
212 if(epsilon > 0.01) epsilon = 0.01;
215 for(
auto i = 0; i < nStat; ++i )
224 volume = (maxX-minX+
epsilon)*(maxY-minY+epsilon)
225 * (maxZ-minZ+
epsilon)*iInside/nStat;
240 G4int stat = 1000000;
255 static const G4double s2 = 1./std::sqrt(2.);
256 static const G4double s3 = 1./std::sqrt(3.);
309 G4int npoints = (nstat < 1000) ? 1000 : nstat;
326 for(
auto i = 0; i < npoints; ++i)
344 if (icase == 0)
continue;
360 if (icase == 0)
continue;
367 if (dist < eps) ++icount;
369 return dX*dY*dZ*icount/npoints/dd;
382 message <<
"Clone() method not implemented for type: "
384 <<
"Returning NULL pointer!";
403 const G4int pSectionIndex,
411 polygon.push_back((*pVertices)[pSectionIndex]);
412 polygon.push_back((*pVertices)[pSectionIndex+1]);
413 polygon.push_back((*pVertices)[pSectionIndex+2]);
414 polygon.push_back((*pVertices)[pSectionIndex+3]);
433 const G4int pSectionIndex,
440 polygon.push_back((*pVertices)[pSectionIndex]);
441 polygon.push_back((*pVertices)[pSectionIndex+4]);
442 polygon.push_back((*pVertices)[pSectionIndex+5]);
443 polygon.push_back((*pVertices)[pSectionIndex+1]);
447 polygon.push_back((*pVertices)[pSectionIndex+1]);
448 polygon.push_back((*pVertices)[pSectionIndex+5]);
449 polygon.push_back((*pVertices)[pSectionIndex+6]);
450 polygon.push_back((*pVertices)[pSectionIndex+2]);
454 polygon.push_back((*pVertices)[pSectionIndex+2]);
455 polygon.push_back((*pVertices)[pSectionIndex+6]);
456 polygon.push_back((*pVertices)[pSectionIndex+7]);
457 polygon.push_back((*pVertices)[pSectionIndex+3]);
461 polygon.push_back((*pVertices)[pSectionIndex+3]);
462 polygon.push_back((*pVertices)[pSectionIndex+7]);
463 polygon.push_back((*pVertices)[pSectionIndex+4]);
464 polygon.push_back((*pVertices)[pSectionIndex]);
487 noLeft = pPolygon.size();
491 for (i=0; i<noLeft; ++i)
493 component = pPolygon[i].operator()(pAxis);
495 if (component < pMin)
499 if (component > pMax)
543 if ( !outputPolygon.size() )
return;
549 if ( !pPolygon.size() )
return;
550 else outputPolygon.clear();
563 if ( !outputPolygon.size() )
return;
569 if ( !pPolygon.size() )
return;
570 else outputPolygon.clear();
583 if ( !outputPolygon.size() )
return;
605 G4int noVertices=pPolygon.size();
608 for (i = 0 ; i < noVertices ; ++i )
610 vStart = pPolygon[i];
611 if ( i == noVertices-1 ) vEnd = pPolygon[0];
612 else vEnd = pPolygon[i+1];
614 if ( pVoxelLimit.
Inside(vStart) )
616 if (pVoxelLimit.
Inside(vEnd))
620 outputPolygon.push_back(vEnd);
627 outputPolygon.push_back(vEnd);
632 if (pVoxelLimit.
Inside(vEnd))
637 outputPolygon.push_back(vStart);
638 outputPolygon.push_back(vEnd);
656 message <<
"Not implemented for solid: "
658 <<
"\nReturning infinite boundinx box.";
659 G4Exception(
"G4VSolid::BoundingLimits()",
"GeomMgt1001",