brepjs 18.17.0 → 18.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/README.md +24 -14
  2. package/dist/2d.cjs +7 -7
  3. package/dist/2d.js +7 -7
  4. package/dist/{blueprint-Dn16jzZs.cjs → blueprint-Bl0YQjkk.cjs} +7 -7
  5. package/dist/{blueprint-C-ngUkOG.js → blueprint-Cy5veXS3.js} +7 -7
  6. package/dist/{blueprintFns-B7OF-Tv3.js → blueprintFns-CSB51aXT.js} +3 -3
  7. package/dist/{blueprintFns-j2YskNJl.cjs → blueprintFns-Dkccxo6d.cjs} +3 -3
  8. package/dist/{blueprintSketcher-D2awQyoi.cjs → blueprintSketcher-Cr9A-R8I.cjs} +4 -4
  9. package/dist/{blueprintSketcher-DlJ7yDBD.js → blueprintSketcher-DeEogKbs.js} +4 -4
  10. package/dist/{boolean2D-BlazC0Yu.cjs → boolean2D-BZ1UjpjX.cjs} +5 -5
  11. package/dist/{boolean2D-C3x4nSLt.js → boolean2D-lE2uy4Mm.js} +5 -5
  12. package/dist/{booleanFns-COUVhZlF.cjs → booleanFns-CD25YZGm.cjs} +6 -6
  13. package/dist/{booleanFns-CwskNGMz.js → booleanFns-CtvYfQZq.js} +6 -6
  14. package/dist/brepjs.cjs +1721 -34
  15. package/dist/brepjs.js +1735 -54
  16. package/dist/{cameraFns-leKP1O1t.cjs → cameraFns-CR2inEBU.cjs} +3 -3
  17. package/dist/{cameraFns-Bix9SLAm.js → cameraFns-Dg1lQP0S.js} +3 -3
  18. package/dist/core/errors.d.ts +1 -0
  19. package/dist/core.cjs +3 -3
  20. package/dist/core.js +3 -3
  21. package/dist/{cornerFinder-Cm58LsyX.cjs → cornerFinder-CXN1IxPg.cjs} +1 -1
  22. package/dist/{cornerFinder-GBVBku2c.js → cornerFinder-tfWhcA2M.js} +1 -1
  23. package/dist/csg/builders.d.ts +36 -0
  24. package/dist/csg/edit.d.ts +5 -0
  25. package/dist/csg/evaluate.d.ts +52 -0
  26. package/dist/csg/evaluators/booleans.d.ts +11 -0
  27. package/dist/csg/evaluators/compound.d.ts +8 -0
  28. package/dist/csg/evaluators/context.d.ts +9 -0
  29. package/dist/csg/evaluators/primitives.d.ts +15 -0
  30. package/dist/csg/evaluators/transforms.d.ts +10 -0
  31. package/dist/csg/expressions.d.ts +72 -0
  32. package/dist/csg/hash.d.ts +9 -0
  33. package/dist/csg/index.d.ts +15 -0
  34. package/dist/csg/optimize.d.ts +4 -0
  35. package/dist/csg/serialize.d.ts +9 -0
  36. package/dist/csg/types.d.ts +128 -0
  37. package/dist/{curveFns-DVHUVmuO.js → curveFns-BEF8t7XY.js} +2 -2
  38. package/dist/{curveFns-Ds0e7i2y.cjs → curveFns-CcheHkr4.cjs} +2 -2
  39. package/dist/{drawFns-CaWzI_lX.js → drawFns-CEjshioX.js} +14 -14
  40. package/dist/{drawFns-BvqZW_fK.cjs → drawFns-CuzUHFyD.cjs} +14 -14
  41. package/dist/{errors-0fYW_YnO.js → errors-8GZS3vy9.js} +1 -0
  42. package/dist/{errors-Dv6pfNct.cjs → errors-BiY8-q1s.cjs} +1 -0
  43. package/dist/{extrudeFns-BZAIPeYY.cjs → extrudeFns-BwU4ng1V.cjs} +2 -2
  44. package/dist/{extrudeFns-vl1_n-yk.js → extrudeFns-gcWJSK9T.js} +2 -2
  45. package/dist/{faceFns-m0GePUMn.js → faceFns-BNhFoEII.js} +3 -3
  46. package/dist/{faceFns-CbpUuSSF.cjs → faceFns-BbESdudy.cjs} +3 -3
  47. package/dist/{helpers-CrH0p3GU.cjs → helpers-BU3ANziG.cjs} +7 -7
  48. package/dist/{helpers-C7wU_L9l.js → helpers-D1J5VHbk.js} +7 -7
  49. package/dist/{historyFns-CdhKQcbS.cjs → historyFns-DHOoBh6G.cjs} +5 -5
  50. package/dist/{historyFns-Cs19Tmq_.js → historyFns-XZp1D_aA.js} +5 -5
  51. package/dist/{importFns-FvsXxxRS.cjs → importFns-CsRJ9lbm.cjs} +3 -3
  52. package/dist/{importFns-B1IIPON9.js → importFns-D1oB3yU8.js} +3 -3
  53. package/dist/index.d.ts +1 -0
  54. package/dist/io.cjs +2 -2
  55. package/dist/io.js +2 -2
  56. package/dist/kernel/brepkit/brepkitWasmTypes.d.ts +10 -7
  57. package/dist/kernel/index.d.ts +6 -0
  58. package/dist/{measureFns-DuXAfU3o.cjs → measureFns-BkoPw5JT.cjs} +4 -4
  59. package/dist/{measureFns-HKGnPqSW.js → measureFns-C3y_WX_E.js} +4 -4
  60. package/dist/measurement.cjs +1 -1
  61. package/dist/measurement.js +1 -1
  62. package/dist/{meshFns-Dr3EAM7B.cjs → meshFns-CFMr9FBb.cjs} +3 -3
  63. package/dist/{meshFns-BtZ68glt.js → meshFns-k0BdoBGR.js} +3 -3
  64. package/dist/ns/csg.d.ts +4 -0
  65. package/dist/operations.cjs +2 -2
  66. package/dist/operations.js +2 -2
  67. package/dist/{planeOps-CH4ruLuj.cjs → planeOps-2EyPq0tU.cjs} +1 -1
  68. package/dist/{planeOps-4i2qEraD.js → planeOps-Bea3T3mc.js} +1 -1
  69. package/dist/{primitiveFns-DVxhf1Oj.js → primitiveFns-DF5IAVNP.js} +7 -7
  70. package/dist/{primitiveFns-CvE88XaR.cjs → primitiveFns-YpYBx4Pd.cjs} +7 -7
  71. package/dist/projection.cjs +1 -1
  72. package/dist/projection.js +1 -1
  73. package/dist/query.cjs +2 -2
  74. package/dist/query.js +2 -2
  75. package/dist/result.cjs +1 -1
  76. package/dist/result.js +1 -1
  77. package/dist/{shapeFns-D1gHNJJY.cjs → shapeFns-CHTLdb_n.cjs} +3 -3
  78. package/dist/{shapeFns-CkkChODq.js → shapeFns-x8vqq2fR.js} +3 -3
  79. package/dist/shapeRef.cjs +1 -1
  80. package/dist/shapeRef.js +1 -1
  81. package/dist/{shapeRefFns-BkVipOTE.cjs → shapeRefFns-CDRLEUik.cjs} +4 -4
  82. package/dist/{shapeRefFns-TUtuCJ85.js → shapeRefFns-CE0yS0EB.js} +4 -4
  83. package/dist/{shapeTypes-xj3nxBTM.cjs → shapeTypes-BpKhed-9.cjs} +19 -2
  84. package/dist/{shapeTypes-B_s2jyQ2.js → shapeTypes-DGtDTS9s.js} +14 -3
  85. package/dist/sketching.cjs +3 -3
  86. package/dist/sketching.js +3 -3
  87. package/dist/{solidBuilders-lBO5Fk9Z.cjs → solidBuilders-BlBaFSCS.cjs} +3 -3
  88. package/dist/{solidBuilders-DLJlAEi9.js → solidBuilders-Cot05qzs.js} +3 -3
  89. package/dist/{surfaceBuilders-BkgewbNs.cjs → surfaceBuilders-frj7YRrD.cjs} +3 -3
  90. package/dist/{surfaceBuilders-DRxCelXR.js → surfaceBuilders-zJyikeav.js} +3 -3
  91. package/dist/text.cjs +2 -2
  92. package/dist/text.js +2 -2
  93. package/dist/{textBlueprints-D5zPssgR.js → textBlueprints-Bv6zhEyn.js} +9 -9
  94. package/dist/{textBlueprints-Dy4xulfR.cjs → textBlueprints-CHh9SChA.cjs} +9 -9
  95. package/dist/{textMetrics-DcIcFPtV.cjs → textMetrics-CKNdQX02.cjs} +2 -2
  96. package/dist/{textMetrics-Dkitx1CA.js → textMetrics-vUJTTEFi.js} +2 -2
  97. package/dist/topology.cjs +7 -7
  98. package/dist/topology.js +7 -7
  99. package/dist/{topologyQueryFns-D0v-c2Xk.cjs → topologyQueryFns-CHsPXNbI.cjs} +2 -2
  100. package/dist/{topologyQueryFns-BcYn7Adz.js → topologyQueryFns-CcWaCxeb.js} +2 -2
  101. package/dist/vectors.cjs +1 -1
  102. package/dist/vectors.js +1 -1
  103. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
