Merge pull request #852 from ramox81/codex/complete-hatch-workflow

This commit is contained in:
Hakan Seven 2026-08-21 21:02:14 +03:00
commit bd5f9436ea
18 changed files with 1535 additions and 479 deletions

View file

@ -2092,6 +2092,23 @@ pub(super) fn aggregate_sections(
for sections in all_sections {
result = merge_sections(&result, &sections);
}
// Sum the filled area while individual Area rows may still vary.
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
}