Display tessellation: trimmed faces as four-sided patches (#303) (#1163)

Trimmed faces are cut into four-sided patches (squares around holes, butterflies for round faces, motorcycle traces from concave corners) and each is meshed as a Coons grid, with a cut grid as the fallback; cells are at most 2:1 along straight directions. Folded blends are refused rather than overlapped. The README lists display meshes and the gpu crate.
This commit is contained in:
Irakli Kourtis authored and GitHub committed 2026-10-14 15:01:05 -04:00
1 parent e519fbd14d
commit e3459edea8
11 files changed
+2068 -38

No files matched your search

+3 -1
View File
@@ -337,7 +337,9 @@ fn round_faces_of_every_kind_are_divided_by_the_angle() {
let check = |name: &str, b: &Body| {
let coarse = b.display_mesh(3.0).unwrap();
let round = b.display_mesh_angular(3.0, DISPLAY_ANGLE).unwrap();
assert!(turn(b, &coarse) > 2.0 * DISPLAY_ANGLE, "{name}: the chord tolerance leaves facets of {} degrees", turn(b, &coarse).to_degrees());
// The chord tolerance alone leaves facets coarser than the angle (the size rules' longest
// side and aspect limit already keep them near 40°), so the angle has work to do.
assert!(turn(b, &coarse) > 1.5 * DISPLAY_ANGLE, "{name}: the chord tolerance leaves facets of {} degrees", turn(b, &coarse).to_degrees());
// A side crosses at most one facet in each direction.
assert!(turn(b, &round) <= 1.5 * DISPLAY_ANGLE, "{name}: a side turns {} degrees", turn(b, &round).to_degrees());
assert_eq!(open_sides(&round, 1e-6), 0, "{name}");