Adding python capabilities to the Result objects
This commit is contained in:
parent
96514385e5
commit
7a1a8051aa
|
@ -139,8 +139,11 @@ void AppFemExport initFem()
|
||||||
Fem::ConstraintPulley ::init();
|
Fem::ConstraintPulley ::init();
|
||||||
|
|
||||||
Fem::FemResultObject ::init();
|
Fem::FemResultObject ::init();
|
||||||
|
Fem::FemResultPython ::init();
|
||||||
Fem::FemResultValue ::init();
|
Fem::FemResultValue ::init();
|
||||||
|
Fem::FemResultValuePython ::init();
|
||||||
Fem::FemResultVector ::init();
|
Fem::FemResultVector ::init();
|
||||||
|
Fem::FemResultVectorPython ::init();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
|
|
@ -59,3 +59,17 @@ PyObject *FemResultObject::getPyObject()
|
||||||
return Py::new_reference_to(PythonObject);
|
return Py::new_reference_to(PythonObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Python feature ---------------------------------------------------------
|
||||||
|
|
||||||
|
namespace App {
|
||||||
|
/// @cond DOXERR
|
||||||
|
PROPERTY_SOURCE_TEMPLATE(Fem::FemResultPython, Fem::FemResultObject)
|
||||||
|
template<> const char* Fem::FemResultPython::getViewProviderName(void) const {
|
||||||
|
return "FemGui::ViewProviderFemResultPython";
|
||||||
|
}
|
||||||
|
/// @endcond
|
||||||
|
|
||||||
|
// explicit template instantiation
|
||||||
|
template class AppFemExport FeaturePythonT<Fem::FemResultObject>;
|
||||||
|
|
||||||
|
}
|
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
#include <App/DocumentObject.h>
|
#include <App/DocumentObject.h>
|
||||||
#include <App/PropertyUnits.h>
|
#include <App/PropertyUnits.h>
|
||||||
|
#include <App/FeaturePython.h>
|
||||||
#include "FemResultObject.h"
|
#include "FemResultObject.h"
|
||||||
|
|
||||||
namespace Fem
|
namespace Fem
|
||||||
|
@ -58,6 +59,9 @@ public:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef App::FeaturePythonT<FemResultObject> FemResultPython;
|
||||||
|
|
||||||
|
|
||||||
} //namespace Fem
|
} //namespace Fem
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -58,3 +58,17 @@ PyObject *FemResultValue::getPyObject()
|
||||||
return Py::new_reference_to(PythonObject);
|
return Py::new_reference_to(PythonObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Python feature ---------------------------------------------------------
|
||||||
|
|
||||||
|
namespace App {
|
||||||
|
/// @cond DOXERR
|
||||||
|
PROPERTY_SOURCE_TEMPLATE(Fem::FemResultValuePython, Fem::FemResultValue)
|
||||||
|
template<> const char* Fem::FemResultValuePython::getViewProviderName(void) const {
|
||||||
|
return "FemGui::ViewProviderFemResultValuePython";
|
||||||
|
}
|
||||||
|
/// @endcond
|
||||||
|
|
||||||
|
// explicit template instantiation
|
||||||
|
template class AppFemExport FeaturePythonT<Fem::FemResultValue>;
|
||||||
|
|
||||||
|
}
|
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include <App/PropertyStandard.h>
|
#include <App/PropertyStandard.h>
|
||||||
|
#include <App/FeaturePython.h>
|
||||||
|
|
||||||
#include "FemResultObject.h"
|
#include "FemResultObject.h"
|
||||||
|
|
||||||
|
@ -57,6 +58,8 @@ public:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef App::FeaturePythonT<FemResultValue> FemResultValuePython;
|
||||||
|
|
||||||
} //namespace Fem
|
} //namespace Fem
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -58,3 +58,17 @@ PyObject *FemResultVector::getPyObject()
|
||||||
return Py::new_reference_to(PythonObject);
|
return Py::new_reference_to(PythonObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Python feature ---------------------------------------------------------
|
||||||
|
|
||||||
|
namespace App {
|
||||||
|
/// @cond DOXERR
|
||||||
|
PROPERTY_SOURCE_TEMPLATE(Fem::FemResultVectorPython, Fem::FemResultVector)
|
||||||
|
template<> const char* Fem::FemResultVectorPython::getViewProviderName(void) const {
|
||||||
|
return "FemGui::ViewProviderFemResultVectorPython";
|
||||||
|
}
|
||||||
|
/// @endcond
|
||||||
|
|
||||||
|
// explicit template instantiation
|
||||||
|
template class AppFemExport FeaturePythonT<Fem::FemResultVector>;
|
||||||
|
|
||||||
|
}
|
|
@ -25,6 +25,7 @@
|
||||||
#define Fem_FemResultVector_H
|
#define Fem_FemResultVector_H
|
||||||
|
|
||||||
#include <App/PropertyGeo.h>
|
#include <App/PropertyGeo.h>
|
||||||
|
#include <App/FeaturePython.h>
|
||||||
#include "FemResultObject.h"
|
#include "FemResultObject.h"
|
||||||
|
|
||||||
namespace Fem
|
namespace Fem
|
||||||
|
@ -55,6 +56,8 @@ public:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef App::FeaturePythonT<FemResultVector> FemResultVectorPython;
|
||||||
|
|
||||||
} //namespace Fem
|
} //namespace Fem
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user