Material overhaul

A forum to discuss the implementation of a good Materials system in FreeCAD
User avatar
grandcross
Posts: 319
Joined: Sun Oct 11, 2015 3:08 pm
Contact:

Re: Material overhaul

Post by grandcross »

maxwxyz wrote: Sun Nov 12, 2023 2:09 pm @grandcross Check out: https://github.com/FreeCAD/FreeCAD/pull/11146
and fixes for BG and no navigation: https://github.com/FreeCAD/FreeCAD/pull/11360
It is currently implemented in the preferences dialog.
Just to be clear on what you're suggesting here:
1. That I look at this for an example of coin in a dialog? (of course)
2. That I use its results? (I'll certainly try)
3. That I implement similar functionality in the preview? (Hmm...)
maxwxyz
Posts: 115
Joined: Sat Dec 31, 2022 2:42 pm
Location: Munich

Re: Material overhaul

Post by maxwxyz »

Just
grandcross wrote: Tue Nov 14, 2023 6:37 am 1. That I look at this for an example of coin in a dialog? (of course)
as this is a similar implementation.
User avatar
grandcross
Posts: 319
Joined: Sun Oct 11, 2015 3:08 pm
Contact:

Re: Material overhaul

Post by grandcross »

On the one hand I should have looked at this earlier as it's much simpler, but on the other hand I learned so much doing it the hard way first :lol:

We'll go with the easy way though
Syres
Veteran
Posts: 2493
Joined: Thu Aug 09, 2018 11:14 am

Re: Material overhaul

Post by Syres »

@grandcross My local Self Test (with clean config files) is failing the material test at the first check by path

Code: Select all

Error: testMaterialByPath (materialtests.TestMaterials.MaterialTestCases)
In my self compiled build area I have the CalculiX-Steel.FCMat in two locations:

Code: Select all

/home/username/freecad-daily-build763/share/Mod/Material/Resources/Materials/StandardMaterial/Metal/Steel (789 bytes)
/home/username/freecad-daily-build763/share/Mod/Material/Resources/Materials/Standard/Metal/Steel (793 bytes)
Exactly where is the test looking for the file, apologies if I'm being dumb but it's not clear (perhaps in the test code there should be a print beforehand along the lines of "Looking for CalculiX-Steel.FCMat in ....path" just to assist those of us not really keeping up with all the changes).
User avatar
grandcross
Posts: 319
Joined: Sun Oct 11, 2015 3:08 pm
Contact:

Re: Material overhaul

Post by grandcross »

StandardMaterial was renamed to Standard, so the first shouldn't be there.I checked if the CMakeLists.txt is correct, and I don't see any issues. You should be able to remove the StandardMaterial and FluidMaterial folders. This shouldn't happen with a clean build but I'm not sure a 'make clean' would remove the old folders
Post Reply