[TD]Dimension Py Routine fixes
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user