Construct this model given a buffer containing the data and the parsed data index on that, adding the typeIndex on top of that.
The buffer to values from.
The parsed index to elements in the STEP.
ReadonlycsgReadonlycurvesWill this model memoize elements, set to false to disable, true to enable.
Note that during periods where element memoization is disabled, it's not guaranteed element objects returned from this have referential equality even if they have ID equality.
ReadonlyexternalReadonlygeometryReadonlymaterialsWhen an atribute is parsed from an entity in the model that causes a recoverable error, and the field is optional, return null instead of throwing an exception.
ReadonlyprofilesReadonlyschemaThe Step schema this is based on.
ReadonlytypeGet the size in bytes of the backing buffer for this.
The number of elements.
Are the source bytes held externally (spilled), i.e. windowed in on demand rather than fully resident?
True after a successful spillSourceToExternalStore.
Bytes of source currently held resident by the buffer provider (the whole buffer before a spill; the windowed working set after).
The resident byte count.
Get the number of elements/entities in this model.
The number of elements.
Page in the byte range(s) backing a record by express ID — see
ensureResidentByLocalID. Unknown express IDs resolve silently
(the following read will surface the miss the same way it does
for a fully-resident model).
The express ID of the record.
Resolves when resident.
Page in the byte range(s) backing a record so following synchronous extraction of it succeeds. Covers the record's own range (which contains any inline elements) and, for complex / external-mapped records, each mapped class record's range.
No-op (fast resolved promise) while the source is fully resident.
The local ID of the record.
Resolves when resident.
Iterate the express IDs of entities of a set of types (including sub-types) without materializing entity descriptors or touching the source buffer — only the type index and the express ID column are read, so this stays cheap and safe even when the model source has been spilled to an external store.
Multi-mapped elements (e.g. complex/multi-entity mappings) may be yielded once per matching mapping, so callers that need distinct IDs should dedupe.
Rest...types: TThe list of types to iterate.
A lazy iterator of express IDs for matching entities.
Extract a set of elements given a local ID iterator.
An iterable of local IDs
The iterable iterator to allow lazy iteration over the elements matching the local ids.
Given a cursor, get the matching entities for it as a lazy iterable iterator.
The cursor to iterate over.
Should the cursor be freed after
The iterable iterator to allow lazy iteration over a cursor.
Given an express ID, return the matching element if one exists.
The express ID to fetch the element for.
The element if one exists for that ID, otherwise undefined.
Given a local ID (i.e. dense index/reference), return the matching element if one exists.
The local ID to fetch for.
The matching element or undefined if none exists.
Get the material matching a geometry node.
Geometry must have been extracted first.
The geometry node to match a material for.
A material, or undefined if it is not found.
Get the mesh matching a geometry node.
Geometry must have been extracted first.
The geometry node to match a material for.
A mesh, or undefined if it is not found.
Given an express ID, return the matching element if one exists.
The express ID to fetch the element for.
The constructor matching the type of the element to fetch.
The element if one exists for that ID, otherwise undefined.
Given a local ID (i.e. dense index/reference), return the matching element if one exists.
The local ID to fetch for.
The constructor matching the type of the element to fetch.
The matching element or undefined if none exists.
Get an inline element by address.
The number of elements.
Map an array of local IDs to their matching express IDs.
local ID array
express ID array
Populate a raw vtable entry for a particular element, extra
The raw elment to populate the vtable entry for.
Did the vtable entry populate correctly?
Release the resident source buffer and serve subsequent record reads from fixed-size windows paged in from an external store.
The store must contain EXACTLY the model's source bytes (same length; byte-identical content is the caller's responsibility — typically the original file already sitting in OPFS). All cached descriptors/entities are invalidated, since they hold views over the released buffer; they rematerialise on demand through the windowed provider.
After this, synchronous extraction of a record whose range isn't
resident throws StepBufferNotResidentError — async API surfaces
must call ensureResidentByExpressID / ensureResidentByLocalID
first. Parse and geometry extraction always run before any spill,
so those paths are unaffected.
The external store holding the source bytes.
OptionalchunkBytes: numberOptional window size in bytes.
OptionalmaxResidentChunks: numberOptional residency cap in windows.
Count entities of a set of types (including sub-types) without iterating or materializing them — reads the type index's prefix sums, so it's cheap enough to call up front for progress totals (see core/progress.ts). Multi-mapped elements can be counted once per matching mapping, so treat this as an upper bound; see MultiIndexSet.count.
Rest...types: TThe list of types to count.
The number of matching entities.
Use the type index to get set of entities of a set of types not including sub-types from the list of type ids, acts as a union given the input type list, with lazy iteration over the set.
Rest...types: EntityTypesAP214[]The type ids for the types to get.
An iterable corresponding to the lazy set of items.
Use the type index to get set of entities of a set of types including sub-types, acts as a union given the input type list, with lazy iteration over the set.
Rest...types: TThe list of types to return
An iterable corresponding to the lazy set of items.
Use the type index to get set of entities of a set of types including sub-types from the list of type ids, acts as a union given the input type list, with lazy iteration over the set.
Rest...types: EntityTypesAP214[]The type ids for the types to get.
An iterable corresponding to the lazy set of items.
Represents an IFC model deserialized from step.