X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Edge.h;h=9d3a4f47b9ae1fe26df16c724cd795a5386c2d27;hb=95375993f1f35e4716475c0b0c8e265c082c875d;hp=44c76df82e306eee106ff9722afff13c6f81d00c;hpb=5c59bf6725e7e4855b5ca956475d705e2d5b014c;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Edge.h b/src/GeomAPI/GeomAPI_Edge.h index 44c76df82..9d3a4f47b 100644 --- a/src/GeomAPI/GeomAPI_Edge.h +++ b/src/GeomAPI/GeomAPI_Edge.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2019 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -12,10 +12,9 @@ // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or -// email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #ifndef GeomAPI_Edge_H_ @@ -27,6 +26,7 @@ class GeomAPI_Pln; class GeomAPI_Pnt; class GeomAPI_Circ; class GeomAPI_Lin; +class GeomAPI_Ellipse; /**\class GeomAPI_Edge * \ingroup DataModel @@ -44,6 +44,10 @@ public: GEOMAPI_EXPORT GeomAPI_Edge(const std::shared_ptr& theShape); + /// Returns \c true if edges have same underlying curve + GEOMAPI_EXPORT + virtual bool isSameGeometry(const std::shared_ptr theShape) const; + /// Verifies that the edge is a line GEOMAPI_EXPORT bool isLine() const; @@ -56,6 +60,10 @@ public: GEOMAPI_EXPORT bool isArc() const; + /// Verifies that the edge is an arc of circle + GEOMAPI_EXPORT + bool isEllipse() const; + /// Returns the first vertex coordinates of the edge GEOMAPI_EXPORT std::shared_ptr firstPoint(); @@ -66,11 +74,15 @@ public: /// Returns a circle if edge is based on the circle curve GEOMAPI_EXPORT - std::shared_ptr circle(); + std::shared_ptr circle() const; + + /// Returns an ellipse if edge is based on the ellipse curve + GEOMAPI_EXPORT + std::shared_ptr ellipse() const; /// Returns a line if edge is based on the linear curve GEOMAPI_EXPORT - std::shared_ptr line(); + std::shared_ptr line() const; /// Returns true if the current edge is geometrically equal to the given edge GEOMAPI_EXPORT @@ -81,13 +93,41 @@ public: void getRange(double& theFirst, double& theLast) const; /// Returns true, if the edge is fully placed in the specified plane + /// \param thePlane a plane for intersection GEOMAPI_EXPORT bool isInPlane(const std::shared_ptr thePlane) const; + /// Returns list of intersection points if the edge has intersections with the given plane + /// \param thePlane a plane for intersection + GEOMAPI_EXPORT + void intersectWithPlane(const std::shared_ptr thePlane, + std::list >& theResult) const; + /// Returns edge length. GEOMAPI_EXPORT double length() const; + + /// Returns true if the edge is closed (like full circle) + GEOMAPI_EXPORT + bool isClosed() const; + + /// Returns true if the edge is degenerated (has no 3D curve) + GEOMAPI_EXPORT + bool isDegenerated() const; + + GEOMAPI_EXPORT + void setFirstPointTolerance(const double theTolerance); + + GEOMAPI_EXPORT + void setLastPointTolerance(const double theTolerance); + + /// Return middle point on the edge + GEOMAPI_EXPORT + virtual std::shared_ptr middlePoint() const; }; +//! Pointer on object +typedef std::shared_ptr GeomEdgePtr; + #endif