Skip to content

Commit

Permalink
PartDesign: Transformed. Fix regression for Mirrored, and multiple fe…
Browse files Browse the repository at this point in the history
…atures
  • Loading branch information
davidosterberg authored and wwmayer committed Mar 13, 2021
1 parent fecf9c2 commit 8453d41
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/Mod/PartDesign/App/FeatureTransformed.cpp
Expand Up @@ -296,21 +296,28 @@ App::DocumentObjectExecReturn *Transformed::execute(void)
bool overlapping = false;

std::vector<gp_Trsf>::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
BRepBuilderAPI_Copy copy(origShape);

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;
Expand Down

0 comments on commit 8453d41

Please sign in to comment.