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.
- package/README.md +8 -0
- package/dist/brepjs-bim.cjs +332 -99
- package/dist/brepjs-bim.js +324 -91
- 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 +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
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
|
-
*
|
|
11
|
-
* - `TESSELLATED_LOSSY` —
|
|
12
|
-
* close into a solid
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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';
|