This page restates the “Parasolid XT Format Reference” (UGS Corp., October 2006), the copy kept at 13thmonkey.org (see Sources), in its own words. That document was written for Parasolid V12 and describes changes up to V14. It is copyright material of UGS (now Siemens Digital Industries Software) and is not reproduced here. Siemens has not published a newer edition that this site could find, so schemas after that version are not covered.
File types and encodings
Parasolid writes transmit files through several routines (SAVMOD for a component or assembly, PK_PART_transmit for one part or a list of parts, PK_PARTITION_transmit for a partition). They share one format, with a few node types specific to each. The data can be encoded three ways:
| Encoding | Notes |
|---|---|
| Text | Human-readable, usually ASCII; slower, and converting reals to text introduces rounding |
| Neutral binary | Machine-independent: big-endian, IEEE floating point, ASCII characters |
| Bare binary | The writing machine’s own byte order and floating point format. Not recommended, because the machine type must be known to read it |
The recommended extensions are .x_t and .x_b for part files and
.p_t and .p_b for partition files. Older ones are
.xmt_txt and .xmp_txt (text) and .xmt_bin and
.xmp_bin (binary) on VMS and Unix. Text files may hold line feeds or carriage
returns anywhere, but other unexpected non-printing characters make Parasolid reject the
file as corrupt.
Logical layout
- A human-oriented text header, written by the application’s “Frustrum” and not seen by Parasolid.
- A flag sequence giving the format, then the modeller version string, the schema version string and the user field size.
- The nodes, in no particular order, each with an integer index from 1 upwards (some indices unused). Pointer fields hold these indices, or 0 for a null pointer. Each node is written as: node type; for a variable-length node, its length; the node’s index; then its fields; then, if the file has user fields and the node is visible at the PK interface, the user field (integers).
- A terminator: a 2-byte integer 1 followed by an index 0. In a text file the index is written
0; in a binary file it is a 2-byte integer 1 (the index 0 in the small-index coding below).
The node with index 1 is the root: a BODY for a body file, an ASSEMBLY for an assembly, a POINTER_LIS_BLOCK for an array of parts, a WORLD for a partition.
Modeller version strings look like : TRANSMIT FILE created by modeller version 1200123
(for a partition, : TRANSMIT FILE (partition) created by modeller version …).
The schema string, such as SCH_1200123_12006, gives the Parasolid version
(12.0.123) and the schema number (12006). The reference’s advice to programs that write
files: use version 1200000 and schema SCH_1200000_12006.
Schema files and node specifiers
Parasolid’s structures are defined in a C-like language that generates the schema file
(for 12.0, sch_12006), which is not needed to read the format. Each node type has
a specifier <nodetype> <nodename>; <description>; <transmit 1/0> <number of fields> <variable 1/0>,
for example 29 POINT; Point; 1 6 0, followed by field specifiers
<fieldname>; <type>; <transmit 1/0> <node class> <n_elements>,
for example owner; p; 1 1011 1. Nodes and fields with transmit 0 are not
written. Only pointer fields have a non-zero node class, which names the set of node types
the field may point to. The element count means: 0, a single value; 1, a variable-length
field; n greater than 1, an array of n values. (In the schema file fins are called
halfedges and groups are called features.)
From Parasolid V14, a file can carry a description of its differences from a base
schema (V13’s SCH_13006) so that older versions can read it:
- The archive name is extended with the base schema, e.g.
SCH_1400068_14000_13006, and the maximum number of node types follows as a short integer. - When the first node of each type is written, extra data comes between the node type and the length and index: if the type is not in the base schema, the number of fields (byte), the name and description (short strings) and each field (name; pointer class as a short; n_elts as a positive integer; type as a short string, omitted for pointer fields; and a logical byte, omitted for fixed-length fields). If the effective fields (transmitted or variable-length) match the base schema, one byte 255. Otherwise the number of effective fields and an edit sequence of
C(copy),D(delete) andI(insert, followed by the field) instructions, thenA(append, followed by the field) for any remaining fields, and a finalZ. - Text files from V14 use
\9for nine spaces, in attribute definition names, field names and attribute strings.
Parasolid converts data from older schemas on reading. Reading data from a newer version cannot be guaranteed, which is what the base-schema description is for.
The text header
The header has a preamble, three sets of keyword–value pairs, and a trailer. Applications write it, and Parasolid does not read it.
**ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz***********
**PARASOLID !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~0123456789******************
**PART1;MC=vax;MC_MODEL=4090;MC_ID=VAX14;OS=vms;OS_RELEASE=V6.2;
FRU=sdl_parasolid_test_vax;APPL=unknown;SITE=sdl-cambridge-u.k.;
USER=ALANS;FORMAT=text;GUISE=transmit;KEY=temp;FILE=TEMP.XMT_TXT;
DATE=8-sep-1997;
**PART2;SCH=SCH_701169_7007;USFLD_SIZE=0;
**PART3;
**END_OF_HEADER***************************************************
* line precedes it).- The preamble contains every printing ASCII character, so a reader can detect network corruption or work out a character-set translation.
- Part 1, all optional:
MC(make of computer),MC_MODEL,MC_ID,OS,OS_RELEASE,FRU(frustrum supplier and implementation),APPL(application),SITE,USER,FORMAT(binary,text,applio),GUISE(transmit,transmit_partition),KEY,FILEandDATE(dd-mmm-yyyy). - Part 2:
SCH, the schema keySCH_m_n(applications that write XT useSCH_1200000_12006), andUSFLD_SIZE, the length of the user field in integer words (0 to 16). - Part 3: non-standard data that only the writer understands, in the same keyword syntax so that other readers can skip to the end.
- The trailer is
**END_OF_HEADERand asterisks.
Keyword syntax is name=value with a name of 1 to 80 capitals, digits and
low lines and a value of one or more printing ASCII characters except space. Four
characters are escaped in values: newline as ^n, space as ^_,
semicolon as ^; and up arrow as ^^. An escape may be split by a
newline, and no line may exceed 80 characters.
Text encoding
- The data is cut into records of about 80 characters ending in newlines. On reading, all newlines and carriage returns are ignored, and so are trailing spaces added to records; leading spaces are not ignored, and a file may not contain adjacent spaces other than at a record’s end.
- From version 12.1, text files escape null, carriage return, line feed and backslash with backslash sequences (null is
\0and the backslash is\\; the reference’s table pairs the letters for carriage return and line feed in the opposite order to the C convention, so check them against a real file); versions up to 12.0 do not escape them. - The flag sequence is the letter
T, then the length of the modeller version string, a space, the string, the length of the schema string, a space, the string, and the user field size. Because layout is ignored,T51 : TRANSMIT FILE created by modeller version 120000017 SCH_1200000_120060is what Parasolid reads for the example in the reference. - Every number is followed by one space. Fields of type
candlare not. - Logicals are written
FandT. - The unset values, −32764 for integers and −3.14158e13 for reals, are written
?. If one component of a vector is unset all three must be, and it is one?.
Binary encodings
Both binary flavours start with a flag sequence, followed by the modeller version length (2-byte integer) and its characters, the schema version length (4-byte integer) and its characters, and the user field size (4-byte integer).
| Flavour | Flag | Data |
|---|---|---|
| Bare binary | The single character B (octal 102 on ASCII machines) | The writing machine’s natural formats |
| Neutral binary | P S 0 0 (50 53 00 00; octal 120 and 123 for the letters from V9) | Big-endian, IEEE floating point, ASCII. A node type is a 2-byte integer, a variable length that follows it a 4-byte integer, a logical one byte holding 0 or 1 |
Short strings are a byte length followed by the characters with no trailing zero. Positive integers and pointer indices use a compact form. An index below 32 767 is one 2-byte integer holding index + 1. A larger index is two 2-byte integers: first −(index mod 32 767 + 1), then index div 32 767. Reading reverses it: read a short r; if it is negative, read a second short q and set r = −r; then index = q × 32 767 + r − 1.
Field types
| Code | Type | Notes |
|---|---|---|
u | unsigned byte, 0 to 255 | |
c | char | |
l | logical, a byte 0 or 1 | |
n | short integer | |
w | Unicode character | written as a short integer |
d | int | |
p | pointer index | Small indices get the compact binary form |
f | double | |
i | interval | two doubles, low then high |
v | vector | three doubles x, y, z, for a position or a direction |
b | box | six doubles, an interval for each of x, y and z (the order differs from the PK interface) |
h | hvec | three doubles: only the position is written for a point of an intersection curve |
A variable-length node’s last field is an array, shown in the schema as length 1, and
the node’s actual length is written between its type and index, for example
83 3 15 1 2 3 is a REAL_VALUES node (type 83) of 3 values with index 15 holding 1, 2, 3.
If a pointer field holds an index with no node in the file, it is read as 0.
The reference’s worked example
The reference gives a complete text file for a sheet circle with a colour attribute on
its single edge. Its text header is the three-part form above,
ending in **END_OF_HEADER, and its first data line is the flag sequence
with the version strings, which Parasolid reads as one run:
T51 : TRANSMIT FILE created by modeller version 120000017 SCH_1200000_120060
T, the length 51, the version text, the schema string length 17, the schema string and the user field size 0 (run together, as the layout is ignored).The reference annotates the node lines that follow as: body, list, shell, plane, circle, region, edge, fin, loop, a dummy fin, face, attribute, attrib_def, real_values (3 values), att_def_id (15 characters) and pointer_lis_block, then the terminator. The annotations are laid out in columns that the extracted text mixes, so the line to node pairing is not certain. A fragment from it, a REAL_VALUES node (type 83) of 3 values with index 15 holding 1, 2 and 3:
83 3 15 1 2 3
The reference notes that the tolerance fields of the face and edge are unset
(?), and that if the sample had no trailing spaces it would be a valid XT
file, because leading spaces on some of its lines are needed. The full node lines are in
the reference; they are not reproduced here because the extracted text of its listing is
interleaved with its annotations.
Sources
- Parasolid XT Format Reference, October 2006 – UGS Corp.; kept by 13thmonkey.org, the copy that Wikipedia cites. A Siemens-hosted copy was searched for and not found; a Siemens community thread asks whether one exists officially