diff --git a/src/Mod/TechDraw/App/DrawUtil.cpp b/src/Mod/TechDraw/App/DrawUtil.cpp index 893aa6778b..1d109361bb 100644 --- a/src/Mod/TechDraw/App/DrawUtil.cpp +++ b/src/Mod/TechDraw/App/DrawUtil.cpp @@ -297,8 +297,8 @@ std::pair DrawUtil::boxIntersect2d(Base::Vector3 // y = mx + b // m = (y1 - y0) / (x1 - x0) if (DrawUtil::fpCompare(dir.x, 0.0) ) { - p1 = Base::Vector3d(0.0, - yRange / 2.0, 0.0); - p2 = Base::Vector3d(0.0, yRange / 2.0, 0.0); + p1 = Base::Vector3d(point.x, - yRange / 2.0, 0.0); + p2 = Base::Vector3d(point.x, yRange / 2.0, 0.0); } else { double slope = dir.y / dir.x; double left = -xRange / 2.0; diff --git a/src/Mod/TechDraw/App/DrawViewSection.cpp b/src/Mod/TechDraw/App/DrawViewSection.cpp index 368e67fede..339ad2ecc1 100644 --- a/src/Mod/TechDraw/App/DrawViewSection.cpp +++ b/src/Mod/TechDraw/App/DrawViewSection.cpp @@ -682,7 +682,6 @@ TopoDS_Face DrawViewSection::projectFace(const TopoDS_Shape &face, std::pair DrawViewSection::sectionLineEnds(void) { std::pair result; - auto sNorm = SectionNormal.getValue(); double angle = M_PI / 2.0; auto axis = getBaseDVP()->Direction.getValue(); @@ -697,7 +696,6 @@ std::pair DrawViewSection::sectionLineEnds(void) auto sOrigin = SectionOrigin.getValue(); Base::Vector3d adjSectionOrg = sOrigin - getBaseDVP()->getOriginalCentroid(); Base::Vector3d sOrgOnBase = getBaseDVP()->projectPoint(adjSectionOrg); - sOrgOnBase /= getScale(); auto bbx = getBaseDVP()->getBoundingBox(); double xRange = bbx.MaxX - bbx.MinX;