Commit Graph

304 Commits

Author SHA1 Message Date
wmayer
2cdb802f58 Material: use get_filename_component() instead of cmake_path() to support older CMake versions 2023-09-29 07:32:58 -05:00
wmayer
e6e8c64cba Material: include some more required header files
as otherwise the parser of the clang code model raises a lot of error messages
2023-09-28 15:33:03 -05:00
marioalexis
2494411147 Material: Include needed header file 2023-09-28 14:55:55 +02:00
wmayer
0d7880a902 Mat: fix several compiler warnings:
* -Winconsistent-missing-override
* -Wtautological-undefined-compare
2023-09-27 21:38:56 -05:00
David Carter
442bca834e Material: Material handling enhancements
Rework of the material handling system.

This first part concntrates on a rework of the material cards.
Rather than use a fixed list of possible properties, properties can
be defined separately in their own files and mixed to provide a
complete list of possible properties. Properties can be inherited.

The cards then provide values for the properties. These can also
be inherited allowing for small changes in cards as required.

The new property definitions are more extensive than previously.
2 and 3 dimensional arrays of properties can be defined. Values
are obtained by calling an API instead of reading from a dictionary.

For compatibility, a Python dictionary of values can be obtained
similar to how it was done previously, but this is considered a
deprecated API and won't support the newer advanced features.

The editor is completely reworked. It will be able to edit older format
material cards, but can only save them in the new format.

For testing during the development phase, a system preference can
specifiy wether the old or new material editors are to be used. This
option will be removed before release.
2023-09-25 11:04:15 -04:00
David Carter
6624fa3775 Material: Material handling enhancements
Rework of the material handling system.

This first part concntrates on a rework of the material cards.
Rather than use a fixed list of possible properties, properties can
be defined separately in their own files and mixed to provide a
complete list of possible properties. Properties can be inherited.

The cards then provide values for the properties. These can also
be inherited allowing for small changes in cards as required.

The new property definitions are more extensive than previously.
2 and 3 dimensional arrays of properties can be defined. Values
are obtained by calling an API instead of reading from a dictionary.

For compatibility, a Python dictionary of values can be obtained
similar to how it was done previously, but this is considered a
deprecated API and won't support the newer advanced features.

The editor is completely reworked. It will be able to edit older format
material cards, but can only save them in the new format.

For testing during the development phase, a system preference can
specifiy wether the old or new material editors are to be used. This
option will be removed before release.
2023-09-25 11:04:01 -04:00
Roy-043
79a31d7483 Material: Avoid dictionary.keys() where possible 2023-08-10 00:59:02 +02:00
luzpaz
129d5882a7 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
wmayer
2801f07221 Material: fix icon path 2023-03-27 11:27:32 +02:00
Yorik van Havre
3ad0e233d5 updated ts files 2023-02-27 15:35:51 +01:00
Uwe
de78e9d7ef [Material] add new card to CMake 2023-02-26 04:21:32 +01:00
Vladimir
7c7f8c8c10 [Material] Add Titanium alloy to materials (#8636)
* Add Titanium alloy
2023-02-26 03:53:39 +01:00
luzpaz
e5cdd9a80e [Material] fix grammar 2023-02-25 09:59:24 +01:00
Uwe
d9244d5233 [Material] add heat parameters to aluminum alloys 2023-02-24 16:46:40 +01:00
Uwe
bb6b1979f6 [Material] remove unused Help button in editor dialog 2023-02-24 03:47:19 +01:00
Uwe
c00a2d19ec [Material] fix major bug of wrong decimals
This PR fixes the long-standing major bug that for languages using ',' as decimal separator the material editor was useless. (bug no. 10 in https://forum.freecad.org/viewtopic.php?t=56912)
  the issue was that the value was handled as text. This PR:
- using a spinbox instead if a text edit to modify numbers (has also the advantage to be able to change values by spinning)
- sets min/max properly for all number data types

- also avoid rounding artifacts when changing Float values
2023-02-23 03:06:44 +01:00
luzpaz
57b365f18f Fix misc. typos and whitespace 2023-02-22 23:46:18 +01:00
Uwe
c0369770bc [Material] [skip ci] fix card for Graphite
- decimal sign was mixed ',' and '.' causing problems
2023-02-22 21:16:05 +01:00
Uwe
c85ed0dee3 [Material] fix bugs for external material files
- handle case that material cards are chosen from folders outside of the standard material folders

- also reduce singleStep size for spin edits for more convenience
2023-02-22 05:25:06 +01:00
Uwe
14de59ec35 [Material] fix card selection bug
- fixes bug number 7 of this list: https://forum.freecad.org/viewtopic.php?style=5&p=489666#p489666

- also fix warning about too short variable name
2023-02-19 07:46:52 +01:00
Uwe
b31d9d1e34 [FEM] fix material handling of fluids
- the material editor failed for Fluid materials because this info was not passed to it. Instead always solid materials were loaded.

- also fix warning about too long variable name and remove unnecessary debug code
2023-02-19 02:57:12 +01:00
Uwe
4b99ce1aac [Material] fix bugs with missing icons
- at the moment you get several warnings about missing icons when starting the Material editor
  The reason is that they are not registered in CMake

- also remove icon from Material icon editor. As it is a child of FreeCAD it should have the same FreeCAD icon as all other FreeCAD widgets.

- also fix warning about too short variable name
2023-02-19 00:47:44 +01:00
Uwe
7fb40b1d70 [Material] editor: improve float input
- it is very annoying to get a dozen decimals on editing floats. 6 do the job for all cases and a spinBox is preferred.
2023-02-11 04:14:30 +01:00
Uwe
04f0b66ef7 [FEM] use magnetization constraint for 2D
- uses the constraint for 2D magnetodynamics to perform e.g. Elmer's tutorial non. 15

- modify the Material manager to get rid of magnetization but keep the vectorial functionality because in future there will be support for e.g. birefringence materials etc.
2023-02-09 15:43:42 +01:00
Uwe
cbe634719d [Material] allow to use vectorial properties
- for electromagnetics we have vector fields and thus need to specify components
- as first step use the new material "Magnetization"

- also get rid of annoying debug messages output on normal use in the material dialog
2023-02-09 07:26:22 +01:00
Uwe
436703e8ce [Material] new card for Iron 2023-02-09 06:25:43 +01:00
luzpaz
b4780be1d1 Fix whitespace issues 2023-02-05 16:39:58 +01:00
Uwe
87c5b89135 [Material] fix conductivity of Copper
- the conductivity was by a factor 10 too low, use a common value as fix
2023-02-05 05:21:14 +01:00
Uwe
d33005d14e [Material] add support for magnetic permeability
- also rename property group to "electromagnetic" (this change has no influence on any existing simulation, is only the name in the material editor)
2023-02-03 14:17:17 -06:00
Uwe
0e17989707 [Material] add new card for carbon dioxide 2023-02-03 02:37:27 +01:00
luzpaz
729685316e Fix trailing whitespace, typos, headers
Fix trailing whitespace, typos, and header uniformity.
2023-01-23 00:34:37 +01:00
Yorik van Havre
8890f229ba Regenerated ts files using lupdate6.6 2022-12-22 15:39:42 +01:00
luz paz
95d89622de Fix header uniformity for various workbenches/directories
Also includes some trailing whitespace fixes
2022-11-29 04:48:57 +01:00
Yorik van Havre
d87fd4d97e Updated ts files 2022-10-06 12:16:32 +02:00
Uwe
9c50b541a5 [Material] add materials used by our examples
- add generic copper and invar
- also extend the generic aluminum card
2022-08-10 02:08:35 +02:00
Uwe
529c48cca4 [FEM] remove unneeded checks for Python 3
since we only support Python >=3, these checks can go
2022-07-31 15:36:54 +02:00
Uwe
a035d650b6 [FEM] remove checks for Python 2 2022-07-27 14:09:23 +02:00
Uwe
c7a2ddbaa3 [FEM] add generic Aluminum material
- with full thermal info
2022-07-26 03:20:27 +02:00
Uwe
1f7374edf1 [FEM] fix material task dialog for fluids
- this fixes a mistake from commit ef088674
- it also consistently use the thermal expansion coefficient
- add code comments

now the material task dialog works with all fluid materials without errors or warnings
2022-07-23 04:59:10 +02:00
Uwe
ef088674ba [FEM] fix wrong console outputs for fluid materials
- since a while ThermalExpansionCoefficient is used, VolumetricThermalExpansionCoefficient is only used for the material task panel
- as already stated in a code comment, the unit of VolumetricThermalExpansionCoefficient is ThermalExpansionCoefficient, therefore we must check for ThermalExpansionCoefficient
- we must also check if ThermalExpansionCoefficient exists

- Adapt the existing fluid material cards to use the ThermalExpansionCoefficient
2022-07-02 05:36:43 +02:00
Kuzemko Alexsandr
40395a0a57 Crowdin Add Material to updatets.py script and create new Material.ts 2022-06-21 17:45:25 +03:00
Daniel Wood
deea933a23 [Material] evaluate the number of columns correctly when rebuilding the FCMats (#5910)
* evaluate the number of columns correctly.
* simplify awk command
2022-03-20 19:20:29 +01:00
luz paz
b0fcf45513 Fix various superfluous whitespace in *.dox files 2022-01-09 21:01:42 -06:00
Preslav
4ab37fc0ca Added stiffness units to FreeCAD [mN/m, N/m, kN/m, MN/m] 2021-08-16 12:27:41 +01:00
luz paz
eab17ddff5 Fix various typos 2021-07-31 09:46:50 +02:00
Bernd Hahnebach
f20e29a04c Material editor: add some comments 2021-07-15 09:20:31 +02:00
Bernd Hahnebach
5bb95f0139 Material Editor, code formating 2021-07-15 08:34:51 +02:00
Bernd Hahnebach
1b8244580e Material, workaround for precision problem 2021-07-15 08:34:49 +02:00
Bernd Hahnebach
a7492d1934 Material: comments 2021-07-15 00:09:58 +02:00
Bernd Hahnebach
0afa4bd344 Material: nitrogen card, fix wrong minus which leads to syntax error in unit system 2021-07-14 20:45:33 +02:00