0001207: Expose Standard_Boolean TopoDS_Shape::IsPartner(const TopoDS_Shape& other) const; to python

This commit is contained in:
wmayer
2013-08-10 11:36:26 +02:00
parent 8e928dc265
commit 1ede6a3b93
2 changed files with 25 additions and 3 deletions

View File

@@ -1142,7 +1142,7 @@ PyObject* TopoShapePy::isEqual(PyObject *args)
return NULL;
TopoDS_Shape shape = static_cast<TopoShapePy*>(pcObj)->getTopoShapePtr()->_Shape;
Standard_Boolean test = (getTopoShapePtr()->_Shape == shape);
Standard_Boolean test = (getTopoShapePtr()->_Shape.IsEqual(shape));
return Py_BuildValue("O", (test ? Py_True : Py_False));
}
@@ -1157,6 +1157,17 @@ PyObject* TopoShapePy::isSame(PyObject *args)
return Py_BuildValue("O", (test ? Py_True : Py_False));
}
PyObject* TopoShapePy::isPartner(PyObject *args)
{
PyObject *pcObj;
if (!PyArg_ParseTuple(args, "O!", &(TopoShapePy::Type), &pcObj))
return NULL;
TopoDS_Shape shape = static_cast<TopoShapePy*>(pcObj)->getTopoShapePtr()->_Shape;
Standard_Boolean test = getTopoShapePtr()->_Shape.IsPartner(shape);
return Py_BuildValue("O", (test ? Py_True : Py_False));
}
PyObject* TopoShapePy::isValid(PyObject *args)
{
if (!PyArg_ParseTuple(args, ""))