brepjs 18.19.0 → 18.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/brepjs.cjs +5 -1
- package/dist/brepjs.js +4 -2
- package/dist/index.d.ts +3 -1
- package/dist/ns/booleans.d.ts +1 -0
- package/dist/{primitiveFns-DF5IAVNP.js → primitiveFns-BsO-feBX.js} +126 -1
- package/dist/{primitiveFns-YpYBx4Pd.cjs → primitiveFns-CkMua35m.cjs} +137 -0
- package/dist/topology/booleanBatchFns.d.ts +55 -0
- package/dist/topology.cjs +3 -1
- package/dist/topology.d.ts +1 -0
- package/dist/topology.js +2 -2
- package/package.json +1 -1
package/dist/brepjs.cjs
CHANGED
|
@@ -16,7 +16,7 @@ const require_meshFns = require("./meshFns-CFMr9FBb.cjs");
|
|
|
16
16
|
const require_arrayAccess = require("./arrayAccess-7pTWqkJu.cjs");
|
|
17
17
|
const require_surfaceBuilders = require("./surfaceBuilders-frj7YRrD.cjs");
|
|
18
18
|
const require_booleanFns = require("./booleanFns-CD25YZGm.cjs");
|
|
19
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
19
|
+
const require_primitiveFns = require("./primitiveFns-CkMua35m.cjs");
|
|
20
20
|
const require_historyFns = require("./historyFns-DHOoBh6G.cjs");
|
|
21
21
|
const require_blueprintSketcher = require("./blueprintSketcher-Cr9A-R8I.cjs");
|
|
22
22
|
const require_helpers = require("./helpers-BU3ANziG.cjs");
|
|
@@ -3303,8 +3303,10 @@ var booleans_exports = /* @__PURE__ */ require_textBlueprints.__exportAll({
|
|
|
3303
3303
|
convexHull: () => convexHull,
|
|
3304
3304
|
cut: () => cut,
|
|
3305
3305
|
cutAll: () => require_booleanFns.cutAll,
|
|
3306
|
+
cutAllBisect: () => require_primitiveFns.cutAllBisect,
|
|
3306
3307
|
fuse: () => fuse,
|
|
3307
3308
|
fuseAll: () => require_booleanFns.fuseAll,
|
|
3309
|
+
fuseAllBisect: () => require_primitiveFns.fuseAllBisect,
|
|
3308
3310
|
hull: () => hull,
|
|
3309
3311
|
intersect: () => intersect,
|
|
3310
3312
|
minkowski: () => minkowski,
|
|
@@ -5229,6 +5231,7 @@ exports.curveTangentAt = require_curveFns.curveTangentAt;
|
|
|
5229
5231
|
exports.cut = cut;
|
|
5230
5232
|
exports.cut2D = require_boolean2D.cut2D;
|
|
5231
5233
|
exports.cutAll = require_booleanFns.cutAll;
|
|
5234
|
+
exports.cutAllBisect = require_primitiveFns.cutAllBisect;
|
|
5232
5235
|
exports.cutBlueprints = require_boolean2D.cutBlueprints;
|
|
5233
5236
|
exports.cutWithEvolution = require_primitiveFns.cutWithEvolution;
|
|
5234
5237
|
exports.cylinder = require_primitiveFns.cylinder;
|
|
@@ -5307,6 +5310,7 @@ exports.fromNullable = require_errors.fromNullable;
|
|
|
5307
5310
|
exports.fuse = fuse;
|
|
5308
5311
|
exports.fuse2D = require_boolean2D.fuse2D;
|
|
5309
5312
|
exports.fuseAll = require_booleanFns.fuseAll;
|
|
5313
|
+
exports.fuseAllBisect = require_primitiveFns.fuseAllBisect;
|
|
5310
5314
|
exports.fuseBlueprints = require_boolean2D.fuseBlueprints;
|
|
5311
5315
|
exports.fuseWithEvolution = require_primitiveFns.fuseWithEvolution;
|
|
5312
5316
|
exports.gearGeometry = gearGeometry;
|
package/dist/brepjs.js
CHANGED
|
@@ -14,7 +14,7 @@ import { a as meshEdges$1, c as createMeshCache, i as mesh$1, n as exportSTEP, o
|
|
|
14
14
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-C5IWcxs9.js";
|
|
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-zJyikeav.js";
|
|
16
16
|
import { a as fuseAll, c as sectionToFace$1, i as fuse$2, l as slice$1, n as cut$2, o as intersect$2, r as cutAll, s as section$1, t as booleanPipeline, u as split$1 } from "./booleanFns-CtvYfQZq.js";
|
|
17
|
-
import { $ as
|
|
17
|
+
import { $ as fuseAllBisect, A as fixShape, B as offset$1, C as threePointArc, D as wireLoop, E as wire, F as isValid$1, G as chamferWithEvolution, H as thicken$1, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, L as chamfer$1, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as cutAllBisect, R as draft$1, S as tangentArc, T as vertex, U as variableFillet, V as shell$1, W as positionOnCurve, X as shellWithEvolution, Y as intersectWithEvolution, Z as checkBoolean, _ as polygon, a as circle, at as sharedEdges, b as sphere, c as cylinder, ct as chamferDistAngle, d as ellipsoid, dt as toLODGeometryData, et as getNurbsCurveData, f as face, ft as toLineGeometryData, g as offsetFace, h as line, i as bsplineApprox, it as facesOfEdge, j as heal$1, k as fixSelfIntersection, l as ellipse, lt as toBufferGeometryData, m as helix, n as bezier, nt as adjacentFaces, o as compound, ot as verticesOfEdge, p as filledFace, q as filletWithEvolution, r as box, rt as edgesOfFace, s as cone, st as wiresOfFace, t as addHoles, tt as getNurbsSurfaceData, u as ellipseArc, ut as toGroupedBufferGeometryData, v as sewShells, w as torus, x as subFace, y as solid, z as fillet$1 } from "./primitiveFns-BsO-feBX.js";
|
|
18
18
|
import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, f as serializeHistory, g as addChild, h as undoLast, i as deserializeHistory, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-XZp1D_aA.js";
|
|
19
19
|
import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-DeEogKbs.js";
|
|
20
20
|
import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-D1J5VHbk.js";
|
|
@@ -3306,8 +3306,10 @@ var booleans_exports = /* @__PURE__ */ __exportAll({
|
|
|
3306
3306
|
convexHull: () => convexHull,
|
|
3307
3307
|
cut: () => cut,
|
|
3308
3308
|
cutAll: () => cutAll,
|
|
3309
|
+
cutAllBisect: () => cutAllBisect,
|
|
3309
3310
|
fuse: () => fuse,
|
|
3310
3311
|
fuseAll: () => fuseAll,
|
|
3312
|
+
fuseAllBisect: () => fuseAllBisect,
|
|
3311
3313
|
hull: () => hull,
|
|
3312
3314
|
intersect: () => intersect,
|
|
3313
3315
|
minkowski: () => minkowski,
|
|
@@ -5096,4 +5098,4 @@ var csg_exports = /* @__PURE__ */ __exportAll({
|
|
|
5096
5098
|
withEvaluator: () => withEvaluator
|
|
5097
5099
|
});
|
|
5098
5100
|
//#endregion
|
|
5099
|
-
export { BaseSketcher2d, BlueprintSketcher, BrepBugError, BrepErrorCode, BrepWrapperError, BrepkitAdapter, CompoundSketch, DEG2RAD, DisposalScope, FaceSketcher, HASH_CODE_MAX, OK, OcctWasmAdapter, RAD2DEG, Sketch, Sketcher, Sketches, addChild, addHoles, addMate, addStep, adjacentFaces, all, andThen, applyGlue, applyMatrix, approximateCurve, as2D, as3D, asTopo, assignRoles, autoHeal, bezier, blueprintToDXF, booleanPipeline, booleans_exports as booleans, boss, box, bsplineApprox, bug, cameraFromPlane, cameraLookAt, captureHint, cast, castShape, castShape3D, chamfer, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkAllInterferences, checkBoolean, checkInterference, circle, circularPattern, classifyPointOnFace, clearMeshCache, clone, closedWire, collect, collectShapes, colorFaces, colorShape, complexExtrude, composeTransforms, compound, compoundSketchExtrude, compoundSketchFace, compoundSketchLoft, compoundSketchRevolve, computationError, computeStraightSkeleton, cone, construction_exports as construction, convexHull, cornerFinder, countNodes, createAssembly, createAssemblyNode, createBlueprint, createCamera, createCompound, createCompoundBlueprint, createDistanceQuery, createEdge, createFace, createHandle, createHistory, createKernelHandle, createMeshCache, createNamedPlane, createOperationRegistry, createPlane, createRef, createRegistry, createShell, createSolid, createTaskQueue, createVertex, createWire, createWorkerClient, createWorkerHandler, csg_exports as csg, curve2dBoundingBox, curve2dDistanceFrom, curve2dFirstPoint, curve2dIsOnCurve, curve2dLastPoint, curve2dParameter, curve2dSplitAt, curve2dTangentAt, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cut, cut2D, cutAll, cutBlueprints, cutWithEvolution, cylinder, defaultScorer, dequeueTask, describe, deserializeDrawing, deserializeHistory, fromBREP as deserializeShape, downcast, draft, draw, drawCircle, drawEllipse, drawFaceOutline, drawParametricFunction, drawPointsInterpolation, drawPolysides, drawProjection, drawRectangle, drawRoundedRectangle, drawSingleCircle, drawSingleEllipse, drawText, drawingChamfer, drawingCut, drawingFillet, drawingFuse, drawingIntersect, drawingToSketchOnPlane, drill, edgeFinder, edgesOfFace, ellipse, ellipseArc, ellipsoid, enqueueTask, err, exportAssemblySTEP, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, extrude, extrudeAll, face, faceCenter, faceFinder, faceGeomType, faceOrientation, facesOfEdge, fill, filledFace, fillet, filletWithEvolution, findFacesByTag, findNode, findStep, fixSelfIntersection, fixShape, flatMap, flatten, flipFaceOrientation, flipOrientation, fontMetrics, fromBREP$1 as fromBREP, fromKernelDir, fromKernelPnt, fromKernelVec, fromNullable, fuse, fuse2D, fuseAll, fuseBlueprints, fuseWithEvolution, gearGeometry, getBounds, getBounds2D, getCurveType, getDisposalStats, getEdges, getFaceColor, getFaceOrigins, getFaceTags, getFaces, getFont, getHashCode, getShape as getHistoryShape, getKernel, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getOrientation2D, getPerformanceStats, getShapeColor, getShapeKind, getSingleFace, getSurfaceType, getTagMetadata, getVertices, getWires, guidedSweep, heal, healFace, healSolid, healWire, helix, hull, importDXF, importGLB, importIGES, importOBJ, importSTEP, importSTL, importSVG, importSVGPathD, importThreeMF, init, initFromOC, innerWires, interpolateCurve, intersect, intersect2D, intersectBlueprints, intersectWithEvolution, invalidateShapeCache, ioNs_exports as io, ioError, is2D, is3D, isChamferRadius, isClosedWire, isCompSolid, isCompound, isDisposeRequest, isEdge, isEmpty, isEqualShape, isErr, isErrorResponse, isFace, isFilletRadius, isInitRequest, isInside2D, isLive, isManifoldShell, isNumber, isOk, isOperationRequest, isOrientedFace, isPlanarFace, isPlanarWire, isProjectionPlane, isEmpty$1 as isQueueEmpty, isSameShape, isShape1D, isShape3D, isShell, isSolid, isSuccessResponse, isValid, isValidSolid, isVertex, isWire, iterEdges, iterFaces, iterTopo, iterVertices, iterWires, kernelCall, kernelCallRaw, kernelCallScoped, kernelError, line, linearPattern, loadFont, loft, loftAll, makeBaseBox, makeExternalGear, makeInternalGear, makePlane, makePlanetaryGear, makeProjectedEdges, manifoldShell, map, mapBoth, mapErr, match, measureArea, measureCurvatureAt, measureCurvatureAtMid, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps, measurement_exports as measurement, mesh, meshEdges, meshMultiLOD, minkowski, mirror, mirror2D, mirrorDrawing, mirrorJoin, modifiers_exports as modifiers, modifyStep, moduleInitError, multiSectionSweep, normalAt, offset, offsetFace, offsetWire2D, ok, or, orElse, organiseBlueprints, orientedFace, outerWire, patterns_exports as patterns, pendingCount, pipeline, pivotPlane, planarFace, planarWire, planetPlacements, pocket, pointOnSurface, polygon, polyhedron, polysideInnerRadius, polysidesBlueprint, positionOnCurve, prewarm, primitives_exports as primitives, projectEdges, projectPointOnFace, query_exports as query, queryError, rectangularPattern, registerHandler, registerKernel, registerOperation, registerShape, rejectAll, removeChild, removeHolesFromFace, replayFrom, replayHistory, resetDisposalStats, resetPerformanceStats, resize, resolve, resolve3D, resolveDirection, resolvePlane, resolveRef, reverseCurve, revolve, roof, rotate, rotate2D, rotateDrawing, roundedRectangleBlueprint, scale, scale2D, scaleDrawing, section, sectionToFace, serializeHistory, setShapeOrigin, setTagMetadata, sewShells, shape, shapeType, sharedEdges, shell, shellWithEvolution, simplify, sketchCircle, sketchEllipse, sketchExtrude, sketchFace, sketchFaceOffset, sketchHelix, sketchLoft, sketchOnFace2D, sketchOnPlane2D, sketchParametricFunction, sketchPolysides, sketchRectangle, sketchRevolve, sketchRoundedRectangle, sketchSweep, sketchText, sketchWires, sketcherStateError, slice, solid, solidFromShell, solveAssembly, sphere, split, stepCount, stepsFrom, stretch2D, subFace, supportExtrude, supportsConstraintSketch, supportsProjection, surfaceFromGrid, surfaceFromImage, sweep, tagFaces, tangentArc, tap, tapErr, textBlueprints, textMetrics, thicken, threePointArc, toBREP, toBufferGeometryData, toGroupedBufferGeometryData, toKernelVec, toLODGeometryData, toLineGeometryData, toSVGPathD, toVec2, toVec3, torus, transformCopy, transforms_exports as transforms, translate, translate2D, translateDrawing, translatePlane, tryCatch, tryCatchAsync, twistExtrude, typeCastError, undoLast, unsupportedError, unwrap, unwrapErr, unwrapOr, unwrapOrElse, updateNode, updateRoles, uvBounds, uvCoordinates, validSolid, validatePlanetary, validationError, variableFillet, vecAdd, vecAngle, vecCross, vecDistance, vecDot, vecEquals, vecIsZero, vecLength, vecLengthSq, vecNegate, vecNormalize, vecProjectToPlane, vecRepr, vecRotate, vecScale, vecSub, vertex, vertexFinder, vertexPosition, verticesOfEdge, walkAssembly, wire, wireFinder, wireLoop, wiresOfFace, withKernel, withKernelDir, withKernelPnt, withKernelVec, withScope, withScopeResult, withScopeResultAsync, zip as zipResults };
|
|
5101
|
+
export { BaseSketcher2d, BlueprintSketcher, BrepBugError, BrepErrorCode, BrepWrapperError, BrepkitAdapter, CompoundSketch, DEG2RAD, DisposalScope, FaceSketcher, HASH_CODE_MAX, OK, OcctWasmAdapter, RAD2DEG, Sketch, Sketcher, Sketches, addChild, addHoles, addMate, addStep, adjacentFaces, all, andThen, applyGlue, applyMatrix, approximateCurve, as2D, as3D, asTopo, assignRoles, autoHeal, bezier, blueprintToDXF, booleanPipeline, booleans_exports as booleans, boss, box, bsplineApprox, bug, cameraFromPlane, cameraLookAt, captureHint, cast, castShape, castShape3D, chamfer, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkAllInterferences, checkBoolean, checkInterference, circle, circularPattern, classifyPointOnFace, clearMeshCache, clone, closedWire, collect, collectShapes, colorFaces, colorShape, complexExtrude, composeTransforms, compound, compoundSketchExtrude, compoundSketchFace, compoundSketchLoft, compoundSketchRevolve, computationError, computeStraightSkeleton, cone, construction_exports as construction, convexHull, cornerFinder, countNodes, createAssembly, createAssemblyNode, createBlueprint, createCamera, createCompound, createCompoundBlueprint, createDistanceQuery, createEdge, createFace, createHandle, createHistory, createKernelHandle, createMeshCache, createNamedPlane, createOperationRegistry, createPlane, createRef, createRegistry, createShell, createSolid, createTaskQueue, createVertex, createWire, createWorkerClient, createWorkerHandler, csg_exports as csg, curve2dBoundingBox, curve2dDistanceFrom, curve2dFirstPoint, curve2dIsOnCurve, curve2dLastPoint, curve2dParameter, curve2dSplitAt, curve2dTangentAt, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cut, cut2D, cutAll, cutAllBisect, cutBlueprints, cutWithEvolution, cylinder, defaultScorer, dequeueTask, describe, deserializeDrawing, deserializeHistory, fromBREP as deserializeShape, downcast, draft, draw, drawCircle, drawEllipse, drawFaceOutline, drawParametricFunction, drawPointsInterpolation, drawPolysides, drawProjection, drawRectangle, drawRoundedRectangle, drawSingleCircle, drawSingleEllipse, drawText, drawingChamfer, drawingCut, drawingFillet, drawingFuse, drawingIntersect, drawingToSketchOnPlane, drill, edgeFinder, edgesOfFace, ellipse, ellipseArc, ellipsoid, enqueueTask, err, exportAssemblySTEP, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, extrude, extrudeAll, face, faceCenter, faceFinder, faceGeomType, faceOrientation, facesOfEdge, fill, filledFace, fillet, filletWithEvolution, findFacesByTag, findNode, findStep, fixSelfIntersection, fixShape, flatMap, flatten, flipFaceOrientation, flipOrientation, fontMetrics, fromBREP$1 as fromBREP, fromKernelDir, fromKernelPnt, fromKernelVec, fromNullable, fuse, fuse2D, fuseAll, fuseAllBisect, fuseBlueprints, fuseWithEvolution, gearGeometry, getBounds, getBounds2D, getCurveType, getDisposalStats, getEdges, getFaceColor, getFaceOrigins, getFaceTags, getFaces, getFont, getHashCode, getShape as getHistoryShape, getKernel, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getOrientation2D, getPerformanceStats, getShapeColor, getShapeKind, getSingleFace, getSurfaceType, getTagMetadata, getVertices, getWires, guidedSweep, heal, healFace, healSolid, healWire, helix, hull, importDXF, importGLB, importIGES, importOBJ, importSTEP, importSTL, importSVG, importSVGPathD, importThreeMF, init, initFromOC, innerWires, interpolateCurve, intersect, intersect2D, intersectBlueprints, intersectWithEvolution, invalidateShapeCache, ioNs_exports as io, ioError, is2D, is3D, isChamferRadius, isClosedWire, isCompSolid, isCompound, isDisposeRequest, isEdge, isEmpty, isEqualShape, isErr, isErrorResponse, isFace, isFilletRadius, isInitRequest, isInside2D, isLive, isManifoldShell, isNumber, isOk, isOperationRequest, isOrientedFace, isPlanarFace, isPlanarWire, isProjectionPlane, isEmpty$1 as isQueueEmpty, isSameShape, isShape1D, isShape3D, isShell, isSolid, isSuccessResponse, isValid, isValidSolid, isVertex, isWire, iterEdges, iterFaces, iterTopo, iterVertices, iterWires, kernelCall, kernelCallRaw, kernelCallScoped, kernelError, line, linearPattern, loadFont, loft, loftAll, makeBaseBox, makeExternalGear, makeInternalGear, makePlane, makePlanetaryGear, makeProjectedEdges, manifoldShell, map, mapBoth, mapErr, match, measureArea, measureCurvatureAt, measureCurvatureAtMid, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps, measurement_exports as measurement, mesh, meshEdges, meshMultiLOD, minkowski, mirror, mirror2D, mirrorDrawing, mirrorJoin, modifiers_exports as modifiers, modifyStep, moduleInitError, multiSectionSweep, normalAt, offset, offsetFace, offsetWire2D, ok, or, orElse, organiseBlueprints, orientedFace, outerWire, patterns_exports as patterns, pendingCount, pipeline, pivotPlane, planarFace, planarWire, planetPlacements, pocket, pointOnSurface, polygon, polyhedron, polysideInnerRadius, polysidesBlueprint, positionOnCurve, prewarm, primitives_exports as primitives, projectEdges, projectPointOnFace, query_exports as query, queryError, rectangularPattern, registerHandler, registerKernel, registerOperation, registerShape, rejectAll, removeChild, removeHolesFromFace, replayFrom, replayHistory, resetDisposalStats, resetPerformanceStats, resize, resolve, resolve3D, resolveDirection, resolvePlane, resolveRef, reverseCurve, revolve, roof, rotate, rotate2D, rotateDrawing, roundedRectangleBlueprint, scale, scale2D, scaleDrawing, section, sectionToFace, serializeHistory, setShapeOrigin, setTagMetadata, sewShells, shape, shapeType, sharedEdges, shell, shellWithEvolution, simplify, sketchCircle, sketchEllipse, sketchExtrude, sketchFace, sketchFaceOffset, sketchHelix, sketchLoft, sketchOnFace2D, sketchOnPlane2D, sketchParametricFunction, sketchPolysides, sketchRectangle, sketchRevolve, sketchRoundedRectangle, sketchSweep, sketchText, sketchWires, sketcherStateError, slice, solid, solidFromShell, solveAssembly, sphere, split, stepCount, stepsFrom, stretch2D, subFace, supportExtrude, supportsConstraintSketch, supportsProjection, surfaceFromGrid, surfaceFromImage, sweep, tagFaces, tangentArc, tap, tapErr, textBlueprints, textMetrics, thicken, threePointArc, toBREP, toBufferGeometryData, toGroupedBufferGeometryData, toKernelVec, toLODGeometryData, toLineGeometryData, toSVGPathD, toVec2, toVec3, torus, transformCopy, transforms_exports as transforms, translate, translate2D, translateDrawing, translatePlane, tryCatch, tryCatchAsync, twistExtrude, typeCastError, undoLast, unsupportedError, unwrap, unwrapErr, unwrapOr, unwrapOrElse, updateNode, updateRoles, uvBounds, uvCoordinates, validSolid, validatePlanetary, validationError, variableFillet, vecAdd, vecAngle, vecCross, vecDistance, vecDot, vecEquals, vecIsZero, vecLength, vecLengthSq, vecNegate, vecNormalize, vecProjectToPlane, vecRepr, vecRotate, vecScale, vecSub, vertex, vertexFinder, vertexPosition, verticesOfEdge, walkAssembly, wire, wireFinder, wireLoop, wiresOfFace, withKernel, withKernelDir, withKernelPnt, withKernelVec, withScope, withScopeResult, withScopeResultAsync, zip as zipResults };
|
package/dist/index.d.ts
CHANGED
|
@@ -85,7 +85,9 @@ export { getSurfaceType, faceGeomType, faceOrientation, flipFaceOrientation, uvB
|
|
|
85
85
|
export { exportSTEP, exportSTL, exportIGES, meshMultiLOD, type ShapeMesh, type EdgeMesh, type MeshOptions, type MultiLODMesh, } from './topology/meshFns.js';
|
|
86
86
|
export { clearMeshCache, createMeshCache, type MeshCacheContext } from './topology/meshCache.js';
|
|
87
87
|
export { toBufferGeometryData, toLineGeometryData, toGroupedBufferGeometryData, type BufferGeometryData, type LineGeometryData, type GroupedBufferGeometryData, type BufferGeometryGroup, toLODGeometryData, type LODGeometryData, } from './topology/threeHelpers.js';
|
|
88
|
-
export { fuseAll, cutAll, booleanPipeline, type BooleanOptions, type BooleanPipelineStep,
|
|
88
|
+
export { fuseAll, cutAll, booleanPipeline, type BooleanOptions, type BooleanPipelineStep, } from './topology/booleanFns.js';
|
|
89
|
+
export { fuseAllBisect, cutAllBisect, type BatchBisectResult, type BatchBisectTelemetry, } from './topology/booleanBatchFns.js';
|
|
90
|
+
export { type PipelineOp } from './topology/booleanFns.js';
|
|
89
91
|
export { checkBoolean } from './topology/booleanDiagnosticFns.js';
|
|
90
92
|
export type { CheckBooleanResult, BooleanIssue, BooleanOpType, BooleanDiagnostics, } from './kernel/types.js';
|
|
91
93
|
export { fuseWithEvolution, cutWithEvolution, intersectWithEvolution, filletWithEvolution, chamferWithEvolution, shellWithEvolution, type EvolutionResult, } from './topology/evolutionFns.js';
|
package/dist/ns/booleans.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { fuse, cut, intersect, section, sectionToFace, split, slice } from '../topology/api.js';
|
|
5
5
|
export { fuseAll, cutAll } from '../topology/booleanFns.js';
|
|
6
|
+
export { fuseAllBisect, cutAllBisect } from '../topology/booleanBatchFns.js';
|
|
6
7
|
export { checkBoolean } from '../topology/booleanDiagnosticFns.js';
|
|
7
8
|
export { hull } from '../topology/hullFns.js';
|
|
8
9
|
export { convexHull } from '../operations/convexHullFns.js';
|
|
@@ -4,7 +4,9 @@ import { c as getOrCreateCache, d as invalidateShapeCache, i as getCachedIsValid
|
|
|
4
4
|
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-Ci5CA3aZ.js";
|
|
5
5
|
import { _ as downcast } from "./faceFns-BNhFoEII.js";
|
|
6
6
|
import { _ as propagateAllMetadata, g as collectInputFaceHashes, h as translate } from "./shapeFns-x8vqq2fR.js";
|
|
7
|
+
import { t as firstOrThrow } from "./arrayAccess-C5IWcxs9.js";
|
|
7
8
|
import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-zJyikeav.js";
|
|
9
|
+
import { a as fuseAll, i as fuse, n as cut, r as cutAll } from "./booleanFns-CtvYfQZq.js";
|
|
8
10
|
import { a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces } from "./solidBuilders-Cot05qzs.js";
|
|
9
11
|
//#region src/topology/threeHelpers.ts
|
|
10
12
|
/**
|
|
@@ -334,6 +336,129 @@ function getNurbsSurfaceData(face) {
|
|
|
334
336
|
return kernel.getNurbsSurfaceData(face.wrapped);
|
|
335
337
|
}
|
|
336
338
|
//#endregion
|
|
339
|
+
//#region src/topology/booleanBatchFns.ts
|
|
340
|
+
var REAL_OPS = {
|
|
341
|
+
cut,
|
|
342
|
+
cutAll,
|
|
343
|
+
fuse,
|
|
344
|
+
fuseAll
|
|
345
|
+
};
|
|
346
|
+
function freezeTelemetry(t) {
|
|
347
|
+
return {
|
|
348
|
+
totalInputs: t.totalInputs,
|
|
349
|
+
batchAttempts: t.batchAttempts,
|
|
350
|
+
batchSucceeded: t.batchSucceeded,
|
|
351
|
+
singletonFallbacks: t.singletonFallbacks,
|
|
352
|
+
failedInputs: [...t.failedInputs].sort((a, b) => a - b)
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
function cutAllBisect(base, tools, options = {}) {
|
|
356
|
+
return cutAllBisectWith(REAL_OPS, base, tools, options);
|
|
357
|
+
}
|
|
358
|
+
/** @internal — testable variant accepting injected kernel ops. */
|
|
359
|
+
function cutAllBisectWith(ops, base, tools, options = {}) {
|
|
360
|
+
if (options.signal?.aborted) throw options.signal.reason;
|
|
361
|
+
const telemetry = {
|
|
362
|
+
totalInputs: tools.length,
|
|
363
|
+
batchAttempts: 0,
|
|
364
|
+
batchSucceeded: 0,
|
|
365
|
+
singletonFallbacks: 0,
|
|
366
|
+
failedInputs: /* @__PURE__ */ new Set()
|
|
367
|
+
};
|
|
368
|
+
const result = bisectCut(ops, base, tools, 0, options, telemetry);
|
|
369
|
+
if (isErr(result)) return result;
|
|
370
|
+
return ok({
|
|
371
|
+
shape: result.value,
|
|
372
|
+
telemetry: freezeTelemetry(telemetry)
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
function bisectCut(ops, base, tools, startIdx, options, telemetry) {
|
|
376
|
+
if (tools.length === 0) return ok(base);
|
|
377
|
+
if (tools.length === 1) return applySingletonCut(ops, base, tools, startIdx, options, telemetry);
|
|
378
|
+
telemetry.batchAttempts++;
|
|
379
|
+
const batchResult = tryBatch(() => ops.cutAll(base, tools, options));
|
|
380
|
+
if (batchResult && batchResult.ok) {
|
|
381
|
+
telemetry.batchSucceeded++;
|
|
382
|
+
return batchResult;
|
|
383
|
+
}
|
|
384
|
+
if (options.signal?.aborted) throw options.signal.reason;
|
|
385
|
+
const mid = Math.floor(tools.length / 2);
|
|
386
|
+
const left = bisectCut(ops, base, tools.slice(0, mid), startIdx, options, telemetry);
|
|
387
|
+
if (!left.ok) return left;
|
|
388
|
+
return bisectCut(ops, left.value, tools.slice(mid), startIdx + mid, options, telemetry);
|
|
389
|
+
}
|
|
390
|
+
function applySingletonCut(ops, base, tools, startIdx, options, telemetry) {
|
|
391
|
+
telemetry.singletonFallbacks++;
|
|
392
|
+
const tool = firstOrThrow(tools);
|
|
393
|
+
const pairResult = tryBatch(() => ops.cut(base, tool, options));
|
|
394
|
+
if (pairResult && pairResult.ok) return pairResult;
|
|
395
|
+
if (options.signal?.aborted) throw options.signal.reason;
|
|
396
|
+
telemetry.failedInputs.add(startIdx);
|
|
397
|
+
return ok(base);
|
|
398
|
+
}
|
|
399
|
+
function fuseAllBisect(shapes, options = {}) {
|
|
400
|
+
return fuseAllBisectWith(REAL_OPS, shapes, options);
|
|
401
|
+
}
|
|
402
|
+
/** @internal — testable variant accepting injected kernel ops. */
|
|
403
|
+
function fuseAllBisectWith(ops, shapes, options = {}) {
|
|
404
|
+
if (options.signal?.aborted) throw options.signal.reason;
|
|
405
|
+
if (shapes.length === 0) return err(validationError(BrepErrorCode.FUSE_ALL_EMPTY, "fuseAllBisect requires at least one shape"));
|
|
406
|
+
const telemetry = {
|
|
407
|
+
totalInputs: shapes.length,
|
|
408
|
+
batchAttempts: 0,
|
|
409
|
+
batchSucceeded: 0,
|
|
410
|
+
singletonFallbacks: 0,
|
|
411
|
+
failedInputs: /* @__PURE__ */ new Set()
|
|
412
|
+
};
|
|
413
|
+
const result = bisectFuse(ops, shapes, 0, options, telemetry);
|
|
414
|
+
if (isErr(result)) return result;
|
|
415
|
+
return ok({
|
|
416
|
+
shape: result.value,
|
|
417
|
+
telemetry: freezeTelemetry(telemetry)
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
function bisectFuse(ops, shapes, startIdx, options, telemetry) {
|
|
421
|
+
if (shapes.length === 1) return ok(firstOrThrow(shapes));
|
|
422
|
+
telemetry.batchAttempts++;
|
|
423
|
+
const batchResult = tryBatch(() => ops.fuseAll(shapes, options));
|
|
424
|
+
if (batchResult && batchResult.ok) {
|
|
425
|
+
telemetry.batchSucceeded++;
|
|
426
|
+
return batchResult;
|
|
427
|
+
}
|
|
428
|
+
if (options.signal?.aborted) throw options.signal.reason;
|
|
429
|
+
const mid = Math.floor(shapes.length / 2);
|
|
430
|
+
return combineFuseHalves(ops, bisectFuse(ops, shapes.slice(0, mid), startIdx, options, telemetry), bisectFuse(ops, shapes.slice(mid), startIdx + mid, options, telemetry), shapes, startIdx, mid, options, telemetry);
|
|
431
|
+
}
|
|
432
|
+
function combineFuseHalves(ops, left, right, shapes, startIdx, mid, options, telemetry) {
|
|
433
|
+
if (left.ok && right.ok) {
|
|
434
|
+
telemetry.singletonFallbacks++;
|
|
435
|
+
const merged = tryBatch(() => ops.fuse(left.value, right.value, options));
|
|
436
|
+
if (merged && merged.ok) return merged;
|
|
437
|
+
for (let i = mid; i < shapes.length; i++) telemetry.failedInputs.add(startIdx + i);
|
|
438
|
+
return left;
|
|
439
|
+
}
|
|
440
|
+
if (left.ok) {
|
|
441
|
+
for (let i = mid; i < shapes.length; i++) telemetry.failedInputs.add(startIdx + i);
|
|
442
|
+
return left;
|
|
443
|
+
}
|
|
444
|
+
if (right.ok) {
|
|
445
|
+
for (let i = 0; i < mid; i++) telemetry.failedInputs.add(startIdx + i);
|
|
446
|
+
return right;
|
|
447
|
+
}
|
|
448
|
+
return left;
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* Run a batch boolean op, returning null on kernel throw (signal-aborts
|
|
452
|
+
* propagate). The caller checks for null and bisects.
|
|
453
|
+
*/
|
|
454
|
+
function tryBatch(fn) {
|
|
455
|
+
try {
|
|
456
|
+
return fn();
|
|
457
|
+
} catch {
|
|
458
|
+
return null;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
//#endregion
|
|
337
462
|
//#region src/topology/booleanDiagnosticFns.ts
|
|
338
463
|
/**
|
|
339
464
|
* Boolean pre-validation diagnostics.
|
|
@@ -1502,4 +1627,4 @@ function addHoles(f, holes) {
|
|
|
1502
1627
|
return addHolesInFace(f, holes);
|
|
1503
1628
|
}
|
|
1504
1629
|
//#endregion
|
|
1505
|
-
export {
|
|
1630
|
+
export { fuseAllBisect as $, fixShape as A, offset as B, threePointArc as C, wireLoop as D, wire as E, isValid as F, chamferWithEvolution as G, thicken as H, solidFromShell as I, fuseWithEvolution as J, cutWithEvolution as K, chamfer as L, healFace as M, healSolid as N, autoHeal as O, healWire as P, cutAllBisect as Q, draft as R, tangentArc as S, vertex as T, variableFillet as U, shell as V, positionOnCurve as W, shellWithEvolution as X, intersectWithEvolution as Y, checkBoolean as Z, polygon as _, circle as a, sharedEdges as at, sphere as b, cylinder as c, chamferDistAngle as ct, ellipsoid as d, toLODGeometryData as dt, getNurbsCurveData as et, face as f, toLineGeometryData as ft, offsetFace as g, line as h, bsplineApprox as i, facesOfEdge as it, heal as j, fixSelfIntersection as k, ellipse as l, toBufferGeometryData as lt, helix as m, bezier as n, adjacentFaces as nt, compound as o, verticesOfEdge as ot, filledFace as p, filletWithEvolution as q, box as r, edgesOfFace as rt, cone as s, wiresOfFace as st, addHoles as t, getNurbsSurfaceData as tt, ellipseArc as u, toGroupedBufferGeometryData as ut, sewShells as v, torus as w, subFace as x, solid as y, fillet as z };
|
|
@@ -4,7 +4,9 @@ const require_topologyQueryFns = require("./topologyQueryFns-CHsPXNbI.cjs");
|
|
|
4
4
|
const require_constants = require("./constants-DTorLmes.cjs");
|
|
5
5
|
const require_faceFns = require("./faceFns-BbESdudy.cjs");
|
|
6
6
|
const require_shapeFns = require("./shapeFns-CHTLdb_n.cjs");
|
|
7
|
+
const require_arrayAccess = require("./arrayAccess-7pTWqkJu.cjs");
|
|
7
8
|
const require_surfaceBuilders = require("./surfaceBuilders-frj7YRrD.cjs");
|
|
9
|
+
const require_booleanFns = require("./booleanFns-CD25YZGm.cjs");
|
|
8
10
|
const require_solidBuilders = require("./solidBuilders-BlBaFSCS.cjs");
|
|
9
11
|
//#region src/topology/threeHelpers.ts
|
|
10
12
|
/**
|
|
@@ -334,6 +336,129 @@ function getNurbsSurfaceData(face) {
|
|
|
334
336
|
return kernel.getNurbsSurfaceData(face.wrapped);
|
|
335
337
|
}
|
|
336
338
|
//#endregion
|
|
339
|
+
//#region src/topology/booleanBatchFns.ts
|
|
340
|
+
var REAL_OPS = {
|
|
341
|
+
cut: require_booleanFns.cut,
|
|
342
|
+
cutAll: require_booleanFns.cutAll,
|
|
343
|
+
fuse: require_booleanFns.fuse,
|
|
344
|
+
fuseAll: require_booleanFns.fuseAll
|
|
345
|
+
};
|
|
346
|
+
function freezeTelemetry(t) {
|
|
347
|
+
return {
|
|
348
|
+
totalInputs: t.totalInputs,
|
|
349
|
+
batchAttempts: t.batchAttempts,
|
|
350
|
+
batchSucceeded: t.batchSucceeded,
|
|
351
|
+
singletonFallbacks: t.singletonFallbacks,
|
|
352
|
+
failedInputs: [...t.failedInputs].sort((a, b) => a - b)
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
function cutAllBisect(base, tools, options = {}) {
|
|
356
|
+
return cutAllBisectWith(REAL_OPS, base, tools, options);
|
|
357
|
+
}
|
|
358
|
+
/** @internal — testable variant accepting injected kernel ops. */
|
|
359
|
+
function cutAllBisectWith(ops, base, tools, options = {}) {
|
|
360
|
+
if (options.signal?.aborted) throw options.signal.reason;
|
|
361
|
+
const telemetry = {
|
|
362
|
+
totalInputs: tools.length,
|
|
363
|
+
batchAttempts: 0,
|
|
364
|
+
batchSucceeded: 0,
|
|
365
|
+
singletonFallbacks: 0,
|
|
366
|
+
failedInputs: /* @__PURE__ */ new Set()
|
|
367
|
+
};
|
|
368
|
+
const result = bisectCut(ops, base, tools, 0, options, telemetry);
|
|
369
|
+
if (require_errors.isErr(result)) return result;
|
|
370
|
+
return require_errors.ok({
|
|
371
|
+
shape: result.value,
|
|
372
|
+
telemetry: freezeTelemetry(telemetry)
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
function bisectCut(ops, base, tools, startIdx, options, telemetry) {
|
|
376
|
+
if (tools.length === 0) return require_errors.ok(base);
|
|
377
|
+
if (tools.length === 1) return applySingletonCut(ops, base, tools, startIdx, options, telemetry);
|
|
378
|
+
telemetry.batchAttempts++;
|
|
379
|
+
const batchResult = tryBatch(() => ops.cutAll(base, tools, options));
|
|
380
|
+
if (batchResult && batchResult.ok) {
|
|
381
|
+
telemetry.batchSucceeded++;
|
|
382
|
+
return batchResult;
|
|
383
|
+
}
|
|
384
|
+
if (options.signal?.aborted) throw options.signal.reason;
|
|
385
|
+
const mid = Math.floor(tools.length / 2);
|
|
386
|
+
const left = bisectCut(ops, base, tools.slice(0, mid), startIdx, options, telemetry);
|
|
387
|
+
if (!left.ok) return left;
|
|
388
|
+
return bisectCut(ops, left.value, tools.slice(mid), startIdx + mid, options, telemetry);
|
|
389
|
+
}
|
|
390
|
+
function applySingletonCut(ops, base, tools, startIdx, options, telemetry) {
|
|
391
|
+
telemetry.singletonFallbacks++;
|
|
392
|
+
const tool = require_arrayAccess.firstOrThrow(tools);
|
|
393
|
+
const pairResult = tryBatch(() => ops.cut(base, tool, options));
|
|
394
|
+
if (pairResult && pairResult.ok) return pairResult;
|
|
395
|
+
if (options.signal?.aborted) throw options.signal.reason;
|
|
396
|
+
telemetry.failedInputs.add(startIdx);
|
|
397
|
+
return require_errors.ok(base);
|
|
398
|
+
}
|
|
399
|
+
function fuseAllBisect(shapes, options = {}) {
|
|
400
|
+
return fuseAllBisectWith(REAL_OPS, shapes, options);
|
|
401
|
+
}
|
|
402
|
+
/** @internal — testable variant accepting injected kernel ops. */
|
|
403
|
+
function fuseAllBisectWith(ops, shapes, options = {}) {
|
|
404
|
+
if (options.signal?.aborted) throw options.signal.reason;
|
|
405
|
+
if (shapes.length === 0) return require_errors.err(require_errors.validationError(require_errors.BrepErrorCode.FUSE_ALL_EMPTY, "fuseAllBisect requires at least one shape"));
|
|
406
|
+
const telemetry = {
|
|
407
|
+
totalInputs: shapes.length,
|
|
408
|
+
batchAttempts: 0,
|
|
409
|
+
batchSucceeded: 0,
|
|
410
|
+
singletonFallbacks: 0,
|
|
411
|
+
failedInputs: /* @__PURE__ */ new Set()
|
|
412
|
+
};
|
|
413
|
+
const result = bisectFuse(ops, shapes, 0, options, telemetry);
|
|
414
|
+
if (require_errors.isErr(result)) return result;
|
|
415
|
+
return require_errors.ok({
|
|
416
|
+
shape: result.value,
|
|
417
|
+
telemetry: freezeTelemetry(telemetry)
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
function bisectFuse(ops, shapes, startIdx, options, telemetry) {
|
|
421
|
+
if (shapes.length === 1) return require_errors.ok(require_arrayAccess.firstOrThrow(shapes));
|
|
422
|
+
telemetry.batchAttempts++;
|
|
423
|
+
const batchResult = tryBatch(() => ops.fuseAll(shapes, options));
|
|
424
|
+
if (batchResult && batchResult.ok) {
|
|
425
|
+
telemetry.batchSucceeded++;
|
|
426
|
+
return batchResult;
|
|
427
|
+
}
|
|
428
|
+
if (options.signal?.aborted) throw options.signal.reason;
|
|
429
|
+
const mid = Math.floor(shapes.length / 2);
|
|
430
|
+
return combineFuseHalves(ops, bisectFuse(ops, shapes.slice(0, mid), startIdx, options, telemetry), bisectFuse(ops, shapes.slice(mid), startIdx + mid, options, telemetry), shapes, startIdx, mid, options, telemetry);
|
|
431
|
+
}
|
|
432
|
+
function combineFuseHalves(ops, left, right, shapes, startIdx, mid, options, telemetry) {
|
|
433
|
+
if (left.ok && right.ok) {
|
|
434
|
+
telemetry.singletonFallbacks++;
|
|
435
|
+
const merged = tryBatch(() => ops.fuse(left.value, right.value, options));
|
|
436
|
+
if (merged && merged.ok) return merged;
|
|
437
|
+
for (let i = mid; i < shapes.length; i++) telemetry.failedInputs.add(startIdx + i);
|
|
438
|
+
return left;
|
|
439
|
+
}
|
|
440
|
+
if (left.ok) {
|
|
441
|
+
for (let i = mid; i < shapes.length; i++) telemetry.failedInputs.add(startIdx + i);
|
|
442
|
+
return left;
|
|
443
|
+
}
|
|
444
|
+
if (right.ok) {
|
|
445
|
+
for (let i = 0; i < mid; i++) telemetry.failedInputs.add(startIdx + i);
|
|
446
|
+
return right;
|
|
447
|
+
}
|
|
448
|
+
return left;
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* Run a batch boolean op, returning null on kernel throw (signal-aborts
|
|
452
|
+
* propagate). The caller checks for null and bisects.
|
|
453
|
+
*/
|
|
454
|
+
function tryBatch(fn) {
|
|
455
|
+
try {
|
|
456
|
+
return fn();
|
|
457
|
+
} catch {
|
|
458
|
+
return null;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
//#endregion
|
|
337
462
|
//#region src/topology/booleanDiagnosticFns.ts
|
|
338
463
|
/**
|
|
339
464
|
* Boolean pre-validation diagnostics.
|
|
@@ -1580,6 +1705,12 @@ Object.defineProperty(exports, "cone", {
|
|
|
1580
1705
|
return cone;
|
|
1581
1706
|
}
|
|
1582
1707
|
});
|
|
1708
|
+
Object.defineProperty(exports, "cutAllBisect", {
|
|
1709
|
+
enumerable: true,
|
|
1710
|
+
get: function() {
|
|
1711
|
+
return cutAllBisect;
|
|
1712
|
+
}
|
|
1713
|
+
});
|
|
1583
1714
|
Object.defineProperty(exports, "cutWithEvolution", {
|
|
1584
1715
|
enumerable: true,
|
|
1585
1716
|
get: function() {
|
|
@@ -1664,6 +1795,12 @@ Object.defineProperty(exports, "fixShape", {
|
|
|
1664
1795
|
return fixShape;
|
|
1665
1796
|
}
|
|
1666
1797
|
});
|
|
1798
|
+
Object.defineProperty(exports, "fuseAllBisect", {
|
|
1799
|
+
enumerable: true,
|
|
1800
|
+
get: function() {
|
|
1801
|
+
return fuseAllBisect;
|
|
1802
|
+
}
|
|
1803
|
+
});
|
|
1667
1804
|
Object.defineProperty(exports, "fuseWithEvolution", {
|
|
1668
1805
|
enumerable: true,
|
|
1669
1806
|
get: function() {
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Result } from '../core/result.js';
|
|
2
|
+
import { Shape3D } from '../core/shapeTypes.js';
|
|
3
|
+
import { ValidSolid } from '../core/validityTypes.js';
|
|
4
|
+
import { BooleanOptions } from '../kernel/types.js';
|
|
5
|
+
import { fuse, cut, fuseAll, cutAll } from './booleanFns.js';
|
|
6
|
+
/**
|
|
7
|
+
* Injectable kernel ops, used by the bisect internals. The public
|
|
8
|
+
* `cutAllBisect` / `fuseAllBisect` wire in the real implementations; tests
|
|
9
|
+
* and benchmarks can substitute synthetic ones that throw on specified
|
|
10
|
+
* inputs to drive the bisect-recovery path without module mocking.
|
|
11
|
+
*/
|
|
12
|
+
export interface BisectKernelOps {
|
|
13
|
+
readonly cut: typeof cut;
|
|
14
|
+
readonly cutAll: typeof cutAll;
|
|
15
|
+
readonly fuse: typeof fuse;
|
|
16
|
+
readonly fuseAll: typeof fuseAll;
|
|
17
|
+
}
|
|
18
|
+
export interface BatchBisectResult<T extends Shape3D = Shape3D> {
|
|
19
|
+
readonly shape: T;
|
|
20
|
+
readonly telemetry: BatchBisectTelemetry;
|
|
21
|
+
}
|
|
22
|
+
export interface BatchBisectTelemetry {
|
|
23
|
+
/** Number of inputs the caller passed (tools for cut, shapes for fuse). */
|
|
24
|
+
readonly totalInputs: number;
|
|
25
|
+
/** N-way kernel batch (`cutAll` / `fuseAll`) attempts, including failures. */
|
|
26
|
+
readonly batchAttempts: number;
|
|
27
|
+
/** N-way kernel batch attempts that succeeded. */
|
|
28
|
+
readonly batchSucceeded: number;
|
|
29
|
+
/**
|
|
30
|
+
* 2-input pairwise kernel call attempts after bisection bottomed out. For
|
|
31
|
+
* `cutAllBisect` this counts singleton `cut(base, tool)` calls; for
|
|
32
|
+
* `fuseAllBisect` this counts the `fuse(a, b)` calls that combine the
|
|
33
|
+
* results of two recursive halves. Both flavors mean "the kernel did a
|
|
34
|
+
* pair op, not a batch op."
|
|
35
|
+
*/
|
|
36
|
+
readonly singletonFallbacks: number;
|
|
37
|
+
/**
|
|
38
|
+
* Sorted, deduplicated input indices that failed even as pairwise ops and
|
|
39
|
+
* were dropped from the result. Multi-level fuse failures can target the
|
|
40
|
+
* same index from different recursion levels — dedup happens at freeze.
|
|
41
|
+
*/
|
|
42
|
+
readonly failedInputs: readonly number[];
|
|
43
|
+
}
|
|
44
|
+
export declare function cutAllBisect(base: ValidSolid, tools: ValidSolid[], options?: BooleanOptions): Result<BatchBisectResult<ValidSolid>>;
|
|
45
|
+
export declare function cutAllBisect(base: Shape3D, tools: Shape3D[], options: BooleanOptions & {
|
|
46
|
+
unsafe: true;
|
|
47
|
+
}): Result<BatchBisectResult>;
|
|
48
|
+
/** @internal — testable variant accepting injected kernel ops. */
|
|
49
|
+
export declare function cutAllBisectWith(ops: BisectKernelOps, base: Shape3D, tools: Shape3D[], options?: BooleanOptions): Result<BatchBisectResult>;
|
|
50
|
+
export declare function fuseAllBisect(shapes: ValidSolid[], options?: BooleanOptions): Result<BatchBisectResult<ValidSolid>>;
|
|
51
|
+
export declare function fuseAllBisect(shapes: Shape3D[], options: BooleanOptions & {
|
|
52
|
+
unsafe: true;
|
|
53
|
+
}): Result<BatchBisectResult>;
|
|
54
|
+
/** @internal — testable variant accepting injected kernel ops. */
|
|
55
|
+
export declare function fuseAllBisectWith(ops: BisectKernelOps, shapes: Shape3D[], options?: BooleanOptions): Result<BatchBisectResult>;
|
package/dist/topology.cjs
CHANGED
|
@@ -5,7 +5,7 @@ const require_shapeFns = require("./shapeFns-CHTLdb_n.cjs");
|
|
|
5
5
|
const require_curveFns = require("./curveFns-CcheHkr4.cjs");
|
|
6
6
|
const require_meshFns = require("./meshFns-CFMr9FBb.cjs");
|
|
7
7
|
const require_booleanFns = require("./booleanFns-CD25YZGm.cjs");
|
|
8
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
8
|
+
const require_primitiveFns = require("./primitiveFns-CkMua35m.cjs");
|
|
9
9
|
exports.addHoles = require_primitiveFns.addHoles;
|
|
10
10
|
exports.adjacentFaces = require_primitiveFns.adjacentFaces;
|
|
11
11
|
exports.approximateCurve = require_curveFns.approximateCurve;
|
|
@@ -33,6 +33,7 @@ exports.curvePointAt = require_curveFns.curvePointAt;
|
|
|
33
33
|
exports.curveStartPoint = require_curveFns.curveStartPoint;
|
|
34
34
|
exports.curveTangentAt = require_curveFns.curveTangentAt;
|
|
35
35
|
exports.cutAll = require_booleanFns.cutAll;
|
|
36
|
+
exports.cutAllBisect = require_primitiveFns.cutAllBisect;
|
|
36
37
|
exports.cutWithEvolution = require_primitiveFns.cutWithEvolution;
|
|
37
38
|
exports.cylinder = require_primitiveFns.cylinder;
|
|
38
39
|
exports.deserializeShape = require_faceFns.fromBREP;
|
|
@@ -56,6 +57,7 @@ exports.fixShape = require_primitiveFns.fixShape;
|
|
|
56
57
|
exports.flipFaceOrientation = require_faceFns.flipFaceOrientation;
|
|
57
58
|
exports.flipOrientation = require_curveFns.flipOrientation;
|
|
58
59
|
exports.fuseAll = require_booleanFns.fuseAll;
|
|
60
|
+
exports.fuseAllBisect = require_primitiveFns.fuseAllBisect;
|
|
59
61
|
exports.fuseWithEvolution = require_primitiveFns.fuseWithEvolution;
|
|
60
62
|
exports.getBounds = require_topologyQueryFns.getBounds;
|
|
61
63
|
exports.getCurveType = require_curveFns.getCurveType;
|
package/dist/topology.d.ts
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
export { getHashCode, isSameShape, isEqualShape, getEdges, getFaces, getWires, getVertices, iterEdges, iterFaces, iterWires, iterVertices, getBounds, vertexPosition, invalidateShapeCache, type Bounds3D, type ShapeDescription, } from './topology/shapeFns.js';
|
|
10
10
|
export { box, cylinder, sphere, cone, torus, ellipsoid, line, circle, ellipse, helix, threePointArc, ellipseArc, bsplineApprox, bezier, tangentArc, wire, wireLoop, face, filledFace, subFace, polygon, vertex, compound, solid, sewShells, offsetFace, addHoles, type CylinderOptions, type SphereOptions, type ConeOptions, type TorusOptions, type CircleOptions, type HelixOptions, type EllipseArcOptions, type BSplineApproximationOptions, } from './topology/primitiveFns.js';
|
|
11
11
|
export { fuseAll, cutAll, type BooleanOptions } from './topology/booleanFns.js';
|
|
12
|
+
export { fuseAllBisect, cutAllBisect, type BatchBisectResult, type BatchBisectTelemetry, } from './topology/booleanBatchFns.js';
|
|
12
13
|
export { checkBoolean } from './topology/booleanDiagnosticFns.js';
|
|
13
14
|
export { fuseWithEvolution, cutWithEvolution, intersectWithEvolution, filletWithEvolution, chamferWithEvolution, shellWithEvolution, type EvolutionResult, } from './topology/evolutionFns.js';
|
|
14
15
|
export type { ShapeEvolution } from './kernel/types.js';
|
package/dist/topology.js
CHANGED
|
@@ -4,5 +4,5 @@ import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFn
|
|
|
4
4
|
import { a as curveLength, c as curveStartPoint, d as getCurveType, f as getOrientation, i as curveIsPeriodic, l as curveTangentAt, m as offsetWire2D, n as curveEndPoint, o as curvePeriod, p as interpolateCurve, r as curveIsClosed, s as curvePointAt, t as approximateCurve, u as flipOrientation } from "./curveFns-BEF8t7XY.js";
|
|
5
5
|
import { c as createMeshCache, n as exportSTEP, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-k0BdoBGR.js";
|
|
6
6
|
import { a as fuseAll, r as cutAll } from "./booleanFns-CtvYfQZq.js";
|
|
7
|
-
import { $ as
|
|
8
|
-
export { addHoles, adjacentFaces, approximateCurve, asTopo, autoHeal, bezier, box, bsplineApprox, cast, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkBoolean, circle, classifyPointOnFace, clearMeshCache, compound, cone, createMeshCache, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cutAll, cutWithEvolution, cylinder, fromBREP as deserializeShape, downcast, edgesOfFace, ellipse, ellipseArc, ellipsoid, exportIGES, exportSTEP, exportSTL, face, faceCenter, faceGeomType, faceOrientation, facesOfEdge, filledFace, filletWithEvolution, fixSelfIntersection, fixShape, flipFaceOrientation, flipOrientation, fuseAll, fuseWithEvolution, getBounds, getCurveType, getEdges, getFaces, getHashCode, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getSurfaceType, getVertices, getWires, healFace, healSolid, healWire, helix, innerWires, interpolateCurve, intersectWithEvolution, invalidateShapeCache, isCompSolid, isEqualShape, isSameShape, iterEdges, iterFaces, iterTopo, iterVertices, iterWires, line, normalAt, offsetFace, offsetWire2D, outerWire, pointOnSurface, polygon, positionOnCurve, projectPointOnFace, sewShells, shapeType, sharedEdges, shellWithEvolution, solid, solidFromShell, sphere, subFace, tangentArc, threePointArc, toBufferGeometryData, toGroupedBufferGeometryData, toLineGeometryData, torus, uvBounds, uvCoordinates, variableFillet, vertex, vertexPosition, verticesOfEdge, wire, wireLoop, wiresOfFace };
|
|
7
|
+
import { $ as fuseAllBisect, A as fixShape, C as threePointArc, D as wireLoop, E as wire, G as chamferWithEvolution, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as cutAllBisect, S as tangentArc, T as vertex, U as variableFillet, W as positionOnCurve, X as shellWithEvolution, Y as intersectWithEvolution, Z as checkBoolean, _ as polygon, a as circle, at as sharedEdges, b as sphere, c as cylinder, ct as chamferDistAngle, d as ellipsoid, et as getNurbsCurveData, f as face, ft as toLineGeometryData, g as offsetFace, h as line, i as bsplineApprox, it as facesOfEdge, k as fixSelfIntersection, l as ellipse, lt as toBufferGeometryData, m as helix, n as bezier, nt as adjacentFaces, o as compound, ot as verticesOfEdge, p as filledFace, q as filletWithEvolution, r as box, rt as edgesOfFace, s as cone, st as wiresOfFace, t as addHoles, tt as getNurbsSurfaceData, u as ellipseArc, ut as toGroupedBufferGeometryData, v as sewShells, w as torus, x as subFace, y as solid } from "./primitiveFns-BsO-feBX.js";
|
|
8
|
+
export { addHoles, adjacentFaces, approximateCurve, asTopo, autoHeal, bezier, box, bsplineApprox, cast, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkBoolean, circle, classifyPointOnFace, clearMeshCache, compound, cone, createMeshCache, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cutAll, cutAllBisect, cutWithEvolution, cylinder, fromBREP as deserializeShape, downcast, edgesOfFace, ellipse, ellipseArc, ellipsoid, exportIGES, exportSTEP, exportSTL, face, faceCenter, faceGeomType, faceOrientation, facesOfEdge, filledFace, filletWithEvolution, fixSelfIntersection, fixShape, flipFaceOrientation, flipOrientation, fuseAll, fuseAllBisect, fuseWithEvolution, getBounds, getCurveType, getEdges, getFaces, getHashCode, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getSurfaceType, getVertices, getWires, healFace, healSolid, healWire, helix, innerWires, interpolateCurve, intersectWithEvolution, invalidateShapeCache, isCompSolid, isEqualShape, isSameShape, iterEdges, iterFaces, iterTopo, iterVertices, iterWires, line, normalAt, offsetFace, offsetWire2D, outerWire, pointOnSurface, polygon, positionOnCurve, projectPointOnFace, sewShells, shapeType, sharedEdges, shellWithEvolution, solid, solidFromShell, sphere, subFace, tangentArc, threePointArc, toBufferGeometryData, toGroupedBufferGeometryData, toLineGeometryData, torus, uvBounds, uvCoordinates, variableFillet, vertex, vertexPosition, verticesOfEdge, wire, wireLoop, wiresOfFace };
|