mirror of https://github.com/CGAL/cgal
fix indentation
This commit is contained in:
parent
3572246411
commit
ef3c8a638e
|
|
@ -781,79 +781,79 @@ insert_subconstraint(Vertex_handle vaa,
|
|||
stack.pop();
|
||||
CGAL_triangulation_precondition( vaa != vbb);
|
||||
|
||||
Vertex_handle vi;
|
||||
Vertex_handle vi;
|
||||
|
||||
Face_handle fr;
|
||||
int i;
|
||||
if(this->includes_edge(vaa,vbb,vi,fr,i)) {
|
||||
this->mark_constraint(fr,i);
|
||||
if (vi != vbb) {
|
||||
hierarchy.split_constraint(vaa,vbb,vi);
|
||||
stack.push(std::make_pair(vi,vbb));
|
||||
Face_handle fr;
|
||||
int i;
|
||||
if(this->includes_edge(vaa,vbb,vi,fr,i)) {
|
||||
this->mark_constraint(fr,i);
|
||||
if (vi != vbb) {
|
||||
hierarchy.split_constraint(vaa,vbb,vi);
|
||||
stack.push(std::make_pair(vi,vbb));
|
||||
}
|
||||
continue;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
List_faces intersected_faces;
|
||||
List_edges conflict_boundary_ab, conflict_boundary_ba;
|
||||
List_faces intersected_faces;
|
||||
List_edges conflict_boundary_ab, conflict_boundary_ba;
|
||||
|
||||
bool intersection = this->find_intersected_faces(
|
||||
vaa, vbb,
|
||||
intersected_faces,
|
||||
conflict_boundary_ab,
|
||||
conflict_boundary_ba,
|
||||
vi);
|
||||
bool intersection = this->find_intersected_faces(
|
||||
vaa, vbb,
|
||||
intersected_faces,
|
||||
conflict_boundary_ab,
|
||||
conflict_boundary_ba,
|
||||
vi);
|
||||
|
||||
if ( intersection) {
|
||||
if (vi != vaa && vi != vbb) {
|
||||
hierarchy.split_constraint(vaa,vbb,vi);
|
||||
stack.push(std::make_pair(vaa,vi));
|
||||
stack.push(std::make_pair(vi,vbb));
|
||||
}
|
||||
else stack.push(std::make_pair(vaa,vbb));
|
||||
if ( intersection) {
|
||||
if (vi != vaa && vi != vbb) {
|
||||
hierarchy.split_constraint(vaa,vbb,vi);
|
||||
stack.push(std::make_pair(vaa,vi));
|
||||
stack.push(std::make_pair(vi,vbb));
|
||||
}
|
||||
else stack.push(std::make_pair(vaa,vbb));
|
||||
|
||||
continue;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
//no intersection
|
||||
//no intersection
|
||||
|
||||
List_edges edges(conflict_boundary_ab);
|
||||
std::copy(conflict_boundary_ba.begin(), conflict_boundary_ba.end(), std::back_inserter(edges));
|
||||
List_edges edges(conflict_boundary_ab);
|
||||
std::copy(conflict_boundary_ba.begin(), conflict_boundary_ba.end(), std::back_inserter(edges));
|
||||
|
||||
// edges may contain mirror edges. They no longer exist after triangulate_hole
|
||||
// so we have to remove them before calling get_bounded_faces
|
||||
if(! edges.empty()){
|
||||
// edges may contain mirror edges. They no longer exist after triangulate_hole
|
||||
// so we have to remove them before calling get_bounded_faces
|
||||
if(! edges.empty()){
|
||||
|
||||
#if defined(BOOST_MSVC) && (BOOST_VERSION == 105500)
|
||||
std::set<Face_handle> faces(intersected_faces.begin(), intersected_faces.end());
|
||||
std::set<Face_handle> faces(intersected_faces.begin(), intersected_faces.end());
|
||||
#else
|
||||
boost::container::flat_set<Face_handle> faces(intersected_faces.begin(), intersected_faces.end());
|
||||
boost::container::flat_set<Face_handle> faces(intersected_faces.begin(), intersected_faces.end());
|
||||
#endif
|
||||
typename List_edges::iterator it2;
|
||||
for(typename List_edges::iterator it = edges.begin(); it!= edges.end();){
|
||||
if(faces.find(it->first) != faces.end()){
|
||||
typename List_edges::iterator it2 = it;
|
||||
++it;
|
||||
edges.erase(it2);
|
||||
}else {
|
||||
++it;
|
||||
typename List_edges::iterator it2;
|
||||
for(typename List_edges::iterator it = edges.begin(); it!= edges.end();){
|
||||
if(faces.find(it->first) != faces.end()){
|
||||
typename List_edges::iterator it2 = it;
|
||||
++it;
|
||||
edges.erase(it2);
|
||||
}else {
|
||||
++it;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this->triangulate_hole(intersected_faces,
|
||||
conflict_boundary_ab,
|
||||
conflict_boundary_ba);
|
||||
this->triangulate_hole(intersected_faces,
|
||||
conflict_boundary_ab,
|
||||
conflict_boundary_ba);
|
||||
|
||||
this->get_bounded_faces(edges.begin(),
|
||||
edges.end(),
|
||||
out);
|
||||
this->get_bounded_faces(edges.begin(),
|
||||
edges.end(),
|
||||
out);
|
||||
|
||||
if (vi != vbb) {
|
||||
hierarchy.split_constraint(vaa,vbb,vi);
|
||||
stack.push(std::make_pair(vi,vbb));
|
||||
}
|
||||
if (vi != vbb) {
|
||||
hierarchy.split_constraint(vaa,vbb,vi);
|
||||
stack.push(std::make_pair(vi,vbb));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue