Go to the documentation of this file.
13 #include <boost/graph/graph_traits.hpp>
14 #include <CGAL/boost/graph/iterator.h>
16 #include <CGAL/boost/graph/Euler_operations.h>
43 template<
typename MutableFaceInc
identGraph >
46 typename boost::graph_traits<
47 MutableFaceIncidentGraph >::
50 typedef boost::graph_traits< MutableFaceIncidentGraph > GraphTraits;
51 typedef typename GraphTraits::edge_descriptor edge_descriptor;
53 if (e == GraphTraits::null_edge())
57 if(!pair_e_bool.second)
60 edge_descriptor retrieved_edge = pair_e_bool.first;
63 typedef typename GraphTraits::face_descriptor face_descriptor;
68 std::vector< face_descriptor > faces_to_remove;
69 auto faces_range_pair =
in_edges(e, g);
70 auto iter_f = faces_range_pair.first;
71 for(; iter_f != faces_range_pair.second; ++iter_f)
74 *iter_f, retrieved_edge);
76 faces_to_remove.push_back(*iter_f);
80 typename std::vector< face_descriptor >::iterator it(faces_to_remove.begin()),
81 ite(faces_to_remove.end());
82 for(; it != ite; ++it)
84 faces_to_remove.clear();
109 auto src_incident_edges_range =
in_edges(t, g);
110 auto iter_e = src_incident_edges_range.first;
111 for(; iter_e != src_incident_edges_range.second; ++iter_e)
122 std::vector< edge_descriptor > edges_to_remove;
123 src_incident_edges_range =
in_edges(t, g);
124 iter_e = src_incident_edges_range.first;
125 for(; iter_e != src_incident_edges_range.second; ++iter_e)
128 (*iter_e)->get_first_vertex(), (*iter_e)->get_second_vertex());
133 edges_to_remove.push_back(*iter_e);
138 typename std::vector< edge_descriptor >::iterator it_e(
139 edges_to_remove.begin()),
140 it_ee(edges_to_remove.end());
141 for(; it_e != it_ee; ++it_e)
148 edges_to_remove.clear();
179 template<
typename MutableFaceInc
identGraph >
181 typename boost::graph_traits<
182 MutableFaceIncidentGraph >::
185 typedef boost::graph_traits< MutableFaceIncidentGraph > GraphTraits;
186 typedef typename GraphTraits::edge_descriptor edge_descriptor;
189 if(pair_e_bool.second)
191 edge_descriptor retrieved_edge = pair_e_bool.first;
static edge_descriptor common_edge(vertex_descriptor vertex1, vertex_descriptor vertex2)
void remove_vertex(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_descriptor v, FEVV::DataStructures::AIF::AIFMesh &sm)
Removes v from the mesh.
void collapse_edge_keep_source(MutableFaceIncidentGraph &g, typename boost::graph_traits< MutableFaceIncidentGraph >::edge_descriptor &e)
Collapse an edge of the graph. The edge to collapse is given as a non-oriented edge....
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::degree_size_type degree(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_descriptor u, const FEVV::DataStructures::AIF::AIFMesh &)
static void resolve_similar_incident_faces(typename boost::graph_traits< MutableFaceIncidentGraph >::vertex_descriptor v_to_keep, MutableFaceIncidentGraph &g, bool take_into_account_face_rientation=false)
Remove/resolve similar faces for all incident faces of v_to_keep vertex.
void remove_edge(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::edge_descriptor e, FEVV::DataStructures::AIF::AIFMesh &sm)
Remove edge e.
static vertex_pos vertex_position(edge_descriptor edge, vertex_descriptor vertex)
static edge_descriptor null_edge()
static edge_descriptor add_edge(ptr_mesh mesh)
FEVV::DataStructures::AIF::AIFTopologyHelpers AIFHelpers
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_descriptor source(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::edge_descriptor e, const FEVV::DataStructures::AIF::AIFMesh &)
Returns the source vertex of e.
void remove_out_edge(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::face_descriptor f, typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::edge_descriptor e)
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::edge_descriptor edge(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor h, const FEVV::DataStructures::AIF::AIFMesh &sm)
Returns the edge corresponding to h and opposite(h).
void collapse_edge_keep_target(MutableFaceIncidentGraph &g, typename boost::graph_traits< MutableFaceIncidentGraph >::edge_descriptor &e)
Collapse an edge of the graph. The edge to collapse is given as a non-oriented edge....
Interfaces for plugins These interfaces will be used for different plugins.
static void merge_similar_edges(typename boost::graph_traits< MutableFaceIncidentGraph >::edge_descriptor e_to_keep, typename boost::graph_traits< MutableFaceIncidentGraph >::edge_descriptor e_to_remove, MutableFaceIncidentGraph &g)
For all faces incident to e_to_remove, if e_to_keep and e_to_remove were similar/parallel edges then ...
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_descriptor target(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::edge_descriptor e, const FEVV::DataStructures::AIF::AIFMesh &)
Returns the target vertex of e.
static bool contains_similar_incident_edges(const typename boost::graph_traits< FaceIncidentGraph >::vertex_descriptor v_to_keep, const FaceIncidentGraph &g)
Function determining if a pair of similar/parallel edges exists among the incident edges of vertex v_...
std::pair< typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::in_edge_iterator, typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::in_edge_iterator > in_edges(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_descriptor u, const FEVV::DataStructures::AIF::AIFMesh &)
static void resolve_similar_incident_edges(typename boost::graph_traits< MutableFaceIncidentGraph >::vertex_descriptor v_to_keep, MutableFaceIncidentGraph &g)
Remove/resolve similar/parallel edges for all incident edges of v_to_keep vertex.
boost::graph_traits< MeshT >::vertex_descriptor vertex_descriptor
This class is an helper class associated to the AIFMesh structure. AIFTopologyHelpers implements all ...
static void clear_vertex(vertex_descriptor vertex)
static vertex_descriptor add_vertex(ptr_mesh mesh)
void remove_face(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::face_descriptor f, FEVV::DataStructures::AIF::AIFMesh &sm)
Removes f from the mesh.