Test whether polygonal boundary is simple #5665

This commit is contained in:
Thomas Krijnen
2024-11-01 11:15:09 +01:00
parent 4c08eaf953
commit 63e98e69e9
+11
View File
@@ -1930,6 +1930,17 @@ bool CgalKernel::convert_impl(const taxonomy::boolean_result::ptr br, Conversion
if (!convert(face, fs) || fs.size() != 1) {
return false;
}
auto& w = fs.front().outer;
CGAL::Polygon_2<Kernel_> ps;
for (auto& p : w) {
ps.push_back({ p.x(), p.y() });
}
if (!ps.is_simple()) {
Logger::Warning("Polygonal boundary not simple", face->children[0]->instance);
continue;
}
// static
auto z = taxonomy::make<taxonomy::direction3>(0, 0, 1);
cgal_shape_t poly;