ReadonlyschemaThe first FILE_SCHEMA token, e.g. "IFC4", or undefined.
ReadonlysizeNumber of entities.
Append an entity; returns its id (bigint).
Copy entities ids of source into this model with what belongs
to them, as one checked transaction: what they reference, their
property sets, type, material and classification, their openings,
fillings and ports, and what attaches to their geometry. Units,
contexts, the owner history, materials and styles equal to this
model's are reused (reuse names the kinds; all by default).
Relationships to objects not copied (a spatial container) are
skipped and reported. globalIds: keep (the default; one this
model holds is refused), merge (an IfcRoot this model holds by
GlobalId and type is reused, its relationships joined),
regenerate or regenerate-colliding. Refused with unsupported
when the models' length or plane angle units differ,
unsupported-schema for an entity this model's release cannot
hold, invalid-value for a kept GlobalId this model holds.
Attribute index of entity id, as a tagged value.
Attribute name of entity id (case-insensitive, e.g. "Name"),
resolved against the declared release, as a tagged value.
An INVERSE name ("IsDefinedBy", #462) reads the entities
referencing id through the release's FOR clause: a list of
refs for a SET or BAG (SET [0:1] included: zero or one
element), a ref or null for a single-valued inverse, which two
referrers refuse with invalid-model.
Every explicit attribute of entity id in slot order, inherited
first, as the release the header declares defines them.
Apply authoring operations as one checked transaction against the
release the header declares: every operation, in order, or none, and
a refused batch leaves the model unchanged. An operation names the
entity an earlier one produced by IfcModel.handle(index).
result.ids holds, per operation, the id of the entity it produced.
The id of the entity whose GlobalId is globalId, or undefined.
The first lookup indexes every GlobalId once; later ones reuse the
index until the model changes. Throws invalid-value for text that
is not a GlobalId and invalid-model when several entities carry
it (duplicateGlobalIds lists them).
The classifications that apply to object id: its own, then its
type object's.
Drop every undo and redo entry, keeping the limit.
Convert the model's length unit to the unit named target (an SI
METRE with any prefix, or inch, foot, yard, mile, US survey foot), rescaling every length, area and volume value as one
checked transaction; with dryRun, only report. Values with a unit
of their own keep it; values the conversion cannot carry (a p-curve
off a plane, a polynomial curve, a parameter on an undefined
parameter space) refuse the whole conversion with unsupported,
each named.
Convert value from unit entity from to unit entity to of this
model (IfcSIUnit, IfcConversionBasedUnit, IfcDerivedUnit).
Copy product (or type object) id with everything it solely owns,
as one checked transaction: what removeProduct would remove with
it is copied (its placement, representation, own property sets,
material usage, ports and, unless openings or fillings is
false, its openings and the doors and windows filling them), what
it would keep is shared, the copy joining the relationship (its
type, shared property sets, classification and, unless container
or aggregate is false, its container and whole). offset moves
the copy in its parent placement's frame; placement places it by
that IfcObjectPlacement instead. The report maps every original
to its copy; with dryRun nothing changes. Refused with
wrong-entity-type for neither a product nor a type object,
invalid-value for both offset and placement, unsupported
for an offset onto a placement that is not a local placement with a
Cartesian location, or a moved copy whose openings are not placed
relative to it.
Every cost schedule and cost item, with values in the tagged encoding.
Create one entity of typeName from named attributes, checked
against the declared release (author with one create); an
IfcRoot without a GlobalId gets one. Returns its id (bigint).
Every [from, to] pair (bigints) where to does not exist.
Non-fatal problems found while reading.
Every GlobalId several entities carry, with its holders in file
order; empty for a conformant file.
The entities selector query selects as a table (#474), as bytes:
options.format "csv" (default), "tsv" or "xlsx" (only in a
build with sheet-xlsx; the npm package throws
feature-disabled), the key column first ("GlobalId", or "id"
with options.key), then one column per value path of columns
("Name", "type.Name", "Pset_WallCommon.FireRating"), each cell
the value the path reads as text, NULL as options.null (empty by
default). Throws invalid-selector for a query or path that does
not parse, invalid-value for an unknown format or key, and
wrong-entity-type for an entity without a GlobalId in a table
keyed by it.
Every element filling opening id (IfcRelFillsElement).
Every coordinate operation (map conversion) resolved with the
project length unit; empty when the model has none. IFC2X3 is read
from its ePSet_MapConversion and ePSet_ProjectedCRS property
sets.
The value path reads from entity id: "type.Name",
"Pset_WallCommon.FireRating", "materials.Name",
"occurrences.count".
The STEP file header: description, name, time stamp, author, organization, preprocessor, originating system, authorization and schema tokens.
The history bound and how many entries each direction holds.
Every entity id (bigint), in file order.
Ids of every entity of exactly typeName, case-insensitive.
Ids of every entity of typeName or any subtype, per the file's
declared schema: IfcWall also finds IFCWALLSTANDARDCASE.
Apply a table (Uint8Array) back to the model by its key column
(#474), as one checked transaction: every other cell is written by
its header's value path, typed by the attribute's declared type or
the property's stated one; a cell that reads what the model holds
changes nothing, so an exported table imported unchanged is a no-op.
The answer lists every change and every refusal by row and column;
any refusal means nothing was written, as does options.dryRun.
Throws only for a call that cannot start: an unknown format or key,
bytes that are no table of the format.
Every INVERSE attribute of entity id, inherited ones first, as
the declared release defines them (#462).
Every reference to entity id: the referencing entity and the
attribute index it references through, in ascending order (#462).
The material association that applies to object id (its own, or
its type object's), or undefined when there is none.
Every object type object id types, in file order.
Every opening voiding element id (IfcRelVoidsElement).
Each product's curves as polylines from the reference backend
(#458), for ids or, without, every product with a shape:
positions (Float32Array, metres, relative to transform), every
polyline's vertices in turn, and per curve its slice, whether it is
closed and its certified chord bound. representation is "Plan"
by default (the best drawing curves), or "Axis", "FootPrint",
"Annotation", "Body", "Surface"; another throws
invalid-value. Trimmed, composite, offset and intrinsic curves
compile (#506); a curve the reference compiler has no certified
polyline for (an implicit curve, an offset of an offset) is an
unsupported refusal naming the product. Text literals and
annotation fill areas beside the curves (a dimension's value) are
listed in skipped, not refused (#512). Opt-in with the meshes:
import @openbim/ifc/mesh.
Each product's Body as Axiolid's neutral geometry graph (#367), exact
(extrusions, sweeps, B-splines, unevaluated booleans), for ids or,
without, every product with a shape, in Axiolid's versioned wire
format: { format: "axiolid-geometry-graph", version: "1.0", graph: { nodes, roots } } (the lowest version the content needs,
"1.0" to "1.4"), in world coordinates, metres. encoding
picks the payload: "json" (the default) the text, "object" the
text parsed, "cbor" the CBOR bytes as a Uint8Array. A product
that cannot be lowered has a typed refusal; the call itself throws
only unsupported-schema, feature-disabled (feature graph) or
invalid-value for an unknown encoding.
Each product's Body as triangles from the reference backend:
positions (Float32Array, metres, relative to transform) and
indices (Uint32Array), for ids or, without, every product
with a shape. A product that cannot be meshed has a typed
refusal. representation meshes another one instead (#458), such
as "Surface"; its curves are left to productCurves, and
closure says "solid" or "surface". Only a Body mesh carries a
colour. Opt-in: a build without the mesh feature (the npm
package's default entry) throws feature-disabled; import
@openbim/ifc/mesh for it.
Each product's world placement (a column-major 4x4 in metres) and
the Body representation a viewer draws, for ids or, without, for
every product with a shape. A product that cannot be placed is a
record with a typed refusal; the call itself throws only
unsupported-schema or feature-disabled (feature placements).
The property sets, quantity sets and predefined property sets that
apply to object id: its own first, then those inherited from its
type object, an occurrence property overriding an inherited one.
Values keep their declared IFC type (typed IFCLENGTHMEASURE(...)).
The property sets of each of ids, in that order, or, with no ids,
of every object definition (IfcObjectDefinition and its subtypes)
in file order, in one pass (#358): the file's property
relationships are validated once for the call, so resolving every
object is linear in the model. Each ObjectPropertySets holds
exactly what propertySets returns for its object, or, in
refusal, the code and message it throws; only a refusal of the
whole model throws. No index outlives the call.
Remove unreferenced entities as one checked transaction; with
dryRun, only report. Without classes, every resource entity no
IfcRoot reaches (nor annotates something reached); with them, the
entities of those classes nothing references, an IfcRoot only
with includeRoots. The owner history stays unless
includeOwnerHistory. Refused with unsupported-schema for a class
the release does not declare.
Reverse the last undo. Refused with history-empty when there is
nothing to redo and history-stale as undo is.
Remove product (or type object) id with everything it solely owns
-- its placement, representation, own property and quantity sets,
material usage, openings and ports, and the relationships left
without an end -- as one checked transaction, keeping what is shared
(a property set another object uses, a type's representation maps).
The report says what went, what stayed and why; with dryRun
nothing changes. Refused with still-referenced while other
placements are relative to its placement (unless
rebasePlacements) or a type object types objects (unless
untypeOccurrences), wrong-entity-type for neither a product nor
a type object, unsupported for a placement that cannot be
re-based.
Remove one property from the object's own set (setProperties with
one edit).
Remove shape representation id with what only it uses (#481), as
one checked transaction: taken off its product definition shape
(which goes when left empty), representation map or shape aspects,
then removed with its items down to what nothing else uses. Shared
items, profiles, points and styles stay, and the report says why;
with dryRun nothing changes. Refused with still-referenced for a
representation map an IfcMappedItem still maps,
wrong-entity-type for an entity that is not an IfcShapeModel.
Remove entity id with its relationships, leaving nothing dangling
(author with one remove); refused with still-referenced while
an entity other than a relationship needs it.
The effective unit of a measureType value ("IFCAREAMEASURE"):
unit when given (a property's stated unit), otherwise the project
default, resolved exactly to SI.
The ids selector query selects, ascending (#464); with base, from
those entities alone.
Class facets (subtypes included) add entities, ! removes them;
attribute, property and type=, material=, classification=,
location= and group= facets filter; , chains facets and +
unites lists. Throws invalid-selector (with span, the byte range
in the UTF-8 query) for a query that does not parse or names a
class or attribute the file's release does not declare.
Set attribute name of entity id; returns the previous value. A
derived attribute is refused (derived-attribute), an INVERSE one
(inverse-attribute).
An IfcValue object is written exactly. A plain value (#342) is
coerced against the attribute's declared type in the declared
release: a string to a label (bare) or the enumeration item it
names, a safe-integer number or a bigint to an INTEGER or REAL
as declared, any other number to a REAL, a boolean to a BOOLEAN
or LOGICAL, an array to an aggregate element by element, null
to $; in a SELECT, the one member that takes it as a typed
parameter. Refused with type-mismatch when it does not fit and
ambiguous-value when several SELECT members take it.
Keep at most limit undo entries; 0 (the default) turns history
off and drops what is held. While it is on, every method that
changes the model is one entry (author is one entry for its whole
batch).
Refused with invalid-value for a limit that is not a whole
number of at least 0 that fits the platform.
Write and remove property and quantity values as one checked
transaction: every edit, in order, or none, and a refused batch
leaves the model unchanged. A write's value is the read side's
value; an inherited value is overridden on the occurrence, never
changed on the shared type set.
Write one value (setProperties with one edit); returns the entity
holding it (bigint).
OptionalsetType: string | nullWrite value at path of entity id as one checked transaction:
an attribute coerced as setAttributeByName coerces a plain value,
or a property from a typed value, or a plain one when the property
already states its type. A refused write changes nothing.
The spatial containment tree: every container with its parent, sub-containers and contained elements.
Every system with its members and served structures, and the memberships the reader could not honour.
How many distinct entities reference entity id (#462).
The type object of occurrence id (IfcRelDefinesByType), or
undefined. Throws wrong-entity-type for a non-IfcObject and
invalid-model when the file states two types.
The upper-case type name of entity id.
Restore the model to the state before the last change: entities
under their ids and at their file positions, the header included.
Undoing a creation frees its id again. Refused with history-empty
when there is nothing to undo (also while history is off) and
history-stale when the model changed outside the history; the
model is unchanged then.
Products no viewer will draw (outside the spatial structure, or with
geometry only in non-model contexts), with a stable reason.
Validate against the schema the header declares; findings are
sorted by severity, rule, entity and slot. maxFindings caps the
report (default 10,000) and sets truncated when reached.
OptionalmaxFindings: number | nullValidate with the EXPRESS rules of the declared release, read from
express, the text of that release's .exp file (#538). Throws
express-mismatch for text that declares another schema or
disagrees with the release's tables, and invalid-express for text
that does not parse. maxFindings is as for validate.
OptionalmaxFindings: number | nullThe element opening id voids, or undefined.
Serialize as STEP bytes.
Serialize as ifcXML bytes, in the layout parseIfcXml reads.
Optionalprofile: string | nullSerialize as ifcZIP bytes: one Deflate entry holding STEP
(model.ifc), or with inner "ifcxml" ifcXML (model.ifcXML)
in the layout profile names, as for writeIfcXml. parse reads
it back.
Optionalinner: string | nullOptionalprofile: string | nullStaticcanonicalSelector query in its canonical form: spacing, quoting and
aliases normalised. Throws invalid-selector.
StaticcatalogThe file name of release's PSD/QTO catalog snapshot, such as
"ifc4x3-add2.bin"; the package ships it as catalog/<name>.
release is a header schema token: "IFC2X3", "IFC4" or
"IFC4X3" ("IFC4X3_ADD2").
StaticcatalogWhether release's catalog is loaded in this module instance, so a
write to its Pset_/Qto_ sets can be checked.
StaticconvertConvert value from the unit named from to the unit named to:
an SI unit with its prefix (METRE, MILLIMETRE, MILLI METRE,
SQUARE_MILLIMETRE, KILOGRAM) or a named unit of IFC4 Table 673
with exact factors (inch, foot, square foot, gallon US,
pound ...). Throws type-mismatch for units of different
dimensions, invalid-value for an unknown unit, unsupported for a
unit with an offset (degree Fahrenheit, #110).
StaticformatWrite value, a length in the unit named unit, as text: decimal in
displayUnit, or feet and inches with fractions (5' - 6 1/2").
StatichandleThe handle of the entity operation index of an author batch
produces, usable wherever a later operation takes an id (bigint).
StaticloadLoad release's catalog from the bytes of its snapshot file, checked
against the pinned SHA-256 (invalid-value otherwise). The
synchronous half of IfcModel.loadCatalog, for a host that reads
the file itself.
StaticnameThe GlobalId named by parts (RFC 9562 version 8): the same parts
give the same GlobalId in every binding and release.
StaticnewA new random GlobalId: an RFC 9562 version-4 UUID from the host's
crypto.getRandomValues, in IFC's 22-character form. Throws
unsupported on a host without it (Node 18).
StaticparseParse a STEP (.ifc) file from its bytes, or an ifcZIP archive
holding STEP or ifcXML, recognized by its ZIP signature and read
within a decompression budget (budget-exceeded past it).
StaticparseParse an ifcXML document: the library's lossless layout without a
profile, or the buildingSMART XSD layout of "IFC4" or
"IFC4X3_ADD2".
Optionalprofile: string | nullStaticparseParse a STEP file under explicit read options. With onMalformed: "skip" a damaged record is dropped and reported by diagnostics()
instead of failing the read; omitted options are strict.
StaticselectorThe version of the selector grammar this build parses ("1.0").
An IFC model: entities keyed by their
#id, in file order.A newtype because
wasm_bindgencan only export a type defined in this crate; all state and behaviour are the core's.