Polyhedron#

A polyhedron is defined by its faces. The list of faces is a vector of polygons (See Polygon for details).

Figure made with TikZ

Figure made with TikZ

To construct a Polyhedron geometry, use the parameter _faces . The only other parameter which can be used is the _domain_name parameter, to set the name of the polyhedral main domain. Everything else is defined from the faces:

std::vector<Point> v(5), v2(4);
v[0]=Point(0.,0.,0.); v[1]=Point(2.,0.,0.); v[2]=Point(3.,1.,0.);
v[3]=Point(1.,4.,0.); v[4]=Point(-1.,2.,0.);
Polygon pg1(_vertices=v, _domain_name="Gamma1");

v[0]=Point(0.,0.,1.); v[1]=Point(2.,0.,1.); v[2]=Point(3.,1.,1.);
v[3]=Point(1.,4.,1.); v[4]=Point(-1.,2.,1.);
Polygon pg2(_vertices=v, _domain_name="Gamma2");

v2[0]=Point(0.,0.,0.); v2[1]=Point(2.,0.,0.);
v2[2]=Point(2.,0.,1.); v2[3]=Point(0.,0.,1.);
Polygon pg3(_vertices=v2, _domain_name="Sigma");

v2[0]=Point(2.,0.,0.); v2[1]=Point(3.,1.,0.);
v2[2]=Point(3.,1.,1.); v2[3]=Point(2.,0., 1.);
Polygon pg4(_vertices=v2, _domain_name="Sigma");

v2[0]=Point(3.,1.,0.); v2[1]=Point(1.,4.,0.);
v2[2]=Point(1.,4.,1.); v2[3]=Point(3.,1., 1.);
Polygon pg5(_vertices=v2, _domain_name="Sigma");

v2[0]=Point(1.,4.,0.); v2[1]=Point(-1.,2.,0.);
v2[2]=Point(-1.,2.,1.); v2[3]=Point(1.,4., 1.);
Polygon pg6(_vertices=v2, _domain_name="Sigma");

v2[0]=Point(-1.,2.,0.); v2[1]=Point(0.,0.,0.);
v2[2]=Point(0.,0.,1.); v2[3]=Point(-1.,2., 1.);
Polygon pg7(_vertices=v2, _domain_name="Sigma");

std::vector<Polygon> faces(7);
faces[0]=pg1; faces[1]=pg2; faces[2]=pg3;
faces[3]=pg4; faces[4]=pg5; faces[5]=pg6; faces[6]=pg7;
Polyhedron poly1(_faces=faces, _domain_name="Omega");

Let’s summarize information about geometrical keys on polyhedra:

key(s)

authorized types

examples

_faces

vector of Polygon

(std::vector<Polygon > vp; …) _faces =vp

Particular polyhedra (hexahedron, parallelepiped, cuboids, cube) are handled by classes inheriting from Polyhedron class: