diff --git a/Surface_mesh/doc/Surface_mesh/Surface_mesh.txt b/Surface_mesh/doc/Surface_mesh/Surface_mesh.txt index 754f49ac762..601649f4e49 100644 --- a/Surface_mesh/doc/Surface_mesh/Surface_mesh.txt +++ b/Surface_mesh/doc/Surface_mesh/Surface_mesh.txt @@ -53,7 +53,9 @@ elements can be added and removed to the `Surface_mesh` through a set of low-level functions which do not maintain connectivity. One exception is `Surface_mesh::add_face()`, which tries to add a new face to the mesh (defined by a sequence of vertices), and fails if the -operation is not topologically valid. +operation is not topologically valid. In that case, the returned +`Face_index` is `Surface_mesh::null_face()`. + \code typedef Surface_mesh Mesh; @@ -73,6 +75,13 @@ do not have member functions to access connectivity or properties. The functions of the `Surface_mesh` instance from which they were created must be used to obtain this information. +\subsection usage_example Example + +The following example shows how to create a very simple `Surface_mesh` +by adding 2 faces, and how to check that a face is correctly added +to the mesh. + +\cgalExample{Surface_mesh/sm_check_wrong_orientation.cpp} \section sectionSurfaceMeshConnectivity Connectivity A surface mesh is an edge-centered data structure capable of diff --git a/Surface_mesh/doc/Surface_mesh/examples.txt b/Surface_mesh/doc/Surface_mesh/examples.txt index b19e4dfa646..0e21e9bcfec 100644 --- a/Surface_mesh/doc/Surface_mesh/examples.txt +++ b/Surface_mesh/doc/Surface_mesh/examples.txt @@ -1,4 +1,5 @@ /*! +\example Surface_mesh/sm_check_wrong_orientation.cpp \example Surface_mesh/sm_iterators.cpp \example Surface_mesh/sm_circulators.cpp \example Surface_mesh/sm_properties.cpp diff --git a/Surface_mesh/examples/Surface_mesh/sm_check_wrong_orientation.cpp b/Surface_mesh/examples/Surface_mesh/sm_check_wrong_orientation.cpp index 972e98878c2..b438f393ea3 100644 --- a/Surface_mesh/examples/Surface_mesh/sm_check_wrong_orientation.cpp +++ b/Surface_mesh/examples/Surface_mesh/sm_check_wrong_orientation.cpp @@ -1,6 +1,3 @@ -#include - - #include #include