diff --git a/src/Mod/Sketcher/App/ConstraintPy.xml b/src/Mod/Sketcher/App/ConstraintPy.xml index 32579e9be5..ec7bc24d08 100644 --- a/src/Mod/Sketcher/App/ConstraintPy.xml +++ b/src/Mod/Sketcher/App/ConstraintPy.xml @@ -22,12 +22,36 @@ + + + Position of first geometry index the Constraint refers to + + + Second geometry index the Constraint refers to + + + Position of second geometry index the Constraint refers to + + + + + + Third geometry index the Constraint refers to + + + + + + Position of third geometry index the Constraint refers to + + + Value of the Constraint @@ -40,5 +64,17 @@ + + + Driving Constraint + + + + + + Constraint in virtual space + + + diff --git a/src/Mod/Sketcher/App/ConstraintPyImp.cpp b/src/Mod/Sketcher/App/ConstraintPyImp.cpp index a9f9e15a7d..1a323fbfa1 100644 --- a/src/Mod/Sketcher/App/ConstraintPyImp.cpp +++ b/src/Mod/Sketcher/App/ConstraintPyImp.cpp @@ -542,6 +542,11 @@ void ConstraintPy::setFirst(Py::Long arg) #endif } +Py::Long ConstraintPy::getFirstPos(void) const +{ + return Py::Long(static_cast(this->getConstraintPtr()->FirstPos)); +} + Py::Long ConstraintPy::getSecond(void) const { return Py::Long(this->getConstraintPtr()->Second); @@ -556,6 +561,30 @@ void ConstraintPy::setSecond(Py::Long arg) #endif } +Py::Long ConstraintPy::getSecondPos(void) const +{ + return Py::Long(static_cast(this->getConstraintPtr()->SecondPos)); +} + +Py::Long ConstraintPy::getThird(void) const +{ + return Py::Long(this->getConstraintPtr()->Third); +} + +void ConstraintPy::setThird(Py::Long arg) +{ +#if PY_MAJOR_VERSION < 3 + this->getConstraintPtr()->Third = Py::Int(arg); +#else + this->getConstraintPtr()->Third = arg; +#endif +} + +Py::Long ConstraintPy::getThirdPos(void) const +{ + return Py::Long(static_cast(this->getConstraintPtr()->ThirdPos)); +} + Py::String ConstraintPy::getName(void) const { return Py::String(this->getConstraintPtr()->Name); @@ -571,6 +600,16 @@ Py::Float ConstraintPy::getValue(void) const return Py::Float(this->getConstraintPtr()->getValue()); } +Py::Boolean ConstraintPy::getDriving(void) const +{ + return Py::Boolean(this->getConstraintPtr()->isDriving); +} + +Py::Boolean ConstraintPy::getInVirtualSpace(void) const +{ + return Py::Boolean(this->getConstraintPtr()->isInVirtualSpace); +} + PyObject *ConstraintPy::getCustomAttributes(const char* /*attr*/) const { return 0;