- const require_shapeTypes = require("./shapeTypes-xj3nxBTM.cjs");
2
- const require_errors = require("./errors-Dv6pfNct.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-D0v-c2Xk.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BpKhed-9.cjs");
2
+ const require_errors = require("./errors-BiY8-q1s.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-CHsPXNbI.cjs");
4
4
  const require_vecOps = require("./vecOps-D7xplSx8.cjs");
5
5
  //#region src/projection/projectionPlanes.ts
6
6
  /** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
@@ -1,6 +1,6 @@
1
- import { X as getKernel, t as castShape } from "./shapeTypes-B_s2jyQ2.js";
2
- import { A as ok, b as err, d as validationError } from "./errors-0fYW_YnO.js";
3
- import { o as getEdges } from "./topologyQueryFns-BcYn7Adz.js";
1
+ import { Z as getKernel, t as castShape } from "./shapeTypes-DGtDTS9s.js";
2
+ import { A as ok, b as err, d as validationError } from "./errors-8GZS3vy9.js";
3
+ import { o as getEdges } from "./topologyQueryFns-CcWaCxeb.js";
4
4
  import { c as vecLength, d as vecNormalize, g as vecSub, r as vecCross } from "./vecOps-DVROrqTV.js";
5
5
  //#region src/projection/projectionPlanes.ts
6
6
  /** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
@@ -58,6 +58,7 @@ export declare const BrepErrorCode: {
58
58
  readonly CHAMFER_NOT_3D: "CHAMFER_NOT_3D";
59
59
  readonly CHAMFER_ANGLE_NOT_3D: "CHAMFER_ANGLE_NOT_3D";
60
60
  readonly CHAMFER_ANGLE_FAILED: "CHAMFER_ANGLE_FAILED";
61
+ readonly CSG_NOT_3D: "CSG_NOT_3D";
61
62
  readonly SHELL_NOT_3D: "SHELL_NOT_3D";
62
63
  readonly OFFSET_NOT_3D: "OFFSET_NOT_3D";
63
64
  readonly NULL_SHAPE: "NULL_SHAPE";
package/dist/core.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_shapeTypes = require("./shapeTypes-xj3nxBTM.cjs");
3
- const require_errors = require("./errors-Dv6pfNct.cjs");
2
+ const require_shapeTypes = require("./shapeTypes-BpKhed-9.cjs");
3
+ const require_errors = require("./errors-BiY8-q1s.cjs");
4
4
  const require_constants = require("./constants-DTorLmes.cjs");
5
5
  const require_types = require("./types-CDkxah-M.cjs");
6
6
  const require_vecOps = require("./vecOps-D7xplSx8.cjs");
7
- const require_planeOps = require("./planeOps-CH4ruLuj.cjs");
7
+ const require_planeOps = require("./planeOps-2EyPq0tU.cjs");
8
8
  exports.BrepBugError = require_errors.BrepBugError;
9
9
  exports.DEG2RAD = require_constants.DEG2RAD;
10
10
  exports.DisposalScope = require_shapeTypes.DisposalScope;
package/dist/core.js CHANGED
@@ -1,7 +1,7 @@
1
- import { B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, R as DisposalScope, S as isManifoldShell, _ as isSolid, b as closedWire, d as isCompound, f as isEdge, g as isShell, h as isShape3D, j as validSolid, m as isShape1D, p as isFace, q as withScopeResult, t as castShape, v as isVertex, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-B_s2jyQ2.js";
2
- import { A as ok, B as unwrapOr, E as map, I as tryCatch, L as tryCatchAsync, O as mapErr, R as unwrap, T as isOk, V as unwrapOrElse, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, u as unsupportedError, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-0fYW_YnO.js";
1
+ import { B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, R as DisposalScope, S as isManifoldShell, _ as isSolid, b as closedWire, d as isCompound, f as isEdge, g as isShell, h as isShape3D, j as validSolid, m as isShape1D, p as isFace, q as withScopeResult, t as castShape, v as isVertex, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-DGtDTS9s.js";
2
+ import { A as ok, B as unwrapOr, E as map, I as tryCatch, L as tryCatchAsync, O as mapErr, R as unwrap, T as isOk, V as unwrapOrElse, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, u as unsupportedError, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-8GZS3vy9.js";
3
3
  import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-Ci5CA3aZ.js";
4
4
  import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-BIdk_GJY.js";
5
5
  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-DVROrqTV.js";
6
- import { i as pivotPlane, n as createPlane, o as resolvePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-4i2qEraD.js";
6
+ import { i as pivotPlane, n as createPlane, o as resolvePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-Bea3T3mc.js";
7
7
  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-DTorLmes.cjs");
2
2
  const require_arrayAccess = require("./arrayAccess-7pTWqkJu.cjs");
3
- const require_helpers = require("./helpers-CrH0p3GU.cjs");
3
+ const require_helpers = require("./helpers-BU3ANziG.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-Ci5CA3aZ.js";
2
2
  import { n as getAtOrThrow } from "./arrayAccess-C5IWcxs9.js";
3
- import { _ as samePoint, p as distance2d, u as angle2d } from "./helpers-C7wU_L9l.js";
3
+ import { _ as samePoint, p as distance2d, u as angle2d } from "./helpers-D1J5VHbk.js";
4
4
  //#region src/query/cornerFinder.ts
5
5
  var PI_2 = 2 * Math.PI;
6
6
  function positiveHalfAngle(angle) {
@@ -0,0 +1,36 @@
1
+ import { ScalarInput, Vec3Input } from './expressions.js';
2
+ import { BoxNode, SphereNode, CylinderNode, ConeNode, TorusNode, PolygonNode, CircleNode, LineNode, VertexLitNode, EmptyNode, FuseNode, CutNode, IntersectNode, FuseAllNode, CutAllNode, TranslateNode, RotateNode, ScaleNode, MirrorNode, CompoundNode, IRNode, SolidNode, FaceNode, EdgeNode, VertexNode } from './types.js';
3
+ export declare function box(x: ScalarInput, y: ScalarInput, z: ScalarInput): BoxNode;
4
+ export declare function sphere(radius: ScalarInput): SphereNode;
5
+ export declare function cylinder(radius: ScalarInput, height: ScalarInput): CylinderNode;
6
+ export declare function cone(radius1: ScalarInput, radius2: ScalarInput, height: ScalarInput): ConeNode;
7
+ export declare function torus(majorRadius: ScalarInput, minorRadius: ScalarInput): TorusNode;
8
+ export declare function polygon(points: ReadonlyArray<Vec3Input>): PolygonNode;
9
+ export declare function circle(radius: ScalarInput): CircleNode;
10
+ export declare function line(from: Vec3Input, to: Vec3Input): LineNode;
11
+ export declare function vertex(point: Vec3Input): VertexLitNode;
12
+ export declare function emptySolid(): EmptyNode;
13
+ export declare function emptyFace(): EmptyNode;
14
+ export declare function emptyWire(): EmptyNode;
15
+ export declare function fuse(a: SolidNode, b: SolidNode, tolerance?: number): FuseNode;
16
+ export declare function cut(a: SolidNode, b: SolidNode, tolerance?: number): CutNode;
17
+ export declare function intersect(a: SolidNode, b: SolidNode, tolerance?: number): IntersectNode;
18
+ export declare function fuseAll(shapes: ReadonlyArray<SolidNode>, tolerance?: number): FuseAllNode;
19
+ export declare function cutAll(base: SolidNode, tools: ReadonlyArray<SolidNode>, tolerance?: number): CutAllNode;
20
+ export declare function translate(target: IRNode, vector: Vec3Input): TranslateNode;
21
+ export interface RotateOptions {
22
+ readonly axis?: Vec3Input | undefined;
23
+ readonly at?: Vec3Input | undefined;
24
+ }
25
+ export declare function rotate(target: IRNode, angle: ScalarInput, options?: RotateOptions): RotateNode;
26
+ export interface ScaleOptions {
27
+ readonly center?: Vec3Input | undefined;
28
+ }
29
+ export declare function scale(target: IRNode, factor: ScalarInput, options?: ScaleOptions): ScaleNode;
30
+ export interface MirrorOptions {
31
+ readonly normal?: Vec3Input | undefined;
32
+ readonly at?: Vec3Input | undefined;
33
+ }
34
+ export declare function mirror(target: IRNode, options?: MirrorOptions): MirrorNode;
35
+ export declare function compound(children: ReadonlyArray<IRNode>): CompoundNode;
36
+ export type { FaceNode, EdgeNode, VertexNode, SolidNode };
@@ -0,0 +1,5 @@
1
+ import { IRNode } from './types.js';
2
+ export type NodePredicate = (node: IRNode) => boolean;
3
+ export declare function replaceNode(root: IRNode, pred: NodePredicate, replacement: IRNode): IRNode;
4
+ export declare function forEachNode(root: IRNode, fn: (node: IRNode) => void): void;
5
+ export declare function nodeCount(root: IRNode): number;
@@ -0,0 +1,52 @@
1
+ import { Result } from '../core/result.js';
2
+ import { AnyShape, Dimension } from '../core/shapeTypes.js';
3
+ import { Env } from './expressions.js';
4
+ import { IRNode } from './types.js';
5
+ export interface EvaluatorOptions {
6
+ /** Kernel id to materialize against. Defaults to the currently-active kernel. */
7
+ readonly kernel?: string | undefined;
8
+ /** Default boolean tolerance applied when a node doesn't override it. */
9
+ readonly tolerance?: number | undefined;
10
+ /** Optional callback fired after each node is materialized (cache hits not reported). */
11
+ readonly onStep?: ((info: StepInfo) => void) | undefined;
12
+ }
13
+ export interface StepInfo {
14
+ readonly node: IRNode;
15
+ readonly cacheKey: string;
16
+ readonly cacheHit: boolean;
17
+ }
18
+ export interface CacheStats {
19
+ readonly hits: number;
20
+ readonly misses: number;
21
+ readonly entries: number;
22
+ }
23
+ export declare class Evaluator implements Disposable {
24
+ private readonly scope;
25
+ private readonly cache;
26
+ private readonly registered;
27
+ private readonly kernelId;
28
+ private readonly defaultTolerance;
29
+ private readonly onStep?;
30
+ private hits;
31
+ private misses;
32
+ constructor(options?: EvaluatorOptions);
33
+ /**
34
+ * Materialize a CSG IR tree against the given parameter environment.
35
+ * The returned shape is borrowed — valid for as long as this Evaluator is
36
+ * not disposed. Callers must NOT call `.delete()` / `[Symbol.dispose]()`
37
+ * on the returned shape; that would invalidate the cache entry for every
38
+ * future call returning the same handle.
39
+ */
40
+ evaluate(node: IRNode, env?: Env): Result<AnyShape<Dimension>>;
41
+ private evaluateInner;
42
+ cacheStats(): CacheStats;
43
+ resetStats(): void;
44
+ [Symbol.dispose](): void;
45
+ }
46
+ /**
47
+ * Run a callback with a fresh Evaluator that is disposed when the callback
48
+ * returns. Sync-only: an async callback would resolve after disposal,
49
+ * leaving borrowed shapes pointing at freed WASM memory. Mirrors the
50
+ * Promise-guard pattern in `withKernel`.
51
+ */
52
+ export declare function withEvaluator<T extends Exclude<unknown, Promise<unknown>>>(options: EvaluatorOptions, fn: (evaluator: Evaluator) => T): T;
@@ -0,0 +1,11 @@
1
+ import { Result } from '../../core/result.js';
2
+ import { AnyShape, Dimension } from '../../core/shapeTypes.js';
3
+ import { FuseNode, CutNode, IntersectNode, FuseAllNode, CutAllNode } from '../types.js';
4
+ import { EvalContext } from './context.js';
5
+ type S = Result<AnyShape<Dimension>>;
6
+ export declare function evalFuse(node: FuseNode, ctx: EvalContext): S;
7
+ export declare function evalCut(node: CutNode, ctx: EvalContext): S;
8
+ export declare function evalIntersect(node: IntersectNode, ctx: EvalContext): S;
9
+ export declare function evalFuseAll(node: FuseAllNode, ctx: EvalContext): S;
10
+ export declare function evalCutAll(node: CutAllNode, ctx: EvalContext): S;
11
+ export {};
@@ -0,0 +1,8 @@
1
+ import { Result } from '../../core/result.js';
2
+ import { AnyShape, Dimension } from '../../core/shapeTypes.js';
3
+ import { CompoundNode } from '../types.js';
4
+ import { EvalContext } from './context.js';
5
+ type S = Result<AnyShape<Dimension>>;
6
+ export declare function evalCompound(node: CompoundNode, ctx: EvalContext): S;
7
+ export declare function evalEmpty(): S;
8
+ export {};
@@ -0,0 +1,9 @@
1
+ import { AnyShape, Dimension } from '../../core/shapeTypes.js';
2
+ import { Result } from '../../core/result.js';
3
+ import { Env } from '../expressions.js';
4
+ import { IRNode } from '../types.js';
5
+ export interface EvalContext {
6
+ readonly env: Env;
7
+ readonly tolerance: number | undefined;
8
+ readonly evalNode: (node: IRNode) => Result<AnyShape<Dimension>>;
9
+ }
@@ -0,0 +1,15 @@
1
+ import { Result } from '../../core/result.js';
2
+ import { AnyShape, Dimension } from '../../core/shapeTypes.js';
3
+ import { BoxNode, SphereNode, CylinderNode, ConeNode, TorusNode, PolygonNode, CircleNode, LineNode, VertexLitNode } from '../types.js';
4
+ import { EvalContext } from './context.js';
5
+ type S = Result<AnyShape<Dimension>>;
6
+ export declare function evalBox(node: BoxNode, ctx: EvalContext): S;
7
+ export declare function evalSphere(node: SphereNode, ctx: EvalContext): S;
8
+ export declare function evalCylinder(node: CylinderNode, ctx: EvalContext): S;
9
+ export declare function evalCone(node: ConeNode, ctx: EvalContext): S;
10
+ export declare function evalTorus(node: TorusNode, ctx: EvalContext): S;
11
+ export declare function evalPolygon(node: PolygonNode, ctx: EvalContext): S;
12
+ export declare function evalCircle(node: CircleNode, ctx: EvalContext): S;
13
+ export declare function evalLine(node: LineNode, ctx: EvalContext): S;
14
+ export declare function evalVertex(node: VertexLitNode, ctx: EvalContext): S;
15
+ export {};
@@ -0,0 +1,10 @@
1
+ import { Result } from '../../core/result.js';
2
+ import { AnyShape, Dimension } from '../../core/shapeTypes.js';
3
+ import { TranslateNode, RotateNode, ScaleNode, MirrorNode } from '../types.js';
4
+ import { EvalContext } from './context.js';
5
+ type S = Result<AnyShape<Dimension>>;
6
+ export declare function evalTranslate(node: TranslateNode, ctx: EvalContext): S;
7
+ export declare function evalRotate(node: RotateNode, ctx: EvalContext): S;
8
+ export declare function evalScale(node: ScaleNode, ctx: EvalContext): S;
9
+ export declare function evalMirror(node: MirrorNode, ctx: EvalContext): S;
10
+ export {};
@@ -0,0 +1,72 @@
1
+ import { Vec2, Vec3 } from '../core/types.js';
2
+ import { Result } from '../core/result.js';
3
+ export interface ExprBase {
4
+ readonly structuralHash: bigint;
5
+ readonly freeParams: ReadonlySet<string>;
6
+ }
7
+ export interface NumLitExpr extends ExprBase {
8
+ readonly kind: 'NumLit';
9
+ readonly value: number;
10
+ }
11
+ export interface Vec3LitExpr extends ExprBase {
12
+ readonly kind: 'Vec3Lit';
13
+ readonly value: Vec3;
14
+ }
15
+ export interface Vec2LitExpr extends ExprBase {
16
+ readonly kind: 'Vec2Lit';
17
+ readonly value: Vec2;
18
+ }
19
+ export interface ParamExpr extends ExprBase {
20
+ readonly kind: 'Param';
21
+ readonly name: string;
22
+ }
23
+ export type BinaryOp = '+' | '-' | '*' | '/';
24
+ export interface BinOpExpr extends ExprBase {
25
+ readonly kind: 'BinOp';
26
+ readonly op: BinaryOp;
27
+ readonly a: Expr;
28
+ readonly b: Expr;
29
+ }
30
+ export type UnaryOp = 'neg' | 'sin' | 'cos' | 'sqrt' | 'abs';
31
+ export interface UnaryOpExpr extends ExprBase {
32
+ readonly kind: 'UnaryOp';
33
+ readonly op: UnaryOp;
34
+ readonly arg: Expr;
35
+ }
36
+ export interface ComponentExpr extends ExprBase {
37
+ readonly kind: 'Component';
38
+ readonly vec: Expr;
39
+ readonly index: 0 | 1 | 2;
40
+ }
41
+ export interface BuildVecExpr extends ExprBase {
42
+ readonly kind: 'BuildVec';
43
+ readonly dim: 2 | 3;
44
+ readonly components: readonly Expr[];
45
+ }
46
+ export type Expr = NumLitExpr | Vec3LitExpr | Vec2LitExpr | ParamExpr | BinOpExpr | UnaryOpExpr | ComponentExpr | BuildVecExpr;
47
+ /** Value an expression can evaluate to. */
48
+ export type ExprValue = number | Vec2 | Vec3;
49
+ /** Parameter binding environment. */
50
+ export type Env = Readonly<Record<string, ExprValue>>;
51
+ /** Input shape for builder params — a literal or an expression. */
52
+ export type ScalarInput = number | Expr;
53
+ /** Either a literal Vec3, a mixed `[scalar-or-expr, ...]` tuple, or a bare Expr. */
54
+ export type Vec3Input = Vec3 | readonly [ScalarInput, ScalarInput, ScalarInput] | Expr;
55
+ export type Vec2Input = Vec2 | readonly [ScalarInput, ScalarInput] | Expr;
56
+ export declare function numLit(value: number): NumLitExpr;
57
+ export declare function vec3Lit(value: Vec3): Vec3LitExpr;
58
+ export declare function vec2Lit(value: Vec2): Vec2LitExpr;
59
+ export declare function param(name: string): ParamExpr;
60
+ export declare function binOp(op: BinaryOp, a: Expr, b: Expr): BinOpExpr;
61
+ export declare function unaryOp(op: UnaryOp, arg: Expr): UnaryOpExpr;
62
+ export declare function component(vec: Expr, index: 0 | 1 | 2): ComponentExpr;
63
+ export declare function buildVec(dim: 2 | 3, components: readonly Expr[]): BuildVecExpr;
64
+ export declare const add: (a: Expr, b: Expr) => BinOpExpr;
65
+ export declare const mul: (a: Expr, b: Expr) => BinOpExpr;
66
+ export declare function asScalarExpr(input: ScalarInput): Expr;
67
+ export declare function asVec3Expr(input: Vec3Input): Expr;
68
+ export declare function asVec2Expr(input: Vec2Input): Expr;
69
+ export declare function evalExpr(expr: Expr, env: Env): Result<ExprValue>;
70
+ export declare function evalScalar(expr: Expr, env: Env, where: string): Result<number>;
71
+ export declare function evalVec3(expr: Expr, env: Env, where: string): Result<Vec3>;
72
+ export declare function projectEnv(env: Env, deps: ReadonlySet<string>): Env;
@@ -0,0 +1,9 @@
1
+ export declare function fnvInit(): bigint;
2
+ export declare function fnvMixByte(h: bigint, byte: number): bigint;
3
+ export declare function fnvMixBytes(h: bigint, bytes: ArrayLike<number>): bigint;
4
+ export declare function fnvMixString(h: bigint, s: string): bigint;
5
+ export declare function fnvMixNumber(h: bigint, n: number): bigint;
6
+ export declare function fnvMixHash(h: bigint, child: bigint): bigint;
7
+ export declare function fnvMixInt32(h: bigint, n: number): bigint;
8
+ export declare function fnvMixBool(h: bigint, b: boolean): bigint;
9
+ export declare function toHex(h: bigint): string;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * CSG IR — Constructive Solid Geometry as an Intermediate Representation.
3
+ *
4
+ * Build a content-addressed DAG of primitives, booleans, and transforms;
5
+ * parameterize via named expression bindings; evaluate against the active
6
+ * kernel with subtree-level cache reuse for incremental parametric edits.
7
+ */
8
+ export { box, sphere, cylinder, cone, torus, polygon, circle, line, vertex, emptySolid, emptyFace, emptyWire, fuse, cut, intersect, fuseAll, cutAll, translate, rotate, scale, mirror, compound, type RotateOptions, type ScaleOptions, type MirrorOptions, } from './builders.js';
9
+ export { numLit, vec3Lit, vec2Lit, param, binOp, unaryOp, component, buildVec, add, mul, asScalarExpr, asVec3Expr, asVec2Expr, type Expr, type ExprValue, type Env, type ScalarInput, type Vec3Input, type Vec2Input, type BinaryOp, type UnaryOp, } from './expressions.js';
10
+ export type { IRNode, NodeKind, OutputKind, PrimitiveNode, BooleanNode, TransformIRNode, SolidNode, FaceNode, EdgeNode, VertexNode, AnyNode, } from './types.js';
11
+ export { outputKindOf } from './types.js';
12
+ export { Evaluator, withEvaluator, type EvaluatorOptions, type StepInfo, type CacheStats, } from './evaluate.js';
13
+ export { toJSON, fromJSON, CSG_VERSION, type CsgEnvelope } from './serialize.js';
14
+ export { optimize, foldExpr } from './optimize.js';
15
+ export { replaceNode, forEachNode, nodeCount, type NodePredicate } from './edit.js';
@@ -0,0 +1,4 @@
1
+ import { Expr } from './expressions.js';
2
+ import { IRNode } from './types.js';
3
+ export declare function optimize(node: IRNode): IRNode;
4
+ export declare function foldExpr(e: Expr): Expr;
@@ -0,0 +1,9 @@
1
+ import { Result } from '../core/result.js';
2
+ import { IRNode } from './types.js';
3
+ export declare const CSG_VERSION = 1;
4
+ export interface CsgEnvelope {
5
+ readonly csgVersion: number;
6
+ readonly root: unknown;
7
+ }
8
+ export declare function toJSON(node: IRNode): CsgEnvelope;
9
+ export declare function fromJSON(envelope: unknown): Result<IRNode>;
@@ -0,0 +1,128 @@
1
+ import { Expr } from './expressions.js';
2
+ export type OutputKind = 'Solid' | 'Face' | 'Wire' | 'Edge' | 'Vertex' | 'Compound';
3
+ /** Output kinds that have a corresponding empty-shape builder + serializer. */
4
+ export type EmptyOutputKind = 'Solid' | 'Face' | 'Wire';
5
+ export interface IRNodeBase {
6
+ readonly structuralHash: bigint;
7
+ readonly freeParams: ReadonlySet<string>;
8
+ }
9
+ export interface BoxNode extends IRNodeBase {
10
+ readonly kind: 'Box';
11
+ readonly x: Expr;
12
+ readonly y: Expr;
13
+ readonly z: Expr;
14
+ }
15
+ export interface SphereNode extends IRNodeBase {
16
+ readonly kind: 'Sphere';
17
+ readonly radius: Expr;
18
+ }
19
+ export interface CylinderNode extends IRNodeBase {
20
+ readonly kind: 'Cylinder';
21
+ readonly radius: Expr;
22
+ readonly height: Expr;
23
+ }
24
+ export interface ConeNode extends IRNodeBase {
25
+ readonly kind: 'Cone';
26
+ readonly radius1: Expr;
27
+ readonly radius2: Expr;
28
+ readonly height: Expr;
29
+ }
30
+ export interface TorusNode extends IRNodeBase {
31
+ readonly kind: 'Torus';
32
+ readonly majorRadius: Expr;
33
+ readonly minorRadius: Expr;
34
+ }
35
+ export interface PolygonNode extends IRNodeBase {
36
+ readonly kind: 'Polygon';
37
+ readonly points: readonly Expr[];
38
+ }
39
+ export interface CircleNode extends IRNodeBase {
40
+ readonly kind: 'Circle';
41
+ readonly radius: Expr;
42
+ }
43
+ export interface LineNode extends IRNodeBase {
44
+ readonly kind: 'Line';
45
+ readonly from: Expr;
46
+ readonly to: Expr;
47
+ }
48
+ export interface VertexLitNode extends IRNodeBase {
49
+ readonly kind: 'Vertex';
50
+ readonly point: Expr;
51
+ }
52
+ /** A typed empty shape — the identity element for booleans of its output kind. */
53
+ export interface EmptyNode extends IRNodeBase {
54
+ readonly kind: 'Empty';
55
+ readonly output: EmptyOutputKind;
56
+ }
57
+ export interface FuseNode extends IRNodeBase {
58
+ readonly kind: 'Fuse';
59
+ readonly a: IRNode;
60
+ readonly b: IRNode;
61
+ readonly tolerance?: number | undefined;
62
+ }
63
+ export interface CutNode extends IRNodeBase {
64
+ readonly kind: 'Cut';
65
+ readonly a: IRNode;
66
+ readonly b: IRNode;
67
+ readonly tolerance?: number | undefined;
68
+ }
69
+ export interface IntersectNode extends IRNodeBase {
70
+ readonly kind: 'Intersect';
71
+ readonly a: IRNode;
72
+ readonly b: IRNode;
73
+ readonly tolerance?: number | undefined;
74
+ }
75
+ export interface FuseAllNode extends IRNodeBase {
76
+ readonly kind: 'FuseAll';
77
+ readonly shapes: readonly IRNode[];
78
+ readonly tolerance?: number | undefined;
79
+ }
80
+ export interface CutAllNode extends IRNodeBase {
81
+ readonly kind: 'CutAll';
82
+ readonly base: IRNode;
83
+ readonly tools: readonly IRNode[];
84
+ readonly tolerance?: number | undefined;
85
+ }
86
+ export interface TranslateNode extends IRNodeBase {
87
+ readonly kind: 'Translate';
88
+ readonly target: IRNode;
89
+ readonly vector: Expr;
90
+ }
91
+ export interface RotateNode extends IRNodeBase {
92
+ readonly kind: 'Rotate';
93
+ readonly target: IRNode;
94
+ readonly angle: Expr;
95
+ readonly axis?: Expr | undefined;
96
+ readonly at?: Expr | undefined;
97
+ }
98
+ export interface ScaleNode extends IRNodeBase {
99
+ readonly kind: 'Scale';
100
+ readonly target: IRNode;
101
+ readonly factor: Expr;
102
+ readonly center?: Expr | undefined;
103
+ }
104
+ export interface MirrorNode extends IRNodeBase {
105
+ readonly kind: 'Mirror';
106
+ readonly target: IRNode;
107
+ readonly normal?: Expr | undefined;
108
+ readonly at?: Expr | undefined;
109
+ }
110
+ export interface CompoundNode extends IRNodeBase {
111
+ readonly kind: 'Compound';
112
+ readonly children: readonly IRNode[];
113
+ }
114
+ export type PrimitiveNode = BoxNode | SphereNode | CylinderNode | ConeNode | TorusNode | PolygonNode | CircleNode | LineNode | VertexLitNode | EmptyNode;
115
+ export type BooleanNode = FuseNode | CutNode | IntersectNode | FuseAllNode | CutAllNode;
116
+ export type TransformIRNode = TranslateNode | RotateNode | ScaleNode | MirrorNode;
117
+ export type IRNode = PrimitiveNode | BooleanNode | TransformIRNode | CompoundNode;
118
+ export type NodeKind = IRNode['kind'];
119
+ export type AnyNode = IRNode;
120
+ /** Nodes that produce a 3D solid. */
121
+ export type SolidNode = AnyNode;
122
+ /** Nodes that produce a 2D or 3D face. */
123
+ export type FaceNode = AnyNode;
124
+ /** Nodes that produce an edge. */
125
+ export type EdgeNode = AnyNode;
126
+ /** Nodes that produce a vertex. */
127
+ export type VertexNode = AnyNode;
128
+ export declare function outputKindOf(node: IRNode): OutputKind;
@@ -1,5 +1,5 @@
1
- import { X as getKernel, f as isEdge, t as castShape, y as isWire } from "./shapeTypes-B_s2jyQ2.js";
2
- import { A as ok, b as err, l as typeCastError } from "./errors-0fYW_YnO.js";
1
+ import { Z as getKernel, f as isEdge, t as castShape, y as isWire } from "./shapeTypes-DGtDTS9s.js";
2
+ import { A as ok, b as err, l as typeCastError } from "./errors-8GZS3vy9.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-xj3nxBTM.cjs");
2
- const require_errors = require("./errors-Dv6pfNct.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BpKhed-9.cjs");
2
+ const require_errors = require("./errors-BiY8-q1s.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 { R as DisposalScope, X as getKernel, Y as _usingCtx, a as createEdge, o as createFace, u as createWire } from "./shapeTypes-B_s2jyQ2.js";
1
+ import { R as DisposalScope, Y as _usingCtx, Z as getKernel, a as createEdge, o as createFace, u as createWire } from "./shapeTypes-DGtDTS9s.js";
2
2
  import { n as wasmIndex } from "./vec3-BRj3eI54.js";
3
- import { R as unwrap, h as bug, s as safeIndex } from "./errors-0fYW_YnO.js";
4
- import { o as getEdges } from "./topologyQueryFns-BcYn7Adz.js";
3
+ import { R as unwrap, h as bug, s as safeIndex } from "./errors-8GZS3vy9.js";
4
+ import { o as getEdges } from "./topologyQueryFns-CcWaCxeb.js";
5
5
  import { t as DEG2RAD } from "./constants-Ci5CA3aZ.js";
6
6
  import { r as toVec3 } from "./types-BIdk_GJY.js";
7
7
  import { d as vecNormalize, g as vecSub, h as vecScale, m as vecRotate, r as vecCross } from "./vecOps-DVROrqTV.js";
8
- import { a as planeToWorld, o as resolvePlane } from "./planeOps-4i2qEraD.js";
9
- import { _ as downcast, c as normalAt, l as outerWire, n as faceCenter, p as uvBounds, u as pointOnSurface } from "./faceFns-m0GePUMn.js";
10
- import { c as curveStartPoint, m as offsetWire2D, r as curveIsClosed } from "./curveFns-DVHUVmuO.js";
8
+ import { a as planeToWorld, o as resolvePlane } from "./planeOps-Bea3T3mc.js";
9
+ import { _ as downcast, c as normalAt, l as outerWire, n as faceCenter, p as uvBounds, u as pointOnSurface } from "./faceFns-BNhFoEII.js";
10
+ import { c as curveStartPoint, m as offsetWire2D, r as curveIsClosed } from "./curveFns-BEF8t7XY.js";
11
11
  import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-C5IWcxs9.js";
12
- import { c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, m as makeHelix, r as makeFace, s as assembleWire } from "./surfaceBuilders-DRxCelXR.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-DlJ7yDBD.js";
14
- import { _ as samePoint$1, b as subtract2d, c as PRECISION_OFFSET, l as add2d, y as squareDistance2d } from "./helpers-C7wU_L9l.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-C-ngUkOG.js";
16
- import { t as cornerFinder } from "./cornerFinder-GBVBku2c.js";
17
- import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-C3x4nSLt.js";
18
- import { _ as wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-D5zPssgR.js";
19
- import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-Bix9SLAm.js";
12
+ import { c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, m as makeHelix, r as makeFace, s as assembleWire } from "./surfaceBuilders-zJyikeav.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-DeEogKbs.js";
14
+ import { _ as samePoint$1, b as subtract2d, c as PRECISION_OFFSET, l as add2d, y as squareDistance2d } from "./helpers-D1J5VHbk.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-Cy5veXS3.js";
16
+ import { t as cornerFinder } from "./cornerFinder-tfWhcA2M.js";
17
+ import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-lE2uy4Mm.js";
18
+ import { _ as wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-Bv6zhEyn.js";
19
+ import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-Dg1lQP0S.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.
@@ -1,22 +1,22 @@
1
- const require_textBlueprints = require("./textBlueprints-Dy4xulfR.cjs");
2
- const require_shapeTypes = require("./shapeTypes-xj3nxBTM.cjs");
1
+ const require_textBlueprints = require("./textBlueprints-CHh9SChA.cjs");
2
+ const require_shapeTypes = require("./shapeTypes-BpKhed-9.cjs");
3
3
  const require_vec3 = require("./vec3-S4Oh59IX.cjs");
4
- const require_errors = require("./errors-Dv6pfNct.cjs");
5
- const require_topologyQueryFns = require("./topologyQueryFns-D0v-c2Xk.cjs");
4
+ const require_errors = require("./errors-BiY8-q1s.cjs");
5
+ const require_topologyQueryFns = require("./topologyQueryFns-CHsPXNbI.cjs");
6
6
  const require_constants = require("./constants-DTorLmes.cjs");
7
7
  const require_types = require("./types-CDkxah-M.cjs");
8
8
  const require_vecOps = require("./vecOps-D7xplSx8.cjs");
9
- const require_planeOps = require("./planeOps-CH4ruLuj.cjs");
10
- const require_faceFns = require("./faceFns-CbpUuSSF.cjs");
11
- const require_curveFns = require("./curveFns-Ds0e7i2y.cjs");
9
+ const require_planeOps = require("./planeOps-2EyPq0tU.cjs");
10
+ const require_faceFns = require("./faceFns-BbESdudy.cjs");
11
+ const require_curveFns = require("./curveFns-CcheHkr4.cjs");
12
12
  const require_arrayAccess = require("./arrayAccess-7pTWqkJu.cjs");
13
- const require_surfaceBuilders = require("./surfaceBuilders-BkgewbNs.cjs");
14
- const require_blueprintSketcher = require("./blueprintSketcher-D2awQyoi.cjs");
15
- const require_helpers = require("./helpers-CrH0p3GU.cjs");
16
- const require_blueprint = require("./blueprint-Dn16jzZs.cjs");
17
- const require_cornerFinder = require("./cornerFinder-Cm58LsyX.cjs");
18
- const require_boolean2D = require("./boolean2D-BlazC0Yu.cjs");
19
- const require_cameraFns = require("./cameraFns-leKP1O1t.cjs");
13
+ const require_surfaceBuilders = require("./surfaceBuilders-frj7YRrD.cjs");
14
+ const require_blueprintSketcher = require("./blueprintSketcher-Cr9A-R8I.cjs");
15
+ const require_helpers = require("./helpers-BU3ANziG.cjs");
16
+ const require_blueprint = require("./blueprint-Bl0YQjkk.cjs");
17
+ const require_cornerFinder = require("./cornerFinder-CXN1IxPg.cjs");
18
+ const require_boolean2D = require("./boolean2D-BZ1UjpjX.cjs");
19
+ const require_cameraFns = require("./cameraFns-CR2inEBU.cjs");
20
20
  //#region src/2d/lib/stitching.ts
21
21
  /**
22
22
  * Group a flat list of curves into connected chains by matching endpoints.
@@ -339,6 +339,7 @@ var BrepErrorCode = {
339
339
  CHAMFER_NOT_3D: "CHAMFER_NOT_3D",
340
340
  CHAMFER_ANGLE_NOT_3D: "CHAMFER_ANGLE_NOT_3D",
341
341
  CHAMFER_ANGLE_FAILED: "CHAMFER_ANGLE_FAILED",
342
+ CSG_NOT_3D: "CSG_NOT_3D",
342
343
  SHELL_NOT_3D: "SHELL_NOT_3D",
343
344
  OFFSET_NOT_3D: "OFFSET_NOT_3D",
344
345
  NULL_SHAPE: "NULL_SHAPE",
@@ -339,6 +339,7 @@ var BrepErrorCode = {
339
339
  CHAMFER_NOT_3D: "CHAMFER_NOT_3D",
340
340
  CHAMFER_ANGLE_NOT_3D: "CHAMFER_ANGLE_NOT_3D",
341
341
  CHAMFER_ANGLE_FAILED: "CHAMFER_ANGLE_FAILED",
342
+ CSG_NOT_3D: "CSG_NOT_3D",
342
343
  SHELL_NOT_3D: "SHELL_NOT_3D",
343
344
  OFFSET_NOT_3D: "OFFSET_NOT_3D",
344
345
  NULL_SHAPE: "NULL_SHAPE",
@@ -1,5 +1,5 @@
1
- const require_shapeTypes = require("./shapeTypes-xj3nxBTM.cjs");
2
- const require_errors = require("./errors-Dv6pfNct.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BpKhed-9.cjs");
2
+ const require_errors = require("./errors-BiY8-q1s.cjs");
3
3
  const require_vecOps = require("./vecOps-D7xplSx8.cjs");
4
4
  //#region src/operations/extrudeUtils.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { X as getKernel, c as createSolid, h as isShape3D, t as castShape, y as isWire } from "./shapeTypes-B_s2jyQ2.js";
2
- import { A as ok, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, w as isErr } from "./errors-0fYW_YnO.js";
1
+ import { Z as getKernel, c as createSolid, h as isShape3D, t as castShape, y as isWire } from "./shapeTypes-DGtDTS9s.js";
2
+ import { A as ok, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, w as isErr } from "./errors-8GZS3vy9.js";
3
3
  import { c as vecLength, d as vecNormalize, t as vecAdd } from "./vecOps-DVROrqTV.js";
4
4
  //#region src/operations/extrudeUtils.ts
5
5
  /**