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
// SPDX-License-Identifier: Apache-2.0
//! Provenance and exactness value types.
//!
//! The whole point of the IR is to preserve *where each fact came from* and
//! *how much we trust it*, so that a downstream export can report loss honestly
//! rather than silently normalizing. IR v1 stores these facts in document-wide
//! annotation tables.
use JsonSchema;
use ;
/// Where an entity's bytes originated in the source file.
///
/// `offset` is a byte offset into the named `stream` (for a `.f3d` this is the
/// decompressed ZIP entry, e.g. `Breps.BlobParts/….smbh`), and `tag` is the
/// source record/class name when known (e.g. the ASM record name `face`).
/// How faithfully an entity reflects the source bytes.
///
/// This is the honesty knob. A plane whose coefficients were read verbatim is
/// [`Exactness::ByteExact`]; a bounding box computed from vertices is
/// [`Exactness::Derived`]; a unit guessed from context is
/// [`Exactness::Inferred`]; anything the decoder could not attribute is
/// [`Exactness::Unknown`].