+ ->setValue(aCenter2d->x() + aMinorDir2d->x() * aMinorRadius,
+ aCenter2d->y() + aMinorDir2d->y() * aMinorRadius);
+
+ if (aEndPointAttr->isInitialized()) {
+ // recalculate REVERSED flag
+ std::shared_ptr<GeomAPI_Ellipse2d> anEllipseForArc(
+ new GeomAPI_Ellipse2d(aCenter2d, aMajorDir2d, aMajorRadius, aMinorRadius));
+ GeomPnt2dPtr anEnd = aEndPointAttr->pnt();
+ std::shared_ptr<GeomAPI_Pnt2d> aProjection = anEllipseForArc->project(anEnd);
+ double aParamStart = 0.0, aParamEnd = 0.0;
+ if (aProjection && anEnd->distance(aProjection) <= tolerance &&
+ anEllipseForArc->parameter(anEnd, paramTolerance, aParamEnd)) {
+ // do not recalculate REVERSED flag if the arc is not consistent
+ anEllipseForArc->parameter(aStart2d, paramTolerance, aParamStart);
+ aParamEnd -= aParamStart;
+
+ if (myParamDelta >= 0.0 && myParamDelta <= PI * 0.5 &&
+ aParamEnd < 0.0 && aParamEnd >= -PI * 0.5) {
+ boolean(REVERSED_ID())->setValue(true);
+ }
+ else if (myParamDelta <= 0.0 && myParamDelta >= -PI * 0.5 &&
+ aParamEnd > 0.0 && aParamEnd <= PI * 0.5) {
+ boolean(REVERSED_ID())->setValue(false);
+ }
+ myParamDelta = aParamEnd;
+ }
+ }
+ data()->blockSendAttributeUpdated(aWasBlocked, false);