brepkit-wasm 1.1.0 → 1.3.0
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 +11 -0
- package/brepkit_wasm_bg.js +33 -0
- package/brepkit_wasm_bg.wasm +0 -0
- package/brepkit_wasm_node.cjs +33 -0
- package/package.json +1 -1
package/brepkit_wasm.d.ts
CHANGED
|
@@ -864,6 +864,17 @@ export class BrepKernel {
|
|
|
864
864
|
* Check whether a wire is closed (last edge connects back to first).
|
|
865
865
|
*/
|
|
866
866
|
isWireClosed(wire: number): boolean;
|
|
867
|
+
/**
|
|
868
|
+
* Lift a 2D curve onto a 3D plane, producing an edge.
|
|
869
|
+
*
|
|
870
|
+
* `curve_type`: 0 = Line, 1 = Circle, 2 = Ellipse, 3 = NURBS.
|
|
871
|
+
* `curve_params` layout varies by type (see docs).
|
|
872
|
+
* The plane is defined by an origin, x-axis, and normal.
|
|
873
|
+
* `t_start`/`t_end` specify the parameter range on the 2D curve.
|
|
874
|
+
*
|
|
875
|
+
* Returns an edge handle (`u32`).
|
|
876
|
+
*/
|
|
877
|
+
liftCurve2dToPlane(curve_type: number, curve_params: Float64Array, origin_x: number, origin_y: number, origin_z: number, x_axis_x: number, x_axis_y: number, x_axis_z: number, normal_x: number, normal_y: number, normal_z: number, t_start: number, t_end: number): number;
|
|
867
878
|
/**
|
|
868
879
|
* Create a linear pattern of a solid.
|
|
869
880
|
*
|
package/brepkit_wasm_bg.js
CHANGED
|
@@ -2060,6 +2060,39 @@ export class BrepKernel {
|
|
|
2060
2060
|
}
|
|
2061
2061
|
return ret[0] !== 0;
|
|
2062
2062
|
}
|
|
2063
|
+
/**
|
|
2064
|
+
* Lift a 2D curve onto a 3D plane, producing an edge.
|
|
2065
|
+
*
|
|
2066
|
+
* `curve_type`: 0 = Line, 1 = Circle, 2 = Ellipse, 3 = NURBS.
|
|
2067
|
+
* `curve_params` layout varies by type (see docs).
|
|
2068
|
+
* The plane is defined by an origin, x-axis, and normal.
|
|
2069
|
+
* `t_start`/`t_end` specify the parameter range on the 2D curve.
|
|
2070
|
+
*
|
|
2071
|
+
* Returns an edge handle (`u32`).
|
|
2072
|
+
* @param {number} curve_type
|
|
2073
|
+
* @param {Float64Array} curve_params
|
|
2074
|
+
* @param {number} origin_x
|
|
2075
|
+
* @param {number} origin_y
|
|
2076
|
+
* @param {number} origin_z
|
|
2077
|
+
* @param {number} x_axis_x
|
|
2078
|
+
* @param {number} x_axis_y
|
|
2079
|
+
* @param {number} x_axis_z
|
|
2080
|
+
* @param {number} normal_x
|
|
2081
|
+
* @param {number} normal_y
|
|
2082
|
+
* @param {number} normal_z
|
|
2083
|
+
* @param {number} t_start
|
|
2084
|
+
* @param {number} t_end
|
|
2085
|
+
* @returns {number}
|
|
2086
|
+
*/
|
|
2087
|
+
liftCurve2dToPlane(curve_type, curve_params, origin_x, origin_y, origin_z, x_axis_x, x_axis_y, x_axis_z, normal_x, normal_y, normal_z, t_start, t_end) {
|
|
2088
|
+
const ptr0 = passArrayF64ToWasm0(curve_params, wasm.__wbindgen_malloc);
|
|
2089
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2090
|
+
const ret = wasm.brepkernel_liftCurve2dToPlane(this.__wbg_ptr, curve_type, ptr0, len0, origin_x, origin_y, origin_z, x_axis_x, x_axis_y, x_axis_z, normal_x, normal_y, normal_z, t_start, t_end);
|
|
2091
|
+
if (ret[2]) {
|
|
2092
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2093
|
+
}
|
|
2094
|
+
return ret[0] >>> 0;
|
|
2095
|
+
}
|
|
2063
2096
|
/**
|
|
2064
2097
|
* Create a linear pattern of a solid.
|
|
2065
2098
|
*
|
package/brepkit_wasm_bg.wasm
CHANGED
|
Binary file
|
package/brepkit_wasm_node.cjs
CHANGED
|
@@ -2062,6 +2062,39 @@ class BrepKernel {
|
|
|
2062
2062
|
}
|
|
2063
2063
|
return ret[0] !== 0;
|
|
2064
2064
|
}
|
|
2065
|
+
/**
|
|
2066
|
+
* Lift a 2D curve onto a 3D plane, producing an edge.
|
|
2067
|
+
*
|
|
2068
|
+
* `curve_type`: 0 = Line, 1 = Circle, 2 = Ellipse, 3 = NURBS.
|
|
2069
|
+
* `curve_params` layout varies by type (see docs).
|
|
2070
|
+
* The plane is defined by an origin, x-axis, and normal.
|
|
2071
|
+
* `t_start`/`t_end` specify the parameter range on the 2D curve.
|
|
2072
|
+
*
|
|
2073
|
+
* Returns an edge handle (`u32`).
|
|
2074
|
+
* @param {number} curve_type
|
|
2075
|
+
* @param {Float64Array} curve_params
|
|
2076
|
+
* @param {number} origin_x
|
|
2077
|
+
* @param {number} origin_y
|
|
2078
|
+
* @param {number} origin_z
|
|
2079
|
+
* @param {number} x_axis_x
|
|
2080
|
+
* @param {number} x_axis_y
|
|
2081
|
+
* @param {number} x_axis_z
|
|
2082
|
+
* @param {number} normal_x
|
|
2083
|
+
* @param {number} normal_y
|
|
2084
|
+
* @param {number} normal_z
|
|
2085
|
+
* @param {number} t_start
|
|
2086
|
+
* @param {number} t_end
|
|
2087
|
+
* @returns {number}
|
|
2088
|
+
*/
|
|
2089
|
+
liftCurve2dToPlane(curve_type, curve_params, origin_x, origin_y, origin_z, x_axis_x, x_axis_y, x_axis_z, normal_x, normal_y, normal_z, t_start, t_end) {
|
|
2090
|
+
const ptr0 = passArrayF64ToWasm0(curve_params, wasm.__wbindgen_malloc);
|
|
2091
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2092
|
+
const ret = wasm.brepkernel_liftCurve2dToPlane(this.__wbg_ptr, curve_type, ptr0, len0, origin_x, origin_y, origin_z, x_axis_x, x_axis_y, x_axis_z, normal_x, normal_y, normal_z, t_start, t_end);
|
|
2093
|
+
if (ret[2]) {
|
|
2094
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2095
|
+
}
|
|
2096
|
+
return ret[0] >>> 0;
|
|
2097
|
+
}
|
|
2065
2098
|
/**
|
|
2066
2099
|
* Create a linear pattern of a solid.
|
|
2067
2100
|
*
|
package/package.json
CHANGED