PartDesign: allow makeShellFromUpToFace to update extrusion direction

Updated makeShellFromUpToShape to accept the direction vector by reference.
This allows the method to reverse the direction internally if required
to successfully reach the target face, fixing cases where the extrusion
would otherwise fail or go the wrong way.

Note: While passing the direction as a non-const reference is a quick
fix for this regression, it is acknowledged as non-ideal and should
be considered for future refactoring.
This commit is contained in:
PaddleStroke
2026-01-18 23:58:41 +01:00
committed by Chris Hennes
parent 58d8515365
commit 52608d3081
2 changed files with 2 additions and 2 deletions

View File

@@ -154,7 +154,7 @@ void FeatureExtrude::onChanged(const App::Property* prop)
ProfileBased::onChanged(prop);
}
TopoShape FeatureExtrude::makeShellFromUpToShape(TopoShape shape, TopoShape sketchshape, gp_Dir dir)
TopoShape FeatureExtrude::makeShellFromUpToShape(TopoShape shape, TopoShape sketchshape, gp_Dir& dir)
{
// Find nearest/furthest face

View File

@@ -99,7 +99,7 @@ protected:
* by removing the farthest face from the sketchshape in the direction
* if farthest is nearest (circular) then return the initial shape
*/
TopoShape makeShellFromUpToShape(TopoShape shape, TopoShape sketchshape, gp_Dir dir);
TopoShape makeShellFromUpToShape(TopoShape shape, TopoShape sketchshape, gp_Dir& dir);
/**
* Disables settings that are not valid for the current method