brepjs 18.17.0 → 18.19.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/README.md +24 -14
- package/dist/2d.cjs +7 -7
- package/dist/2d.js +7 -7
- package/dist/{blueprint-Dn16jzZs.cjs → blueprint-Bl0YQjkk.cjs} +7 -7
- package/dist/{blueprint-C-ngUkOG.js → blueprint-Cy5veXS3.js} +7 -7
- package/dist/{blueprintFns-B7OF-Tv3.js → blueprintFns-CSB51aXT.js} +3 -3
- package/dist/{blueprintFns-j2YskNJl.cjs → blueprintFns-Dkccxo6d.cjs} +3 -3
- package/dist/{blueprintSketcher-D2awQyoi.cjs → blueprintSketcher-Cr9A-R8I.cjs} +4 -4
- package/dist/{blueprintSketcher-DlJ7yDBD.js → blueprintSketcher-DeEogKbs.js} +4 -4
- package/dist/{boolean2D-BlazC0Yu.cjs → boolean2D-BZ1UjpjX.cjs} +5 -5
- package/dist/{boolean2D-C3x4nSLt.js → boolean2D-lE2uy4Mm.js} +5 -5
- package/dist/{booleanFns-COUVhZlF.cjs → booleanFns-CD25YZGm.cjs} +6 -6
- package/dist/{booleanFns-CwskNGMz.js → booleanFns-CtvYfQZq.js} +6 -6
- package/dist/brepjs.cjs +1721 -34
- package/dist/brepjs.js +1735 -54
- package/dist/{cameraFns-leKP1O1t.cjs → cameraFns-CR2inEBU.cjs} +3 -3
- package/dist/{cameraFns-Bix9SLAm.js → cameraFns-Dg1lQP0S.js} +3 -3
- package/dist/core/errors.d.ts +1 -0
- package/dist/core.cjs +3 -3
- package/dist/core.js +3 -3
- package/dist/{cornerFinder-Cm58LsyX.cjs → cornerFinder-CXN1IxPg.cjs} +1 -1
- package/dist/{cornerFinder-GBVBku2c.js → cornerFinder-tfWhcA2M.js} +1 -1
- package/dist/csg/builders.d.ts +36 -0
- package/dist/csg/edit.d.ts +5 -0
- package/dist/csg/evaluate.d.ts +52 -0
- package/dist/csg/evaluators/booleans.d.ts +11 -0
- package/dist/csg/evaluators/compound.d.ts +8 -0
- package/dist/csg/evaluators/context.d.ts +9 -0
- package/dist/csg/evaluators/primitives.d.ts +15 -0
- package/dist/csg/evaluators/transforms.d.ts +10 -0
- package/dist/csg/expressions.d.ts +72 -0
- package/dist/csg/hash.d.ts +9 -0
- package/dist/csg/index.d.ts +15 -0
- package/dist/csg/optimize.d.ts +4 -0
- package/dist/csg/serialize.d.ts +9 -0
- package/dist/csg/types.d.ts +128 -0
- package/dist/{curveFns-DVHUVmuO.js → curveFns-BEF8t7XY.js} +2 -2
- package/dist/{curveFns-Ds0e7i2y.cjs → curveFns-CcheHkr4.cjs} +2 -2
- package/dist/{drawFns-CaWzI_lX.js → drawFns-CEjshioX.js} +14 -14
- package/dist/{drawFns-BvqZW_fK.cjs → drawFns-CuzUHFyD.cjs} +14 -14
- package/dist/{errors-0fYW_YnO.js → errors-8GZS3vy9.js} +1 -0
- package/dist/{errors-Dv6pfNct.cjs → errors-BiY8-q1s.cjs} +1 -0
- package/dist/{extrudeFns-BZAIPeYY.cjs → extrudeFns-BwU4ng1V.cjs} +2 -2
- package/dist/{extrudeFns-vl1_n-yk.js → extrudeFns-gcWJSK9T.js} +2 -2
- package/dist/{faceFns-m0GePUMn.js → faceFns-BNhFoEII.js} +3 -3
- package/dist/{faceFns-CbpUuSSF.cjs → faceFns-BbESdudy.cjs} +3 -3
- package/dist/{helpers-CrH0p3GU.cjs → helpers-BU3ANziG.cjs} +7 -7
- package/dist/{helpers-C7wU_L9l.js → helpers-D1J5VHbk.js} +7 -7
- package/dist/{historyFns-CdhKQcbS.cjs → historyFns-DHOoBh6G.cjs} +5 -5
- package/dist/{historyFns-Cs19Tmq_.js → historyFns-XZp1D_aA.js} +5 -5
- package/dist/{importFns-FvsXxxRS.cjs → importFns-CsRJ9lbm.cjs} +3 -3
- package/dist/{importFns-B1IIPON9.js → importFns-D1oB3yU8.js} +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/brepkit/brepkitWasmTypes.d.ts +10 -7
- package/dist/kernel/index.d.ts +6 -0
- package/dist/{measureFns-DuXAfU3o.cjs → measureFns-BkoPw5JT.cjs} +4 -4
- package/dist/{measureFns-HKGnPqSW.js → measureFns-C3y_WX_E.js} +4 -4
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-Dr3EAM7B.cjs → meshFns-CFMr9FBb.cjs} +3 -3
- package/dist/{meshFns-BtZ68glt.js → meshFns-k0BdoBGR.js} +3 -3
- package/dist/ns/csg.d.ts +4 -0
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{planeOps-CH4ruLuj.cjs → planeOps-2EyPq0tU.cjs} +1 -1
- package/dist/{planeOps-4i2qEraD.js → planeOps-Bea3T3mc.js} +1 -1
- package/dist/{primitiveFns-DVxhf1Oj.js → primitiveFns-DF5IAVNP.js} +7 -7
- package/dist/{primitiveFns-CvE88XaR.cjs → primitiveFns-YpYBx4Pd.cjs} +7 -7
- package/dist/projection.cjs +1 -1
- package/dist/projection.js +1 -1
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/result.cjs +1 -1
- package/dist/result.js +1 -1
- package/dist/{shapeFns-D1gHNJJY.cjs → shapeFns-CHTLdb_n.cjs} +3 -3
- package/dist/{shapeFns-CkkChODq.js → shapeFns-x8vqq2fR.js} +3 -3
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeRefFns-BkVipOTE.cjs → shapeRefFns-CDRLEUik.cjs} +4 -4
- package/dist/{shapeRefFns-TUtuCJ85.js → shapeRefFns-CE0yS0EB.js} +4 -4
- package/dist/{shapeTypes-xj3nxBTM.cjs → shapeTypes-BpKhed-9.cjs} +19 -2
- package/dist/{shapeTypes-B_s2jyQ2.js → shapeTypes-DGtDTS9s.js} +14 -3
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-lBO5Fk9Z.cjs → solidBuilders-BlBaFSCS.cjs} +3 -3
- package/dist/{solidBuilders-DLJlAEi9.js → solidBuilders-Cot05qzs.js} +3 -3
- package/dist/{surfaceBuilders-BkgewbNs.cjs → surfaceBuilders-frj7YRrD.cjs} +3 -3
- package/dist/{surfaceBuilders-DRxCelXR.js → surfaceBuilders-zJyikeav.js} +3 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-D5zPssgR.js → textBlueprints-Bv6zhEyn.js} +9 -9
- package/dist/{textBlueprints-Dy4xulfR.cjs → textBlueprints-CHh9SChA.cjs} +9 -9
- package/dist/{textMetrics-DcIcFPtV.cjs → textMetrics-CKNdQX02.cjs} +2 -2
- package/dist/{textMetrics-Dkitx1CA.js → textMetrics-vUJTTEFi.js} +2 -2
- package/dist/topology.cjs +7 -7
- package/dist/topology.js +7 -7
- package/dist/{topologyQueryFns-D0v-c2Xk.cjs → topologyQueryFns-CHsPXNbI.cjs} +2 -2
- package/dist/{topologyQueryFns-BcYn7Adz.js → topologyQueryFns-CcWaCxeb.js} +2 -2
- package/dist/vectors.cjs +1 -1
- package/dist/vectors.js +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as ok, R as unwrap, b as err, l as typeCastError } from "./errors-
|
|
3
|
-
import { a as getCachedSurfaceType } from "./topologyQueryFns-
|
|
1
|
+
import { Z as getKernel, t as castShape } from "./shapeTypes-DGtDTS9s.js";
|
|
2
|
+
import { A as ok, R as unwrap, b as err, l as typeCastError } from "./errors-8GZS3vy9.js";
|
|
3
|
+
import { a as getCachedSurfaceType } from "./topologyQueryFns-CcWaCxeb.js";
|
|
4
4
|
import { r as toVec3 } from "./types-BIdk_GJY.js";
|
|
5
5
|
//#region src/topology/cast.ts
|
|
6
6
|
var TOPO_ENUM = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BpKhed-9.cjs");
|
|
2
|
+
const require_errors = require("./errors-BiY8-q1s.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CHsPXNbI.cjs");
|
|
4
4
|
const require_types = require("./types-CDkxah-M.cjs");
|
|
5
5
|
//#region src/topology/cast.ts
|
|
6
6
|
var TOPO_ENUM = {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BpKhed-9.cjs");
|
|
2
|
+
const require_errors = require("./errors-BiY8-q1s.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CHsPXNbI.cjs");
|
|
4
4
|
const require_constants = require("./constants-DTorLmes.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-D7xplSx8.cjs");
|
|
6
|
-
const require_faceFns = require("./faceFns-
|
|
7
|
-
const require_shapeFns = require("./shapeFns-
|
|
8
|
-
const require_curveFns = require("./curveFns-
|
|
9
|
-
const require_measureFns = require("./measureFns-
|
|
6
|
+
const require_faceFns = require("./faceFns-BbESdudy.cjs");
|
|
7
|
+
const require_shapeFns = require("./shapeFns-CHTLdb_n.cjs");
|
|
8
|
+
const require_curveFns = require("./curveFns-CcheHkr4.cjs");
|
|
9
|
+
const require_measureFns = require("./measureFns-BkoPw5JT.cjs");
|
|
10
10
|
//#region src/utils/vec2d.ts
|
|
11
11
|
/** Precision for curve intersection and parameter operations. */
|
|
12
12
|
var PRECISION_INTERSECTION = 1e-9;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as ok, T as isOk, b as err, h as bug, o as queryError } from "./errors-
|
|
3
|
-
import { l as getVertices, o as getEdges, s as getFaces, u as getWires } from "./topologyQueryFns-
|
|
1
|
+
import { Z as getKernel, p as isFace } from "./shapeTypes-DGtDTS9s.js";
|
|
2
|
+
import { A as ok, T as isOk, b as err, h as bug, o as queryError } from "./errors-8GZS3vy9.js";
|
|
3
|
+
import { l as getVertices, o as getEdges, s as getFaces, u as getWires } from "./topologyQueryFns-CcWaCxeb.js";
|
|
4
4
|
import { t as DEG2RAD } from "./constants-Ci5CA3aZ.js";
|
|
5
5
|
import { a as vecDot, d as vecNormalize } from "./vecOps-DVROrqTV.js";
|
|
6
|
-
import { c as normalAt, o as getSurfaceType } from "./faceFns-
|
|
7
|
-
import { a as isSameShape, n as getHashCode } from "./shapeFns-
|
|
8
|
-
import { a as curveLength, d as getCurveType, r as curveIsClosed } from "./curveFns-
|
|
9
|
-
import { n as measureArea } from "./measureFns-
|
|
6
|
+
import { c as normalAt, o as getSurfaceType } from "./faceFns-BNhFoEII.js";
|
|
7
|
+
import { a as isSameShape, n as getHashCode } from "./shapeFns-x8vqq2fR.js";
|
|
8
|
+
import { a as curveLength, d as getCurveType, r as curveIsClosed } from "./curveFns-BEF8t7XY.js";
|
|
9
|
+
import { n as measureArea } from "./measureFns-C3y_WX_E.js";
|
|
10
10
|
//#region src/utils/vec2d.ts
|
|
11
11
|
/** Precision for curve intersection and parameter operations. */
|
|
12
12
|
var PRECISION_INTERSECTION = 1e-9;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BpKhed-9.cjs");
|
|
2
|
+
const require_errors = require("./errors-BiY8-q1s.cjs");
|
|
3
3
|
const require_vecOps = require("./vecOps-D7xplSx8.cjs");
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
5
|
-
const require_shapeFns = require("./shapeFns-
|
|
6
|
-
const require_booleanFns = require("./booleanFns-
|
|
4
|
+
const require_faceFns = require("./faceFns-BbESdudy.cjs");
|
|
5
|
+
const require_shapeFns = require("./shapeFns-CHTLdb_n.cjs");
|
|
6
|
+
const require_booleanFns = require("./booleanFns-CD25YZGm.cjs");
|
|
7
7
|
//#region src/utils/uuid.ts
|
|
8
8
|
/** Generate a v4-style UUID string using `crypto.getRandomValues`. */
|
|
9
9
|
function uuidv() {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { B as createKernelHandle,
|
|
2
|
-
import { A as ok, b as err, d as validationError, n as computationError, r as ioError } from "./errors-
|
|
1
|
+
import { B as createKernelHandle, Z as getKernel, t as castShape } from "./shapeTypes-DGtDTS9s.js";
|
|
2
|
+
import { A as ok, b as err, d as validationError, n as computationError, r as ioError } from "./errors-8GZS3vy9.js";
|
|
3
3
|
import { d as vecNormalize, s as vecIsZero } from "./vecOps-DVROrqTV.js";
|
|
4
|
-
import { v as fromBREP } from "./faceFns-
|
|
5
|
-
import { s as toBREP } from "./shapeFns-
|
|
6
|
-
import { a as fuseAll } from "./booleanFns-
|
|
4
|
+
import { v as fromBREP } from "./faceFns-BNhFoEII.js";
|
|
5
|
+
import { s as toBREP } from "./shapeFns-x8vqq2fR.js";
|
|
6
|
+
import { a as fuseAll } from "./booleanFns-CtvYfQZq.js";
|
|
7
7
|
//#region src/utils/uuid.ts
|
|
8
8
|
/** Generate a v4-style UUID string using `crypto.getRandomValues`. */
|
|
9
9
|
function uuidv() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BpKhed-9.cjs");
|
|
2
2
|
const require_vec3 = require("./vec3-S4Oh59IX.cjs");
|
|
3
|
-
const require_errors = require("./errors-
|
|
3
|
+
const require_errors = require("./errors-BiY8-q1s.cjs");
|
|
4
4
|
const require_arrayAccess = require("./arrayAccess-7pTWqkJu.cjs");
|
|
5
|
-
const require_blueprint = require("./blueprint-
|
|
5
|
+
const require_blueprint = require("./blueprint-Bl0YQjkk.cjs");
|
|
6
6
|
//#region src/io/objExportFns.ts
|
|
7
7
|
/** Read a vec3 from a typed array at the given vertex index. */
|
|
8
8
|
function vec3At(arr, i) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Z as getKernel, t as castShape } from "./shapeTypes-DGtDTS9s.js";
|
|
2
2
|
import { n as wasmIndex, t as vec3At$1 } from "./vec3-BRj3eI54.js";
|
|
3
|
-
import { A as ok, b as err, r as ioError, t as BrepErrorCode } from "./errors-
|
|
3
|
+
import { A as ok, b as err, r as ioError, t as BrepErrorCode } from "./errors-8GZS3vy9.js";
|
|
4
4
|
import { n as getAtOrThrow } from "./arrayAccess-C5IWcxs9.js";
|
|
5
|
-
import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-
|
|
5
|
+
import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-Cy5veXS3.js";
|
|
6
6
|
//#region src/io/objExportFns.ts
|
|
7
7
|
/** Read a vec3 from a typed array at the given vertex index. */
|
|
8
8
|
function vec3At(arr, i) {
|
package/dist/index.d.ts
CHANGED
package/dist/io.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_meshFns = require("./meshFns-
|
|
3
|
-
const require_importFns = require("./importFns-
|
|
2
|
+
const require_meshFns = require("./meshFns-CFMr9FBb.cjs");
|
|
3
|
+
const require_importFns = require("./importFns-CsRJ9lbm.cjs");
|
|
4
4
|
exports.blueprintToDXF = require_importFns.blueprintToDXF;
|
|
5
5
|
exports.exportDXF = require_importFns.exportDXF;
|
|
6
6
|
exports.exportGlb = require_importFns.exportGlb;
|
package/dist/io.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-
|
|
2
|
-
import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-
|
|
1
|
+
import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-k0BdoBGR.js";
|
|
2
|
+
import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-D1oB3yU8.js";
|
|
3
3
|
export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Type-safe interface for the brepkit WASM kernel (`BrepKernel`).
|
|
3
3
|
*
|
|
4
4
|
* AUTO-GENERATED by `npm run sync:brepkit-types`.
|
|
5
|
-
* Synced against `brepkit-wasm@2.
|
|
5
|
+
* Synced against `brepkit-wasm@2.89.0`.
|
|
6
6
|
*
|
|
7
7
|
* Methods not yet referenced in the adapter layer are tagged `@unwired`.
|
|
8
8
|
*
|
|
@@ -282,23 +282,26 @@ export interface BrepkitKernel {
|
|
|
282
282
|
/** @unwired */
|
|
283
283
|
detectCoincidentFaces(a: number, b: number): string;
|
|
284
284
|
makeCircleEdge(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, radius: number): number;
|
|
285
|
+
/** @unwired */
|
|
286
|
+
makeCircleEdgeWithRef(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, radius: number, rx: number, ry: number, rz: number): number;
|
|
285
287
|
makeEllipseEdge(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, semiMajor: number, semiMinor: number): number;
|
|
288
|
+
makeEllipseEdgeWithRef(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, semiMajor: number, semiMinor: number, rx: number, ry: number, rz: number): number;
|
|
286
289
|
/** @unwired */
|
|
287
290
|
sketchAddCircle(sketch: number, centerIdx: number, radius: number): number;
|
|
288
291
|
/** @unwired */
|
|
289
292
|
toBrepJson(solid: number): string;
|
|
290
293
|
transformFace(face: number, matrix: Float64Array | number[]): void;
|
|
291
|
-
/** @future Not in brepkit-wasm 2.
|
|
294
|
+
/** @future Not in brepkit-wasm 2.89.0. Referenced with feature detection in adapter. */
|
|
292
295
|
chamferAsymmetric?(solid: number, edgeHandles: Uint32Array | number[], d1: number, d2: number): number;
|
|
293
|
-
/** @future Not in brepkit-wasm 2.
|
|
296
|
+
/** @future Not in brepkit-wasm 2.89.0. Referenced with feature detection in adapter. */
|
|
294
297
|
compoundFuse?(solidIds: Uint32Array | number[]): number;
|
|
295
|
-
/** @future Not in brepkit-wasm 2.
|
|
298
|
+
/** @future Not in brepkit-wasm 2.89.0. Referenced with feature detection in adapter. */
|
|
296
299
|
copyEdge?(edge: number): number;
|
|
297
|
-
/** @future Not in brepkit-wasm 2.
|
|
300
|
+
/** @future Not in brepkit-wasm 2.89.0. Referenced with feature detection in adapter. */
|
|
298
301
|
copyFace?(face: number): number;
|
|
299
|
-
/** @future Not in brepkit-wasm 2.
|
|
302
|
+
/** @future Not in brepkit-wasm 2.89.0. Referenced with feature detection in adapter. */
|
|
300
303
|
transformEdge?(edge: number, matrix: Float64Array | number[]): void;
|
|
301
|
-
/** @future Not in brepkit-wasm 2.
|
|
304
|
+
/** @future Not in brepkit-wasm 2.89.0. Referenced with feature detection in adapter. */
|
|
302
305
|
validateSolidDetails?(solid: number): string;
|
|
303
306
|
/** Release the entire arena. */
|
|
304
307
|
free(): void;
|
package/dist/kernel/index.d.ts
CHANGED
|
@@ -25,6 +25,12 @@ export declare function getKernel2D(id?: string): KernelAdapter & Kernel2DCapabi
|
|
|
25
25
|
* restored synchronously in `finally`, so any `getKernel()` call after
|
|
26
26
|
* the first `await` inside `fn` would observe the wrong kernel.
|
|
27
27
|
*/
|
|
28
|
+
/**
|
|
29
|
+
* Return the id of the currently active default kernel, or `null` if none is
|
|
30
|
+
* registered yet. Useful for code that needs a stable identifier (e.g.
|
|
31
|
+
* cache keys) but doesn't want to ship the actual adapter.
|
|
32
|
+
*/
|
|
33
|
+
export declare function getActiveKernelId(): string | null;
|
|
28
34
|
export declare function withKernel<T extends Exclude<unknown, Promise<unknown>>>(id: string, fn: () => T): T;
|
|
29
35
|
/** Initialise the brepjs kernel from a loaded WASM instance. */
|
|
30
36
|
export declare function initFromOC(oc: KernelInstance): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BpKhed-9.cjs");
|
|
2
|
+
const require_errors = require("./errors-BiY8-q1s.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CHsPXNbI.cjs");
|
|
4
|
+
const require_faceFns = require("./faceFns-BbESdudy.cjs");
|
|
5
5
|
//#region src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-
|
|
3
|
-
import { v as kernelCallRaw } from "./topologyQueryFns-
|
|
4
|
-
import { p as uvBounds } from "./faceFns-
|
|
1
|
+
import { Z as getKernel } from "./shapeTypes-DGtDTS9s.js";
|
|
2
|
+
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-8GZS3vy9.js";
|
|
3
|
+
import { v as kernelCallRaw } from "./topologyQueryFns-CcWaCxeb.js";
|
|
4
|
+
import { p as uvBounds } from "./faceFns-BNhFoEII.js";
|
|
5
5
|
//#region src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|
package/dist/measurement.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_measureFns = require("./measureFns-
|
|
2
|
+
const require_measureFns = require("./measureFns-BkoPw5JT.cjs");
|
|
3
3
|
exports.createDistanceQuery = require_measureFns.createDistanceQuery;
|
|
4
4
|
exports.measureArea = require_measureFns.measureArea;
|
|
5
5
|
exports.measureDistance = require_measureFns.measureDistance;
|
package/dist/measurement.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-
|
|
1
|
+
import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-C3y_WX_E.js";
|
|
2
2
|
export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_shapeFns = require("./shapeFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BpKhed-9.cjs");
|
|
2
|
+
const require_errors = require("./errors-BiY8-q1s.cjs");
|
|
3
|
+
const require_shapeFns = require("./shapeFns-CHTLdb_n.cjs");
|
|
4
4
|
//#region src/topology/meshCache.ts
|
|
5
5
|
/**
|
|
6
6
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as ok, b as err, r as ioError } from "./errors-
|
|
3
|
-
import { O as getFaceOrigins } from "./shapeFns-
|
|
1
|
+
import { Z as getKernel } from "./shapeTypes-DGtDTS9s.js";
|
|
2
|
+
import { A as ok, b as err, r as ioError } from "./errors-8GZS3vy9.js";
|
|
3
|
+
import { O as getFaceOrigins } from "./shapeFns-x8vqq2fR.js";
|
|
4
4
|
//#region src/topology/meshCache.ts
|
|
5
5
|
/**
|
|
6
6
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
package/dist/ns/csg.d.ts
ADDED
package/dist/operations.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_historyFns = require("./historyFns-
|
|
3
|
-
const require_extrudeFns = require("./extrudeFns-
|
|
2
|
+
const require_historyFns = require("./historyFns-DHOoBh6G.cjs");
|
|
3
|
+
const require_extrudeFns = require("./extrudeFns-BwU4ng1V.cjs");
|
|
4
4
|
exports.addChild = require_historyFns.addChild;
|
|
5
5
|
exports.addStep = require_historyFns.addStep;
|
|
6
6
|
exports.circularPattern = require_historyFns.circularPattern;
|
package/dist/operations.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, T as gridPattern, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, g as addChild, h as undoLast, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-
|
|
2
|
-
import { c as sweep, i as complexExtrude, l as twistExtrude, s as supportExtrude } from "./extrudeFns-
|
|
1
|
+
import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, T as gridPattern, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, g as addChild, h as undoLast, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-XZp1D_aA.js";
|
|
2
|
+
import { c as sweep, i as complexExtrude, l as twistExtrude, s as supportExtrude } from "./extrudeFns-gcWJSK9T.js";
|
|
3
3
|
export { addChild, addStep, circularPattern, collectShapes, complexExtrude, countNodes, createAssembly, createAssemblyNode, createHistory, createRegistry, exportAssemblySTEP, findNode, findStep, getShape as getHistoryShape, gridPattern, linearPattern, modifyStep, registerOperation, registerShape, removeChild, replayFrom, replayHistory, stepCount, stepsFrom, supportExtrude, sweep, twistExtrude, undoLast, updateNode, walkAssembly };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_errors = require("./errors-
|
|
1
|
+
const require_errors = require("./errors-BiY8-q1s.cjs");
|
|
2
2
|
const require_constants = require("./constants-DTorLmes.cjs");
|
|
3
3
|
const require_types = require("./types-CDkxah-M.cjs");
|
|
4
4
|
const require_vecOps = require("./vecOps-D7xplSx8.cjs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ok, R as unwrap, b as err, d as validationError } from "./errors-
|
|
1
|
+
import { A as ok, R as unwrap, b as err, d as validationError } from "./errors-8GZS3vy9.js";
|
|
2
2
|
import { t as DEG2RAD } from "./constants-Ci5CA3aZ.js";
|
|
3
3
|
import { r as toVec3 } from "./types-BIdk_GJY.js";
|
|
4
4
|
import { d as vecNormalize, h as vecScale, m as vecRotate, r as vecCross, s as vecIsZero, t as vecAdd } from "./vecOps-DVROrqTV.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as ok, T as isOk, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, v as andThen, w as isErr } from "./errors-
|
|
3
|
-
import { c as getOrCreateCache, d as invalidateShapeCache, i as getCachedIsValid, o as getEdges, s as getFaces, u as getWires } from "./topologyQueryFns-
|
|
1
|
+
import { Z as getKernel, _ as isSolid, c as createSolid, h as isShape3D, p as isFace, r as castShapeWithKnownType, t as castShape, x as isClosedWire, y as isWire } from "./shapeTypes-DGtDTS9s.js";
|
|
2
|
+
import { A as ok, T as isOk, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, v as andThen, w as isErr } from "./errors-8GZS3vy9.js";
|
|
3
|
+
import { c as getOrCreateCache, d as invalidateShapeCache, i as getCachedIsValid, o as getEdges, s as getFaces, u as getWires } from "./topologyQueryFns-CcWaCxeb.js";
|
|
4
4
|
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-Ci5CA3aZ.js";
|
|
5
|
-
import { _ as downcast } from "./faceFns-
|
|
6
|
-
import { _ as propagateAllMetadata, g as collectInputFaceHashes, h as translate } from "./shapeFns-
|
|
7
|
-
import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-
|
|
8
|
-
import { a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces } from "./solidBuilders-
|
|
5
|
+
import { _ as downcast } from "./faceFns-BNhFoEII.js";
|
|
6
|
+
import { _ as propagateAllMetadata, g as collectInputFaceHashes, h as translate } from "./shapeFns-x8vqq2fR.js";
|
|
7
|
+
import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-zJyikeav.js";
|
|
8
|
+
import { a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces } from "./solidBuilders-Cot05qzs.js";
|
|
9
9
|
//#region src/topology/threeHelpers.ts
|
|
10
10
|
/**
|
|
11
11
|
* Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BpKhed-9.cjs");
|
|
2
|
+
const require_errors = require("./errors-BiY8-q1s.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CHsPXNbI.cjs");
|
|
4
4
|
const require_constants = require("./constants-DTorLmes.cjs");
|
|
5
|
-
const require_faceFns = require("./faceFns-
|
|
6
|
-
const require_shapeFns = require("./shapeFns-
|
|
7
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
8
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
5
|
+
const require_faceFns = require("./faceFns-BbESdudy.cjs");
|
|
6
|
+
const require_shapeFns = require("./shapeFns-CHTLdb_n.cjs");
|
|
7
|
+
const require_surfaceBuilders = require("./surfaceBuilders-frj7YRrD.cjs");
|
|
8
|
+
const require_solidBuilders = require("./solidBuilders-BlBaFSCS.cjs");
|
|
9
9
|
//#region src/topology/threeHelpers.ts
|
|
10
10
|
/**
|
|
11
11
|
* Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
|
package/dist/projection.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_cameraFns = require("./cameraFns-
|
|
2
|
+
const require_cameraFns = require("./cameraFns-CR2inEBU.cjs");
|
|
3
3
|
exports.PROJECTION_PLANES = require_cameraFns.PROJECTION_PLANES;
|
|
4
4
|
exports.cameraFromPlane = require_cameraFns.cameraFromPlane;
|
|
5
5
|
exports.cameraLookAt = require_cameraFns.cameraLookAt;
|
package/dist/projection.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-
|
|
1
|
+
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-Dg1lQP0S.js";
|
|
2
2
|
export { PROJECTION_PLANES, cameraFromPlane, cameraLookAt, createCamera, isProjectionPlane, makeProjectedEdges, projectEdges };
|
package/dist/query.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_helpers = require("./helpers-
|
|
3
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
2
|
+
const require_helpers = require("./helpers-BU3ANziG.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-CXN1IxPg.cjs");
|
|
4
4
|
exports.cornerFinder = require_cornerFinder.cornerFinder;
|
|
5
5
|
exports.edgeFinder = require_helpers.edgeFinder;
|
|
6
6
|
exports.faceFinder = require_helpers.faceFinder;
|
package/dist/query.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-
|
|
2
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
1
|
+
import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-D1J5VHbk.js";
|
|
2
|
+
import { t as cornerFinder } from "./cornerFinder-tfWhcA2M.js";
|
|
3
3
|
export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
|
package/dist/result.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_errors = require("./errors-
|
|
2
|
+
const require_errors = require("./errors-BiY8-q1s.cjs");
|
|
3
3
|
exports.BrepBugError = require_errors.BrepBugError;
|
|
4
4
|
exports.BrepErrorCode = require_errors.BrepErrorCode;
|
|
5
5
|
exports.OK = require_errors.OK;
|
package/dist/result.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as ok, B as unwrapOr, E as map, I as tryCatch, L as tryCatchAsync, N as pipeline, O as mapErr, R as unwrap, T as isOk, V as unwrapOrElse, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, t as BrepErrorCode, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-
|
|
1
|
+
import { A as ok, B as unwrapOr, E as map, I as tryCatch, L as tryCatchAsync, N as pipeline, O as mapErr, R as unwrap, T as isOk, V as unwrapOrElse, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, t as BrepErrorCode, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-8GZS3vy9.js";
|
|
2
2
|
export { BrepBugError, BrepErrorCode, OK, andThen, bug, collect, computationError, err, flatMap, ioError, isErr, isOk, kernelError, map, mapErr, match, moduleInitError, ok, pipeline, queryError, sketcherStateError, tryCatch, tryCatchAsync, typeCastError, unwrap, unwrapErr, unwrapOr, unwrapOrElse, validationError };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BpKhed-9.cjs");
|
|
2
|
+
const require_errors = require("./errors-BiY8-q1s.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CHsPXNbI.cjs");
|
|
4
4
|
const require_constants = require("./constants-DTorLmes.cjs");
|
|
5
5
|
//#region src/topology/metadata/originTrackingFns.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-
|
|
3
|
-
import { _ as kernelCall, c as getOrCreateCache, r as getCacheEntry, s as getFaces, v as kernelCallRaw } from "./topologyQueryFns-
|
|
1
|
+
import { Z as getKernel, t as castShape } from "./shapeTypes-DGtDTS9s.js";
|
|
2
|
+
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-8GZS3vy9.js";
|
|
3
|
+
import { _ as kernelCall, c as getOrCreateCache, r as getCacheEntry, s as getFaces, v as kernelCallRaw } from "./topologyQueryFns-CcWaCxeb.js";
|
|
4
4
|
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-Ci5CA3aZ.js";
|
|
5
5
|
//#region src/topology/metadata/originTrackingFns.ts
|
|
6
6
|
/**
|
package/dist/shapeRef.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_shapeRefFns = require("./shapeRefFns-
|
|
2
|
+
const require_shapeRefFns = require("./shapeRefFns-CDRLEUik.cjs");
|
|
3
3
|
exports.assignRoles = require_shapeRefFns.assignRoles;
|
|
4
4
|
exports.captureHint = require_shapeRefFns.captureHint;
|
|
5
5
|
exports.createRef = require_shapeRefFns.createRef;
|
package/dist/shapeRef.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-
|
|
1
|
+
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-CE0yS0EB.js";
|
|
2
2
|
export { assignRoles, captureHint, createRef, defaultScorer, resolveRef, updateRoles };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_vec3 = require("./vec3-S4Oh59IX.cjs");
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
4
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
-
const require_measureFns = require("./measureFns-
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CHsPXNbI.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-BbESdudy.cjs");
|
|
4
|
+
const require_shapeFns = require("./shapeFns-CHTLdb_n.cjs");
|
|
5
|
+
const require_measureFns = require("./measureFns-BkoPw5JT.cjs");
|
|
6
6
|
//#region src/topology/shapeRef/scoring.ts
|
|
7
7
|
/**
|
|
8
8
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as wasmIndex } from "./vec3-BRj3eI54.js";
|
|
2
|
-
import { s as getFaces } from "./topologyQueryFns-
|
|
3
|
-
import { c as normalAt, n as faceCenter, r as faceGeomType } from "./faceFns-
|
|
4
|
-
import { n as getHashCode } from "./shapeFns-
|
|
5
|
-
import { n as measureArea } from "./measureFns-
|
|
2
|
+
import { s as getFaces } from "./topologyQueryFns-CcWaCxeb.js";
|
|
3
|
+
import { c as normalAt, n as faceCenter, r as faceGeomType } from "./faceFns-BNhFoEII.js";
|
|
4
|
+
import { n as getHashCode } from "./shapeFns-x8vqq2fR.js";
|
|
5
|
+
import { n as measureArea } from "./measureFns-C3y_WX_E.js";
|
|
6
6
|
//#region src/topology/shapeRef/scoring.ts
|
|
7
7
|
/**
|
|
8
8
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_vec3 = require("./vec3-S4Oh59IX.cjs");
|
|
2
2
|
const require_occtWasmAdapter = require("./occtWasmAdapter-C2VW-uYg.cjs");
|
|
3
|
-
const require_errors = require("./errors-
|
|
3
|
+
const require_errors = require("./errors-BiY8-q1s.cjs");
|
|
4
4
|
//#region src/kernel/kernel2dTypes.ts
|
|
5
5
|
/** Check if the kernel supports 2D geometry operations. */
|
|
6
6
|
function supportsKernel2D(kernel) {
|
|
@@ -6990,8 +6990,11 @@ function makeArcEdge(bk, p1, p2, p3) {
|
|
|
6990
6990
|
return edgeHandle(bk.makeCircleArc3d(p1[0], p1[1], p1[2], p3[0], p3[1], p3[2], center[0], center[1], center[2], nz[0], nz[1], nz[2]));
|
|
6991
6991
|
}
|
|
6992
6992
|
function makeEllipseEdge(bk, center, normal, majorRadius, minorRadius, xDir) {
|
|
6993
|
-
if (xDir !== void 0) return makeEllipseNurbs(bk, center, normal, majorRadius, minorRadius, 0, 2 * Math.PI, xDir);
|
|
6994
6993
|
const nLen = Math.sqrt(normal[0] ** 2 + normal[1] ** 2 + normal[2] ** 2);
|
|
6994
|
+
if (xDir !== void 0) {
|
|
6995
|
+
const xLen = Math.sqrt(xDir[0] ** 2 + xDir[1] ** 2 + xDir[2] ** 2);
|
|
6996
|
+
return edgeHandle(bk.makeEllipseEdgeWithRef(center[0], center[1], center[2], normal[0] / nLen, normal[1] / nLen, normal[2] / nLen, majorRadius, minorRadius, xDir[0] / xLen, xDir[1] / xLen, xDir[2] / xLen));
|
|
6997
|
+
}
|
|
6995
6998
|
return edgeHandle(bk.makeEllipseEdge(center[0], center[1], center[2], normal[0] / nLen, normal[1] / nLen, normal[2] / nLen, majorRadius, minorRadius));
|
|
6996
6999
|
}
|
|
6997
7000
|
function makeEllipseArc(bk, center, normal, majorRadius, minorRadius, startAngle, endAngle, xDir) {
|
|
@@ -9856,6 +9859,14 @@ function getKernel2D(id) {
|
|
|
9856
9859
|
* restored synchronously in `finally`, so any `getKernel()` call after
|
|
9857
9860
|
* the first `await` inside `fn` would observe the wrong kernel.
|
|
9858
9861
|
*/
|
|
9862
|
+
/**
|
|
9863
|
+
* Return the id of the currently active default kernel, or `null` if none is
|
|
9864
|
+
* registered yet. Useful for code that needs a stable identifier (e.g.
|
|
9865
|
+
* cache keys) but doesn't want to ship the actual adapter.
|
|
9866
|
+
*/
|
|
9867
|
+
function getActiveKernelId() {
|
|
9868
|
+
return _defaultKernelId;
|
|
9869
|
+
}
|
|
9859
9870
|
function withKernel(id, fn) {
|
|
9860
9871
|
const prev = _defaultKernelId;
|
|
9861
9872
|
_defaultKernelId = id;
|
|
@@ -10626,6 +10637,12 @@ Object.defineProperty(exports, "createWire", {
|
|
|
10626
10637
|
return createWire;
|
|
10627
10638
|
}
|
|
10628
10639
|
});
|
|
10640
|
+
Object.defineProperty(exports, "getActiveKernelId", {
|
|
10641
|
+
enumerable: true,
|
|
10642
|
+
get: function() {
|
|
10643
|
+
return getActiveKernelId;
|
|
10644
|
+
}
|
|
10645
|
+
});
|
|
10629
10646
|
Object.defineProperty(exports, "getDisposalStats", {
|
|
10630
10647
|
enumerable: true,
|
|
10631
10648
|
get: function() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as wasmIndex, t as vec3At } from "./vec3-BRj3eI54.js";
|
|
2
2
|
import { _ as serializeCurve2d$2, a as curveTypeName, c as intersectCurves2dFn, d as makeEllipse2d$2, f as makeLine2d$2, g as scaleCurve2d$2, h as rotateCurve2d$2, i as curveBounds, l as makeBezier2d$2, m as mirrorAtPoint, n as addCurveToBBox, o as deserializeCurve2d$2, p as mirrorAcrossAxis, r as createBBox2d, s as evaluateCurve2d$2, u as makeCircle2d$2, v as tangentCurve2d, y as translateCurve2d$2 } from "./occtWasmAdapter--TZGP9DX.js";
|
|
3
|
-
import { A as ok, b as err } from "./errors-
|
|
3
|
+
import { A as ok, b as err } from "./errors-8GZS3vy9.js";
|
|
4
4
|
//#region src/kernel/kernel2dTypes.ts
|
|
5
5
|
/** Check if the kernel supports 2D geometry operations. */
|
|
6
6
|
function supportsKernel2D(kernel) {
|
|
@@ -6986,8 +6986,11 @@ function makeArcEdge(bk, p1, p2, p3) {
|
|
|
6986
6986
|
return edgeHandle(bk.makeCircleArc3d(p1[0], p1[1], p1[2], p3[0], p3[1], p3[2], center[0], center[1], center[2], nz[0], nz[1], nz[2]));
|
|
6987
6987
|
}
|
|
6988
6988
|
function makeEllipseEdge(bk, center, normal, majorRadius, minorRadius, xDir) {
|
|
6989
|
-
if (xDir !== void 0) return makeEllipseNurbs(bk, center, normal, majorRadius, minorRadius, 0, 2 * Math.PI, xDir);
|
|
6990
6989
|
const nLen = Math.sqrt(normal[0] ** 2 + normal[1] ** 2 + normal[2] ** 2);
|
|
6990
|
+
if (xDir !== void 0) {
|
|
6991
|
+
const xLen = Math.sqrt(xDir[0] ** 2 + xDir[1] ** 2 + xDir[2] ** 2);
|
|
6992
|
+
return edgeHandle(bk.makeEllipseEdgeWithRef(center[0], center[1], center[2], normal[0] / nLen, normal[1] / nLen, normal[2] / nLen, majorRadius, minorRadius, xDir[0] / xLen, xDir[1] / xLen, xDir[2] / xLen));
|
|
6993
|
+
}
|
|
6991
6994
|
return edgeHandle(bk.makeEllipseEdge(center[0], center[1], center[2], normal[0] / nLen, normal[1] / nLen, normal[2] / nLen, majorRadius, minorRadius));
|
|
6992
6995
|
}
|
|
6993
6996
|
function makeEllipseArc(bk, center, normal, majorRadius, minorRadius, startAngle, endAngle, xDir) {
|
|
@@ -9848,6 +9851,14 @@ function getKernel2D(id) {
|
|
|
9848
9851
|
* restored synchronously in `finally`, so any `getKernel()` call after
|
|
9849
9852
|
* the first `await` inside `fn` would observe the wrong kernel.
|
|
9850
9853
|
*/
|
|
9854
|
+
/**
|
|
9855
|
+
* Return the id of the currently active default kernel, or `null` if none is
|
|
9856
|
+
* registered yet. Useful for code that needs a stable identifier (e.g.
|
|
9857
|
+
* cache keys) but doesn't want to ship the actual adapter.
|
|
9858
|
+
*/
|
|
9859
|
+
function getActiveKernelId() {
|
|
9860
|
+
return _defaultKernelId;
|
|
9861
|
+
}
|
|
9851
9862
|
function withKernel(id, fn) {
|
|
9852
9863
|
const prev = _defaultKernelId;
|
|
9853
9864
|
_defaultKernelId = id;
|
|
@@ -10510,4 +10521,4 @@ function castShapeWithKnownType(ocShape, knownType, dim) {
|
|
|
10510
10521
|
return createCompound(dc, dim);
|
|
10511
10522
|
}
|
|
10512
10523
|
//#endregion
|
|
10513
|
-
export {
|
|
10524
|
+
export { init as $, planarWire as A, createKernelHandle as B, isOrientedFace as C, manifoldShell as D, isValidSolid as E, as3D as F, unregisterFromCleanup as G, isLive as H, is2D as I, withScopeResultAsync as J, withScope as K, is3D as L, getShapeKind as M, getOrQueryType as N, orientedFace as O, as2D as P, getKernel2D as Q, DisposalScope as R, isManifoldShell as S, isPlanarWire as T, registerForCleanup as U, getDisposalStats as V, resetDisposalStats as W, getActiveKernelId as X, _usingCtx as Y, getKernel as Z, isSolid as _, createEdge as a, supportsProjection as at, closedWire as b, createSolid as c, resetPerformanceStats as ct, isCompound as d, initFromOC as et, isEdge as f, isShell as g, isShape3D as h, createCompound as i, supportsConstraintSketch as it, validSolid as j, planarFace as k, createVertex as l, isShape1D as m, castShape3D as n, registerKernel as nt, createFace as o, BrepkitAdapter as ot, isFace as p, withScopeResult as q, castShapeWithKnownType as r, withKernel as rt, createShell as s, getPerformanceStats as st, castShape as t, prewarm as tt, createWire as u, isVertex as v, isPlanarFace as w, isClosedWire as x, isWire as y, createHandle as z };
|
package/dist/sketching.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
3
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
4
|
-
const require_drawFns = require("./drawFns-
|
|
2
|
+
const require_textBlueprints = require("./textBlueprints-CHh9SChA.cjs");
|
|
3
|
+
const require_blueprintSketcher = require("./blueprintSketcher-Cr9A-R8I.cjs");
|
|
4
|
+
const require_drawFns = require("./drawFns-CuzUHFyD.cjs");
|
|
5
5
|
//#region src/sketching.ts
|
|
6
6
|
/**
|
|
7
7
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
package/dist/sketching.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
2
|
-
import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-
|
|
3
|
-
import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, o as compoundSketchExtrude, p as sketchRevolve, s as compoundSketchFace, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-
|
|
1
|
+
import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-DeEogKbs.js";
|
|
2
|
+
import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-CEjshioX.js";
|
|
3
|
+
import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, o as compoundSketchExtrude, p as sketchRevolve, s as compoundSketchFace, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-Bv6zhEyn.js";
|
|
4
4
|
//#region src/sketching.ts
|
|
5
5
|
/**
|
|
6
6
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|