forked from 1b-agent/fieldcraft-upstream
mesh: projection and relaxation keep to a merged face's B-rep pieces
A merged face on several surfaces (a sliver absorbed into its neighbour) had no exact surface, so the projection target fell back to its triangles: flat curvature probes gave fewer divisions round the boss and the enclosure base's symmetric mesh dropped from 0.70 to 0.51 once its absorbs reached the cells. The target now projects a point of such a face onto the exact surface of the B-rep piece it is on, trimmed to that piece (Tessellation::with_pieces, Shape::tessellate_pieces); node relaxation slides on it the same way. Test from commands: the enclosure base's four slivers absorbed, meshed whole and by symmetry, the absorbs kept in every cell. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
1 parent
09385f069f
commit
a2e747b9ba
7 files changed
+186
-61
No files matched your search
@@ -286,7 +286,7 @@ pub(crate) fn open_body(s: &Session, name: &str, tolerance: Option<f64>, raw: &V
|
||||
let surface =
|
||||
BoundarySurface::new(&input.mesh.positions, &input.mesh.triangles, &input.mesh.tri_face, &super::mesh::surface_options(raw, &input.mesh)?)
|
||||
.map_err(|e| EngineError::Params(format!("body `{name}`: {e}")))?;
|
||||
let target = Tessellation::new(&surface, super::mesh::analytic_surfaces(shape));
|
||||
let target = Tessellation::new(&surface, super::mesh::analytic_surfaces(shape)).with_pieces(&surface, super::mesh::pieces(shape, &input.pieces));
|
||||
let m = shape.measure()?;
|
||||
Ok(Body { input, surface, target, lo: m.bbox_min, hi: m.bbox_max })
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user