SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.
Debug builds mesh seam faces and closed edges (vendored meshalgo)
bherbruck998410de56d1
diff --git a/vendor/README.md b/vendor/README.mdindex 7e8cf09cc5..229a7e85b0 100644--- a/vendor/README.md+++ b/vendor/README.md@@ -34,6 +34,9 @@ Changes:## truck-meshalgo 0.4.0 (Apache-2.0, © RICOS Co. Ltd., https://github.com/ricosjp/truck)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,non-periodic domain are rejected (a hinted B-spline search can run off and extrapolate tothousands of parameter units, and meshing that grid never finishes); the last-resort nearestdiff --git a/vendor/truck-meshalgo/src/tessellation/triangulation.rs b/vendor/truck-meshalgo/src/tessellation/triangulation.rsindex ff259840a3..13fe3a43a4 100644--- a/vendor/truck-meshalgo/src/tessellation/triangulation.rs+++ b/vendor/truck-meshalgo/src/tessellation/triangulation.rs@@ -111,7 +111,7 @@ wherelet v1 = vmap.get(&edge.absolute_back().id()).unwrap();let curve = edge.curve();let poly = bounded_polyline(&curve, curve.range_tuple(), tol);- (id, Edge::debug_new(v0, v1, poly))+ (id, Edge::new_unchecked(v0, v1, poly))}).collect();let create_edge = |edge: &Edge<Point3, C>| -> Edge<_, _> {@@ -161,7 +161,7 @@ wherelet v1 = vmap.entry_or_insert(vb).clone();let curve = edge.curve();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<_, _> {@@ -260,7 +260,9 @@ fn shell_create_polygon<S: PreMeshableSurface>(let boundary = PolyBoundary::new(preboundary?, &surface, tol);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 {new_face.invert();}