Salome HOME
oubli
[modules/shaper.git] / src / SketchAPI / SketchAPI_ConstraintAngle.cpp
index 4f5eedf235d63b2a44b9977a4256a1ce68f90d09..560ac324d46a4d263ca783bfe6ffe0f2cffb8f05 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2019  CEA/DEN, EDF R&D
+// Copyright (C) 2019-2022  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -115,6 +115,8 @@ static std::string angleTypeToString(FeaturePtr theFeature)
       aType = THE_ANGLE_SUPPLEMENTARY;
     else if (aBackwardDiff < aDirectDiff && aBackwardDiff < aComplementaryDiff)
       aType = THE_ANGLE_BACKWARD;
+    else
+      aType = THE_ANGLE_DIRECT;
   }
   return aType;
 }
@@ -129,7 +131,8 @@ void SketchAPI_ConstraintAngle::dump(ModelHighAPI_Dumper& theDumper) const
   FeaturePtr aBase = feature();
 
   const std::string& aSketchName = theDumper.parentName(aBase);
-  theDumper << aBase << " = " << aSketchName << "." << "setAngle(";
+  theDumper.name(aBase, false, true, true); // mark constraint as dumped
+  theDumper << aSketchName << "." << "setAngle(";
 
   bool isFirstAttr = true;
   for (int i = 0; i < CONSTRAINT_ATTR_SIZE; ++i) {