make FemResultObject extensible in python as FemSolverObject
This commit is contained in:
parent
279418f032
commit
73377204a1
|
@ -161,6 +161,7 @@ PyMODINIT_FUNC initFem()
|
||||||
Fem::ConstraintFluidBoundary ::init();
|
Fem::ConstraintFluidBoundary ::init();
|
||||||
|
|
||||||
Fem::FemResultObject ::init();
|
Fem::FemResultObject ::init();
|
||||||
|
Fem::FemResultObjectPython ::init();
|
||||||
Fem::FemSolverObject ::init();
|
Fem::FemSolverObject ::init();
|
||||||
Fem::FemSolverObjectPython ::init();
|
Fem::FemSolverObjectPython ::init();
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "FemResultObject.h"
|
#include "FemResultObject.h"
|
||||||
|
#include <App/FeaturePythonPyImp.h>
|
||||||
#include <App/DocumentObjectPy.h>
|
#include <App/DocumentObjectPy.h>
|
||||||
|
|
||||||
using namespace Fem;
|
using namespace Fem;
|
||||||
|
@ -96,6 +97,14 @@ template<> const char* Fem::FemResultObjectPython::getViewProviderName(void) con
|
||||||
}
|
}
|
||||||
/// @endcond
|
/// @endcond
|
||||||
|
|
||||||
|
template<> PyObject* Fem::FemResultObjectPython::getPyObject(void) {
|
||||||
|
if (PythonObject.is(Py::_None())) {
|
||||||
|
// ref counter is set to 1
|
||||||
|
PythonObject = Py::Object(new App::FeaturePythonPyT<App::DocumentObjectPy>(this),true);
|
||||||
|
}
|
||||||
|
return Py::new_reference_to(PythonObject);
|
||||||
|
}
|
||||||
|
|
||||||
// explicit template instantiation
|
// explicit template instantiation
|
||||||
template class AppFemExport FeaturePythonT<Fem::FemResultObject>;
|
template class AppFemExport FeaturePythonT<Fem::FemResultObject>;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user