]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for complementary angle constraint (incorrect calculation of direct angle)
authorazv <azv@opencascade.com>
Thu, 1 Sep 2016 05:16:35 +0000 (08:16 +0300)
committerazv <azv@opencascade.com>
Thu, 1 Sep 2016 05:16:55 +0000 (08:16 +0300)
src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp

index 219f684ea2aeca6220f056803d81620050890507..65ac80b153e411cd4d5bc41688e6db99bc5074fd 100644 (file)
@@ -228,8 +228,9 @@ void SketchPlugin_ConstraintAngle::updateConstraintValueByAngleValue()
   /// an angle value should be corrected by the current angle type
   aValueAttr = std::dynamic_pointer_cast<
                   ModelAPI_AttributeDouble>(data()->attribute(SketchPlugin_Constraint::VALUE()));
-  bool isObtuse = aValueAttr->isInitialized() && aValueAttr->value() > 180.0;
-  anAngle = getAngleForType(anAngle, isObtuse);
+  if (!aValueAttr->isInitialized())
+    calculateAngle();
+  anAngle = getAngleForType(anAngle, aValueAttr->value() > 180.0);
   aValueAttr->setValue(anAngle);
 }
 
index 2b83759b82ce4ddada533dfc4b174cd4e76e36bb..6619c372b526ead79c3d01ea0a8455e881b0bb08 100644 (file)
@@ -428,8 +428,8 @@ void PlaneGCSSolver_Storage::processArc(const EntityWrapperPtr& theArc)
     *aEndAngle += anAngle;
   }
 
-  // no need to constraint a fixed or a copied arc
-  if (theArc->group() == GID_OUTOFGROUP || anArcFeature->isCopy())
+  // no need to constraint a copied arc
+  if (anArcFeature->isCopy())
     return;
   // No need to add constraints if they are already exist
   std::map<EntityWrapperPtr, std::vector<GCSConstraintPtr> >::const_iterator