From f958555ea9528737ffc6f4d70b2580c204c30e2e Mon Sep 17 00:00:00 2001
From: FEA-eng <59876896+FEA-eng@users.noreply.github.com>
Date: Wed, 2 Jul 2025 12:41:39 +0200
Subject: [PATCH 1/6] Core: Update DlgSettingsLightSources.ui
---
src/Gui/PreferencePages/DlgSettingsLightSources.ui | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/Gui/PreferencePages/DlgSettingsLightSources.ui b/src/Gui/PreferencePages/DlgSettingsLightSources.ui
index 59f516abd5..7f543a6c3a 100644
--- a/src/Gui/PreferencePages/DlgSettingsLightSources.ui
+++ b/src/Gui/PreferencePages/DlgSettingsLightSources.ui
@@ -22,9 +22,6 @@
2
-
- Adjust the orientation of the directional light source by dragging the handle with the mouse or use the spin boxes for fine tuning.
-
Preview
From 67c7c97577e6264d1a842ae7ac38a052ecdf260b Mon Sep 17 00:00:00 2001
From: FEA-eng <59876896+FEA-eng@users.noreply.github.com>
Date: Thu, 3 Jul 2025 10:07:02 +0200
Subject: [PATCH 2/6] FEM: Update TaskPostFrames.ui
---
src/Mod/Fem/Gui/TaskPostFrames.ui | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Mod/Fem/Gui/TaskPostFrames.ui b/src/Mod/Fem/Gui/TaskPostFrames.ui
index 1377e138b1..8c11d0562f 100644
--- a/src/Mod/Fem/Gui/TaskPostFrames.ui
+++ b/src/Mod/Fem/Gui/TaskPostFrames.ui
@@ -38,7 +38,7 @@
-
- Ressonance frequencies
+ Resonant frequencies
From 52d36374db62a5a62b7b2c7b2d780af403e7aa0e Mon Sep 17 00:00:00 2001
From: FEA-eng <59876896+FEA-eng@users.noreply.github.com>
Date: Thu, 3 Jul 2025 10:07:44 +0200
Subject: [PATCH 3/6] FEM: Update commands.py
---
src/Mod/Fem/femcommands/commands.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Mod/Fem/femcommands/commands.py b/src/Mod/Fem/femcommands/commands.py
index c8341d589f..85a8420f53 100644
--- a/src/Mod/Fem/femcommands/commands.py
+++ b/src/Mod/Fem/femcommands/commands.py
@@ -732,7 +732,7 @@ class _MeshClear(CommandManager):
super().__init__()
self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MeshClear", "Clear FEM Mesh")
self.tooltip = Qt.QT_TRANSLATE_NOOP(
- "FEM_MeshClear", "Clears the mesh of an FEM mesh object"
+ "FEM_MeshClear", "Clears the mesh of a FEM mesh object"
)
self.is_active = "with_femmesh"
From 489eb47050bb7a9a1cdaad378a36b8451dd3e1b3 Mon Sep 17 00:00:00 2001
From: FEA-eng <59876896+FEA-eng@users.noreply.github.com>
Date: Thu, 3 Jul 2025 10:10:15 +0200
Subject: [PATCH 4/6] FEM: Update Command.cpp
---
src/Mod/Fem/Gui/Command.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Mod/Fem/Gui/Command.cpp b/src/Mod/Fem/Gui/Command.cpp
index 9b4c3a6f49..26c50f9af5 100644
--- a/src/Mod/Fem/Gui/Command.cpp
+++ b/src/Mod/Fem/Gui/Command.cpp
@@ -882,8 +882,8 @@ CmdFemConstraintSpring::CmdFemConstraintSpring()
{
sAppModule = "Fem";
sGroup = QT_TR_NOOP("Fem");
- sMenuText = QT_TR_NOOP("Spring Constraint");
- sToolTipText = QT_TR_NOOP("Creates a spring acting on a face");
+ sMenuText = QT_TR_NOOP("Spring Boundary Condition");
+ sToolTipText = QT_TR_NOOP("Creates a spring boundary condition on a face");
sWhatsThis = "FEM_ConstraintSpring";
sStatusTip = sToolTipText;
sPixmap = "FEM_ConstraintSpring";
From f0803a620fc49dfd2ff33ac2142bd8df95c4bb90 Mon Sep 17 00:00:00 2001
From: "pre-commit-ci[bot]"
<66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Thu, 3 Jul 2025 08:20:07 +0000
Subject: [PATCH 5/6] [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---
src/Mod/Fem/femcommands/commands.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/Mod/Fem/femcommands/commands.py b/src/Mod/Fem/femcommands/commands.py
index 85a8420f53..061561cd26 100644
--- a/src/Mod/Fem/femcommands/commands.py
+++ b/src/Mod/Fem/femcommands/commands.py
@@ -731,9 +731,7 @@ class _MeshClear(CommandManager):
def __init__(self):
super().__init__()
self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MeshClear", "Clear FEM Mesh")
- self.tooltip = Qt.QT_TRANSLATE_NOOP(
- "FEM_MeshClear", "Clears the mesh of a FEM mesh object"
- )
+ self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_MeshClear", "Clears the mesh of a FEM mesh object")
self.is_active = "with_femmesh"
def Activated(self):
From 44fab7eeab8ff3af8f0ae8bc7781d6a92926843e Mon Sep 17 00:00:00 2001
From: David Carter
Date: Thu, 3 Jul 2025 14:32:27 -0400
Subject: [PATCH 6/6] Materials: Add import for unimplemented fields
Adds import/export support for unimplemented material fields.
This includes reference source and URLs, and tag fields. Tag support
remains unimplemented in the editor, but is supported by a number
of materials in the FCMat files. They can be accessed in both C++
and Python.
---
src/Mod/Material/App/MaterialLoader.cpp | 11 +++++++++++
src/Mod/Material/App/Materials.cpp | 19 +++++++++++++++++++
src/Mod/Material/App/Materials.h | 10 ++++------
3 files changed, 34 insertions(+), 6 deletions(-)
diff --git a/src/Mod/Material/App/MaterialLoader.cpp b/src/Mod/Material/App/MaterialLoader.cpp
index 175f3caaf5..fbe0c4639d 100644
--- a/src/Mod/Material/App/MaterialLoader.cpp
+++ b/src/Mod/Material/App/MaterialLoader.cpp
@@ -180,12 +180,23 @@ void MaterialYamlEntry::addToTree(
QString author = yamlValue(yamlModel["General"], "Author", "");
QString license = yamlValue(yamlModel["General"], "License", "");
QString description = yamlValue(yamlModel["General"], "Description", "");
+ QString sourceReference = yamlValue(yamlModel["General"], "ReferenceSource", "");
+ QString sourceURL = yamlValue(yamlModel["General"], "SourceURL", "");
std::shared_ptr finalModel =
std::make_shared(library, directory, uuid, name);
finalModel->setAuthor(author);
finalModel->setLicense(license);
finalModel->setDescription(description);
+ finalModel->setReference(sourceReference);
+ finalModel->setURL(sourceURL);
+
+ if (yamlModel["General"]["Tags"]) {
+ auto tags = readList(yamlModel["General"]["Tags"]);
+ for (auto tag : *tags) {
+ finalModel->addTag(tag.toString());
+ }
+ }
// Add inheritance list
if (yamlModel["Inherits"]) {
diff --git a/src/Mod/Material/App/Materials.cpp b/src/Mod/Material/App/Materials.cpp
index f2122dbf77..11afb9f78f 100644
--- a/src/Mod/Material/App/Materials.cpp
+++ b/src/Mod/Material/App/Materials.cpp
@@ -699,6 +699,19 @@ void Material::removeUUID(QSet& uuidList, const QString& uuid)
uuidList.remove(uuid);
}
+void Material::addTag(const QString& tag)
+{
+ auto trimmed = tag.trimmed();
+ if (!trimmed.isEmpty()) {
+ _tags.insert(trimmed);
+ }
+}
+
+void Material::removeTag(const QString& tag)
+{
+ _tags.remove(tag);
+}
+
void Material::addPhysical(const QString& uuid)
{
if (hasPhysicalModel(uuid)) {
@@ -1327,6 +1340,12 @@ void Material::saveGeneral(QTextStream& stream) const
if (!_reference.isEmpty()) {
stream << " ReferenceSource: \"" << MaterialValue::escapeString(_reference) << "\"\n";
}
+ if (!_tags.isEmpty()) {
+ stream << " Tags:\n";
+ for (auto tag : _tags) {
+ stream << " - \"" << tag << "\"\n";
+ }
+ }
}
void Material::saveInherits(QTextStream& stream) const
diff --git a/src/Mod/Material/App/Materials.h b/src/Mod/Material/App/Materials.h
index 31cac1986f..e83c37f070 100644
--- a/src/Mod/Material/App/Materials.h
+++ b/src/Mod/Material/App/Materials.h
@@ -282,13 +282,11 @@ public:
{
_editState = ModelEdit_None;
}
- void addTag(const QString& tag)
+ void addTag(const QString& tag);
+ void removeTag(const QString& tag);
+ bool hasTag(const QString& tag)
{
- Q_UNUSED(tag);
- }
- void removeTag(const QString& tag)
- {
- Q_UNUSED(tag);
+ return _tags.contains(tag);
}
void addPhysical(const QString& uuid);
void removePhysical(const QString& uuid);