+ implement TopoEdge.isSeam(face)
This commit is contained in:
parent
d6c8d6c62c
commit
af72ae09c1
|
@ -109,6 +109,11 @@ Part.show(s)
|
|||
<UserDocu>Splits the edge at the given parameter values and builds a wire out of it</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="isSeam">
|
||||
<Documentation>
|
||||
<UserDocu>isSeam(Face) - Checks whether the edge is a seam edge.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Attribute Name="Tolerance">
|
||||
<Documentation>
|
||||
<UserDocu>Set or get the tolerance of the vertex</UserDocu>
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user