brepjs-bim 0.21.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,9 +7,9 @@ npm install brepjs-bim
7
7
  ```
8
8
 
9
9
  A BIM (Building Information Modeling) layer for [brepjs](https://github.com/andymai/brepjs). It
10
- authors IFC4-aligned parametric building elements (walls, slabs, beams, columns, roofs, curtain
11
- walls, stairs, …), assembles them into a spatial structure (project site building storey),
12
- and serializes the result to a valid **IFC-SPF** file — with a matching importer to read IFC back in.
10
+ authors IFC4-aligned parametric building elements and a focused IFC4X3 civil bridge profile,
11
+ assembles them into a spatial structure, and serializes the result to a valid **IFC-SPF** file —
12
+ with a matching importer to read IFC back in.
13
13
 
14
14
  Pipeline: **author spec → `BimModel` (typed element + brepjs geometry) → spatial structure +
15
15
  property sets + classification → export IFC / COBie, validate, round-trip.**
@@ -28,11 +28,11 @@ useful downstream (psets, classification, materials, quantities), with import, e
28
28
  validation. Geometry is produced by brepjs (OCCT); each element carries a `ValidSolid` (or, for
29
29
  curtain walls, a panel/mullion grid). Element geometry is **unplaced template geometry** in local
30
30
  coordinates — placement (`origin` / `axisX` / `axisZ`) is applied by the IFC layer via
31
- `IfcLocalPlacement`, not baked into the brepjs solid. Use `placedSolids(element)` to read an
32
- element's geometry already transformed to its world placement as fresh, caller-owned solids
33
- (stairs and ramps return one solid per flight, curtain walls their panels and mullions) handy
34
- for display so the on-screen scene matches the IFC
35
- export.
31
+ `IfcLocalPlacement`, not baked into the brepjs solid. Use `placedSolids(element)` to read fresh,
32
+ caller-owned solids transformed by the element's own placement (stairs and ramps return one solid
33
+ per flight, curtain walls their panels and mullions). When an element is beneath a placed spatial
34
+ structure, pass its cumulative frame as `placedSolids(element, { parentFrame })` to obtain world
35
+ coordinates. This is especially important for parent-local Proxy and Earthworks Fill bodies.
36
36
 
37
37
  - Units default to mm; IFC export emits SI metres.
38
38
  - Stable identity: deterministic IFC GUIDs (`deriveIfcGuid`) and local id counters.
@@ -43,18 +43,46 @@ export.
43
43
 
44
44
  ## Status
45
45
 
46
- | Area | State |
47
- | ----------------- | ---------------------------------------------------------------------------------------------------------- |
48
- | Elements | wall, slab, beam, column, roof, curtain wall, space, footing/pile, stair, ramp, railing, covering, proxy |
49
- | Profiles | rectangular / circular / I-shape cores + extended L/T/U/Z/C, hollow, ellipse, arbitrary-with-voids |
50
- | Openings | door / window / slab openings cut as boolean voids; `FillsOpening` / `Voids*` relationships |
51
- | Spatial structure | project → site → building → storey aggregation; `placeIn` to assign elements to a storey |
52
- | Property sets | IFC pset templates + measure types; quantity sets for takeoff |
53
- | Data layers | materials (layer/profile/simple sets), classification refs, surface styles, zones/systems |
54
- | IFC export | `toIfc` → IFC-SPF (`Uint8Array`); IFC4 / IFC4X3 schema selection; owner history |
55
- | IFC import | `fromIfc` / `SpfReader` → `ImportedModel` (elements, geometry, psets, materials, spatial tree) |
56
- | Validation | referential integrity, schema check, geometry validity, IFC round-trip report, buildingSMART gherkin rules |
57
- | Interop | COBie 2.4 export (CSV/JSON), IDS 1.0 checking, BCF 3.0 read/write |
46
+ | Area | State |
47
+ | ----------------- | ------------------------------------------------------------------------------------------------------------------------- |
48
+ | Elements | wall, slab, beam, column, roof, curtain wall, space, footing/pile, stair, ramp, railing, covering, Earthworks Fill, proxy |
49
+ | Profiles | rectangular / circular / I-shape cores + extended L/T/U/Z/C, hollow, ellipse, arbitrary-with-voids |
50
+ | Openings | door / window / slab openings cut as boolean voids; `FillsOpening` / `Voids*` relationships |
51
+ | Spatial structure | building: project → site → building → storey; civil: project site bridge → recursive bridge part |
52
+ | Property sets | IFC pset templates + measure types; quantity sets for takeoff |
53
+ | Data layers | materials (layer/profile/simple sets), classification refs, surface styles, zones/systems |
54
+ | IFC export | `toIfc` → IFC-SPF (`Uint8Array`); IFC4 / IFC4X3 schema selection; owner history |
55
+ | IFC import | `fromIfc` / `SpfReader` → `ImportedModel` (elements, geometry, psets, materials, spatial tree) |
56
+ | Validation | referential integrity, schema check, geometry validity, IFC round-trip report, buildingSMART gherkin rules |
57
+ | Interop | COBie 2.4 export (CSV/JSON), IDS 1.0 checking, BCF 3.0 read/write |
58
+
59
+ ### Focused IFC4X3 civil bridge profile
60
+
61
+ The declarative `civilSemantics` → `resolve` → `familiesToBim` path supports authored Site,
62
+ Bridge, recursively nested Bridge Part, and exact tessellated Earthworks Fill bodies. Products are
63
+ contained by their nearest Bridge Part; stable IFC identity derives from Families key paths.
64
+
65
+ The migrated civil Product vocabulary additionally routes these existing typed product families:
66
+
67
+ - `beam`: beam, cross-girder, girder
68
+ - `column`: pier-stem
69
+ - `footing`: pad
70
+ - `railing`: guardrail
71
+ - `slab`: deck
72
+ - `wall`: wall
73
+
74
+ Their semantic material becomes the normal typed element material when `materialName` is not
75
+ otherwise supplied. Existing non-semantic Families archetypes continue to use the ordinary route
76
+ registry beneath Bridge Parts. Bridge, Bridge Part, and Earthworks Fill require IFC4X3; `fromIfc`
77
+ reconstructs their civil spatial hierarchy, direct containment, and typed Earthworks inventory.
78
+
79
+ The existing typed routes adapt semantic envelope dimensions from the reference Families into
80
+ their parametric BIM specs. They do not promise exact preservation of compound or voided source
81
+ bodies; exact authored-body preservation in this profile is specific to Earthworks Fill.
82
+
83
+ This is deliberately not a claim of complete IFC infrastructure coverage or unchanged parity with
84
+ the full scratch prototype. Member and Sign remain outside the profile: without `proxyEvaluator`
85
+ they are hard errors; with it they are reported `IfcBuildingElementProxy` occurrences.
58
86
 
59
87
  ### Independent validation
60
88
 
@@ -122,10 +150,11 @@ warnings travel inside the payload rather than throwing.
122
150
 
123
151
  ## Design
124
152
 
125
- Each `add*` call parses and validates the spec (the `parse*Spec` functions are also exported for
126
- standalone use), builds the brepjs solid analytically from the spec, and stores a typed `BimElement`
127
- keyed by a `LocalId`. The IFC writer walks the model, applies placement, and emits schema-correct
128
- IFC entities; the importer is the inverse. No kernel/WASM changes are required.
153
+ Each `add*` call parses and validates its spec and stores a typed `BimElement` keyed by a `LocalId`.
154
+ Parametric physical elements build an analytical brepjs solid; civil spatial elements are body-less,
155
+ and arbitrary-body products such as Earthworks Fill take ownership of a validated authored solid.
156
+ The IFC writer walks the model, applies placement, and emits schema-correct IFC entities; the
157
+ importer is the inverse. No kernel/WASM changes are required.
129
158
 
130
159
  ## Development
131
160