forked from 1b-agent/fieldcraft-upstream
geometry: a face split along a plane for meshing only (#508)
The face's triangles are cut along the plane, split:<name>:a on its negative side and :b on the other, both on the face's surface, with the cut as a new edge between them and the face's edges cut where the plane crosses them. Applied after the merges; the B-rep is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
1 parent
59a02b0172
commit
e8e3fc647c
5 files changed
+438
-7
No files matched your search
@@ -277,7 +277,7 @@ fn split(body: &Shape, plane: &Plane, n: [f64; 3], cut: &Cut) -> Result<Split> {
|
||||
let parent = Faces::of(body, tol)?;
|
||||
let mut cells: Vec<(bool, [f64; 3], Shape)> = Vec::with_capacity(parts.len());
|
||||
for part in parts {
|
||||
let mut shape = Shape { name: String::new(), body: part, faces: Vec::new(), face_map: Vec::new() };
|
||||
let mut shape = Shape { name: String::new(), body: part, faces: Vec::new(), face_map: Vec::new(), cuts: Vec::new() };
|
||||
let m = shape.measure()?;
|
||||
let negative = dot(sub(m.centroid, cut.point), n) < 0.0;
|
||||
shape.faces = (0..m.faces).map(|_| Face { name: String::new(), exact: false, members: Vec::new() }).collect();
|
||||
|
||||
Reference in new issue
Block a user