X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Edge.cpp;h=2edd787d94d9333de94d9ede8eaa99081c756b36;hb=ced1c42d80f02b1efa749ecdf35e620dcca4d9cc;hp=f9572daa79949e4da668fc374466dc078f598de2;hpb=09f9000bc67f25c2a0b2140ee576a58221246920;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Edge.cpp b/src/GeomAPI/GeomAPI_Edge.cpp index f9572daa7..2edd787d9 100644 --- a/src/GeomAPI/GeomAPI_Edge.cpp +++ b/src/GeomAPI/GeomAPI_Edge.cpp @@ -131,6 +131,8 @@ std::shared_ptr GeomAPI_Edge::line() bool GeomAPI_Edge::isEqual(const std::shared_ptr theEdge) const { + if (!theEdge.get() || ! theEdge->isEdge()) + return false; const TopoDS_Shape& aMyShape = const_cast(this)->impl(); const TopoDS_Shape& aInShape = theEdge->impl(); @@ -164,3 +166,9 @@ bool GeomAPI_Edge::isEqual(const std::shared_ptr theEdge) const return true; } + +void GeomAPI_Edge::getRange(double& theFirst, double& theLast) const +{ + const TopoDS_Shape& aShape = const_cast(this)->impl(); + Handle(Geom_Curve) aCurve = BRep_Tool::Curve((const TopoDS_Edge&)aShape, theFirst, theLast); +}