Salome HOME
[bos #20476][EDF] 22546 - sigsegv with offset. Add approximation checkbox.
[modules/shaper.git] / src / SketchAPI / SketchAPI_Rectangle.h
index b9fe8fced01cea8cf62f0b39a67c34861c4cf269..3f3242c7f27033832af5e6eea8e8ec22f15f430c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2022  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
 //
 // 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<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #ifndef SRC_SKETCHAPI_SKETCHAPI_RECTANGLE_H_
@@ -25,6 +24,7 @@
 #include "SketchAPI.h"
 
 #include "SketchAPI_SketchEntity.h"
+
 //--------------------------------------------------------------------------------------
 class ModelHighAPI_Selection;
 //--------------------------------------------------------------------------------------
@@ -45,16 +45,27 @@ public:
   /// Constructor with values
   SKETCHAPI_EXPORT
   SketchAPI_Rectangle(const std::shared_ptr<ModelAPI_Feature> & theFeature,
-                      const std::shared_ptr<GeomAPI_Pnt2d> & theStartPoint,
+                      const std::shared_ptr<GeomAPI_Pnt2d> & theFirstPoint,
                       const std::shared_ptr<GeomAPI_Pnt2d> & theEndPoint);
   /// Destructor
   SKETCHAPI_EXPORT
   virtual ~SketchAPI_Rectangle();
 
-  INTERFACE_3("SketchRectangle",
-              startPoint, "RectStartPoint", GeomDataAPI_Point2D, /** Start point */,
-              endPoint, "RectEndPoint", GeomDataAPI_Point2D, /** End point */,
-              linesList, "RectangleList", ModelAPI_AttributeRefList, /** Lines list */
+  INTERFACE_7("SketchRectangle",
+              type, "RectangleType", ModelAPI_AttributeString,
+              /** Creation type of rectangle */,
+              startPoint, "RectStartPoint", GeomDataAPI_Point2D,
+              /** Start point */,
+              endPoint, "RectEndPoint", GeomDataAPI_Point2D,
+              /** End point */,
+              centerPoint, "RectCenterPoint", GeomDataAPI_Point2D,
+              /** Center point */,
+              centerPointRef, "RectCenterPointRef", ModelAPI_AttributeRefAttr,
+              /** Reference to center point */,
+              cornerPoint, "RectCornerPoint", GeomDataAPI_Point2D,
+              /** Corner point */,
+              linesList, "RectangleList", ModelAPI_AttributeRefList,
+              /** Lines list */
   )
 
   /// Set by coordinates
@@ -63,8 +74,8 @@ public:
 
   /// Set by points
   SKETCHAPI_EXPORT
-  void setByPoints(const std::shared_ptr<GeomAPI_Pnt2d> & theStartPoint,
-                   const std::shared_ptr<GeomAPI_Pnt2d> & theEndPoint);
+  void setByPoints(const std::shared_ptr<GeomAPI_Pnt2d> & theFirstPoint,
+                   const std::shared_ptr<GeomAPI_Pnt2d> & theSecondPoint);
 
   /// List of lines composing rectangle
   SKETCHAPI_EXPORT std::list<std::shared_ptr<SketchAPI_SketchEntity> > lines() const;