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
@@ -516,3 +516,13 @@ fn two_dimensional_models_resolve_edges_and_check_their_rules() {
|
||||
assert!(m.add_load("hostile", bad.clone()).is_err(), "{bad:?}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn display_resolves_what_is_on_the_mesh() {
|
||||
let mut m = defined();
|
||||
// A set with a node the mesh does not have: the check refuses it, the display shows the rest.
|
||||
m.add_set("half", Set { nodes: vec![1, 999], ..Set::default() }).unwrap();
|
||||
assert!(m.resolve_set("half").is_err());
|
||||
assert_eq!(m.resolve_set_partial("half").map(|r| r.nodes), Some(vec![1]));
|
||||
assert_eq!(m.resolve_set_partial("nope"), None);
|
||||
}
|
||||
Reference in new issue
Block a user