This commit adds getShape and setShape to TopoShape
This commit is contained in:
committed by
wmayer
parent
5a30a43862
commit
7f4a437cc2
@@ -65,7 +65,7 @@ int TopoShapeCompSolidPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) {
|
||||
if (PyObject_TypeCheck((*it).ptr(), &(Part::TopoShapeSolidPy::Type))) {
|
||||
const TopoDS_Shape& sh = static_cast<TopoShapePy*>((*it).ptr())->
|
||||
getTopoShapePtr()->_Shape;
|
||||
getTopoShapePtr()->getShape();
|
||||
if (!sh.IsNull())
|
||||
builder.Add(Comp, sh);
|
||||
}
|
||||
@@ -77,7 +77,7 @@ int TopoShapeCompSolidPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
return -1;
|
||||
}
|
||||
|
||||
getTopoShapePtr()->_Shape = Comp;
|
||||
getTopoShapePtr()->setShape(Comp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -88,11 +88,11 @@ PyObject* TopoShapeCompSolidPy::add(PyObject *args)
|
||||
return NULL;
|
||||
|
||||
BRep_Builder builder;
|
||||
TopoDS_Shape& comp = getTopoShapePtr()->_Shape;
|
||||
TopoDS_Shape comp = getTopoShapePtr()->getShape();
|
||||
|
||||
try {
|
||||
const TopoDS_Shape& sh = static_cast<TopoShapePy*>(obj)->
|
||||
getTopoShapePtr()->_Shape;
|
||||
getTopoShapePtr()->getShape();
|
||||
if (!sh.IsNull())
|
||||
builder.Add(comp, sh);
|
||||
else
|
||||
@@ -104,6 +104,8 @@ PyObject* TopoShapeCompSolidPy::add(PyObject *args)
|
||||
return 0;
|
||||
}
|
||||
|
||||
getTopoShapePtr()->setShape(comp);
|
||||
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user