Complete SUBTRACT behavior

This commit is contained in:
ramox81 committed 2026-09-07 13:58:31 +03:00
1 parent 5857ffa2bd
commit 04a9a1b0a0
10 files changed
+562 -69

No files matched your search

+19 -7
View File
@@ -222,11 +222,9 @@ pub fn has_compact_solid_properties(
document: &acadrust::CadDocument,
handle: acadrust::Handle,
) -> bool {
has_specialized_primitive_properties(document, handle)
|| matches!(
document.solid_history_operation(handle),
Some(SolidHistoryOperation::Brep(_))
)
document
.get_entity(handle)
.is_some_and(|entity| matches!(entity, acadrust::EntityType::Solid3D(_)))
}
pub fn reference_point(operation: &SolidHistoryOperation) -> Option<glam::DVec3> {
@@ -1441,7 +1439,21 @@ pub fn primitive_properties(
handle: acadrust::Handle,
) -> Vec<PropSection> {
let Some(operation) = document.solid_history_operation(handle) else {
return Vec::new();
return vec![PropSection {
title: t!("Solid History").into_owned(),
props: vec![
Property {
label: t!("History").into_owned(),
field: PROP_HISTORY,
value: PropValue::ReadOnly("None".to_string()),
},
Property {
label: t!("Show History").into_owned(),
field: PROP_SHOW_HISTORY,
value: PropValue::ReadOnly("No".to_string()),
},
],
}];
};
match operation {
SolidHistoryOperation::Box(value) => {
@@ -1462,7 +1474,7 @@ pub fn primitive_properties(
}
SolidHistoryOperation::Revolve(value) => revolve_properties(document, handle, value),
SolidHistoryOperation::Brep(_) => brep_properties(document, handle),
_ => Vec::new(),
_ => brep_properties(document, handle),
}
}