brepjs 18.118.14 → 18.118.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/brepjs.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_textBlueprints = require("./textBlueprints-D5mNvqKF.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-LhCdarzc.cjs");
3
3
  const require_shapeTypes = require("./shapeTypes-C4gRoPYX.cjs");
4
4
  const require_occtWasmAdapter = require("./occtWasmAdapter-CWX5KCl8.cjs");
5
5
  const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
@@ -17,18 +17,18 @@ const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
17
17
  const require_surfaceBuilders = require("./surfaceBuilders-DWHDogVL.cjs");
18
18
  const require_solidBuilders = require("./solidBuilders-CHzmSo67.cjs");
19
19
  const require_healingFns = require("./healingFns-BZ-TOacm.cjs");
20
- const require_threadFns = require("./threadFns-DDcOeRGs.cjs");
20
+ const require_threadFns = require("./threadFns-BTFqC3XF.cjs");
21
21
  const require_blueprintSketcher = require("./blueprintSketcher-CGnohIOe.cjs");
22
22
  const require_helpers = require("./helpers-D0be4TzF.cjs");
23
- const require_drawFns = require("./drawFns-CMyY6ED-.cjs");
23
+ const require_drawFns = require("./drawFns-DkgFZ0pe.cjs");
24
24
  const require_measureFns = require("./measureFns-cK6MSs6B.cjs");
25
25
  const require_cornerFinder = require("./cornerFinder-Bss_mZV9.cjs");
26
26
  const require_boolean2D = require("./boolean2D-DnBT9gQ5.cjs");
27
27
  const require_blueprintFns = require("./blueprintFns-CF-6WzuR.cjs");
28
28
  const require_importFns = require("./importFns-CvlUuJ59.cjs");
29
- const require_loftFns = require("./loftFns-BTWRncKQ.cjs");
29
+ const require_loftFns = require("./loftFns-Dp5LpTWq.cjs");
30
30
  const require_cameraFns = require("./cameraFns-Ckw5prda.cjs");
31
- const require_textMetrics = require("./textMetrics-CgyvE6u0.cjs");
31
+ const require_textMetrics = require("./textMetrics-DAx0Uue6.cjs");
32
32
  const require_adjacencyFns = require("./adjacencyFns-BdxIbZtR.cjs");
33
33
  const require_refResolveFns = require("./refResolveFns-BLM5XlZR.cjs");
34
34
  const require_workerPool = require("./workerPool-D30NsiIW.cjs");
@@ -3955,16 +3955,22 @@ function rectangularPattern(shape, options) {
3955
3955
  const xNorm = require_vecOps.vecNormalize(xDir);
3956
3956
  const yNorm = require_vecOps.vecNormalize(yDir);
3957
3957
  const copies = [s];
3958
+ const owned = [];
3958
3959
  for (let xi = 0; xi < xCount; xi++) for (let yi = 0; yi < yCount; yi++) {
3959
3960
  if (xi === 0 && yi === 0) continue;
3960
- const offset = [
3961
+ const c = require_shapeFns.translate(s, [
3961
3962
  xNorm[0] * xSpacing * xi + yNorm[0] * ySpacing * yi,
3962
3963
  xNorm[1] * xSpacing * xi + yNorm[1] * ySpacing * yi,
3963
3964
  xNorm[2] * xSpacing * xi + yNorm[2] * ySpacing * yi
3964
- ];
3965
- copies.push(require_shapeFns.translate(s, offset));
3965
+ ]);
3966
+ copies.push(c);
3967
+ owned.push(c);
3968
+ }
3969
+ try {
3970
+ return require_solidBuilders.fuseAll(copies, { unsafe: true });
3971
+ } finally {
3972
+ for (const c of owned) c[Symbol.dispose]();
3966
3973
  }
3967
- return require_solidBuilders.fuseAll(copies, { unsafe: true });
3968
3974
  }
