Salome HOME
Fix for the Box With Fillet case from the "CEA Parametric" document.
[modules/shaper.git] / src / GeomAPI / GeomAPI_Edge.h
index efe22a76a46b9a07d36396b8b0ca98bf92a831f3..e2851f71b0c08f0390b0c42de2528aa415a7e4e0 100644 (file)
@@ -14,7 +14,8 @@
 // License along with this library; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 //
 
 #ifndef GeomAPI_Edge_H_
@@ -26,6 +27,7 @@ class GeomAPI_Pln;
 class GeomAPI_Pnt;
 class GeomAPI_Circ;
 class GeomAPI_Lin;
+class GeomAPI_Ellipse;
 
 /**\class GeomAPI_Edge
 * \ingroup DataModel
@@ -55,6 +57,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<GeomAPI_Pnt> firstPoint();
@@ -65,11 +71,15 @@ public:
 
   /// Returns a circle if edge is based on the circle curve
   GEOMAPI_EXPORT
-  std::shared_ptr<GeomAPI_Circ> circle();
+  std::shared_ptr<GeomAPI_Circ> circle() const;
+
+  /// Returns an ellipse if edge is based on the ellipse curve
+  GEOMAPI_EXPORT
+  std::shared_ptr<GeomAPI_Ellipse> ellipse() const;
 
   /// Returns a line if edge is based on the linear curve
   GEOMAPI_EXPORT
-  std::shared_ptr<GeomAPI_Lin> line();
+  std::shared_ptr<GeomAPI_Lin> line() const;
 
   /// Returns true if the current edge is geometrically equal to the given edge
   GEOMAPI_EXPORT
@@ -80,13 +90,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<GeomAPI_Pln> 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<GeomAPI_Pln> thePlane,
+                          std::list<std::shared_ptr<GeomAPI_Pnt> >& 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<GeomAPI_Pnt> middlePoint() const;
 };
 
+//! Pointer on object
+typedef std::shared_ptr<GeomAPI_Edge> GeomEdgePtr;
+
 #endif