DGNIMPORT: reference naming, cells, text placement, curves, references

Name clashes, DGNIMPORTMODE and prefixing as the reference names them;
V7 cell copies, unshared cells and mirrored placements as blocks;
justified text and text nodes placed at their justification points with
the reference's MTEXT contents; B-spline curves as splines and 3D arcs and
ellipses in their own planes; every V8 level as a layer; design models
only; reference attachments translated, ignored or attached as underlays.
The colour index palette comes from the codec fix it depends on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
ramox81andClaude Opus 5.5 committed 2026-10-16 14:33:07 +03:00
1 parent 218150c76a
commit 6fdff6c515
38 files changed
+1774 -437

No files matched your search

+36
View File
@@ -1223,6 +1223,7 @@ impl OpenCADStudio {
| "SELECTIONCYCLING"
| "UCSDETECT"
| "SURFACEASSOCIATIVITY"
| "DGNIMPORTMODE"
| "UCSORTHO"
| "UCSVIEW"
| "LAYOUTCREATEVIEWPORT"
@@ -1622,6 +1623,41 @@ impl OpenCADStudio {
}
return Some(self.finish_dispatch(cmd));
}
if name == "DGNIMPORTMODE" {
// Where DGNIMPORT puts the model: 0 a new drawing, 1 the
// current one keeping its definitions, 2 the current one
// with prefixed names.
use crate::modules::insert::dgn_import::{set_settings, settings};
let mut s = settings();
let current = s.mode;
match value
.as_deref()
.map(|v| v.trim().parse::<u8>().ok().filter(|v| *v <= 2))
{
Some(Some(mode)) => {
if current != mode {
s.mode = mode;
set_settings(s);
self.save_config();
}
}
Some(None) => {
self.command_line
.push_error("Requires an integer between 0 and 2.");
self.command_line.push_output(&format!(
"Enter new value for DGNIMPORTMODE <{current}>:"
));
self.pending_setvar = Some(name.clone());
}
None => {
self.command_line.push_output(&format!(
"Enter new value for DGNIMPORTMODE <{current}>:"
));
self.pending_setvar = Some(name.clone());
}
}
return Some(self.finish_dispatch(cmd));
}
if name == "SURFACEASSOCIATIVITY" {
use crate::scene::model::sweep_model;
let current = i16::from(sweep_model::surface_associativity());