]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/PythonAPI/model/dump/DumpAssistant.py
Salome HOME
Dump Python in the High Level Parameterized Geometry API (issue #1648)
[modules/shaper.git] / src / PythonAPI / model / dump / DumpAssistant.py
index 7585d92396b2a0c8e49990f420c514066bd0cb1f..7aa341b985b3ca003b44d6bae68a39baed9ca824 100644 (file)
@@ -4,6 +4,7 @@
 import ModelHighAPI
 
 import ModelAPI
+import SketchAPI
 
 import sys
 import inspect
@@ -43,6 +44,10 @@ class DumpAssistant(ModelHighAPI.ModelHighAPI_Dumper):
                 self.myFeatures[aFeatureKind](theFeature).dump(self)
             else:
                 self.name(theFeature)
+        else:
+            # Probably the feature is a constraint, try to dump it with SketchAPI_Constraint.
+            # In case of theFeature is not a constraint, it will not be dumped.
+            self.myFeatures[SketchAPI.SketchAPI_Constraint.ID()](theFeature).dump(self)
 
     ## Return getter for specified attribute
     def attributeGetter(self, theFeature, theAttrName):