Open
Description
As far as I can see, it's only possible to add colors so far.
That could be extended to handling materials by using XCAFDoc_Material
for physical properties and XCAFDoc_VisMaterial
for visualization.
I implemented a first working approach:
https://github.com/sangl-spezialtransformatoren/cadquery/tree/materials
The syntax is at the moment:
part = create_some_part()
assembly = Assembly()
copper = Material(
name="Copper",
base_color=Color(0.955, 0.637, 0.538, 1),
density=8.9,
metalness=1,
roughness=0.1,
)
assembly.add(part, material=copper)
I wanted to use this issue as a discussion entrypoint, a pull request could follow later.
Links to OCCT documentation: