brepjs 7.4.2 → 8.0.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 (106) hide show
  1. package/README.md +179 -17
  2. package/dist/2d/blueprints/blueprintFns.d.ts +0 -22
  3. package/dist/2d/blueprints/blueprintFns.d.ts.map +1 -1
  4. package/dist/2d/blueprints/boolean2D.d.ts +3 -3
  5. package/dist/2d.cjs +2 -58
  6. package/dist/2d.d.ts +1 -2
  7. package/dist/2d.d.ts.map +1 -1
  8. package/dist/2d.js +7 -64
  9. package/dist/{Blueprint-3Dyu0OL6.cjs → Blueprint-CVctc41Z.cjs} +4 -4
  10. package/dist/{Blueprint-DSHD89bZ.js → Blueprint-D3JfGJTz.js} +4 -4
  11. package/dist/{boolean2D-BwOpOv6L.cjs → boolean2D-BdZATaHs.cjs} +9 -9
  12. package/dist/{boolean2D-CtyE2hK5.js → boolean2D-hOw5Qay5.js} +9 -9
  13. package/dist/{booleanFns-5KSbtLBU.cjs → booleanFns-BBSVKhL2.cjs} +27 -31
  14. package/dist/{booleanFns-DcxqLQSG.js → booleanFns-CqehfzcK.js} +27 -31
  15. package/dist/brepjs.cjs +95 -106
  16. package/dist/brepjs.js +129 -140
  17. package/dist/{cast-D1s7Im9E.js → cast-DQaUibmm.js} +3 -3
  18. package/dist/{cast-DsxJk_F0.cjs → cast-DkB0GKmQ.cjs} +2 -2
  19. package/dist/{drawFns-CSbH7uoI.js → drawFns-921SkhDL.js} +9 -9
  20. package/dist/{drawFns-C6KQjmQj.cjs → drawFns-CUyx50gi.cjs} +9 -9
  21. package/dist/{faceFns-B9if-FPW.cjs → faceFns-BwK7FP7N.cjs} +1 -1
  22. package/dist/{faceFns-Bl6HHbqO.js → faceFns-DHu-2JpA.js} +1 -1
  23. package/dist/index.d.ts +9 -11
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/io.cjs +2 -2
  26. package/dist/io.js +2 -2
  27. package/dist/{loft-Cc5E5pAf.cjs → loft-BzWFokmC.cjs} +2 -2
  28. package/dist/{loft-BlNndTOR.js → loft-CtG5nMq5.js} +2 -2
  29. package/dist/{measurement-D75pyJi1.js → measurement-C5JGCuUP.js} +1 -1
  30. package/dist/{measurement-BVdZ9cG3.cjs → measurement-fxm_pW7x.cjs} +1 -1
  31. package/dist/measurement.cjs +1 -1
  32. package/dist/measurement.js +1 -1
  33. package/dist/{meshFns-p_kv--PW.js → meshFns-AqAjTTVl.js} +11 -11
  34. package/dist/{meshFns-mVlogI3J.cjs → meshFns-BhrZGi6w.cjs} +11 -11
  35. package/dist/operations/api.d.ts +4 -6
  36. package/dist/operations/api.d.ts.map +1 -1
  37. package/dist/operations/exporterFns.d.ts +0 -2
  38. package/dist/operations/exporterFns.d.ts.map +1 -1
  39. package/dist/operations/extrude.d.ts +2 -4
  40. package/dist/operations/extrude.d.ts.map +1 -1
  41. package/dist/operations/extrudeFns.d.ts +4 -4
  42. package/dist/operations/extrudeFns.d.ts.map +1 -1
  43. package/dist/operations/extrudeUtils.d.ts +0 -2
  44. package/dist/operations/extrudeUtils.d.ts.map +1 -1
  45. package/dist/operations/loft.d.ts +1 -1
  46. package/dist/operations/loftFns.d.ts +2 -4
  47. package/dist/operations/loftFns.d.ts.map +1 -1
  48. package/dist/{operations-SRN-mfTx.cjs → operations-BP1wVDw0.cjs} +14 -20
  49. package/dist/{operations-CEV-gqkX.js → operations-C1rWoba2.js} +14 -20
  50. package/dist/operations.cjs +2 -2
  51. package/dist/operations.d.ts +3 -3
  52. package/dist/operations.d.ts.map +1 -1
  53. package/dist/operations.js +2 -2
  54. package/dist/{query-D7XclvBZ.js → query-V6nV-VfL.js} +4 -4
  55. package/dist/{query-DkcMfh6j.cjs → query-hMSmOWJP.cjs} +4 -4
  56. package/dist/query.cjs +1 -1
  57. package/dist/query.js +1 -1
  58. package/dist/{shapeFns-BpCPVHFT.js → shapeFns-BrF97sKt.js} +19 -19
  59. package/dist/{shapeFns-DjsWo98C.cjs → shapeFns-BvOndshS.cjs} +19 -19
  60. package/dist/{shapeHelpers-BBSVHPGk.cjs → shapeHelpers-B2SXz1p4.cjs} +2 -2
  61. package/dist/{shapeHelpers-C4QIp7u5.js → shapeHelpers-BcoZf2N9.js} +2 -2
  62. package/dist/sketching/sketcherlib.d.ts +2 -4
  63. package/dist/sketching/sketcherlib.d.ts.map +1 -1
  64. package/dist/sketching.cjs +2 -2
  65. package/dist/sketching.d.ts +2 -2
  66. package/dist/sketching.d.ts.map +1 -1
  67. package/dist/sketching.js +2 -2
  68. package/dist/topology/api.d.ts +11 -15
  69. package/dist/topology/api.d.ts.map +1 -1
  70. package/dist/topology/apiTypes.d.ts +0 -2
  71. package/dist/topology/apiTypes.d.ts.map +1 -1
  72. package/dist/topology/booleanFns.d.ts +9 -9
  73. package/dist/topology/booleanFns.d.ts.map +1 -1
  74. package/dist/topology/cast.d.ts +2 -2
  75. package/dist/topology/cast.d.ts.map +1 -1
  76. package/dist/topology/chamferAngleFns.d.ts +1 -1
  77. package/dist/topology/chamferAngleFns.d.ts.map +1 -1
  78. package/dist/topology/healingFns.d.ts +2 -2
  79. package/dist/topology/healingFns.d.ts.map +1 -1
  80. package/dist/topology/index.d.ts +2 -2
  81. package/dist/topology/index.d.ts.map +1 -1
  82. package/dist/topology/meshCache.d.ts +2 -4
  83. package/dist/topology/meshCache.d.ts.map +1 -1
  84. package/dist/topology/meshFns.d.ts +2 -2
  85. package/dist/topology/meshFns.d.ts.map +1 -1
  86. package/dist/topology/modifierFns.d.ts +5 -5
  87. package/dist/topology/modifierFns.d.ts.map +1 -1
  88. package/dist/topology/primitiveFns.d.ts +4 -8
  89. package/dist/topology/primitiveFns.d.ts.map +1 -1
  90. package/dist/topology/shapeFns.d.ts +9 -9
  91. package/dist/topology/shapeFns.d.ts.map +1 -1
  92. package/dist/topology/shapeModifiers.d.ts +0 -2
  93. package/dist/topology/shapeModifiers.d.ts.map +1 -1
  94. package/dist/topology/wrapperFns.d.ts +3 -3
  95. package/dist/topology/wrapperFns.d.ts.map +1 -1
  96. package/dist/{topology-Bb1W3SyF.cjs → topology-CIooytHH.cjs} +18 -18
  97. package/dist/{topology-BEMrS4WZ.js → topology-tFzqSrGH.js} +18 -18
  98. package/dist/topology.cjs +8 -8
  99. package/dist/topology.d.ts +1 -1
  100. package/dist/topology.d.ts.map +1 -1
  101. package/dist/topology.js +8 -8
  102. package/package.json +3 -3
  103. package/dist/2d/blueprints/boolean2dFns.d.ts +0 -46
  104. package/dist/2d/blueprints/boolean2dFns.d.ts.map +0 -1
  105. package/dist/core/geometry.d.ts +0 -26
  106. package/dist/core/geometry.d.ts.map +0 -1
package/dist/brepjs.cjs CHANGED
@@ -4,24 +4,24 @@ const occtBoundary = require("./occtBoundary-du8_ex-p.cjs");
4
4
  const errors = require("./errors-DK1VAdP4.cjs");
5
5
  const shapeTypes = require("./shapeTypes-DKhwEnUM.cjs");
6
6
  const vecOps = require("./vecOps-CjRL1jau.cjs");
7
- const Blueprint = require("./Blueprint-3Dyu0OL6.cjs");
7
+ const Blueprint = require("./Blueprint-CVctc41Z.cjs");
8
8
  const curveFns = require("./curveFns-BilyYL_s.cjs");
9
- const loft$1 = require("./loft-Cc5E5pAf.cjs");
10
- const operations = require("./operations-SRN-mfTx.cjs");
11
- const boolean2D = require("./boolean2D-BwOpOv6L.cjs");
9
+ const loft$2 = require("./loft-BzWFokmC.cjs");
10
+ const operations = require("./operations-BP1wVDw0.cjs");
11
+ const boolean2D = require("./boolean2D-BdZATaHs.cjs");
12
12
  const _2d = require("./2d.cjs");
13
- const query = require("./query-DkcMfh6j.cjs");
13
+ const query = require("./query-hMSmOWJP.cjs");
14
14
  const io = require("./io.cjs");
15
- const drawFns = require("./drawFns-C6KQjmQj.cjs");
15
+ const drawFns = require("./drawFns-CUyx50gi.cjs");
16
16
  const vectors = require("./vectors-ChWEZPwy.cjs");
17
- const shapeFns = require("./shapeFns-DjsWo98C.cjs");
18
- const topology = require("./topology-Bb1W3SyF.cjs");
19
- const faceFns = require("./faceFns-B9if-FPW.cjs");
20
- const meshFns = require("./meshFns-mVlogI3J.cjs");
21
- const booleanFns = require("./booleanFns-5KSbtLBU.cjs");
22
- const measurement = require("./measurement-BVdZ9cG3.cjs");
23
- const shapeHelpers = require("./shapeHelpers-BBSVHPGk.cjs");
24
- const cast = require("./cast-DsxJk_F0.cjs");
17
+ const shapeFns = require("./shapeFns-BvOndshS.cjs");
18
+ const topology = require("./topology-CIooytHH.cjs");
19
+ const faceFns = require("./faceFns-BwK7FP7N.cjs");
20
+ const meshFns = require("./meshFns-BhrZGi6w.cjs");
21
+ const booleanFns = require("./booleanFns-BBSVKhL2.cjs");
22
+ const measurement = require("./measurement-fxm_pW7x.cjs");
23
+ const shapeHelpers = require("./shapeHelpers-B2SXz1p4.cjs");
24
+ const cast = require("./cast-DkB0GKmQ.cjs");
25
25
  const result = require("./result.cjs");
26
26
  const worker = require("./worker.cjs");
27
27
  const errorFactories = {
@@ -52,11 +52,6 @@ function kernelCallRaw(fn, code, message, kind = "OCCT_OPERATION") {
52
52
  return errors.err(errorFactories[kind](code, `${message}: ${translatedMessage}`, e));
53
53
  }
54
54
  }
55
- function isPoint(p) {
56
- if (Array.isArray(p)) return p.length === 3 || p.length === 2;
57
- else if (p && typeof p?.XYZ === "function") return true;
58
- return false;
59
- }
60
55
  function isNumber(r) {
61
56
  return typeof r === "number";
62
57
  }
@@ -127,9 +122,13 @@ function box(width, depth, height, options) {
127
122
  const maker = r(new oc.BRepPrimAPI_MakeBox_2(width, depth, height));
128
123
  let solid2 = shapeTypes.createSolid(maker.Solid());
129
124
  gc();
130
- if (options?.center) {
131
- const c = options.center === true ? [0, 0, 0] : options.center;
132
- solid2 = shapeFns.translateShape(solid2, [c[0] - width / 2, c[1] - depth / 2, c[2] - height / 2]);
125
+ const center = options?.at ?? (options?.centered ? [0, 0, 0] : void 0);
126
+ if (center) {
127
+ solid2 = shapeFns.translate(solid2, [
128
+ center[0] - width / 2,
129
+ center[1] - depth / 2,
130
+ center[2] - height / 2
131
+ ]);
133
132
  }
134
133
  return solid2;
135
134
  }
@@ -143,14 +142,14 @@ function cylinder(radius, height, options) {
143
142
  -axis[1] * height * 0.5,
144
143
  -axis[2] * height * 0.5
145
144
  ];
146
- solid2 = shapeFns.translateShape(solid2, halfShift);
145
+ solid2 = shapeFns.translate(solid2, halfShift);
147
146
  }
148
147
  return solid2;
149
148
  }
150
149
  function sphere(radius, options) {
151
150
  let solid2 = shapeHelpers.makeSphere(radius);
152
151
  if (options?.at) {
153
- solid2 = shapeFns.translateShape(solid2, options.at);
152
+ solid2 = shapeFns.translate(solid2, options.at);
154
153
  }
155
154
  return solid2;
156
155
  }
@@ -164,7 +163,7 @@ function cone(bottomRadius, topRadius, height, options) {
164
163
  -axis[1] * height * 0.5,
165
164
  -axis[2] * height * 0.5
166
165
  ];
167
- solid2 = shapeFns.translateShape(solid2, halfShift);
166
+ solid2 = shapeFns.translate(solid2, halfShift);
168
167
  }
169
168
  return solid2;
170
169
  }
@@ -174,7 +173,7 @@ function torus(majorRadius, minorRadius, options) {
174
173
  function ellipsoid(rx, ry, rz, options) {
175
174
  let solid2 = shapeHelpers.makeEllipsoid(rx, ry, rz);
176
175
  if (options?.at) {
177
- solid2 = shapeFns.translateShape(solid2, options.at);
176
+ solid2 = shapeFns.translate(solid2, options.at);
178
177
  }
179
178
  return solid2;
180
179
  }
@@ -182,11 +181,11 @@ function line(from, to) {
182
181
  return shapeHelpers.makeLine(from, to);
183
182
  }
184
183
  function circle(radius, options) {
185
- const axisDir = options?.axis ?? options?.normal ?? [0, 0, 1];
184
+ const axisDir = options?.axis ?? [0, 0, 1];
186
185
  return shapeHelpers.makeCircle(radius, options?.at ?? [0, 0, 0], axisDir);
187
186
  }
188
187
  function ellipse(majorRadius, minorRadius, options) {
189
- const axisDir = options?.axis ?? options?.normal ?? [0, 0, 1];
188
+ const axisDir = options?.axis ?? [0, 0, 1];
190
189
  return shapeHelpers.makeEllipse(majorRadius, minorRadius, options?.at ?? [0, 0, 0], axisDir, options?.xDir);
191
190
  }
192
191
  function helix(pitch, height, radius, options) {
@@ -203,7 +202,7 @@ function threePointArc(p1, p2, p3) {
203
202
  return shapeHelpers.makeThreePointArc(p1, p2, p3);
204
203
  }
205
204
  function ellipseArc(majorRadius, minorRadius, startAngle, endAngle, options) {
206
- const axisDir = options?.axis ?? options?.normal ?? [0, 0, 1];
205
+ const axisDir = options?.axis ?? [0, 0, 1];
207
206
  return shapeHelpers.makeEllipseArc(
208
207
  majorRadius,
209
208
  minorRadius,
@@ -262,8 +261,8 @@ function validateNotNull(shape2, label) {
262
261
  }
263
262
  return errors.ok(void 0);
264
263
  }
265
- function thickenSurface(shape2, thickness) {
266
- const check = validateNotNull(shape2, "thickenSurface: shape");
264
+ function thicken$1(shape2, thickness) {
265
+ const check = validateNotNull(shape2, "thicken: shape");
267
266
  if (errors.isErr(check)) return check;
268
267
  return kernelCall(
269
268
  () => occtBoundary.getKernel().thicken(shape2.wrapped, thickness),
@@ -271,8 +270,8 @@ function thickenSurface(shape2, thickness) {
271
270
  "Thicken operation failed"
272
271
  );
273
272
  }
274
- function filletShape(shape2, edges, radius) {
275
- const check = validateNotNull(shape2, "filletShape: shape");
273
+ function fillet$1(shape2, edges, radius) {
274
+ const check = validateNotNull(shape2, "fillet: shape");
276
275
  if (errors.isErr(check)) return check;
277
276
  if (typeof radius === "number" && radius <= 0) {
278
277
  return errors.err(
@@ -331,15 +330,15 @@ function filletShape(shape2, edges, radius) {
331
330
  const raw = e instanceof Error ? e.message : String(e);
332
331
  return errors.err(
333
332
  errors.occtError("FILLET_FAILED", `Fillet operation failed: ${raw}`, e, {
334
- operation: "filletShape",
333
+ operation: "fillet",
335
334
  edgeCount: selectedEdges.length,
336
335
  radius
337
336
  })
338
337
  );
339
338
  }
340
339
  }
341
- function chamferShape(shape2, edges, distance) {
342
- const check = validateNotNull(shape2, "chamferShape: shape");
340
+ function chamfer$1(shape2, edges, distance) {
341
+ const check = validateNotNull(shape2, "chamfer: shape");
343
342
  if (errors.isErr(check)) return check;
344
343
  if (typeof distance === "number" && distance <= 0) {
345
344
  return errors.err(
@@ -390,15 +389,15 @@ function chamferShape(shape2, edges, distance) {
390
389
  const raw = e instanceof Error ? e.message : String(e);
391
390
  return errors.err(
392
391
  errors.occtError("CHAMFER_FAILED", `Chamfer operation failed: ${raw}`, e, {
393
- operation: "chamferShape",
392
+ operation: "chamfer",
394
393
  edgeCount: selectedEdges.length,
395
394
  distance
396
395
  })
397
396
  );
398
397
  }
399
398
  }
400
- function shellShape(shape2, faces, thickness, tolerance = 1e-3) {
401
- const check = validateNotNull(shape2, "shellShape: shape");
399
+ function shell$1(shape2, faces, thickness, tolerance = 1e-3) {
400
+ const check = validateNotNull(shape2, "shell: shape");
402
401
  if (errors.isErr(check)) return check;
403
402
  if (thickness <= 0) {
404
403
  return errors.err(errors.validationError("INVALID_THICKNESS", "Shell thickness must be positive"));
@@ -422,15 +421,15 @@ function shellShape(shape2, faces, thickness, tolerance = 1e-3) {
422
421
  const raw = e instanceof Error ? e.message : String(e);
423
422
  return errors.err(
424
423
  errors.occtError("SHELL_FAILED", `Shell operation failed: ${raw}`, e, {
425
- operation: "shellShape",
424
+ operation: "shell",
426
425
  faceCount: faces.length,
427
426
  thickness
428
427
  })
429
428
  );
430
429
  }
431
430
  }
432
- function offsetShape(shape2, distance, tolerance = 1e-6) {
433
- const check = validateNotNull(shape2, "offsetShape: shape");
431
+ function offset$1(shape2, distance, tolerance = 1e-6) {
432
+ const check = validateNotNull(shape2, "offset: shape");
434
433
  if (errors.isErr(check)) return check;
435
434
  if (distance === 0) {
436
435
  return errors.err(errors.validationError("ZERO_OFFSET", "Offset distance cannot be zero"));
@@ -442,39 +441,39 @@ function offsetShape(shape2, distance, tolerance = 1e-6) {
442
441
  );
443
442
  }
444
443
  function translate(shape2, v) {
445
- return shapeFns.translateShape(resolve(shape2), v);
444
+ return shapeFns.translate(resolve(shape2), v);
446
445
  }
447
446
  function rotate(shape2, angle, options) {
448
- const pivotPoint = options?.at ?? options?.around;
449
- return shapeFns.rotateShape(resolve(shape2), angle, pivotPoint, options?.axis);
447
+ const pivotPoint = options?.at;
448
+ return shapeFns.rotate(resolve(shape2), angle, pivotPoint, options?.axis);
450
449
  }
451
450
  function mirror(shape2, options) {
452
- const planeOrigin = options?.at ?? options?.origin;
453
- return shapeFns.mirrorShape(resolve(shape2), options?.normal ?? [1, 0, 0], planeOrigin);
451
+ const planeOrigin = options?.at;
452
+ return shapeFns.mirror(resolve(shape2), options?.normal ?? [1, 0, 0], planeOrigin);
454
453
  }
455
454
  function scale(shape2, factor, options) {
456
- return shapeFns.scaleShape(resolve(shape2), factor, options?.center);
455
+ return shapeFns.scale(resolve(shape2), factor, options?.center);
457
456
  }
458
457
  function clone(shape2) {
459
- return shapeFns.cloneShape(resolve(shape2));
458
+ return shapeFns.clone(resolve(shape2));
460
459
  }
461
460
  function fuse(a, b, options) {
462
- return booleanFns.fuseShape(resolve(a), resolve(b), options);
461
+ return booleanFns.fuse(resolve(a), resolve(b), options);
463
462
  }
464
463
  function cut(base, tool, options) {
465
- return booleanFns.cutShape(resolve(base), resolve(tool), options);
464
+ return booleanFns.cut(resolve(base), resolve(tool), options);
466
465
  }
467
466
  function intersect(a, b, options) {
468
- return booleanFns.intersectShape(resolve(a), resolve(b), options);
467
+ return booleanFns.intersect(resolve(a), resolve(b), options);
469
468
  }
470
469
  function section(shape2, plane, options) {
471
- return booleanFns.sectionShape(resolve(shape2), plane, options);
470
+ return booleanFns.section(resolve(shape2), plane, options);
472
471
  }
473
472
  function split(shape2, tools) {
474
- return booleanFns.splitShape(resolve(shape2), tools);
473
+ return booleanFns.split(resolve(shape2), tools);
475
474
  }
476
475
  function slice(shape2, planes, options) {
477
- return booleanFns.sliceShape(resolve(shape2), planes, options);
476
+ return booleanFns.slice(resolve(shape2), planes, options);
478
477
  }
479
478
  function resolveEdges(edgesOrFn, shape2) {
480
479
  if (edgesOrFn === void 0) return void 0;
@@ -524,7 +523,7 @@ function fillet(shape2, edgesOrRadius, maybeRadius) {
524
523
  edges = void 0;
525
524
  radius = edgesOrRadius;
526
525
  }
527
- return filletShape(s, edges, normalizeFilletRadius(radius));
526
+ return fillet$1(s, edges, normalizeFilletRadius(radius));
528
527
  }
529
528
  function chamfer(shape2, edgesOrDistance, maybeDistance) {
530
529
  const s = resolve(shape2);
@@ -540,54 +539,54 @@ function chamfer(shape2, edgesOrDistance, maybeDistance) {
540
539
  const normalized = normalizeChamferDistance(distance);
541
540
  if (normalized.mode === "distAngle") {
542
541
  const selectedEdges = edges ?? shapeFns.getEdges(s);
543
- return topology.chamferDistAngleShape(
542
+ return topology.chamferDistAngle(
544
543
  s,
545
544
  [...selectedEdges],
546
545
  normalized.distance,
547
546
  normalized.angle
548
547
  );
549
548
  }
550
- return chamferShape(s, edges, normalized.distance);
549
+ return chamfer$1(s, edges, normalized.distance);
551
550
  }
552
551
  function shell(shape2, faces, thickness, options) {
553
552
  const s = resolve(shape2);
554
553
  const resolvedFaces = resolveFaces(faces, s);
555
- return shellShape(s, resolvedFaces, thickness, options?.tolerance);
554
+ return shell$1(s, resolvedFaces, thickness, options?.tolerance);
556
555
  }
557
556
  function offset(shape2, distance, options) {
558
- return offsetShape(resolve(shape2), distance, options?.tolerance);
557
+ return offset$1(resolve(shape2), distance, options?.tolerance);
559
558
  }
560
559
  function thicken(shape2, thickness) {
561
- return thickenSurface(resolve(shape2), thickness);
560
+ return thicken$1(resolve(shape2), thickness);
562
561
  }
563
562
  function heal(shape2) {
564
- return topology.healShape(resolve(shape2));
563
+ return topology.heal(resolve(shape2));
565
564
  }
566
565
  function simplify(shape2) {
567
- return shapeFns.simplifyShape(resolve(shape2));
566
+ return shapeFns.simplify(resolve(shape2));
568
567
  }
569
568
  function mesh(shape2, options) {
570
- return meshFns.meshShape(resolve(shape2), options);
569
+ return meshFns.mesh(resolve(shape2), options);
571
570
  }
572
571
  function meshEdges(shape2, options) {
573
- return meshFns.meshShapeEdges(resolve(shape2), options);
572
+ return meshFns.meshEdges(resolve(shape2), options);
574
573
  }
575
574
  function describe(shape2) {
576
- return shapeFns.describeShape(resolve(shape2));
575
+ return shapeFns.describe(resolve(shape2));
577
576
  }
578
577
  function toBREP(shape2) {
579
- return shapeFns.serializeShape(resolve(shape2));
578
+ return shapeFns.toBREP(resolve(shape2));
580
579
  }
581
580
  function fromBREP(data) {
582
- return cast.deserializeShape(data);
581
+ return cast.fromBREP(data);
583
582
  }
584
583
  function isValid(shape2) {
585
- return topology.isShapeValid(resolve(shape2));
584
+ return topology.isValid(resolve(shape2));
586
585
  }
587
586
  function isEmpty(shape2) {
588
- return shapeFns.isShapeNull(resolve(shape2));
587
+ return shapeFns.isEmpty(resolve(shape2));
589
588
  }
590
- function loftWires(wires, { ruled = true, startPoint, endPoint } = {}, returnShell = false) {
589
+ function loft$1(wires, { ruled = true, startPoint, endPoint } = {}, returnShell = false) {
591
590
  if (wires.length === 0 && !startPoint && !endPoint) {
592
591
  return errors.err(errors.validationError("LOFT_EMPTY", "Loft requires at least one wire or start/end point"));
593
592
  }
@@ -621,15 +620,20 @@ function loftWires(wires, { ruled = true, startPoint, endPoint } = {}, returnShe
621
620
  function extrude(face2, height) {
622
621
  const f = resolve(face2);
623
622
  const vec = typeof height === "number" ? [0, 0, height] : height;
624
- return operations.extrudeFace(f, vec);
623
+ return operations.extrude(f, vec);
625
624
  }
626
625
  function revolve(face2, options) {
627
- const pivotPoint = options?.at ?? options?.around ?? [0, 0, 0];
628
- return operations.revolveFace(resolve(face2), pivotPoint, options?.axis ?? [0, 0, 1], options?.angle ?? 360);
626
+ const pivotPoint = options?.at ?? [0, 0, 0];
627
+ return operations.revolve(
628
+ resolve(face2),
629
+ pivotPoint,
630
+ options?.axis ?? [0, 0, 1],
631
+ options?.angle ?? 360
632
+ );
629
633
  }
630
634
  function loft(wires, options) {
631
635
  const resolvedWires = wires.map((w) => resolve(w));
632
- return loftWires(resolvedWires, options);
636
+ return loft$1(resolvedWires, options);
633
637
  }
634
638
  function resolveTargetFace(shape2, faceSpec) {
635
639
  if (faceSpec === void 0) {
@@ -687,8 +691,8 @@ function drill(shape2, options) {
687
691
  }
688
692
  const cyl = shapeHelpers.makeCylinder(radius, depth, pos, dir);
689
693
  const startOffset = options.depth === void 0 ? vecOps.vecScale(dir, -depth / 2) : [0, 0, 0];
690
- const tool = startOffset[0] !== 0 || startOffset[1] !== 0 || startOffset[2] !== 0 ? shapeFns.translateShape(cyl, startOffset) : cyl;
691
- return booleanFns.cutShape(s, tool);
694
+ const tool = startOffset[0] !== 0 || startOffset[1] !== 0 || startOffset[2] !== 0 ? shapeFns.translate(cyl, startOffset) : cyl;
695
+ return booleanFns.cut(s, tool);
692
696
  }
693
697
  function pocket(shape2, options) {
694
698
  const s = resolve(shape2);
@@ -702,9 +706,9 @@ function pocket(shape2, options) {
702
706
  const faceResult = shapeHelpers.makeFace(w);
703
707
  if (errors.isErr(faceResult)) return faceResult;
704
708
  const extDir = vecOps.vecScale(vecOps.vecNormalize(normal), -depth);
705
- const toolResult = operations.extrudeFace(faceResult.value, extDir);
709
+ const toolResult = operations.extrude(faceResult.value, extDir);
706
710
  if (errors.isErr(toolResult)) return toolResult;
707
- return booleanFns.cutShape(s, toolResult.value);
711
+ return booleanFns.cut(s, toolResult.value);
708
712
  }
709
713
  function boss(shape2, options) {
710
714
  const s = resolve(shape2);
@@ -718,16 +722,16 @@ function boss(shape2, options) {
718
722
  const faceResult = shapeHelpers.makeFace(w);
719
723
  if (errors.isErr(faceResult)) return faceResult;
720
724
  const extDir = vecOps.vecScale(vecOps.vecNormalize(normal), height);
721
- const toolResult = operations.extrudeFace(faceResult.value, extDir);
725
+ const toolResult = operations.extrude(faceResult.value, extDir);
722
726
  if (errors.isErr(toolResult)) return toolResult;
723
- return booleanFns.fuseShape(s, toolResult.value);
727
+ return booleanFns.fuse(s, toolResult.value);
724
728
  }
725
729
  function mirrorJoin(shape2, options) {
726
730
  const s = resolve(shape2);
727
731
  const normal = options?.normal ?? [1, 0, 0];
728
- const planeOrigin = options?.at ?? options?.origin;
729
- const mirrored = shapeFns.mirrorShape(s, normal, planeOrigin);
730
- return booleanFns.fuseShape(s, mirrored);
732
+ const planeOrigin = options?.at;
733
+ const mirrored = shapeFns.mirror(s, normal, planeOrigin);
734
+ return booleanFns.fuse(s, mirrored);
731
735
  }
732
736
  function rectangularPattern(shape2, options) {
733
737
  const s = resolve(shape2);
@@ -753,8 +757,8 @@ function rectangularPattern(shape2, options) {
753
757
  xNorm[1] * xSpacing * xi + yNorm[1] * ySpacing * yi,
754
758
  xNorm[2] * xSpacing * xi + yNorm[2] * ySpacing * yi
755
759
  ];
756
- const copy = shapeFns.translateShape(s, offset2);
757
- const fuseResult = booleanFns.fuseShape(result2, copy);
760
+ const copy = shapeFns.translate(s, offset2);
761
+ const fuseResult = booleanFns.fuse(result2, copy);
758
762
  if (errors.isErr(fuseResult)) return fuseResult;
759
763
  result2 = fuseResult.value;
760
764
  }
@@ -1029,9 +1033,9 @@ exports.getCurveType = curveFns.getCurveType;
1029
1033
  exports.getOrientation = curveFns.getOrientation;
1030
1034
  exports.interpolateCurve = curveFns.interpolateCurve;
1031
1035
  exports.offsetWire2D = curveFns.offsetWire2D;
1032
- exports.basicFaceExtrusion = loft$1.basicFaceExtrusion;
1033
- exports.genericSweep = loft$1.genericSweep;
1034
- exports.revolution = loft$1.revolution;
1036
+ exports.basicFaceExtrusion = loft$2.basicFaceExtrusion;
1037
+ exports.genericSweep = loft$2.genericSweep;
1038
+ exports.revolution = loft$2.revolution;
1035
1039
  exports.addChild = operations.addChild;
1036
1040
  exports.addStep = operations.addStep;
1037
1041
  exports.circularPattern = operations.circularPattern;
@@ -1076,10 +1080,6 @@ exports.intersectBlueprints = boolean2D.intersectBlueprints;
1076
1080
  exports.organiseBlueprints = boolean2D.organiseBlueprints;
1077
1081
  exports.polysidesBlueprint = boolean2D.polysidesBlueprint;
1078
1082
  exports.roundedRectangleBlueprint = boolean2D.roundedRectangleBlueprint;
1079
- exports.blueprintBoundingBox = _2d.blueprintBoundingBox;
1080
- exports.blueprintIsInside = _2d.blueprintIsInside;
1081
- exports.blueprintOrientation = _2d.blueprintOrientation;
1082
- exports.blueprintToSVGPathD = _2d.blueprintToSVGPathD;
1083
1083
  exports.createBlueprint = _2d.createBlueprint;
1084
1084
  exports.curve2dBoundingBox = _2d.curve2dBoundingBox;
1085
1085
  exports.curve2dDistanceFrom = _2d.curve2dDistanceFrom;
@@ -1089,28 +1089,18 @@ exports.curve2dLastPoint = _2d.curve2dLastPoint;
1089
1089
  exports.curve2dParameter = _2d.curve2dParameter;
1090
1090
  exports.curve2dSplitAt = _2d.curve2dSplitAt;
1091
1091
  exports.curve2dTangentAt = _2d.curve2dTangentAt;
1092
- exports.cutBlueprint2D = _2d.cutBlueprint2D;
1093
- exports.fuseBlueprint2D = _2d.fuseBlueprint2D;
1094
1092
  exports.getBounds2D = _2d.getBounds2D;
1095
1093
  exports.getOrientation2D = _2d.getOrientation2D;
1096
- exports.intersectBlueprint2D = _2d.intersectBlueprint2D;
1097
1094
  exports.isInside2D = _2d.isInside2D;
1098
1095
  exports.mirror2D = _2d.mirror2D;
1099
- exports.mirrorBlueprint = _2d.mirrorBlueprint;
1100
1096
  exports.reverseCurve = _2d.reverseCurve;
1101
1097
  exports.rotate2D = _2d.rotate2D;
1102
- exports.rotateBlueprint = _2d.rotateBlueprint;
1103
1098
  exports.scale2D = _2d.scale2D;
1104
- exports.scaleBlueprint = _2d.scaleBlueprint;
1105
1099
  exports.sketch2DOnFace = _2d.sketch2DOnFace;
1106
1100
  exports.sketch2DOnPlane = _2d.sketch2DOnPlane;
1107
- exports.sketchBlueprintOnFace = _2d.sketchBlueprintOnFace;
1108
- exports.sketchBlueprintOnPlane = _2d.sketchBlueprintOnPlane;
1109
1101
  exports.stretch2D = _2d.stretch2D;
1110
- exports.stretchBlueprint = _2d.stretchBlueprint;
1111
1102
  exports.toSVGPathD = _2d.toSVGPathD;
1112
1103
  exports.translate2D = _2d.translate2D;
1113
- exports.translateBlueprint = _2d.translateBlueprint;
1114
1104
  exports.cornerFinder = query.cornerFinder;
1115
1105
  exports.edgeFinder = query.edgeFinder;
1116
1106
  exports.faceFinder = query.faceFinder;
@@ -1207,7 +1197,7 @@ exports.iterWires = shapeFns.iterWires;
1207
1197
  exports.vertexPosition = shapeFns.vertexPosition;
1208
1198
  exports.adjacentFaces = topology.adjacentFaces;
1209
1199
  exports.autoHeal = topology.autoHeal;
1210
- exports.chamferDistAngleShape = topology.chamferDistAngleShape;
1200
+ exports.chamferDistAngleShape = topology.chamferDistAngle;
1211
1201
  exports.edgesOfFace = topology.edgesOfFace;
1212
1202
  exports.facesOfEdge = topology.facesOfEdge;
1213
1203
  exports.healFace = topology.healFace;
@@ -1252,7 +1242,7 @@ exports.measureVolume = measurement.measureVolume;
1252
1242
  exports.measureVolumeProps = measurement.measureVolumeProps;
1253
1243
  exports.asTopo = cast.asTopo;
1254
1244
  exports.cast = cast.cast;
1255
- exports.deserializeShape = cast.deserializeShape;
1245
+ exports.deserializeShape = cast.fromBREP;
1256
1246
  exports.downcast = cast.downcast;
1257
1247
  exports.isCompSolid = cast.isCompSolid;
1258
1248
  exports.iterTopo = cast.iterTopo;
@@ -1307,7 +1297,6 @@ exports.isChamferRadius = isChamferRadius;
1307
1297
  exports.isEmpty = isEmpty;
1308
1298
  exports.isFilletRadius = isFilletRadius;
1309
1299
  exports.isNumber = isNumber;
1310
- exports.isPoint = isPoint;
1311
1300
  exports.isValid = isValid;
1312
1301
  exports.kernelCall = kernelCall;
1313
1302
  exports.kernelCallRaw = kernelCallRaw;