Skip to main content

Module part21

Module part21 

Source
Expand description

ISO 10303-21 (“Part 21”), the clear-text encoding every STEP file is written in: a header, then a data section of entity instances, each #id = NAME(parameters); — or, for an instance of several entity types at once, a complex instance #id = (NAME1(...) NAME2(...));.

This module only knows the encoding, not what any entity means: it reads a file into an Exchange and writes one back. What the entities say about geometry is crate::import’s and crate::export’s business.

Structs§

Exchange
A whole exchange file: its header records and its instances by id.
Record
One entity type’s part of an instance: its name and parameters.

Enums§

Instance
An entity instance: of one type, or complex — of several at once, each with its own parameters, as (B_SPLINE_CURVE(...) RATIONAL_B_SPLINE_CURVE(...)).
Value
One parameter of an entity instance.

Functions§

real
r as a Part 21 real, which needs a decimal point and an upper-case exponent: 1.0, -0.25, 1.5E-7. Written as the shortest text that reads back to exactly r.