TRIM / EXTEND: Standard mode and TRIMEXTENDMODE (#1733)

Both commands gain a mOde option [Quick/Standard]. Quick (the default)
starts ready to pick, every object a cutting or boundary edge; Standard
starts by selecting those edges, Enter with none taking every object.
The choice is TRIMEXTENDMODE (1 Quick, 0 Standard), kept in the profile
and settable with SETVAR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-10-15 01:25:35 +03:00
1 parent 7f411bc02d
commit 368dd0d7a5
5 files changed
+135 -4

No files matched your search

+1
View File
@@ -756,6 +756,7 @@ inventory::submit!(crate::command::CommandRegistration {
"UOSNAP",
"FIELDDISPLAY",
"FILEDIA",
"TRIMEXTENDMODE",
"SURFACEASSOCIATIVITY",
"LAYOUTCREATEVIEWPORT",
"FIELDEVAL",
+28
View File
@@ -1214,6 +1214,7 @@ impl OpenCADStudio {
| "UOSNAP"
| "FIELDDISPLAY"
| "FILEDIA"
| "TRIMEXTENDMODE"
| "SURFACEASSOCIATIVITY"
| "UCSORTHO"
| "UCSVIEW"
@@ -1603,6 +1604,33 @@ impl OpenCADStudio {
}
return Some(self.finish_dispatch(cmd));
}
if name == "TRIMEXTENDMODE" {
use crate::modules::draw::modify::trim;
let current = i16::from(trim::quick_mode());
let prompt = format!("Enter new value for TRIMEXTENDMODE <{current}>:");
match value
.as_deref()
.map(|v| v.trim().parse::<i16>().ok().filter(|v| (0..=1).contains(v)))
{
Some(Some(mode)) => {
if current != mode {
trim::set_quick_mode(mode == 1);
self.save_config();
}
}
Some(None) => {
self.command_line
.push_error(crate::t!("Requires 0 or 1 only.").as_ref());
self.command_line.push_output(&prompt);
self.pending_setvar = Some(name.clone());
}
None => {
self.command_line.push_output(&prompt);
self.pending_setvar = Some(name.clone());
}
}
return Some(self.finish_dispatch(cmd));
}
if name == "FILEDIA" {
let current = i16::from(crate::sys::file_dia());
match value