brepjs-bim 0.23.1 → 0.24.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 +27 -8
- package/dist/brepjs-bim.cjs +1374 -789
- package/dist/brepjs-bim.js +1366 -782
- package/dist/elementFns/placedGeometry.d.ts +5 -0
- package/dist/errors/bimError.d.ts +1 -1
- 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/import/fromIfc.d.ts +7 -1
- package/dist/import/geometryRead.d.ts +13 -1
- package/dist/import/importedModel.d.ts +17 -8
- package/dist/index.d.ts +3 -1
- 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,33 @@ 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.
|
|
47
|
+
|
|
48
|
+
IFC import reconstructs every supported Body item independently. `ImportedGeometry.solids` owns
|
|
49
|
+
the resulting World-placed handles and `completeness` reports `COMPLETE`, `PARTIAL`, or `NONE`.
|
|
50
|
+
`fidelity` reports the least faithful retained item. Raw mesh siblings are combined in
|
|
51
|
+
`meshVertices` and `meshIndices`. The legacy `.solid` property is a borrowed alias only for a
|
|
52
|
+
complete one-solid Body. Dispose import geometry through `disposeImportedModel()` rather than
|
|
53
|
+
through either property. Complete Bodies also expose aggregate `bounds` and `volumeMm3`; both are
|
|
54
|
+
`null` when aggregate measurement fails or when the Body is partial or missing.
|
|
36
55
|
|
|
37
56
|
- Units default to mm; IFC export emits SI metres.
|
|
38
57
|
- Stable identity: deterministic IFC GUIDs (`deriveIfcGuid`) and local id counters.
|