brepjs 12.12.0 → 12.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/dist/2d/blueprints/Blueprint.d.ts +1 -0
- package/dist/2d/blueprints/Blueprint.d.ts.map +1 -1
- package/dist/2d/lib/BoundingBox2d.d.ts +1 -0
- package/dist/2d/lib/BoundingBox2d.d.ts.map +1 -1
- package/dist/2d/lib/Curve2D.d.ts +1 -0
- package/dist/2d/lib/Curve2D.d.ts.map +1 -1
- package/dist/2d.cjs +3 -3
- package/dist/2d.js +3 -3
- package/dist/{Blueprint-B_jo065X.js → Blueprint-7b-gvX_p.js} +14 -5
- package/dist/{Blueprint-C2znXaaZ.cjs → Blueprint-D1qS-Zyd.cjs} +14 -5
- package/dist/{blueprintFns-CxfjtauU.cjs → blueprintFns--fsdFjx9.cjs} +2 -2
- package/dist/{blueprintFns-bpyUa_XY.js → blueprintFns-DM5lmYDI.js} +2 -2
- package/dist/{boolean2D-yyAQW-Rw.js → boolean2D-BnJQsw1Q.js} +8 -8
- package/dist/{boolean2D-Bu1v9M_m.cjs → boolean2D-CaZrebEm.cjs} +8 -8
- package/dist/{booleanFns-hPtsWvKU.cjs → booleanFns-DX08b6Hh.cjs} +12 -12
- package/dist/{booleanFns-ZBHOH5IJ.js → booleanFns-DyoSwthi.js} +12 -12
- package/dist/brepjs.cjs +20 -19
- package/dist/brepjs.js +20 -20
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-Bhpxe2GK.js → cornerFinder-C9L0wY8v.js} +1 -1
- package/dist/{cornerFinder-D1iNCBMe.cjs → cornerFinder-D3a4o3vN.cjs} +1 -1
- package/dist/{curveFns-C_MUV5Nj.cjs → curveFns-B40hdZon.cjs} +1 -1
- package/dist/{curveFns-D1LG7v0s.js → curveFns-Bse_M07l.js} +1 -1
- package/dist/{drawFns-CgtSyuBg.cjs → drawFns-BB2_R1zc.cjs} +11 -11
- package/dist/{drawFns-DWfKZyed.js → drawFns-WOquG2I9.js} +11 -11
- package/dist/{extrudeFns-C2Pmhe-R.cjs → extrudeFns-B4Fwc4sm.cjs} +3 -3
- package/dist/{extrudeFns-GVLc2cLp.js → extrudeFns-D4euaVFA.js} +3 -3
- package/dist/{faceFns-C-HZ3rFB.js → faceFns-BN95alxi.js} +1 -1
- package/dist/{faceFns-KUsSM65w.cjs → faceFns-wT8HTsiI.cjs} +1 -1
- package/dist/{helpers-CPw-TkjO.js → helpers-BSRZXwBR.js} +5 -5
- package/dist/{helpers-C5QjF_x8.cjs → helpers-WmqZmmA1.cjs} +5 -5
- package/dist/{historyFns-C-HhJKjF.js → historyFns-4FWw2_qZ.js} +4 -4
- package/dist/{historyFns-9JUnw1_O.cjs → historyFns-B_76a2HE.cjs} +4 -4
- package/dist/{importFns-CyPkUA_N.cjs → importFns-BRH3Fz3H.cjs} +2 -2
- package/dist/{importFns-beNdL_tU.js → importFns-CM94X6iT.js} +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/index.d.ts +20 -1
- package/dist/kernel/index.d.ts.map +1 -1
- package/dist/kernel/interfaces/index.d.ts +0 -4
- package/dist/kernel/interfaces/index.d.ts.map +1 -1
- package/dist/{measureFns-Gmok6h3t.cjs → measureFns-BPbSMRrS.cjs} +2 -2
- package/dist/{measureFns-BVKhgZAe.js → measureFns-DlBUu9Mw.js} +2 -2
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-CW1EUdGe.cjs → meshFns-BU2utE_P.cjs} +2 -2
- package/dist/{meshFns-D5CPzlWP.js → meshFns-BfYhsH55.js} +2 -2
- package/dist/operations/loftFns.d.ts.map +1 -1
- package/dist/operations/sweepFns.d.ts.map +1 -1
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-CpVWHp6V.js → primitiveFns-CrmdLwQr.js} +5 -5
- package/dist/{primitiveFns-Bc6T6M50.cjs → primitiveFns-DsVrQcFZ.cjs} +5 -5
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/{shapeFns-glO_2u3k.js → shapeFns-CO_837FR.js} +2 -2
- package/dist/{shapeFns-csbO4RSU.cjs → shapeFns-DFkO3e8a.cjs} +2 -2
- package/dist/{shapeTypes-DkpaETrw.js → shapeTypes-BmN9vAte.js} +43 -1
- package/dist/{shapeTypes-DQiNnWj0.cjs → shapeTypes-CBc5OTQ4.cjs} +48 -0
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/{solidBuilders-CroCRISt.cjs → solidBuilders-B73M8VgU.cjs} +2 -2
- package/dist/{solidBuilders-j86aJBNd.js → solidBuilders-CCQZBE9x.js} +2 -2
- package/dist/{surfaceBuilders-DVRuWItl.cjs → surfaceBuilders-B1CDCs7m.cjs} +2 -2
- package/dist/{surfaceBuilders-BZWDla4x.js → surfaceBuilders-Ccaf33Q_.js} +2 -2
- package/dist/topology/booleanFns.d.ts.map +1 -1
- package/dist/topology.cjs +6 -6
- package/dist/topology.js +6 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,12 +40,16 @@ Production-ready with the OpenCascade kernel. [brepkit](https://github.com/andym
|
|
|
40
40
|
npm install brepjs brepjs-opencascade
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
`brepjs/quick` handles WASM init automatically via top-level await (ESM only).
|
|
43
|
+
`brepjs/quick` handles WASM init automatically via top-level await (ESM only). Other options:
|
|
44
44
|
|
|
45
45
|
```typescript
|
|
46
|
+
// Auto-detect kernel
|
|
47
|
+
import { init } from 'brepjs';
|
|
48
|
+
await init();
|
|
49
|
+
|
|
50
|
+
// Or manual setup
|
|
46
51
|
import opencascade from 'brepjs-opencascade';
|
|
47
52
|
import { initFromOC } from 'brepjs';
|
|
48
|
-
|
|
49
53
|
const oc = await opencascade();
|
|
50
54
|
initFromOC(oc);
|
|
51
55
|
```
|
|
@@ -47,6 +47,7 @@ export default class Blueprint implements DrawingInterface {
|
|
|
47
47
|
constructor(curves: Curve2D[]);
|
|
48
48
|
/** Release WASM resources held by the underlying curves and bounding box. */
|
|
49
49
|
delete(): void;
|
|
50
|
+
[Symbol.dispose](): void;
|
|
50
51
|
/** Return a deep copy of this blueprint. */
|
|
51
52
|
clone(): Blueprint;
|
|
52
53
|
/** Return a multi-line string representation for debugging. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blueprint.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/Blueprint.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAY9C,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAQvE,OAAO,KAAK,EAAE,QAAQ,EAAc,SAAS,EAAE,IAAI,EAAQ,MAAM,0BAA0B,CAAC;AAQ5F,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAWzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,CAAC,OAAO,OAAO,SAAU,YAAW,gBAAgB;IACxD,6DAA6D;IAC7D,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,SAAS,CAAC,YAAY,EAAE,IAAI,GAAG,aAAa,CAAC;IAC7C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA0C;IACvE,OAAO,CAAC,mBAAmB,CAA0C;IACrE;;;OAGG;gBACS,MAAM,EAAE,OAAO,EAAE;IAW7B,6EAA6E;IAC7E,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AAI,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,UAAU;IAY3D;;;;;;OAMG;IACH,OAAO,CAAC,OAAO;IAQf;;;;;;;;;;OAUG;IACH,SAAS,CACP,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,EAC1B,IAAI,EAAE,UAAU,EAChB,EACE,MAAa,EACb,MAAa,EACb,UAAc,GACf,GAAE;QACD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACvB,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;QAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;KAChB;IAgBR,iEAAiE;IACjE,UAAU;IAcV,2DAA2D;IAC3D,SAAS;IAIT;;;;OAIG;IACH,YAAY,CAAC,MAAM,SAAI;IAIvB,sEAAsE;IACtE,UAAU;IAIV;;;;OAIG;IACH,KAAK,CAAC,MAAM,SAAI;IAIhB,8CAA8C;IAC9C,IAAI,UAAU,IAAI,OAAO,CAGxB;IAED,2CAA2C;IAC3C,IAAI,SAAS,IAAI,OAAO,CAGvB;IAED;;;;;;;;OAQG;IACH,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAmBjC,gFAAgF;IAChF,QAAQ;IAIR;;;;OAIG;IACH,UAAU,CAAC,KAAK,EAAE,SAAS;CAc5B"}
|
|
@@ -12,6 +12,7 @@ export declare class BoundingBox2d {
|
|
|
12
12
|
constructor(wrapped?: KernelType);
|
|
13
13
|
get wrapped(): KernelType;
|
|
14
14
|
delete(): void;
|
|
15
|
+
[Symbol.dispose](): void;
|
|
15
16
|
/** Return a human-readable string of the form `(xMin,yMin) - (xMax,yMax)`. */
|
|
16
17
|
get repr(): string;
|
|
17
18
|
/** Return the `[min, max]` corner points of the bounding box. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoundingBox2d.d.ts","sourceRoot":"","sources":["../../../src/2d/lib/BoundingBox2d.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAA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AQd,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI;IAIxB,8EAA8E;IAC9E,IAAI,IAAI,IAAI,MAAM,CAGjB;IAED,iEAAiE;IACjE,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAM/B;IAED,mDAAmD;IACnD,IAAI,MAAM,IAAI,OAAO,CAGpB;IAED,uDAAuD;IACvD,IAAI,KAAK,IAAI,MAAM,CAGlB;IAED,wDAAwD;IACxD,IAAI,MAAM,IAAI,MAAM,CAGnB;IAED;;;;OAIG;IACH,YAAY,CAAC,cAAc,SAAI,GAAG,OAAO;IAWzC,mDAAmD;IACnD,GAAG,CAAC,KAAK,EAAE,aAAa;IAIxB,0EAA0E;IAC1E,KAAK,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO;IAIpC,iFAAiF;IACjF,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;CAGvC"}
|
package/dist/2d/lib/Curve2D.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export declare class Curve2D {
|
|
|
24
24
|
constructor(handle: KernelType);
|
|
25
25
|
get wrapped(): KernelType;
|
|
26
26
|
delete(): void;
|
|
27
|
+
[Symbol.dispose](): void;
|
|
27
28
|
/** Compute (and cache) the 2D bounding box of this curve. */
|
|
28
29
|
get boundingBox(): BoundingBox2d;
|
|
29
30
|
/** Return a human-readable representation, e.g. `LINE (0,0) - (1,1)`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Curve2D.d.ts","sourceRoot":"","sources":["../../../src/2d/lib/Curve2D.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,KAAK,MAAM,EAAmB,MAAM,sBAAsB,CAAC;AAMpE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAA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O,CAKxB;IAED,4EAA4E;IAC5E,IAAI,SAAS,IAAI,OAAO,CAKvB;IAED,4DAA4D;IAC5D,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED,0DAA0D;IAC1D,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED,wFAAwF;IACxF,IAAI,QAAQ,IAAI,SAAS,CAExB;IAED,qDAAqD;IACrD,KAAK,IAAI,OAAO;IAQhB,sDAAsD;IACtD,OAAO,IAAI,IAAI;IAQf,OAAO,CAAC,iBAAiB;IAWzB,OAAO,CAAC,iBAAiB;IAyBzB,gFAAgF;IAChF,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM;IAQhD,8EAA8E;IAC9E,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAIlC;;;;OAIG;IACH,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,SAAO,GAAG,MAAM,CAAC,MAAM,CAAC;IA2B3D;;;;OAIG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO;IAe3C;;;;OAIG;IACH,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,EAAE,EAAE,SAAS,SAAO,GAAG,OAAO,EAAE;CAiCnE"}
|
package/dist/2d.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_Blueprint = require("./Blueprint-
|
|
3
|
-
const require_boolean2D = require("./boolean2D-
|
|
4
|
-
const require_blueprintFns = require("./blueprintFns
|
|
2
|
+
const require_Blueprint = require("./Blueprint-D1qS-Zyd.cjs");
|
|
3
|
+
const require_boolean2D = require("./boolean2D-CaZrebEm.cjs");
|
|
4
|
+
const require_blueprintFns = require("./blueprintFns--fsdFjx9.cjs");
|
|
5
5
|
exports.Blueprint = require_Blueprint.Blueprint;
|
|
6
6
|
exports.Blueprints = require_boolean2D.Blueprints;
|
|
7
7
|
exports.BoundingBox2d = require_Blueprint.BoundingBox2d;
|
package/dist/2d.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./Blueprint-
|
|
2
|
-
import { a as fuseBlueprints, c as roundedRectangleBlueprint, g as CompoundBlueprint, h as Blueprints, i as cutBlueprints, m as organiseBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-
|
|
3
|
-
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, 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-
|
|
1
|
+
import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./Blueprint-7b-gvX_p.js";
|
|
2
|
+
import { a as fuseBlueprints, c as roundedRectangleBlueprint, g as CompoundBlueprint, h as Blueprints, i as cutBlueprints, m as organiseBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-BnJQsw1Q.js";
|
|
3
|
+
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, 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-DM5lmYDI.js";
|
|
4
4
|
export { Blueprint, Blueprints, BoundingBox2d, CompoundBlueprint, Curve2D, createBlueprint, curve2dBoundingBox, curve2dDistanceFrom, curve2dFirstPoint, curve2dIsOnCurve, curve2dLastPoint, curve2dParameter, curve2dSplitAt, curve2dTangentAt, cut2D, cutBlueprints, fuse2D, fuseBlueprints, getBounds2D, getOrientation2D, intersect2D, intersectBlueprints, isInside2D, mirror2D, organiseBlueprints, polysidesBlueprint, reverseCurve, rotate2D, roundedRectangleBlueprint, scale2D, sketchOnFace2D, sketchOnPlane2D, stretch2D, toSVGPathD, translate2D };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { G as getKernel2D, L as registerForCleanup, W as getKernel, i as createEdge, l as createWire, z as unregisterFromCleanup } from "./shapeTypes-
|
|
1
|
+
import { G as getKernel2D, L as registerForCleanup, W as getKernel, i as createEdge, l as createWire, z as unregisterFromCleanup } from "./shapeTypes-BmN9vAte.js";
|
|
2
2
|
import { L as unwrap, d as validationError, k as ok, m as bug, n as computationError, y as err } from "./errors-B2qrBS1S.js";
|
|
3
3
|
import { _ as DEG2RAD, y as RAD2DEG } from "./vecOps-B9-MTeC8.js";
|
|
4
4
|
import { r as toVec3 } from "./types-Bb4KK_iG.js";
|
|
5
5
|
import { r as makePlane } from "./planeOps-PYHm_Q9z.js";
|
|
6
|
-
import { g as cast, m as uvCoordinates, n as faceCenter, p as uvBounds, r as faceGeomType } from "./faceFns-
|
|
7
|
-
import { f as getOrientation } from "./curveFns-
|
|
8
|
-
import { r as makeFace } from "./surfaceBuilders-
|
|
9
|
-
import { _ as samePoint, b as subtract2d, l as add2d, o as normalize2d, p as distance2d, t as getSingleFace, v as scalarMultiply2d } from "./helpers-
|
|
6
|
+
import { g as cast, m as uvCoordinates, n as faceCenter, p as uvBounds, r as faceGeomType } from "./faceFns-BN95alxi.js";
|
|
7
|
+
import { f as getOrientation } from "./curveFns-Bse_M07l.js";
|
|
8
|
+
import { r as makeFace } from "./surfaceBuilders-Ccaf33Q_.js";
|
|
9
|
+
import { _ as samePoint, b as subtract2d, l as add2d, o as normalize2d, p as distance2d, t as getSingleFace, v as scalarMultiply2d } from "./helpers-BSRZXwBR.js";
|
|
10
10
|
//#region src/2d/lib/definitions.ts
|
|
11
11
|
/** Type guard that checks whether a value is a `Point2D`. */
|
|
12
12
|
function isPoint2D(point) {
|
|
@@ -78,6 +78,9 @@ var BoundingBox2d = class {
|
|
|
78
78
|
if (typeof this._wrapped.delete === "function") this._wrapped.delete();
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
+
[Symbol.dispose]() {
|
|
82
|
+
this.delete();
|
|
83
|
+
}
|
|
81
84
|
/** Return a human-readable string of the form `(xMin,yMin) - (xMax,yMax)`. */
|
|
82
85
|
get repr() {
|
|
83
86
|
const [min, max] = this.bounds;
|
|
@@ -165,6 +168,9 @@ var Curve2D = class Curve2D {
|
|
|
165
168
|
if (typeof this._wrapped.delete === "function") this._wrapped.delete();
|
|
166
169
|
}
|
|
167
170
|
}
|
|
171
|
+
[Symbol.dispose]() {
|
|
172
|
+
this.delete();
|
|
173
|
+
}
|
|
168
174
|
/** Compute (and cache) the 2D bounding box of this curve. */
|
|
169
175
|
get boundingBox() {
|
|
170
176
|
if (this._boundingBox) return this._boundingBox;
|
|
@@ -729,6 +735,9 @@ var Blueprint = class Blueprint {
|
|
|
729
735
|
});
|
|
730
736
|
if (this._boundingBox) this._boundingBox.delete();
|
|
731
737
|
}
|
|
738
|
+
[Symbol.dispose]() {
|
|
739
|
+
this.delete();
|
|
740
|
+
}
|
|
732
741
|
/** Return a deep copy of this blueprint. */
|
|
733
742
|
clone() {
|
|
734
743
|
return new Blueprint(this.curves.map((c) => c.clone()));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CBc5OTQ4.cjs");
|
|
2
2
|
const require_errors = require("./errors-Bkxm3vs2.cjs");
|
|
3
3
|
const require_vecOps = require("./vecOps-4iBMiet9.cjs");
|
|
4
4
|
const require_types = require("./types-BD-VVaWB.cjs");
|
|
5
5
|
const require_planeOps = require("./planeOps-CXJOsSMJ.cjs");
|
|
6
|
-
const require_faceFns = require("./faceFns-
|
|
7
|
-
const require_curveFns = require("./curveFns-
|
|
8
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
9
|
-
const require_helpers = require("./helpers-
|
|
6
|
+
const require_faceFns = require("./faceFns-wT8HTsiI.cjs");
|
|
7
|
+
const require_curveFns = require("./curveFns-B40hdZon.cjs");
|
|
8
|
+
const require_surfaceBuilders = require("./surfaceBuilders-B1CDCs7m.cjs");
|
|
9
|
+
const require_helpers = require("./helpers-WmqZmmA1.cjs");
|
|
10
10
|
//#region src/2d/lib/definitions.ts
|
|
11
11
|
/** Type guard that checks whether a value is a `Point2D`. */
|
|
12
12
|
function isPoint2D(point) {
|
|
@@ -78,6 +78,9 @@ var BoundingBox2d = class {
|
|
|
78
78
|
if (typeof this._wrapped.delete === "function") this._wrapped.delete();
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
+
[Symbol.dispose]() {
|
|
82
|
+
this.delete();
|
|
83
|
+
}
|
|
81
84
|
/** Return a human-readable string of the form `(xMin,yMin) - (xMax,yMax)`. */
|
|
82
85
|
get repr() {
|
|
83
86
|
const [min, max] = this.bounds;
|
|
@@ -165,6 +168,9 @@ var Curve2D = class Curve2D {
|
|
|
165
168
|
if (typeof this._wrapped.delete === "function") this._wrapped.delete();
|
|
166
169
|
}
|
|
167
170
|
}
|
|
171
|
+
[Symbol.dispose]() {
|
|
172
|
+
this.delete();
|
|
173
|
+
}
|
|
168
174
|
/** Compute (and cache) the 2D bounding box of this curve. */
|
|
169
175
|
get boundingBox() {
|
|
170
176
|
if (this._boundingBox) return this._boundingBox;
|
|
@@ -729,6 +735,9 @@ var Blueprint = class Blueprint {
|
|
|
729
735
|
});
|
|
730
736
|
if (this._boundingBox) this._boundingBox.delete();
|
|
731
737
|
}
|
|
738
|
+
[Symbol.dispose]() {
|
|
739
|
+
this.delete();
|
|
740
|
+
}
|
|
732
741
|
/** Return a deep copy of this blueprint. */
|
|
733
742
|
clone() {
|
|
734
743
|
return new Blueprint(this.curves.map((c) => c.clone()));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_errors = require("./errors-Bkxm3vs2.cjs");
|
|
2
|
-
const require_Blueprint = require("./Blueprint-
|
|
3
|
-
const require_boolean2D = require("./boolean2D-
|
|
2
|
+
const require_Blueprint = require("./Blueprint-D1qS-Zyd.cjs");
|
|
3
|
+
const require_boolean2D = require("./boolean2D-CaZrebEm.cjs");
|
|
4
4
|
//#region src/2d/lib/curve2dFns.ts
|
|
5
5
|
/**
|
|
6
6
|
* Return a reversed copy of the curve (non-mutating).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as validationError, k as ok, t as BrepErrorCode, y as err } from "./errors-B2qrBS1S.js";
|
|
2
|
-
import { t as Blueprint } from "./Blueprint-
|
|
3
|
-
import { g as CompoundBlueprint } from "./boolean2D-
|
|
2
|
+
import { t as Blueprint } from "./Blueprint-7b-gvX_p.js";
|
|
3
|
+
import { g as CompoundBlueprint } from "./boolean2D-BnJQsw1Q.js";
|
|
4
4
|
//#region src/2d/lib/curve2dFns.ts
|
|
5
5
|
/**
|
|
6
6
|
* Return a reversed copy of the curve (non-mutating).
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { G as getKernel2D, M as DisposalScope, U as _usingCtx, W as getKernel, a as createFace, i as createEdge, l as createWire, m as isShape3D, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { G as getKernel2D, M as DisposalScope, U as _usingCtx, W as getKernel, a as createFace, i as createEdge, l as createWire, m as isShape3D, t as castShape } from "./shapeTypes-BmN9vAte.js";
|
|
2
2
|
import { L as unwrap, d as validationError, i as kernelError, k as ok, l as typeCastError, m as bug, n as computationError, s as safeIndex, w as isOk, y as err } from "./errors-B2qrBS1S.js";
|
|
3
3
|
import { _ as DEG2RAD, d as vecNormalize, h as vecScale, r as vecCross, y as RAD2DEG } from "./vecOps-B9-MTeC8.js";
|
|
4
4
|
import { r as toVec3 } from "./types-Bb4KK_iG.js";
|
|
5
5
|
import { n as createPlane } from "./planeOps-PYHm_Q9z.js";
|
|
6
|
-
import { _ as downcast, c as normalAt, p as uvBounds, u as pointOnSurface } from "./faceFns-
|
|
7
|
-
import { c as curveStartPoint, l as curveTangentAt, r as curveIsClosed } from "./curveFns-
|
|
8
|
-
import { _ as zip, i as makeNewFaceWithinFace, r as makeFace, s as assembleWire } from "./surfaceBuilders-
|
|
9
|
-
import { _ as samePoint$1, b as subtract2d, d as cartesianToPolar, f as crossProduct2d, g as rotate2d, h as polarToCartesian, l as add2d, m as polarAngle2d, o as normalize2d, p as distance2d, s as PRECISION_INTERSECTION, v as scalarMultiply2d } from "./helpers-
|
|
10
|
-
import { _ as Curve2D, b as removeDuplicatePoints, c as make2dCircle, f as make2dSegmentCurve, h as approximateAsBSpline, m as make2dThreePointArc, n as asSVG, o as make2dArcFromCenter, p as make2dTangentArc, r as viewbox, s as make2dBezierCurve, t as Blueprint, u as make2dEllipseArc, x as isPoint2D, y as BoundingBox2d } from "./Blueprint-
|
|
11
|
-
import { c as twistExtrude, n as revolve, r as complexExtrude, s as sweep, t as extrude } from "./extrudeFns-
|
|
6
|
+
import { _ as downcast, c as normalAt, p as uvBounds, u as pointOnSurface } from "./faceFns-BN95alxi.js";
|
|
7
|
+
import { c as curveStartPoint, l as curveTangentAt, r as curveIsClosed } from "./curveFns-Bse_M07l.js";
|
|
8
|
+
import { _ as zip, i as makeNewFaceWithinFace, r as makeFace, s as assembleWire } from "./surfaceBuilders-Ccaf33Q_.js";
|
|
9
|
+
import { _ as samePoint$1, b as subtract2d, d as cartesianToPolar, f as crossProduct2d, g as rotate2d, h as polarToCartesian, l as add2d, m as polarAngle2d, o as normalize2d, p as distance2d, s as PRECISION_INTERSECTION, v as scalarMultiply2d } from "./helpers-BSRZXwBR.js";
|
|
10
|
+
import { _ as Curve2D, b as removeDuplicatePoints, c as make2dCircle, f as make2dSegmentCurve, h as approximateAsBSpline, m as make2dThreePointArc, n as asSVG, o as make2dArcFromCenter, p as make2dTangentArc, r as viewbox, s as make2dBezierCurve, t as Blueprint, u as make2dEllipseArc, x as isPoint2D, y as BoundingBox2d } from "./Blueprint-7b-gvX_p.js";
|
|
11
|
+
import { c as twistExtrude, n as revolve, r as complexExtrude, s as sweep, t as extrude } from "./extrudeFns-D4euaVFA.js";
|
|
12
12
|
//#region src/2d/lib/intersections.ts
|
|
13
13
|
/**
|
|
14
14
|
* Compute intersection points and common segments between two 2D curves.
|
|
@@ -1021,7 +1021,7 @@ function loft(wires, { ruled = true, startPoint, endPoint, tolerance = 1e-6 } =
|
|
|
1021
1021
|
if (!isShape3D(result)) return err(typeCastError("LOFT_NOT_3D", "Loft did not produce a 3D shape"));
|
|
1022
1022
|
return ok(result);
|
|
1023
1023
|
} catch {
|
|
1024
|
-
return err(kernelError("LOFT_FAILED", "Loft operation failed"));
|
|
1024
|
+
return err(kernelError("LOFT_FAILED", "Loft operation failed", void 0, void 0, "Common causes: wire profiles with different edge counts, self-intersecting result, or profiles too far apart. Ensure profiles are compatible and ordered."));
|
|
1025
1025
|
}
|
|
1026
1026
|
}
|
|
1027
1027
|
//#endregion
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CBc5OTQ4.cjs");
|
|
2
2
|
const require_errors = require("./errors-Bkxm3vs2.cjs");
|
|
3
3
|
const require_vecOps = require("./vecOps-4iBMiet9.cjs");
|
|
4
4
|
const require_types = require("./types-BD-VVaWB.cjs");
|
|
5
5
|
const require_planeOps = require("./planeOps-CXJOsSMJ.cjs");
|
|
6
|
-
const require_faceFns = require("./faceFns-
|
|
7
|
-
const require_curveFns = require("./curveFns-
|
|
8
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
9
|
-
const require_helpers = require("./helpers-
|
|
10
|
-
const require_Blueprint = require("./Blueprint-
|
|
11
|
-
const require_extrudeFns = require("./extrudeFns-
|
|
6
|
+
const require_faceFns = require("./faceFns-wT8HTsiI.cjs");
|
|
7
|
+
const require_curveFns = require("./curveFns-B40hdZon.cjs");
|
|
8
|
+
const require_surfaceBuilders = require("./surfaceBuilders-B1CDCs7m.cjs");
|
|
9
|
+
const require_helpers = require("./helpers-WmqZmmA1.cjs");
|
|
10
|
+
const require_Blueprint = require("./Blueprint-D1qS-Zyd.cjs");
|
|
11
|
+
const require_extrudeFns = require("./extrudeFns-B4Fwc4sm.cjs");
|
|
12
12
|
//#region src/2d/lib/intersections.ts
|
|
13
13
|
/**
|
|
14
14
|
* Compute intersection points and common segments between two 2D curves.
|
|
@@ -1021,7 +1021,7 @@ function loft(wires, { ruled = true, startPoint, endPoint, tolerance = 1e-6 } =
|
|
|
1021
1021
|
if (!require_shapeTypes.isShape3D(result)) return require_errors.err(require_errors.typeCastError("LOFT_NOT_3D", "Loft did not produce a 3D shape"));
|
|
1022
1022
|
return require_errors.ok(result);
|
|
1023
1023
|
} catch {
|
|
1024
|
-
return require_errors.err(require_errors.kernelError("LOFT_FAILED", "Loft operation failed"));
|
|
1024
|
+
return require_errors.err(require_errors.kernelError("LOFT_FAILED", "Loft operation failed", void 0, void 0, "Common causes: wire profiles with different edge counts, self-intersecting result, or profiles too far apart. Ensure profiles are compatible and ordered."));
|
|
1025
1025
|
}
|
|
1026
1026
|
}
|
|
1027
1027
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CBc5OTQ4.cjs");
|
|
2
2
|
const require_errors = require("./errors-Bkxm3vs2.cjs");
|
|
3
3
|
const require_vecOps = require("./vecOps-4iBMiet9.cjs");
|
|
4
4
|
const require_planeOps = require("./planeOps-CXJOsSMJ.cjs");
|
|
5
|
-
const require_shapeFns = require("./shapeFns-
|
|
6
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
5
|
+
const require_shapeFns = require("./shapeFns-DFkO3e8a.cjs");
|
|
6
|
+
const require_surfaceBuilders = require("./surfaceBuilders-B1CDCs7m.cjs");
|
|
7
7
|
//#region src/topology/booleanFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Boolean and compound operations — functional replacements for _3DShape boolean methods.
|
|
@@ -13,7 +13,7 @@ function validateShape3D(shape, label) {
|
|
|
13
13
|
if (require_shapeTypes.getKernel().isNull(shape.wrapped)) return require_errors.err(require_errors.validationError(require_errors.BrepErrorCode.NULL_SHAPE_INPUT, `${label} is a null shape`));
|
|
14
14
|
return require_errors.ok(void 0);
|
|
15
15
|
}
|
|
16
|
-
function castToShape3D(shape, errorCode, errorMsg) {
|
|
16
|
+
function castToShape3D(shape, errorCode, errorMsg, suggestion) {
|
|
17
17
|
const wrapped = require_shapeTypes.castShape(shape);
|
|
18
18
|
if (!require_shapeTypes.isShape3D(wrapped)) {
|
|
19
19
|
const shapeType = shape.ShapeType();
|
|
@@ -29,7 +29,7 @@ function castToShape3D(shape, errorCode, errorMsg) {
|
|
|
29
29
|
"SHAPE"
|
|
30
30
|
][shapeType] ?? `UNKNOWN(${shapeType})`;
|
|
31
31
|
wrapped[Symbol.dispose]();
|
|
32
|
-
return require_errors.err(require_errors.typeCastError(errorCode, `${errorMsg}. Got ${typeName} instead
|
|
32
|
+
return require_errors.err(require_errors.typeCastError(errorCode, `${errorMsg}. Got ${typeName} instead.`, void 0, void 0, suggestion));
|
|
33
33
|
}
|
|
34
34
|
return require_errors.ok(wrapped);
|
|
35
35
|
}
|
|
@@ -59,7 +59,7 @@ function fuse(a, b, { optimisation = "none", simplify = false, signal, fuzzyValu
|
|
|
59
59
|
simplify,
|
|
60
60
|
fuzzyValue
|
|
61
61
|
});
|
|
62
|
-
const fuseResult = castToShape3D(resultShape, "FUSE_NOT_3D", "Fuse did not produce a 3D shape");
|
|
62
|
+
const fuseResult = castToShape3D(resultShape, "FUSE_NOT_3D", "Fuse did not produce a 3D shape", "Common causes: overlapping coplanar faces, zero-thickness geometry, or non-manifold input. Try autoHeal() on inputs first.");
|
|
63
63
|
if (fuseResult.ok) require_shapeFns.propagateAllMetadata(evolution, [a, b], fuseResult.value);
|
|
64
64
|
return fuseResult;
|
|
65
65
|
}
|
|
@@ -88,7 +88,7 @@ function cut(base, tool, { optimisation = "none", simplify = false, signal, fuzz
|
|
|
88
88
|
simplify,
|
|
89
89
|
fuzzyValue
|
|
90
90
|
});
|
|
91
|
-
const cutResult = castToShape3D(resultShape, "CUT_NOT_3D", "Cut did not produce a 3D shape");
|
|
91
|
+
const cutResult = castToShape3D(resultShape, "CUT_NOT_3D", "Cut did not produce a 3D shape", "Common causes: tool does not fully intersect the base, or produces a zero-thickness sliver. Ensure the tool extends through the shape.");
|
|
92
92
|
if (cutResult.ok) require_shapeFns.propagateAllMetadata(evolution, [base, tool], cutResult.value);
|
|
93
93
|
return cutResult;
|
|
94
94
|
}
|
|
@@ -111,7 +111,7 @@ function intersect(a, b, { simplify = false, signal, fuzzyValue } = {}) {
|
|
|
111
111
|
simplify,
|
|
112
112
|
fuzzyValue
|
|
113
113
|
});
|
|
114
|
-
const intResult = castToShape3D(resultShape, "INTERSECT_NOT_3D", "Intersect did not produce a 3D shape");
|
|
114
|
+
const intResult = castToShape3D(resultShape, "INTERSECT_NOT_3D", "Intersect did not produce a 3D shape", "Shapes may not overlap. Verify they share a common volume before intersecting.");
|
|
115
115
|
if (intResult.ok) require_shapeFns.propagateAllMetadata(evolution, [a, b], intResult.value);
|
|
116
116
|
return intResult;
|
|
117
117
|
}
|
|
@@ -253,7 +253,7 @@ function section(shape, plane, { approximation = true, planeSize = 1e4 } = {}) {
|
|
|
253
253
|
return require_errors.err(require_errors.kernelError("SECTION_FAILED", `Section with ${planeName} plane failed: ${raw}`, e, {
|
|
254
254
|
operation: "section",
|
|
255
255
|
plane: planeName
|
|
256
|
-
}));
|
|
256
|
+
}, "The cutting plane may not intersect the shape. Verify plane position relative to shape bounds."));
|
|
257
257
|
} finally {
|
|
258
258
|
sectionFace.delete();
|
|
259
259
|
}
|
|
@@ -269,7 +269,7 @@ function sectionToFace(shape, plane, options = {}) {
|
|
|
269
269
|
const wires = require_shapeFns.getWires(sectionResult.value);
|
|
270
270
|
if (wires.length === 0) {
|
|
271
271
|
const edges = require_shapeFns.getEdges(sectionResult.value);
|
|
272
|
-
if (edges.length === 0) return require_errors.err(require_errors.kernelError("SECTION_FAILED", "sectionToFace: section produced no geometry"));
|
|
272
|
+
if (edges.length === 0) return require_errors.err(require_errors.kernelError("SECTION_FAILED", "sectionToFace: section produced no geometry", void 0, void 0, "The cutting plane may not intersect the shape. Verify plane position relative to shape bounds."));
|
|
273
273
|
const kernel = require_shapeTypes.getKernel();
|
|
274
274
|
const vertexToEdges = /* @__PURE__ */ new Map();
|
|
275
275
|
const edgeVertexHashes = /* @__PURE__ */ new Map();
|
|
@@ -319,7 +319,7 @@ function sectionToFace(shape, plane, options = {}) {
|
|
|
319
319
|
} catch {}
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
|
-
if (wires.length === 0) return require_errors.err(require_errors.kernelError("SECTION_FAILED", "sectionToFace: section produced no usable geometry"));
|
|
322
|
+
if (wires.length === 0) return require_errors.err(require_errors.kernelError("SECTION_FAILED", "sectionToFace: section produced no usable geometry", void 0, void 0, "The cutting plane may not intersect the shape. Verify plane position relative to shape bounds."));
|
|
323
323
|
let outerIdx = 0;
|
|
324
324
|
let maxDiag = -1;
|
|
325
325
|
for (let i = 0; i < wires.length; i++) {
|
|
@@ -354,7 +354,7 @@ function split(shape, tools) {
|
|
|
354
354
|
return require_errors.err(require_errors.kernelError("SPLIT_FAILED", `Split operation failed on ${tools.length} tool(s): ${raw}`, e, {
|
|
355
355
|
operation: "split",
|
|
356
356
|
toolCount: tools.length
|
|
357
|
-
}));
|
|
357
|
+
}, "The splitting tools may not intersect the shape. Ensure tools cross through the shape's interior."));
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
360
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { W as getKernel, m as isShape3D, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { W as getKernel, m as isShape3D, t as castShape } from "./shapeTypes-BmN9vAte.js";
|
|
2
2
|
import { C as isErr, d as validationError, i as kernelError, k as ok, l as typeCastError, t as BrepErrorCode, y as err } from "./errors-B2qrBS1S.js";
|
|
3
3
|
import { h as vecScale, t as vecAdd, v as HASH_CODE_MAX } from "./vecOps-B9-MTeC8.js";
|
|
4
4
|
import { o as resolvePlane } from "./planeOps-PYHm_Q9z.js";
|
|
5
|
-
import { F as getWires, M as getEdges, P as getVertices, _ as propagateAllMetadata, g as collectInputFaceHashes, v as propagateMetadataByHash } from "./shapeFns-
|
|
6
|
-
import { r as makeFace } from "./surfaceBuilders-
|
|
5
|
+
import { F as getWires, M as getEdges, P as getVertices, _ as propagateAllMetadata, g as collectInputFaceHashes, v as propagateMetadataByHash } from "./shapeFns-CO_837FR.js";
|
|
6
|
+
import { r as makeFace } from "./surfaceBuilders-Ccaf33Q_.js";
|
|
7
7
|
//#region src/topology/booleanFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Boolean and compound operations — functional replacements for _3DShape boolean methods.
|
|
@@ -13,7 +13,7 @@ function validateShape3D(shape, label) {
|
|
|
13
13
|
if (getKernel().isNull(shape.wrapped)) return err(validationError(BrepErrorCode.NULL_SHAPE_INPUT, `${label} is a null shape`));
|
|
14
14
|
return ok(void 0);
|
|
15
15
|
}
|
|
16
|
-
function castToShape3D(shape, errorCode, errorMsg) {
|
|
16
|
+
function castToShape3D(shape, errorCode, errorMsg, suggestion) {
|
|
17
17
|
const wrapped = castShape(shape);
|
|
18
18
|
if (!isShape3D(wrapped)) {
|
|
19
19
|
const shapeType = shape.ShapeType();
|
|
@@ -29,7 +29,7 @@ function castToShape3D(shape, errorCode, errorMsg) {
|
|
|
29
29
|
"SHAPE"
|
|
30
30
|
][shapeType] ?? `UNKNOWN(${shapeType})`;
|
|
31
31
|
wrapped[Symbol.dispose]();
|
|
32
|
-
return err(typeCastError(errorCode, `${errorMsg}. Got ${typeName} instead
|
|
32
|
+
return err(typeCastError(errorCode, `${errorMsg}. Got ${typeName} instead.`, void 0, void 0, suggestion));
|
|
33
33
|
}
|
|
34
34
|
return ok(wrapped);
|
|
35
35
|
}
|
|
@@ -59,7 +59,7 @@ function fuse(a, b, { optimisation = "none", simplify = false, signal, fuzzyValu
|
|
|
59
59
|
simplify,
|
|
60
60
|
fuzzyValue
|
|
61
61
|
});
|
|
62
|
-
const fuseResult = castToShape3D(resultShape, "FUSE_NOT_3D", "Fuse did not produce a 3D shape");
|
|
62
|
+
const fuseResult = castToShape3D(resultShape, "FUSE_NOT_3D", "Fuse did not produce a 3D shape", "Common causes: overlapping coplanar faces, zero-thickness geometry, or non-manifold input. Try autoHeal() on inputs first.");
|
|
63
63
|
if (fuseResult.ok) propagateAllMetadata(evolution, [a, b], fuseResult.value);
|
|
64
64
|
return fuseResult;
|
|
65
65
|
}
|
|
@@ -88,7 +88,7 @@ function cut(base, tool, { optimisation = "none", simplify = false, signal, fuzz
|
|
|
88
88
|
simplify,
|
|
89
89
|
fuzzyValue
|
|
90
90
|
});
|
|
91
|
-
const cutResult = castToShape3D(resultShape, "CUT_NOT_3D", "Cut did not produce a 3D shape");
|
|
91
|
+
const cutResult = castToShape3D(resultShape, "CUT_NOT_3D", "Cut did not produce a 3D shape", "Common causes: tool does not fully intersect the base, or produces a zero-thickness sliver. Ensure the tool extends through the shape.");
|
|
92
92
|
if (cutResult.ok) propagateAllMetadata(evolution, [base, tool], cutResult.value);
|
|
93
93
|
return cutResult;
|
|
94
94
|
}
|
|
@@ -111,7 +111,7 @@ function intersect(a, b, { simplify = false, signal, fuzzyValue } = {}) {
|
|
|
111
111
|
simplify,
|
|
112
112
|
fuzzyValue
|
|
113
113
|
});
|
|
114
|
-
const intResult = castToShape3D(resultShape, "INTERSECT_NOT_3D", "Intersect did not produce a 3D shape");
|
|
114
|
+
const intResult = castToShape3D(resultShape, "INTERSECT_NOT_3D", "Intersect did not produce a 3D shape", "Shapes may not overlap. Verify they share a common volume before intersecting.");
|
|
115
115
|
if (intResult.ok) propagateAllMetadata(evolution, [a, b], intResult.value);
|
|
116
116
|
return intResult;
|
|
117
117
|
}
|
|
@@ -253,7 +253,7 @@ function section(shape, plane, { approximation = true, planeSize = 1e4 } = {}) {
|
|
|
253
253
|
return err(kernelError("SECTION_FAILED", `Section with ${planeName} plane failed: ${raw}`, e, {
|
|
254
254
|
operation: "section",
|
|
255
255
|
plane: planeName
|
|
256
|
-
}));
|
|
256
|
+
}, "The cutting plane may not intersect the shape. Verify plane position relative to shape bounds."));
|
|
257
257
|
} finally {
|
|
258
258
|
sectionFace.delete();
|
|
259
259
|
}
|
|
@@ -269,7 +269,7 @@ function sectionToFace(shape, plane, options = {}) {
|
|
|
269
269
|
const wires = getWires(sectionResult.value);
|
|
270
270
|
if (wires.length === 0) {
|
|
271
271
|
const edges = getEdges(sectionResult.value);
|
|
272
|
-
if (edges.length === 0) return err(kernelError("SECTION_FAILED", "sectionToFace: section produced no geometry"));
|
|
272
|
+
if (edges.length === 0) return err(kernelError("SECTION_FAILED", "sectionToFace: section produced no geometry", void 0, void 0, "The cutting plane may not intersect the shape. Verify plane position relative to shape bounds."));
|
|
273
273
|
const kernel = getKernel();
|
|
274
274
|
const vertexToEdges = /* @__PURE__ */ new Map();
|
|
275
275
|
const edgeVertexHashes = /* @__PURE__ */ new Map();
|
|
@@ -319,7 +319,7 @@ function sectionToFace(shape, plane, options = {}) {
|
|
|
319
319
|
} catch {}
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
|
-
if (wires.length === 0) return err(kernelError("SECTION_FAILED", "sectionToFace: section produced no usable geometry"));
|
|
322
|
+
if (wires.length === 0) return err(kernelError("SECTION_FAILED", "sectionToFace: section produced no usable geometry", void 0, void 0, "The cutting plane may not intersect the shape. Verify plane position relative to shape bounds."));
|
|
323
323
|
let outerIdx = 0;
|
|
324
324
|
let maxDiag = -1;
|
|
325
325
|
for (let i = 0; i < wires.length; i++) {
|
|
@@ -354,7 +354,7 @@ function split(shape, tools) {
|
|
|
354
354
|
return err(kernelError("SPLIT_FAILED", `Split operation failed on ${tools.length} tool(s): ${raw}`, e, {
|
|
355
355
|
operation: "split",
|
|
356
356
|
toolCount: tools.length
|
|
357
|
-
}));
|
|
357
|
+
}, "The splitting tools may not intersect the shape. Ensure tools cross through the shape's interior."));
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
360
|
/**
|
package/dist/brepjs.cjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_drawFns = require("./drawFns-
|
|
3
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
+
const require_drawFns = require("./drawFns-BB2_R1zc.cjs");
|
|
3
|
+
const require_shapeTypes = require("./shapeTypes-CBc5OTQ4.cjs");
|
|
4
4
|
const require_errors = require("./errors-Bkxm3vs2.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-4iBMiet9.cjs");
|
|
6
6
|
const require_types = require("./types-BD-VVaWB.cjs");
|
|
7
7
|
const require_planeOps = require("./planeOps-CXJOsSMJ.cjs");
|
|
8
|
-
const require_faceFns = require("./faceFns-
|
|
9
|
-
const require_shapeFns = require("./shapeFns-
|
|
10
|
-
const require_curveFns = require("./curveFns-
|
|
11
|
-
const require_meshFns = require("./meshFns-
|
|
12
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
13
|
-
const require_booleanFns = require("./booleanFns-
|
|
14
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
15
|
-
const require_historyFns = require("./historyFns-
|
|
16
|
-
const require_helpers = require("./helpers-
|
|
17
|
-
const require_Blueprint = require("./Blueprint-
|
|
18
|
-
const require_boolean2D = require("./boolean2D-
|
|
19
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
20
|
-
const require_measureFns = require("./measureFns-
|
|
21
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
22
|
-
const require_extrudeFns = require("./extrudeFns-
|
|
23
|
-
const require_blueprintFns = require("./blueprintFns
|
|
24
|
-
const require_importFns = require("./importFns-
|
|
8
|
+
const require_faceFns = require("./faceFns-wT8HTsiI.cjs");
|
|
9
|
+
const require_shapeFns = require("./shapeFns-DFkO3e8a.cjs");
|
|
10
|
+
const require_curveFns = require("./curveFns-B40hdZon.cjs");
|
|
11
|
+
const require_meshFns = require("./meshFns-BU2utE_P.cjs");
|
|
12
|
+
const require_surfaceBuilders = require("./surfaceBuilders-B1CDCs7m.cjs");
|
|
13
|
+
const require_booleanFns = require("./booleanFns-DX08b6Hh.cjs");
|
|
14
|
+
const require_primitiveFns = require("./primitiveFns-DsVrQcFZ.cjs");
|
|
15
|
+
const require_historyFns = require("./historyFns-B_76a2HE.cjs");
|
|
16
|
+
const require_helpers = require("./helpers-WmqZmmA1.cjs");
|
|
17
|
+
const require_Blueprint = require("./Blueprint-D1qS-Zyd.cjs");
|
|
18
|
+
const require_boolean2D = require("./boolean2D-CaZrebEm.cjs");
|
|
19
|
+
const require_solidBuilders = require("./solidBuilders-B73M8VgU.cjs");
|
|
20
|
+
const require_measureFns = require("./measureFns-BPbSMRrS.cjs");
|
|
21
|
+
const require_cornerFinder = require("./cornerFinder-D3a4o3vN.cjs");
|
|
22
|
+
const require_extrudeFns = require("./extrudeFns-B4Fwc4sm.cjs");
|
|
23
|
+
const require_blueprintFns = require("./blueprintFns--fsdFjx9.cjs");
|
|
24
|
+
const require_importFns = require("./importFns-BRH3Fz3H.cjs");
|
|
25
25
|
const require_workerHandler = require("./workerHandler-D9sQ2f5u.cjs");
|
|
26
26
|
//#region src/core/kernelCall.ts
|
|
27
27
|
var errorFactories = {
|
|
@@ -3079,6 +3079,7 @@ exports.importSTL = require_importFns.importSTL;
|
|
|
3079
3079
|
exports.importSVG = require_importFns.importSVG;
|
|
3080
3080
|
exports.importSVGPathD = require_importFns.importSVGPathD;
|
|
3081
3081
|
exports.importThreeMF = importThreeMF;
|
|
3082
|
+
exports.init = require_shapeTypes.init;
|
|
3082
3083
|
exports.initFromOC = require_shapeTypes.initFromOC;
|
|
3083
3084
|
exports.innerWires = require_faceFns.innerWires;
|
|
3084
3085
|
exports.interpolateCurve = require_curveFns.interpolateCurve;
|