Open
Description
When nesting compounds are used, the labels are lost when exporting.
Example:
cube = Box(1,1,1)
cube.label = 'Cube'
arm = Compound(
label="Arm",
children=[
copy.copy(cube),
]
)
assembly = Compound(
label="Root",
children=[
copy.copy(arm),
copy.copy(arm).locate(Pos(10,0,0))
]
)
print(assembly.show_topology())
build123d.export_step(assembly, 'build/assembly.step')
Shows correct topology tree:
Root Compound at 0x74cc4dde22b0, Location(p=(0.00, 0.00, 0.00), o=(-0.00, 0.00, -0.00))
├── Arm Compound at 0x74cc4dde1db0, Location(p=(0.00, 0.00, 0.00), o=(-0.00, 0.00, -0.00))
│ └── Cube Box at 0x74cc4de24a10, Location(p=(0.00, 0.00, 0.00), o=(-0.00, 0.00, -0.00))
└── Arm Compound at 0x74cc4dde2850, Location(p=(10.00, 0.00, 0.00), o=(-0.00, 0.00, -0.00))
└── Cube Box at 0x74cc4de24ad0, Location(p=(0.00, 0.00, 0.00), o=(-0.00, 0.00, -0.00))
But if opened in any external program the step file looks more like this:
Applying the fix in #953 gets us closer to the correct result:
Unfortunately it still leaves the Solids unnamed which is not optimal.
Ideally it would end up like this: