forked from 1b-agent/opencadstudio-upstream
Complete hatch creation and editing workflow
This commit is contained in:
1 parent
573ed3245e
commit
f83037271c
18 files changed
+1248
-338
No files matched your search
@@ -2057,6 +2057,25 @@ pub(super) fn aggregate_sections(
|
||||
for sections in all_sections {
|
||||
result = merge_sections(&result, §ions);
|
||||
}
|
||||
// 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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user