Engine: geometry.datum, geometry.datum.axis and geometry.partition

Datum planes by principal plane and offset, three points, or point and
normal; datum axes by principal axis, two points, or point and direction.
geometry.partition cuts the open design by a datum plane and keeps the
partition in the model, so geometry.open, file.open and undo cut the design
again. Requirements, forms and the Prepare entries are wired; features.md
lists them as ready.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
jyvikoandClaude Opus 5.5 authored and Irakli Kourtis committed 2026-10-14 19:37:37 -04:00
1 parent b0d0fc9900
commit 1c16972cf2
10 files changed
+497 -8

No files matched your search

+11
View File
@@ -118,6 +118,11 @@ pub enum Collection {
SolvedStep,
/// A body of the open design.
Body,
/// A datum plane or axis.
Datum,
/// A datum plane.
DatumPlane,
Partition,
}
impl Collection {
@@ -138,6 +143,9 @@ impl Collection {
Collection::Step => "step",
Collection::SolvedStep => "solved step",
Collection::Body => "body",
Collection::Datum => "datum",
Collection::DatumPlane => "datum plane",
Collection::Partition => "partition",
}
}
}
@@ -162,6 +170,9 @@ impl Session {
Collection::Step => Box::new(m.steps().iter().map(|s| s.name.as_str())),
Collection::SolvedStep => Box::new(self.solved_steps()),
Collection::Body => Box::new(self.design.iter().flat_map(|d| d.bodies.iter().map(|b| b.name.as_str()))),
Collection::Datum => Box::new(m.datums().keys().map(String::as_str)),
Collection::DatumPlane => Box::new(m.datums().iter().filter(|(_, d)| d.plane().is_some()).map(|(n, _)| n.as_str())),
Collection::Partition => Box::new(m.partitions().iter().map(|p| p.name.as_str())),
};
names.take(MAX_NAMES).map(str::to_string).collect()
}