Skip to main content

brep_kernel/io/parasolid/
schema.rs

1//! The base schema, `SCH_13006`, that embedded-schema files describe their
2//! layouts against (Parasolid XT Format Reference §2.1.2).
3//!
4//! The base schema file is not published. This table is the reference's
5//! chapter 5 node structures with the base layout restored where a later
6//! schema changed it: a later writer's delta (Copy, Delete, Insert, Append)
7//! against the base gives the base's field count and the position of every
8//! field it kept, and the reference's field tables give names and types. A
9//! field the base had but every seen writer deletes is `Unknown`: its type is
10//! not known, so a file that copies it is refused rather than misread.
11
12/// The base schema number embedded deltas are written against.
13pub const BASE_SCHEMA: &str = "13006";
14
15/// How a field's values are written.
16#[derive(Clone, Copy, Debug, PartialEq, Eq)]
17pub enum Kind {
18    /// `d`, `u`, `n`, `w`, `p`, `t`: integers, bytes, shorts, unicode
19    /// characters, pointer indices and tags.
20    Int,
21    /// `f`.
22    Real,
23    /// `v` (vector) and `h` (hvec; only its position is written).
24    Vector,
25    /// `i`: two reals.
26    Interval,
27    /// `b`: six reals.
28    Box,
29    /// `c` and `l`: one character; logicals are `T` or `F`.
30    Char,
31    /// A base field deleted by every writer seen; its type is not known.
32    Unknown,
33}
34
35/// Scalar, variable-length (the node's last field) or a fixed array.
36#[derive(Clone, Copy, Debug, PartialEq, Eq)]
37pub enum Count {
38    Scalar,
39    Variable,
40    Fixed(usize),
41}
42
43#[derive(Clone, Debug, PartialEq, Eq)]
44pub struct FieldDef {
45    pub name: String,
46    pub kind: Kind,
47    pub count: Count,
48    /// The schema type code (§2.1.4; `p` for a pointer): binary data is laid
49    /// out by it (`u`, `c`, `l` one byte, `n`, `w` two, `d`, `t` four, a
50    /// pointer two or four), text by [`Kind`] alone.
51    pub code: u8,
52}
53
54/// The kind a schema type code names (§2.1.4).
55pub fn kind_of(code: u8) -> Option<Kind> {
56    Some(match code {
57        b'd' | b'u' | b'n' | b'w' | b'p' | b't' => Kind::Int,
58        b'f' => Kind::Real,
59        b'v' | b'h' => Kind::Vector,
60        b'i' => Kind::Interval,
61        b'b' => Kind::Box,
62        b'c' | b'l' => Kind::Char,
63        b'X' => Kind::Unknown,
64        _ => return None,
65    })
66}
67
68/// The schema number Parasolid V30.1 writes. Files in it may omit their
69/// schema deltas (`SCH_3001000_30100`, as Onshape writes): then every node
70/// type is laid out by [`V30_DELTAS`].
71pub const V30_SCHEMA: &str = "30100";
72
73/// The schema SolidWorks 2022 (Parasolid 33.1) writes its transmit body in,
74/// with no deltas (`SCH_2500000_25001`).
75pub const V25_SCHEMA: &str = "25001";
76
77/// Parasolid V12's schema, older than the base and so never written with
78/// deltas (`SCH_1200000_12006`).
79pub const V12_SCHEMA: &str = "12006";
80
81/// The schemas whose files may carry no layout description and are still
82/// read, by the layouts stored here.
83pub const STORED_SCHEMAS: [&str; 3] = [V12_SCHEMA, V25_SCHEMA, V30_SCHEMA];
84
85/// A node type's layout in a stored schema, as an edit script against the
86/// base in the form embedded deltas take (§2.1.2.2), or `None` when no file
87/// in that schema has shown the type (it is then refused by name).
88pub fn stored_delta(schema: &str, node_type: u16) -> Option<&'static str> {
89    let find = |table: &[(u16, &'static str)]| table.iter().find(|(t, _)| *t == node_type).map(|(_, d)| *d);
90    match schema {
91        V30_SCHEMA => v30_delta(node_type),
92        V25_SCHEMA => find(V25_DELTAS).or_else(|| {
93            // A type V30.1 lays out as the base has the base layout in every
94            // schema between them; the types V30.1 changed are V25's only as
95            // far as the reported file showed them.
96            v30_delta(node_type).filter(|d| *d == "255 " || V25_AS_V30.contains(&node_type))
97        }),
98        V12_SCHEMA => find(V12_DELTAS),
99        _ => None,
100    }
101}
102
103/// Schema 25001 where it is not V30.1's: the layouts the reported
104/// SolidWorks file (18,837 nodes) reads end to end by. BODY has V30.1's
105/// `owner` and the trailing index/schema-map fields but not the mesh and
106/// polyline pointers (its six trailing fields are all 0 there, so their
107/// names follow V30.1's order); INTERSECTION has no `intersection_data` and
108/// LIMIT no `term_use` (both are the base's).
109#[rustfmt::skip]
110const V25_DELTAS: &[(u16, &str)] = &[
111    (12, "29 CCCCCCCCCCCCCDI5 owner12 0 CCCCCCCCCA16 index_map_offset0 0 1 dA9 index_map82 0 A17 node_id_index_map82 0 A20 schema_embedding_map82 0 A5 child12 0 A14 lowest_node_id0 0 1 dZ"),
112    (38, "255 "),
113    (41, "255 "),
114];
115
116/// Types V30.1 changed from the base whose V30.1 layout the reported schema
117/// 25001 file reads by: REGION, LIST and POINTER_LIS_BLOCK.
118const V25_AS_V30: [u16; 3] = [19, 70, 74];
119
120/// Schema 12006: the layouts the reported V12 file (369 nodes) reads end to
121/// end by. Topology, points, lines, circles, planes, cylinders, attributes
122/// and their values are the base's. ATTRIB_DEF has no `field_names` and 13
123/// legal owners, and its field types run straight on to the next node as
124/// characters; LIST has its type where the base's first deleted field sits,
125/// a pointer where its second sits, then a finger block, finger index and
126/// notransmit flag (the file's list: block 369 three times, finger index 1).
127#[rustfmt::skip]
128const V12_DELTAS: &[(u16, &str)] = &[
129    (12, "255 "), (13, "255 "), (14, "255 "), (15, "255 "), (16, "255 "), (17, "255 "), (18, "255 "), (19, "255 "),
130    (29, "255 "), (30, "255 "), (31, "255 "), (50, "255 "), (51, "255 "),
131    (70, "12 CCCCDI9 list_type0 0 1 uCCDI10 last_block1012 0 CA12 finger_block1012 0 A12 finger_index0 0 1 dA10 notransmit0 0 1 lZ"),
132    (74, "255 "), (79, "255 "),
133    (80, "6 CCCCDDI12 legal_owners0 13 1 lDI6 fields0 1 1 cTZ"),
134    (81, "255 "), (84, "255 "),
135];
136
137/// Schema 30100's layout of a node type, as the edit script (or, for a type
138/// the base lacks, the whole description) that files written with embedded
139/// deltas (`SCH_3001168_30100_13006`) carry at the type's first occurrence,
140/// verbatim. Harvested from 2000 ABC corpus files: every file gave each type
141/// the same script. A type no corpus file showed is absent, so a file that
142/// holds one is refused rather than read with a guessed layout.
143pub fn v30_delta(node_type: u16) -> Option<&'static str> {
144    V30_DELTAS.iter().find(|(t, _)| *t == node_type).map(|(_, d)| *d)
145}
146
147#[rustfmt::skip]
148const V30_DELTAS: &[(u16, &str)] = &[
149    (12, "34 CCCCCCI4 mesh1006 0 I8 polyline1008 0 CCCCCCCDI5 owner1040 0 CCCCCCI13 boundary_mesh1006 0 I17 boundary_polyline1008 0 CCCA16 index_map_offset0 0 1 dA9 index_map82 0 A17 node_id_index_map82 0 A20 schema_embedding_map82 0 A5 child12 0 A14 lowest_node_id0 0 1 dA16 mesh_offset_data206 0 Z"),
150    (13, "255 "),
151    (14, "255 "),
152    (15, "255 "),
153    (16, "255 "),
154    (17, "255 "),
155    (18, "255 "),
156    (19, "8 CCCCCCCA5 owner12 0 Z"),
157    (29, "255 "),
158    (30, "255 "),
159    (31, "255 "),
160    (32, "255 "),
161    (38, "12 CCCCCCCCCCCA17 intersection_data204 0 Z"),
162    (40, "255 "),
163    (41, "3 CI8 term_use0 0 1 cCZ"),
164    (45, "255 "),
165    (50, "255 "),
166    (51, "255 "),
167    (52, "255 "),
168    (53, "255 "),
169    (54, "255 "),
170    (56, "255 "),
171    (59, "255 "),
172    (60, "255 "),
173    (67, "255 "),
174    (68, "255 "),
175    (70, "11 CI9 list_type0 0 1 uI10 notransmit0 0 1 lCCCDCCDI12 finger_index0 0 1 dI12 finger_block1012 0 CZ"),
176    (74, "4 CI16 index_map_offset0 0 1 dCCZ"),
177    (79, "255 "),
178    (80, "255 "),
179    (81, "255 "),
180    (82, "255 "),
181    (83, "255 "),
182    (84, "255 "),
183    (89, "255 "),
184    (98, "255 "),
185    (124, "255 "),
186    (125, "255 "),
187    (126, "255 "),
188    (127, "255 "),
189    (128, "255 "),
190    (133, "255 "),
191    (134, "255 "),
192    (135, "255 "),
193    (136, "255 "),
194    (137, "255 "),
195    (141, "255 "),
196    (163, "255 "),
197    (184, "255 "),
198    (204, "2 17 INTERSECTION_DATA17 Intersection data7 uv_type0 0 1 u6 values0 1 1 fT"),
199];
200
201/// A base node type's name and fields.
202pub fn base(node_type: u16) -> Option<(&'static str, Vec<FieldDef>)> {
203    let (_, name, fields) = BASE.iter().find(|(t, _, _)| *t == node_type)?;
204    let fields = fields
205        .iter()
206        .map(|&(name, code, n)| FieldDef {
207            name: name.to_string(),
208            kind: kind_of(code).expect("base schema type codes are known"),
209            code,
210            count: match n {
211                0 => Count::Scalar,
212                1 => Count::Variable,
213                n => Count::Fixed(n),
214            },
215        })
216        .collect();
217    Some((name, fields))
218}
219
220/// (node type, name, fields as (name, type code, elements: 0 scalar, 1
221/// variable, n fixed)).
222type BaseNode = (u16, &'static str, &'static [(&'static str, u8, usize)]);
223
224#[rustfmt::skip]
225const BASE: &[BaseNode] = &[
226    // The base ASSEMBLY has seventeen fields: SolidWorks 2009 assemblies
227    // (schema 19008 with deltas) write it "as the base" and their data reads
228    // these to the next node; the reference's later layout adds lattice, mesh,
229    // polyline and mesh_offset_data.
230    (10, "ASSEMBLY", &[("highest_node_id", b'd', 0), ("attributes_features", b'p', 0), ("attribute_chains", b'p', 0), ("list", b'p', 0), ("surface", b'p', 0), ("curve", b'p', 0), ("point", b'p', 0), ("key", b'p', 0), ("res_size", b'f', 0), ("res_linear", b'f', 0), ("ref_instance", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("state", b'u', 0), ("owner", b'p', 0), ("type", b'u', 0), ("sub_instance", b'p', 0)]),
231    (11, "INSTANCE", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("type", b'u', 0), ("part", b'p', 0), ("transform", b'p', 0), ("assembly", b'p', 0), ("next_in_part", b'p', 0), ("prev_in_part", b'p', 0), ("next_of_part", b'p', 0), ("prev_of_part", b'p', 0)]),
232    (12, "BODY", &[("highest_node_id", b'd', 0), ("attributes_features", b'p', 0), ("attribute_chains", b'p', 0), ("surface", b'p', 0), ("curve", b'p', 0), ("point", b'p', 0), ("key", b'p', 0), ("res_size", b'f', 0), ("res_linear", b'f', 0), ("ref_instance", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("state", b'u', 0), ("base_owner", b'p', 0), ("body_type", b'u', 0), ("nom_geom_state", b'u', 0), ("shell", b'p', 0), ("boundary_surface", b'p', 0), ("boundary_curve", b'p', 0), ("boundary_point", b'p', 0), ("region", b'p', 0), ("edge", b'p', 0), ("vertex", b'p', 0)]),
233    (13, "SHELL", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("body", b'p', 0), ("next", b'p', 0), ("face", b'p', 0), ("edge", b'p', 0), ("vertex", b'p', 0), ("region", b'p', 0), ("front_face", b'p', 0)]),
234    (14, "FACE", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("tolerance", b'f', 0), ("next", b'p', 0), ("previous", b'p', 0), ("loop", b'p', 0), ("shell", b'p', 0), ("surface", b'p', 0), ("sense", b'c', 0), ("next_on_surface", b'p', 0), ("previous_on_surface", b'p', 0), ("next_front", b'p', 0), ("previous_front", b'p', 0), ("front_shell", b'p', 0)]),
235    (15, "LOOP", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("halfedge", b'p', 0), ("face", b'p', 0), ("next", b'p', 0)]),
236    (16, "EDGE", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("tolerance", b'f', 0), ("halfedge", b'p', 0), ("previous", b'p', 0), ("next", b'p', 0), ("curve", b'p', 0), ("next_on_curve", b'p', 0), ("previous_on_curve", b'p', 0), ("owner", b'p', 0)]),
237    (17, "HALFEDGE", &[("attributes_features", b'p', 0), ("loop", b'p', 0), ("forward", b'p', 0), ("backward", b'p', 0), ("vertex", b'p', 0), ("other", b'p', 0), ("edge", b'p', 0), ("curve", b'p', 0), ("next_at_vx", b'p', 0), ("sense", b'c', 0)]),
238    (18, "VERTEX", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("halfedge", b'p', 0), ("previous", b'p', 0), ("next", b'p', 0), ("point", b'p', 0), ("tolerance", b'f', 0), ("owner", b'p', 0)]),
239    (19, "REGION", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("body", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("shell", b'p', 0), ("type", b'c', 0)]),
240    (29, "POINT", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("pvec", b'v', 0)]),
241    (30, "LINE", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("geometric_owner", b'p', 0), ("sense", b'c', 0), ("pvec", b'v', 0), ("direction", b'v', 0)]),
242    (31, "CIRCLE", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("geometric_owner", b'p', 0), ("sense", b'c', 0), ("centre", b'v', 0), ("normal", b'v', 0), ("x_axis", b'v', 0), ("radius", b'f', 0)]),
243    (32, "ELLIPSE", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("geometric_owner", b'p', 0), ("sense", b'c', 0), ("centre", b'v', 0), ("normal", b'v', 0), ("x_axis", b'v', 0), ("major_radius", b'f', 0), ("minor_radius", b'f', 0)]),
244    (38, "INTERSECTION", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("geometric_owner", b'p', 0), ("sense", b'c', 0), ("surface", b'p', 2), ("chart", b'p', 0), ("start", b'p', 0), ("end", b'p', 0)]),
245    (40, "CHART", &[("base_parameter", b'f', 0), ("base_scale", b'f', 0), ("chart_count", b'd', 0), ("chordal_error", b'f', 0), ("angular_error", b'f', 0), ("parameter_error", b'f', 2), ("hvec", b'h', 1)]),
246    (41, "LIMIT", &[("type", b'c', 0), ("hvec", b'h', 1)]),
247    (45, "BSPLINE_VERTICES", &[("vertices", b'f', 1)]),
248    (50, "PLANE", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("geometric_owner", b'p', 0), ("sense", b'c', 0), ("pvec", b'v', 0), ("normal", b'v', 0), ("x_axis", b'v', 0)]),
249    (51, "CYLINDER", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("geometric_owner", b'p', 0), ("sense", b'c', 0), ("pvec", b'v', 0), ("axis", b'v', 0), ("radius", b'f', 0), ("x_axis", b'v', 0)]),
250    (52, "CONE", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("geometric_owner", b'p', 0), ("sense", b'c', 0), ("pvec", b'v', 0), ("axis", b'v', 0), ("radius", b'f', 0), ("sin_half_angle", b'f', 0), ("cos_half_angle", b'f', 0), ("x_axis", b'v', 0)]),
251    (53, "SPHERE", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("geometric_owner", b'p', 0), ("sense", b'c', 0), ("centre", b'v', 0), ("radius", b'f', 0), ("axis", b'v', 0), ("x_axis", b'v', 0)]),
252    (54, "TORUS", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("geometric_owner", b'p', 0), ("sense", b'c', 0), ("centre", b'v', 0), ("axis", b'v', 0), ("major_radius", b'f', 0), ("minor_radius", b'f', 0), ("x_axis", b'v', 0)]),
253    (56, "BLENDED_EDGE", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("geometric_owner", b'p', 0), ("sense", b'c', 0), ("blend_type", b'c', 0), ("surface", b'p', 2), ("spine", b'p', 0), ("range", b'f', 2), ("thumb_weight", b'f', 2), ("boundary", b'p', 2), ("start", b'p', 0), ("end", b'p', 0)]),
254    (59, "BLEND_BOUND", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("geometric_owner", b'p', 0), ("sense", b'c', 0), ("boundary", b'n', 0), ("blend", b'p', 0)]),
255    (60, "OFFSET_SURF", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("geometric_owner", b'p', 0), ("sense", b'c', 0), ("check", b'c', 0), ("true_offset", b'l', 0), ("surface", b'p', 0), ("offset", b'f', 0), ("scale", b'f', 0)]),
256    (67, "SWEPT_SURF", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("geometric_owner", b'p', 0), ("sense", b'c', 0), ("section", b'p', 0), ("sweep", b'v', 0), ("scale", b'f', 0)]),
257    (68, "SPUN_SURF", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("geometric_owner", b'p', 0), ("sense", b'c', 0), ("profile", b'p', 0), ("base", b'v', 0), ("axis", b'v', 0), ("start", b'v', 0), ("end", b'v', 0), ("start_param", b'f', 0), ("end_param", b'f', 0), ("x_axis", b'v', 0), ("scale", b'f', 0)]),
258    (70, "LIST", &[("node_id", b'd', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("base_del1", b'X', 0), ("list_length", b'd', 0), ("block_length", b'd', 0), ("base_del2", b'X', 0), ("list_block", b'p', 0)]),
259    (74, "POINTER_LIS_BLOCK", &[("n_entries", b'd', 0), ("next_block", b'p', 0), ("entries", b'p', 1)]),
260    (79, "ATT_DEF_ID", &[("string", b'c', 1)]),
261    (80, "ATTRIB_DEF", &[("next", b'p', 0), ("identifier", b'p', 0), ("type_id", b'd', 0), ("actions", b'u', 8), ("field_names", b'p', 0), ("legal_owners", b'l', 14), ("fields", b'u', 1)]),
262    (81, "ATTRIBUTE", &[("node_id", b'd', 0), ("definition", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("next_of_type", b'p', 0), ("previous_of_type", b'p', 0), ("fields", b'p', 1)]),
263    (82, "INT_VALUES", &[("values", b'd', 1)]),
264    (83, "REAL_VALUES", &[("values", b'f', 1)]),
265    (84, "CHAR_VALUES", &[("values", b'c', 1)]),
266    (85, "POINT_VALUES", &[("values", b'v', 1)]),
267    (86, "VECTOR_VALUES", &[("values", b'v', 1)]),
268    (87, "AXIS_VALUES", &[("values", b'v', 1)]),
269    (88, "TAG_VALUES", &[("values", b't', 1)]),
270    (89, "DIRECTION_VALUES", &[("values", b'v', 1)]),
271    (90, "FEATURE", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("type", b'u', 0), ("first_member", b'p', 0)]),
272    (91, "MEMBER_OF_FEATURE", &[("dummy_node_id", b'd', 0), ("owning_feature", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("next_member", b'p', 0), ("previous_member", b'p', 0)]),
273    (98, "UNICODE_VALUES", &[("values", b'w', 1)]),
274    (99, "FIELD_NAMES", &[("names", b'p', 1)]),
275    (100, "TRANSFORM", &[("node_id", b'd', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("rotation_matrix", b'f', 9), ("translation_vector", b'v', 0), ("scale", b'f', 0), ("flag", b'd', 0), ("perspective_vector", b'v', 0)]),
276    // The base WORLD has eleven fields: every SolidWorks partition (schemas
277    // 28002, 28101, 30000 and 32001, each with deltas against this base) edits
278    // these eleven to the end of its data; the reference's later layout adds
279    // lattice, mesh, polyline and the maps.
280    (101, "WORLD", &[("assembly", b'p', 0), ("attribute", b'p', 0), ("body", b'p', 0), ("transform", b'p', 0), ("surface", b'p', 0), ("curve", b'p', 0), ("point", b'p', 0), ("alive", b'l', 0), ("attrib_def", b'p', 0), ("highest_id", b'd', 0), ("current_id", b'd', 0)]),
281    (120, "PE_SURF", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("geometric_owner", b'p', 0), ("sense", b'c', 0), ("type", b'c', 0), ("data", b'p', 0), ("tf", b'p', 0), ("internal_geom", b'p', 1)]),
282    (121, "INT_PE_DATA", &[("geom_type", b'd', 0), ("real_array", b'p', 0), ("int_array", b'p', 0)]),
283    (122, "EXT_PE_DATA", &[("key", b'p', 0), ("real_array", b'p', 0), ("int_array", b'p', 0)]),
284    (124, "B_SURFACE", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("geometric_owner", b'p', 0), ("sense", b'c', 0), ("nurbs", b'p', 0), ("data", b'p', 0)]),
285    (125, "SURFACE_DATA", &[("original_uint", b'i', 0), ("original_vint", b'i', 0), ("extended_uint", b'i', 0), ("extended_vint", b'i', 0), ("self_int", b'u', 0), ("original_u_start", b'c', 0), ("original_u_end", b'c', 0), ("original_v_start", b'c', 0), ("original_v_end", b'c', 0), ("extended_u_start", b'c', 0), ("extended_u_end", b'c', 0), ("extended_v_start", b'c', 0), ("extended_v_end", b'c', 0), ("analytic_form_type", b'c', 0), ("swept_form_type", b'c', 0), ("spun_form_type", b'c', 0), ("blend_form_type", b'c', 0), ("analytic_form", b'p', 0), ("swept_form", b'p', 0), ("spun_form", b'p', 0), ("blend_form", b'p', 0)]),
286    (126, "NURBS_SURF", &[("u_periodic", b'l', 0), ("v_periodic", b'l', 0), ("u_degree", b'n', 0), ("v_degree", b'n', 0), ("n_u_vertices", b'd', 0), ("n_v_vertices", b'd', 0), ("u_knot_type", b'u', 0), ("v_knot_type", b'u', 0), ("n_u_knots", b'd', 0), ("n_v_knots", b'd', 0), ("rational", b'l', 0), ("u_closed", b'l', 0), ("v_closed", b'l', 0), ("surface_form", b'u', 0), ("vertex_dim", b'n', 0), ("bspline_vertices", b'p', 0), ("u_knot_mult", b'p', 0), ("v_knot_mult", b'p', 0), ("u_knots", b'p', 0), ("v_knots", b'p', 0)]),
287    (127, "KNOT_MULT", &[("mult", b'n', 1)]),
288    (128, "KNOT_SET", &[("knots", b'f', 1)]),
289    (130, "PE_CURVE", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("geometric_owner", b'p', 0), ("sense", b'c', 0), ("type", b'c', 0), ("data", b'p', 0), ("tf", b'p', 0), ("internal_geom", b'p', 1)]),
290    (133, "TRIMMED_CURVE", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("geometric_owner", b'p', 0), ("sense", b'c', 0), ("basis_curve", b'p', 0), ("point_1", b'v', 0), ("point_2", b'v', 0), ("parm_1", b'f', 0), ("parm_2", b'f', 0)]),
291    (134, "B_CURVE", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("geometric_owner", b'p', 0), ("sense", b'c', 0), ("nurbs", b'p', 0), ("data", b'p', 0)]),
292    (135, "CURVE_DATA", &[("self_int", b'u', 0), ("analytic_form", b'p', 0)]),
293    (136, "NURBS_CURVE", &[("degree", b'n', 0), ("n_vertices", b'd', 0), ("vertex_dim", b'n', 0), ("n_knots", b'd', 0), ("knot_type", b'u', 0), ("periodic", b'l', 0), ("closed", b'l', 0), ("rational", b'l', 0), ("curve_form", b'u', 0), ("bspline_vertices", b'p', 0), ("knot_mult", b'p', 0), ("knots", b'p', 0)]),
294    (137, "SP_CURVE", &[("node_id", b'd', 0), ("attributes_features", b'p', 0), ("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("geometric_owner", b'p', 0), ("sense", b'c', 0), ("surface", b'p', 0), ("b_curve", b'p', 0), ("original", b'p', 0), ("tolerance_to_original", b'f', 0)]),
295    (141, "GEOMETRIC_OWNER", &[("owner", b'p', 0), ("next", b'p', 0), ("previous", b'p', 0), ("shared_geometry", b'p', 0)]),
296    (163, "HELIX_SU_FORM", &[("axis_pt", b'v', 0), ("axis_dir", b'v', 0), ("hand", b'c', 0), ("turns", b'i', 0), ("pitch", b'f', 0), ("gap", b'f', 0), ("tol", b'f', 0)]),
297    (176, "PART_XMT_BLOCK", &[("n_entries", b'd', 0), ("index_map_offset", b'd', 0), ("index_map", b'p', 0), ("schema_embedding_map", b'p', 0), ("mesh_offset_data", b'p', 0), ("entries", b'p', 1)]),
298    (184, "HELIX_CU_FORM", &[("axis_pt", b'v', 0), ("axis_dir", b'v', 0), ("point", b'v', 0), ("hand", b'c', 0), ("turns", b'i', 0), ("pitch", b'f', 0), ("tol", b'f', 0)]),
299    (185, "POLYLINE_DATA", &[("n_pvecs", b'd', 0), ("base_parm", b'f', 0), ("pvec", b'p', 0)]),
300];