brepjs-bim 0.23.2 → 0.24.1
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 +31 -11
- package/dist/brepjs-bim.cjs +1263 -734
- package/dist/brepjs-bim.js +1255 -727
- package/dist/elementFns/placedGeometry.d.ts +5 -0
- package/dist/errors/bimError.d.ts +1 -1
- package/dist/familiesAdapter.d.ts +15 -3
- package/dist/familiesProductBody.d.ts +40 -0
- package/dist/ifc-writer/ifcWriter.d.ts +16 -0
- package/dist/ifc-writer/psetWriter.d.ts +6 -0
- package/dist/ifc-writer/tessellationWriter.d.ts +26 -0
- package/dist/index.d.ts +2 -0
- package/dist/model/bimModel.d.ts +9 -0
- package/dist/rigidPlacement.d.ts +4 -0
- package/dist/serialize/exactBodyPreflight.d.ts +15 -0
- package/dist/serialize/exactWallQuantities.d.ts +20 -0
- package/dist/types/bimTypes.d.ts +2 -1
- package/dist/types/productBody.d.ts +13 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,14 +25,25 @@ the low-level path (and covers elements the declarative route doesn't yet). See
|
|
|
25
25
|
|
|
26
26
|
Parametric authoring of the common IFC4 building elements plus the data layers that make a model
|
|
27
27
|
useful downstream (psets, classification, materials, quantities), with import, export, and
|
|
28
|
-
validation. Geometry is produced by brepjs (OCCT)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
validation. Geometry is produced by brepjs (OCCT). Walls and railings carry a `ProductBody`, either
|
|
29
|
+
a parametric solid or a non-empty collection of authoritative exact solids. Use `bodySolids()` to
|
|
30
|
+
borrow their Product-local model handles and narrow `geometry.kind` when a caller specifically
|
|
31
|
+
needs the parametric branch. Other solid-bearing categories continue to expose their existing
|
|
32
|
+
geometry types.
|
|
33
|
+
|
|
34
|
+
`takeExactProductBody(localId, { kind: 'EXACT', solids })` installs an authoritative wall or
|
|
35
|
+
railing Body atomically. Success transfers every supplied handle to the model and disposes the
|
|
36
|
+
superseded parametric Body; failure transfers nothing. Add wall openings before takeover, because
|
|
37
|
+
an exact wall rejects later `addDoor()` and `addWindow()` mutations.
|
|
38
|
+
|
|
39
|
+
Element geometry is **unplaced template geometry** in local coordinates. Placement (`origin` /
|
|
40
|
+
`axisX` / `axisZ`) is applied by the IFC layer via `IfcLocalPlacement`, not baked into the brepjs
|
|
41
|
+
solid. Use `placedSolids(element)` to read fresh, caller-owned solids transformed by the element's
|
|
42
|
+
own placement. Stairs and ramps return one solid per flight, curtain walls return their panels and
|
|
43
|
+
mullions, and an exact Product Body returns one placed copy per Body item. When an element is
|
|
44
|
+
beneath a placed spatial structure, pass its cumulative frame as
|
|
45
|
+
`placedSolids(element, { parentFrame })` to obtain world coordinates. This is especially important
|
|
46
|
+
for parent-local Proxy and Earthworks Fill bodies.
|
|
36
47
|
|
|
37
48
|
IFC import reconstructs every supported Body item independently. `ImportedGeometry.solids` owns
|
|
38
49
|
the resulting World-placed handles and `completeness` reports `COMPLETE`, `PARTIAL`, or `NONE`.
|
|
@@ -84,9 +95,16 @@ otherwise supplied. Existing non-semantic Families archetypes continue to use th
|
|
|
84
95
|
registry beneath Bridge Parts. Bridge, Bridge Part, and Earthworks Fill require IFC4X3; `fromIfc`
|
|
85
96
|
reconstructs their civil spatial hierarchy, direct containment, and typed Earthworks inventory.
|
|
86
97
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
98
|
+
Civil-semantic wall and railing routes require `bodyEvaluator` (or the
|
|
99
|
+
`proxyEvaluator` fallback) so the adapter can verify the authored Product Body. Missing the
|
|
100
|
+
evaluator is `FAMILIES_PRODUCT_BODY_EVALUATOR_REQUIRED` (element path and mapped category); the
|
|
101
|
+
adapter does not silently keep a parametric envelope. Conventional archetype walls and railings
|
|
102
|
+
stay specification-authoritative and do not need an evaluator. When the evaluator is present, the
|
|
103
|
+
adapter applies registered wall openings to the parametric candidate, then compares that candidate
|
|
104
|
+
with the evaluated source in Product-local coordinates. Coincident bodies retain editable
|
|
105
|
+
parametric IFC; compound, voided, or otherwise different bodies retain their typed Wall or Railing
|
|
106
|
+
classification and export every authoritative item as tessellation. The evaluator's source handles
|
|
107
|
+
remain borrowed. Other typed civil routes continue to use their semantic envelope dimensions.
|
|
90
108
|
|
|
91
109
|
This is deliberately not a claim of complete IFC infrastructure coverage or unchanged parity with
|
|
92
110
|
the full scratch prototype. Member and Sign remain outside the profile: without `proxyEvaluator`
|
|
@@ -161,6 +179,8 @@ warnings travel inside the payload rather than throwing.
|
|
|
161
179
|
Each `add*` call parses and validates its spec and stores a typed `BimElement` keyed by a `LocalId`.
|
|
162
180
|
Parametric physical elements build an analytical brepjs solid; civil spatial elements are body-less,
|
|
163
181
|
and arbitrary-body products such as Earthworks Fill take ownership of a validated authored solid.
|
|
182
|
+
Families-projected civil walls and railings retain evaluated authored solids when their Bodies do
|
|
183
|
+
not coincide with the post-opening parametric candidate.
|
|
164
184
|
The IFC writer walks the model, applies placement, and emits schema-correct IFC entities; the
|
|
165
185
|
importer is the inverse. No kernel/WASM changes are required.
|
|
166
186
|
|