forked from 1b-agent/fieldcraft-upstream
engine: geometry.stitch, imported surfaces stitched for meshing (#507)
geometry.stitch {name, surface, tolerance} records a stitch; the
surfaces keep what was read (TaggedSurface::original) and are stitched
again from it whenever a surface is imported, the model opened, or a
stitch added or deleted (geometry.stitch.delete). Opening a model also
warns about merges that no longer apply.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
1 parent
12b3128f53
commit
4e6fd59409
15 files changed
+259
-8
No files matched your search
@@ -231,7 +231,12 @@ impl Session {
|
||||
}
|
||||
});
|
||||
if let Some(d) = &design {
|
||||
warnings.extend(d.errors.iter().filter(|e| e.feature.starts_with("partition ")).map(|e| format!("{}: {}", e.feature, e.message)));
|
||||
warnings.extend(
|
||||
d.errors
|
||||
.iter()
|
||||
.filter(|e| e.feature.starts_with("partition ") || e.feature.starts_with("merge "))
|
||||
.map(|e| format!("{}: {}", e.feature, e.message)),
|
||||
);
|
||||
}
|
||||
sources.design = Some(source);
|
||||
}
|
||||
@@ -241,7 +246,7 @@ impl Session {
|
||||
surfaces.extend(opened.into_iter().flatten().map(Arc::new));
|
||||
sources.meshes.push(source);
|
||||
}
|
||||
let session = Session {
|
||||
let mut session = Session {
|
||||
model: file.model,
|
||||
design,
|
||||
surfaces,
|
||||
@@ -252,6 +257,8 @@ impl Session {
|
||||
view: file.view,
|
||||
..Session::default()
|
||||
};
|
||||
let (_, failed) = super::stitch::restitch(&mut session);
|
||||
warnings.extend(failed.into_iter().map(|(n, why)| format!("stitch `{n}`: {why}")));
|
||||
(session, warnings)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user