Add CDT::write_missing_segments_file

This commit is contained in:
Laurent Rineau 2022-12-13 14:27:03 +01:00
parent 3f90b15dd2
commit b240dbab67
2 changed files with 17 additions and 0 deletions

View File

@ -236,6 +236,19 @@ public:
});
}
void write_missing_segments_file(std::ostream &out) {
return std::for_each(
constraint_hierarchy.sc_begin(), constraint_hierarchy.sc_end(),
[this, &out](const auto &sc) {
if (!tr.tds().is_edge(sc.first.first, sc.first.second)) {
const auto v0 = sc.first.first;
const auto v1 = sc.first.second;
out << "2 " << this->tr.point(v0) << " " << this->tr.point(v1)
<< '\n';
}
});
}
/// @{
/// remove functions cannot be called
void remove(Vertex_handle) = delete;

View File

@ -59,6 +59,10 @@ int main(int argc, char* argv[])
std::ofstream missing_faces("missing_faces.polylines.txt");
cdt.write_missing_subfaces_file(missing_faces);
}
{
std::ofstream missing_edges("missing_segments.polylines.txt");
cdt.write_missing_segments_file(missing_edges);
}
// auto edge_is_feature_map = get(CGAL::edge_is_feature, mesh);
// auto face_patch_id_map = get(CGAL::face_patch_id_t<int>(), mesh);