forked from 1b-agent/fieldcraft-upstream
engine: geometry.faces.merge, faces meshed as one (virtual topology, #505)
geometry.faces.merge {name, faces} records a face merge in the model;
it is applied after the partitions whenever the design is opened or cut
again, undoes through the journal and is saved with the model. Meshers,
mesh.plan (features and rings see merge:<name>; a merged face is
prismatic when its B-rep faces are), checks and the viewport see one
face, drawn in the warm colour. geometry.faces.merge.delete removes it.
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
22d709e604
commit
ce02d263c7
17 files changed
+464
-22
No files matched your search
@@ -32,6 +32,8 @@ pub enum Requirement {
|
||||
DatumPoint,
|
||||
/// A partition of the design.
|
||||
Partition,
|
||||
/// A face merge.
|
||||
FaceMerge,
|
||||
/// An edge seed.
|
||||
Seed,
|
||||
/// At least one mesh node.
|
||||
@@ -79,6 +81,7 @@ impl Requirement {
|
||||
Requirement::DatumAxis => m.datums().values().any(|d| d.axis().is_some()),
|
||||
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::Seed => !m.seeds().is_empty(),
|
||||
Requirement::Nodes => !m.nodes().is_empty(),
|
||||
Requirement::Mesh => has_elements,
|
||||
@@ -119,6 +122,7 @@ impl Requirement {
|
||||
Requirement::DatumAxis => "a datum axis",
|
||||
Requirement::DatumPoint => "a datum point",
|
||||
Requirement::Partition => "a partition",
|
||||
Requirement::FaceMerge => "a face merge",
|
||||
Requirement::Seed => "an edge seed",
|
||||
Requirement::Nodes => "mesh nodes",
|
||||
Requirement::Mesh | Requirement::Analysable => "a mesh",
|
||||
@@ -149,6 +153,7 @@ impl Requirement {
|
||||
Requirement::DatumAxis => "geometry.datum.axis",
|
||||
Requirement::DatumPoint => "geometry.datum.point",
|
||||
Requirement::Partition => "geometry.partition",
|
||||
Requirement::FaceMerge => "geometry.faces.merge",
|
||||
Requirement::Seed => "mesh.seed.edge",
|
||||
Requirement::Nodes => "mesh.node.add",
|
||||
Requirement::Mesh | Requirement::Analysable => "mesh.tet.generate",
|
||||
@@ -206,6 +211,7 @@ impl crate::schema::Collection {
|
||||
C::DatumAxis => Requirement::DatumAxis,
|
||||
C::DatumPoint => Requirement::DatumPoint,
|
||||
C::Partition => Requirement::Partition,
|
||||
C::FaceMerge => Requirement::FaceMerge,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -346,6 +352,7 @@ mod tests {
|
||||
C::DatumAxis,
|
||||
C::DatumPoint,
|
||||
C::Partition,
|
||||
C::FaceMerge,
|
||||
];
|
||||
let empty = Session::default();
|
||||
for c in all {
|
||||
|
||||
Reference in new issue
Block a user