Commit Graph

448 Commits

Author SHA1 Message Date
Yorik van Havre
8486a6ded4 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
a9b4cb5611 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
6f8afd85e6 Material: Propagate changes to MaterialTreeWidget even if UUID does not change 2024-11-10 12:33:28 -03:00
wmayer
9126e7e9c8 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
22519cc282 Material: Set more meaningful message for some exception types 2024-11-09 10:23:17 -05:00
David Carter
1430680141 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
70349cf87f Mat: Clean-up code in DlgDisplayPropertiesImp 2024-10-30 02:07:23 +01:00
wmayer
98e7dd94c5 Mat: Tmp. block signals of material widget
Fixes #17523
2024-10-30 01:06:12 +01:00
Yorik van Havre
e8fc9cf45f crowdin translations 2024-10-14 17:56:08 +02:00
shai
f43444c03e Fix issue #17035 2024-10-07 08:35:43 -05:00
David Carter
d876e18808 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
9df2ec7b86 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
abd5c3ca31 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
fdfb9fd2c6 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
1c6b7dc8b8 Materials: Update install locations
Ensure icons and images are put in the correct location.
2024-09-23 10:02:50 -05:00
David Carter
1542ddc815 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
669c82fecd 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
56dbb6532a 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
7b3eca8396 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
7ed1e9380a 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
4068341873 [Material] Prefs - User Directory - set to Directory chooser 2024-08-31 13:19:57 -05:00
Yorik van Havre
b065691032 Merged crowdin translations 2024-08-28 17:51:34 +02:00
wmayer
59c1ccec3e Material: Prepare for clang-format 2024-08-26 19:49:48 +02:00
Chris Hennes
4204ad3fd8 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
450ec1ad8c Rename *Impl.py to Imp.py 2024-08-25 19:32:02 -05:00
Jonas Bähr
bb01ec7f7c 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
2ed910125a 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
58ba9dd0e9 Remove deprecated materials
# Conflicts:
#	src/Mod/Material/Resources/Materials/Machining/ToolSteel.FCMat
2024-08-19 11:57:04 -04:00
Jonas Bähr
95c514fca3 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
aef3bdfe67 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
aad060c0f0 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
d927cfc438 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
a71f49f4f6 Fix trailing newlines and minor typo fixes 2024-07-23 16:16:30 +02:00
David Carter
810f34ea11 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
03e60ccc6e 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
0918dfcf98 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
2731b55100 Merge pull request #14688 from davesrocketshop/issue_14686
Materials: Set MaterialTreeWidget minimum size
2024-07-15 09:24:32 -05:00
luzpaz
e216dc94ca Materials: Trim trailing newlines 2024-07-15 10:47:47 +02:00
Yorik van Havre
2c66c8a788 Merged crowdin translations 2024-07-11 15:07:17 +02:00
Yorik van Havre
0a69f0d7c2 Updated ts files 2024-07-11 14:56:33 +02:00
Roy-043
ac2b65c37b Material: Change "Custom Appearance" to sentence case in ui files 2024-07-11 14:24:30 +02:00
Yorik van Havre
32c9ed5493 Merged crowdin translations 2024-07-09 08:52:17 -05:00
hasecilu
d3a7dcbe96 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
e04d29b950 Reduce Linter warnings 2024-07-04 11:49:45 -04:00
Yorik van Havre
2a009589f9 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
e07deec7f3 Material: Fix Delete key in material editor 2024-07-01 12:33:46 +02:00
Chris Hennes
d01ce32a1f 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
df4a4591d2 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
e755fc1a5a 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
276d189254 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