From 1772eb70bc98f36a0246d73db47247ecd82bb73e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Rheinl=C3=A4nder?= Date: Thu, 19 Dec 2013 19:43:23 +0100 Subject: [PATCH] PartDesign::Transformed: Transformed shapes that touch are now rejected as overlapping in the interest of boolean operation stability --- src/Mod/PartDesign/App/FeatureTransformed.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Mod/PartDesign/App/FeatureTransformed.cpp b/src/Mod/PartDesign/App/FeatureTransformed.cpp index f3b70dcd6..75ec3a654 100644 --- a/src/Mod/PartDesign/App/FeatureTransformed.cpp +++ b/src/Mod/PartDesign/App/FeatureTransformed.cpp @@ -284,8 +284,10 @@ App::DocumentObjectExecReturn *Transformed::execute(void) // If there is only one transformed feature, we allow an overlap (though it might seem // illogical to the user why we allow overlapping shapes in this case!) if (v_transformedShapes.size() > 1) - if (Part::checkIntersection(shape, v_transformedShapes.front(), false, false)) { + if (Part::checkIntersection(shape, v_transformedShapes.front(), false, true)) { // For single transformations, if one overlaps, all overlap, as long as we have uniform increments + // Shapes that touch are also marked as overlapping, since compounding them and then doing a boolean + // operation with the compound might be unstable because of coincident faces. for (trsf_it_vec::const_iterator v = v_transformations.begin(); v != v_transformations.end(); v++) overlapping_trsfms[*o].insert(*v); v_transformedShapes.clear(); @@ -308,9 +310,9 @@ App::DocumentObjectExecReturn *Transformed::execute(void) rejected_iterators.insert(s1); overlapping_trsfms[*o].insert(*t1); } - // Check intersection with other transformations + // Check intersection with other transformations (including touching) for (; s2 != v_transformedShapes.end(); ++s2, ++t2) - if (Part::checkIntersection(*s1, *s2, false, false)) { + if (Part::checkIntersection(*s1, *s2, false, true)) { rejected_iterators.insert(s1); rejected_iterators.insert(s2); overlapping_trsfms[*o].insert(*t1);