Commit Graph

34 Commits

Author SHA1 Message Date
luzpaz
02a029b4c2 Materials: Trim trailing newlines 2024-07-15 10:47:47 +02:00
FEA-eng
8440586550 MATERIAL: Update cardutils.py 2024-04-04 23:29:12 -05:00
David Carter
ba20441935 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
44ad16b6d3 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
2a60613257 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
1e3179e9bc 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
37c7169ee4 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
902af79514 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
85c2c973d8 Material: Avoid dictionary.keys() where possible 2023-08-10 00:59:02 +02:00
luzpaz
38a01939e0 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
9df1f9f8f5 [Material] fix grammar 2023-02-25 09:59:24 +01:00
Uwe
a2ffadcb59 [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
7c4a3c160c [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
4a030cd949 [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
323f323864 Material: comments 2021-07-15 00:09:58 +02:00
Bernd Hahnebach
f6978f419e Material: pep8 code formating 2020-11-18 08:15:50 +01:00
Yorik van Havre
cb245845c5 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
78c2d33a47 Material: typo 2019-09-12 23:50:41 +02:00
luz.paz
9845c002ab Misc. source comment typo and whitespace fixes
Found via codespell
2019-06-16 20:47:07 +02:00
Bernd Hahnebach
4431d30562 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
436ea86b79 Material: white space 2019-05-24 19:08:17 +02:00
Bernd Hahnebach
e6ce361a02 Material: card utils, add some code comments for new added methods 2019-05-14 12:05:47 +02:00
Bernd Hahnebach
2cf145f6f7 Material: card utils, add methods for quatity unit checks 2019-05-14 12:05:47 +02:00
Bernd Hahnebach
00716d75b5 Material: card utils, add a parameter to ignore template mat on import materials 2019-05-14 12:05:47 +02:00
Bernd Hahnebach
6c2f2189b0 Material: card utils, example code comments fixes 2019-05-14 12:05:47 +02:00
luz.paz
659d17129a 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
57fc1d0cc2 Material: card utils and import, add some code examples 2019-04-25 20:43:07 +02:00
Bernd Hahnebach
e0b08e74f3 Material: card utils, data model comments and a few more 2019-04-25 20:43:07 +02:00
Bernd Hahnebach
8827187935 Material: editor, allow duplicate card names and other improvements 2019-04-25 20:43:07 +02:00
Bernd Hahnebach
e4f29ffe92 Material: material main module, move card related defs into mat utils module 2019-04-25 20:43:07 +02:00
Bernd Hahnebach
f9c873531e 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
f69537ed30 Material: mat card template for material editor, move to a much more pythonic one 2019-04-25 20:43:07 +02:00
Bernd Hahnebach
eb21144c4b 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
4f3bcf05b9 Material: card utils, add new module 2019-04-25 20:43:06 +02:00