Part: Py API: add makeOffset2d method to Part.Shape

+ write documentation to makeOffsetShape
This commit is contained in:
DeepSOIC
2016-09-02 00:35:06 +03:00
committed by wmayer
parent 5462fe60e7
commit d4fc0becd7
2 changed files with 76 additions and 1 deletions

View File

@@ -1453,6 +1453,32 @@ PyObject* TopoShapePy::makeOffsetShape(PyObject *args, PyObject *keywds)
}
}
PyObject* TopoShapePy::makeOffset2D(PyObject *args, PyObject *keywds)
{
static char *kwlist[] = {"offset", "join", "fill", "openResult", "intersection", NULL};
double offset;
PyObject* fill = Py_False;
PyObject* openResult = Py_False;
PyObject* inter = Py_False;
short join = 0;
if (!PyArg_ParseTupleAndKeywords(args, keywds, "d|hO!O!O!", kwlist,
&offset,
&join,
&(PyBool_Type), &fill,
&(PyBool_Type), &openResult,
&(PyBool_Type), &inter))
return 0;
try {
TopoDS_Shape resultShape = this->getTopoShapePtr()->makeOffset2D(offset, join,
PyObject_IsTrue(fill) ? true : false,
PyObject_IsTrue(openResult) ? true : false,
PyObject_IsTrue(inter) ? true : false);
return new_reference_to(shape2pyshape(resultShape));
}
PY_CATCH_OCC;
}
PyObject* TopoShapePy::reverse(PyObject *args)
{
if (!PyArg_ParseTuple(args, ""))