[TD]Dimension Py Routine fixes

This commit is contained in:
wandererfan
2020-05-09 19:30:58 -04:00
committed by WandererFan
parent 87ef69ce22
commit d7659c7741
4 changed files with 33 additions and 14 deletions

View File

@@ -794,6 +794,8 @@ private:
Py::Object makeDistanceDim(const Py::Tuple& args)
{
//points come in unscaled,but makeDistDim unscales them so we need to prescale here.
//makeDistDim was built for extent dims which work from scaled geometry
PyObject* pDvp;
PyObject* pDimType;
PyObject* pFrom;
@@ -827,12 +829,14 @@ private:
if (PyObject_TypeCheck(pTo, &(Base::VectorPy::Type))) {
to = static_cast<Base::VectorPy*>(pTo)->value();
}
DrawViewDimension* dvd =
DrawDimHelper::makeDistDim(dvp,
dimType,
from,
to);
return Py::None();
DrawUtil::invertY(from),
DrawUtil::invertY(to));
PyObject* dvdPy = dvd->getPyObject();
return Py::asObject(dvdPy);
// return Py::None();
}
Py::Object makeDistanceDim3d(const Py::Tuple& args)
@@ -869,8 +873,10 @@ private:
if (PyObject_TypeCheck(pTo, &(Base::VectorPy::Type))) {
to = static_cast<Base::VectorPy*>(pTo)->value();
}
//3d points are not scaled
from = DrawUtil::invertY(dvp->projectPoint(from));
to = DrawUtil::invertY(dvp->projectPoint(to));
//DrawViewDimension* =
DrawDimHelper::makeDistDim(dvp,
dimType,
from,