brepjs-bim 0.23.1 → 0.23.2

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.
@@ -1,25 +1,34 @@
1
- import { ValidSolid } from 'brepjs';
1
+ import { Bounds3D, ValidSolid } from 'brepjs';
2
2
  import { ValidationReport } from '../validation/severity.js';
3
3
  import { IfcGuid } from '../identity/ifcGuid.js';
4
4
  import { ImportedSchema } from './spfReader.js';
5
5
  export type { ImportedSchema } from './spfReader.js';
6
6
  /**
7
- * How faithfully a product's body geometry was reconstructed:
7
+ * How faithfully the least faithful retained Body item was reconstructed:
8
8
  * - `PARAMETRIC` — rebuilt losslessly from a swept solid (extrude/revolve).
9
9
  * - `TESSELLATED_MANIFOLD` — a tessellated mesh was recovered as a closed solid
10
- * via an STL round-trip; geometrically faithful but topology was re-derived.
11
- * - `TESSELLATED_LOSSY` — geometry exists only as raw triangles (mesh did not
12
- * close into a solid); `solid` is null, `meshVertices`/`meshIndices` carry it.
10
+ * by sewing its triangles; geometrically faithful but topology was re-derived.
11
+ * - `TESSELLATED_LOSSY` — at least one item exists only as raw triangles because
12
+ * its mesh did not close into a solid. More faithful siblings may remain in `solids`.
13
13
  * - `NONE` — no recognised body representation was found.
14
14
  */
15
15
  export type GeometryFidelity = 'PARAMETRIC' | 'TESSELLATED_MANIFOLD' | 'TESSELLATED_LOSSY' | 'NONE';
16
+ export type ImportedBodyCompleteness = 'COMPLETE' | 'PARTIAL' | 'NONE';
16
17
  export interface ImportedGeometry {
17
18
  readonly fidelity: GeometryFidelity;
18
- /** The reconstructed solid; null when fidelity is `NONE` or `TESSELLATED_LOSSY`. */
19
+ /** Whether every IFC Body item reconstructed into an owned solid. */
20
+ readonly completeness: ImportedBodyCompleteness;
21
+ /** Owned World-placed reconstructed handles. Dispose them through disposeImportedModel(). */
22
+ readonly solids: readonly ValidSolid[];
23
+ /** Borrowed alias for a COMPLETE one-solid Body. Otherwise null. */
19
24
  readonly solid: ValidSolid | null;
20
- /** Raw triangle vertices (interleaved xyz), present only for `TESSELLATED_LOSSY`. */
25
+ /** Component-wise union of all item bounds for a COMPLETE Body. Null if measurement fails. */
26
+ readonly bounds: Bounds3D | null;
27
+ /** Sum of item volumes in mm³ for a COMPLETE Body. Null if measurement fails. */
28
+ readonly volumeMm3: number | null;
29
+ /** Combined raw triangle vertices (interleaved xyz), present for `TESSELLATED_LOSSY`. */
21
30
  readonly meshVertices?: Float32Array | undefined;
22
- /** Raw triangle indices, present only for `TESSELLATED_LOSSY`. */
31
+ /** Combined raw triangle indices, present for `TESSELLATED_LOSSY`. */
23
32
  readonly meshIndices?: Uint32Array | undefined;
24
33
  }
25
34
  export interface ImportedPset {
package/dist/index.d.ts CHANGED
@@ -83,7 +83,7 @@ export type { ClassificationRef } from './types/classificationTypes.js';
83
83
  export type { PsetCategory, PsetMeasureType, PsetTemplate, PsetPropertyTemplate, } from './psets/psetTemplates.js';
84
84
  export { importError } from './errors/bimError.js';
85
85
  export type { BimError, BimErrorKind } from './errors/bimError.js';
86
- export type { ImportedModel, ImportedSchema, ImportedElement, ImportedElementCategory, ImportedGeometry, GeometryFidelity, ImportedPset, ImportedMaterial, ImportedClassification, ImportedSpatialNode, } from './import/importedModel.js';
86
+ export type { ImportedModel, ImportedSchema, ImportedElement, ImportedElementCategory, ImportedGeometry, ImportedBodyCompleteness, GeometryFidelity, ImportedPset, ImportedMaterial, ImportedClassification, ImportedSpatialNode, } from './import/importedModel.js';
87
87
  export type { IfcGuid } from './identity/ifcGuid.js';
88
88
  export type { LocalId, LocalIdCounter } from './identity/localId.js';
89
89
  export type { UnitSystem, LengthUnit } from './units/units.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brepjs-bim",
3
- "version": "0.23.1",
3
+ "version": "0.23.2",
4
4
  "description": "BIM layer for brepjs — IFC4-aligned parametric building elements",
5
5
  "keywords": [
6
6
  "bim",