Merge pull request #852 from ramox81/codex/complete-hatch-workflow
This commit is contained in:
commit
bd5f9436ea
18 changed files with 1535 additions and 479 deletions
|
|
@ -2092,6 +2092,23 @@ pub(super) fn aggregate_sections(
|
|||
for sections in all_sections {
|
||||
result = merge_sections(&result, §ions);
|
||||
}
|
||||
// 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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue