Commit Graph

448 Commits

Author SHA1 Message Date
Yorik van Havre
36096754c7 Merge pull request #17778 from marioalexis84/fem-material_editor
Fem: Use new material editor in materials task panels - fixes #16814
2024-11-11 17:58:49 +01:00
Yorik van Havre
56a897cc96 Translations (#17725)
* Translations: updated ts files

* Translations: merged crowdin translations

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-11-11 17:01:52 +01:00
marioalexis
c840a908e1 Material: Propagate changes to MaterialTreeWidget even if UUID does not change 2024-11-10 12:33:28 -03:00
wmayer
184c71c09f Material: Replace YAML::LoadFile() with YAML::Load()
YAML::LoadFile() cannot be used on Windows because it doesn't support UTF-16 to load a file from an arbitrary location

This fixes #17097
2024-11-09 10:23:17 -05:00
wmayer
4eed8d1bfc Material: Set more meaningful message for some exception types 2024-11-09 10:23:17 -05:00
David Carter
5e1f1ff257 Materials: Disable editor right click menu
The right click context menu in the materials editor was implemented
as a place holder but is currently non-functional. It should be
disabled for 1.0. This will be revisited post 1.0 as all editor
functionality is reviewed and improved.

Fixes #17110
2024-11-04 17:50:54 +01:00
wmayer
0de167c29a Mat: Clean-up code in DlgDisplayPropertiesImp 2024-10-30 02:07:23 +01:00
wmayer
d54599bd9b Mat: Tmp. block signals of material widget
Fixes #17523
2024-10-30 01:06:12 +01:00
Yorik van Havre
d79015a908 crowdin translations 2024-10-14 17:56:08 +02:00
shai
e926b65b0c Fix issue #17035 2024-10-07 08:35:43 -05:00
David Carter
8bc796cd9c Materials: Correct DiffuseColor custom attribute
Custom attributes were modified to maintain the behaviour of setting
transparencies using the DiffuseColor alpha channels
2024-10-02 20:35:09 -06:00
David Carter
9c5bfd94b7 Materials: Fix QT6 error
The MaterialTreeWidget was not working in QT6 due to a type check for a
QT5 widget
2024-09-25 11:48:57 -05:00
Yorik van Havre
3395a8d4a7 Translations (#16754)
* Updated ts files

* merged crowdin translations

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-23 14:09:56 -04:00
Benjamin Nauck
779fda5e4a Reuse Std_Delete shortcut instead of hardcoding Delete (#16682)
* Reuse Std_Delete shortcut in TaskBooleanParameters

* Reuse Std_Delete shortcut in TaskDressUpParameters

* Reuse Std_Delete shortcut in TaskLoftParameters

* Reuse Std_Delete shortcut in TaskPipeParameters

* Reuse Std_Delete shortcut in TaskSapeBinder

* Reuse Std_Delete shortcut in TaskTransformedParameters

* Reuse Std_Delete shortcut in TaskExtrudeParameters

* Reuse Std_Delete shortcut in TaskSections

* Reuse Std_Delete shortcut in MaterialSave

* Reuse Std_Delete shortcut in Array2D

* Reuse Std_Delete shortcut in TaskFemConstraint

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-23 10:53:39 -05:00
David Carter
12ac1b8490 Materials: Update install locations
Ensure icons and images are put in the correct location.
2024-09-23 10:02:50 -05:00
David Carter
b9475fc74c Materials: Correct installation paths
Correct the installation paths affecting builds on various systems
while still maintaining the old material editor required for
backwards compatibility
2024-09-23 10:02:50 -05:00
David Carter
94567e995b Materials: ShapeMaterial not properly restored
The ShapeMaterial variable was not being properly restored. It's UUID
was restored but the material was not being loaded and set
2024-09-20 08:04:13 -05:00
Yorik van Havre
b97362bf0a Translations (#16582)
* updated ts files

* merged crowdin translations

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-19 09:36:54 +02:00
Yorik van Havre
e1823d25e8 Translations (#16389)
* Translations: Updated ts files

* Translations: Merged crowdin translations

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-09 18:25:52 +02:00
David Carter
d33c995019 Materials: UI updates for transparency
Add missing UI elements to support per face transparencies:
- Setting per face transparencies
- show transparency information in the appearance inspector
- expose alpha channel in material properties dialog
2024-09-06 14:17:20 -05:00
Syres916
9f68aec63b [Material] Prefs - User Directory - set to Directory chooser 2024-08-31 13:19:57 -05:00
Yorik van Havre
2c17bf7200 Merged crowdin translations 2024-08-28 17:51:34 +02:00
wmayer
c9e855b22d Material: Prepare for clang-format 2024-08-26 19:49:48 +02:00
Chris Hennes
820aa9f9de Merge pull request #16021 from jbaehr/material-add-machining-wood-cards
Material: Add wood cards with machining model
2024-08-26 10:38:22 -05:00
David Carter
7a0d9c2662 Rename *Impl.py to Imp.py 2024-08-25 19:32:02 -05:00
Jonas Bähr
a18a0b1cbf Material: Add wood cards with machining model
With PR FreeCAD#14460 the "machinability" model was introduced.
This commits adds material cards with complete machining model data
for various types of woods and engineed wood products.
The data comes from the German text book "Zerspanung von Holz und
Holzwerkstoffen", ISBN 978-3-446-47769-8, 2. Edition 2023,
https://www.hanser-fachbuch.de/fachbuch/artikel/9783446477698
Usage of this data for our purpose is legal as facts are not protected by
copyright according to German law.
2024-08-23 21:57:31 +02:00
Jonas Bähr
ae94393abd Material: Add a very basic wood appearance card
The existing "Wood-Generic" material was only rendered in the default
gray, which is now fixed. I'm aware that wood comes in may different
shades, and the current choice of a yellowish brown is arbitrary.
2024-08-19 20:27:05 +02:00
Brad Collette
712a79c85c Remove deprecated materials
# Conflicts:
#	src/Mod/Material/Resources/Materials/Machining/ToolSteel.FCMat
2024-08-19 11:57:04 -04:00
Jonas Bähr
cd2c12849d Material: Add metal cards with machining model
With PR #14460 the "machinability" model was introduced. As sample data
the legacy material cards from the "feeds and speeds" addon were added
and (partly) converted to the new format. However, due to copyright
concerns and unclear semantics of the data, the values required for
cutting force calculations have been removed.
This commits adds material cards with complete machining model data
for various classes of metals. The data comes from the German standard
work "Tabellenbuch Zerspantechnik", ISBN 978-3-7585-1315-2, 5. Edition
2022, http://www.europa-lehrmittel.de/14733
Usage of this data for our purpose is legal as facts are not protected by
copyright according to German law. This view has been confirmed by the
licensing department of the publisher.
2024-08-17 16:35:26 -05:00
FEA-eng
a7a8491601 FEM: Start examples rework (#15786)
* FEM: Delete data/examples/FemCalculixCantilever1D.FCStd

* FEM: Delete data/examples/FemCalculixCantilever2D.FCStd

* FEM: Delete data/examples/FemCalculixCantilever3D.FCStd

* FEM: add new example combining the previous 3

* FEM: Update CMakeLists.txt

* FEM: Update femmesh2mesh.py

* FEM: Update test_information.md

* FEM: Update test_result.py

* FEM: Update MaterialEditor.py

* FEM: Delete data/examples/FEMExample.FCStd

* FEM: add new example without logo
2024-08-12 17:46:09 -04:00
Yorik van Havre
23a9f47780 Translations (#15689)
* Updated ts files

* Merged crowdin translations

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-05 10:42:18 -05:00
Kacper Donat
484199dbce Gui: Remove unnecessary minimumSizes from Preferences
QT treats setting minimum size very seriously - it applies even if
the size required by the control is smaller than specified resulting in
rendering too small controls.
2024-07-28 00:00:09 +02:00
luzpaz
bc150dc73c Fix trailing newlines and minor typo fixes 2024-07-23 16:16:30 +02:00
David Carter
43337a9045 Material: Update translation paths
Correct issue where the translations were being generated from the
wrong source. All translatable files were moved to the MatGui library.
2024-07-15 20:59:10 -05:00
David Carter
00cc1347b8 Materials: Catch correct error
When the UUID is set to a non-existent material, it was Catching
Materials::ModelNotFound instead of Materials::MaterialNotFound
2024-07-15 11:11:18 -05:00
Chris Hennes
d7b0da3a54 Merge pull request #15085 from wwmayer/issue_15068
Sketcher: Delete key in non-functional in macOS
2024-07-15 10:34:55 -05:00
Chris Hennes
0f68e87805 Merge pull request #14688 from davesrocketshop/issue_14686
Materials: Set MaterialTreeWidget minimum size
2024-07-15 09:24:32 -05:00
luzpaz
02a029b4c2 Materials: Trim trailing newlines 2024-07-15 10:47:47 +02:00
Yorik van Havre
e76b5ec4ca Merged crowdin translations 2024-07-11 15:07:17 +02:00
Yorik van Havre
1c79768f7d Updated ts files 2024-07-11 14:56:33 +02:00
Roy-043
6ecb384fa7 Material: Change "Custom Appearance" to sentence case in ui files 2024-07-11 14:24:30 +02:00
Yorik van Havre
78259314e2 Merged crowdin translations 2024-07-09 08:52:17 -05:00
hasecilu
57f4db2587 Materials: Add tooltips to buttons
Having only `*`, `+` & `-` as reference is not intuitive. Tooltips help
users to know what each button does.

Also marked symbols as not translatable as they appear on CrowdIn.
2024-07-08 17:20:20 -05:00
David Carter
a1ab9e73ab Reduce Linter warnings 2024-07-04 11:49:45 -04:00
Yorik van Havre
56e46e5f4e Translations (#15107)
* Updated ts files

* Merged crowdin translations

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-02 12:21:53 +02:00
wmayer
90b5af266f Material: Fix Delete key in material editor 2024-07-01 12:33:46 +02:00
Chris Hennes
5e47f6804f Update for LibPack3 (#10337)
* cMake: Add base support for LibPack3

Minor changes to FreeCAD source code to support compiling with Qt 6.5 on MSVC,
and changes to cMake setup to support the new Libpack.

* NETGENPlugin: Fix compilation with MSVC and OCCT 7.8

* Material: Switch to Wrapped_ParseTupleAndKeywords for /fpermissive- on MSVC

* Base: Prevent accidental definition of MIN and MAX by MSVC

* cMake: Prevent accidentally finding an old LibPack

* Material: Wrap another ParseTuple call

* OCCT: Modify includes for 7.8.x

* Part: Change TNP code to use Wrapped_ParseTupleAndArgs

* Spreadsheet: Workaround for MSVC macro pollution

* Mesh: Workaround for MSVC macro pollution

* Base: Remove extra MSVC flag (moved to CMake)

* Tests: Fix compiling with /permissive-

* FEM: Fix Qt warnings about duplicate element names

* cMake: Ensure major version numbers are set

* Address review comments.

* cMake: Further tweaks for LibPack3

* cMake: Modify specification of compiler flags for MSVC

* Main: Remove QtQuick testing code

* cmake: Find Boost before SMESH (which uses it)

* Fixes for LibPack2

* cMake: Another try at importinhg VTK cleanly
2024-06-24 18:25:05 +02:00
Jookia
b35c292140 Tests: Use assertEqual instead of assertEquals
This causes some test failures on my system at least.
2024-06-21 11:10:16 -05:00
sliptonic
8365c060a8 Machining model and materials (#14460)
* Machining model and materials

Adds a few machinability material model
and a couple materials.  There's a button in the job dialog
to assign a material.

The sanity report is updated to display the surface speed for assigned materials

* improving the machinability model

* Introduce MaterialConstant for the machinability model

This constant is required to calculate the actual specific cutting force
from the normalized value. It determines how the actaual value varies
when the actual chip thickness gets further away from the normalization
point.

* Rename some machinability properties

- SpecificCuttingForce becomes UnitCuttingForce to clearer differentiate
between normalized and actual specific cutting force. The term unit
cutting force is used less often in literature, but
NormalizedSpecificCuttingForce as property name is too long for my taste.
- MaterialConstant becomes ChipThicknessExponent, as "material constant"
is just too generic for our context. In literature, this constant is most
often just used as the symbol m_c.

---------

Co-authored-by: Jonas Bähr <jonas.baehr@web.de>
2024-06-17 11:25:55 -05:00
David Carter
049204db52 Materials: Material selector doesn't have minimum size set
Add properties for setting a minimum size with reasonable defaults.
Notify the user when the tree is expanded or contracted to allow
for container resizing.
2024-06-17 11:30:01 -04:00