@ifc-lite/parser@3.3.0
Minor Changes
-
#1143
248f2c0Thanks @louistrue! - Preserve source IFC HEADER fields on round-trip export. Re-exporting an
imported file previously regenerated a fresh ifc-lite header, silently dropping
the sourceFILE_DESCRIPTIONitems (anyViewDefinition [...]label and vendor
identifier / coordinate-reference strings) and flattening the exact
FILE_SCHEMAtoken (e.g.IFC4X3_ADD2→IFC4X3, which some toolchains
reject).The parser now captures the verbatim HEADER onto a new
IfcDataStore.sourceHeader(IfcSourceHeader, exported from@ifc-lite/data;
parser also exportsparseSourceHeader), threaded through the worker transport.
StepExporterreproduces the sourceFILE_DESCRIPTIONitems and the exact
FILE_SCHEMAtoken when not converting schemas, falling back to parsing the
source bytes for cache-restored stores. Provenance stays honest:
preprocessor_versionis set toifc-litewhile the source authoring tool is
kept asoriginating_system, and when mutations exist exactly one
Re-exported by ifc-lite, N modification(s)item is appended without removing
the source items.generateHeadernow accepts description/author/organization
arrays plus a free-form schema token and STEP-escapes all fields; it also emits
a properly parenthesisedFILE_DESCRIPTIONlist (the prior single-string form
was malformed STEP). Created-from-scratch (IfcCreator) and federated/merged
exports are unaffected — they keep their own provenance headers by design.
Patch Changes
-
#1151
bfd9004Thanks @louistrue! - De-duplicate the STEP serializer into a single source of truth. The
schema-agnostic STEP serialization logic (serializeValue,generateHeader,
parseStepValue,ref/enumVal/isEntityRef/isEnumValue, and the
registry-injectedtoStepLineWithRegistry/generateStepFileWithRegistry)
previously existed as four hand-synced copies — the codegen template plus three
generatedserializers.tsfiles — which had already silently drifted (the
runtime copy carried a?? []hardening the template lacked). It now lives once
in@ifc-lite/data; the per-schema bundles (parser runtime + codegen outputs)
are thin re-exports that only bind their ownSCHEMA_REGISTRYto the
registry-coupled helpers, so the copies can never diverge again. A codegen test
asserts the generated bundle stays a thin re-export rather than re-inlining
logic.Also fixes the broken
generate:ifc4script (it pointed at a non-existent
schemas/IFC4.exp; the real file isschemas/IFC4_ADD2_TC1.exp). No public
behaviour change:@ifc-lite/parserre-exports the same serializer symbols as
before;@ifc-lite/datagains the shared primitives;@ifc-lite/codegennow
declares@ifc-lite/dataas a dependency since the generated bundle imports it. -
#1145
ddae2b0Thanks @louistrue! - Resolve names for IfcGroup-family entities and make zones/systems listable (#1075 follow-up).IfcZone,IfcGroup,IfcSystemandIfcDistributionSystemare notIfcProductsubtypes, so the columnar parser categorised them asCAT_SKIPand never added them to theEntityTable. As a resultgetName()returned''(the UI showed "Group #"),getByType()could not find them (so they were absent from lists), and the "By Zone" lens fell back to an arbitrary first group becausegetTypeName()returnedUnknown.IfcSpatialZonewas in the table but itsNamewas never extracted.This routes the group family into the
EntityTablewithName(falling back toLongNamefor systems/zones that leaveNameempty) plusDescriptionandObjectType(the system designation), and extracts names for the previously-unnamed "other relevant" products (includingIfcSpatialZone). NewIfcSystem/IfcDistributionSystemIfcTypeEnumentries make systems addressable bygetByType. Zones, spatial zones and systems are now selectable in the list builder and ship a "Zones & Systems" preset, the relationship card and "By Zone" lens legend show real names (with anObjectTypefallback for unnamed systems), and selecting a group surfaces its attributes.The cache
FORMAT_VERSIONis bumped (6 → 7) so models cached before the fix re-parse and pick up the resolved names. -
Updated dependencies [
bfd9004,248f2c0,ddae2b0]:- @ifc-lite/data@2.1.0