Commit Graph

430 Commits

Author SHA1 Message Date
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
wmayer
d53d1c0622 Gui: Refactor DlgMaterialPropertiesImp
Because a PropertyMaterialList property is used now it makes no sense any more to pass a list of view providers to the dialog
as it's impossible to set the material at a certain index.
Therefore the dialog has been simplified and setting the material property must be done by the calling instance.
2024-06-10 10:50:46 -05:00
David Carter
53e737f57b Materials: Inheritance API
API changes to inherit a material
2024-06-03 11:18:29 -05:00
Chris Hennes
6404de9c21 Update translations 2024-06-03 11:04:42 -05:00
David Carter
37f7ccb5e0 Materials: Tree Widget selection change
Remove notification when a foldder is selected
rather than a material
2024-06-03 10:52:54 -05:00
wmayer
87a7bc1d81 Fix compiler warnings 2024-06-02 14:59:45 +02:00
David Carter
5feb963f9d Material: Appearance Updates 2
Improves the use of the ShapeAppearance property for the Part workbench.

    removes DiffuseColor property
        adds Python compatibility using custom attributes
        transitions DiffuseColor to ShapeAppearance on open
    Improved UI elements for setting object appearance, and appearance per face
    Lays the foundation for future texture support
2024-06-01 19:57:16 -05:00
wmayer
3e23bd759b Mod: Fix several compiler warnings 2024-05-30 08:55:11 +02:00
wmayer
560cab6f31 clang/gcc: Add build option FREECAD_WARN_ERROR to force to make warnings into errors 2024-05-29 13:37:07 +02:00
David Carter
46e78e3218 Materials: Correct issue with UTF8 path
The YAML library is unable to open files with UTF8 paths
2024-05-29 10:54:03 +02:00
David Carter
dfe024ed99 Material: Material Filter API (#14292)
* Naterial: Material Filter API

Adds a material filtering function to the
MaterialManager Python object

* Remove whitespace
2024-05-27 12:00:39 -05:00
David Carter
c5df1b3e55 Materials: Editor UI enhancements
When creating a new material, assigning the basic
rendering model to the material resulted in an all
black color. This will now be assigned the default
color as specified in the preferences.

The name of the material Properties tab has been
changed to Physical for improved consistency in
the user interface.
2024-05-27 11:35:00 -05:00
David Carter
a0fdc86948 Material: Appearance and Material inspectors
Dialogs to view the Appearance and Material properties of an object

These inspectors are intended to be used when debugging Appearance and
Material issues in a model.

The Appearance inspector displays the appearance properties of an
object. This will be more useful once PR 13792 is merged which migrates
parts to use ShapeAppearance instead of DiffuseColor. This shows each
of the appearance properties per face for the object.

The Material inspector shows the material, models, and properties
assigned to a model. It displays useful debugging information such as
the UUID and file paths associated with eacch of the items. This is
useful when finding and resolving model conflicts.

The material inspector now gives the option of copying the information
to the clipboard.
2024-05-27 10:50:35 -05:00
Chris Hennes
73ae4102e6 Update translations
Arch->BIM is a WIP
2024-05-25 19:11:51 -05:00
David Carter
ed01d5cffa Material: Material API fixes
Corrects an issue in the API where a new material may not have a UUID.
Corrected the test case to reflect the changes and better document the
process.

Added a test case for material filters.
2024-05-20 10:43:02 -05:00
Johannes Wüller
33e91421b5 Fix backwards-compatible Qt6 warnings 2024-05-13 11:39:24 -05:00
David Carter
4dcd810ac5 Material: Material Preferences
Updates the material preferences including selecting a default material

Preferences adds some options for what gets displayed in the Materials editor.
The option to use the legacy editor is removed in favour of the new
editor.

A new preference page has been added that allows the user to select a
default material. This will then be assigned to any newly created object. In
support of this, a new widget PrefsMaterialTreeWidget has been added as an
extension of the MaterialTreeWidget to automatically save and restore the
selected material.
2024-05-13 11:14:55 -05:00
Chris Hennes
9fead3682d Update translations 2024-05-12 17:06:56 -05:00
wmayer
bf1fc57157 Material: Fix memory leaks 2024-05-08 20:01:54 +02:00