parse keyword arguments in Part::TopoShapePy::makeOffsetShape

This commit is contained in:
Sebastian Hoogen 2014-03-02 00:37:04 +01:00 committed by wmayer
parent c50b29004e
commit fe0180d6b3
2 changed files with 4 additions and 3 deletions

View File

@ -228,7 +228,7 @@ which are to be removed. The remaining faces of the solid become the walls of
the hollowed solid, their thickness defined at the time of construction.</UserDocu> the hollowed solid, their thickness defined at the time of construction.</UserDocu>
</Documentation> </Documentation>
</Methode> </Methode>
<Methode Name="makeOffsetShape" Const="true"> <Methode Name="makeOffsetShape" Const="true" Keyword="true">
<Documentation> <Documentation>
<UserDocu>Offset a given shape</UserDocu> <UserDocu>Offset a given shape</UserDocu>
</Documentation> </Documentation>

View File

@ -1059,14 +1059,15 @@ PyObject* TopoShapePy::makeThickness(PyObject *args)
} }
} }
PyObject* TopoShapePy::makeOffsetShape(PyObject *args) PyObject* TopoShapePy::makeOffsetShape(PyObject *args, PyObject *keywds)
{ {
static char *kwlist[] = {"offset", "tolerance", "inter", "self_inter", "offsetMode", "join", "fill", NULL};
double offset, tolerance; double offset, tolerance;
PyObject* inter = Py_False; PyObject* inter = Py_False;
PyObject* self_inter = Py_False; PyObject* self_inter = Py_False;
PyObject* fill = Py_False; PyObject* fill = Py_False;
short offsetMode = 0, join = 0; short offsetMode = 0, join = 0;
if (!PyArg_ParseTuple(args, "dd|O!O!hhO!", if (!PyArg_ParseTupleAndKeywords(args, keywds, "dd|O!O!hhO!", kwlist,
&offset, &tolerance, &offset, &tolerance,
&(PyBool_Type), &inter, &(PyBool_Type), &inter,
&(PyBool_Type), &self_inter, &(PyBool_Type), &self_inter,