Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kintel committed Mar 10, 2024
1 parent 0df93aa commit 2aa9568
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/geometry/GeometryEvaluator.cc
Expand Up @@ -1033,6 +1033,7 @@ static Outline2d splitOutlineByFn(
Input to extrude should be sanitized. This means non-intersecting, correct winding order
etc., the input coming from a library like Clipper.
*/
// FIXME: What happens if the input Polygon isn't manifold, or has coincident vertices?
static std::unique_ptr<Geometry> extrudePolygon(const LinearExtrudeNode& node, const Polygon2d& poly)
{
bool non_linear = node.twist != 0 || node.scale_x != node.scale_y;
Expand Down Expand Up @@ -1537,6 +1538,7 @@ Response GeometryEvaluator::visit(State& state, const AbstractIntersectionNode&
}

#if defined(ENABLE_EXPERIMENTAL) && defined(ENABLE_CGAL)
// FIXME: What is the convex/manifold situation of the resulting PolySet?
static std::unique_ptr<Geometry> roofOverPolygon(const RoofNode& node, const Polygon2d& poly)
{
std::unique_ptr<PolySet> roof;
Expand Down
2 changes: 2 additions & 0 deletions src/geometry/boolean_utils.cc
Expand Up @@ -88,6 +88,8 @@ std::unique_ptr<PolySet> applyHull(const Geometry::Geometries& children)
PRINTDB("After hull facets: %d", r.size_of_facets());
PRINTDB("After hull closed: %d", r.is_closed());
PRINTDB("After hull valid: %d", r.is_valid());
// FIXME: Make sure PolySet is set to convex.
// FIXME: Can we guarantee a manifold PolySet here?
return CGALUtils::createPolySetFromPolyhedron(r);
} catch (const CGAL::Failure_exception& e) {
LOG(message_group::Error, "CGAL error in applyHull(): %1$s", e.what());
Expand Down
2 changes: 2 additions & 0 deletions src/geometry/cgal/cgalutils-mesh.cc
Expand Up @@ -41,9 +41,11 @@ bool createMeshFromPolySet(const PolySet& ps, TriangleMesh& mesh)
template bool createMeshFromPolySet(const PolySet& ps, CGAL_HybridMesh& mesh);
template bool createMeshFromPolySet(const PolySet& ps, CGAL_DoubleMesh& mesh);


template <class TriangleMesh>
std::unique_ptr<PolySet> createPolySetFromMesh(const TriangleMesh& mesh)
{
// FIXME: We may want to convert directly, without PolySetBuilder here, to maintain manifoldness, if possible.
PolySetBuilder builder(0, mesh.number_of_faces()+ mesh.number_of_faces());
for (const auto& f : mesh.faces()) {
builder.appendPoly(mesh.degree(f));
Expand Down

0 comments on commit 2aa9568

Please sign in to comment.