Operations on edges in polyhedron

http://doc.cgal.org/latest/Polyhedron/classCGAL_1_1Polyhedron__3_1_1Vertex.html


judge whether a halfedge is border

bool is_border ( halfedge_descriptor const& aEdge ) 
const { return face(aEdge,mSurface) == boost::graph_traits<ECM>::null_face() ; }



get a halfedge from graph through two vertices.

refer from  CGAL\boost\graph\Euler_operations.h line 136
 CGAL_assertion( halfedge(v_to_remove, v, g).first == h );

here halfedge is defined as below:


template<class Gt, class I, CGAL_HDS_PARAM_, class A>
std::pair< typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::halfedge_descriptor
           , bool>
halfedge(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor u
         , typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::vertex_descriptor v
         , const CGAL::Polyhedron_3<Gt,I,HDS,A>& g)

  std::pair< typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::edge_descriptor
             , bool> e = edge(u, v, g);
  return std::make_pair(e.first.halfedge(), e.second);
}

Be aware of that the reture value is a std::pair of which first element will be a halfedge_descriptor with no accident, the second element determine whether the accident happens.


halfedge_descriptor hd = halfedge(vd_source, vd_target, g).first;

halfedge_descriptor   hd  <----------->   edge_descriptor  ed


 halfedge_descriptor hd = halfedge(ed,g);

edge_descriptor ed = edge(hd, g)

你可能感兴趣的:(Operations on edges in polyhedron)