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/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--5GSuYEm.cjs");
|
|
3
|
+
const require_blueprintSketcher = require("./blueprintSketcher-k5dNnvzs.cjs");
|
|
4
|
+
const require_drawFns = require("./drawFns-Dqsv_t37.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-VvIRL3M8.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-8zxP0gC5.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-C_JaAGiG.js";
|
|
4
4
|
//#region src/sketching.ts
|
|
5
5
|
/**
|
|
6
6
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
|
@@ -1,13 +1,13 @@
|
|
|
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_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
6
|
-
const require_planeOps = require("./planeOps-
|
|
7
|
-
const require_faceFns = require("./faceFns-
|
|
8
|
-
const require_shapeFns = require("./shapeFns-
|
|
6
|
+
const require_planeOps = require("./planeOps-Cr25KWWA.cjs");
|
|
7
|
+
const require_faceFns = require("./faceFns-C0SwZInk.cjs");
|
|
8
|
+
const require_shapeFns = require("./shapeFns-DzXcfZHY.cjs");
|
|
9
9
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
10
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
10
|
+
const require_surfaceBuilders = require("./surfaceBuilders-CUNhA_3a.cjs");
|
|
11
11
|
//#region src/topology/booleanFns.ts
|
|
12
12
|
/**
|
|
13
13
|
* Boolean and compound operations — functional replacements for _3DShape boolean methods.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { C as isSolid, R as getShapeKind, S as isShell, d as createSolid, f as createVertex, h as disposeResultShape, i as castShape, m as disposeDowncastSource, n as castResultShape, rt as getKernel, s as createCompound, tt as _usingCtx, x as isShape3D } from "./shapeTypes-
|
|
2
|
-
import {
|
|
3
|
-
import { f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-
|
|
1
|
+
import { C as isSolid, R as getShapeKind, S as isShell, d as createSolid, f as createVertex, h as disposeResultShape, i as castShape, m as disposeDowncastSource, n as castResultShape, rt as getKernel, s as createCompound, tt as _usingCtx, x as isShape3D } from "./shapeTypes-B5bBKbg9.js";
|
|
2
|
+
import { I as unwrap, O as ok, S as isErr, d as validationError, g as andThen, i as kernelError, l as typeCastError, t as BrepErrorCode, v as err } from "./errors-B3CDG537.js";
|
|
3
|
+
import { f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-MAUFbsSp.js";
|
|
4
4
|
import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
|
|
5
5
|
import { h as vecScale, t as vecAdd } from "./vecOps-SKPRvPH-.js";
|
|
6
|
-
import { o as resolvePlane } from "./planeOps-
|
|
7
|
-
import { _ as cast, y as downcast } from "./faceFns-
|
|
8
|
-
import { _ as collectInputFaceHashes, b as propagateMetadataByHash, y as propagateAllMetadata } from "./shapeFns-
|
|
6
|
+
import { o as resolvePlane } from "./planeOps-Cp6GQ23-.js";
|
|
7
|
+
import { _ as cast, y as downcast } from "./faceFns-CCu9ULQm.js";
|
|
8
|
+
import { _ as collectInputFaceHashes, b as propagateMetadataByHash, y as propagateAllMetadata } from "./shapeFns-BakfS4c9.js";
|
|
9
9
|
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
10
|
-
import { r as makeFace } from "./surfaceBuilders-
|
|
10
|
+
import { r as makeFace } from "./surfaceBuilders-BdUP_OXk.js";
|
|
11
11
|
//#region src/topology/booleanFns.ts
|
|
12
12
|
/**
|
|
13
13
|
* Boolean and compound operations — functional replacements for _3DShape boolean methods.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as isPlanarFace, W as DisposalScope, c as createEdge, l as createFace, p as createWire, rt as getKernel, tt as _usingCtx, y as isFace } from "./shapeTypes-
|
|
2
|
-
import {
|
|
3
|
-
import { _ as cast, u as outerWire } from "./faceFns-
|
|
1
|
+
import { A as isPlanarFace, W as DisposalScope, c as createEdge, l as createFace, p as createWire, rt as getKernel, tt as _usingCtx, y as isFace } from "./shapeTypes-B5bBKbg9.js";
|
|
2
|
+
import { O as ok, d as validationError, g as andThen, i as kernelError, v as err } from "./errors-B3CDG537.js";
|
|
3
|
+
import { _ as cast, u as outerWire } from "./faceFns-CCu9ULQm.js";
|
|
4
4
|
//#region src/utils/range.ts
|
|
5
5
|
/** Generate an array of integers `[0, 1, …, len - 1]`. */
|
|
6
6
|
function range(len) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BfOb9vzc.cjs");
|
|
2
|
+
const require_errors = require("./errors-CJU8CHng.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-C0SwZInk.cjs");
|
|
4
4
|
//#region src/utils/range.ts
|
|
5
5
|
/** Generate an array of integers `[0, 1, …, len - 1]`. */
|
|
6
6
|
function range(len) {
|
package/dist/text.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_textBlueprints = require("./textBlueprints
|
|
3
|
-
const require_textMetrics = require("./textMetrics-
|
|
2
|
+
const require_textBlueprints = require("./textBlueprints--5GSuYEm.cjs");
|
|
3
|
+
const require_textMetrics = require("./textMetrics-CyJlakdR.cjs");
|
|
4
4
|
exports.fontMetrics = require_textMetrics.fontMetrics;
|
|
5
5
|
exports.getFont = require_textBlueprints.getFont;
|
|
6
6
|
exports.loadFont = require_textBlueprints.loadFont;
|
package/dist/text.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-
|
|
2
|
-
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-
|
|
1
|
+
import { n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-C_JaAGiG.js";
|
|
2
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-829YpBdN.js";
|
|
3
3
|
export { fontMetrics, getFont, loadFont, sketchText, textBlueprints, textMetrics };
|
|
@@ -29,18 +29,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
enumerable: true
|
|
30
30
|
}) : target, mod));
|
|
31
31
|
//#endregion
|
|
32
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
33
|
-
const
|
|
32
|
+
const require_shapeTypes = require("./shapeTypes-BfOb9vzc.cjs");
|
|
33
|
+
const require_bug = require("./bug-O02CsAmt.cjs");
|
|
34
|
+
const require_errors = require("./errors-CJU8CHng.cjs");
|
|
34
35
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
35
36
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
36
|
-
const require_planeOps = require("./planeOps-
|
|
37
|
-
const require_faceFns = require("./faceFns-
|
|
38
|
-
const require_curveFns = require("./curveFns-
|
|
37
|
+
const require_planeOps = require("./planeOps-Cr25KWWA.cjs");
|
|
38
|
+
const require_faceFns = require("./faceFns-C0SwZInk.cjs");
|
|
39
|
+
const require_curveFns = require("./curveFns-YN8_CsqU.cjs");
|
|
39
40
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
40
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
41
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
42
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
43
|
-
const require_loftFns = require("./loftFns-
|
|
41
|
+
const require_surfaceBuilders = require("./surfaceBuilders-CUNhA_3a.cjs");
|
|
42
|
+
const require_solidBuilders = require("./solidBuilders-BgrXN-GP.cjs");
|
|
43
|
+
const require_blueprintSketcher = require("./blueprintSketcher-k5dNnvzs.cjs");
|
|
44
|
+
const require_loftFns = require("./loftFns-Bbe5jRA-.cjs");
|
|
44
45
|
let opentype_js = require("opentype.js");
|
|
45
46
|
opentype_js = __toESM(opentype_js, 1);
|
|
46
47
|
//#region src/sketching/compoundSketch.ts
|
|
@@ -61,7 +62,7 @@ opentype_js = __toESM(opentype_js, 1);
|
|
|
61
62
|
var CompoundSketch = class CompoundSketch {
|
|
62
63
|
sketches;
|
|
63
64
|
constructor(sketches) {
|
|
64
|
-
if (sketches.length === 0)
|
|
65
|
+
if (sketches.length === 0) require_bug.bug("CompoundSketch", "Cannot create CompoundSketch with an empty array of sketches");
|
|
65
66
|
this.sketches = sketches;
|
|
66
67
|
}
|
|
67
68
|
/** Release all kernel resources held by every sub-sketch. */
|
|
@@ -116,12 +117,12 @@ var CompoundSketch = class CompoundSketch {
|
|
|
116
117
|
* face-with-holes profile to a single-wire one has no defined meaning.
|
|
117
118
|
*/
|
|
118
119
|
loftWith(otherCompound, loftConfig = {}) {
|
|
119
|
-
if (Array.isArray(otherCompound) || !(otherCompound instanceof CompoundSketch)) return
|
|
120
|
+
if (Array.isArray(otherCompound) || !(otherCompound instanceof CompoundSketch)) return require_bug.bug("CompoundSketch.loftWith", "A compound (face-with-holes) sketch can only loft to another compound sketch with the same number of sub-sketches.");
|
|
120
121
|
return compoundSketchLoft(this, otherCompound, loftConfig);
|
|
121
122
|
}
|
|
122
123
|
/** Sweeping a face-with-holes profile has no single well-defined spine. */
|
|
123
124
|
sweepSketch() {
|
|
124
|
-
return
|
|
125
|
+
return require_bug.bug("CompoundSketch.sweepSketch", "Sweeping a compound (face-with-holes) profile is not supported — sweep its outer Sketch instead.");
|
|
125
126
|
}
|
|
126
127
|
};
|
|
127
128
|
//#endregion
|
|
@@ -156,7 +157,7 @@ function asSketch(sketchLike) {
|
|
|
156
157
|
return first;
|
|
157
158
|
}
|
|
158
159
|
}
|
|
159
|
-
|
|
160
|
+
require_bug.bug("asSketch", "Expected a single-wire profile to loft or sweep.");
|
|
160
161
|
}
|
|
161
162
|
/** Build a face from a sketch's closed planar wire. */
|
|
162
163
|
function sketchFace(sketch) {
|
|
@@ -310,7 +311,7 @@ function compoundSketchRevolve(sketch, revolutionAxis, { origin } = {}) {
|
|
|
310
311
|
}
|
|
311
312
|
/** Loft between two compound sketches with matching sub-sketch counts. */
|
|
312
313
|
function compoundSketchLoft(sketch, other, loftConfig = {}) {
|
|
313
|
-
if (sketch.sketches.length !== other.sketches.length)
|
|
314
|
+
if (sketch.sketches.length !== other.sketches.length) require_bug.bug("CompoundSketch.loftWith", "You need to loft with another compound with the same number of sketches");
|
|
314
315
|
const shells = sketch.sketches.map((base, cIndex) => {
|
|
315
316
|
const outer = require_arrayAccess.getAtOrThrow(other.sketches, cIndex);
|
|
316
317
|
const loftOpts = {};
|
|
@@ -500,14 +501,14 @@ var Sketches = class {
|
|
|
500
501
|
* the single profile is a compound (face-with-holes) sketch.
|
|
501
502
|
*/
|
|
502
503
|
soleSketch(op) {
|
|
503
|
-
if (this.sketches.length !== 1)
|
|
504
|
+
if (this.sketches.length !== 1) require_bug.bug(`Sketches.${op}`, `Multiple profiles — ${op} each sub-sketch individually.`);
|
|
504
505
|
const only = require_arrayAccess.firstOrThrow(this.sketches);
|
|
505
|
-
if (!(only instanceof Sketch))
|
|
506
|
+
if (!(only instanceof Sketch)) require_bug.bug(`Sketches.${op}`, `${op} is only supported on single-wire profiles.`);
|
|
506
507
|
return only;
|
|
507
508
|
}
|
|
508
509
|
/** Build a face from the sole contained profile (see {@link Sketches.faces}). */
|
|
509
510
|
face() {
|
|
510
|
-
if (this.sketches.length !== 1)
|
|
511
|
+
if (this.sketches.length !== 1) require_bug.bug("Sketches.face", "Multiple profiles — use faces() to combine them.");
|
|
511
512
|
return require_arrayAccess.firstOrThrow(this.sketches).face();
|
|
512
513
|
}
|
|
513
514
|
/** Loft from the sole contained profile to one or more other sketches. */
|
|
@@ -641,7 +642,7 @@ var sketchFontCommands = function* (commands) {
|
|
|
641
642
|
function textBlueprints(text, { startX = 0, startY = 0, fontSize = 16, fontFamily = "default" } = {}) {
|
|
642
643
|
let font = getFont(fontFamily);
|
|
643
644
|
if (!font) font = getFont();
|
|
644
|
-
if (!font)
|
|
645
|
+
if (!font) require_bug.bug("text", "No fonts loaded. Call loadFont() before using text functions.");
|
|
645
646
|
const writtenText = font.getPath(text, -startX, -startY, fontSize);
|
|
646
647
|
return require_blueprintSketcher.organiseBlueprints(Array.from(sketchFontCommands(writtenText.commands))).mirror([0, 0]);
|
|
647
648
|
}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { l as createFace, p as createWire } from "./shapeTypes-
|
|
2
|
-
import {
|
|
1
|
+
import { l as createFace, p as createWire } from "./shapeTypes-B5bBKbg9.js";
|
|
2
|
+
import { n as bug } from "./bug-BdOHwn_e.js";
|
|
3
|
+
import { I as unwrap, O as ok, r as ioError, t as BrepErrorCode, v as err } from "./errors-B3CDG537.js";
|
|
3
4
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
4
5
|
import { d as vecNormalize, h as vecScale, r as vecCross } from "./vecOps-SKPRvPH-.js";
|
|
5
|
-
import { n as createPlane } from "./planeOps-
|
|
6
|
-
import { v as copyShape } from "./faceFns-
|
|
7
|
-
import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-
|
|
6
|
+
import { n as createPlane } from "./planeOps-Cp6GQ23-.js";
|
|
7
|
+
import { v as copyShape } from "./faceFns-CCu9ULQm.js";
|
|
8
|
+
import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-SNQ04JW6.js";
|
|
8
9
|
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
9
|
-
import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-
|
|
10
|
-
import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-
|
|
11
|
-
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
12
|
-
import { a as revolve, d as twistExtrude, o as complexExtrude, r as extrude, t as loft, u as sweep } from "./loftFns-
|
|
10
|
+
import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-BdUP_OXk.js";
|
|
11
|
+
import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-DaTgm_Wj.js";
|
|
12
|
+
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-VvIRL3M8.js";
|
|
13
|
+
import { a as revolve, d as twistExtrude, o as complexExtrude, r as extrude, t as loft, u as sweep } from "./loftFns-DEReccFa.js";
|
|
13
14
|
import opentype from "opentype.js";
|
|
14
15
|
//#region src/sketching/compoundSketch.ts
|
|
15
16
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-
|
|
1
|
+
import { O as ok, d as validationError, t as BrepErrorCode, v as err } from "./errors-B3CDG537.js";
|
|
2
|
+
import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-C_JaAGiG.js";
|
|
3
3
|
//#region src/text/sketchText.ts
|
|
4
4
|
/**
|
|
5
5
|
* Render text as 3D sketch outlines on a plane.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_textBlueprints = require("./textBlueprints
|
|
2
|
-
const require_errors = require("./errors-
|
|
1
|
+
const require_textBlueprints = require("./textBlueprints--5GSuYEm.cjs");
|
|
2
|
+
const require_errors = require("./errors-CJU8CHng.cjs");
|
|
3
3
|
//#region src/text/sketchText.ts
|
|
4
4
|
/**
|
|
5
5
|
* Render text as 3D sketch outlines on a plane.
|
|
@@ -1,12 +1,12 @@
|
|
|
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
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
5
|
-
const require_shapeFns = require("./shapeFns-
|
|
6
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
7
|
-
const require_loftFns = require("./loftFns-
|
|
8
|
-
const require_refResolveFns = require("./refResolveFns-
|
|
9
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
4
|
+
const require_faceFns = require("./faceFns-C0SwZInk.cjs");
|
|
5
|
+
const require_shapeFns = require("./shapeFns-DzXcfZHY.cjs");
|
|
6
|
+
const require_solidBuilders = require("./solidBuilders-BgrXN-GP.cjs");
|
|
7
|
+
const require_loftFns = require("./loftFns-Bbe5jRA-.cjs");
|
|
8
|
+
const require_refResolveFns = require("./refResolveFns-CHm7tsm2.cjs");
|
|
9
|
+
const require_primitiveFns = require("./primitiveFns-DZXN7qDb.cjs");
|
|
10
10
|
//#region src/utils/uuid.ts
|
|
11
11
|
/** Generate a v4-style UUID string using `crypto.getRandomValues`. */
|
|
12
12
|
function uuidv() {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { K as createKernelHandle, W as DisposalScope, n as castResultShape, rt as getKernel, tt as _usingCtx, x as isShape3D } from "./shapeTypes-
|
|
2
|
-
import {
|
|
1
|
+
import { K as createKernelHandle, W as DisposalScope, n as castResultShape, rt as getKernel, tt as _usingCtx, x as isShape3D } from "./shapeTypes-B5bBKbg9.js";
|
|
2
|
+
import { C as isOk, O as ok, d as validationError, n as computationError, r as ioError, t as BrepErrorCode, v as err } from "./errors-B3CDG537.js";
|
|
3
3
|
import { d as vecNormalize, s as vecIsZero } from "./vecOps-SKPRvPH-.js";
|
|
4
|
-
import { b as fromBREP } from "./faceFns-
|
|
5
|
-
import { s as toBREP } from "./shapeFns-
|
|
6
|
-
import { h as fuseAll } from "./solidBuilders-
|
|
7
|
-
import { t as loft } from "./loftFns-
|
|
8
|
-
import { c as resolveRefParams } from "./refResolveFns-
|
|
9
|
-
import { E as wire, h as line } from "./primitiveFns-
|
|
4
|
+
import { b as fromBREP } from "./faceFns-CCu9ULQm.js";
|
|
5
|
+
import { s as toBREP } from "./shapeFns-BakfS4c9.js";
|
|
6
|
+
import { h as fuseAll } from "./solidBuilders-DaTgm_Wj.js";
|
|
7
|
+
import { t as loft } from "./loftFns-DEReccFa.js";
|
|
8
|
+
import { c as resolveRefParams } from "./refResolveFns-C_mHlM8R.js";
|
|
9
|
+
import { E as wire, h as line } from "./primitiveFns-D2zyQa3w.js";
|
|
10
10
|
//#region src/utils/uuid.ts
|
|
11
11
|
/** Generate a v4-style UUID string using `crypto.getRandomValues`. */
|
|
12
12
|
function uuidv() {
|
|
@@ -60,6 +60,10 @@ export declare function adjacentFaces<D extends Dimension>(parent: AnyShape<D>,
|
|
|
60
60
|
/**
|
|
61
61
|
* Get all edges shared between two faces.
|
|
62
62
|
*
|
|
63
|
+
* Prefers the kernel's native `sharedEdges` (computed from its internal
|
|
64
|
+
* edge-to-face adjacency) and falls back to {@link sharedEdgesJS} on kernels
|
|
65
|
+
* that don't implement it. Both return fresh, caller-owned edge handles.
|
|
66
|
+
*
|
|
63
67
|
* @param face1 - The first face.
|
|
64
68
|
* @param face2 - The second face.
|
|
65
69
|
* @returns Array of edges present in both faces (via isSame comparison).
|
package/dist/topology.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
4
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
-
const require_curveFns = require("./curveFns-
|
|
6
|
-
const require_meshFns = require("./meshFns-
|
|
7
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
8
|
-
const require_healingFns = require("./healingFns-
|
|
9
|
-
const require_adjacencyFns = require("./adjacencyFns-
|
|
10
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-tns6VXoD.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-C0SwZInk.cjs");
|
|
4
|
+
const require_shapeFns = require("./shapeFns-DzXcfZHY.cjs");
|
|
5
|
+
const require_curveFns = require("./curveFns-YN8_CsqU.cjs");
|
|
6
|
+
const require_meshFns = require("./meshFns-B9pPcwuD.cjs");
|
|
7
|
+
const require_solidBuilders = require("./solidBuilders-BgrXN-GP.cjs");
|
|
8
|
+
const require_healingFns = require("./healingFns-Bbl5KTIh.cjs");
|
|
9
|
+
const require_adjacencyFns = require("./adjacencyFns-h7eAxaRD.cjs");
|
|
10
|
+
const require_primitiveFns = require("./primitiveFns-DZXN7qDb.cjs");
|
|
11
11
|
exports.addHoles = require_primitiveFns.addHoles;
|
|
12
12
|
exports.adjacentFaces = require_adjacencyFns.adjacentFaces;
|
|
13
13
|
exports.approximateCurve = require_curveFns.approximateCurve;
|
package/dist/topology.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { S as vertexPosition, _ as iterFaces, b as iterVertices, c as getFaces, f as getVertices, g as iterEdges, m as invalidateShapeCache, n as getBounds, p as getWires, s as getEdges, x as iterWires } from "./topologyQueryFns-
|
|
2
|
-
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, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-
|
|
3
|
-
import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-
|
|
4
|
-
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-
|
|
5
|
-
import { d as createMeshCache, n as exportSTEP, r as exportSTL, t as exportIGES, u as clearMeshCache } from "./meshFns-
|
|
6
|
-
import { h as fuseAll, p as cutAll } from "./solidBuilders-
|
|
7
|
-
import { A as toBufferGeometryData, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, O as getNurbsSurfaceData, P as toLineGeometryData, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, g as variableFillet, j as toGroupedBufferGeometryData, k as chamferDistAngle, l as solidFromShell, n as fixSelfIntersection, o as healSolid, r as fixShape, s as healWire, t as autoHeal, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution } from "./healingFns-
|
|
8
|
-
import { a as sharedEdges, c as wiresOfFace, n as edgesOfFace, o as verticesOfEdge, r as facesOfEdge, t as adjacentFaces } from "./adjacencyFns-
|
|
9
|
-
import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere, 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, x as subFace, y as solid } from "./primitiveFns-
|
|
1
|
+
import { S as vertexPosition, _ as iterFaces, b as iterVertices, c as getFaces, f as getVertices, g as iterEdges, m as invalidateShapeCache, n as getBounds, p as getWires, s as getEdges, x as iterWires } from "./topologyQueryFns-MAUFbsSp.js";
|
|
2
|
+
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, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-CCu9ULQm.js";
|
|
3
|
+
import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-BakfS4c9.js";
|
|
4
|
+
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";
|
|
5
|
+
import { d as createMeshCache, n as exportSTEP, r as exportSTL, t as exportIGES, u as clearMeshCache } from "./meshFns-C2nLgSf2.js";
|
|
6
|
+
import { h as fuseAll, p as cutAll } from "./solidBuilders-DaTgm_Wj.js";
|
|
7
|
+
import { A as toBufferGeometryData, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, O as getNurbsSurfaceData, P as toLineGeometryData, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, g as variableFillet, j as toGroupedBufferGeometryData, k as chamferDistAngle, l as solidFromShell, n as fixSelfIntersection, o as healSolid, r as fixShape, s as healWire, t as autoHeal, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution } from "./healingFns-D6Bizorp.js";
|
|
8
|
+
import { a as sharedEdges, c as wiresOfFace, n as edgesOfFace, o as verticesOfEdge, r as facesOfEdge, t as adjacentFaces } from "./adjacencyFns-Dgsl8VJ2.js";
|
|
9
|
+
import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere, 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, x as subFace, y as solid } from "./primitiveFns-D2zyQa3w.js";
|
|
10
10
|
export { addHoles, adjacentFaces, approximateCurve, asTopo, autoHeal, bezier, box, bsplineApprox, cast, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkBoolean, circle, classifyPointOnFace, clearMeshCache, compound, cone, createMeshCache, curveAxis, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cutAll, cutAllBisect, cutWithEvolution, cylinder, fromBREP as deserializeShape, downcast, edgesOfFace, ellipse, ellipseArc, ellipsoid, exportIGES, exportSTEP, exportSTL, face, faceAxis, faceCenter, faceGeomType, faceOrientation, facesOfEdge, filledFace, filletWithEvolution, fixSelfIntersection, fixShape, flipFaceOrientation, flipOrientation, fuseAll, fuseAllBisect, fuseWithEvolution, getBounds, getCurveType, getEdges, getFaces, getHashCode, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getSurfaceType, getVertices, getWires, healFace, healSolid, healWire, helix, innerWires, interpolateCurve, intersectWithEvolution, invalidateShapeCache, isCompSolid, isEqualShape, isSameShape, iterEdges, iterFaces, iterTopo, iterVertices, iterWires, line, normalAt, offsetFace, offsetWire2D, outerWire, pointOnSurface, polygon, positionOnCurve, projectPointOnFace, sewShells, shapeType, sharedEdges, shellWithEvolution, solid, solidFromShell, sphere, subFace, tangentArc, threePointArc, toBufferGeometryData, toGroupedBufferGeometryData, toLineGeometryData, torus, uvBounds, uvCoordinates, variableFillet, vertex, vertexPosition, verticesOfEdge, wire, wireLoop, wiresOfFace };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as DisposalScope, n as castResultShape, r as castResultShapeWithKnownType, rt as getKernel, tt as _usingCtx, z as getOrQueryType } from "./shapeTypes-
|
|
2
|
-
import {
|
|
1
|
+
import { W as DisposalScope, n as castResultShape, r as castResultShapeWithKnownType, rt as getKernel, tt as _usingCtx, z as getOrQueryType } from "./shapeTypes-B5bBKbg9.js";
|
|
2
|
+
import { O as ok, f as getSuggestionForCode, p as translateKernelError, v as err } from "./errors-B3CDG537.js";
|
|
3
3
|
//#region src/core/kernelCall.ts
|
|
4
4
|
function buildError(kind, code, message, cause, suggestion) {
|
|
5
5
|
const base = {
|
|
@@ -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/core/kernelCall.ts
|
|
4
4
|
function buildError(kind, code, message, cause, suggestion) {
|
|
5
5
|
const base = {
|
package/dist/vectors.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
3
3
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
4
4
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
5
|
-
const require_planeOps = require("./planeOps-
|
|
5
|
+
const require_planeOps = require("./planeOps-Cr25KWWA.cjs");
|
|
6
6
|
exports.DEG2RAD = require_constants.DEG2RAD;
|
|
7
7
|
exports.RAD2DEG = require_constants.RAD2DEG;
|
|
8
8
|
exports.createNamedPlane = require_planeOps.createNamedPlane;
|
package/dist/vectors.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
2
2
|
import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N0.js";
|
|
3
3
|
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";
|
|
4
|
-
import { i as pivotPlane, n as createPlane, o as resolvePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-
|
|
4
|
+
import { i as pivotPlane, n as createPlane, o as resolvePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-Cp6GQ23-.js";
|
|
5
5
|
export { DEG2RAD, RAD2DEG, createNamedPlane, createPlane, pivotPlane, resolveDirection, resolvePlane, toVec2, toVec3, translatePlane, vecAdd, vecAngle, vecCross, vecDistance, vecDot, vecEquals, vecIsZero, vecLength, vecLengthSq, vecNegate, vecNormalize, vecProjectToPlane, vecRepr, vecRotate, vecScale, vecSub };
|
package/package.json
CHANGED
package/dist/vec3-Dpha8d5k.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
export { wasmIndex as n, vec3At as t };
|