From eb407feb60e895d0eb188fc0c16214a25a85031e Mon Sep 17 00:00:00 2001 From: wandererfan Date: Wed, 9 Nov 2022 09:21:54 -0500 Subject: [PATCH] [TD]fix rotation of complex section --- src/Mod/TechDraw/App/DrawComplexSection.cpp | 9 ++++++++- src/Mod/TechDraw/App/DrawViewSection.cpp | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Mod/TechDraw/App/DrawComplexSection.cpp b/src/Mod/TechDraw/App/DrawComplexSection.cpp index 14562b38eb..c77e3df3e5 100644 --- a/src/Mod/TechDraw/App/DrawComplexSection.cpp +++ b/src/Mod/TechDraw/App/DrawComplexSection.cpp @@ -319,7 +319,14 @@ TopoDS_Shape DrawComplexSection::prepareShape(const TopoDS_Shape &cutShape, doub return TopoDS_Shape(); } - return scaleShape(alignedResult, getScale()); + TopoDS_Shape preparedShape = scaleShape(alignedResult, getScale()); + if (!DrawUtil::fpCompare(Rotation.getValue(), 0.0)) { + preparedShape = TechDraw::rotateShape(preparedShape, + getProjectionCS(), + Rotation.getValue()); + } + + return preparedShape; } //for Aligned strategy, cut the rawShape by each segment of the tool diff --git a/src/Mod/TechDraw/App/DrawViewSection.cpp b/src/Mod/TechDraw/App/DrawViewSection.cpp index d5b046e04c..dc587b1e03 100644 --- a/src/Mod/TechDraw/App/DrawViewSection.cpp +++ b/src/Mod/TechDraw/App/DrawViewSection.cpp @@ -185,7 +185,8 @@ short DrawViewSection::mustExecute() const Direction.isTouched() || BaseView.isTouched() || SectionNormal.isTouched() || - SectionOrigin.isTouched() ) { + SectionOrigin.isTouched() || + Rotation.isTouched() ) { return 1; }