Commit Graph

86 Commits

Author SHA1 Message Date
Roy-043
488d931a69 Material: rename Materials_Edit command
For consistency it should be Material_Edit.
2025-02-03 18:14:18 +01:00
Tobias Frost
7a5a3d1ffc spelling fixes (#18688)
* Fixes spelling of "Allow to" to "Allow one to"

and those variants:
Allows to -> Allows one to
allow to -> allow one to
allows to -> allows one to

* Fix "Let's -> Lets"

(and lower case variant.)

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

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

* Update src/3rdParty/salomesmesh/inc/MED_Wrapper.hxx

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Base/PyObjectBase.cpp
Update src/App/ExtensionContainer.h
Update src/App/PropertyContainer.h

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Use gerund in user-facing texts.

* Use gerund for two more user-facing strings.

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

---------

Co-authored-by: Tobias Frost <tobi@debian.org>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-01-13 11:22:20 -06: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
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
David Carter
f9eb6c2c68 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
wwmayer
c4c453312d PySide6: Fixes #13533: QSvgWidget is not a child of QtSvg in PySide6 (#13554)
* Create a compatibility module QtSvgWidgets.py to handle PySide2 & PySide6
* In the Arch and Material modules use the QtSvgWidgets module
* Since Qt6 the method QFont.setWeight() doesn't accept an int any more but requires an enum. Since the call of QFont.setBold(True) sets
  a weight of 75 the extra calls of QFont.setWeight(75) can be safely removed

Co-authored-by: Adrián Insaurralde Avalos <36372335+adrianinsaval@users.noreply.github.com>
2024-04-22 18:35:33 -04:00
David Carter
495a96a0f5 Material: Material appearance
Uses new material system for appearance

Each feature object now has a property called ShapeMaterial that
describes its physical properties. If it has a shape, it has a
material.

The ShapeColor attribute is replaced by a ShapeAppearance attribute.
This is a material list that describes all appearance properties, not
just diffuse color. As a list in can be used for all elements of a
shape, such as edges and faces.

A new widget is provided to allow the user to select materials in a
consistent fashion. It can also launch the material editor with its
more advanced capabilities.
2024-04-04 07:39:58 -05:00
David Carter
e9b43a0f83 Material: Material editor enhancements
Improves compatibility when using the legacy editor.

Corrects a number of issues that prevented saved files from being displayed when using the legacy editor.

Reduces the verbosity of console messages.
2024-02-05 08:46:04 -06:00
DeflateAwning
8de6db3e97 Find and replace http://freecad.org to https://freecad.org
Find and replace:
http:\/\/(.{0,10})freecad
https://$1freecad
Done in all remaining files (after doing it in SVGs in the last commit)
2023-10-29 22:39:22 -06: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
luzpaz
e5cdd9a80e [Material] fix grammar 2023-02-25 09:59:24 +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
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
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
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
b235f1be73 Material: pep8 code formating 2020-11-18 08:15:50 +01:00
Bernd Hahnebach
645535234a Material: fix open material editor with empty material, regression was added with commit 0f87516 2020-11-09 19:29:55 +01:00
Yorik van Havre
0f875168b6 Material: Mateiral editor UI fixes
- Fixed color buttons
- Introduced "Section Color" property
- Fixed named properties
- Added preview icons
- Remember UI dimensions and expanded states
2020-10-27 19:16:58 +01:00
Dietmar Czekay
7508daa2ad change "User defined" to "UserDefined"
changed "User defined" in src/Mod/Material/Templatematerial.yml and
src/Mod/Material/MaterialEditor.py
2019-09-04 11:29:09 -03:00
luz.paz
3fe94ea7cf [Crowdin] string fix + misc. typo and whitespace fixes
* Crowdin link: https://crowdin.com/translate/freecad/6766/en-hu#6576162  
* Tacked on a few typo+whitespace fixes
2019-06-20 18:42:09 +02:00
Bernd Hahnebach
28efbd2e75 Materials: editor, improve comments 2019-06-05 21:49:16 +02:00
Bernd Hahnebach
84bb893e4b Material: editor, allow duplicate card names and other improvements 2019-04-25 20:43:07 +02:00
Bernd Hahnebach
3f5f53e91f Material: mat card template for material editor, move to a much more pythonic one 2019-04-25 20:43:07 +02:00
Bernd Hahnebach
ae37de1419 Material: card utils, move card methods from material editor to card utils module
- isolate card tools for further use in other modules
- possible use of card tools in cmd mode
- add some methods for better card handling
- add some output methods for better card debuging
- editor, better names for methods
- add preference to sort cards and add duplicate cards too
- use icon in mat editor card combo box
2019-04-25 20:43:06 +02:00
Bernd Hahnebach
a20b05f4cd Material: editor, add author 2019-04-25 20:43:06 +02:00
Bernd Hahnebach
ad88b6af76 Material, editor and main module, code formating 2019-04-23 09:13:16 +02:00
Bernd Hahnebach
82c46ab56a Material: editor, code formating, line length, prints, add some comments 2019-04-23 09:13:04 +02:00
Bernd Hahnebach
95aaa73388 Material and FEM: card reader and writer, make sure to import the same in all modules 2019-04-23 09:13:02 +02:00
Bernd Hahnebach
50c363c2f3 Material: editor, sort cards in combo box 2019-04-23 09:13:00 +02:00
Bernd Hahnebach
19a62a44ea Material: editor code formating, white space and remove new lines 2019-03-05 13:43:20 +01:00
Bernd Hahnebach
7249a15165 Material: editor, sort cards in combo box 2019-02-21 13:51:43 +01:00
Bernd Hahnebach
f8c6bc6312 Material: editor, some comments 2019-02-21 13:51:43 +01:00
wmayer
a73b10203a fixes 0003825: file location not stored when opening/saving materials 2019-02-16 22:53:54 +01:00
Bernd Hahnebach
4ff8995167 Material: editor, white spaces 2019-02-15 19:02:43 +01:00
Bernd Hahnebach
00007327c4 Material: editor, get rid of duplicate unit definition
- in mat editor xml file and in FreeCAD unit system
- remove it from material editor xml file and get it from FreeCAD unit system
2019-02-14 21:11:23 +01:00