mirror of https://github.com/CGAL/cgal
Refactor, reindent restore_constrained_Delaunay
This commit is contained in:
parent
155f6791a2
commit
00d815ecb3
|
|
@ -565,17 +565,7 @@ private:
|
|||
return border_edges;
|
||||
}
|
||||
|
||||
|
||||
public:
|
||||
void restore_constrained_Delaunay()
|
||||
{
|
||||
for(int i = 0, end = face_constraint_misses_subfaces.size(); i < end; ++i) {
|
||||
fill_cdt_2(i);
|
||||
search_for_missing_subfaces(i);
|
||||
}
|
||||
const auto npos = face_constraint_misses_subfaces.npos;
|
||||
auto i = face_constraint_misses_subfaces.find_first();
|
||||
while(i != npos) {
|
||||
void restore_face(CDT_3_face_index i) {
|
||||
const CDT_2& cdt_2 = face_cdt_2[i];
|
||||
#if CGAL_DEBUG_CDT_3
|
||||
std::cerr << "cdt_2 has " << cdt_2.number_of_vertices() << " vertices\n";
|
||||
|
|
@ -597,9 +587,9 @@ public:
|
|||
const auto reverse_edge = cdt_2.mirror_edge(edge);
|
||||
reverse_edge.first->info().is_edge_also_in_3d_triangulation[unsigned(reverse_edge.second)] = is_3d;
|
||||
}
|
||||
|
||||
for(CDT_2_face_handle fh : cdt_2.finite_face_handles()) {
|
||||
if(false == fh->info().is_outside_the_face && true == fh->info().missing_subface) {
|
||||
if(fh->info().is_outside_the_face) continue;
|
||||
if(false == fh->info().missing_subface) continue;
|
||||
auto fh_region = region(cdt_2, fh);
|
||||
assert(!fh_region.empty());
|
||||
assert(fh == fh_region[0]);
|
||||
|
|
@ -612,7 +602,6 @@ public:
|
|||
dump_region.precision(17);
|
||||
write_region(dump_region, fh_region);
|
||||
}
|
||||
|
||||
#endif // CGAL_DEBUG_CDT_3
|
||||
const auto found_seg = [&]() -> std::optional<Edge> {
|
||||
for(auto fh_2d : fh_region) {
|
||||
|
|
@ -669,6 +658,18 @@ public:
|
|||
CGAL_assertion(found_seg != std::nullopt);
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
void restore_constrained_Delaunay()
|
||||
{
|
||||
for(int i = 0, end = face_constraint_misses_subfaces.size(); i < end; ++i) {
|
||||
fill_cdt_2(i);
|
||||
search_for_missing_subfaces(i);
|
||||
}
|
||||
const auto npos = face_constraint_misses_subfaces.npos;
|
||||
auto i = face_constraint_misses_subfaces.find_first();
|
||||
while(i != npos) {
|
||||
restore_face(i);
|
||||
i = face_constraint_misses_subfaces.find_next(i);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue