forked from 1b-agent/opencadstudio-upstream
Restore region bounds and exact profile measurements after reload
This commit is contained in:
1 parent
7d0c059b30
commit
b42ae9d4a8
3 files changed
+34
-13
No files matched your search
@@ -1719,6 +1719,15 @@ pub(crate) fn set_wire_aabb(w: &mut WireModel, entity_box: [f32; 4]) {
|
||||
}
|
||||
|
||||
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,
|
||||
|
||||
Reference in new issue
Block a user