0001264: add function Sketch.setConstruction()
This commit is contained in:
@@ -99,6 +99,23 @@ PyObject* SketchObjectPy::toggleConstruction(PyObject *args)
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
PyObject* SketchObjectPy::setConstruction(PyObject *args)
|
||||
{
|
||||
int Index;
|
||||
PyObject *Mode;
|
||||
if (!PyArg_ParseTuple(args, "iO!", &Index, &PyBool_Type, &Mode))
|
||||
return 0;
|
||||
|
||||
if (this->getSketchObjectPtr()->setConstruction(Index, PyObject_IsTrue(Mode) ? true : false)) {
|
||||
std::stringstream str;
|
||||
str << "Not able to set construction mode of a geometry with the given index: " << Index;
|
||||
PyErr_SetString(PyExc_ValueError, str.str().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
PyObject* SketchObjectPy::addConstraint(PyObject *args)
|
||||
{
|
||||
PyObject *pcObj;
|
||||
|
||||
Reference in New Issue
Block a user