brepjs 18.118.19 → 18.118.21
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/dist/2d.cjs +7 -7
- package/dist/2d.js +7 -7
- package/dist/{adjacencyFns-CA3Etyxq.js → adjacencyFns-Dgsl8VJ2.js} +27 -2
- package/dist/{adjacencyFns-Ds3HCvKX.cjs → adjacencyFns-h7eAxaRD.cjs} +27 -2
- package/dist/{blueprint-0DxFJgG3.js → blueprint-CwQmYoR4.js} +8 -8
- package/dist/{blueprint-BbWSvB5F.cjs → blueprint-DG-2uqNB.cjs} +19 -19
- package/dist/{blueprintFns-BaUv-Wlq.cjs → blueprintFns-FAuYTbQQ.cjs} +3 -3
- package/dist/{blueprintFns-cG_DFd8M.js → blueprintFns-aCrK18ZR.js} +3 -3
- package/dist/{blueprintSketcher-Cgz3qJx2.js → blueprintSketcher-VvIRL3M8.js} +5 -5
- package/dist/{blueprintSketcher-DKbyT3MJ.cjs → blueprintSketcher-k5dNnvzs.cjs} +21 -21
- package/dist/{boolean2D-B1WZsDzl.cjs → boolean2D-BmkwzUgt.cjs} +17 -17
- package/dist/{boolean2D-BgAUsrkF.js → boolean2D-qYYFeLWX.js} +6 -6
- package/dist/brepjs.cjs +35 -35
- package/dist/brepjs.js +29 -29
- package/dist/bug-BdOHwn_e.js +47 -0
- package/dist/{vec3-CFwOI0ZI.cjs → bug-O02CsAmt.cjs} +34 -0
- package/dist/{cameraFns-DIPrieGu.cjs → cameraFns-BZMHFbh9.cjs} +4 -4
- package/dist/{cameraFns-DdyBVRGK.js → cameraFns-CYU4C4N6.js} +4 -4
- package/dist/core.cjs +6 -5
- package/dist/core.js +4 -3
- package/dist/{cornerFinder-DxAdJ27L.cjs → cornerFinder-BEiSjmuO.cjs} +1 -1
- package/dist/{cornerFinder-Bz4GBpuu.js → cornerFinder-DhOm0L8g.js} +1 -1
- package/dist/{curveFns-Lkb1QlRl.js → curveFns-SNQ04JW6.js} +2 -2
- package/dist/{curveFns-_f5x9L6D.cjs → curveFns-YN8_CsqU.cjs} +2 -2
- package/dist/{drawFns-DrrUmioW.js → drawFns-8zxP0gC5.js} +15 -15
- package/dist/{drawFns-BL6RRjT0.cjs → drawFns-Dqsv_t37.cjs} +34 -34
- package/dist/{errors-DNWJsfVU.js → errors-B3CDG537.js} +2 -24
- package/dist/{errors-CXJtc4I7.cjs → errors-CJU8CHng.cjs} +3 -37
- package/dist/{faceFns-BapYNAxj.cjs → faceFns-C0SwZInk.cjs} +3 -3
- package/dist/{faceFns-CgTNP9kU.js → faceFns-CCu9ULQm.js} +3 -3
- package/dist/{healingFns-8zD9gHRr.cjs → healingFns-Bbl5KTIh.cjs} +6 -6
- package/dist/{healingFns-Bp8ixSdr.js → healingFns-D6Bizorp.js} +6 -6
- package/dist/{helpers-DGAx5Y2e.js → helpers-By-BruMN.js} +8 -7
- package/dist/{helpers-DARRNSnZ.cjs → helpers-Cv-lOGsc.cjs} +9 -8
- package/dist/{importFns-B8VrggoW.cjs → importFns-6eFs1L_G.cjs} +10 -10
- package/dist/{importFns-D8kNKBaP.js → importFns-Bcza0b4Y.js} +4 -4
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +5 -2
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/kernel/occtWasm/occtWasmTypes.d.ts +4 -0
- package/dist/kernel/unsupported.d.ts +14 -0
- package/dist/{loftFns-DTJrpzK7.cjs → loftFns-Bbe5jRA-.cjs} +2 -2
- package/dist/{loftFns-CSdcxPhe.js → loftFns-DEReccFa.js} +2 -2
- package/dist/{measureFns-Pv782Tb2.js → measureFns-DHj5Z-5c.js} +4 -4
- package/dist/{measureFns-DBBUqf_V.cjs → measureFns-DMzw5wf0.cjs} +4 -4
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-CP_Gg9j9.cjs → meshFns-B9pPcwuD.cjs} +4 -4
- package/dist/{meshFns-CYFz0R29.js → meshFns-C2nLgSf2.js} +4 -4
- package/dist/{occtWasmAdapter-BgmRCYeD.js → occtWasmAdapter-5_6aHhcD.js} +43 -9
- package/dist/{occtWasmAdapter-CWX5KCl8.cjs → occtWasmAdapter-CIxwUim8.cjs} +56 -10
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{planeOps-DSjjtrjg.js → planeOps-Cp6GQ23-.js} +1 -1
- package/dist/{planeOps-BA4HfgQu.cjs → planeOps-Cr25KWWA.cjs} +1 -1
- package/dist/{primitiveFns-cAodLWtw.js → primitiveFns-D2zyQa3w.js} +5 -5
- package/dist/{primitiveFns-BhfCCIWH.cjs → primitiveFns-DZXN7qDb.cjs} +5 -5
- 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/{refResolveFns-BF9Ag5ch.cjs → refResolveFns-CHm7tsm2.cjs} +6 -6
- package/dist/{refResolveFns-B7ixHjFn.js → refResolveFns-C_mHlM8R.js} +6 -6
- package/dist/result.cjs +4 -3
- package/dist/result.js +2 -1
- package/dist/{shapeFns-ey7LN7Bu.js → shapeFns-BakfS4c9.js} +3 -3
- package/dist/{shapeFns-DGEpliyN.cjs → shapeFns-DzXcfZHY.cjs} +3 -3
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes-B1YVA0wM.js → shapeTypes-B5bBKbg9.js} +9 -9
- package/dist/{shapeTypes-DXLJEolb.cjs → shapeTypes-BfOb9vzc.cjs} +183 -183
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-CbdRC65U.cjs → solidBuilders-BgrXN-GP.cjs} +7 -7
- package/dist/{solidBuilders-Dzd09AEk.js → solidBuilders-DaTgm_Wj.js} +7 -7
- package/dist/{surfaceBuilders-DISUSNgU.js → surfaceBuilders-BdUP_OXk.js} +3 -3
- package/dist/{surfaceBuilders-M_S5pGJi.cjs → surfaceBuilders-CUNhA_3a.cjs} +3 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-BNR8zfrZ.cjs → textBlueprints--5GSuYEm.cjs} +19 -18
- package/dist/{textBlueprints-BlN1vCZ2.js → textBlueprints-C_JaAGiG.js} +10 -9
- package/dist/{textMetrics-BcgFzxJW.js → textMetrics-829YpBdN.js} +2 -2
- package/dist/{textMetrics-kUZVQtvY.cjs → textMetrics-CyJlakdR.cjs} +2 -2
- package/dist/{threadFns-VuImNUwV.cjs → threadFns-BBELmTZv.cjs} +8 -8
- package/dist/{threadFns-CU9bwc38.js → threadFns-H0mRmS6I.js} +8 -8
- package/dist/topology/adjacencyFns.d.ts +4 -0
- package/dist/topology.cjs +9 -9
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-DQmiyVS8.js → topologyQueryFns-MAUFbsSp.js} +2 -2
- package/dist/{topologyQueryFns-WesEKd3r.cjs → topologyQueryFns-tns6VXoD.cjs} +2 -2
- package/dist/vectors.cjs +1 -1
- package/dist/vectors.js +1 -1
- package/package.json +1 -1
- package/dist/vec3-Dpha8d5k.js +0 -25
package/dist/brepjs.cjs
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_textBlueprints = require("./textBlueprints
|
|
3
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
4
|
-
const require_occtWasmAdapter = require("./occtWasmAdapter-
|
|
5
|
-
const
|
|
6
|
-
const require_errors = require("./errors-
|
|
7
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
2
|
+
const require_textBlueprints = require("./textBlueprints--5GSuYEm.cjs");
|
|
3
|
+
const require_shapeTypes = require("./shapeTypes-BfOb9vzc.cjs");
|
|
4
|
+
const require_occtWasmAdapter = require("./occtWasmAdapter-CIxwUim8.cjs");
|
|
5
|
+
const require_bug = require("./bug-O02CsAmt.cjs");
|
|
6
|
+
const require_errors = require("./errors-CJU8CHng.cjs");
|
|
7
|
+
const require_topologyQueryFns = require("./topologyQueryFns-tns6VXoD.cjs");
|
|
8
8
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
9
9
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
10
10
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
11
|
-
const require_planeOps = require("./planeOps-
|
|
12
|
-
const require_faceFns = require("./faceFns-
|
|
13
|
-
const require_shapeFns = require("./shapeFns-
|
|
14
|
-
const require_curveFns = require("./curveFns-
|
|
15
|
-
const require_meshFns = require("./meshFns-
|
|
11
|
+
const require_planeOps = require("./planeOps-Cr25KWWA.cjs");
|
|
12
|
+
const require_faceFns = require("./faceFns-C0SwZInk.cjs");
|
|
13
|
+
const require_shapeFns = require("./shapeFns-DzXcfZHY.cjs");
|
|
14
|
+
const require_curveFns = require("./curveFns-YN8_CsqU.cjs");
|
|
15
|
+
const require_meshFns = require("./meshFns-B9pPcwuD.cjs");
|
|
16
16
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
17
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
18
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
19
|
-
const require_healingFns = require("./healingFns-
|
|
20
|
-
const require_threadFns = require("./threadFns-
|
|
21
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
22
|
-
const require_helpers = require("./helpers-
|
|
23
|
-
const require_drawFns = require("./drawFns-
|
|
24
|
-
const require_measureFns = require("./measureFns-
|
|
25
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
26
|
-
const require_boolean2D = require("./boolean2D-
|
|
27
|
-
const require_blueprintFns = require("./blueprintFns-
|
|
28
|
-
const require_importFns = require("./importFns-
|
|
29
|
-
const require_loftFns = require("./loftFns-
|
|
30
|
-
const require_cameraFns = require("./cameraFns-
|
|
31
|
-
const require_textMetrics = require("./textMetrics-
|
|
32
|
-
const require_adjacencyFns = require("./adjacencyFns-
|
|
33
|
-
const require_refResolveFns = require("./refResolveFns-
|
|
17
|
+
const require_surfaceBuilders = require("./surfaceBuilders-CUNhA_3a.cjs");
|
|
18
|
+
const require_solidBuilders = require("./solidBuilders-BgrXN-GP.cjs");
|
|
19
|
+
const require_healingFns = require("./healingFns-Bbl5KTIh.cjs");
|
|
20
|
+
const require_threadFns = require("./threadFns-BBELmTZv.cjs");
|
|
21
|
+
const require_blueprintSketcher = require("./blueprintSketcher-k5dNnvzs.cjs");
|
|
22
|
+
const require_helpers = require("./helpers-Cv-lOGsc.cjs");
|
|
23
|
+
const require_drawFns = require("./drawFns-Dqsv_t37.cjs");
|
|
24
|
+
const require_measureFns = require("./measureFns-DMzw5wf0.cjs");
|
|
25
|
+
const require_cornerFinder = require("./cornerFinder-BEiSjmuO.cjs");
|
|
26
|
+
const require_boolean2D = require("./boolean2D-BmkwzUgt.cjs");
|
|
27
|
+
const require_blueprintFns = require("./blueprintFns-FAuYTbQQ.cjs");
|
|
28
|
+
const require_importFns = require("./importFns-6eFs1L_G.cjs");
|
|
29
|
+
const require_loftFns = require("./loftFns-Bbe5jRA-.cjs");
|
|
30
|
+
const require_cameraFns = require("./cameraFns-BZMHFbh9.cjs");
|
|
31
|
+
const require_textMetrics = require("./textMetrics-CyJlakdR.cjs");
|
|
32
|
+
const require_adjacencyFns = require("./adjacencyFns-h7eAxaRD.cjs");
|
|
33
|
+
const require_refResolveFns = require("./refResolveFns-CHm7tsm2.cjs");
|
|
34
34
|
const require_workerPool = require("./workerPool-D30NsiIW.cjs");
|
|
35
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
35
|
+
const require_primitiveFns = require("./primitiveFns-DZXN7qDb.cjs");
|
|
36
36
|
//#region src/topology/shapeBooleans.ts
|
|
37
37
|
var BOPAlgo_GlueShift = 1;
|
|
38
38
|
var BOPAlgo_GlueFull = 2;
|
|
@@ -1417,7 +1417,7 @@ function convexHull(points) {
|
|
|
1417
1417
|
function detectSphere(shape) {
|
|
1418
1418
|
const faces = require_topologyQueryFns.getFaces(shape);
|
|
1419
1419
|
if (faces.length !== 1) return null;
|
|
1420
|
-
const face =
|
|
1420
|
+
const face = require_bug.wasmIndex(faces, 0);
|
|
1421
1421
|
if (require_topologyQueryFns.getCachedSurfaceType(face) !== "sphere") return null;
|
|
1422
1422
|
const faceArea = require_shapeTypes.getKernel().area(face.wrapped);
|
|
1423
1423
|
return Math.sqrt(faceArea / (4 * Math.PI));
|
|
@@ -2880,8 +2880,8 @@ function checkAllInterferences(shapes, tolerance = 1e-6) {
|
|
|
2880
2880
|
const boxes = shapes.map((s) => require_topologyQueryFns.getBounds(s));
|
|
2881
2881
|
shapes.forEach((si, i) => {
|
|
2882
2882
|
for (let j = i + 1; j < shapes.length; j++) {
|
|
2883
|
-
if (aabbDisjoint(
|
|
2884
|
-
const result = require_errors.unwrap(checkInterference(si,
|
|
2883
|
+
if (aabbDisjoint(require_bug.wasmIndex(boxes, i), require_bug.wasmIndex(boxes, j), tolerance)) continue;
|
|
2884
|
+
const result = require_errors.unwrap(checkInterference(si, require_bug.wasmIndex(shapes, j), tolerance));
|
|
2885
2885
|
if (result.hasInterference) pairs.push({
|
|
2886
2886
|
i,
|
|
2887
2887
|
j,
|
|
@@ -3737,7 +3737,7 @@ function resolveTargetFace(shape, faceSpec) {
|
|
|
3737
3737
|
if (typeof faceSpec === "function") {
|
|
3738
3738
|
const found = faceSpec(require_helpers.faceFinder()).findAll(shape);
|
|
3739
3739
|
if (found.length === 0) return require_errors.err(require_errors.queryError(require_errors.BrepErrorCode.COMPOUND_FACE_NOT_FOUND, "compoundOps: face finder matched no faces"));
|
|
3740
|
-
return require_errors.ok(
|
|
3740
|
+
return require_errors.ok(require_bug.wasmIndex(found, 0));
|
|
3741
3741
|
}
|
|
3742
3742
|
return require_errors.ok(faceSpec);
|
|
3743
3743
|
}
|
|
@@ -7049,7 +7049,7 @@ var csg_exports = /* @__PURE__ */ require_textBlueprints.__exportAll({
|
|
|
7049
7049
|
//#endregion
|
|
7050
7050
|
exports.BaseSketcher2d = require_blueprintSketcher.BaseSketcher2d;
|
|
7051
7051
|
exports.BlueprintSketcher = require_blueprintSketcher.BlueprintSketcher;
|
|
7052
|
-
exports.BrepBugError =
|
|
7052
|
+
exports.BrepBugError = require_bug.BrepBugError;
|
|
7053
7053
|
exports.BrepErrorCode = require_errors.BrepErrorCode;
|
|
7054
7054
|
exports.BrepWrapperError = BrepWrapperError;
|
|
7055
7055
|
exports.BrepkitAdapter = require_shapeTypes.BrepkitAdapter;
|
|
@@ -7094,7 +7094,7 @@ Object.defineProperty(exports, "booleans", {
|
|
|
7094
7094
|
exports.boss = boss;
|
|
7095
7095
|
exports.box = require_primitiveFns.box;
|
|
7096
7096
|
exports.bsplineApprox = require_primitiveFns.bsplineApprox;
|
|
7097
|
-
exports.bug =
|
|
7097
|
+
exports.bug = require_bug.bug;
|
|
7098
7098
|
exports.cameraFromPlane = require_cameraFns.cameraFromPlane;
|
|
7099
7099
|
exports.cameraLookAt = require_cameraFns.cameraLookAt;
|
|
7100
7100
|
exports.captureHint = require_refResolveFns.captureHint;
|
package/dist/brepjs.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { $ as withScopeResult, A as isPlanarFace, B as as2D, C as isSolid, D as isClosedWire, E as closedWire, F as planarFace, G as createHandle, H as is2D, I as planarWire, J as isLive, K as createKernelHandle, L as validSolid, M as isValidSolid, N as manifoldShell, O as isManifoldShell, P as orientedFace, Q as withScope, R as getShapeKind, S as isShell, St as qualityDeflection, T as isWire, U as is3D, V as as3D, W as DisposalScope, X as resetDisposalStats, _ as isCompound, _t as supportsProjection, a as castShape3D, at as getKernelCapabilities, b as isShape1D, bt as resetPerformanceStats, c as createEdge, ct as initFromManifold, d as createSolid, dt as registerKernel, et as withScopeResultAsync, f as createVertex, ft as registerKernelTier, gt as supportsConstraintSketch, h as disposeResultShape, ht as withTier, i as castShape, j as isPlanarWire, k as isOrientedFace, l as createFace, lt as initFromOC, mt as withQuality, n as castResultShape, nt as getActiveKernelId, ot as getKernelTier, p as createWire, pt as withKernel, q as getDisposalStats, rt as getKernel, s as createCompound, st as init, tt as _usingCtx, u as createShell, ut as prewarm, v as isEdge, vt as BrepkitAdapter, w as isVertex, x as isShape3D, xt as currentQuality, y as isFace, yt as getPerformanceStats } from "./shapeTypes-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { A as
|
|
5
|
-
import { C as kernelCall, S as vertexPosition, T as kernelCallScoped, _ as iterFaces, a as getCachedSurfaceType, b as iterVertices, c as getFaces, d as getSolids, f as getVertices, g as iterEdges, h as iterCompSolids, m as invalidateShapeCache, n as getBounds, o as getCompSolids, p as getWires, s as getEdges, t as describe$1, u as getShells, v as iterShells, w as kernelCallRaw, x as iterWires, y as iterSolids } from "./topologyQueryFns-
|
|
1
|
+
import { $ as withScopeResult, A as isPlanarFace, B as as2D, C as isSolid, D as isClosedWire, E as closedWire, F as planarFace, G as createHandle, H as is2D, I as planarWire, J as isLive, K as createKernelHandle, L as validSolid, M as isValidSolid, N as manifoldShell, O as isManifoldShell, P as orientedFace, Q as withScope, R as getShapeKind, S as isShell, St as qualityDeflection, T as isWire, U as is3D, V as as3D, W as DisposalScope, X as resetDisposalStats, _ as isCompound, _t as supportsProjection, a as castShape3D, at as getKernelCapabilities, b as isShape1D, bt as resetPerformanceStats, c as createEdge, ct as initFromManifold, d as createSolid, dt as registerKernel, et as withScopeResultAsync, f as createVertex, ft as registerKernelTier, gt as supportsConstraintSketch, h as disposeResultShape, ht as withTier, i as castShape, j as isPlanarWire, k as isOrientedFace, l as createFace, lt as initFromOC, mt as withQuality, n as castResultShape, nt as getActiveKernelId, ot as getKernelTier, p as createWire, pt as withKernel, q as getDisposalStats, rt as getKernel, s as createCompound, st as init, tt as _usingCtx, u as createShell, ut as prewarm, v as isEdge, vt as BrepkitAdapter, w as isVertex, x as isShape3D, xt as currentQuality, y as isFace, yt as getPerformanceStats } from "./shapeTypes-B5bBKbg9.js";
|
|
2
|
+
import { A as EXACT_BREP_CAPABILITIES, k as DEFAULT_CAPABILITIES, t as OcctWasmAdapter } from "./occtWasmAdapter-5_6aHhcD.js";
|
|
3
|
+
import { i as wasmIndex, n as bug, t as BrepBugError } from "./bug-BdOHwn_e.js";
|
|
4
|
+
import { A as orElse, B as zip, C as isOk, D as match, E as mapErr, F as tryCatchAsync, I as unwrap, L as unwrapErr, M as tap, N as tapErr, O as ok, P as tryCatch, R as unwrapOr, S as isErr, T as mapBoth, _ as collect, a as moduleInitError, b as flatten, c as sketcherStateError, d as validationError, g as andThen, h as all, i as kernelError, j as pipeline, k as or, l as typeCastError, m as OK, n as computationError, o as queryError, r as ioError, t as BrepErrorCode, u as unsupportedError, v as err, w as map, x as fromNullable, y as flatMap, z as unwrapOrElse } from "./errors-B3CDG537.js";
|
|
5
|
+
import { C as kernelCall, S as vertexPosition, T as kernelCallScoped, _ as iterFaces, a as getCachedSurfaceType, b as iterVertices, c as getFaces, d as getSolids, f as getVertices, g as iterEdges, h as iterCompSolids, m as invalidateShapeCache, n as getBounds, o as getCompSolids, p as getWires, s as getEdges, t as describe$1, u as getShells, v as iterShells, w as kernelCallRaw, x as iterWires, y as iterSolids } from "./topologyQueryFns-MAUFbsSp.js";
|
|
6
6
|
import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
7
7
|
import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N0.js";
|
|
8
8
|
import { a as vecDot, c as vecLength, d as vecNormalize, f as vecProjectToPlane, g as vecSub, h as vecScale, i as vecDistance, l as vecLengthSq, m as vecRotate, n as vecAngle, o as vecEquals, p as vecRepr, r as vecCross, s as vecIsZero, t as vecAdd, u as vecNegate } from "./vecOps-SKPRvPH-.js";
|
|
9
|
-
import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-
|
|
10
|
-
import { C as shapeType, S as iterTopo, _ as cast, a as faceOrientation, b as fromBREP, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, p as removeHolesFromFace, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-
|
|
11
|
-
import { A as tagFaces, C as colorShape, D as getFaceTags, E as findFacesByTag, M as setShapeOrigin, O as getTagMetadata, S as colorFaces, T as getShapeColor, a as isSameShape, c as applyMatrix$1, d as mirror$2, f as resize, g as translate$2, h as transformCopy$1, i as isEqualShape, j as getFaceOrigins, k as setTagMetadata, l as composeTransforms, m as scale$3, n as getHashCode, o as simplify$1, p as rotate$2, r as isEmpty$2, s as toBREP$1, t as clone$1, u as locate$1, v as hasAnyMetadata, w as getFaceColor, x as propagateMetadataThroughRelocation } from "./shapeFns-
|
|
12
|
-
import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as getCurveType, h as offsetWire2D, i as curveIsClosed, l as curveStartPoint, m as interpolateCurve, n as curveAxis, o as curveLength, p as getOrientation, r as curveEndPoint, s as curvePeriod, t as approximateCurve, u as curveTangentAt } from "./curveFns-
|
|
13
|
-
import { a as meshEdges$1, c as meshMultiLOD, d as createMeshCache, i as mesh$1, l as buildMeshCacheKey, n as exportSTEP, o as meshLODs, r as exportSTL, s as meshLODsProgressive, t as exportIGES, u as clearMeshCache } from "./meshFns-
|
|
9
|
+
import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-Cp6GQ23-.js";
|
|
10
|
+
import { C as shapeType, S as iterTopo, _ as cast, a as faceOrientation, b as fromBREP, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, p as removeHolesFromFace, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-CCu9ULQm.js";
|
|
11
|
+
import { A as tagFaces, C as colorShape, D as getFaceTags, E as findFacesByTag, M as setShapeOrigin, O as getTagMetadata, S as colorFaces, T as getShapeColor, a as isSameShape, c as applyMatrix$1, d as mirror$2, f as resize, g as translate$2, h as transformCopy$1, i as isEqualShape, j as getFaceOrigins, k as setTagMetadata, l as composeTransforms, m as scale$3, n as getHashCode, o as simplify$1, p as rotate$2, r as isEmpty$2, s as toBREP$1, t as clone$1, u as locate$1, v as hasAnyMetadata, w as getFaceColor, x as propagateMetadataThroughRelocation } from "./shapeFns-BakfS4c9.js";
|
|
12
|
+
import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as getCurveType, h as offsetWire2D, i as curveIsClosed, l as curveStartPoint, m as interpolateCurve, n as curveAxis, o as curveLength, p as getOrientation, r as curveEndPoint, s as curvePeriod, t as approximateCurve, u as curveTangentAt } from "./curveFns-SNQ04JW6.js";
|
|
13
|
+
import { a as meshEdges$1, c as meshMultiLOD, d as createMeshCache, i as mesh$1, l as buildMeshCacheKey, n as exportSTEP, o as meshLODs, r as exportSTL, s as meshLODsProgressive, t as exportIGES, u as clearMeshCache } from "./meshFns-C2nLgSf2.js";
|
|
14
14
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
15
|
-
import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, r as makeFace, s as assembleWire } from "./surfaceBuilders-
|
|
16
|
-
import { _ as section$1, b as split$1, d as booleanPipeline, f as cut$2, g as intersect$2, h as fuseAll$2, m as fuse$2, p as cutAll$2, r as makeCylinder, t as makeCompound, v as sectionToFace$1, y as slice$1 } from "./solidBuilders-
|
|
17
|
-
import { A as toBufferGeometryData, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, M as toLODGeometryData, N as toLODGeometryLevels, O as getNurbsSurfaceData, P as toLineGeometryData, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, c as isValid$1, d as draft$1, f as fillet$1, g as variableFillet, h as thicken$1, i as heal$1, j as toGroupedBufferGeometryData, k as chamferDistAngle, l as solidFromShell, m as shell$1, n as fixSelfIntersection, o as healSolid, p as offset$1, r as fixShape, s as healWire, t as autoHeal, u as chamfer$1, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution } from "./healingFns-
|
|
18
|
-
import { A as setJointValue, B as createAssemblyNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as quatMultiply, G as circularPattern, H as removeChild, I as quatRotate, J as exportAssemblySTEP, K as gridPattern, L as addChild, M as sphericalJoint, N as quatFromAxisAngle, O as prismaticJoint, P as quatFromTo, R as collectShapes, S as addJoint, T as jointTransform, U as updateNode, V as findNode, W as walkAssembly, Y as createAssembly, _ as exportURDF, a as deserializeHistory, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, p as serializeHistory, q as linearPattern, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as countNodes } from "./threadFns-
|
|
19
|
-
import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
20
|
-
import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-
|
|
21
|
-
import { A as sketchEllipse, 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, _ 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-
|
|
22
|
-
import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, i as measureCurvatureAtMid, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, r as measureCurvatureAt, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-
|
|
23
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
24
|
-
import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-
|
|
25
|
-
import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, n as createCompoundBlueprint, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-
|
|
26
|
-
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-
|
|
27
|
-
import { a as revolve$1, c as multiSectionSweep, d as twistExtrude, i as extrudeAll, l as supportExtrude, n as loftAll, o as complexExtrude, r as extrude$1, s as guidedSweep, t as loft$1, u as sweep$1 } from "./loftFns-
|
|
28
|
-
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, n as getFont, o as compoundSketchExtrude, p as sketchRevolve, r as loadFont, s as compoundSketchFace, t as textBlueprints, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-
|
|
29
|
-
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-
|
|
30
|
-
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-
|
|
31
|
-
import { a as sharedEdges, c as wiresOfFace, i as facesOfVertex, n as edgesOfFace, o as verticesOfEdge, r as facesOfEdge, s as verticesOfFace, t as adjacentFaces } from "./adjacencyFns-
|
|
32
|
-
import { _ as createRef, a as isVertexRef, b as defaultScorer, c as resolveRefParams, d as createVertexRef, f as resolveVertexRef, g as captureHint, h as assignRoles, i as isLineageRef, l as createDerivedFaceRef, m as resolveEdgeRef, n as isEdgeRef, o as resolveLineageRef, p as createEdgeRef, r as isFaceRef, s as resolveRefIn, t as isDerivedFaceRef, u as resolveDerivedFaceRef, v as resolveRef, y as updateRoles } from "./refResolveFns-
|
|
15
|
+
import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, r as makeFace, s as assembleWire } from "./surfaceBuilders-BdUP_OXk.js";
|
|
16
|
+
import { _ as section$1, b as split$1, d as booleanPipeline, f as cut$2, g as intersect$2, h as fuseAll$2, m as fuse$2, p as cutAll$2, r as makeCylinder, t as makeCompound, v as sectionToFace$1, y as slice$1 } from "./solidBuilders-DaTgm_Wj.js";
|
|
17
|
+
import { A as toBufferGeometryData, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, M as toLODGeometryData, N as toLODGeometryLevels, O as getNurbsSurfaceData, P as toLineGeometryData, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, c as isValid$1, d as draft$1, f as fillet$1, g as variableFillet, h as thicken$1, i as heal$1, j as toGroupedBufferGeometryData, k as chamferDistAngle, l as solidFromShell, m as shell$1, n as fixSelfIntersection, o as healSolid, p as offset$1, r as fixShape, s as healWire, t as autoHeal, u as chamfer$1, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution } from "./healingFns-D6Bizorp.js";
|
|
18
|
+
import { A as setJointValue, B as createAssemblyNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as quatMultiply, G as circularPattern, H as removeChild, I as quatRotate, J as exportAssemblySTEP, K as gridPattern, L as addChild, M as sphericalJoint, N as quatFromAxisAngle, O as prismaticJoint, P as quatFromTo, R as collectShapes, S as addJoint, T as jointTransform, U as updateNode, V as findNode, W as walkAssembly, Y as createAssembly, _ as exportURDF, a as deserializeHistory, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, p as serializeHistory, q as linearPattern, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as countNodes } from "./threadFns-H0mRmS6I.js";
|
|
19
|
+
import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-VvIRL3M8.js";
|
|
20
|
+
import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-By-BruMN.js";
|
|
21
|
+
import { A as sketchEllipse, 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, _ 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-8zxP0gC5.js";
|
|
22
|
+
import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, i as measureCurvatureAtMid, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, r as measureCurvatureAt, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-DHj5Z-5c.js";
|
|
23
|
+
import { t as cornerFinder } from "./cornerFinder-DhOm0L8g.js";
|
|
24
|
+
import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-qYYFeLWX.js";
|
|
25
|
+
import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, n as createCompoundBlueprint, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-aCrK18ZR.js";
|
|
26
|
+
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-Bcza0b4Y.js";
|
|
27
|
+
import { a as revolve$1, c as multiSectionSweep, d as twistExtrude, i as extrudeAll, l as supportExtrude, n as loftAll, o as complexExtrude, r as extrude$1, s as guidedSweep, t as loft$1, u as sweep$1 } from "./loftFns-DEReccFa.js";
|
|
28
|
+
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, n as getFont, o as compoundSketchExtrude, p as sketchRevolve, r as loadFont, s as compoundSketchFace, t as textBlueprints, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-C_JaAGiG.js";
|
|
29
|
+
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-CYU4C4N6.js";
|
|
30
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-829YpBdN.js";
|
|
31
|
+
import { a as sharedEdges, c as wiresOfFace, i as facesOfVertex, n as edgesOfFace, o as verticesOfEdge, r as facesOfEdge, s as verticesOfFace, t as adjacentFaces } from "./adjacencyFns-Dgsl8VJ2.js";
|
|
32
|
+
import { _ as createRef, a as isVertexRef, b as defaultScorer, c as resolveRefParams, d as createVertexRef, f as resolveVertexRef, g as captureHint, h as assignRoles, i as isLineageRef, l as createDerivedFaceRef, m as resolveEdgeRef, n as isEdgeRef, o as resolveLineageRef, p as createEdgeRef, r as isFaceRef, s as resolveRefIn, t as isDerivedFaceRef, u as resolveDerivedFaceRef, v as resolveRef, y as updateRoles } from "./refResolveFns-C_mHlM8R.js";
|
|
33
33
|
import { _ as isSuccessResponse, a as createWorkerClient, c as enqueueTask, d as rejectAll, f as isBatchRequest, g as isOperationRequest, h as isInitRequest, i as registerHandler, l as isEmpty$1, m as isErrorResponse, n as createOperationRegistry, o as createTaskQueue, p as isDisposeRequest, r as createWorkerHandler, s as dequeueTask, t as createWorkerPool, u as pendingCount } from "./workerPool-XcYX2UZ0.js";
|
|
34
|
-
import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere$1, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, v as sewShells, w as torus$1, x as subFace, y as solid } from "./primitiveFns-
|
|
34
|
+
import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere$1, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, v as sewShells, w as torus$1, x as subFace, y as solid } from "./primitiveFns-D2zyQa3w.js";
|
|
35
35
|
//#region \0rolldown/runtime.js
|
|
36
36
|
var __defProp = Object.defineProperty;
|
|
37
37
|
var __exportAll = (all, no_symbols) => {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//#region src/utils/vec3.ts
|
|
2
|
+
/**
|
|
3
|
+
* Index into a typed/regular array at a position the caller has structurally
|
|
4
|
+
* guaranteed (WASM ABI fixed-length arrays, post-bounds-check loops, etc.).
|
|
5
|
+
* Equivalent to `arr[i]!` but typed as `T` directly — no eslint-disable needed.
|
|
6
|
+
*/
|
|
7
|
+
function wasmIndex(arr, i) {
|
|
8
|
+
return arr[i];
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Extract a 3-element tuple from a numeric array starting at `offset`.
|
|
12
|
+
* Equivalent to `[arr[offset]!, arr[offset+1]!, arr[offset+2]!]` but typed
|
|
13
|
+
* as `[T, T, T]` so no eslint-disable comments are needed at the call site.
|
|
14
|
+
*
|
|
15
|
+
* Common use cases: WASM result buffers (xyz, bbox min/max, witness points).
|
|
16
|
+
*/
|
|
17
|
+
function vec3At(arr, offset = 0) {
|
|
18
|
+
return [
|
|
19
|
+
arr[offset],
|
|
20
|
+
arr[offset + 1],
|
|
21
|
+
arr[offset + 2]
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/utils/bug.ts
|
|
26
|
+
/**
|
|
27
|
+
* Bug / panic helper — these throw and should never be caught in normal code.
|
|
28
|
+
* Lives in utils (Layer 0) so it can be used by all layers including kernel.
|
|
29
|
+
*/
|
|
30
|
+
/** Error thrown for invariant violations / programmer bugs (should never be caught). */
|
|
31
|
+
var BrepBugError = class extends Error {
|
|
32
|
+
location;
|
|
33
|
+
constructor(location, message) {
|
|
34
|
+
super(`Bug in ${location}: ${message}`);
|
|
35
|
+
this.name = "BrepBugError";
|
|
36
|
+
this.location = location;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Throws a BrepBugError for invariant violations / programmer errors.
|
|
41
|
+
* Equivalent to Rust's panic!() — should never be caught in normal code.
|
|
42
|
+
*/
|
|
43
|
+
function bug(location, message) {
|
|
44
|
+
throw new BrepBugError(location, message);
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { wasmIndex as i, bug as n, vec3At as r, BrepBugError as t };
|
|
@@ -22,6 +22,40 @@ function vec3At(arr, offset = 0) {
|
|
|
22
22
|
];
|
|
23
23
|
}
|
|
24
24
|
//#endregion
|
|
25
|
+
//#region src/utils/bug.ts
|
|
26
|
+
/**
|
|
27
|
+
* Bug / panic helper — these throw and should never be caught in normal code.
|
|
28
|
+
* Lives in utils (Layer 0) so it can be used by all layers including kernel.
|
|
29
|
+
*/
|
|
30
|
+
/** Error thrown for invariant violations / programmer bugs (should never be caught). */
|
|
31
|
+
var BrepBugError = class extends Error {
|
|
32
|
+
location;
|
|
33
|
+
constructor(location, message) {
|
|
34
|
+
super(`Bug in ${location}: ${message}`);
|
|
35
|
+
this.name = "BrepBugError";
|
|
36
|
+
this.location = location;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Throws a BrepBugError for invariant violations / programmer errors.
|
|
41
|
+
* Equivalent to Rust's panic!() — should never be caught in normal code.
|
|
42
|
+
*/
|
|
43
|
+
function bug(location, message) {
|
|
44
|
+
throw new BrepBugError(location, message);
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
Object.defineProperty(exports, "BrepBugError", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function() {
|
|
50
|
+
return BrepBugError;
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(exports, "bug", {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
get: function() {
|
|
56
|
+
return bug;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
25
59
|
Object.defineProperty(exports, "vec3At", {
|
|
26
60
|
enumerable: true,
|
|
27
61
|
get: function() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BfOb9vzc.cjs");
|
|
2
|
+
const require_errors = require("./errors-CJU8CHng.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-tns6VXoD.cjs");
|
|
4
4
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
5
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
+
const require_shapeFns = require("./shapeFns-DzXcfZHY.cjs");
|
|
6
6
|
//#region src/projection/projectionPlanes.ts
|
|
7
7
|
/** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
|
|
8
8
|
var PROJECTION_PLANES = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as castResultShape, rt as getKernel, tt as _usingCtx } from "./shapeTypes-
|
|
2
|
-
import {
|
|
3
|
-
import { s as getEdges } from "./topologyQueryFns-
|
|
1
|
+
import { n as castResultShape, rt as getKernel, tt as _usingCtx } from "./shapeTypes-B5bBKbg9.js";
|
|
2
|
+
import { I as unwrap, O as ok, d as validationError, v as err } from "./errors-B3CDG537.js";
|
|
3
|
+
import { s as getEdges } from "./topologyQueryFns-MAUFbsSp.js";
|
|
4
4
|
import { c as vecLength, d as vecNormalize, g as vecSub, r as vecCross } from "./vecOps-SKPRvPH-.js";
|
|
5
|
-
import { t as clone } from "./shapeFns-
|
|
5
|
+
import { t as clone } from "./shapeFns-BakfS4c9.js";
|
|
6
6
|
//#region src/projection/projectionPlanes.ts
|
|
7
7
|
/** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
|
|
8
8
|
var PROJECTION_PLANES = {
|
package/dist/core.cjs
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
3
|
-
const
|
|
2
|
+
const require_shapeTypes = require("./shapeTypes-BfOb9vzc.cjs");
|
|
3
|
+
const require_bug = require("./bug-O02CsAmt.cjs");
|
|
4
|
+
const require_errors = require("./errors-CJU8CHng.cjs");
|
|
4
5
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
6
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
6
7
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
7
|
-
const require_planeOps = require("./planeOps-
|
|
8
|
-
exports.BrepBugError =
|
|
8
|
+
const require_planeOps = require("./planeOps-Cr25KWWA.cjs");
|
|
9
|
+
exports.BrepBugError = require_bug.BrepBugError;
|
|
9
10
|
exports.DEG2RAD = require_constants.DEG2RAD;
|
|
10
11
|
exports.DisposalScope = require_shapeTypes.DisposalScope;
|
|
11
12
|
exports.HASH_CODE_MAX = require_constants.HASH_CODE_MAX;
|
|
12
13
|
exports.OK = require_errors.OK;
|
|
13
14
|
exports.RAD2DEG = require_constants.RAD2DEG;
|
|
14
15
|
exports.andThen = require_errors.andThen;
|
|
15
|
-
exports.bug =
|
|
16
|
+
exports.bug = require_bug.bug;
|
|
16
17
|
exports.castShape = require_shapeTypes.castShape;
|
|
17
18
|
exports.closedWire = require_shapeTypes.closedWire;
|
|
18
19
|
exports.collect = require_errors.collect;
|
package/dist/core.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { $ as withScopeResult, C as isSolid, D as isClosedWire, E as closedWire, G as createHandle, H as is2D, J as isLive, K as createKernelHandle, L as validSolid, M as isValidSolid, N as manifoldShell, O as isManifoldShell, P as orientedFace, Q as withScope, R as getShapeKind, S as isShell, T as isWire, U as is3D, W as DisposalScope, _ as isCompound, b as isShape1D, et as withScopeResultAsync, i as castShape, k as isOrientedFace, v as isEdge, w as isVertex, x as isShape3D, y as isFace } from "./shapeTypes-
|
|
2
|
-
import {
|
|
1
|
+
import { $ as withScopeResult, C as isSolid, D as isClosedWire, E as closedWire, G as createHandle, H as is2D, J as isLive, K as createKernelHandle, L as validSolid, M as isValidSolid, N as manifoldShell, O as isManifoldShell, P as orientedFace, Q as withScope, R as getShapeKind, S as isShell, T as isWire, U as is3D, W as DisposalScope, _ as isCompound, b as isShape1D, et as withScopeResultAsync, i as castShape, k as isOrientedFace, v as isEdge, w as isVertex, x as isShape3D, y as isFace } from "./shapeTypes-B5bBKbg9.js";
|
|
2
|
+
import { n as bug, t as BrepBugError } from "./bug-BdOHwn_e.js";
|
|
3
|
+
import { C as isOk, D as match, E as mapErr, F as tryCatchAsync, I as unwrap, L as unwrapErr, O as ok, P as tryCatch, R as unwrapOr, S as isErr, _ as collect, a as moduleInitError, c as sketcherStateError, d as validationError, g as andThen, i as kernelError, l as typeCastError, m as OK, n as computationError, o as queryError, r as ioError, u as unsupportedError, v as err, w as map, y as flatMap, z as unwrapOrElse } from "./errors-B3CDG537.js";
|
|
3
4
|
import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
4
5
|
import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N0.js";
|
|
5
6
|
import { a as vecDot, c as vecLength, d as vecNormalize, f as vecProjectToPlane, g as vecSub, h as vecScale, i as vecDistance, l as vecLengthSq, m as vecRotate, n as vecAngle, o as vecEquals, p as vecRepr, r as vecCross, s as vecIsZero, t as vecAdd, u as vecNegate } from "./vecOps-SKPRvPH-.js";
|
|
6
|
-
import { i as pivotPlane, n as createPlane, o as resolvePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-
|
|
7
|
+
import { i as pivotPlane, n as createPlane, o as resolvePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-Cp6GQ23-.js";
|
|
7
8
|
export { BrepBugError, DEG2RAD, DisposalScope, HASH_CODE_MAX, OK, RAD2DEG, andThen, bug, castShape, closedWire, collect, computationError, createHandle, createKernelHandle, createNamedPlane, createPlane, err, flatMap, getShapeKind, ioError, is2D, is3D, isClosedWire, isCompound, isEdge, isErr, isFace, isLive, isManifoldShell, isOk, isOrientedFace, isShape1D, isShape3D, isShell, isSolid, isValidSolid, isVertex, isWire, kernelError, manifoldShell, map, mapErr, match, moduleInitError, ok, orientedFace, pivotPlane, queryError, resolveDirection, resolvePlane, sketcherStateError, toVec2, toVec3, translatePlane, tryCatch, tryCatchAsync, typeCastError, unsupportedError, unwrap, unwrapErr, unwrapOr, unwrapOrElse, validSolid, validationError, vecAdd, vecAngle, vecCross, vecDistance, vecDot, vecEquals, vecIsZero, vecLength, vecLengthSq, vecNegate, vecNormalize, vecProjectToPlane, vecRepr, vecRotate, vecScale, vecSub, withScope, withScopeResult, withScopeResultAsync };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
2
2
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
3
|
-
const require_helpers = require("./helpers-
|
|
3
|
+
const require_helpers = require("./helpers-Cv-lOGsc.cjs");
|
|
4
4
|
//#region src/query/cornerFinder.ts
|
|
5
5
|
var PI_2 = 2 * Math.PI;
|
|
6
6
|
function positiveHalfAngle(angle) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
2
2
|
import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
3
|
-
import { _ as samePoint, p as distance2d, u as angle2d } from "./helpers-
|
|
3
|
+
import { _ as samePoint, p as distance2d, u as angle2d } from "./helpers-By-BruMN.js";
|
|
4
4
|
//#region src/query/cornerFinder.ts
|
|
5
5
|
var PI_2 = 2 * Math.PI;
|
|
6
6
|
function positiveHalfAngle(angle) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as isWire, h as disposeResultShape, n as castResultShape, rt as getKernel, v as isEdge } from "./shapeTypes-
|
|
2
|
-
import {
|
|
1
|
+
import { T as isWire, h as disposeResultShape, n as castResultShape, rt as getKernel, v as isEdge } from "./shapeTypes-B5bBKbg9.js";
|
|
2
|
+
import { O as ok, l as typeCastError, v as err } from "./errors-B3CDG537.js";
|
|
3
3
|
//#region src/topology/curveFns.ts
|
|
4
4
|
/**
|
|
5
5
|
* Curve and 1D shape functions — functional replacements for _1DShape/Curve methods.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BfOb9vzc.cjs");
|
|
2
|
+
const require_errors = require("./errors-CJU8CHng.cjs");
|
|
3
3
|
//#region src/topology/curveFns.ts
|
|
4
4
|
/**
|
|
5
5
|
* Curve and 1D shape functions — functional replacements for _1DShape/Curve methods.
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { W as DisposalScope, c as createEdge, l as createFace, p as createWire, rt as getKernel, tt as _usingCtx } from "./shapeTypes-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { s as getEdges } from "./topologyQueryFns-
|
|
1
|
+
import { W as DisposalScope, c as createEdge, l as createFace, p as createWire, rt as getKernel, tt as _usingCtx } from "./shapeTypes-B5bBKbg9.js";
|
|
2
|
+
import { i as wasmIndex, n as bug } from "./bug-BdOHwn_e.js";
|
|
3
|
+
import { I as unwrap, s as safeIndex } from "./errors-B3CDG537.js";
|
|
4
|
+
import { s as getEdges } from "./topologyQueryFns-MAUFbsSp.js";
|
|
5
5
|
import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
6
6
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
7
7
|
import { d as vecNormalize, g as vecSub, h as vecScale, m as vecRotate, r as vecCross } from "./vecOps-SKPRvPH-.js";
|
|
8
|
-
import { a as planeToWorld, o as resolvePlane } from "./planeOps-
|
|
9
|
-
import { d as pointOnSurface, l as normalAt, m as uvBounds, r as faceCenter, u as outerWire, v as copyShape, y as downcast } from "./faceFns-
|
|
10
|
-
import { h as offsetWire2D, i as curveIsClosed, l as curveStartPoint } from "./curveFns-
|
|
8
|
+
import { a as planeToWorld, o as resolvePlane } from "./planeOps-Cp6GQ23-.js";
|
|
9
|
+
import { d as pointOnSurface, l as normalAt, m as uvBounds, r as faceCenter, u as outerWire, v as copyShape, y as downcast } from "./faceFns-CCu9ULQm.js";
|
|
10
|
+
import { h as offsetWire2D, i as curveIsClosed, l as curveStartPoint } from "./curveFns-SNQ04JW6.js";
|
|
11
11
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
12
|
-
import { c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, m as makeHelix, r as makeFace, s as assembleWire } from "./surfaceBuilders-
|
|
13
|
-
import { a as Blueprints, c as make2dOffset, i as CompoundBlueprint, l as intersectCurves, n as BaseSketcher2d, o as chamferCurves, s as filletCurves, u as Flatbush } from "./blueprintSketcher-
|
|
14
|
-
import { _ as samePoint$1, b as subtract2d, c as PRECISION_OFFSET, l as add2d, y as squareDistance2d } from "./helpers-
|
|
15
|
-
import { _ as Curve2D, a as edgeToCurve, c as make2dCircle, d as make2dInerpolatedBSplineCurve, f as make2dSegmentCurve, g as approximateAsSvgCompatibleCurve, i as curvesAsEdgesOnPlane, l as make2dEllipse, o as make2dArcFromCenter, t as Blueprint, v as deserializeCurve2D, y as BoundingBox2d } from "./blueprint-
|
|
16
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
17
|
-
import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-
|
|
18
|
-
import { _ as wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-
|
|
19
|
-
import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-
|
|
12
|
+
import { c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, m as makeHelix, r as makeFace, s as assembleWire } from "./surfaceBuilders-BdUP_OXk.js";
|
|
13
|
+
import { a as Blueprints, c as make2dOffset, i as CompoundBlueprint, l as intersectCurves, n as BaseSketcher2d, o as chamferCurves, s as filletCurves, u as Flatbush } from "./blueprintSketcher-VvIRL3M8.js";
|
|
14
|
+
import { _ as samePoint$1, b as subtract2d, c as PRECISION_OFFSET, l as add2d, y as squareDistance2d } from "./helpers-By-BruMN.js";
|
|
15
|
+
import { _ as Curve2D, a as edgeToCurve, c as make2dCircle, d as make2dInerpolatedBSplineCurve, f as make2dSegmentCurve, g as approximateAsSvgCompatibleCurve, i as curvesAsEdgesOnPlane, l as make2dEllipse, o as make2dArcFromCenter, t as Blueprint, v as deserializeCurve2D, y as BoundingBox2d } from "./blueprint-CwQmYoR4.js";
|
|
16
|
+
import { t as cornerFinder } from "./cornerFinder-DhOm0L8g.js";
|
|
17
|
+
import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-qYYFeLWX.js";
|
|
18
|
+
import { _ as wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-C_JaAGiG.js";
|
|
19
|
+
import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-CYU4C4N6.js";
|
|
20
20
|
//#region src/2d/lib/stitching.ts
|
|
21
21
|
/**
|
|
22
22
|
* Group a flat list of curves into connected chains by matching endpoints.
|