feat(properties): fill solid-history + viewport clipped rows
Bump acadrust to ef0e231 (region/body history handle + viewport clip boundary now stored) and populate the rows the builders left blank: - Solid3D / Body "Show History": derived from the history handle's presence (there is no separate stored bool — the DWG carries only the H 350 history link). - Body "History": the history handle, matching how Solid3D already shows it. - Viewport "Clipped": Yes when the clip-boundary handle is non-NULL. Hatch Origin X/Y and Boundary retention stay blank by design: they are not part of the persisted AcDbHatch record in DWG or DXF (retention is a BHATCH command setting), so there is nothing to read. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
f50ad0dde4
commit
1523eda00f
3 changed files with 28 additions and 8 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -71,7 +71,7 @@ checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618"
|
|||
[[package]]
|
||||
name = "acadrust"
|
||||
version = "0.4.0"
|
||||
source = "git+https://github.com/HakanSeven12/acadrust?branch=main#a46cb8b3a2e5523bbd28e5afa0f8efb7ae291c50"
|
||||
source = "git+https://github.com/HakanSeven12/acadrust?branch=main#ef0e2310c3b2449cf28f8da02c22b831cdc4a50b"
|
||||
dependencies = [
|
||||
"ahash 0.8.12",
|
||||
"anyhow",
|
||||
|
|
|
|||
|
|
@ -107,16 +107,22 @@ impl Grippable for Solid3D {
|
|||
|
||||
impl PropertyEditable for Solid3D {
|
||||
fn geometry_properties(&self, _text_style_names: &[String]) -> Vec<PropSection> {
|
||||
let history = match self.history_handle {
|
||||
Some(h) if !h.is_null() => format!("{:X}", h.value()),
|
||||
_ => "None".to_string(),
|
||||
let has_history = matches!(self.history_handle, Some(h) if !h.is_null());
|
||||
let history = if has_history {
|
||||
format!("{:X}", self.history_handle.unwrap().value())
|
||||
} else {
|
||||
"None".to_string()
|
||||
};
|
||||
vec![
|
||||
PropSection {
|
||||
title: "Solid History".into(),
|
||||
props: vec![
|
||||
ro("History", "s3d_history", history),
|
||||
ro("Show History", "s3d_show_history", String::new()),
|
||||
ro(
|
||||
"Show History",
|
||||
"s3d_show_history",
|
||||
if has_history { "Yes" } else { "No" },
|
||||
),
|
||||
],
|
||||
},
|
||||
PropSection {
|
||||
|
|
@ -200,11 +206,21 @@ impl Grippable for Body {
|
|||
|
||||
impl PropertyEditable for Body {
|
||||
fn geometry_properties(&self, _text_style_names: &[String]) -> Vec<PropSection> {
|
||||
let has_history = matches!(self.history_handle, Some(h) if !h.is_null());
|
||||
let history = if has_history {
|
||||
format!("{:X}", self.history_handle.unwrap().value())
|
||||
} else {
|
||||
"None".to_string()
|
||||
};
|
||||
vec![PropSection {
|
||||
title: "Solid History".into(),
|
||||
props: vec![
|
||||
ro("History", "bdy_history", String::new()),
|
||||
ro("Show History", "bdy_show_history", String::new()),
|
||||
ro("History", "bdy_history", history),
|
||||
ro(
|
||||
"Show History",
|
||||
"bdy_show_history",
|
||||
if has_history { "Yes" } else { "No" },
|
||||
),
|
||||
],
|
||||
}]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,7 +129,11 @@ fn properties(vp: &Viewport) -> Vec<PropSection> {
|
|||
value: vp.status.is_on,
|
||||
},
|
||||
},
|
||||
ro("Clipped", "vp_clipped", String::new()),
|
||||
ro(
|
||||
"Clipped",
|
||||
"vp_clipped",
|
||||
if vp.clip_boundary_handle.is_null() { "No" } else { "Yes" },
|
||||
),
|
||||
Property {
|
||||
label: "Display locked".into(),
|
||||
field: "vp_locked",
|
||||
|
|
|
|||
Loading…
Reference in a new issue