fix: write each lump of a body as its own STEP solid (#455)
A body of several pieces (a plate and the islands a cut leaves inside its holes, such as letter counters) was written as one BREP_WITH_VOIDS whose other shells were voids. Export now writes one solid per lump, each with its face colours; a real void stays a void of its lump. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6fde5ff55b
commit
455ca86a6c
2 files changed
+85
-20
No files matched your search
@@ -115,7 +115,9 @@ fn curved_internal_void_and_disconnected_material_keep_analytic_volume() {
|
||||
}
|
||||
let imported = step_import(&step_export(&[&body], "curved nested cavities").unwrap()).unwrap();
|
||||
assert!(imported.warnings.is_empty(), "{:?}", imported.warnings);
|
||||
let imported: Vec<_> = imported.bodies.into_iter().flat_map(|b| b.body.lumps().unwrap()).collect();
|
||||
// The two pieces are written as two solids (each with its own void), so they come back as
|
||||
// two bodies.
|
||||
let imported: Vec<_> = imported.bodies.into_iter().map(|b| b.body).collect();
|
||||
assert_eq!(imported.len(), 2);
|
||||
let imported_meshes: Vec<_> = imported.iter().map(|b| b.tessellate_with(0.01, true).unwrap()).collect();
|
||||
for (p, want) in [(Vec3::ZERO, 0), (Vec3::X * 3.0, 1), (Vec3::X * 7.0, 0), (Vec3::X * 15.0, 1)] {
|
||||
|
||||
Reference in new issue
Block a user