PartDesign: Use true tool positions for boolean preview

This fixes positioning of some previews for booleans that were misplaced
after #24750 was merged. It restores previous code that was correct for
most cases. The reason for some previews being misaligned is described
in the #25578 - the preview actually shows how the result should be but
due to some shortcuts taken in code the result is incorrect.
This commit is contained in:
Kacper Donat
2025-11-23 21:22:42 +01:00
committed by Chris Hennes
parent 8acccf3194
commit 88543612e4
2 changed files with 3 additions and 5 deletions

View File

@@ -233,10 +233,9 @@ void Boolean::updatePreviewShape()
std::vector<TopoShape> shapes;
for (auto& obj : Group.getValues()) {
auto shape
= getTopoShape(obj, Part::ShapeOption::ResolveLink | Part::ShapeOption::Transform);
shape.setPlacement(shape.getPlacement().inverse() * globalPlacement());
shapes.push_back(shape);
shapes.push_back(
getTopoShape(obj, Part::ShapeOption::ResolveLink | Part::ShapeOption::Transform)
);
}
TopoShape result;

View File

@@ -168,7 +168,6 @@ void ViewProviderBoolean::updatePreview()
}
Part::TopoShape toolShape = feature->Shape.getShape();
toolShape.setPlacement(toolShape.getPlacement().inverse() * feature->globalPlacement());
auto pcToolPreview = new PartGui::SoPreviewShape;
updatePreviewShape(toolShape, pcToolPreview);