PDF underlays: attach prompts and definitions, display adjustments and clipping, Properties, snapping, PDFCLIP and PDFIMPORT

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ramox81andClaude Opus 5.5 committed 2026-09-24 16:00:12 +03:00
1 parent cc9d5edbff
commit 0c50013ca7
50 files changed
+2770 -325

No files matched your search

+28 -18
View File
@@ -1479,25 +1479,29 @@ impl OpenCADStudio {
);
}
}
// Underlay: name + path from the referenced definition.
// Underlay: name, page, path and size from the definition.
acadrust::EntityType::Underlay(ul) => {
if let Some((name, path)) =
doc.objects.iter().find_map(|(h, o)| match o {
acadrust::objects::ObjectType::UnderlayDefinition(def)
if *h == ul.definition_handle =>
{
let nm = if !def.name.is_empty() {
def.name.clone()
} else {
def.page_name.clone()
};
Some((nm, def.file_path.clone()))
}
_ => None,
})
{
set_row(&mut sections, "ul_name", name);
set_row(&mut sections, "ul_path", path);
use crate::entities::underlay as und;
if let Some(def) = und::definition(ul, doc) {
set_row(&mut sections, "ul_name", und::definition_display_name(def));
set_row(&mut sections, "ul_page", und::page_of(def).to_string());
set_row(
&mut sections,
"ul_path",
und::display_path(&def.file_path),
);
}
if let Some((w, h)) = und::shown_size(ul, doc) {
set_row_value(
&mut sections,
"ul_width",
crate::scene::model::object::PropValue::EditText(und::plain_number(w)),
);
set_row_value(
&mut sections,
"ul_height",
crate::scene::model::object::PropValue::EditText(und::plain_number(h)),
);
}
}
// Leader: text style / vertical text placement / overall
@@ -2336,6 +2340,12 @@ impl OpenCADStudio {
acadrust::EntityType::Dimension(
acadrust::entities::Dimension::Angular3Pt(_),
) => t!("3 Point Angular Dimension").into_owned(),
acadrust::EntityType::Underlay(underlay) => match underlay.underlay_type {
acadrust::entities::UnderlayType::Pdf => t!("PDF Underlay"),
acadrust::entities::UnderlayType::Dwf => t!("DWF Underlay"),
acadrust::entities::UnderlayType::Dgn => t!("DGN Underlay"),
}
.into_owned(),
_ => entity_type_label(entity),
};
// A dynamic dimension shows only its constraint and text