Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pca006132 committed Dec 9, 2024
1 parent 33e958d commit fe3c59b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 1 addition & 9 deletions src/csg_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,6 @@ std::shared_ptr<CsgNode> CsgLeafNode::Transform(const mat3x4 &m) const {
CsgNodeType CsgLeafNode::GetNodeType() const { return CsgNodeType::Leaf; }

std::shared_ptr<CsgLeafNode> ImplToLeaf(Manifold::Impl &&impl) {
#ifdef MANIFOLD_DEBUG
if (impl.IsSelfIntersecting()) {
dump_lock.lock();
std::cout << "self-intersection detected" << std::endl;
dump_lock.unlock();
throw logicErr("self intersection detected");
}
#endif
return std::make_shared<CsgLeafNode>(std::make_shared<Manifold::Impl>(impl));
}

Expand All @@ -126,7 +118,7 @@ std::shared_ptr<CsgLeafNode> SimpleBoolean(const Manifold::Impl &a,
try {
Boolean3 boolean(a, b, op);
auto impl = boolean.Result(op);
if (impl.IsSelfIntersecting()) {
if (ManifoldParams().intermediateChecks && impl.IsSelfIntersecting()) {
dump_lock.lock();
std::cout << "self-intersection detected" << std::endl;
dump_lock.unlock();
Expand Down
2 changes: 1 addition & 1 deletion src/properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ bool Manifold::Impl::IsSelfIntersecting() const {
// distance epsilon squared
for (int i : {0, 1, 2})
for (int j : {0, 1, 2})
if (linalg::distance2(tri_x[i], tri_y[j]) <= epsilonSq) return true;
if (distance2(tri_x[i], tri_y[j]) <= epsilonSq) return true;

Check warning on line 234 in src/properties.cpp

View check run for this annotation

Codecov / codecov/patch

src/properties.cpp#L232-L234

Added lines #L232 - L234 were not covered by tests

if (DistanceTriangleTriangleSquared(tri_x, tri_y) == 0.0) {

Check warning on line 236 in src/properties.cpp

View check run for this annotation

Codecov / codecov/patch

src/properties.cpp#L236

Added line #L236 was not covered by tests
#ifdef MANIFOLD_DEBUG
Expand Down

0 comments on commit fe3c59b

Please sign in to comment.