brepkit-wasm 2.43.0 → 2.43.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/brepkit_wasm.d.ts +19 -0
- package/brepkit_wasm_bg.js +38 -0
- package/brepkit_wasm_bg.wasm +0 -0
- package/brepkit_wasm_node.cjs +38 -0
- package/package.json +1 -1
package/brepkit_wasm.d.ts
CHANGED
|
@@ -1481,6 +1481,13 @@ export class BrepKernel {
|
|
|
1481
1481
|
* Returns the arc index.
|
|
1482
1482
|
*/
|
|
1483
1483
|
sketchAddArc(sketch: number, center_idx: number, start_idx: number, end_idx: number): number;
|
|
1484
|
+
/**
|
|
1485
|
+
* Add a circle to a sketch.
|
|
1486
|
+
*
|
|
1487
|
+
* `center_idx` must be a valid point index. Returns the circle index
|
|
1488
|
+
* (0-based) for use in circle-referencing constraints.
|
|
1489
|
+
*/
|
|
1490
|
+
sketchAddCircle(sketch: number, center_idx: number, radius: number): number;
|
|
1484
1491
|
/**
|
|
1485
1492
|
* Add a constraint to a sketch from a JSON string.
|
|
1486
1493
|
*
|
|
@@ -1668,6 +1675,18 @@ export class BrepKernel {
|
|
|
1668
1675
|
* Returns an error if the solid handle is invalid.
|
|
1669
1676
|
*/
|
|
1670
1677
|
toBREP(solid: number): any;
|
|
1678
|
+
/**
|
|
1679
|
+
* Apply a 4×4 affine transform to a face (in place).
|
|
1680
|
+
*
|
|
1681
|
+
* Transforms all vertices, edge curves, and the face surface geometry.
|
|
1682
|
+
* The `matrix` must contain exactly 16 values in row-major order.
|
|
1683
|
+
*
|
|
1684
|
+
* # Errors
|
|
1685
|
+
*
|
|
1686
|
+
* Returns an error if the face handle is invalid, the matrix doesn't
|
|
1687
|
+
* have 16 elements, or the matrix is singular.
|
|
1688
|
+
*/
|
|
1689
|
+
transformFace(face: number, matrix: Float64Array): void;
|
|
1671
1690
|
/**
|
|
1672
1691
|
* Apply a 4×4 affine transform to a solid (in place).
|
|
1673
1692
|
*
|
package/brepkit_wasm_bg.js
CHANGED
|
@@ -3362,6 +3362,23 @@ export class BrepKernel {
|
|
|
3362
3362
|
}
|
|
3363
3363
|
return ret[0] >>> 0;
|
|
3364
3364
|
}
|
|
3365
|
+
/**
|
|
3366
|
+
* Add a circle to a sketch.
|
|
3367
|
+
*
|
|
3368
|
+
* `center_idx` must be a valid point index. Returns the circle index
|
|
3369
|
+
* (0-based) for use in circle-referencing constraints.
|
|
3370
|
+
* @param {number} sketch
|
|
3371
|
+
* @param {number} center_idx
|
|
3372
|
+
* @param {number} radius
|
|
3373
|
+
* @returns {number}
|
|
3374
|
+
*/
|
|
3375
|
+
sketchAddCircle(sketch, center_idx, radius) {
|
|
3376
|
+
const ret = wasm.brepkernel_sketchAddCircle(this.__wbg_ptr, sketch, center_idx, radius);
|
|
3377
|
+
if (ret[2]) {
|
|
3378
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3379
|
+
}
|
|
3380
|
+
return ret[0] >>> 0;
|
|
3381
|
+
}
|
|
3365
3382
|
/**
|
|
3366
3383
|
* Add a constraint to a sketch from a JSON string.
|
|
3367
3384
|
*
|
|
@@ -3787,6 +3804,27 @@ export class BrepKernel {
|
|
|
3787
3804
|
}
|
|
3788
3805
|
return takeFromExternrefTable0(ret[0]);
|
|
3789
3806
|
}
|
|
3807
|
+
/**
|
|
3808
|
+
* Apply a 4×4 affine transform to a face (in place).
|
|
3809
|
+
*
|
|
3810
|
+
* Transforms all vertices, edge curves, and the face surface geometry.
|
|
3811
|
+
* The `matrix` must contain exactly 16 values in row-major order.
|
|
3812
|
+
*
|
|
3813
|
+
* # Errors
|
|
3814
|
+
*
|
|
3815
|
+
* Returns an error if the face handle is invalid, the matrix doesn't
|
|
3816
|
+
* have 16 elements, or the matrix is singular.
|
|
3817
|
+
* @param {number} face
|
|
3818
|
+
* @param {Float64Array} matrix
|
|
3819
|
+
*/
|
|
3820
|
+
transformFace(face, matrix) {
|
|
3821
|
+
const ptr0 = passArrayF64ToWasm0(matrix, wasm.__wbindgen_malloc);
|
|
3822
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3823
|
+
const ret = wasm.brepkernel_transformFace(this.__wbg_ptr, face, ptr0, len0);
|
|
3824
|
+
if (ret[1]) {
|
|
3825
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
3826
|
+
}
|
|
3827
|
+
}
|
|
3790
3828
|
/**
|
|
3791
3829
|
* Apply a 4×4 affine transform to a solid (in place).
|
|
3792
3830
|
*
|
package/brepkit_wasm_bg.wasm
CHANGED
|
Binary file
|
package/brepkit_wasm_node.cjs
CHANGED
|
@@ -3364,6 +3364,23 @@ class BrepKernel {
|
|
|
3364
3364
|
}
|
|
3365
3365
|
return ret[0] >>> 0;
|
|
3366
3366
|
}
|
|
3367
|
+
/**
|
|
3368
|
+
* Add a circle to a sketch.
|
|
3369
|
+
*
|
|
3370
|
+
* `center_idx` must be a valid point index. Returns the circle index
|
|
3371
|
+
* (0-based) for use in circle-referencing constraints.
|
|
3372
|
+
* @param {number} sketch
|
|
3373
|
+
* @param {number} center_idx
|
|
3374
|
+
* @param {number} radius
|
|
3375
|
+
* @returns {number}
|
|
3376
|
+
*/
|
|
3377
|
+
sketchAddCircle(sketch, center_idx, radius) {
|
|
3378
|
+
const ret = wasm.brepkernel_sketchAddCircle(this.__wbg_ptr, sketch, center_idx, radius);
|
|
3379
|
+
if (ret[2]) {
|
|
3380
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3381
|
+
}
|
|
3382
|
+
return ret[0] >>> 0;
|
|
3383
|
+
}
|
|
3367
3384
|
/**
|
|
3368
3385
|
* Add a constraint to a sketch from a JSON string.
|
|
3369
3386
|
*
|
|
@@ -3789,6 +3806,27 @@ class BrepKernel {
|
|
|
3789
3806
|
}
|
|
3790
3807
|
return takeFromExternrefTable0(ret[0]);
|
|
3791
3808
|
}
|
|
3809
|
+
/**
|
|
3810
|
+
* Apply a 4×4 affine transform to a face (in place).
|
|
3811
|
+
*
|
|
3812
|
+
* Transforms all vertices, edge curves, and the face surface geometry.
|
|
3813
|
+
* The `matrix` must contain exactly 16 values in row-major order.
|
|
3814
|
+
*
|
|
3815
|
+
* # Errors
|
|
3816
|
+
*
|
|
3817
|
+
* Returns an error if the face handle is invalid, the matrix doesn't
|
|
3818
|
+
* have 16 elements, or the matrix is singular.
|
|
3819
|
+
* @param {number} face
|
|
3820
|
+
* @param {Float64Array} matrix
|
|
3821
|
+
*/
|
|
3822
|
+
transformFace(face, matrix) {
|
|
3823
|
+
const ptr0 = passArrayF64ToWasm0(matrix, wasm.__wbindgen_malloc);
|
|
3824
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3825
|
+
const ret = wasm.brepkernel_transformFace(this.__wbg_ptr, face, ptr0, len0);
|
|
3826
|
+
if (ret[1]) {
|
|
3827
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
3828
|
+
}
|
|
3829
|
+
}
|
|
3792
3830
|
/**
|
|
3793
3831
|
* Apply a 4×4 affine transform to a solid (in place).
|
|
3794
3832
|
*
|
package/package.json
CHANGED