From 43de589732b426bc2001cec9b10df0935993603b Mon Sep 17 00:00:00 2001 From: David Osterberg Date: Sat, 20 Feb 2021 19:59:15 +0100 Subject: [PATCH] PartDesign: Fix throughall distance when throughall is used together with midplane --- src/Mod/PartDesign/App/FeatureSketchBased.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.cpp b/src/Mod/PartDesign/App/FeatureSketchBased.cpp index 32bbab3b15..ffd61417d4 100644 --- a/src/Mod/PartDesign/App/FeatureSketchBased.cpp +++ b/src/Mod/PartDesign/App/FeatureSketchBased.cpp @@ -555,7 +555,8 @@ double ProfileBased::getThroughAllLength() const box.SetGap(0.0); // The diagonal of the bounding box, plus 1% extra to eliminate risk of // co-planar issues, gives a length that is guaranteed to go through all. - return 1.01 * sqrt(box.SquareExtent()); + // The result is multiplied by 2 for the guarantee to work also for the midplane option. + return 2.02 * sqrt(box.SquareExtent()); } void ProfileBased::generatePrism(TopoDS_Shape& prism,