3969
3975
  //#endregion
3970
3976
  //#region src/topology/wrapperFns.ts
package/dist/brepjs.js CHANGED
@@ -15,19 +15,19 @@ import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayA
15
15
  import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, r as makeFace, s as assembleWire } from "./surfaceBuilders-HAF4Xtow.js";
16
16
  import { _ as section$1, b as split$1, d as booleanPipeline, f as cut$2, g as intersect$2, h as fuseAll$2, m as fuse$2, p as cutAll$2, r as makeCylinder, t as makeCompound, v as sectionToFace$1, y as slice$1 } from "./solidBuilders-CgEPRock.js";
17
17
  import { A as toBufferGeometryData, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, M as toLODGeometryData, N as toLODGeometryLevels, O as getNurbsSurfaceData, P as toLineGeometryData, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, c as isValid$1, d as draft$1, f as fillet$1, g as variableFillet, h as thicken$1, i as heal$1, j as toGroupedBufferGeometryData, k as chamferDistAngle, l as solidFromShell, m as shell$1, n as fixSelfIntersection, o as healSolid, p as offset$1, r as fixShape, s as healWire, t as autoHeal, u as chamfer$1, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution } from "./healingFns-BhB_G0L0.js";
18
- import { A as setJointValue, B as createAssemblyNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as quatMultiply, G as circularPattern, H as removeChild, I as quatRotate, J as exportAssemblySTEP, K as gridPattern, L as addChild, M as sphericalJoint, N as quatFromAxisAngle, O as prismaticJoint, P as quatFromTo, R as collectShapes, S as addJoint, T as jointTransform, U as updateNode, V as findNode, W as walkAssembly, Y as createAssembly, _ as exportURDF, a as deserializeHistory, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, p as serializeHistory, q as linearPattern, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as countNodes } from "./threadFns-Dsn9lSDD.js";
18
+ import { A as setJointValue, B as createAssemblyNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as quatMultiply, G as circularPattern, H as removeChild, I as quatRotate, J as exportAssemblySTEP, K as gridPattern, L as addChild, M as sphericalJoint, N as quatFromAxisAngle, O as prismaticJoint, P as quatFromTo, R as collectShapes, S as addJoint, T as jointTransform, U as updateNode, V as findNode, W as walkAssembly, Y as createAssembly, _ as exportURDF, a as deserializeHistory, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, p as serializeHistory, q as linearPattern, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as countNodes } from "./threadFns-D8l2-Gek.js";
19
19
  import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-CY9DgQqk.js";
20
20
  import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-zVYq0h_A.js";
