From c2ada8eacd76b37a518fa4491561288d752719b8 Mon Sep 17 00:00:00 2001 From: Eivind Kvedalen Date: Sun, 29 Jul 2018 00:59:57 +0200 Subject: [PATCH] Fix for issue #3541: Normalize xDir vector for Hole feature to correct hole diameter. --- src/Mod/PartDesign/App/FeatureHole.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Mod/PartDesign/App/FeatureHole.cpp b/src/Mod/PartDesign/App/FeatureHole.cpp index 4da6482bf55d..2848cd02aabb 100644 --- a/src/Mod/PartDesign/App/FeatureHole.cpp +++ b/src/Mod/PartDesign/App/FeatureHole.cpp @@ -985,6 +985,9 @@ App::DocumentObjectExecReturn *Hole::execute(void) else xDir = gp_Vec(0, -zDir.Z(), zDir.Y()); + // Normalize xDir; this is needed as the computation above does not necessarily give a unit-length vector. + xDir.Normalize(); + if ( method == "Dimension" ) length = Depth.getValue(); else if ( method == "UpToFirst" ) {