1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//! Watertight, chord-tolerance-driven BREP tessellation.
//!
//! The classic per-face tessellator samples every face independently, so
//! adjacent faces disagree along their shared edge and the mesh has cracks.
//! Here every EDGE is sampled once — adaptively, until the 3D chord sag is
//! below the chord tolerance — and both adjacent faces consume the exact
//! same sample positions (endpoints come from the shared vertex records), so
//! coincidence along shared edges holds bit-for-bit by construction. Each
//! face is then triangulated in parameter space: trim loops built from the
//! shared samples (holes bridged to the outer loop), ear clipping, then
//! conforming interior-edge splits until interior chords also meet the
//! tolerance. Boundary edges are never split, so no T-junctions can appear.
use crate;
use crate::;
use FxHashMap;
use ;
use *;
use *;
use *;
use *;
use *;
use tessellate_pointed_cone_fan;
use *;
use *;
use *;
/// `BREP_TESS_PINCH_CUSP` (default on, `=0` restores): the watertight mesher meets a face whose
/// boundary points touch at zero angle (a cusp) or a shell pinched to a point (
/// brep-bench tangent/midsphere-common and tangent/viviani-cut). Three parts:
/// - [`edge_sampling`]: a sphere chart plane an edge only TOUCHES at a sample (its
/// function is rounding noise there) is not crossed beside that sample, and a span
/// whose chord and midpoint are under 1e-6(1 + |p|) is not split (a hook at the
/// end of a tangent-touch edge);
/// - [`orient`]: two faces that emit the same triangle (the tip of a sliver between
/// two surfaces tangent at a pinch, spanned by the same three shared samples) are a
/// zero-thickness slab, and both copies are dropped before orientation.
pub
/// `BREP_TESS_SINGLE_PRECISION_TWINS` (default on, `=0` restores): the mesh is read at
/// single precision (STL, glTF, every GPU buffer), where two distinct vertices of different
/// faces can round to one point and weld, leaving the edges round them used four times. On a
/// body thinner than a float's spacing at its distance from the origin (brep-bench
/// tangent/thin-lens: two caps 1e-6 apart at x = 5, where floats are 4.8e-7 apart, meshed
/// as mirror images so each near-rim sample of one cap lies within 1e-10 of one of the other)
/// [`orient`] moves one vertex of each such pair a few float spacings along its tangent
/// plane, never one an edge sample shares, never by more than a tenth of its triangles'
/// heights.
pub
pub use triangulate_planar_region;
pub use tessellate_brep_watertight;
pub use clear as clear_face_memo;
pub use ;
pub use tessellate_brep_watertight_face_stride_keyed;
pub use ;