-void SketchAPI_MacroEllipse::initializePoints(
- const std::shared_ptr<GeomAPI_Pnt2d>& theMajorAxisPoint1,
- const ModelHighAPI_RefAttr& theMajorAxisPoint1Ref,
- const std::shared_ptr<GeomAPI_Pnt2d>& theMajorAxisPoint2,
- const ModelHighAPI_RefAttr& theMajorAxisPoint2Ref,
+void SketchAPI_MacroEllipse::setByCenterAndPassedPoints(
+ const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
+ const ModelHighAPI_RefAttr& theCenterRef,
+ const std::shared_ptr<GeomAPI_Pnt2d>& theMajorAxisPoint,
+ const ModelHighAPI_RefAttr& theMajorAxisPointRef,
+ const std::shared_ptr<GeomAPI_Pnt2d>& thePassedPoint,
+ const ModelHighAPI_RefAttr& thePassedPointRef)
+{
+ fillAttribute(SketchPlugin_MacroEllipse::ELLIPSE_TYPE_BY_CENTER_AXIS_POINT(), myellipseType);
+
+ AttributePoint2DPtr aCenterAttr = POINT_ATTR(SketchPlugin_MacroEllipse::CENTER_POINT_ID());
+ AttributePoint2DPtr aMajorAxisAttr = POINT_ATTR(SketchPlugin_MacroEllipse::MAJOR_AXIS_POINT_ID());
+ AttributePoint2DPtr aPassedAttr = POINT_ATTR(SketchPlugin_MacroEllipse::PASSED_POINT_ID());
+
+ AttributeRefAttrPtr aCenterRef = POINT_REF(SketchPlugin_MacroEllipse::CENTER_POINT_REF_ID());
+ AttributeRefAttrPtr aMajorAxisRef =
+ POINT_REF(SketchPlugin_MacroEllipse::MAJOR_AXIS_POINT_REF_ID());
+ AttributeRefAttrPtr aPassedRef = POINT_REF(SketchPlugin_MacroEllipse::PASSED_POINT_REF_ID());
+
+ fillAttribute(theCenter, theCenterRef, aCenterAttr, aCenterRef);
+ fillAttribute(theMajorAxisPoint, theMajorAxisPointRef, aMajorAxisAttr, aMajorAxisRef);
+ fillAttribute(thePassedPoint, thePassedPointRef, aPassedAttr, aPassedRef);
+
+ storeSketch(feature());
+ execute();
+}
+
+void SketchAPI_MacroEllipse::setByMajorAxisAndPassedPoint(
+ const std::shared_ptr<GeomAPI_Pnt2d>& theMajorAxisStart,
+ const ModelHighAPI_RefAttr& theMajorAxisStartRef,
+ const std::shared_ptr<GeomAPI_Pnt2d>& theMajorAxisEnd,
+ const ModelHighAPI_RefAttr& theMajorAxisEndRef,