Model: datum points, drawn as a small cross; each definition's users are public

Datum::Point joins planes and axes (checked like them, refused by
partitions with the kind named). The users each remove_* refuses with
(sets, materials, boundary conditions, loads, reference points, fluid
domains, datums) are public functions, so a caller can list them before
deleting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 23:51:01 -04:00
1 parent c1fd58c6ce
commit 0bf150633c
9 files changed
+104 -30

No files matched your search

+6 -2
View File
@@ -222,10 +222,14 @@ impl Model {
replace_existing(&mut self.loads, "load", name, load)
}
/// The steps that list a load, as `step \`name\`` strings.
pub fn load_users(&self, name: &str) -> Vec<String> {
self.steps.iter().filter(|s| s.loads.contains(name)).map(|s| format!("step `{}`", s.name)).collect()
}
/// Remove a load that no step lists.
pub fn remove_load(&mut self, name: &str) -> Result<()> {
let users = self.steps.iter().filter(|s| s.loads.contains(name)).map(|s| format!("step `{}`", s.name)).collect();
not_in_use("load", name, users)?;
not_in_use("load", name, self.load_users(name))?;
remove_existing(&mut self.loads, "load", name).map(|_| ())
}
}