ianmackenzie/elm-iso-10303/8.0.1

Formerly ianmackenzie/elm-step-file. Search finds this package by either name.

Step.Types

The types in this module are shared between the Encode and Decode modules. In many cases you should be able to import this module using

import Step.Types as Step

so that you can then refer to Step.Header, Step.Entity, Step.TypeName etc.

type Entity
= SimpleEntity (Maybe Int) TypeName (List Attribute)
| ComplexEntity (Maybe Int) (List SubEntity)

An Entity represents a single entity stored in the data section of a STEP file. An entity may be a point, a curve, a part, an assembly, or even an entire building. Entities may be 'simple' (having a type and a list of attributes, which can themselves be references to other entities) or 'complex' (effectively a list of simple entities combined together).

Instead of creating or inspecting Entity values directly, you will generally create them using Step.Encode.entity and extract data from them using Step.Decode.entity.

Note that if you do construct Entity values directly, you should generally use Nothing as the entity ID. Entity IDs are auto-generated anyways when encoding a STEP file, so there is no point in specifying them. However, entities read from a file will be assigned the ID they had in that file. (Note that even if those entities are written out to another file later, they will have fresh IDs generated.)

= SubEntity TypeName (List Attribute)

Some entities are 'complex', which means they are composed of a number of sub-entities each with its own type and attributes. A SubEntity represents one such sub-entity.

= DerivedValue
| NullAttribute
| BoolAttribute Bool
| IntAttribute Int
| FloatAttribute Float
| StringAttribute String
| BinaryDataAttribute Bytes
| EnumAttribute EnumValue
| ReferenceTo Entity
| TypedAttribute TypeName Attribute
| AttributeList (List Attribute)

An Attribute represents a single attribute of an Entity, such as an X coordinate value, a GUID string, or a reference to another entity.

Instead of creating or inspecting Attribute values directly, you will generally create them using an encoder and extract data from them using a decoder.

The TypeName and EnumValue types are defined in their own modules but have been aliased here for convenience.

type alias TypeName =
type alias EnumValue =