forked from 1b-agent/fieldcraft-upstream
model: resolve_set_partial, and the rotating-node rule as Model::rotational_nodes
resolve_set_partial resolves the members of a set that are on the mesh, for display: a set with a missing member still shows what it has, where resolve_set refuses it. rotational_nodes is the check's rule for which nodes have rotations (shell and beam nodes, not those of 2D sections), so the viewport's symbols and the check agree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm
This commit is contained in:
1 parent
73f35bd7f7
commit
95c02bc728
3 files changed
+29
-7
No files matched your search
@@ -138,6 +138,13 @@ impl Model {
|
||||
if missing.is_empty() { Ok(resolved) } else { Err(Error::NotFound(format!("set `{name}`: {}", missing.join("; ")))) }
|
||||
}
|
||||
|
||||
/// Resolve one set against the current mesh, leaving out the members that are not on it
|
||||
/// (for display: a set with a missing member still shows what it has). `None` when there is
|
||||
/// no set called `name`.
|
||||
pub fn resolve_set_partial(&self, name: &str) -> Option<ResolvedSet> {
|
||||
self.sets.get(name).map(|set| self.resolve_definition(set).0)
|
||||
}
|
||||
|
||||
/// Resolve a definition, and list the members that are not on the mesh.
|
||||
pub(crate) fn resolve_definition(&self, set: &Set) -> (ResolvedSet, Vec<String>) {
|
||||
let c = &self.classification;
|
||||
|
||||
Reference in new issue
Block a user