6 #include "GeoModelKernel/GeoShapeShift.h"
7 #include "GeoModelKernel/GeoShapeIntersection.h"
8 #include "GeoModelKernel/GeoShapeUnion.h"
9 #include "GeoModelKernel/GeoShapeSubtraction.h"
10 #include "GeoModelKernel/GeoBox.h"
11 #include "GeoModelKernel/GeoCons.h"
12 #include "GeoModelKernel/GeoPcon.h"
13 #include "GeoModelKernel/GeoPgon.h"
14 #include "GeoModelKernel/GeoTrap.h"
15 #include "GeoModelKernel/GeoTrd.h"
16 #include "GeoModelKernel/GeoTube.h"
17 #include "GeoModelKernel/GeoTubs.h"
18 #include "GeoModelKernel/GeoPara.h"
19 #include "GeoModelKernel/GeoSimplePolygonBrep.h"
20 #include "GeoModelKernel/GeoTessellatedSolid.h"
21 #include "GeoModelKernel/GeoFacet.h"
22 #include "GeoModelKernel/GeoGenericTrap.h"
23 #include "GeoModelKernel/GeoDefinitions.h"
44 shift->getOp()->exec(
this);
54 SbVec3d trx(translation.x(),translation.y(),translation.z());
68 unio->getOpA()->exec(&auxA);
69 unio->getOpB()->exec(&auxB);
76 isect->getOpA()->exec(&auxA);
77 isect->getOpB()->exec(&auxB);
84 subtract->getOpA()->exec(&auxA);
85 subtract->getOpB()->exec(&auxB);
92 box->getYHalfLength(),
93 box->getZHalfLength());
110 para->getYHalfLength(),
111 para->getZHalfLength(),
119 double *
z =
new double[pcon->getNPlanes ()];
120 double *rmn =
new double[pcon->getNPlanes ()];
121 double *rmx =
new double[pcon->getNPlanes ()];
123 for (
unsigned s = 0;
s < pcon->getNPlanes ();
s++) {
124 z[
s] = pcon->getZPlane (
s);
125 rmn[
s] = pcon->getRMinPlane (
s);
126 rmx[
s] = pcon->getRMaxPlane (
s);
137 double *
z =
new double[pgon->getNPlanes ()];
138 double *rmn =
new double[pgon->getNPlanes ()];
139 double *rmx =
new double[pgon->getNPlanes ()];
141 for (
unsigned s = 0;
s < pgon->getNPlanes ();
s++) {
142 z[
s] = pgon->getZPlane (
s);
143 rmn[
s] = pgon->getRMinPlane (
s);
144 rmx[
s] = pgon->getRMaxPlane (
s);
160 trap->getDxdypdzn(), 0,
163 trap->getDxdypdzp(),0);
169 trd->getXHalfLength2(),
170 trd->getYHalfLength1(),
171 trd->getYHalfLength2(),
172 trd->getZHalfLength());
184 tubs->getZHalfLength(),
191 double dz = brep->getDZ();
192 std::vector<double>
x,
y;
193 for(
unsigned int i=0;
i<brep->getNVertices();
i++)
195 x.push_back(brep->getXVertex(
i));
196 y.push_back(brep->getYVertex(
i));
205 double vertTolerance = 1
E-15;
206 std::vector<GeoFacetVertex> vertexList;
207 std::map<GeoFacet*,std::vector<size_t> > facetVertIndInSolid;
210 for(
size_t facetIndInSolid = 0; facetIndInSolid<tessellated->getNumberOfFacets(); ++facetIndInSolid) {
211 GeoFacet* facet = tessellated->getFacet(facetIndInSolid);
213 facetVertIndInSolid[facet] = std::vector<size_t>();
214 std::vector<size_t>&
current = facetVertIndInSolid[facet];
215 if(facet->getNumberOfVertices()==3)
220 size_t vertexListSize = vertexList.size();
221 GeoFacetVertex
vertex(0.,0.,0.);
224 for(
size_t vertexIndInFacet=0; vertexIndInFacet<facet->getNumberOfVertices(); ++vertexIndInFacet) {
225 vertex = facet->getVertex(vertexIndInFacet);
230 while(j<vertexListSize && !
found) {
231 GeoFacetVertex vertexToCheck = vertexList[j];
240 vertexList.push_back(
vertex);
241 current[vertexIndInFacet] = vertexList.size()-1;
250 for(
size_t vertexInd=0; vertexInd<vertexList.size(); ++vertexInd) {
251 GeoFacetVertex
vertex = vertexList[vertexInd];
256 for(
size_t facetIndInSolid = 0; facetIndInSolid<tessellated->getNumberOfFacets(); ++facetIndInSolid) {
257 GeoFacet* facet = tessellated->getFacet(facetIndInSolid);
258 std::vector<size_t>&
current = facetVertIndInSolid[facet];
261 for (
size_t j=0; j<4; j++)
273 std::vector<std::pair<double,double> > vertices;
275 for(
size_t i=0;
i<8; ++
i)
276 vertices.push_back(std::pair<double,double>(gentrap->getVertices()[
i].x(),gentrap->getVertices()[
i].y()));