Salome HOME
Task 2.12. New entities: ellipses and arcs of ellipses (issue #3003)
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_MacroEllipse.cpp
index f46286af69e6be9d1e958e4a344074d122f5a71b..0b5ecf95c263b582edce9defe56443857e790a3b 100644 (file)
@@ -122,7 +122,8 @@ void SketchPlugin_MacroEllipse::attributeChanged(const std::string& theID)
 
       AttributeRefAttrPtr aPointRef = refattr(aPointRefName[aPntIndex]);
       // calculate ellipse parameters
-      GeomPnt2dPtr aPassedPoint;
+      GeomPnt2dPtr aPassedPoint =
+          std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aPointAttr)->pnt();
       GeomShapePtr aTangentCurve;
       SketchPlugin_Tools::convertRefAttrToPointOrTangentCurve(
         aPointRef, aPointAttr, aTangentCurve, aPassedPoint);
@@ -165,9 +166,6 @@ void SketchPlugin_MacroEllipse::attributeChanged(const std::string& theID)
     AttributeDoublePtr aMinorRadiusAttr = real(MINOR_RADIUS_ID());
 
     bool aWasBlocked = data()->blockSendAttributeUpdated(true);
-    // center attribute is used in processEvent() to set reference to reentrant arc
-////    std::dynamic_pointer_cast<GeomDataAPI_Point2D>(attribute(FIRST_POINT_ID()))
-////        ->setValue(myCenter);
     aMajorRadiusAttr->setValue(myMajorRadius);
     aMinorRadiusAttr->setValue(myMinorRadius);
     data()->blockSendAttributeUpdated(aWasBlocked, false);