Expand description
Parasolid XT (transmit file) import.
Written from the published Parasolid XT Format Reference; section numbers in this module are that reference’s (July 2022 edition).
parse_xt_textreads a text part (.x_t,.xmt_txt) into its node graph: the header, the token stream, and each node laid out by the base schema (schema) as edited by the file’s embedded schema deltas.parse_xtreads the same from bytes, text or binary (.x_b, neutral or typed), part or partition (the form SolidWorks embeds bodies in).import_parasolid,import_parasolid_reportandimport_parasolid_bytes_reportread its bodies into solids by translating each to Part 21 for the STEP importer (to_step), with names and colours.
Structs§
- Node
- A node: its type, index and field values in its layout’s order.
- Node
Layout - The field layout of one node type as this file writes it.
- Parasolid
Import Report - What
import_parasolid_reportreturns. - XtField
Def - XtFile
- A parsed text transmit file.
Enums§
- Value
- One field value. Unset values (
?) areNone. - XtField
Count - Scalar, variable-length (the node’s last field) or a fixed array.
- XtField
Kind - How a field’s values are written.
Functions§
- import_
parasolid - Read a Parasolid text part (
.x_t,.xmt_txt) into solids. - import_
parasolid_ bytes_ report import_parasolid_reportfrom a file’s bytes: text or binary (.x_b), a part or a partition (the form SolidWorks embeds its bodies in).- import_
parasolid_ report import_parasolidwith names, colours and the import’s diagnostics.- is_
xt_ binary - Whether
bytesare a binary Parasolid file: the neutral or typed binary flag (PS\0\0,PS\0\1), at the start or after the keyword header (§3.1, §3.3). - is_
xt_ text - Whether
textis a Parasolid text part: it starts with the transmit header’s preamble (§3.1), or, written without a header, with the part data’sT<length> : TRANSMIT FILEbanner (§3.2). Only the start counts, so a STEP file that mentions Parasolid in its own header is not one. - parse_
xt - Read a transmit file, text or binary, from its bytes: a text part, a
neutral binary (
PS\0\0, big-endian) or typed binary (PS\0\1and the writer’s machine description) part or partition, with or without the keyword header (§3.1, §3.3). A SolidWorks body is such a partition. - parse_
xt_ text - Read a text transmit file (
.x_t,.xmt_txt).