+ allow to use copy() method for a null shape

This commit is contained in:
wmayer 2014-03-15 13:05:06 +01:00
parent ea4abcb57a
commit 66819d9dfb

View File

@ -165,8 +165,10 @@ PyObject* TopoShapePy::copy(PyObject *args)
return 0; return 0;
} }
if (!shape.IsNull()) {
BRepBuilderAPI_Copy c(shape); BRepBuilderAPI_Copy c(shape);
static_cast<TopoShapePy*>(cpy)->getTopoShapePtr()->_Shape = c.Shape(); static_cast<TopoShapePy*>(cpy)->getTopoShapePtr()->_Shape = c.Shape();
}
return cpy; return cpy;
} }