Commit Graph

34 Commits

Author SHA1 Message Date
luzpaz
e216dc94ca Materials: Trim trailing newlines 2024-07-15 10:47:47 +02:00
FEA-eng
7a44179529 MATERIAL: Update cardutils.py 2024-04-04 23:29:12 -05: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
c5505bc438 Material: Call to import_materials only returning solids
Fixes #12933

The previous card implementation used a parameter to select either
solids or fluids. The current material dictionary ignored the
parameter and only returned solids. This PR restores the use of the
material type filter.
2024-03-14 22:14:31 -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
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
luzpaz
e5cdd9a80e [Material] fix grammar 2023-02-25 09:59:24 +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
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
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
Bernd Hahnebach
e100339cd9 Material: typo 2019-09-12 23:50:41 +02:00
luz.paz
9453e68e23 Misc. source comment typo and whitespace fixes
Found via codespell
2019-06-16 20:47:07 +02:00
Bernd Hahnebach
5301013873 Material: card utils, do not fail to return card dicts if reading a card fails 2019-06-08 22:24:48 +02:00
Bernd Hahnebach
3c82ffca73 Material: white space 2019-05-24 19:08:17 +02:00
Bernd Hahnebach
14eaa95bb6 Material: card utils, add some code comments for new added methods 2019-05-14 12:05:47 +02:00
Bernd Hahnebach
8698ed56cd Material: card utils, add methods for quatity unit checks 2019-05-14 12:05:47 +02:00
Bernd Hahnebach
09a0a6f95f Material: card utils, add a parameter to ignore template mat on import materials 2019-05-14 12:05:47 +02:00
Bernd Hahnebach
5658119786 Material: card utils, example code comments fixes 2019-05-14 12:05:47 +02:00
luz.paz
8d5fbd947b FIx some user and non-user facing typos
Found via ` codespell -q 3 -I ../fc-word-whitelist.txt -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig* -L pard,wallthicknessOn`  
codespell version 1.15.0.dev0
2019-05-12 16:59:26 +02:00
Bernd Hahnebach
b68ddaafca Material: card utils and import, add some code examples 2019-04-25 20:43:07 +02:00
Bernd Hahnebach
1aa5a7ffbc Material: card utils, data model comments and a few more 2019-04-25 20:43:07 +02:00
Bernd Hahnebach
84bb893e4b Material: editor, allow duplicate card names and other improvements 2019-04-25 20:43:07 +02:00
Bernd Hahnebach
080c48b4a3 Material: material main module, move card related defs into mat utils module 2019-04-25 20:43:07 +02:00
Bernd Hahnebach
27591f5063 Material: card utils modul, add some defs:
- def to write template mat file
- def to write card tools headers file
- def to get the FreeCAD source directory out of Makefile in build
- the data will be taken from the material editor template
- means we gone have an overall template to generate all others material related templates now
- output reistered, non registered, used and not used material keys (very useful for debuging)
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
edb3813a1c Material: card utils, add new module 2019-04-25 20:43:06 +02:00