]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for Box macros HighLevelDump
authordbv <dbv@opencascade.com>
Wed, 24 Aug 2016 11:24:24 +0000 (14:24 +0300)
committerdbv <dbv@opencascade.com>
Wed, 24 Aug 2016 11:24:44 +0000 (14:24 +0300)
src/PythonAddons/macros/box/feature.py

index 01e39b9a5df83836e32a7846b6cf443a088c5c67..18f4b24f6223444fa28cb66f78c4772ed64c7296 100644 (file)
@@ -67,11 +67,14 @@ class BoxFeature(model.Feature):
 
         line = model.addPolygon(self.base, p1, p2, p3, p4)
 
+        self.base.setFixed(line[0].startPoint())
+        self.base.setVertical(line[0])
+
         # Setting the size of the base with default values
         # Width
-        self.width = self.base.setLength(line[0], 50)  # Keeps the constraint for edition
+        self.width = self.base.setLength(line[3], 50)  # Keeps the constraint for edition
         # Length
-        self.length = self.base.setLength(line[3], 50)  # Keeps the constraint for edition
+        self.length = self.base.setLength(line[0], 50)  # Keeps the constraint for edition
 
         # Keeping the rectangle
         self.base.setParallel(line[0], line[2])