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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// SPDX-License-Identifier: Apache-2.0
//! Reads CATIA V5 `.CATPart` files into [`cadmpeg_ir::CadIr`].
//!
//! [`CatiaCodec`] implements the shared [`Codec`] interface. It detects the
//! `V5_CFV2` file signature, inspects catalogued logical streams, identifies the
//! storage variant, and decodes the record families supported for that variant.
//!
//! Support level: [L2](https://github.com/cadmpeg/cadmpeg/blob/main/docs/format-support.md#support-ladder)
//! on the cadmpeg support ladder for the standard-nested layout; other layouts
//! are L1.
//!
//! # Decode a part
//!
//! ```
//! use std::fs::File;
//!
//! use cadmpeg_codec_catia::CatiaCodec;
//! use cadmpeg_ir::{Codec, DecodeOptions};
//!
//! # fn run() -> Result<(), Box<dyn std::error::Error>> {
//! let mut input = File::open("part.CATPart")?;
//! let decoded = CatiaCodec.decode(&mut input, &DecodeOptions::default())?;
//! println!("{} surfaces", decoded.ir.model.surfaces.len());
//! # Ok(())
//! # }
//! ```
//!
//! Read `decoded.report.losses` before consuming model relationships. A partial
//! decode preserves the native payload in an unknown record and reports the
//! model layers that remain unresolved.
//!
//! # Format model
//!
//! Most `CATPart` files contain an outer `V5_CFV2` header and a nested container.
//! Its `CATIA_V5 CB0001` directory maps named logical streams to physical extent
//! lists. [`container`] reconstructs these streams before [`decode`] selects a
//! decoder using [`variant::Variant`].
//!
//! Standard nested parts can produce analytic surfaces, curves, vertices,
//! bodies, faces, loops, coedges, and edges when the stored trim and endpoint
//! relations resolve to one graph. Other recognized layouts expose supported
//! analytic or NURBS carriers and selected bindings. The codec does not write
//! `CATPart` files or decode assemblies, design history, tessellation,
//! appearances, materials, persistent tags, or general document metadata.
//!
//! The low-level [`geometry`], [`topology`], [`b5`], [`e5`], and
//! [`zero_entity`] modules expose record decoders for applications that need
//! format-level access.
use ;
/// The CATIA V5 `.CATPart` codec.
;