FEM: implement interface of ComplexGeoData

This commit is contained in:
wmayer
2023-03-03 12:05:54 +01:00
committed by wwmayer
parent 6e7e94e342
commit afd59cbe82
4 changed files with 27 additions and 3 deletions

View File

@@ -22,7 +22,7 @@
#include "PreCompiled.h"
#include <App/DocumentObjectPy.h>
#include <App/GeoFeaturePy.h>
#include <App/FeaturePythonPyImp.h>
#include <Base/Placement.h>
@@ -56,7 +56,7 @@ PyObject *FemMeshObject::getPyObject()
{
if (PythonObject.is(Py::_None())){
// ref counter is set to 1
PythonObject = Py::Object(new DocumentObjectPy(this), true);
PythonObject = Py::asObject(new GeoFeaturePy(this));
}
return Py::new_reference_to(PythonObject);
}
@@ -84,7 +84,7 @@ template<> const char* Fem::FemMeshObjectPython::getViewProviderName() const {
template<> PyObject* Fem::FemMeshObjectPython::getPyObject() {
if (PythonObject.is(Py::_None())) {
// ref counter is set to 1
PythonObject = Py::Object(new App::FeaturePythonPyT<App::DocumentObjectPy>(this), true);
PythonObject = Py::asObject(new App::FeaturePythonPyT<App::GeoFeaturePy>(this));
}
return Py::new_reference_to(PythonObject);
}