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 <noreply@anthropic.com>
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
@@ -34,6 +34,8 @@ pub enum Requirement {
|
||||
Partition,
|
||||
/// A face merge.
|
||||
FaceMerge,
|
||||
/// A stitch.
|
||||
Stitch,
|
||||
/// An edge seed.
|
||||
Seed,
|
||||
/// At least one mesh node.
|
||||
@@ -82,6 +84,7 @@ impl Requirement {
|
||||
Requirement::DatumPoint => m.datums().values().any(|d| d.point().is_some()),
|
||||
Requirement::Partition => !m.partitions().is_empty(),
|
||||
Requirement::FaceMerge => !m.face_merges().is_empty(),
|
||||
Requirement::Stitch => !m.stitches().is_empty(),
|
||||
Requirement::Seed => !m.seeds().is_empty(),
|
||||
Requirement::Nodes => !m.nodes().is_empty(),
|
||||
Requirement::Mesh => has_elements,
|
||||
@@ -123,6 +126,7 @@ impl Requirement {
|
||||
Requirement::DatumPoint => "a datum point",
|
||||
Requirement::Partition => "a partition",
|
||||
Requirement::FaceMerge => "a face merge",
|
||||
Requirement::Stitch => "a stitch",
|
||||
Requirement::Seed => "an edge seed",
|
||||
Requirement::Nodes => "mesh nodes",
|
||||
Requirement::Mesh | Requirement::Analysable => "a mesh",
|
||||
@@ -154,6 +158,7 @@ impl Requirement {
|
||||
Requirement::DatumPoint => "geometry.datum.point",
|
||||
Requirement::Partition => "geometry.partition",
|
||||
Requirement::FaceMerge => "geometry.faces.merge",
|
||||
Requirement::Stitch => "geometry.stitch",
|
||||
Requirement::Seed => "mesh.seed.edge",
|
||||
Requirement::Nodes => "mesh.node.add",
|
||||
Requirement::Mesh | Requirement::Analysable => "mesh.tet.generate",
|
||||
@@ -212,6 +217,7 @@ impl crate::schema::Collection {
|
||||
C::DatumPoint => Requirement::DatumPoint,
|
||||
C::Partition => Requirement::Partition,
|
||||
C::FaceMerge => Requirement::FaceMerge,
|
||||
C::Stitch => Requirement::Stitch,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -353,6 +359,7 @@ mod tests {
|
||||
C::DatumPoint,
|
||||
C::Partition,
|
||||
C::FaceMerge,
|
||||
C::Stitch,
|
||||
];
|
||||
let empty = Session::default();
|
||||
for c in all {
|
||||
|
||||
Reference in new issue
Block a user