forked from 1b-agent/fieldcraft-upstream
geometry: a feature that fails to rebuild names the bodies it changes, and opening warns
The design file stores no measure to compare with, so the rebuild's own failures are the guard: each failed feature lists the bodies it names (all of them when it names none), and geometry.open replies with a warning per failure, which the window shows with the open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
1 parent
ecd78b9ee6
commit
358ed2f54f
5 files changed
+61
-12
No files matched your search
@@ -104,7 +104,7 @@ impl Design {
|
||||
let feature = format!("partition {}", cut.name);
|
||||
for b in &cut.bodies {
|
||||
if !bodies.iter().any(|x| &x.name == b) {
|
||||
errors.push(FeatureError { feature: feature.clone(), message: format!("no body `{b}` to cut") });
|
||||
errors.push(FeatureError { feature: feature.clone(), message: format!("no body `{b}` to cut"), bodies: vec![b.clone()] });
|
||||
}
|
||||
}
|
||||
let mut report = CutReport { name: cut.name.clone(), split: Vec::new(), faces: 0 };
|
||||
@@ -123,7 +123,11 @@ impl Design {
|
||||
}
|
||||
None => {
|
||||
if listed {
|
||||
errors.push(FeatureError { feature: feature.clone(), message: format!("the plane does not divide `{}`", body.name) });
|
||||
errors.push(FeatureError {
|
||||
feature: feature.clone(),
|
||||
message: format!("the plane does not divide `{}`", body.name),
|
||||
bodies: vec![body.name.clone()],
|
||||
});
|
||||
}
|
||||
next.push(body);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user