brepkit-wasm 3.1.4 → 3.2.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/brepkit_wasm.d.ts +43 -0
- package/brepkit_wasm_bg.js +80 -3
- package/brepkit_wasm_bg.wasm +0 -0
- package/brepkit_wasm_node.cjs +80 -3
- package/package.json +1 -1
package/brepkit_wasm.d.ts
CHANGED
|
@@ -382,6 +382,15 @@ export class BrepKernel {
|
|
|
382
382
|
* produces an empty or non-manifold result.
|
|
383
383
|
*/
|
|
384
384
|
cutWithEvolution(a: number, b: number): any;
|
|
385
|
+
/**
|
|
386
|
+
* Cut (subtract) solid `b` from solid `a` with post-processing options.
|
|
387
|
+
*
|
|
388
|
+
* # Errors
|
|
389
|
+
*
|
|
390
|
+
* Returns an error if either solid handle is invalid or the operation
|
|
391
|
+
* produces an empty or non-manifold result.
|
|
392
|
+
*/
|
|
393
|
+
cutWithOptions(a: number, b: number, simplify: boolean): number;
|
|
385
394
|
/**
|
|
386
395
|
* Remove specified faces from a solid (defeaturing).
|
|
387
396
|
*
|
|
@@ -732,6 +741,18 @@ export class BrepKernel {
|
|
|
732
741
|
* produces an empty or non-manifold result.
|
|
733
742
|
*/
|
|
734
743
|
fuseWithEvolution(a: number, b: number): any;
|
|
744
|
+
/**
|
|
745
|
+
* Fuse (union) two solids with post-processing options.
|
|
746
|
+
*
|
|
747
|
+
* `simplify` merges co-surface face fragments after the boolean
|
|
748
|
+
* (the `BooleanOptions.simplify` request from brepjs).
|
|
749
|
+
*
|
|
750
|
+
* # Errors
|
|
751
|
+
*
|
|
752
|
+
* Returns an error if either solid handle is invalid or the operation
|
|
753
|
+
* produces an empty or non-manifold result.
|
|
754
|
+
*/
|
|
755
|
+
fuseWithOptions(a: number, b: number, simplify: boolean): number;
|
|
735
756
|
/**
|
|
736
757
|
* Get the analytic surface parameters of a face.
|
|
737
758
|
*
|
|
@@ -1114,6 +1135,15 @@ export class BrepKernel {
|
|
|
1114
1135
|
* produces an empty result.
|
|
1115
1136
|
*/
|
|
1116
1137
|
intersectWithEvolution(a: number, b: number): any;
|
|
1138
|
+
/**
|
|
1139
|
+
* Intersect two solids with post-processing options.
|
|
1140
|
+
*
|
|
1141
|
+
* # Errors
|
|
1142
|
+
*
|
|
1143
|
+
* Returns an error if either solid handle is invalid or the operation
|
|
1144
|
+
* produces an empty or non-manifold result.
|
|
1145
|
+
*/
|
|
1146
|
+
intersectWithOptions(a: number, b: number, simplify: boolean): number;
|
|
1117
1147
|
/**
|
|
1118
1148
|
* Check if an edge is forward-oriented in a given wire.
|
|
1119
1149
|
*
|
|
@@ -1512,6 +1542,19 @@ export class BrepKernel {
|
|
|
1512
1542
|
* Useful for debugging topology.
|
|
1513
1543
|
*/
|
|
1514
1544
|
meshEdgesAll(solid: number, deflection: number, angular_tolerance?: number | null): JsEdgeLines;
|
|
1545
|
+
/**
|
|
1546
|
+
* Number of boolean operations that have used the mesh (co-refinement)
|
|
1547
|
+
* fallback since module load.
|
|
1548
|
+
*
|
|
1549
|
+
* The counter is process-wide: it is shared across all `BrepKernel`
|
|
1550
|
+
* instances in the same wasm module and never resets. Snapshot it
|
|
1551
|
+
* before an operation chain and compare after — a relative check, so
|
|
1552
|
+
* the shared scope does not matter to single-threaded callers. If it
|
|
1553
|
+
* grew, the chain contains at least one approximate result (analytic
|
|
1554
|
+
* surface types lost, watertightness not guaranteed), and an export
|
|
1555
|
+
* pipeline can refuse the output.
|
|
1556
|
+
*/
|
|
1557
|
+
meshFallbackCount(): number;
|
|
1515
1558
|
/**
|
|
1516
1559
|
* Convex Minkowski sum of two solids (`A ⊕ B`).
|
|
1517
1560
|
*
|
package/brepkit_wasm_bg.js
CHANGED
|
@@ -800,6 +800,25 @@ export class BrepKernel {
|
|
|
800
800
|
}
|
|
801
801
|
return takeFromExternrefTable0(ret[0]);
|
|
802
802
|
}
|
|
803
|
+
/**
|
|
804
|
+
* Cut (subtract) solid `b` from solid `a` with post-processing options.
|
|
805
|
+
*
|
|
806
|
+
* # Errors
|
|
807
|
+
*
|
|
808
|
+
* Returns an error if either solid handle is invalid or the operation
|
|
809
|
+
* produces an empty or non-manifold result.
|
|
810
|
+
* @param {number} a
|
|
811
|
+
* @param {number} b
|
|
812
|
+
* @param {boolean} simplify
|
|
813
|
+
* @returns {number}
|
|
814
|
+
*/
|
|
815
|
+
cutWithOptions(a, b, simplify) {
|
|
816
|
+
const ret = wasm.brepkernel_cutWithOptions(this.__wbg_ptr, a, b, simplify);
|
|
817
|
+
if (ret[2]) {
|
|
818
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
819
|
+
}
|
|
820
|
+
return ret[0] >>> 0;
|
|
821
|
+
}
|
|
803
822
|
/**
|
|
804
823
|
* Remove specified faces from a solid (defeaturing).
|
|
805
824
|
*
|
|
@@ -1559,6 +1578,28 @@ export class BrepKernel {
|
|
|
1559
1578
|
}
|
|
1560
1579
|
return takeFromExternrefTable0(ret[0]);
|
|
1561
1580
|
}
|
|
1581
|
+
/**
|
|
1582
|
+
* Fuse (union) two solids with post-processing options.
|
|
1583
|
+
*
|
|
1584
|
+
* `simplify` merges co-surface face fragments after the boolean
|
|
1585
|
+
* (the `BooleanOptions.simplify` request from brepjs).
|
|
1586
|
+
*
|
|
1587
|
+
* # Errors
|
|
1588
|
+
*
|
|
1589
|
+
* Returns an error if either solid handle is invalid or the operation
|
|
1590
|
+
* produces an empty or non-manifold result.
|
|
1591
|
+
* @param {number} a
|
|
1592
|
+
* @param {number} b
|
|
1593
|
+
* @param {boolean} simplify
|
|
1594
|
+
* @returns {number}
|
|
1595
|
+
*/
|
|
1596
|
+
fuseWithOptions(a, b, simplify) {
|
|
1597
|
+
const ret = wasm.brepkernel_fuseWithOptions(this.__wbg_ptr, a, b, simplify);
|
|
1598
|
+
if (ret[2]) {
|
|
1599
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1600
|
+
}
|
|
1601
|
+
return ret[0] >>> 0;
|
|
1602
|
+
}
|
|
1562
1603
|
/**
|
|
1563
1604
|
* Get the analytic surface parameters of a face.
|
|
1564
1605
|
*
|
|
@@ -2462,6 +2503,25 @@ export class BrepKernel {
|
|
|
2462
2503
|
}
|
|
2463
2504
|
return takeFromExternrefTable0(ret[0]);
|
|
2464
2505
|
}
|
|
2506
|
+
/**
|
|
2507
|
+
* Intersect two solids with post-processing options.
|
|
2508
|
+
*
|
|
2509
|
+
* # Errors
|
|
2510
|
+
*
|
|
2511
|
+
* Returns an error if either solid handle is invalid or the operation
|
|
2512
|
+
* produces an empty or non-manifold result.
|
|
2513
|
+
* @param {number} a
|
|
2514
|
+
* @param {number} b
|
|
2515
|
+
* @param {boolean} simplify
|
|
2516
|
+
* @returns {number}
|
|
2517
|
+
*/
|
|
2518
|
+
intersectWithOptions(a, b, simplify) {
|
|
2519
|
+
const ret = wasm.brepkernel_intersectWithOptions(this.__wbg_ptr, a, b, simplify);
|
|
2520
|
+
if (ret[2]) {
|
|
2521
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2522
|
+
}
|
|
2523
|
+
return ret[0] >>> 0;
|
|
2524
|
+
}
|
|
2465
2525
|
/**
|
|
2466
2526
|
* Check if an edge is forward-oriented in a given wire.
|
|
2467
2527
|
*
|
|
@@ -3350,6 +3410,23 @@ export class BrepKernel {
|
|
|
3350
3410
|
}
|
|
3351
3411
|
return JsEdgeLines.__wrap(ret[0]);
|
|
3352
3412
|
}
|
|
3413
|
+
/**
|
|
3414
|
+
* Number of boolean operations that have used the mesh (co-refinement)
|
|
3415
|
+
* fallback since module load.
|
|
3416
|
+
*
|
|
3417
|
+
* The counter is process-wide: it is shared across all `BrepKernel`
|
|
3418
|
+
* instances in the same wasm module and never resets. Snapshot it
|
|
3419
|
+
* before an operation chain and compare after — a relative check, so
|
|
3420
|
+
* the shared scope does not matter to single-threaded callers. If it
|
|
3421
|
+
* grew, the chain contains at least one approximate result (analytic
|
|
3422
|
+
* surface types lost, watertightness not guaranteed), and an export
|
|
3423
|
+
* pipeline can refuse the output.
|
|
3424
|
+
* @returns {number}
|
|
3425
|
+
*/
|
|
3426
|
+
meshFallbackCount() {
|
|
3427
|
+
const ret = wasm.brepkernel_meshFallbackCount(this.__wbg_ptr);
|
|
3428
|
+
return ret;
|
|
3429
|
+
}
|
|
3353
3430
|
/**
|
|
3354
3431
|
* Convex Minkowski sum of two solids (`A ⊕ B`).
|
|
3355
3432
|
*
|
|
@@ -5204,13 +5281,13 @@ export function __wbg___wbindgen_debug_string_c25d447a39f5578f(arg0, arg1) {
|
|
|
5204
5281
|
export function __wbg___wbindgen_throw_344f42d3211c4765(arg0, arg1) {
|
|
5205
5282
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
5206
5283
|
}
|
|
5207
|
-
export function
|
|
5284
|
+
export function __wbg_error_45f64c9687e4d443(arg0, arg1) {
|
|
5208
5285
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
5209
5286
|
}
|
|
5210
|
-
export function
|
|
5287
|
+
export function __wbg_log_5b66a52e8ad960b5(arg0, arg1) {
|
|
5211
5288
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
5212
5289
|
}
|
|
5213
|
-
export function
|
|
5290
|
+
export function __wbg_warn_55e61a240c3bd865(arg0, arg1) {
|
|
5214
5291
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
5215
5292
|
}
|
|
5216
5293
|
export function __wbindgen_cast_0000000000000001(arg0, arg1) {
|
package/brepkit_wasm_bg.wasm
CHANGED
|
Binary file
|
package/brepkit_wasm_node.cjs
CHANGED
|
@@ -802,6 +802,25 @@ class BrepKernel {
|
|
|
802
802
|
}
|
|
803
803
|
return takeFromExternrefTable0(ret[0]);
|
|
804
804
|
}
|
|
805
|
+
/**
|
|
806
|
+
* Cut (subtract) solid `b` from solid `a` with post-processing options.
|
|
807
|
+
*
|
|
808
|
+
* # Errors
|
|
809
|
+
*
|
|
810
|
+
* Returns an error if either solid handle is invalid or the operation
|
|
811
|
+
* produces an empty or non-manifold result.
|
|
812
|
+
* @param {number} a
|
|
813
|
+
* @param {number} b
|
|
814
|
+
* @param {boolean} simplify
|
|
815
|
+
* @returns {number}
|
|
816
|
+
*/
|
|
817
|
+
cutWithOptions(a, b, simplify) {
|
|
818
|
+
const ret = wasm.brepkernel_cutWithOptions(this.__wbg_ptr, a, b, simplify);
|
|
819
|
+
if (ret[2]) {
|
|
820
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
821
|
+
}
|
|
822
|
+
return ret[0] >>> 0;
|
|
823
|
+
}
|
|
805
824
|
/**
|
|
806
825
|
* Remove specified faces from a solid (defeaturing).
|
|
807
826
|
*
|
|
@@ -1561,6 +1580,28 @@ class BrepKernel {
|
|
|
1561
1580
|
}
|
|
1562
1581
|
return takeFromExternrefTable0(ret[0]);
|
|
1563
1582
|
}
|
|
1583
|
+
/**
|
|
1584
|
+
* Fuse (union) two solids with post-processing options.
|
|
1585
|
+
*
|
|
1586
|
+
* `simplify` merges co-surface face fragments after the boolean
|
|
1587
|
+
* (the `BooleanOptions.simplify` request from brepjs).
|
|
1588
|
+
*
|
|
1589
|
+
* # Errors
|
|
1590
|
+
*
|
|
1591
|
+
* Returns an error if either solid handle is invalid or the operation
|
|
1592
|
+
* produces an empty or non-manifold result.
|
|
1593
|
+
* @param {number} a
|
|
1594
|
+
* @param {number} b
|
|
1595
|
+
* @param {boolean} simplify
|
|
1596
|
+
* @returns {number}
|
|
1597
|
+
*/
|
|
1598
|
+
fuseWithOptions(a, b, simplify) {
|
|
1599
|
+
const ret = wasm.brepkernel_fuseWithOptions(this.__wbg_ptr, a, b, simplify);
|
|
1600
|
+
if (ret[2]) {
|
|
1601
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1602
|
+
}
|
|
1603
|
+
return ret[0] >>> 0;
|
|
1604
|
+
}
|
|
1564
1605
|
/**
|
|
1565
1606
|
* Get the analytic surface parameters of a face.
|
|
1566
1607
|
*
|
|
@@ -2464,6 +2505,25 @@ class BrepKernel {
|
|
|
2464
2505
|
}
|
|
2465
2506
|
return takeFromExternrefTable0(ret[0]);
|
|
2466
2507
|
}
|
|
2508
|
+
/**
|
|
2509
|
+
* Intersect two solids with post-processing options.
|
|
2510
|
+
*
|
|
2511
|
+
* # Errors
|
|
2512
|
+
*
|
|
2513
|
+
* Returns an error if either solid handle is invalid or the operation
|
|
2514
|
+
* produces an empty or non-manifold result.
|
|
2515
|
+
* @param {number} a
|
|
2516
|
+
* @param {number} b
|
|
2517
|
+
* @param {boolean} simplify
|
|
2518
|
+
* @returns {number}
|
|
2519
|
+
*/
|
|
2520
|
+
intersectWithOptions(a, b, simplify) {
|
|
2521
|
+
const ret = wasm.brepkernel_intersectWithOptions(this.__wbg_ptr, a, b, simplify);
|
|
2522
|
+
if (ret[2]) {
|
|
2523
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2524
|
+
}
|
|
2525
|
+
return ret[0] >>> 0;
|
|
2526
|
+
}
|
|
2467
2527
|
/**
|
|
2468
2528
|
* Check if an edge is forward-oriented in a given wire.
|
|
2469
2529
|
*
|
|
@@ -3352,6 +3412,23 @@ class BrepKernel {
|
|
|
3352
3412
|
}
|
|
3353
3413
|
return JsEdgeLines.__wrap(ret[0]);
|
|
3354
3414
|
}
|
|
3415
|
+
/**
|
|
3416
|
+
* Number of boolean operations that have used the mesh (co-refinement)
|
|
3417
|
+
* fallback since module load.
|
|
3418
|
+
*
|
|
3419
|
+
* The counter is process-wide: it is shared across all `BrepKernel`
|
|
3420
|
+
* instances in the same wasm module and never resets. Snapshot it
|
|
3421
|
+
* before an operation chain and compare after — a relative check, so
|
|
3422
|
+
* the shared scope does not matter to single-threaded callers. If it
|
|
3423
|
+
* grew, the chain contains at least one approximate result (analytic
|
|
3424
|
+
* surface types lost, watertightness not guaranteed), and an export
|
|
3425
|
+
* pipeline can refuse the output.
|
|
3426
|
+
* @returns {number}
|
|
3427
|
+
*/
|
|
3428
|
+
meshFallbackCount() {
|
|
3429
|
+
const ret = wasm.brepkernel_meshFallbackCount(this.__wbg_ptr);
|
|
3430
|
+
return ret;
|
|
3431
|
+
}
|
|
3355
3432
|
/**
|
|
3356
3433
|
* Convex Minkowski sum of two solids (`A ⊕ B`).
|
|
3357
3434
|
*
|
|
@@ -5218,13 +5295,13 @@ function __wbg_get_imports() {
|
|
|
5218
5295
|
__wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
|
|
5219
5296
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
5220
5297
|
},
|
|
5221
|
-
|
|
5298
|
+
__wbg_error_45f64c9687e4d443: function(arg0, arg1) {
|
|
5222
5299
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
5223
5300
|
},
|
|
5224
|
-
|
|
5301
|
+
__wbg_log_5b66a52e8ad960b5: function(arg0, arg1) {
|
|
5225
5302
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
5226
5303
|
},
|
|
5227
|
-
|
|
5304
|
+
__wbg_warn_55e61a240c3bd865: function(arg0, arg1) {
|
|
5228
5305
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
5229
5306
|
},
|
|
5230
5307
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
package/package.json
CHANGED