From 79f9da420c43db39a459b07660ed0f09d4df870d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Althaus?= Date: Mon, 25 Mar 2024 01:10:01 +0100 Subject: [PATCH] Ignore suppressed features in patterns This will remove all suppressed features from the Originals list before calculating the patterns. --- src/Mod/PartDesign/App/FeatureTransformed.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Mod/PartDesign/App/FeatureTransformed.cpp b/src/Mod/PartDesign/App/FeatureTransformed.cpp index d5b2306de6..17856bd8df 100644 --- a/src/Mod/PartDesign/App/FeatureTransformed.cpp +++ b/src/Mod/PartDesign/App/FeatureTransformed.cpp @@ -178,6 +178,15 @@ App::DocumentObjectExecReturn *Transformed::execute() this->positionBySupport(); + // Remove suppressed features from the list so the transformations behave as if they are not there + { + auto eraseIter = std::remove_if(originals.begin(), originals.end(), [](App::DocumentObject const* obj) { + auto feature = Base::freecad_dynamic_cast(obj); + return feature != nullptr && feature->Suppressed.getValue(); + }); + originals.erase(eraseIter, originals.end()); + } + // get transformations from subclass by calling virtual method std::vector transformations; try {