Skip to main content

Module parasolid

Module parasolid 

Source
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_text reads 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_xt reads 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_report and import_parasolid_bytes_report read 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.
NodeLayout
The field layout of one node type as this file writes it.
ParasolidImportReport
What import_parasolid_report returns.
XtExportBody
One body to export, with what the importer reads back as its name and colour.
XtExportReport
What an export wrote, and how exact its edges are.
XtFieldDef
XtFile
A parsed text transmit file.

Enums§

Value
One field value. Unset values (?) are None.
XtFieldCount
Scalar, variable-length (the node’s last field) or a fixed array.
XtFieldKind
How a field’s values are written.

Functions§

check_xt_body
Every invariant a solid or sheet body breaks, as messages; empty when it keeps them all.
export_parasolid_binary
The same part as a neutral binary file (.x_b): the keyword header in text (with FORMAT=binary), then the part data in neutral binary (§3.3.3). text holds the bytes, which are not UTF-8: use export_parasolid_binary.
export_parasolid_report
export_parasolid_text with how far the edges written lie from their faces.
export_parasolid_text
Write bodies as a Parasolid text part: one body as the root, or several listed by a POINTER_LIS_BLOCK root (§2.1, §5.4.2).
import_parasolid
Read a Parasolid text part (.x_t, .xmt_txt) into solids.
import_parasolid_bodies
import_parasolid_report for a caller that drops the report’s diagnostics (the IMPORT3D feature): under BREP_IMPORT_LEAN the STEP build skips its trim readings. The bodies are the same.
import_parasolid_bytes_bodies
import_parasolid_bytes_report for a caller that drops the report’s diagnostics, as import_parasolid_bodies.
import_parasolid_bytes_report
import_parasolid_report from 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_parasolid with names, colours and the import’s diagnostics.
is_xt_binary
Whether bytes are 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 text is a Parasolid text part: it starts with the transmit header’s preamble (§3.1), or, written without a header, with the part data’s T<length> : TRANSMIT FILE banner (§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\1 and 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).
write_xt_binary_part_data
A parsed file’s part data written again in neutral binary: what super::parse_xt read from a neutral binary file comes back as that file had it.
write_xt_part_data
A parsed file’s part data written again: the banner, the schema, each node with its layout described at its type’s first node, the terminator — cut into records. What super::parse_xt_text read from a text file with embedded deltas is written back as that file had it.