Complete hatch creation and editing workflow

This commit is contained in:
ramox81 committed 2026-08-21 12:57:19 +03:00
1 parent 573ed3245e
commit f83037271c
18 files changed
+1248 -338

No files matched your search

+19
View File
@@ -2057,6 +2057,25 @@ pub(super) fn aggregate_sections(
for sections in all_sections {
result = merge_sections(&result, &sections);
}
// Unlike ordinary common properties, cumulative area is an aggregate by
// definition. Preserve the individual Area row's "varies" state while
// summing every selected hatch's actual filled area (holes subtracted).
if selected.len() > 1
&& selected
.iter()
.all(|(_, entity)| matches!(entity, acadrust::EntityType::Hatch(_)))
{
let total = selected
.iter()
.filter_map(|(_, entity)| match entity {
acadrust::EntityType::Hatch(hatch) => {
Some(crate::entities::hatch::boundary_area(hatch))
}
_ => None,
})
.sum::<f64>();
set_row(&mut result, "cumulative_area", format!("{total:.4}"));
}
result
}