Part: [skip ci] allow to create empty shapes of each type

This commit is contained in:
wmayer
2020-10-16 17:08:49 +02:00
parent d61a06e3b3
commit 12577acc40
8 changed files with 56 additions and 1 deletions

View File

@@ -85,6 +85,13 @@ PyObject *TopoShapeWirePy::PyMake(struct _typeobject *, PyObject *, PyObject *)
// constructor method
int TopoShapeWirePy::PyInit(PyObject* args, PyObject* /*kwd*/)
{
if (PyArg_ParseTuple(args, "")) {
// Undefined Wire
getTopoShapePtr()->setShape(TopoDS_Wire());
return 0;
}
PyErr_Clear();
PyObject *pcObj;
if (PyArg_ParseTuple(args, "O!", &(Part::TopoShapePy::Type), &pcObj)) {
BRepBuilderAPI_MakeWire mkWire;