1 """Box macro-feature Interface
2 Author: Daniel Brunier-Coulin
3 Copyright (C) 2014-20xx CEA/DEN, EDF R&D
6 from model import Interface
7 from macros.box.feature import BoxFeature as MY
10 def addBox(container, *args):
11 feature = container.addFeature(MY.ID())
12 return Box(feature, *args)
16 """Executes the macro-feature Box."""
18 def __init__(self, feature, *args):
19 Interface.__init__(self, feature)
20 assert(self._feature.getKind() == MY.ID())
22 self._width = self._feature.real(MY.WIDTH_ID())
23 self._length = self._feature.real(MY.LENGTH_ID())
24 self._height = self._feature.real(MY.HEIGHT_ID())
33 assert(len(args) == 3)
42 def setWidth(self, width):
43 self._fill_attribute(self._width, width)
46 def setLength(self, length):
47 self._fill_attribute(self._length, length)
50 def setHeight(self, height):
51 self._fill_attribute(self._height, height)