Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for new Material System #331

Open
maxwxyz opened this issue Apr 7, 2024 · 10 comments
Open

Update for new Material System #331

maxwxyz opened this issue Apr 7, 2024 · 10 comments
Labels

Comments

@maxwxyz
Copy link
Contributor

maxwxyz commented Apr 7, 2024

With the merge of @davesrocketshop Material overhaul, the Sheet Metal features seem not working as they are missing a shape color attribute:
grafik

OS: Windows 11 build 22631
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.36784 (Git)
Build type: Release
Branch: main
Hash: d1930fc7e6fc35c413f9f39d22f2ea28fca827c7
Python 3.11.8, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: German/Germany (de_DE)
Installed mods: 
  * 3DfindIT 1.2.0
  * BIM 2021.12.0
  * CfdOF 1.25.10
  * CurvedShapes 1.0.8
  * Curves 0.6.29
  * Defeaturing 1.2.2
  * fasteners 0.5.16
  * FEMbyGEN 2.1.0
  * freecad.gears 1.2.0
  * freecad_metal_workbench 0.0.1
  * kicadStepUpMod 11.1.0
  * lattice2 1.0.0
  * OpenDark 2023.12.17
  * Rocket 3.3.0
  * sheetmetal 0.4.10
  * Silk 0.1.5

@davesrocketshop
Copy link

ShapeColor is implemented as a custom attribute. There should be no issue. But of course that doesn't mean there isn't.

Please include simple steps to reproduce as I'm not familiar with the workbench

@maxwxyz
Copy link
Contributor Author

maxwxyz commented Apr 7, 2024

I'm not sure if related to Material but it worked with the last weekly build before the Material merge.
Just select any edge or point and try any commands, no feature is working.
You can create a base shape with the right button and select another edge and click e.g. bend:
grafik

@shaise
Copy link
Owner

shaise commented Apr 7, 2024

if shapeColor no longer available it will break Fasteners as well.
Isn't it backward compatible?

@maxwxyz
Copy link
Contributor Author

maxwxyz commented Apr 7, 2024

With a quick test, Fasteners WB works as usual. Maybe there was another change introduced?

@shaise
Copy link
Owner

shaise commented Apr 7, 2024

@maxwxyz Do you have the latest version?
In the latest version (as of yesterday) I added an option to set custom default color for fasteners in the preferences.

@maxwxyz
Copy link
Contributor Author

maxwxyz commented Apr 7, 2024

@shaise you are right, I was using 0.5.15.
But also adding or moving fasterners with the 0.5.16 works fine.
The default color seems to have no effect though, or does it need a restart?
Edit: Also with a restart the default color setting in the preferences has no effect. But there are no errors. Maybe there could be an option to set the default material instead? But it obviously shouldn't break it for users on the stable 0.21.2.

@shaise
Copy link
Owner

shaise commented Apr 7, 2024

I understand why it has no effect. it just sets the diffuse color attrib, but this attrib has no meaning anymore. This is not good.
It should be backward compatible.
Regarding sheetmetal, I will try a new approach and let you know.

@shaise
Copy link
Owner

shaise commented Apr 7, 2024

Hi @maxwxyz ,
The feature that was broken is the material preservation system. This means that if you change the color of a sheetmetal part, each time you add a new bend or other sheetmetal feature, the color will be preserved and not revert to gray.
I have changed the preservation system to be more robust and it now works both on new and old builds.
Please try and let me know.
However what I don't like is that in the new builds there is no way to change the color of a part without setting a new material. Even setting "Random Color" which I use a lot has no effect!
This is probably why fasteners default color no longer works.

shai

@maxwxyz
Copy link
Contributor Author

maxwxyz commented Apr 7, 2024

The SM features work now! But I cannot set a Material or ShapeColor to the body

@maxwxyz
Copy link
Contributor Author

maxwxyz commented Apr 7, 2024

But this seems to be the issue with FreeCAD/FreeCAD#13344 I can apply a Material to a specific SM feature, e.g. a Bend
And for RandomColor there seems to be a PR which fixes this: FreeCAD/FreeCAD#13332

@luzpaz luzpaz added the feature label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants