def __init__(self):
pass
- def ID(self):
+ @staticmethod
+ def ID():
return "Box"
- def WIDTH_ID(self):
+ @staticmethod
+ def WIDTH_ID():
return "box_width"
- def LENGTH_ID(self):
+ @staticmethod
+ def LENGTH_ID():
return "box_length"
- def HEIGHT_ID(self):
+ @staticmethod
+ def HEIGHT_ID():
return "box_height"
def initAttributes(self):
- self.data().addAttribute(self.WIDTH_ID(), ModelAPI_AttributeDouble.type())
- self.data().addAttribute(self.LENGTH_ID(), ModelAPI_AttributeDouble.type())
- self.data().addAttribute(self.HEIGHT_ID(), ModelAPI_AttributeDouble.type())
+ self.data().addAttribute(PythonFeaturesPlugin_Box.WIDTH_ID(), ModelAPI_AttributeDouble.type())
+ self.data().addAttribute(PythonFeaturesPlugin_Box.LENGTH_ID(), ModelAPI_AttributeDouble.type())
+ self.data().addAttribute(PythonFeaturesPlugin_Box.HEIGHT_ID(), ModelAPI_AttributeDouble.type())
def execute(self):
- aWidth = self.data().attribute(self.WIDTH_ID()).value()
- aLength = self.data().attribute(self.LENGTH_ID()).value()
- aHeight = self.data().attribute(self.HEIGHT_ID()).value()
+ aWidth = self.attribute(PythonFeaturesPlugin_Box.WIDTH_ID()).value()
+ aLength = self.attribute(PythonFeaturesPlugin_Box.LENGTH_ID()).value()
+ aHeight = self.attribute(PythonFeaturesPlugin_Box.HEIGHT_ID()).value()
aResult = document().createBody(data())
#aResult.store(UserPackage.makeBox(aLength, aWidth, aHeight)