forked from 1b-agent/fieldcraft-upstream
Engine: geometry.datum.point; planes and axes through datum points; datum edits and cascading delete
A datum point by coordinates, at a mesh vertex, a fraction along a design edge, at a face's centre, or where a datum axis crosses a datum plane. Datum planes take three datum points or a normal to a datum axis; axes take two datum points. geometry.datum.edit, .axis.edit and .point.edit redefine a datum of their kind (partitions cut again); geometry.datum.delete with cascade also deletes the partitions that cut by it. The ribbon shows Datum Plane, Datum Axis, Datum Point and Partition, each with its own icon; edit and delete leave the ribbon (still commands, claimed by their entries). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
1 parent
fbaba5fecd
commit
d9824de4a5
14 files changed
+513
-36
No files matched your search
@@ -124,10 +124,14 @@ pub enum Collection {
|
||||
SolvedStep,
|
||||
/// A body of the open design.
|
||||
Body,
|
||||
/// A datum plane or axis.
|
||||
/// A datum plane, axis or point.
|
||||
Datum,
|
||||
/// A datum plane.
|
||||
DatumPlane,
|
||||
/// A datum axis.
|
||||
DatumAxis,
|
||||
/// A datum point.
|
||||
DatumPoint,
|
||||
Partition,
|
||||
}
|
||||
|
||||
@@ -151,6 +155,8 @@ impl Collection {
|
||||
Collection::Body => "body",
|
||||
Collection::Datum => "datum",
|
||||
Collection::DatumPlane => "datum plane",
|
||||
Collection::DatumAxis => "datum axis",
|
||||
Collection::DatumPoint => "datum point",
|
||||
Collection::Partition => "partition",
|
||||
}
|
||||
}
|
||||
@@ -178,6 +184,8 @@ impl Session {
|
||||
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::DatumAxis => Box::new(m.datums().iter().filter(|(_, d)| d.axis().is_some()).map(|(n, _)| n.as_str())),
|
||||
Collection::DatumPoint => Box::new(m.datums().iter().filter(|(_, d)| d.point().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()
|
||||
|
||||
Reference in new issue
Block a user