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
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
//! Traversal policy for composite-curve sampling: what a walk is allowed to
//! do, independent of any IFC type. `surface.rs` is the per-type dispatch and
//! the sampling itself; nothing here knows what an `IfcPolyline` is.
use crate::;
/// Two consecutive composite-curve segment endpoints closer than this are the
/// same joint, so the repeat is dropped. Wider than float noise and far below
/// any real modelling distance in either mm or m.
pub const SEAM_EPS: f64 = 1e-9;
/// Total nested curve visits allowed per profile sample. See [`CurveWalk`].
pub const MAX_CURVE_NODES: u32 = 100_000;
/// The two bounds on one composite-curve traversal, carried together because
/// each is blind to what the other catches.
///
/// `seen` is PATH-scoped and stops cycles. The depth cap stops a long acyclic
/// CHAIN, where every insert succeeds so `seen` never fires. And `budget` stops
/// an acyclic DAG, where two segments per level double the work: nothing is
/// cyclic, so `seen` is silent, and every level is inside the depth cap, so
/// that is silent too. Measured before the budget at 2^levels points --
/// levels=16 gave 131,072 points -- with nothing malformed in the file at all.
pub