46#if !defined(G4GEOM_USE_UEXTRUDEDSOLID)
67 const std::vector<G4TwoVector>& polygon,
68 const std::vector<ZSection>& zsections)
71 fNz(zsections.size()),
72 fGeometryType(
"G4ExtrudedSolid")
80 std::ostringstream message;
81 message <<
"Number of vertices in polygon < 3 - " << pName;
82 G4Exception(
"G4ExtrudedSolid::G4ExtrudedSolid()",
"GeomSolids0002",
88 std::ostringstream message;
89 message <<
"Number of z-sides < 2 - " << pName;
90 G4Exception(
"G4ExtrudedSolid::G4ExtrudedSolid()",
"GeomSolids0002",
94 for ( std::size_t i=0; i<fNz-1; ++i )
96 if ( zsections[i].fZ > zsections[i+1].fZ )
98 std::ostringstream message;
99 message <<
"Z-sections have to be ordered by z value (z0 < z1 < z2...) - "
101 G4Exception(
"G4ExtrudedSolid::G4ExtrudedSolid()",
"GeomSolids0002",
106 std::ostringstream message;
107 message <<
"Z-sections with the same z position are not supported - "
109 G4Exception(
"G4ExtrudedSolid::G4ExtrudedSolid()",
"GeomSolids0001",
120 std::vector<G4int> removedVertices;
123 if (!removedVertices.empty())
125 std::size_t nremoved = removedVertices.size();
126 std::ostringstream message;
127 message <<
"The following "<< nremoved
128 <<
" vertices have been removed from polygon in " << pName
129 <<
"\nas collinear or coincident with other vertices: "
130 << removedVertices[0];
131 for (std::size_t i=1; i<nremoved; ++i)
133 message <<
", " << removedVertices[i];
135 G4Exception(
"G4ExtrudedSolid::G4ExtrudedSolid()",
"GeomSolids1001",
139 fNv = fPolygon.size();
142 std::ostringstream message;
143 message <<
"Number of vertices in polygon after removal < 3 - " << pName;
144 G4Exception(
"G4ExtrudedSolid::G4ExtrudedSolid()",
"GeomSolids0002",
157 std::reverse(fPolygon.begin(),fPolygon.end());
162 fZSections = zsections;
164 G4bool result = MakeFacets();
167 std::ostringstream message;
168 message <<
"Making facets failed - " << pName;
169 G4Exception(
"G4ExtrudedSolid::G4ExtrudedSolid()",
"GeomSolids0003",
174 ComputeProjectionParameters();
179 && (fZSections[0].fScale == 1) && (fZSections[1].fScale == 1)
183 fSolidType = (fIsConvex) ? 1 : 2;
184 ComputeLateralPlanes();
191 const std::vector<G4TwoVector>& polygon,
198 fGeometryType(
"G4ExtrudedSolid")
206 std::ostringstream message;
207 message <<
"Number of vertices in polygon < 3 - " << pName;
208 G4Exception(
"G4ExtrudedSolid::G4ExtrudedSolid()",
"GeomSolids0002",
218 std::vector<G4int> removedVertices;
221 if (!removedVertices.empty())
223 std::size_t nremoved = removedVertices.size();
224 std::ostringstream message;
225 message <<
"The following "<< nremoved
226 <<
" vertices have been removed from polygon in " << pName
227 <<
"\nas collinear or coincident with other vertices: "
228 << removedVertices[0];
229 for (std::size_t i=1; i<nremoved; ++i)
231 message <<
", " << removedVertices[i];
233 G4Exception(
"G4ExtrudedSolid::G4ExtrudedSolid()",
"GeomSolids1001",
237 fNv = fPolygon.size();
240 std::ostringstream message;
241 message <<
"Number of vertices in polygon after removal < 3 - " << pName;
242 G4Exception(
"G4ExtrudedSolid::G4ExtrudedSolid()",
"GeomSolids0002",
255 std::reverse(fPolygon.begin(),fPolygon.end());
260 fZSections.emplace_back(-dz, off1, scale1);
261 fZSections.emplace_back( dz, off2, scale2);
263 G4bool result = MakeFacets();
266 std::ostringstream message;
267 message <<
"Making facets failed - " << pName;
268 G4Exception(
"G4ExtrudedSolid::G4ExtrudedSolid()",
"GeomSolids0003",
273 ComputeProjectionParameters();
277 if ((scale1 == 1) && (scale2 == 1)
280 fSolidType = (fIsConvex) ? 1 : 2;
281 ComputeLateralPlanes();
300 if (
this == &rhs) {
return *
this; }
308 fNv = rhs.fNv; fNz = rhs.fNz;
309 fPolygon = rhs.fPolygon; fZSections = rhs.fZSections;
310 fTriangles = rhs.fTriangles; fIsConvex = rhs.fIsConvex;
311 fGeometryType = rhs.fGeometryType;
312 fSolidType = rhs.fSolidType; fPlanes = rhs.fPlanes;
313 fLines = rhs.fLines; fLengths = rhs.fLengths;
314 fKScales = rhs.fKScales; fScale0s = rhs.fScale0s;
315 fKOffsets = rhs.fKOffsets; fOffset0s = rhs.fOffset0s;
322void G4ExtrudedSolid::ComputeProjectionParameters()
332 for (std::size_t iz=0; iz<fNz-1; ++iz)
336 G4double scale1 = fZSections[iz].fScale;
337 G4double scale2 = fZSections[iz+1].fScale;
341 G4double kscale = (scale2 - scale1)/(z2 - z1);
342 G4double scale0 = scale2 - kscale*(z2 - z1)/2.0;
346 fKScales.push_back(kscale);
347 fScale0s.push_back(scale0);
348 fKOffsets.push_back(koff);
349 fOffset0s.push_back(off0);
355void G4ExtrudedSolid::ComputeLateralPlanes()
359 std::size_t Nv = fPolygon.size();
361 for (std::size_t i=0, k=Nv-1; i<Nv; k=i++)
363 G4TwoVector norm = (fPolygon[i] - fPolygon[k]).unit();
364 fPlanes[i].a = -norm.
y();
365 fPlanes[i].b = norm.
x();
367 fPlanes[i].d = norm.
y()*fPolygon[i].x() - norm.
x()*fPolygon[i].y();
375 for (std::size_t i=0, k=Nv-1; i<Nv; k=i++)
377 if (fPolygon[k].y() == fPolygon[i].y())
380 fLines[i].m = fPolygon[i].x();
384 G4double ctg = (fPolygon[k].x()-fPolygon[i].x())/(fPolygon[k].y()-fPolygon[i].y());
386 fLines[i].m = fPolygon[i].x() - ctg*fPolygon[i].y();
388 fLengths[i] = (fPolygon[i] - fPolygon[k]).mag();
398 return { fPolygon[ind].x() * fZSections[iz].fScale
399 + fZSections[iz].fOffset.x(),
400 fPolygon[ind].y() * fZSections[iz].fScale
401 + fZSections[iz].fOffset.y(),
418 while ( point.
z() > fZSections[iz+1].fZ && iz < fNz-2 )
423 G4double z0 = ( fZSections[iz+1].fZ + fZSections[iz].fZ )/2.0;
425 G4double pscale = fKScales[iz]*(point.
z()-z0) + fScale0s[iz];
426 G4TwoVector poffset = fKOffsets[iz]*(point.
z()-z0) + fOffset0s[iz];
431 return (p2 - poffset)/pscale;
442 if ( l1.
x() == l2.
x() )
454 G4bool squareComp = (dy*dy < (1+slope*slope)
478 return IsSameLine(p, l1, l2);
490 return ( (p1.
x() - l1.
x()) * (l2.
y() - l1.
y())
491 - (l2.
x() - l1.
x()) * (p1.
y() - l1.
y()) )
492 * ( (p2.
x() - l1.
x()) * (l2.
y() - l1.
y())
493 - (l2.
x() - l1.
x()) * (p2.
y() - l1.
y()) ) > 0;
508 if ( ( p.
x() < a.
x() && p.
x() < b.
x() && p.
x() < c.
x() ) ||
509 ( p.
x() > a.
x() && p.
x() > b.
x() && p.
x() > c.
x() ) ||
510 ( p.
y() < a.
y() && p.
y() < b.
y() && p.
y() < c.
y() ) ||
511 ( p.
y() > a.
y() && p.
y() > b.
y() && p.
y() > c.
y() ) ) {
return false; }
514 = IsSameSide(p, a, b, c)
515 && IsSameSide(p, b, a, c)
516 && IsSameSide(p, c, a, b);
519 = IsSameLineSegment(p, a, b)
520 || IsSameLineSegment(p, b, c)
521 || IsSameLineSegment(p, c, a);
523 return inside || onEdge;
538 G4double result = (std::atan2(t1.
y(), t1.
x()) - std::atan2(t2.
y(), t2.
x()));
540 if ( result < 0 ) { result += 2*
pi; }
548G4ExtrudedSolid::MakeDownFacet(
G4int ind1,
G4int ind2,
G4int ind3)
const
553 std::vector<G4ThreeVector> vertices;
561 = (vertices[1]-vertices[0]).cross(vertices[2]-vertices[1]);
563 if ( cross.
z() > 0.0 )
568 vertices[1] = vertices[2];
572 return new G4TriangularFacet(vertices[0], vertices[1],
584 std::vector<G4ThreeVector> vertices;
592 = (vertices[1]-vertices[0]).cross(vertices[2]-vertices[1]);
594 if ( cross.
z() < 0.0 )
599 vertices[1] = vertices[2];
603 return new G4TriangularFacet(vertices[0], vertices[1],
609G4bool G4ExtrudedSolid::AddGeneralPolygonFacets()
613 using Vertex = std::pair < G4TwoVector, G4int >;
615 static const G4double kAngTolerance =
620 std::vector< Vertex > verticesToBeDone;
623 verticesToBeDone.emplace_back(fPolygon[i], i);
625 std::vector< Vertex > ears;
627 auto c1 = verticesToBeDone.begin();
630 while ( verticesToBeDone.size()>2 )
634 G4double angle = GetAngle(c2->first, c3->first, c1->first);
636 std::size_t counter = 0;
637 while ( angle >= (pi-kAngTolerance) )
644 if ( c3 == verticesToBeDone.end() ) { c3 = verticesToBeDone.begin(); }
646 angle = GetAngle(c2->first, c3->first, c1->first);
652 G4Exception(
"G4ExtrudedSolid::AddGeneralPolygonFacets",
654 "Triangularisation has failed.");
660 for (
auto it=verticesToBeDone.cbegin(); it!=verticesToBeDone.cend(); ++it )
664 if ( it == c1 || it == c2 || it == c3 ) {
continue; }
666 if ( IsPointInside(c1->first, c2->first, c3->first, it->first) )
676 if ( c3 == verticesToBeDone.end() ) { c3 = verticesToBeDone.begin(); }
685 result =
AddFacet( MakeDownFacet(c1->second, c2->second, c3->second) );
686 if ( ! result ) {
return false; }
688 result =
AddFacet( MakeUpFacet(c1->second, c2->second, c3->second) );
689 if ( ! result ) {
return false; }
691 std::vector<G4int> triangle(3);
692 triangle[0] = c1->second;
693 triangle[1] = c2->second;
694 triangle[2] = c3->second;
695 fTriangles.push_back(std::move(triangle));
699 verticesToBeDone.erase(c2);
700 c1 = verticesToBeDone.begin();
710G4bool G4ExtrudedSolid::MakeFacets()
722 if ( ! good ) {
return false; }
728 if ( ! good ) {
return false; }
730 std::vector<G4int> triangle(3);
734 fTriangles.push_back(std::move(triangle));
742 if ( ! good ) {
return false; }
749 if ( ! good ) {
return false; }
751 std::vector<G4int> triangle1(3);
755 fTriangles.push_back(std::move(triangle1));
757 std::vector<G4int> triangle2(3);
761 fTriangles.push_back(std::move(triangle2));
765 good = AddGeneralPolygonFacets();
766 if ( ! good ) {
return false; }
775 G4int j = (i+1) % fNv;
776 good =
AddFacet(
new G4QuadrangularFacet
779 if ( ! good ) {
return false; }
794 return fGeometryType;
819 G4double dist = std::max(fZSections[0].fZ-p.
z(),p.
z()-fZSections[1].fZ);
822 std::size_t np = fPlanes.size();
823 for (std::size_t i=0; i<np; ++i)
825 G4double dd = fPlanes[i].a*p.
x() + fPlanes[i].b*p.
y() + fPlanes[i].d;
826 if (dd > dist) { dist = dd; }
833 G4double distz = std::max(fZSections[0].fZ-p.
z(),p.
z()-fZSections[1].fZ);
836 G4bool in = PointInPolygon(p);
873 G4int j = (i+1) % fNv;
874 if ( IsSameLineSegment(pscaled, fPolygon[i], fPolygon[j]) )
885 auto it = fTriangles.cbegin();
889 if ( IsPointInside(fPolygon[(*it)[0]], fPolygon[(*it)[1]],
890 fPolygon[(*it)[2]], pscaled) ) { inside =
true; }
892 }
while ( (!inside) && (it != fTriangles.cend()) );
935 for (std::size_t i=0; i<fNv; ++i)
937 G4double dd = fPlanes[i].a*p.
x() + fPlanes[i].b*p.
y() + fPlanes[i].d;
957 for (std::size_t i=0, k=fNv-1; i<fNv; k=i++)
961 G4double u = fPlanes[i].a*iy - fPlanes[i].b*ix;
964 if (ix*ix + iy*iy > sqrCarToleranceHalf) {
continue; }
966 else if (u > fLengths[i])
970 if (kx*kx + ky*ky > sqrCarToleranceHalf) {
continue; }
974 G4double dd = fPlanes[i].a*p.
x() + fPlanes[i].b*p.
y() + fPlanes[i].d;
975 if (dd*dd > sqrCarToleranceHalf) {
continue; }
1003 std::ostringstream message;
1004 G4long oldprc = message.precision(16);
1005 message <<
"Point p is not on surface (!?) of solid: "
1007 message <<
"Position:\n";
1008 message <<
" p.x() = " << p.
x()/mm <<
" mm\n";
1009 message <<
" p.y() = " << p.
y()/mm <<
" mm\n";
1010 message <<
" p.z() = " << p.
z()/mm <<
" mm";
1011 G4cout.precision(oldprc) ;
1012 G4Exception(
"G4TesselatedSolid::SurfaceNormal(p)",
"GeomSolids1002",
1016 return ApproxSurfaceNormal(p);
1026 if (fSolidType == 1 || fSolidType == 2)
1030 G4double dz0 = fZSections[0].fZ - p.
z();
1031 G4double dz1 = p.
z() - fZSections[1].fZ;
1037 std::size_t iside = 0;
1039 for (std::size_t i=0, k=fNv-1; i<fNv; k=i++)
1043 G4double u = fPlanes[i].a*iy - fPlanes[i].b*ix;
1047 if (tmp < dd) { dd = tmp; iside = i; }
1049 else if (u > fLengths[i])
1054 if (tmp < dd) { dd = tmp; iside = i; }
1058 G4double tmp = fPlanes[i].a*p.
x() + fPlanes[i].b*p.
y() + fPlanes[i].d;
1060 if (tmp < dd) { dd = tmp; iside = i; }
1073 if (std::max(dz0,dz1) > 0) { iregion = 1; }
1075 G4bool in = PointInPolygon(p);
1076 if (!in) { iregion += 2; }
1084 if (ddz0 <= ddz1 && ddz0 <= dd) {
return {0, 0,-1}; }
1085 if (ddz1 <= ddz0 && ddz1 <= dd) {
return {0, 0, 1}; }
1086 return { fPlanes[iside].a, fPlanes[iside].b, 0 };
1090 return { 0, 0, (
G4double)((dz0 > dz1) ? -1 : 1) };
1094 return { fPlanes[iside].a, fPlanes[iside].b, 0 };
1098 G4double dzmax = std::max(dz0,dz1);
1099 if (dzmax*dzmax > dd)
1101 return { 0, 0, (
G4double)((dz0 > dz1) ? -1 : 1) };
1103 return { fPlanes[iside].a, fPlanes[iside].b, 0 };
1116 G4double z1 = fZSections[fNz-1].fZ;
1130 G4double ddz = (invz < 0) ? dz : -dz;
1136 std::size_t np = fPlanes.size();
1137 G4double txmin = tzmin, txmax = tzmax;
1138 for (std::size_t i=0; i<np; ++i)
1140 G4double cosa = fPlanes[i].a*v.
x()+fPlanes[i].b*v.
y();
1141 G4double dist = fPlanes[i].a*p.
x()+fPlanes[i].b*p.
y()+fPlanes[i].d;
1144 if (cosa >= 0) {
return kInfinity; }
1146 if (txmin < tmp) { txmin = tmp; }
1151 if (txmax > tmp) { txmax = tmp; }
1157 G4double tmin = txmin, tmax = txmax;
1179 G4double dist = std::max(fZSections[0].fZ-p.
z(),p.
z()-fZSections[1].fZ);
1180 std::size_t np = fPlanes.size();
1181 for (std::size_t i=0; i<np; ++i)
1183 G4double dd = fPlanes[i].a*p.
x() + fPlanes[i].b*p.
y() + fPlanes[i].d;
1184 if (dd > dist) { dist = dd; }
1186 return (dist > 0) ? dist : 0.;
1190 G4bool in = PointInPolygon(p);
1193 G4double distz= std::max(fZSections[0].fZ-p.
z(),p.
z()-fZSections[1].fZ);
1194 return (distz > 0) ? distz : 0;
1197 G4double distz= std::max(fZSections[0].fZ-p.
z(),p.
z()-fZSections[1].fZ);
1198 G4double dd = DistanceToPolygonSqr(p);
1199 if (distz > 0) { dd += distz*distz; }
1200 return std::sqrt(dd);
1216 G4bool getnorm = calcNorm;
1217 if (getnorm) { *validNorm =
true; }
1220 G4double z1 = fZSections[fNz-1].fZ;
1223 if (getnorm) { n->set(0,0,-1); }
1228 if (getnorm) { n->set(0,0,1); }
1243 G4int iside = (vz < 0) ? -4 : -2;
1247 std::size_t np = fPlanes.size();
1248 for (std::size_t i=0; i<np; ++i)
1250 G4double cosa = fPlanes[i].a*v.
x()+fPlanes[i].b*v.
y();
1253 G4double dist = fPlanes[i].a*p.
x()+fPlanes[i].b*p.
y()+fPlanes[i].d;
1256 if (getnorm) { n->set(fPlanes[i].a, fPlanes[i].b, fPlanes[i].c); }
1260 if (tmax > tmp) { tmax = tmp; iside = (
G4int)i; }
1269 { n->set(0, 0, iside + 3); }
1271 { n->set(fPlanes[iside].a, fPlanes[iside].b, fPlanes[iside].c); }
1285 if (validNorm !=
nullptr) { *validNorm = fIsConvex; }
1298 G4double dist = std::max(fZSections[0].fZ-p.
z(),p.
z()-fZSections[1].fZ);
1299 std::size_t np = fPlanes.size();
1300 for (std::size_t i=0; i<np; ++i)
1302 G4double dd = fPlanes[i].a*p.
x() + fPlanes[i].b*p.
y() + fPlanes[i].d;
1303 if (dd > dist) { dist = dd; }
1305 return (dist < 0) ? -dist : 0.;
1309 G4double distz = std::max(fZSections[0].fZ-p.
z(),p.
z()-fZSections[1].fZ);
1310 G4bool in = PointInPolygon(p);
1311 if (distz >= 0 || (!in)) {
return 0; }
1312 return std::min(-distz,std::sqrt(DistanceToPolygonSqr(p)));
1326 G4double xmin0 = kInfinity, xmax0 = -kInfinity;
1327 G4double ymin0 = kInfinity, ymax0 = -kInfinity;
1332 if (x < xmin0) { xmin0 = x; }
1333 if (x > xmax0) { xmax0 = x; }
1335 if (y < ymin0) { ymin0 = y; }
1336 if (y > ymax0) { ymax0 = y; }
1339 G4double xmin = kInfinity, xmax = -kInfinity;
1340 G4double ymin = kInfinity, ymax = -kInfinity;
1343 for (
G4int i=0; i<nsect; ++i)
1349 xmin = std::min(xmin,xmin0*scale+dx);
1350 xmax = std::max(xmax,xmax0*scale+dx);
1351 ymin = std::min(ymin,ymin0*scale+dy);
1352 ymax = std::max(ymax,ymax0*scale+dy);
1358 pMin.
set(xmin,ymin,zmin);
1359 pMax.
set(xmax,ymax,zmax);
1363 if (pMin.
x() >= pMax.
x() || pMin.
y() >= pMax.
y() || pMin.
z() >= pMax.
z())
1365 std::ostringstream message;
1366 message <<
"Bad bounding box (min >= max) for solid: "
1368 <<
"\npMin = " << pMin
1369 <<
"\npMax = " << pMax;
1397 return exist = pMin < pMax;
1411 std::ostringstream message;
1412 message <<
"Triangulation of the base polygon has failed for solid: "
1414 <<
"\nExtent has been calculated using boundary box";
1422 std::vector<const G4ThreeVectorList *> polygons;
1423 polygons.resize(nsect);
1424 for (
G4int k=0; k<nsect; ++k)
1433 for (
G4int i=0; i<ntria; ++i)
1436 for (
G4int k=0; k<nsect; ++k)
1445 auto iter = ptr->begin();
1446 G4double x0 = triangles[i3+0].x()*scale+dx;
1447 G4double y0 = triangles[i3+0].y()*scale+dy;
1450 G4double x1 = triangles[i3+1].x()*scale+dx;
1451 G4double y1 = triangles[i3+1].y()*scale+dy;
1454 G4double x2 = triangles[i3+2].x()*scale+dx;
1455 G4double y2 = triangles[i3+2].y()*scale+dy;
1466 if (emin < pMin) { pMin = emin; }
1467 if (emax > pMax) { pMax = emax; }
1468 if (eminlim > pMin && emaxlim < pMax) {
break; }
1471 for (
G4int k=0; k<nsect; ++k)
1474 polygons[k]=
nullptr;
1476 return (pMin < pMax);
1483 G4long oldprc = os.precision(16);
1484 os <<
"-----------------------------------------------------------\n"
1485 <<
" *** Dump for solid - " <<
GetName() <<
" ***\n"
1486 <<
" ===================================================\n"
1487 <<
" Solid geometry type: " << fGeometryType <<
G4endl;
1490 { os <<
" Convex polygon; list of vertices:" <<
G4endl; }
1492 { os <<
" Concave polygon; list of vertices:" <<
G4endl; }
1494 for ( std::size_t i=0; i<fNv; ++i )
1496 os << std::setw(5) <<
"#" << i
1497 <<
" vx = " << fPolygon[i].x()/mm <<
" mm"
1498 <<
" vy = " << fPolygon[i].y()/mm <<
" mm" <<
G4endl;
1501 os <<
" Sections:" <<
G4endl;
1502 for ( std::size_t iz=0; iz<fNz; ++iz )
1504 os <<
" z = " << fZSections[iz].fZ/mm <<
" mm "
1505 <<
" x0= " << fZSections[iz].fOffset.x()/mm <<
" mm "
1506 <<
" y0= " << fZSections[iz].fOffset.y()/mm <<
" mm "
1507 <<
" scale= " << fZSections[iz].fScale <<
G4endl;
1526 os.precision(oldprc);
std::vector< G4ThreeVector > G4ThreeVectorList
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
CLHEP::Hep3Vector G4ThreeVector
CLHEP::Hep2Vector G4TwoVector
G4GLOB_DLL std::ostream G4cout
void set(double x, double y, double z)
G4BoundingEnvelope is a helper class to facilitate calculation of the extent of a solid within the li...
G4bool BoundingBoxVsVoxelLimits(const EAxis pAxis, const G4VoxelLimits &pVoxelLimits, const G4Transform3D &pTransform3D, G4double &pMin, G4double &pMax) const
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimits, const G4Transform3D &pTransform3D, G4double &pMin, G4double &pMax) const
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const override
G4GeometryType GetEntityType() const override
G4ExtrudedSolid & operator=(const G4ExtrudedSolid &rhs)
void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const override
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const override
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const override
EInside Inside(const G4ThreeVector &p) const override
ZSection GetZSection(G4int index) const
G4int GetNofZSections() const
G4int GetNofVertices() const
G4VSolid * Clone() const override
G4TwoVector GetVertex(G4int index) const
G4ExtrudedSolid(const G4String &pName, const std::vector< G4TwoVector > &polygon, const std::vector< ZSection > &zsections)
std::ostream & StreamInfo(std::ostream &os) const override
G4bool IsFaceted() const override
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=nullptr, G4ThreeVector *n=nullptr) const override
static G4GeometryTolerance * GetInstance()
G4double GetAngularTolerance() const
G4double GetMinYExtent() const
G4double GetMinZExtent() const
G4TessellatedSolid & operator=(const G4TessellatedSolid &right)
G4double kCarToleranceHalf
G4bool AddFacet(G4VFacet *aFacet)
G4double DistanceToOut(const G4ThreeVector &p) const override
G4double GetMaxYExtent() const
G4double GetMaxZExtent() const
G4double GetMaxXExtent() const
G4double GetMinXExtent() const
void SetSolidClosed(const G4bool t)
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const override
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const override
G4VFacet is a base class defining the facets which are components of a G4TessellatedSolid shape.
G4VSolid(const G4String &name)
G4VoxelLimits represents limitation/restrictions of space, where restrictions are only made perpendic...
G4double GetMinExtent(const EAxis pAxis) const
G4double GetMaxExtent(const EAxis pAxis) const