From fe0180d6b32f46e83f97b4fad201ce5417bd924c Mon Sep 17 00:00:00 2001 From: Sebastian Hoogen Date: Sun, 2 Mar 2014 00:37:04 +0100 Subject: [PATCH] parse keyword arguments in Part::TopoShapePy::makeOffsetShape --- src/Mod/Part/App/TopoShapePy.xml | 2 +- src/Mod/Part/App/TopoShapePyImp.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Mod/Part/App/TopoShapePy.xml b/src/Mod/Part/App/TopoShapePy.xml index cf2351692..93a21ab4b 100644 --- a/src/Mod/Part/App/TopoShapePy.xml +++ b/src/Mod/Part/App/TopoShapePy.xml @@ -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. - + Offset a given shape diff --git a/src/Mod/Part/App/TopoShapePyImp.cpp b/src/Mod/Part/App/TopoShapePyImp.cpp index a5aa02bba..b1be1a603 100644 --- a/src/Mod/Part/App/TopoShapePyImp.cpp +++ b/src/Mod/Part/App/TopoShapePyImp.cpp @@ -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; PyObject* inter = Py_False; PyObject* self_inter = Py_False; PyObject* fill = Py_False; 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, &(PyBool_Type), &inter, &(PyBool_Type), &self_inter,