Objects for Results of FEM analysis

This commit is contained in:
jriegel
2013-11-27 20:13:57 +01:00
parent 680f4c82f7
commit feeb053e18
12 changed files with 407 additions and 4 deletions

View File

@@ -60,6 +60,14 @@ Base::Quantity PropertyQuantity::getQuantityValue(void) const
return Quantity( _dValue,_Unit);
}
void PropertyQuantity::setValue(const Base::Quantity &quant)
{
aboutToSetValue();
_dValue = quant.getValue();
_Unit = quant.getUnit();
hasSetValue();
}
const char* PropertyQuantity::getEditorName(void) const
{
@@ -90,14 +98,14 @@ void PropertyQuantity::setPyObject(PyObject *value)
Unit unit = quant.getUnit();
if(unit.isEmpty()){
setValue(quant.getValue());
PropertyFloat::setValue(quant.getValue());
return;
}
if (unit != _Unit)
throw Base::Exception("Not matching Unit!");
setValue(quant.getValue());
PropertyFloat::setValue(quant.getValue());
}
//**************************************************************************