Merge pull request #1206 from Ramox81/codex/fix-region-measurement-persistence-20260911

This commit is contained in:
Hakan Seven committed 2026-09-11 16:08:10 +03:00
commit c4506bf0d9
4 files changed
+73 -28

No files matched your search

+10 -1
View File
@@ -1718,7 +1718,16 @@ pub(crate) fn set_wire_aabb(w: &mut WireModel, entity_box: [f32; 4]) {
w.aabb = out;
}
fn entity_bounds(e: &acadrust::EntityType) -> ([f64; 3], [f64; 3]) {
pub(crate) fn entity_bounds(e: &acadrust::EntityType) -> ([f64; 3], [f64; 3]) {
if let acadrust::EntityType::Region(region) = e {
if region.wires.is_empty() {
if let Some(bounds) = super::solid3d_tess::kernel_region_body(region)
.and_then(|body| cadkernel::brep::body_bounds(&body))
{
return (bounds.min, bounds.max);
}
}
}
if let acadrust::EntityType::Line(line) = e {
if let Some(association) = acadrust::entities::CenterMarkAssociation::read(
&line.common.extended_data,