From 88543612e416e1c2b38f0c0347973e2fc6c8b16e Mon Sep 17 00:00:00 2001 From: Kacper Donat Date: Sun, 23 Nov 2025 21:22:42 +0100 Subject: [PATCH] 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. --- src/Mod/PartDesign/App/FeatureBoolean.cpp | 7 +++---- src/Mod/PartDesign/Gui/ViewProviderBoolean.cpp | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Mod/PartDesign/App/FeatureBoolean.cpp b/src/Mod/PartDesign/App/FeatureBoolean.cpp index 85708c5d12..e7db82a458 100644 --- a/src/Mod/PartDesign/App/FeatureBoolean.cpp +++ b/src/Mod/PartDesign/App/FeatureBoolean.cpp @@ -233,10 +233,9 @@ void Boolean::updatePreviewShape() std::vector 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; diff --git a/src/Mod/PartDesign/Gui/ViewProviderBoolean.cpp b/src/Mod/PartDesign/Gui/ViewProviderBoolean.cpp index d994fc0043..3bb4cfe0de 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderBoolean.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderBoolean.cpp @@ -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);