21
- import { A as sketchEllipse, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-hOQecCHR.js";
21
+ import { A as sketchEllipse, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-ChMP3Ysr.js";
22
22
  import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, i as measureCurvatureAtMid, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, r as measureCurvatureAt, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-Bbgcgo9U.js";
23
23
  import { t as cornerFinder } from "./cornerFinder-BEe90gzY.js";
24
24
  import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-CaAwVwCR.js";
25
25
  import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, n as createCompoundBlueprint, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-Ci1QVESM.js";
26
26
  import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-TbwuxynG.js";
27
- import { a as revolve$1, c as multiSectionSweep, d as twistExtrude, i as extrudeAll, l as supportExtrude, n as loftAll, o as complexExtrude, r as extrude$1, s as guidedSweep, t as loft$1, u as sweep$1 } from "./loftFns-CUg8_4_X.js";
28
- import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, n as getFont, o as compoundSketchExtrude, p as sketchRevolve, r as loadFont, s as compoundSketchFace, t as textBlueprints, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-DBjpb8G_.js";
27
+ import { a as revolve$1, c as multiSectionSweep, d as twistExtrude, i as extrudeAll, l as supportExtrude, n as loftAll, o as complexExtrude, r as extrude$1, s as guidedSweep, t as loft$1, u as sweep$1 } from "./loftFns-DdTfJpXF.js";
28
+ import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, n as getFont, o as compoundSketchExtrude, p as sketchRevolve, r as loadFont, s as compoundSketchFace, t as textBlueprints, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-DQ8gY3Z1.js";
29
29
  import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-CythF7Ob.js";
30
- import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-C7pEipGp.js";
30
+ import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-janJT7Ie.js";
31
31
  import { a as sharedEdges, c as wiresOfFace, i as facesOfVertex, n as edgesOfFace, o as verticesOfEdge, r as facesOfEdge, s as verticesOfFace, t as adjacentFaces } from "./adjacencyFns-qxeJWyj-.js";
32
32
  import { _ as createRef, a as isVertexRef, b as defaultScorer, c as resolveRefParams, d as createVertexRef, f as resolveVertexRef, g as captureHint, h as assignRoles, i as isLineageRef, l as createDerivedFaceRef, m as resolveEdgeRef, n as isEdgeRef, o as resolveLineageRef, p as createEdgeRef, r as isFaceRef, s as resolveRefIn, t as isDerivedFaceRef, u as resolveDerivedFaceRef, v as resolveRef, y as updateRoles } from "./refResolveFns-_niAxNu8.js";
33
33
  import { _ as isSuccessResponse, a as createWorkerClient, c as enqueueTask, d as rejectAll, f as isBatchRequest, g as isOperationRequest, h as isInitRequest, i as registerHandler, l as isEmpty$1, m as isErrorResponse, n as createOperationRegistry, o as createTaskQueue, p as isDisposeRequest, r as createWorkerHandler, s as dequeueTask, t as createWorkerPool, u as pendingCount } from "./workerPool-XcYX2UZ0.js";
@@ -3958,16 +3958,22 @@ function rectangularPattern(shape, options) {
3958
3958
  const xNorm = vecNormalize(xDir);
3959
3959
  const yNorm = vecNormalize(yDir);
3960
3960
  const copies = [s];
3961
+ const owned = [];
3961
3962
  for (let xi = 0; xi < xCount; xi++) for (let yi = 0; yi < yCount; yi++) {
3962
3963
  if (xi === 0 && yi === 0) continue;
3963
- const offset = [
3964
+ const c = translate$2(s, [
3964
3965
  xNorm[0] * xSpacing * xi + yNorm[0] * ySpacing * yi,
3965
3966
  xNorm[1] * xSpacing * xi + yNorm[1] * ySpacing * yi,
3966
3967
  xNorm[2] * xSpacing * xi + yNorm[2] * ySpacing * yi
3967
- ];
3968
- copies.push(translate$2(s, offset));
3968
+ ]);
3969
+ copies.push(c);
3970
+ owned.push(c);
3971
+ }
3972
+ try {
3973
+ return fuseAll$2(copies, { unsafe: true });
3974
+ } finally {
3975
+ for (const c of owned) c[Symbol.dispose]();
3969
3976
  }
3970
- return fuseAll$2(copies, { unsafe: true });
3971
3977
  }
3972
3978
  //#endregion
3973
3979
  //#region src/topology/wrapperFns.ts
@@ -15,7 +15,7 @@ import { _ as samePoint$1, b as subtract2d, c as PRECISION_OFFSET, l as add2d, y
15
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-dqI319c7.js";
16
16
  import { t as cornerFinder } from "./cornerFinder-BEe90gzY.js";
17
17
  import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-CaAwVwCR.js";
18
- import { _ as wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-DBjpb8G_.js";
18
+ import { _ as wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-DQ8gY3Z1.js";
19
19
  import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-CythF7Ob.js";
20
20
  //#region src/2d/lib/stitching.ts
21
21
  /**
@@ -1,4 +1,4 @@
1
- const require_textBlueprints = require("./textBlueprints-D5mNvqKF.cjs");
1
+ const require_textBlueprints = require("./textBlueprints-LhCdarzc.cjs");
2
2
  const require_shapeTypes = require("./shapeTypes-C4gRoPYX.cjs");
3
3
  const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
4
4
  const require_errors = require("./errors-CXJtc4I7.cjs");
@@ -268,24 +268,31 @@ function multiSectionSweep(sections, spine, options) {
268
268
  const paramsResult = computeSectionParams(sections, spine, kernel);
269
269
  if (isErr(paramsResult)) return paramsResult;
270
270
  const params = paramsResult.value;
271
+ const positioned = [];
271
272
  const positionedWires = [];
272
- for (let i = 0; i < sections.length; i++) {
273
- const param = params[i];
274
- const section = sections[i];
275
- if (param === void 0 || section === void 0) continue;
276
- const positioned = kernel.positionOnCurve(section.wire.wrapped, spine.wrapped, param);
277
- positionedWires.push(kernel.downcast(positioned, "wire"));
278
- }
279
- const result = castResultShape(kernel.loftAdvanced(positionedWires, {
280
- solid,
281
- ruled,
282
- tolerance
283
- }));
284
- if (!isShape3D(result)) {
285
- disposeResultShape(result);
286
- return err(typeCastError("MULTI_SWEEP_NOT_3D", "Multi-section sweep did not produce a 3D shape"));
273
+ try {
274
+ for (let i = 0; i < sections.length; i++) {
275
+ const param = params[i];
276
+ const section = sections[i];
277
+ if (param === void 0 || section === void 0) continue;
278
+ const p = kernel.positionOnCurve(section.wire.wrapped, spine.wrapped, param);
279
+ positioned.push(p);
280
+ positionedWires.push(kernel.downcast(p, "wire"));
281
+ }
282
+ const result = castResultShape(kernel.loftAdvanced(positionedWires, {
283
+ solid,
284
+ ruled,
285
+ tolerance
286
+ }));
287
+ if (!isShape3D(result)) {
288
+ disposeResultShape(result);
289
+ return err(typeCastError("MULTI_SWEEP_NOT_3D", "Multi-section sweep did not produce a 3D shape"));
290
+ }
291
+ return ok(result);
292
+ } finally {
293
+ for (const w of positionedWires) kernel.dispose(w);
294
+ for (const p of positioned) kernel.dispose(p);
287
295
  }
288
- return ok(result);
289
296
  } catch (e) {
290
297
  const raw = e instanceof Error ? e.message : String(e);
291
298
  return err(kernelError(BrepErrorCode.MULTI_SWEEP_FAILED, `Multi-section sweep failed: ${raw}`, e, void 0, "Common causes: profile too large for path curvature, self-intersecting result, or discontinuous path. Try simplifying the profile or path."));
@@ -268,24 +268,31 @@ function multiSectionSweep(sections, spine, options) {
268
268
  const paramsResult = computeSectionParams(sections, spine, kernel);
269
269
  if (require_errors.isErr(paramsResult)) return paramsResult;
270
270
  const params = paramsResult.value;
271
+ const positioned = [];
271
272
  const positionedWires = [];
272
- for (let i = 0; i < sections.length; i++) {
273
- const param = params[i];
274
- const section = sections[i];
275
- if (param === void 0 || section === void 0) continue;
276
- const positioned = kernel.positionOnCurve(section.wire.wrapped, spine.wrapped, param);
277
- positionedWires.push(kernel.downcast(positioned, "wire"));
278
- }
279
- const result = require_shapeTypes.castResultShape(kernel.loftAdvanced(positionedWires, {
280
- solid,
281
- ruled,
282
- tolerance
283
- }));
284
- if (!require_shapeTypes.isShape3D(result)) {
285
- require_shapeTypes.disposeResultShape(result);
286
- return require_errors.err(require_errors.typeCastError("MULTI_SWEEP_NOT_3D", "Multi-section sweep did not produce a 3D shape"));
273
+ try {
274
+ for (let i = 0; i < sections.length; i++) {
275
+ const param = params[i];
276
+ const section = sections[i];
277
+ if (param === void 0 || section === void 0) continue;
278
+ const p = kernel.positionOnCurve(section.wire.wrapped, spine.wrapped, param);
279
+ positioned.push(p);
280
+ positionedWires.push(kernel.downcast(p, "wire"));
281
+ }
282
+ const result = require_shapeTypes.castResultShape(kernel.loftAdvanced(positionedWires, {
283
+ solid,
284
+ ruled,
285
+ tolerance
286
+ }));
287
+ if (!require_shapeTypes.isShape3D(result)) {
288
+ require_shapeTypes.disposeResultShape(result);
289
+ return require_errors.err(require_errors.typeCastError("MULTI_SWEEP_NOT_3D", "Multi-section sweep did not produce a 3D shape"));
290
+ }
291
+ return require_errors.ok(result);
292
+ } finally {
293
+ for (const w of positionedWires) kernel.dispose(w);
294
+ for (const p of positioned) kernel.dispose(p);
287
295
  }
288
- return require_errors.ok(result);
289
296
  } catch (e) {
290
297
  const raw = e instanceof Error ? e.message : String(e);
291
298
  return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.MULTI_SWEEP_FAILED, `Multi-section sweep failed: ${raw}`, e, void 0, "Common causes: profile too large for path curvature, self-intersecting result, or discontinuous path. Try simplifying the profile or path."));
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_threadFns = require("./threadFns-DDcOeRGs.cjs");
3
- const require_loftFns = require("./loftFns-BTWRncKQ.cjs");
2
+ const require_threadFns = require("./threadFns-BTFqC3XF.cjs");
3
+ const require_loftFns = require("./loftFns-Dp5LpTWq.cjs");
4
4
  exports.addChild = require_threadFns.addChild;
5
5
  exports.addJoint = require_threadFns.addJoint;
6
6
  exports.addStep = require_threadFns.addStep;
@@ -1,3 +1,3 @@
1
- import { A as setJointValue, B as createAssemblyNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, G as circularPattern, H as removeChild, J as exportAssemblySTEP, K as gridPattern, L as addChild, M as sphericalJoint, O as prismaticJoint, R as collectShapes, S as addJoint, T as jointTransform, U as updateNode, V as findNode, W as walkAssembly, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, q as linearPattern, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as countNodes } from "./threadFns-Dsn9lSDD.js";
2
- import { d as twistExtrude, l as supportExtrude, o as complexExtrude, u as sweep } from "./loftFns-CUg8_4_X.js";
1
+ import { A as setJointValue, B as createAssemblyNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, G as circularPattern, H as removeChild, J as exportAssemblySTEP, K as gridPattern, L as addChild, M as sphericalJoint, O as prismaticJoint, R as collectShapes, S as addJoint, T as jointTransform, U as updateNode, V as findNode, W as walkAssembly, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, q as linearPattern, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as countNodes } from "./threadFns-D8l2-Gek.js";
2
+ import { d as twistExtrude, l as supportExtrude, o as complexExtrude, u as sweep } from "./loftFns-DdTfJpXF.js";
3
3
  export { addChild, addJoint, addStep, circularPattern, collectShapes, complexExtrude, countNodes, createAssembly, createAssemblyNode, createHistory, createRegistry, cylindricalJoint, exportAssemblySTEP, exportURDF, findNode, findStep, forwardKinematics, getShape as getHistoryShape, gridPattern, importURDF, inverseKinematics, jointTrajectory, jointTransform, jointsFromDH, linearPattern, mechanismDOF, modifyStep, planarJoint, prismaticJoint, registerOperation, registerShape, removeChild, replayFrom, replayHistory, revoluteJoint, setJointValue, setJointValues, sphericalJoint, stepCount, stepsFrom, supportExtrude, sweep, thread, twistExtrude, undoLast, updateNode, walkAssembly };
@@ -26,7 +26,15 @@ export default class CompoundSketch implements SketchInterface {
26
26
  get outerSketch(): Sketch;
27
27
  /** Get the hole sketches (all but the first). */
28
28
  get innerSketches(): Sketch[];
29
- /** Return all wires (outer + holes) combined into a compound shape. */
29
+ /**
30
+ * All wires (outer + holes) combined into a compound shape.
31
+ *
32
+ * @remarks Allocates a **fresh** compound on every access (via `makeCompound`)
33
+ * — it is a caller-owned kernel resource, not a cheap accessor. Dispose the
34
+ * returned compound (`using`/`.delete()` → `Symbol.dispose`) or it leaks an
35
+ * arena slot on arena kernels. The sub-sketch wires themselves belong to this
36
+ * CompoundSketch and are freed with it.
37
+ */
30
38
  get wires(): import('../core/shapeTypes.js').Compound;
31
39
  /** Build a face from the outer boundary with inner wires subtracted as holes. */
32
40
  face(): Face;
@@ -33,7 +33,13 @@ export default class Sketches implements SketchInterface {
33
33
  loftWith(otherSketches: SketchInterface | SketchInterface[], loftConfig?: LoftOptions, returnShell?: boolean): Shape3D;
34
34
  /** Sweep a profile along the sole contained sketch's wire. */
35
35
  sweepSketch(sketchOnPlane: (plane: Plane, origin: Vec3) => SketchInterface, sweepConfig?: SweepOptions): Shape3D;
36
- /** Return all wires combined into a single compound shape. */
36
+ /**
37
+ * All contour wires combined into a single compound shape.
38
+ *
39
+ * @remarks Allocates a **fresh** compound on every call — the result is a
40
+ * caller-owned kernel resource. Dispose it (`using`/`Symbol.dispose`) or it
41
+ * leaks an arena slot on arena kernels.
42
+ */
37
43
  wires(): Compound;
38
44
  /** Return all sketch faces combined into a single compound shape. */
39
45
  faces(): Compound;
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_textBlueprints = require("./textBlueprints-D5mNvqKF.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-LhCdarzc.cjs");
3
3
  const require_blueprintSketcher = require("./blueprintSketcher-CGnohIOe.cjs");
4
- const require_drawFns = require("./drawFns-CMyY6ED-.cjs");
4
+ const require_drawFns = require("./drawFns-DkgFZ0pe.cjs");
5
5
  //#region src/sketching.ts
6
6
  /**
7
7
  * brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
package/dist/sketching.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-CY9DgQqk.js";
2
- import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-hOQecCHR.js";
3
- import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, o as compoundSketchExtrude, p as sketchRevolve, s as compoundSketchFace, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-DBjpb8G_.js";
2
+ import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-ChMP3Ysr.js";
3
+ import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, o as compoundSketchExtrude, p as sketchRevolve, s as compoundSketchFace, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-DQ8gY3Z1.js";
4
4
  //#region src/sketching.ts
5
5
  /**
6
6
  * brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
package/dist/text.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_textBlueprints = require("./textBlueprints-D5mNvqKF.cjs");
3
- const require_textMetrics = require("./textMetrics-CgyvE6u0.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-LhCdarzc.cjs");
3
+ const require_textMetrics = require("./textMetrics-DAx0Uue6.cjs");
4
4
  exports.fontMetrics = require_textMetrics.fontMetrics;
5
5
  exports.getFont = require_textBlueprints.getFont;
6
6
  exports.loadFont = require_textBlueprints.loadFont;
package/dist/text.js CHANGED
@@ -1,3 +1,3 @@
1
- import { n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-DBjpb8G_.js";
2
- import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-C7pEipGp.js";
1
+ import { n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-DQ8gY3Z1.js";
2
+ import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-janJT7Ie.js";
3
3
  export { fontMetrics, getFont, loadFont, sketchText, textBlueprints, textMetrics };
@@ -9,7 +9,7 @@ import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js"
9
9
  import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-HAF4Xtow.js";
10
10
  import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-CgEPRock.js";
11
11
  import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-CY9DgQqk.js";
12
- import { a as revolve, d as twistExtrude, o as complexExtrude, r as extrude, t as loft, u as sweep } from "./loftFns-CUg8_4_X.js";
12
+ import { a as revolve, d as twistExtrude, o as complexExtrude, r as extrude, t as loft, u as sweep } from "./loftFns-DdTfJpXF.js";
13
13
  import opentype from "opentype.js";
14
14
  //#region src/sketching/compoundSketch.ts
15
15
  /**
@@ -46,7 +46,15 @@ var CompoundSketch = class CompoundSketch {
46
46
  get innerSketches() {
47
47
  return this.sketches.slice(1);
48
48
  }
49
- /** Return all wires (outer + holes) combined into a compound shape. */
49
+ /**
50
+ * All wires (outer + holes) combined into a compound shape.
51
+ *
52
+ * @remarks Allocates a **fresh** compound on every access (via `makeCompound`)
53
+ * — it is a caller-owned kernel resource, not a cheap accessor. Dispose the
54
+ * returned compound (`using`/`.delete()` → `Symbol.dispose`) or it leaks an
55
+ * arena slot on arena kernels. The sub-sketch wires themselves belong to this
56
+ * CompoundSketch and are freed with it.
57
+ */
50
58
  get wires() {
51
59
  return compoundSketchWires(this);
52
60
  }
@@ -463,9 +471,15 @@ var Sketches = class {
463
471
  sweepSketch(sketchOnPlane, sweepConfig) {
464
472
  return this.soleSketch("sweepSketch").sweepSketch(sketchOnPlane, sweepConfig);
465
473
  }
466
- /** Return all wires combined into a single compound shape. */
474
+ /**
475
+ * All contour wires combined into a single compound shape.
476
+ *
477
+ * @remarks Allocates a **fresh** compound on every call — the result is a
478
+ * caller-owned kernel resource. Dispose it (`using`/`Symbol.dispose`) or it
479
+ * leaks an arena slot on arena kernels.
480
+ */
467
481
  wires() {
468
- return makeCompound(this.sketches.map((s) => s instanceof Sketch ? s.wire : s.wires));
482
+ return makeCompound(this.sketches.flatMap((s) => s instanceof Sketch ? [s.wire] : s.sketches.map((sub) => sub.wire)));
469
483
  }
470
484
  /** Return all sketch faces combined into a single compound shape. */
471
485
  faces() {
@@ -40,7 +40,7 @@ const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
40
40
  const require_surfaceBuilders = require("./surfaceBuilders-DWHDogVL.cjs");
41
41
  const require_solidBuilders = require("./solidBuilders-CHzmSo67.cjs");
42
42
  const require_blueprintSketcher = require("./blueprintSketcher-CGnohIOe.cjs");
43
- const require_loftFns = require("./loftFns-BTWRncKQ.cjs");
43
+ const require_loftFns = require("./loftFns-Dp5LpTWq.cjs");
44
44
  let opentype_js = require("opentype.js");
45
45
  opentype_js = __toESM(opentype_js, 1);
46
46
  //#region src/sketching/compoundSketch.ts
@@ -78,7 +78,15 @@ var CompoundSketch = class CompoundSketch {
78
78
  get innerSketches() {
79
79
  return this.sketches.slice(1);
80
80
  }
81
- /** Return all wires (outer + holes) combined into a compound shape. */
81
+ /**
82
+ * All wires (outer + holes) combined into a compound shape.
83
+ *
84
+ * @remarks Allocates a **fresh** compound on every access (via `makeCompound`)
85
+ * — it is a caller-owned kernel resource, not a cheap accessor. Dispose the
86
+ * returned compound (`using`/`.delete()` → `Symbol.dispose`) or it leaks an
87
+ * arena slot on arena kernels. The sub-sketch wires themselves belong to this
88
+ * CompoundSketch and are freed with it.
89
+ */
82
90
  get wires() {
83
91
  return compoundSketchWires(this);
84
92
  }
@@ -495,9 +503,15 @@ var Sketches = class {
495
503
  sweepSketch(sketchOnPlane, sweepConfig) {
496
504
  return this.soleSketch("sweepSketch").sweepSketch(sketchOnPlane, sweepConfig);
497
505
  }
498
- /** Return all wires combined into a single compound shape. */
506
+ /**
507
+ * All contour wires combined into a single compound shape.
508
+ *
509
+ * @remarks Allocates a **fresh** compound on every call — the result is a
510
+ * caller-owned kernel resource. Dispose it (`using`/`Symbol.dispose`) or it
511
+ * leaks an arena slot on arena kernels.
512
+ */
499
513
  wires() {
500
- return require_solidBuilders.makeCompound(this.sketches.map((s) => s instanceof Sketch ? s.wire : s.wires));
514
+ return require_solidBuilders.makeCompound(this.sketches.flatMap((s) => s instanceof Sketch ? [s.wire] : s.sketches.map((sub) => sub.wire)));
501
515
  }
502
516
  /** Return all sketch faces combined into a single compound shape. */
503
517
  faces() {
@@ -1,4 +1,4 @@
1
- const require_textBlueprints = require("./textBlueprints-D5mNvqKF.cjs");
1
+ const require_textBlueprints = require("./textBlueprints-LhCdarzc.cjs");
2
2
  const require_errors = require("./errors-CXJtc4I7.cjs");
3
3
  //#region src/text/sketchText.ts
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
2
- import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-DBjpb8G_.js";
2
+ import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-DQ8gY3Z1.js";
3
3
  //#region src/text/sketchText.ts
4
4
  /**
5
5
  * Render text as 3D sketch outlines on a plane.
@@ -4,7 +4,7 @@ const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
4
4
  const require_faceFns = require("./faceFns-BbmIuuFt.cjs");
5
5
  const require_shapeFns = require("./shapeFns-m5OBBpM4.cjs");
6
6
  const require_solidBuilders = require("./solidBuilders-CHzmSo67.cjs");
7
- const require_loftFns = require("./loftFns-BTWRncKQ.cjs");
7
+ const require_loftFns = require("./loftFns-Dp5LpTWq.cjs");
8
8
  const require_refResolveFns = require("./refResolveFns-BLM5XlZR.cjs");
9
9
  const require_primitiveFns = require("./primitiveFns-DZkzMLUq.cjs");
10
10
  //#region src/utils/uuid.ts
@@ -4,7 +4,7 @@ import { d as vecNormalize, s as vecIsZero } from "./vecOps-SKPRvPH-.js";
4
4
  import { b as fromBREP } from "./faceFns-ClvSac1T.js";
5
5
  import { s as toBREP } from "./shapeFns-Gzaax25v.js";
6
6
  import { h as fuseAll } from "./solidBuilders-CgEPRock.js";
7
- import { t as loft } from "./loftFns-CUg8_4_X.js";
7
+ import { t as loft } from "./loftFns-DdTfJpXF.js";
8
8
  import { c as resolveRefParams } from "./refResolveFns-_niAxNu8.js";
9
9
  import { E as wire, h as line } from "./primitiveFns-1otQpjcN.js";
10
10
  //#region src/utils/uuid.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brepjs",
3
- "version": "18.118.14",
3
+ "version": "18.118.16",
4
4
  "description": "Web CAD library with pluggable geometry kernel",
5
5
  "keywords": [
6
6
  "cad",