FEM: All FEM results are stored in a single object

Functionality previously provided by setNodeColorByResult is now
in setNodeColorByScalars. FemResult* object is no longer required,
the function accepts list of elements and a list of values.

Functionality previously provided by setNodeDisplacementByResult is now
in setNodeDisplacementByVectors. FemResult* object is no longer required,
the function accepts list of elements and a list of vectors.

A side effect: FemResultValues and FemResultVector are no longer used
and have bee removed.

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
This commit is contained in:
Przemo Firszt
2015-06-15 14:35:56 +01:00
committed by wmayer
parent 29a8db3ca5
commit 53df1e1471
12 changed files with 125 additions and 480 deletions

View File

@@ -37,10 +37,12 @@ PROPERTY_SOURCE(Fem::FemResultObject, App::DocumentObject)
FemResultObject::FemResultObject()
{
ADD_PROPERTY_TYPE(DataType,(""), "General",Prop_None,"Type identifier of the result data");
ADD_PROPERTY_TYPE(Unit,(0), "General",Prop_None,"Unit of the data");
ADD_PROPERTY_TYPE(ElementNumbers,(0), "Data",Prop_None,"Numbers of the result elements");
ADD_PROPERTY_TYPE(Mesh,(0), "General",Prop_None,"Link to the corosbonding mesh");
ADD_PROPERTY_TYPE(Stats,(0), "Fem",Prop_None,"Statistics of the results");
ADD_PROPERTY_TYPE(DisplacementVectors,(), "Fem",Prop_None,"List of displacement vectors");
ADD_PROPERTY_TYPE(DisplacementLengths,(0), "Fem",Prop_None,"List of displacement lengths");
ADD_PROPERTY_TYPE(StressValues,(0), "Fem",Prop_None,"List of Von Misses strass values");
ADD_PROPERTY_TYPE(Mesh,(0), "General",Prop_None,"Link to the corrresponding mesh");
}
FemResultObject::~FemResultObject()
@@ -65,8 +67,8 @@ PyObject *FemResultObject::getPyObject()
namespace App {
/// @cond DOXERR
PROPERTY_SOURCE_TEMPLATE(Fem::FemResultPython, Fem::FemResultObject)
template<> const char* Fem::FemResultPython::getViewProviderName(void) const {
PROPERTY_SOURCE_TEMPLATE(Fem::FemResultObjectPython, Fem::FemResultObject)
template<> const char* Fem::FemResultObjectPython::getViewProviderName(void) const {
return "FemGui::ViewProviderFemResultPython";
}
/// @endcond
@@ -74,4 +76,4 @@ template<> const char* Fem::FemResultPython::getViewProviderName(void) const {
// explicit template instantiation
template class AppFemExport FeaturePythonT<Fem::FemResultObject>;
}
}