[TD]fix vertical section line and scale
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user