brepjs-bim 0.24.3 → 0.24.5
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 +12 -0
- package/dist/brepjs-bim.cjs +431 -167
- package/dist/brepjs-bim.js +423 -159
- package/dist/geometryCleanupDiagnostics.d.ts +6 -0
- package/dist/ifc-writer/psetWriter.d.ts +2 -2
- package/dist/import/cutImportedSolids.d.ts +4 -0
- package/dist/import/fromIfc.d.ts +1 -1
- package/dist/import/importedModel.d.ts +6 -3
- package/dist/serialize/{exactWallQuantities.d.ts → wallQuantities.d.ts} +3 -3
- package/package.json +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BimError } from './errors/bimError.js';
|
|
2
|
+
import { GeometryCleanupDiagnostic } from './productBodyCleanup.js';
|
|
3
|
+
/** Read prior owner attempts without retrying releases or merging distinct failures. */
|
|
4
|
+
export declare function reportedGeometryCleanup(error: BimError, operation: string, context?: {
|
|
5
|
+
readonly itemIndex?: number;
|
|
6
|
+
}): readonly GeometryCleanupDiagnostic[];
|
|
@@ -44,8 +44,8 @@ export declare function writeCustomPsets(w: IfcWriter, ownerHistoryId: number, e
|
|
|
44
44
|
* so the caller can skip emitting a weight quantity.
|
|
45
45
|
*/
|
|
46
46
|
export declare function resolveDensityKgM3(materialName: string | undefined, explicitDensityKgM3: number | undefined): number | undefined;
|
|
47
|
-
export declare function writeWallBaseQuantities(w: IfcWriter, ownerHistoryId: number, wallExpressId: number, spec: WallSpec, openings: readonly WallOpeningSpec[], densityKgM3?: number): void;
|
|
48
|
-
export declare function
|
|
47
|
+
export declare function writeWallBaseQuantities(w: IfcWriter, ownerHistoryId: number, wallExpressId: number, spec: WallSpec, openings: readonly WallOpeningSpec[], netVolumeM3: number, densityKgM3?: number): void;
|
|
48
|
+
export declare function writeWallBodyQuantities(w: IfcWriter, ownerHistoryId: number, wallExpressId: number, values: {
|
|
49
49
|
readonly lengthM: number;
|
|
50
50
|
readonly widthM: number;
|
|
51
51
|
readonly heightM: number;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Result, ValidSolid } from 'brepjs';
|
|
2
|
+
import { BimError } from '../errors/bimError.js';
|
|
3
|
+
/** Borrow World-placed inputs; own every disconnected result independently of the cut's cache. */
|
|
4
|
+
export declare function cutImportedSolids(host: ValidSolid, opening: ValidSolid): Result<readonly ValidSolid[], BimError>;
|
package/dist/import/fromIfc.d.ts
CHANGED
|
@@ -25,6 +25,6 @@ export declare function setFromIfcTestHooksForTesting(hooks: FromIfcTestHooks |
|
|
|
25
25
|
* fatal failures — bad bytes, unsupported schema, WASM open failure — return
|
|
26
26
|
* `err`. Inspect {@link ImportedModel.diagnostics} for per-element quality.
|
|
27
27
|
*
|
|
28
|
-
* The web-ifc model handle is
|
|
28
|
+
* The web-ifc model handle is closed before handing reconstructed owners to the caller.
|
|
29
29
|
*/
|
|
30
30
|
export declare function fromIfc(bytes: Uint8Array, options?: FromIfcOptions): Promise<Result<ImportedModel, BimError>>;
|
|
@@ -18,13 +18,16 @@ export interface ImportedGeometry {
|
|
|
18
18
|
readonly fidelity: GeometryFidelity;
|
|
19
19
|
/** Whether every IFC Body item reconstructed into an owned solid. */
|
|
20
20
|
readonly completeness: ImportedBodyCompleteness;
|
|
21
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Owned World-placed handles, in source-item order. Opening cuts can leave zero
|
|
23
|
+
* or more independent solids per source item. Dispose through disposeImportedModel().
|
|
24
|
+
*/
|
|
22
25
|
readonly solids: readonly ValidSolid[];
|
|
23
26
|
/** Borrowed alias for a COMPLETE one-solid Body. Otherwise null. */
|
|
24
27
|
readonly solid: ValidSolid | null;
|
|
25
|
-
/**
|
|
28
|
+
/** All surviving item bounds for a COMPLETE Body. Null for no survivors or measurement failure. */
|
|
26
29
|
readonly bounds: Bounds3D | null;
|
|
27
|
-
/**
|
|
30
|
+
/** Occupied-union mm³ for a COMPLETE Body. Null for no survivors or measurement failure. */
|
|
28
31
|
readonly volumeMm3: number | null;
|
|
29
32
|
/** Combined raw triangle vertices (interleaved xyz), present for `TESSELLATED_LOSSY`. */
|
|
30
33
|
readonly meshVertices?: Float32Array | undefined;
|
|
@@ -2,15 +2,15 @@ import { Result, ValidSolid } from 'brepjs';
|
|
|
2
2
|
import { BimError } from '../errors/bimError.js';
|
|
3
3
|
import { WallSpec } from '../specs/wallSpec.js';
|
|
4
4
|
import { NonEmpty } from '../types/productBody.js';
|
|
5
|
-
interface
|
|
5
|
+
interface WallQuantityValues {
|
|
6
6
|
readonly lengthM: number;
|
|
7
7
|
readonly widthM: number;
|
|
8
8
|
readonly heightM: number;
|
|
9
9
|
readonly netVolumeM3: number;
|
|
10
10
|
}
|
|
11
|
-
interface
|
|
11
|
+
interface WallQuantityInput {
|
|
12
12
|
readonly spec: WallSpec;
|
|
13
13
|
readonly solids: NonEmpty<ValidSolid>;
|
|
14
14
|
}
|
|
15
|
-
export declare function
|
|
15
|
+
export declare function deriveWallQuantities(input: WallQuantityInput): Result<WallQuantityValues, BimError>;
|
|
16
16
|
export {};
|