From 860aa6a45bd2975aa8d620e906067c8a0c1de6b8 Mon Sep 17 00:00:00 2001 From: marioalexis Date: Thu, 19 Feb 2026 20:34:22 -0300 Subject: [PATCH] Fem: Add Tool property to solvers and meshers (cherry picked from commit 6f8e9f1a9e6e527e533590bbbbe333d6d4953b7a) --- src/Mod/Fem/App/FemMeshShapeObject.cpp | 16 ++++++++++++++++ src/Mod/Fem/App/FemMeshShapeObject.h | 2 ++ src/Mod/Fem/App/FemSolverObject.cpp | 9 +++++++++ src/Mod/Fem/App/FemSolverObject.h | 1 + 4 files changed, 28 insertions(+) diff --git a/src/Mod/Fem/App/FemMeshShapeObject.cpp b/src/Mod/Fem/App/FemMeshShapeObject.cpp index e6d219a92d..c3558e41d4 100644 --- a/src/Mod/Fem/App/FemMeshShapeObject.cpp +++ b/src/Mod/Fem/App/FemMeshShapeObject.cpp @@ -46,6 +46,22 @@ FemMeshShapeBaseObject::FemMeshShapeBaseObject() Prop_None, "Geometry object, the mesh is made from. The geometry object has to have a Shape." ); + ADD_PROPERTY_TYPE( + Tool, + (Py::Object()), + "FEM Mesh", + App::PropertyType( + App::Prop_Transient | App::Prop_Hidden | App::Prop_ReadOnly | App::Prop_Output + ), + "Tool object for run the mesher" + ); + ADD_PROPERTY_TYPE( + WorkingDirectory, + (""), + "FEM Mesh", + App::PropertyType(App::Prop_Transient | App::Prop_Hidden | App::Prop_Output), + "Mesher working directory" + ); Shape.setScope(LinkScope::Global); } diff --git a/src/Mod/Fem/App/FemMeshShapeObject.h b/src/Mod/Fem/App/FemMeshShapeObject.h index adf08ee618..a9afb94a76 100644 --- a/src/Mod/Fem/App/FemMeshShapeObject.h +++ b/src/Mod/Fem/App/FemMeshShapeObject.h @@ -39,6 +39,8 @@ public: ~FemMeshShapeBaseObject() override; App::PropertyLink Shape; + App::PropertyPythonObject Tool; + App::PropertyPath WorkingDirectory; /// returns the type name of the ViewProvider const char* getViewProviderName() const override diff --git a/src/Mod/Fem/App/FemSolverObject.cpp b/src/Mod/Fem/App/FemSolverObject.cpp index 8a297b91fe..50672e481b 100644 --- a/src/Mod/Fem/App/FemSolverObject.cpp +++ b/src/Mod/Fem/App/FemSolverObject.cpp @@ -50,6 +50,15 @@ FemSolverObject::FemSolverObject() App::PropertyType(App::Prop_Transient | App::Prop_Hidden | App::Prop_Output), "Solver working directory" ); + ADD_PROPERTY_TYPE( + Tool, + (Py::Object()), + "Solver", + App::PropertyType( + App::Prop_Transient | App::Prop_Hidden | App::Prop_ReadOnly | App::Prop_Output + ), + "Tool for run the solver" + ); } FemSolverObject::~FemSolverObject() = default; diff --git a/src/Mod/Fem/App/FemSolverObject.h b/src/Mod/Fem/App/FemSolverObject.h index 191a47a1df..fc03e6652c 100644 --- a/src/Mod/Fem/App/FemSolverObject.h +++ b/src/Mod/Fem/App/FemSolverObject.h @@ -42,6 +42,7 @@ public: ~FemSolverObject() override; App::PropertyLinkList Results; + App::PropertyPythonObject Tool; App::PropertyPath WorkingDirectory; // Attributes are implemented in the FemSolverObjectPython