CGAL 6.0.1 - Surface Mesh Topology
Loading...
Searching...
No Matches
Surface_mesh_topology/path_homotopy_with_symbols_2.cpp
#include <CGAL/Polygonal_schema.h>
#include <CGAL/Path_on_surface.h>
#include <CGAL/Curves_on_surface_topology.h>
#include <iostream>
#include <cstdlib>
int main()
{
PS ps;
ps.add_facet("a b -a c"); // First facet, giving directly its sequence of edges
ps.add_facet("d -c e -b"); // Second facet
ps.init_facet(); // Third facet
ps.add_edges_to_facet("f"); // Here, each edge is added one at a time
ps.add_edges_to_facet("-d");
ps.add_edges_to_facet("-f");
ps.add_edges_to_facet("-e");
ps.finish_facet();
ps.perforate_facet("f");
std::cout<<"Number of cells of the combinatorial maps: ";
ps.display_characteristics(std::cout)<<std::endl;
p.push_back_by_label("a b -a e -b d");
bool res=cst.is_contractible(p);
std::cout<<"Path "<<(res?"IS":"IS NOT")<<" contractible."<<std::endl;
return EXIT_SUCCESS;
}
The class Curves_on_surface_topology provides methods to compute shortest non contractible cycles and...
Definition: Curves_on_surface_topology.h:13
bool is_contractible(const Path_on_surface< Mesh > &p) const
returns true if the closed path p is contractible.
The class Path_on_surface represents a walk in a mesh which is either a model of CombinatorialMap,...
Definition: Path_on_surface.h:13
void push_back_by_label(const std::string &s)
adds successively all darts/halfedges in s (a sequence of labels separated by spaces) at the end of t...
The class Polygonal_schema_with_combinatorial_map is a model of PolygonalSchema using Combinatorial_m...
Definition: Polygonal_schema.h:15