-// 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_
#include "SketchAPI.h"
#include "SketchAPI_SketchEntity.h"
+
//--------------------------------------------------------------------------------------
class ModelHighAPI_Selection;
//--------------------------------------------------------------------------------------
/// 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
/// 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;
};
//! Pointer on Rectangle object