SWEEP: Expression option, reference prompts and localized messages

- Scale and Twist take an Expression evaluated with the drawing's
  parameters; invalid input prints the reference message and asks again.
- The scale and twist prompts use the reference wording and defaults.
- The SWEEP prompts and refusal messages are in the locale catalog with
  translations in every locale.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
ramox81andClaude Opus 5.5 committed 2026-10-07 10:15:32 +03:00
1 parent 1a18fdd0cf
commit 56f3f68de9
27 files changed
+346 -64

No files matched your search

+3 -3
View File
@@ -519,8 +519,8 @@ impl OpenCADStudio {
Ok(value) => value,
Err(code) => {
if let Some(code) = code {
self.command_line.push_output(&format!("Modeling Operation Error:
Error Code Number is {code}"));
self.command_line.push_output(crate::t!("Modeling Operation Error:").as_ref());
self.command_line.push_output(crate::tf!("Error Code Number is {code}", code = code).as_ref());
}
failed += 1;
continue;
@@ -564,7 +564,7 @@ Error Code Number is {code}"));
self.tabs[i].dirty = true;
}
if failed > 0 {
self.command_line.push_output(&format!("Unable to sweep {failed} selected objects."));
self.command_line.push_output(crate::tf!("Unable to sweep {failed} selected objects.", failed = failed).as_ref());
}
if let Some(pending) = pending {
self.commit_undo_delta(i, pending);
+1
View File
@@ -817,6 +817,7 @@ impl OpenCADStudio {
let color = self.tabs[i].scene.layer_color(&self.tabs[i].active_layer);
let isolines = crate::entities::solid3d::clamp_header_isolines(self.tabs[i].scene.document.header.isolines);
let mut cmd = SweepCommand::new(color, isolines);
cmd.set_parameters(self.tabs[i].scene.named_parameters().clone());
let selected = self.tabs[i].scene.selected_handles_in_order()
.into_iter()
.filter_map(|handle| self.tabs[i].scene.document.get_entity(handle)
+4 -4
View File
@@ -3947,10 +3947,10 @@ pub(super) fn on_tab_close(&mut self, idx: usize) -> Task<Message> {
.scene
.solid_history_property_refusal(handle, field, &val)
{
self.command_line.push_output(&format!(
"Modeling Operation Error:
Error Code Number is {code}"
));
self.command_line.push_output(crate::t!("Modeling Operation Error:").as_ref());
self.command_line.push_output(
crate::tf!("Error Code Number is {code}", code = code).as_ref(),
);
}
}
} else if self.tabs[i]