Skip to content

Commit

Permalink
[TD]fix vertical section line and scale
Browse files Browse the repository at this point in the history
  • Loading branch information
WandererFan committed May 12, 2020
1 parent 1bd1312 commit 1f1d329
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Mod/TechDraw/App/DrawUtil.cpp
Expand Up @@ -297,8 +297,8 @@ std::pair<Base::Vector3d, Base::Vector3d> 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;
Expand Down
2 changes: 0 additions & 2 deletions src/Mod/TechDraw/App/DrawViewSection.cpp
Expand Up @@ -682,7 +682,6 @@ TopoDS_Face DrawViewSection::projectFace(const TopoDS_Shape &face,
std::pair<Base::Vector3d, Base::Vector3d> DrawViewSection::sectionLineEnds(void)
{
std::pair<Base::Vector3d, Base::Vector3d> result;

auto sNorm = SectionNormal.getValue();
double angle = M_PI / 2.0;
auto axis = getBaseDVP()->Direction.getValue();
Expand All @@ -697,7 +696,6 @@ std::pair<Base::Vector3d, Base::Vector3d> 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;
Expand Down

0 comments on commit 1f1d329

Please sign in to comment.