X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Edge.cpp;h=c4504272b3ccbea972eb5606d69f5288aab6da0a;hb=c57d2a7f1a57af01656e47e2e510990492404fce;hp=830fbb1b1ceac2fa867ea85ac0b3011820cc7814;hpb=95375993f1f35e4716475c0b0c8e265c082c875d;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Edge.cpp b/src/GeomAPI/GeomAPI_Edge.cpp index 830fbb1b1..c4504272b 100644 --- a/src/GeomAPI/GeomAPI_Edge.cpp +++ b/src/GeomAPI/GeomAPI_Edge.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include @@ -69,6 +70,18 @@ GeomAPI_Edge::GeomAPI_Edge(const std::shared_ptr& theShape) } } +void GeomAPI_Edge::vertices(std::shared_ptr& theStartVertex, + std::shared_ptr& theEndVertex) const +{ + const TopoDS_Edge& anEdge = impl(); + TopoDS_Vertex aStart, aEnd; + TopExp::Vertices(anEdge, aStart, aEnd); + theStartVertex.reset(new GeomAPI_Vertex); + theStartVertex->setImpl(new TopoDS_Vertex(aStart)); + theEndVertex.reset(new GeomAPI_Vertex); + theEndVertex->setImpl(new TopoDS_Vertex(aEnd)); +} + static Handle(Geom_Curve) baseCurve(const TopoDS_Edge& theEdge) { double aFirst, aLast;