- if (myType != CONSTRAINT_TANGENT_CIRCLE_LINE)
- return;
-
- ConstraintWrapperPtr aConstraint = myStorage->constraint(myBaseConstraint).front();
- AttributePtr aCircleCenter = aConstraint->entities().front()->baseAttribute();
- if (!aCircleCenter)
- return;
- FeaturePtr aCircle = ModelAPI_Feature::feature(aCircleCenter->owner());
- AttributeDoublePtr aRadius = std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(
- aCircle->attribute(SketchPlugin_Circle::RADIUS_ID()));
-
- if (fabs(aRadius->value()) == fabs(aConstraint->value()))
- return;
-
- aConstraint->setValue(aRadius->value());
-
- // Adjust the sign of constraint value
- BuilderPtr aBuilder = SketchSolver_Manager::instance()->builder();
- aBuilder->adjustConstraint(aConstraint);
- myStorage->addConstraint(myBaseConstraint, aConstraint);
+ if (myType == CONSTRAINT_TANGENT_CIRCLE_LINE) {
+ ConstraintWrapperPtr aConstraint = myStorage->constraint(myBaseConstraint).front();
+ AttributePtr aCircleCenter = aConstraint->entities().front()->baseAttribute();
+ if (!aCircleCenter)
+ return;
+ FeaturePtr aCircle = ModelAPI_Feature::feature(aCircleCenter->owner());
+ AttributeDoublePtr aRadius = std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(
+ aCircle->attribute(SketchPlugin_Circle::RADIUS_ID()));
+
+ if (fabs(aRadius->value()) == fabs(aConstraint->value()))
+ return;
+
+ aConstraint->setValue(aRadius->value());
+
+ // Adjust the sign of constraint value
+ BuilderPtr aBuilder = SketchSolver_Manager::instance()->builder();
+ aBuilder->adjustConstraint(aConstraint);
+ myStorage->addConstraint(myBaseConstraint, aConstraint);
+ }
+ else if (myType == CONSTRAINT_TANGENT_ARC_ARC) {
+ ConstraintWrapperPtr aConstraint = myStorage->constraint(myBaseConstraint).front();
+ if (isArcArcInternal != isInternalTangency(
+ aConstraint->entities().front(), aConstraint->entities().back())) {
+ // fully rebuld constraint, because it is unable to access attributes of PlaneGCS constraint
+ remove();
+ process();
+ }
+ }