+ fix Part.__sortEdges__, check for object type in Part.Wire

This commit is contained in:
wmayer
2015-04-10 18:25:31 +02:00
parent 0c32b1b0ec
commit b3cbf2b3da
2 changed files with 9 additions and 0 deletions

View File

@@ -107,6 +107,11 @@ int TopoShapeWirePy::PyInit(PyObject* args, PyObject* /*kwd*/)
PyErr_Clear();
if (PyArg_ParseTuple(args, "O", &pcObj)) {
if(!Py::Object(pcObj).isList() && !Py::Object(pcObj).isTuple()) {
PyErr_SetString(PyExc_TypeError, "object is neither a list nor a tuple");
return -1;
}
BRepBuilderAPI_MakeWire mkWire;
Py::Sequence list(pcObj);
for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) {