Timeline editing: double-click or Edit Feature reopens the feature's dialog filled in (model rolled back to it, references highlighted) and rebuilds it in place; history marker drag; drag to reorder with dependency checks; context menu (edit, edit profile sketch, rename, suppress, roll marker here, find in browser, delete with dependents); hover links timeline and geometry; fillet edges and hole positions re-resolve after upstream edits (warnings when moved)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AS5Tn3xieewUSg3uxrMVdL
This commit is contained in:
1 parent
97e73b0935
commit
9dfd7cad60
10 files changed
+876
-47
No files matched your search
@@ -191,6 +191,31 @@ impl SolveApp {
|
||||
let _ = self.run(id, json!({}));
|
||||
}
|
||||
|
||||
/// Edit a feature the way Fusion does: sketches open in sketch mode; other features roll the
|
||||
/// timeline back to just before themselves and reopen their dialog, filled in.
|
||||
pub fn edit_feature(&mut self, id: u64) {
|
||||
use solvecraft_engine::doc::FeatureKind;
|
||||
let Some(f) = self.session.doc.feature(id) else { return };
|
||||
if matches!(f.kind, FeatureKind::Sketch { .. }) {
|
||||
let _ = self.run("SketchActivate", json!({ "sketch": id }));
|
||||
return;
|
||||
}
|
||||
let Some(idx) = self.session.doc.feature_index(id) else { return };
|
||||
let marker = self.session.doc.marker;
|
||||
self.tool = None;
|
||||
if self.run("timeline.rollTo", json!({ "position": idx })).is_err() {
|
||||
return;
|
||||
}
|
||||
match dialogs::for_feature(self, id, marker) {
|
||||
Some(d) => self.dialog = Some(d),
|
||||
None => {
|
||||
let _ = self.run("timeline.rollTo", marker.map(|m| json!({ "position": m })).unwrap_or_else(|| json!({})));
|
||||
self.palette.text = format!("timeline.edit {{\"feature\": {id}, \"set\": {{}}}}");
|
||||
self.ui.palette_open = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Everything shown as selected: the selection plus the open dialog's inputs.
|
||||
pub fn highlighted(&self) -> Vec<solvecraft_engine::Sel> {
|
||||
let mut v = self.session.selection.clone();
|
||||
|
||||
Reference in new issue
Block a user