When making assembly objects I am making use of the option to add materials like this
import cadquery as cq
result = cq.Workplane().sphere(5)
assembly = cq.Assembly()
assembly.add(result, material=cq.Material("mat1"))
I would be keen to then save this assembly to a step file and load it up again later.
assembly.export("assembly_step1.step")
I am then loading it up and looking for the materials but the "mat1" is not found in the assembly anymore. I have tried two ways
import cadquery as cq
cadquery_object = cq.Assembly().importStep('assembly_step1.step')
for child in cadquery_object.children:
print(child.material, child.material.name)
The child doesn't appear to have a material attribute.
I would be keen to be able to round trip the assembly so that I can save and load and get the same assembly back when loading
When making assembly objects I am making use of the option to add materials like this
I would be keen to then save this assembly to a step file and load it up again later.
I am then loading it up and looking for the materials but the "mat1" is not found in the assembly anymore. I have tried two ways
The child doesn't appear to have a
materialattribute.I would be keen to be able to round trip the assembly so that I can save and load and get the same assembly back when loading