Debug builds mesh seam faces and closed edges (vendored meshalgo)
Three step_in tests and two split tests failed in debug builds only: truck's debug_new asserts simple loops and two distinct end vertices, but faces whose loop runs a seam edge both ways and full-circle edges on one vertex are valid. Meshed faces and edges are now built unchecked. ci (release) was unaffected; the kernel tests pass in debug and release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AS5Tn3xieewUSg3uxrMVdL
This commit is contained in:
1 parent
0a6f6c4422
commit
998410de56
2 files changed
+8
-3
No files matched your search
Vendored
+3
@@ -34,6 +34,9 @@ Changes:
|
|||||||
## truck-meshalgo 0.4.0 (Apache-2.0, © RICOS Co. Ltd., https://github.com/ricosjp/truck)
|
## truck-meshalgo 0.4.0 (Apache-2.0, © RICOS Co. Ltd., https://github.com/ricosjp/truck)
|
||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
- `tessellation/triangulation.rs`: meshed faces and edges are built unchecked: faces whose loop
|
||||||
|
runs along a seam edge both ways and closed edges (a full circle on one vertex) are valid,
|
||||||
|
but the debug-build checks rejected them (debug builds could not mesh them).
|
||||||
- `tessellation/triangulation.rs`: parameter searches that land outside a surface's bounded,
|
- `tessellation/triangulation.rs`: parameter searches that land outside a surface's bounded,
|
||||||
non-periodic domain are rejected (a hinted B-spline search can run off and extrapolate to
|
non-periodic domain are rejected (a hinted B-spline search can run off and extrapolate to
|
||||||
thousands of parameter units, and meshing that grid never finishes); the last-resort nearest
|
thousands of parameter units, and meshing that grid never finishes); the last-resort nearest
|
||||||
|
|||||||
+5
-3
@@ -111,7 +111,7 @@ where
|
|||||||
let v1 = vmap.get(&edge.absolute_back().id()).unwrap();
|
let v1 = vmap.get(&edge.absolute_back().id()).unwrap();
|
||||||
let curve = edge.curve();
|
let curve = edge.curve();
|
||||||
let poly = bounded_polyline(&curve, curve.range_tuple(), tol);
|
let poly = bounded_polyline(&curve, curve.range_tuple(), tol);
|
||||||
(id, Edge::debug_new(v0, v1, poly))
|
(id, Edge::new_unchecked(v0, v1, poly))
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
let create_edge = |edge: &Edge<Point3, C>| -> Edge<_, _> {
|
let create_edge = |edge: &Edge<Point3, C>| -> Edge<_, _> {
|
||||||
@@ -161,7 +161,7 @@ where
|
|||||||
let v1 = vmap.entry_or_insert(vb).clone();
|
let v1 = vmap.entry_or_insert(vb).clone();
|
||||||
let curve = edge.curve();
|
let curve = edge.curve();
|
||||||
let poly = bounded_polyline(&curve, curve.range_tuple(), tol);
|
let poly = bounded_polyline(&curve, curve.range_tuple(), tol);
|
||||||
Edge::debug_new(&v0, &v1, poly)
|
Edge::new_unchecked(&v0, &v1, poly)
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
let mut create_edge = move |edge: &'a Edge<Point3, C>| -> Edge<_, _> {
|
let mut create_edge = move |edge: &'a Edge<Point3, C>| -> Edge<_, _> {
|
||||||
@@ -260,7 +260,9 @@ fn shell_create_polygon<S: PreMeshableSurface>(
|
|||||||
let boundary = PolyBoundary::new(preboundary?, &surface, tol);
|
let boundary = PolyBoundary::new(preboundary?, &surface, tol);
|
||||||
Some(trimming_tessellation(surface, &boundary, tol, cap))
|
Some(trimming_tessellation(surface, &boundary, tol, cap))
|
||||||
})();
|
})();
|
||||||
let mut new_face = Face::debug_new(wires, polygon);
|
// SolveCraft: faces with seam edges (a loop running along an edge both ways, as STEP
|
||||||
|
// writes cylinders) are valid here; `debug_new` asserts simple loops in debug builds.
|
||||||
|
let mut new_face = Face::new_unchecked(wires, polygon);
|
||||||
if !orientation {
|
if !orientation {
|
||||||
new_face.invert();
|
new_face.invert();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user