"""F.getRealInput(str) -- get real value of the attribute"""
return self.data().real(inputid).value()
- def getTextInput(self, inputid):
- """F.getTextInput(str) -- get text value of the attribute"""
- return self.data().real(inputid).text()
-
def addResult(self, result):
"""F.addResult(ModelAPI_Result) -- add ModelAPI_Result shape as a result"""
shape = result.shape()
"""Modify the value of the given dimensional constraint."""
constraint.data().real("ConstraintValue").setValue(value)
- #-------------------------------------------------------------
- #
- # Edition of Dimensional Constraints
- #
- #-------------------------------------------------------------
-
- def setText(self, constraint, text):
- """Modify the value of the given dimensional constraint."""
- constraint.data().real("ConstraintValue").setText(text)
-
#-------------------------------------------------------------
#
# Macro functions combining geometry creation and constraints
length = self.getRealInput(self.LENGTH_ID())
height = self.getRealInput(self.HEIGHT_ID())
- width_text = self.getTextInput(self.WIDTH_ID())
- length_text = self.getRealInput(self.LENGTH_ID())
- height_text = self.getRealInput(self.HEIGHT_ID())
-
# Editing the box
self.base.setValue(self.width, width)
- self.base.setText(self.width, width_text)
-
self.base.setValue(self.length, length)
- self.base.setText(self.width, length_text)
self.box.setSize(height)