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
//! Centre-line profiles: an open path plus a constant width.
use Scalar;
use crateContour;
/// An open path swept by a constant width, centred on the path.
///
/// This is a *representation*, not a contour: the closed area it denotes is
/// the set of points within `half_width` of the path. Resolving it into a
/// boundary is an offsetting algorithm, which belongs above this tier.
///
/// Keeping it exact matters because offsetting is lossy in a way that cannot
/// be undone. Once a centre line is flattened into an outline, the fact that
/// it *was* a constant-width path is gone, and with it the ability to change
/// the width, re-offset at a different tolerance, or round-trip the source
/// unchanged. Sheet metal, curtain-wall mullions and pipe centre lines are all
/// authored this way.
///
/// The path is held as a [`Contour`] because a centre line is a sequence of
/// bounded curve segments exactly like a boundary is; the difference is that
/// this one is not closed and does not enclose anything on its own.