FreeCAD / FreeCAD

This is the official source code of FreeCAD, a free and opensource multiplatform 3D parametric modeler.
https://www.freecad.org
Other
17.59k stars 3.76k forks source link

Material: Compatibility with Part Design #13344

Open maxwxyz opened 4 weeks ago

maxwxyz commented 4 weeks ago

Is there an existing issue for this?

Problem description

It seems that the material is currently not fully compatible with PartDesign bodies. Test file: PD-mat.zip

Depending on the selection the body has different materials, individual features can have individual materials (is this expected or should the material be on the body?). The problem is, when selecting a face in the 3D view, the last feature of the Part Design body is selected. When trying to apply a material to the entire body by selecting the body in the tree view, the material has no effect or is not applied.

Demo:

https://github.com/FreeCAD/FreeCAD/assets/6246609/d78c5334-f6ed-4d31-80e1-1d3d7c6320ce

Full version info

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

Subproject(s) affected?

Core

Anything else?

No response

Code of Conduct

pierreporte commented 4 weeks ago

It doesn’t make sense to have different materials for functions inside a body container. The material should be a property of the body container.

davesrocketshop commented 4 weeks ago

It doesn’t make sense to have different materials for functions inside a body container. The material should be a property of the body container

Setting the material applies to the whole shape. The appearance can be set independently for each face overriding the appearance of the material. At least that's how it's supposed to work.