#include "SketchAPI_Rectangle.h"
//--------------------------------------------------------------------------------------
#include <GeomAPI_Pnt2d.h>
+#include "SketchAPI_Point.h"
//--------------------------------------------------------------------------------------
#include <ModelHighAPI_Selection.h>
#include <ModelHighAPI_Tools.h>
}
SketchAPI_Rectangle::SketchAPI_Rectangle(const std::shared_ptr<ModelAPI_Feature> & theFeature,
- double theX1, double theY1,
+ double theX1, double theY1,
double theX2, double theY2,
bool theCreateByCenterAndCorner)
: SketchAPI_SketchEntity(theFeature)
}
}
-SketchAPI_Rectangle::~SketchAPI_Rectangle()
-{
-}
-
//--------------------------------------------------------------------------------------
void SketchAPI_Rectangle::setByCoordinates(
double theX1, double theY1, double theX2, double theY2)
}
void SketchAPI_Rectangle::setByCenterAndCornerCoords(
- double theCenterX, double theCenterY,
+ double theCenterX, double theCenterY,
double theCornerX, double theCornerY
) {
fillAttribute("RectangleTypeCentered", type());
aFeatures.push_back(ModelAPI_Feature::feature(*anIt));
return SketchAPI_SketchEntity::wrap(aFeatures);
}
+
+std::shared_ptr<SketchAPI_Point> SketchAPI_Rectangle::centerSketchPoint() const
+{
+ auto aFeature = ModelAPI_Feature::feature(centerPointRef()->object());
+ return std::shared_ptr<SketchAPI_Point>(new SketchAPI_Point(aFeature));
+}