brepkit-wasm 2.3.0 → 2.3.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 +15 -0
- package/brepkit_wasm_bg.js +25 -0
- package/brepkit_wasm_bg.wasm +0 -0
- package/brepkit_wasm_node.cjs +25 -0
- package/package.json +1 -1
package/brepkit_wasm.d.ts
CHANGED
|
@@ -558,6 +558,21 @@ export class BrepKernel {
|
|
|
558
558
|
* Returns the number of faces fixed.
|
|
559
559
|
*/
|
|
560
560
|
fixFaceOrientations(solid: number): number;
|
|
561
|
+
/**
|
|
562
|
+
* Reconstruct a solid from a `toBREP` JSON string.
|
|
563
|
+
*
|
|
564
|
+
* Currently supports planar faces with line edges. Non-line edges are
|
|
565
|
+
* approximated as lines (straight segments between start/end vertices).
|
|
566
|
+
* Non-planar surfaces are approximated as planes computed from the wire
|
|
567
|
+
* vertex positions.
|
|
568
|
+
*
|
|
569
|
+
* Returns a solid handle.
|
|
570
|
+
*
|
|
571
|
+
* # Errors
|
|
572
|
+
*
|
|
573
|
+
* Returns an error if the JSON is invalid or reconstruction fails.
|
|
574
|
+
*/
|
|
575
|
+
fromBREP(json: string): number;
|
|
561
576
|
/**
|
|
562
577
|
* Fuse (union) two solids into one.
|
|
563
578
|
*
|
package/brepkit_wasm_bg.js
CHANGED
|
@@ -1243,6 +1243,31 @@ export class BrepKernel {
|
|
|
1243
1243
|
}
|
|
1244
1244
|
return ret[0] >>> 0;
|
|
1245
1245
|
}
|
|
1246
|
+
/**
|
|
1247
|
+
* Reconstruct a solid from a `toBREP` JSON string.
|
|
1248
|
+
*
|
|
1249
|
+
* Currently supports planar faces with line edges. Non-line edges are
|
|
1250
|
+
* approximated as lines (straight segments between start/end vertices).
|
|
1251
|
+
* Non-planar surfaces are approximated as planes computed from the wire
|
|
1252
|
+
* vertex positions.
|
|
1253
|
+
*
|
|
1254
|
+
* Returns a solid handle.
|
|
1255
|
+
*
|
|
1256
|
+
* # Errors
|
|
1257
|
+
*
|
|
1258
|
+
* Returns an error if the JSON is invalid or reconstruction fails.
|
|
1259
|
+
* @param {string} json
|
|
1260
|
+
* @returns {number}
|
|
1261
|
+
*/
|
|
1262
|
+
fromBREP(json) {
|
|
1263
|
+
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1264
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1265
|
+
const ret = wasm.brepkernel_fromBREP(this.__wbg_ptr, ptr0, len0);
|
|
1266
|
+
if (ret[2]) {
|
|
1267
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1268
|
+
}
|
|
1269
|
+
return ret[0] >>> 0;
|
|
1270
|
+
}
|
|
1246
1271
|
/**
|
|
1247
1272
|
* Fuse (union) two solids into one.
|
|
1248
1273
|
*
|
package/brepkit_wasm_bg.wasm
CHANGED
|
Binary file
|
package/brepkit_wasm_node.cjs
CHANGED
|
@@ -1245,6 +1245,31 @@ class BrepKernel {
|
|
|
1245
1245
|
}
|
|
1246
1246
|
return ret[0] >>> 0;
|
|
1247
1247
|
}
|
|
1248
|
+
/**
|
|
1249
|
+
* Reconstruct a solid from a `toBREP` JSON string.
|
|
1250
|
+
*
|
|
1251
|
+
* Currently supports planar faces with line edges. Non-line edges are
|
|
1252
|
+
* approximated as lines (straight segments between start/end vertices).
|
|
1253
|
+
* Non-planar surfaces are approximated as planes computed from the wire
|
|
1254
|
+
* vertex positions.
|
|
1255
|
+
*
|
|
1256
|
+
* Returns a solid handle.
|
|
1257
|
+
*
|
|
1258
|
+
* # Errors
|
|
1259
|
+
*
|
|
1260
|
+
* Returns an error if the JSON is invalid or reconstruction fails.
|
|
1261
|
+
* @param {string} json
|
|
1262
|
+
* @returns {number}
|
|
1263
|
+
*/
|
|
1264
|
+
fromBREP(json) {
|
|
1265
|
+
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1266
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1267
|
+
const ret = wasm.brepkernel_fromBREP(this.__wbg_ptr, ptr0, len0);
|
|
1268
|
+
if (ret[2]) {
|
|
1269
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1270
|
+
}
|
|
1271
|
+
return ret[0] >>> 0;
|
|
1272
|
+
}
|
|
1248
1273
|
/**
|
|
1249
1274
|
* Fuse (union) two solids into one.
|
|
1250
1275
|
*
|
package/package.json
CHANGED