forked from 1b-agent/opencadstudio-upstream
fix(solids): box and wedge histories framed at the bounding-box centre; no second transform after ACIS lift
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a21aef2a11
commit
07facf465c
6 files changed
+74
-35
No files matched your search
@@ -1,6 +1,6 @@
|
||||
use codec::entities::acis::{SabReader, SatBody, SatDocument};
|
||||
use codec::entities::{Body, Region, Solid3D, Surface};
|
||||
use kernel::brep::{self, Body as KernelBody};
|
||||
use kernel::brep::Body as KernelBody;
|
||||
|
||||
use crate::scene::model::mesh_model::{MeshLodSet, MeshModel};
|
||||
|
||||
@@ -179,21 +179,8 @@ pub(crate) fn kernel_acis_body(acis: &codec::entities::AcisData) -> Option<Kerne
|
||||
if !loss.is_empty() || bodies.len() != 1 {
|
||||
return None;
|
||||
}
|
||||
let body = bodies.pop()?;
|
||||
let source = body.provenance.source()?;
|
||||
let Some((matrix, translation, scale)) = body_transform(&sat, source.index() as usize).ok()?
|
||||
else {
|
||||
return Some(body);
|
||||
};
|
||||
brep::transform(
|
||||
&body,
|
||||
&brep::Placement {
|
||||
x_axis: [scale * matrix[0], scale * matrix[1], scale * matrix[2]],
|
||||
y_axis: [scale * matrix[3], scale * matrix[4], scale * matrix[5]],
|
||||
z_axis: [scale * matrix[6], scale * matrix[7], scale * matrix[8]],
|
||||
origin: translation,
|
||||
},
|
||||
)
|
||||
// The kernel's lift already applies the body's transform record.
|
||||
bodies.pop()
|
||||
}
|
||||
|
||||
fn remap_acis_material_bindings(
|
||||
|
||||
Reference in new issue
Block a user