+ implement TopoEdge.isSeam(face)

This commit is contained in:
wmayer
2016-04-28 11:08:28 +02:00
parent d6c8d6c62c
commit af72ae09c1
2 changed files with 27 additions and 0 deletions

View File

@@ -52,6 +52,7 @@
# include <TopoDS_Shape.hxx>
# include <TopoDS_Edge.hxx>
# include <TopoDS_Vertex.hxx>
# include <ShapeAnalysis_Edge.hxx>
# include <Standard_Failure.hxx>
#endif
@@ -628,6 +629,27 @@ PyObject* TopoShapeEdgePy::split(PyObject *args)
return 0;
}
PyObject* TopoShapeEdgePy::isSeam(PyObject *args)
{
PyObject* face;
if (!PyArg_ParseTuple(args, "O!", &TopoShapeFacePy::Type, &face))
return 0;
try {
const TopoDS_Edge& e = TopoDS::Edge(this->getTopoShapePtr()->_Shape);
const TopoDS_Face& f = TopoDS::Face(static_cast<TopoShapeFacePy*>(face)->getTopoShapePtr()->_Shape);
ShapeAnalysis_Edge sa;
Standard_Boolean ok = sa.IsSeam(e, f);
return PyBool_FromLong(ok ? 1 : 0);
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
PyErr_SetString(PartExceptionOCCError, e->GetMessageString());
return 0;
}
}
PyObject* TopoShapeEdgePy::setTolerance(PyObject *args)
{
double tol;