Sketcher: Expose mass datum commands to python
This commit is contained in:
committed by
Yorik van Havre
parent
2c41e70c91
commit
fe78c1a037
@@ -98,6 +98,16 @@
|
||||
<UserDocu>set the Driving status of a datum constraint</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setDatumsDriving">
|
||||
<Documentation>
|
||||
<UserDocu>set the Driving status of datum constraints</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="moveDatumsToEnd">
|
||||
<Documentation>
|
||||
<UserDocu>Moves all datum constraints to the end of the constraint list</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getDriving">
|
||||
<Documentation>
|
||||
<UserDocu>Get the Driving status of a datum constraint</UserDocu>
|
||||
|
||||
@@ -727,6 +727,40 @@ PyObject* SketchObjectPy::setDriving(PyObject *args)
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
PyObject* SketchObjectPy::setDatumsDriving(PyObject *args)
|
||||
{
|
||||
PyObject* driving;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "O!", &PyBool_Type, &driving))
|
||||
return 0;
|
||||
|
||||
if (this->getSketchObjectPtr()->setDatumsDriving(PyObject_IsTrue(driving) ? true : false)) {
|
||||
std::stringstream str;
|
||||
str << "Not able set all dimensionals driving/refernce";
|
||||
PyErr_SetString(PyExc_ValueError, str.str().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
PyObject* SketchObjectPy::moveDatumsToEnd(PyObject *args)
|
||||
{
|
||||
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return 0;
|
||||
|
||||
if (this->getSketchObjectPtr()->moveDatumsToEnd()) {
|
||||
std::stringstream str;
|
||||
str << "Not able move all dimensionals to end";
|
||||
PyErr_SetString(PyExc_ValueError, str.str().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
|
||||
PyObject* SketchObjectPy::getDriving(PyObject *args)
|
||||
{
|
||||
int constrid;
|
||||
|
||||
Reference in New Issue
Block a user