Part: Py API: add makeOffset2d method to Part.Shape
+ write documentation to makeOffsetShape
This commit is contained in:
@@ -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, ""))
|
||||
|
||||
Reference in New Issue
Block a user