From 8453d415150f289d36dfe4cbe6b91dfc512e82fe Mon Sep 17 00:00:00 2001 From: David Osterberg Date: Sun, 28 Feb 2021 10:10:29 +0100 Subject: [PATCH] PartDesign: Transformed. Fix regression for Mirrored, and multiple features --- src/Mod/PartDesign/App/FeatureTransformed.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Mod/PartDesign/App/FeatureTransformed.cpp b/src/Mod/PartDesign/App/FeatureTransformed.cpp index cd35a4e3e6..d241e767bf 100644 --- a/src/Mod/PartDesign/App/FeatureTransformed.cpp +++ b/src/Mod/PartDesign/App/FeatureTransformed.cpp @@ -296,7 +296,8 @@ App::DocumentObjectExecReturn *Transformed::execute(void) bool overlapping = false; std::vector::const_iterator t = transformations.begin(); - ++t; // Skip first transformation, which is always the identity transformation + //++t; // Skip first transformation, which is always the identity transformation + bool first = true; for (; t != transformations.end(); ++t) { // Make an explicit copy of the shape because the "true" parameter to BRepBuilderAPI_Transform // seems to be pretty broken @@ -304,13 +305,19 @@ App::DocumentObjectExecReturn *Transformed::execute(void) shape = copy.Shape(); - shape.Move(*t); + BRepBuilderAPI_Transform mkTrf(shape, *t, false); // No need to copy, now + if (!mkTrf.IsDone()) + return new App::DocumentObjectExecReturn("Transformation failed", (*o)); + shape = mkTrf.Shape(); + shapes.emplace_back(shape); builder.Add(compShape, shape); - if (overlapDetectionMode) + if (overlapDetectionMode && !first) overlapping = overlapping || (countSolids(TopoShape(origShape).fuse(shape))==1); + if (first) + first = false; } TopoDS_Shape toolShape;