1 """Box macro-feature Interface
2 Author: Daniel Brunier-Coulin
3 Copyright (C) 2014-20xx CEA/DEN, EDF R&D
7 from macros.box.feature import BoxFeature as MY
10 def addBox(self, container, *args):
11 feature = container.addFeature(MY.ID())
12 return Box(feature, *args)
15 class Box(model.Interface):
16 """Executes the macro-feature Box."""
18 def __init__(self, feature, dx, dy, dz):
19 model.Interface.__init__(self, feature)
21 self.setRealInput(MY.WIDTH_ID(), dx)
22 self.setRealInput(MY.LENGTH_ID(), dy)
23 self.setRealInput(MY.HEIGHT_ID(), dz)
25 if self.areInputValid():
28 raise Exception("cannot make the Box")