From: dbv Date: Wed, 24 Aug 2016 11:24:24 +0000 (+0300) Subject: Fix for Box macros X-Git-Tag: V_2.5.0~137^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FHighLevelDump;p=modules%2Fshaper.git Fix for Box macros --- diff --git a/src/PythonAddons/macros/box/feature.py b/src/PythonAddons/macros/box/feature.py index 01e39b9a5..18f4b24f6 100644 --- a/src/PythonAddons/macros/box/feature.py +++ b/src/PythonAddons/macros/box/feature.py @@ -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])