20 #ifndef SRC_SKETCHAPI_SKETCHAPI_RECTANGLE_H_
21 #define SRC_SKETCHAPI_SKETCHAPI_RECTANGLE_H_
24 #include "SketchAPI.h"
26 #include "SketchAPI_SketchEntity.h"
45 double theX1,
double theY1,
46 double theX2,
double theY2,
47 bool theCreateByCenterAndCorner =
false);
51 const std::shared_ptr<GeomAPI_Pnt2d> & thePoint1,
52 const std::shared_ptr<GeomAPI_Pnt2d> & thePoint2,
53 bool theCreateByCenterAndCorner =
false);
61 INTERFACE_7(
"SketchRectangle",
80 void setByCoordinates(
double theX1,
double theY1,
double theX2,
double theY2);
90 double theCenterX,
double theCenterY,
91 double theCornerX,
double theCornerY
104 SKETCHAPI_EXPORT std::shared_ptr<
SketchAPI_Point> centerSketchPoint() const;
2D point defined by two coordinates
Definition: GeomAPI_Pnt2d.h:36
Attribute that contains 2D point coordinates.
Definition: GeomDataAPI_Point2D.h:37
Attribute that contains reference to an attribute of a feature or reference to a feature (switchable)
Definition: ModelAPI_AttributeRefAttr.h:33
Attribute that contains list of references to features (located in the same document).
Definition: ModelAPI_AttributeRefList.h:33
API for the attribute that contains std (null terminated) string.
Definition: ModelAPI_AttributeString.h:33
Class for filling ModelAPI_AttributeSelection.
Definition: ModelHighAPI_Selection.h:49
Interface for Point feature.
Definition: SketchAPI_Point.h:39
Interface for Rectangle feature.
Definition: SketchAPI_Rectangle.h:37
virtual std::shared_ptr< GeomDataAPI_Point2D > centerPoint() const
Center point.
Definition: SketchAPI_Rectangle.h:76
SketchAPI_Rectangle(const std::shared_ptr< ModelAPI_Feature > &theFeature)
Constructor without values.
Definition: SketchAPI_Rectangle.cpp:30
std::list< std::shared_ptr< SketchAPI_SketchEntity > > lines() const
List of lines composing rectangle.
Definition: SketchAPI_Rectangle.cpp:100
virtual std::shared_ptr< ModelAPI_AttributeRefAttr > centerPointRef() const
Reference to center point.
Definition: SketchAPI_Rectangle.h:76
virtual std::shared_ptr< ModelAPI_AttributeRefList > linesList() const
Lines list.
Definition: SketchAPI_Rectangle.h:76
void setByCenterAndCornerCoords(double theCenterX, double theCenterY, double theCornerX, double theCornerY)
Set by coordinates.
Definition: SketchAPI_Rectangle.cpp:78
void setByPoints(const std::shared_ptr< GeomAPI_Pnt2d > &theFirstPoint, const std::shared_ptr< GeomAPI_Pnt2d > &theSecondPoint)
Set by points.
Definition: SketchAPI_Rectangle.cpp:69
void setByCenterAndCornerPoints(const std::shared_ptr< GeomAPI_Pnt2d > &theCenterPoint, const std::shared_ptr< GeomAPI_Pnt2d > &theCornerPoint)
Set by points.
Definition: SketchAPI_Rectangle.cpp:88
void setByCoordinates(double theX1, double theY1, double theX2, double theY2)
Set by coordinates.
Definition: SketchAPI_Rectangle.cpp:60
virtual ~SketchAPI_Rectangle()=default
Destructor.
virtual std::shared_ptr< GeomDataAPI_Point2D > startPoint() const
Start point.
Definition: SketchAPI_Rectangle.h:76
virtual std::shared_ptr< ModelAPI_AttributeString > type() const
Creation type of rectangle.
Definition: SketchAPI_Rectangle.h:76
virtual std::shared_ptr< GeomDataAPI_Point2D > cornerPoint() const
Corner point.
Definition: SketchAPI_Rectangle.h:76
virtual std::shared_ptr< GeomDataAPI_Point2D > endPoint() const
End point.
Definition: SketchAPI_Rectangle.h:76
Base class for Sketch feature interfaces.
Definition: SketchAPI_SketchEntity.h:38