From 780aefa79d34a477d903cf57397605a69c676c38 Mon Sep 17 00:00:00 2001 From: dbv Date: Wed, 24 Aug 2016 14:24:24 +0300 Subject: [PATCH] Fix for Box macros --- src/PythonAddons/macros/box/feature.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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]) -- 2.39.2