Adds extend feature to Mod/Sketcher

Fixes #1187
This commit is contained in:
Alexander Lin
2017-05-24 01:30:41 -07:00
committed by wmayer
parent 2ea961f490
commit c51d0b4e16
8 changed files with 393 additions and 0 deletions

View File

@@ -823,6 +823,26 @@ PyObject* SketchObjectPy::trim(PyObject *args)
Py_Return;
}
PyObject* SketchObjectPy::extend(PyObject *args)
{
double increment;
int endPoint;
int GeoId;
if (PyArg_ParseTuple(args, "idi", &GeoId, &increment, &endPoint)) {
if (this->getSketchObjectPtr()->extend(GeoId, increment, endPoint)) {
std::stringstream str;
str << "Not able to extend geometry with id : (" << GeoId << ") for increment (" << increment << ") and point position (" << endPoint << ")";
PyErr_SetString(PyExc_ValueError, str.str().c_str());
return 0;
}
}
Py_Return;
PyErr_SetString(PyExc_TypeError, "extend() method accepts:\n"
"-- int,float,int\n");
}
PyObject* SketchObjectPy::addSymmetric(PyObject *args)
{
PyObject *pcObj;