diff --git a/Mesh_2/doc_tex/Mesh_2/main.tex b/Mesh_2/doc_tex/Mesh_2/main.tex index a0c000d35aa..96200492a2e 100644 --- a/Mesh_2/doc_tex/Mesh_2/main.tex +++ b/Mesh_2/doc_tex/Mesh_2/main.tex @@ -309,6 +309,10 @@ and the reference manual for details. Note that the \ccc{CDT} should not be externally modified during the life time of the \ccc{Delaunay_mesher_2} object. +Once the mesh is constructed, one can determine which faces of the +triangulation are in the mesh domain using the \ccc{is_in_domain()} member +function of the face type (see the concept \ccc{DelaunayMeshFaceBase_2}). + \subsection{Example Using the Global Function} The following example inserts several segments into a constrained @@ -335,7 +339,11 @@ This example uses the class \ccc{Delaunay_mesher_2} and calls This example uses the global function \ccc{refine_Delaunay_mesh_2} but defines a domain by using one seed. The size and shape criteria are the -default ones provided by the criteria class \ccc{Delaunay_mesh_criteria_2}. +default ones provided by the criteria class +\ccc{Delaunay_mesh_criteria_2}. + +Once the mesh is constructed, the \ccc{is_in_domain()} member function of +faces is used to count them. \ccIncludeExampleCode{Mesh_2/mesh_with_seeds.cpp} diff --git a/Mesh_2/examples/Mesh_2/mesh_with_seeds.cpp b/Mesh_2/examples/Mesh_2/mesh_with_seeds.cpp index 0b7b8c244ba..68d41380981 100644 --- a/Mesh_2/examples/Mesh_2/mesh_with_seeds.cpp +++ b/Mesh_2/examples/Mesh_2/mesh_with_seeds.cpp @@ -50,4 +50,12 @@ int main() Criteria()); std::cout << "Number of vertices: " << cdt.number_of_vertices() << std::endl; + std::cout << "Number of finite faces: " << cdt.number_of_faces() << std::endl; + int mesh_faces_counter = 0; + for(CDT::Finite_faces_iterator fit = cdt.finite_faces_begin(); + fit != cdt.finite_faces_end(); ++fit) + { + if(fit->is_in_domain()) ++mesh_faces_counter; + } + std::cout << "Number of faces in the mesh domain: " << mesh_faces_counter << std::endl; }