Fem: Add properties to FemSolverObject

This commit is contained in:
marioalexis
2025-04-03 00:28:01 -03:00
parent d2ddc8e56a
commit 47bdf1d01d
2 changed files with 16 additions and 1 deletions

View File

@@ -35,7 +35,19 @@ using namespace App;
PROPERTY_SOURCE(Fem::FemSolverObject, App::DocumentObject)
FemSolverObject::FemSolverObject() = default;
FemSolverObject::FemSolverObject()
{
ADD_PROPERTY_TYPE(Results,
(nullptr),
"Solver",
App::PropertyType(App::Prop_ReadOnly | App::Prop_Output),
"Solver results list");
ADD_PROPERTY_TYPE(WorkingDirectory,
(""),
"Solver",
App::PropertyType(App::Prop_Transient | App::Prop_Hidden | App::Prop_Output),
"Solver working directory");
}
FemSolverObject::~FemSolverObject() = default;

View File

@@ -26,6 +26,7 @@
#define Fem_FemSolverObject_H
#include <App/FeaturePython.h>
#include <App/PropertyFile.h>
#include <Mod/Fem/FemGlobal.h>
namespace Fem
@@ -40,6 +41,8 @@ public:
FemSolverObject();
~FemSolverObject() override;
App::PropertyLinkList Results;
App::PropertyPath WorkingDirectory;
// Attributes are implemented in the FemSolverObjectPython
/// returns the type name of the ViewProvider