/// Constructor with values
SKETCHAPI_EXPORT
SketchAPI_Rectangle(const std::shared_ptr<ModelAPI_Feature> & theFeature,
- double theX1, double theY1, double theX2, double theY2);
+ double theX1, double theY1, double theX2, double theY2, bool isFirstPointCenter = false);
/// 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> & theEndPoint);
+ const std::shared_ptr<GeomAPI_Pnt2d> & theFirstPoint,
+ const std::shared_ptr<GeomAPI_Pnt2d> & theEndPoint, bool isFirstPointCenter = false);
/// Destructor
SKETCHAPI_EXPORT
virtual ~SketchAPI_Rectangle();
- INTERFACE_3(SketchPlugin_Rectangle::ID(),
+ INTERFACE_4(SketchPlugin_Rectangle::ID(),
startPoint, SketchPlugin_Rectangle::START_ID(), GeomDataAPI_Point2D, /** Start point */,
- endPoint, SketchPlugin_Rectangle::END_ID(), GeomDataAPI_Point2D, /** End point */,
- linesList, SketchPlugin_Rectangle::LINES_LIST_ID(), ModelAPI_AttributeRefList, /** Lines list */
+ endPoint, SketchPlugin_Rectangle::END_ID(), GeomDataAPI_Point2D, /** End point */,
+ centerPoint, SketchPlugin_Rectangle::CENTER_ID(), GeomDataAPI_Point2D, /** Center point */,
+ linesList, SketchPlugin_Rectangle::LINES_LIST_ID(), ModelAPI_AttributeRefList, /** Lines list */
)
/// Set by coordinates
SKETCHAPI_EXPORT
- void setByCoordinates(double theX1, double theY1, double theX2, double theY2);
+ void setByCoordinates(double theX1, double theY1, double theX2, double theY2, bool isFirstPointCenter);
/// 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, bool isFirstPointCenter);
/// List of lines composing rectangle
SKETCHAPI_EXPORT std::list<std::shared_ptr<SketchAPI_SketchEntity> > lines() const;