brepjs 18.66.1 → 18.67.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/2d.cjs +6 -6
- package/dist/2d.js +6 -6
- package/dist/{blueprint-DUu2ps2h.js → blueprint-Z5mhI2QD.js} +5 -5
- package/dist/{blueprint-D0HcOCoD.cjs → blueprint-a7QLhV4U.cjs} +5 -5
- package/dist/{blueprintFns-BoMZHBGl.js → blueprintFns-BNhsXv6q.js} +2 -2
- package/dist/{blueprintFns-pq0yw94E.cjs → blueprintFns-DULa6FpG.cjs} +2 -2
- package/dist/{blueprintSketcher-DelJzBzJ.js → blueprintSketcher-0DeTMXwj.js} +3 -3
- package/dist/{blueprintSketcher-CWSesXXR.cjs → blueprintSketcher-4zOPSOnK.cjs} +3 -3
- package/dist/{boolean2D-DYjuIlFY.js → boolean2D-BNWuFXK_.js} +4 -4
- package/dist/{boolean2D-C6xLLzU_.cjs → boolean2D-xDBZQH_n.cjs} +4 -4
- package/dist/{booleanFns-CLzeqmgT.js → booleanFns-CaKngiuu.js} +4 -4
- package/dist/{booleanFns-D57G9tJA.cjs → booleanFns-aeG4pQmM.cjs} +4 -4
- package/dist/brepjs.cjs +312 -46
- package/dist/brepjs.js +304 -47
- package/dist/{cameraFns-DSAYGgrz.cjs → cameraFns-Bk8frXwa.cjs} +2 -2
- package/dist/{cameraFns-D_UnhA2O.js → cameraFns-k787od3u.js} +2 -2
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-CszkHDW1.js → cornerFinder-B8GvvW0U.js} +1 -1
- package/dist/{cornerFinder-Dvu2q_-E.cjs → cornerFinder-tTS3ny7e.cjs} +1 -1
- package/dist/{curveFns-BJLQixZw.cjs → curveFns-CYP8UOgX.cjs} +1 -1
- package/dist/{curveFns-CLNHpU2N.js → curveFns-DvNBwUdJ.js} +1 -1
- package/dist/{drawFns-BuE0lne3.cjs → drawFns-Chpdmj4G.cjs} +12 -12
- package/dist/{drawFns-Cw29tkrx.js → drawFns-DmAPsfmx.js} +12 -12
- package/dist/{extrudeFns-19bOK66L.js → extrudeFns-CMr1tf7I.js} +1 -1
- package/dist/{extrudeFns-BDgqrytA.cjs → extrudeFns-IvYW5-8y.cjs} +1 -1
- package/dist/{faceFns-BmaS4kkW.cjs → faceFns-Byt7Vd3F.cjs} +2 -2
- package/dist/{faceFns-CWU_70z7.js → faceFns-CZp3Y8vi.js} +2 -2
- package/dist/{helpers-CA8uFXQW.js → helpers-BX-0e71G.js} +6 -6
- package/dist/{helpers-qkB-gFkC.cjs → helpers-wFts3ttt.cjs} +6 -6
- package/dist/{historyFns-CDVZ3KM8.cjs → historyFns-BzPsKySX.cjs} +4 -4
- package/dist/{historyFns-CnUZzNHQ.js → historyFns-CZ9oNL7j.js} +4 -4
- package/dist/{importFns-BBnjqm6T.js → importFns-1SHLSNtG.js} +2 -2
- package/dist/{importFns-B7pbqJhZ.cjs → importFns-CwILDYiQ.cjs} +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/{measureFns-HhPPUiRO.cjs → measureFns-CrSEblGG.cjs} +3 -3
- package/dist/{measureFns-Bye5UsOe.js → measureFns-CvvenWkS.js} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-Cog1SKSV.js → meshFns-0RHalM3t.js} +3 -3
- package/dist/{meshFns-B5jxU_H4.cjs → meshFns-DwHAYqRN.cjs} +3 -3
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-B_Vhus6h.cjs → primitiveFns-CKCALTVe.cjs} +7 -7
- package/dist/{primitiveFns-DTg4kOPD.js → primitiveFns-ecKWNC5k.js} +7 -7
- package/dist/projection.cjs +1 -1
- package/dist/projection.js +1 -1
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/{shapeFns-ClKe2vri.cjs → shapeFns-B5JrP5aD.cjs} +2 -2
- package/dist/{shapeFns-CMQD_3Rz.js → shapeFns-D63FuB8f.js} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeRefFns-DqmUj3wF.js → shapeRefFns-DjGKujf0.js} +4 -4
- package/dist/{shapeRefFns-DUt-hIWq.cjs → shapeRefFns-H_O8zyAx.cjs} +4 -4
- package/dist/{shapeTypes-CQscfe8k.js → shapeTypes-RYLpXWzG.js} +10 -4
- package/dist/{shapeTypes-CPClTSJn.cjs → shapeTypes-kAKwccy_.cjs} +10 -4
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-U04-5yA1.js → solidBuilders-0SgkQ386.js} +2 -2
- package/dist/{solidBuilders-CtxTfDlu.cjs → solidBuilders-B2IX6Pm8.cjs} +2 -2
- package/dist/{surfaceBuilders-88vLyzZe.cjs → surfaceBuilders-BkvJS8pw.cjs} +2 -2
- package/dist/{surfaceBuilders-GesSUnRk.js → surfaceBuilders-jx81G_YJ.js} +2 -2
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-DP_2uuR2.js → textBlueprints-BXGrW7Ak.js} +7 -7
- package/dist/{textBlueprints-BRqklfRI.cjs → textBlueprints-Q2gxuZd1.cjs} +7 -7
- package/dist/{textMetrics-F2qR-eqQ.cjs → textMetrics-CnCjqf59.cjs} +1 -1
- package/dist/{textMetrics-BAOyWVzI.js → textMetrics-V7TXOETY.js} +1 -1
- package/dist/topology.cjs +7 -7
- package/dist/topology.js +7 -7
- package/dist/{topologyQueryFns-BuZ2h4o9.js → topologyQueryFns-BtWPlP5v.js} +1 -1
- package/dist/{topologyQueryFns-jK9Vpzqr.cjs → topologyQueryFns-Ck5trXrW.cjs} +1 -1
- package/dist/voxel/engine.d.ts +43 -0
- package/dist/voxel/fieldFns.d.ts +120 -0
- package/dist/voxel/index.d.ts +2 -0
- package/package.json +1 -1
package/dist/brepjs.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { $ as getKernelCapabilities, A as planarWire, B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, F as as3D, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, P as as2D, R as DisposalScope, S as isManifoldShell, T as isPlanarWire, V as getDisposalStats, W as resetDisposalStats, X as getActiveKernelId, Y as _usingCtx, Z as getKernel, _ as isSolid, a as createEdge, at as registerKernel, b as closedWire, c as createSolid, ct as withQuality, d as isCompound, dt as supportsProjection, et as getKernelTier, f as isEdge, ft as BrepkitAdapter, g as isShell, h as isShape3D, ht as currentQuality, i as createCompound, it as prewarm, j as validSolid, k as planarFace, l as createVertex, lt as withTier, m as isShape1D, mt as resetPerformanceStats, n as castShape3D, nt as initFromManifold, o as createFace, ot as registerKernelTier, p as isFace, pt as getPerformanceStats, q as withScopeResult, rt as initFromOC, s as createShell, st as withKernel, t as castShape, tt as init, u as createWire, ut as supportsConstraintSketch, v as isVertex, w as isPlanarFace, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-
|
|
1
|
+
import { $ as getKernelCapabilities, A as planarWire, B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, F as as3D, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, P as as2D, R as DisposalScope, S as isManifoldShell, T as isPlanarWire, V as getDisposalStats, W as resetDisposalStats, X as getActiveKernelId, Y as _usingCtx, Z as getKernel, _ as isSolid, a as createEdge, at as registerKernel, b as closedWire, c as createSolid, ct as withQuality, d as isCompound, dt as supportsProjection, et as getKernelTier, f as isEdge, ft as BrepkitAdapter, g as isShell, h as isShape3D, ht as currentQuality, i as createCompound, it as prewarm, j as validSolid, k as planarFace, l as createVertex, lt as withTier, m as isShape1D, mt as resetPerformanceStats, n as castShape3D, nt as initFromManifold, o as createFace, ot as registerKernelTier, p as isFace, pt as getPerformanceStats, q as withScopeResult, rt as initFromOC, s as createShell, st as withKernel, t as castShape, tt as init, u as createWire, ut as supportsConstraintSketch, v as isVertex, w as isPlanarFace, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-RYLpXWzG.js";
|
|
2
2
|
import { S as EXACT_BREP_CAPABILITIES, t as OcctWasmAdapter, x as DEFAULT_CAPABILITIES } from "./occtWasmAdapter-Ctfykwr2.js";
|
|
3
3
|
import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
|
|
4
4
|
import { A as ok, B as unwrapOr, C as fromNullable, D as mapBoth, E as map, F as tapErr, H as zip, I as tryCatch, L as tryCatchAsync, M as orElse, N as pipeline, O as mapErr, P as tap, R as unwrap, S as flatten, T as isOk, V as unwrapOrElse, _ as all, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, j as or, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, t as BrepErrorCode, u as unsupportedError, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-DNWJsfVU.js";
|
|
5
|
-
import { C as kernelCall, S as vertexPosition, T as kernelCallScoped, _ as iterFaces, a as getCachedSurfaceType, b as iterVertices, c as getFaces, d as getSolids, f as getVertices, g as iterEdges, h as iterCompSolids, m as invalidateShapeCache, n as getBounds, o as getCompSolids, p as getWires, s as getEdges, t as describe$1, u as getShells, v as iterShells, w as kernelCallRaw, x as iterWires, y as iterSolids } from "./topologyQueryFns-
|
|
5
|
+
import { C as kernelCall, S as vertexPosition, T as kernelCallScoped, _ as iterFaces, a as getCachedSurfaceType, b as iterVertices, c as getFaces, d as getSolids, f as getVertices, g as iterEdges, h as iterCompSolids, m as invalidateShapeCache, n as getBounds, o as getCompSolids, p as getWires, s as getEdges, t as describe$1, u as getShells, v as iterShells, w as kernelCallRaw, x as iterWires, y as iterSolids } from "./topologyQueryFns-BtWPlP5v.js";
|
|
6
6
|
import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
7
7
|
import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N0.js";
|
|
8
8
|
import { a as vecDot, c as vecLength, d as vecNormalize, f as vecProjectToPlane, g as vecSub, h as vecScale, i as vecDistance, l as vecLengthSq, m as vecRotate, n as vecAngle, o as vecEquals, p as vecRepr, r as vecCross, s as vecIsZero, t as vecAdd, u as vecNegate } from "./vecOps-SKPRvPH-.js";
|
|
9
9
|
import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-DSjjtrjg.js";
|
|
10
|
-
import { _ as downcast, a as flipFaceOrientation, b as iterTopo, c as normalAt, d as projectPointOnFace, f as removeHolesFromFace, g as cast, h as asTopo, i as faceOrientation, l as outerWire, m as uvCoordinates, n as faceCenter, o as getSurfaceType, p as uvBounds, r as faceGeomType, s as innerWires, t as classifyPointOnFace, u as pointOnSurface, v as fromBREP, x as shapeType, y as isCompSolid } from "./faceFns-
|
|
11
|
-
import { C as findFacesByTag, D as tagFaces, E as setTagMetadata, O as getFaceOrigins, S as getShapeColor, T as getTagMetadata, a as isSameShape, b as colorShape, c as applyMatrix$1, d as resize, f as rotate$2, h as translate$2, i as isEqualShape, k as setShapeOrigin, l as composeTransforms, m as transformCopy$1, n as getHashCode, o as simplify$1, p as scale$2, r as isEmpty$2, s as toBREP$1, t as clone$1, u as mirror$2, w as getFaceTags, x as getFaceColor, y as colorFaces } from "./shapeFns-
|
|
12
|
-
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-
|
|
13
|
-
import { a as meshEdges$1, c as createMeshCache, i as mesh$1, n as exportSTEP, o as meshMultiLOD, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-
|
|
10
|
+
import { _ as downcast, a as flipFaceOrientation, b as iterTopo, c as normalAt, d as projectPointOnFace, f as removeHolesFromFace, g as cast, h as asTopo, i as faceOrientation, l as outerWire, m as uvCoordinates, n as faceCenter, o as getSurfaceType, p as uvBounds, r as faceGeomType, s as innerWires, t as classifyPointOnFace, u as pointOnSurface, v as fromBREP, x as shapeType, y as isCompSolid } from "./faceFns-CZp3Y8vi.js";
|
|
11
|
+
import { C as findFacesByTag, D as tagFaces, E as setTagMetadata, O as getFaceOrigins, S as getShapeColor, T as getTagMetadata, a as isSameShape, b as colorShape, c as applyMatrix$1, d as resize, f as rotate$2, h as translate$2, i as isEqualShape, k as setShapeOrigin, l as composeTransforms, m as transformCopy$1, n as getHashCode, o as simplify$1, p as scale$2, r as isEmpty$2, s as toBREP$1, t as clone$1, u as mirror$2, w as getFaceTags, x as getFaceColor, y as colorFaces } from "./shapeFns-D63FuB8f.js";
|
|
12
|
+
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-DvNBwUdJ.js";
|
|
13
|
+
import { a as meshEdges$1, c as createMeshCache, i as mesh$1, n as exportSTEP, o as meshMultiLOD, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-0RHalM3t.js";
|
|
14
14
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
15
|
-
import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, r as makeFace, s as assembleWire } from "./surfaceBuilders-
|
|
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-
|
|
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-
|
|
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-
|
|
19
|
-
import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
20
|
-
import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-
|
|
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-
|
|
22
|
-
import { r as makeCylinder } from "./solidBuilders-
|
|
23
|
-
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-
|
|
24
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
25
|
-
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-
|
|
26
|
-
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-
|
|
27
|
-
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-
|
|
28
|
-
import { a as guidedSweep, c as sweep, i as complexExtrude, l as twistExtrude, n as extrudeAll, o as multiSectionSweep, r as revolve$1, s as supportExtrude, t as extrude$1 } from "./extrudeFns-
|
|
29
|
-
import { a as Sketch, b as loftAll, 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, y as loft$1 } from "./textBlueprints-
|
|
30
|
-
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-
|
|
31
|
-
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-
|
|
32
|
-
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-
|
|
15
|
+
import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, r as makeFace, s as assembleWire } from "./surfaceBuilders-jx81G_YJ.js";
|
|
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-CaKngiuu.js";
|
|
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-ecKWNC5k.js";
|
|
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-CZ9oNL7j.js";
|
|
19
|
+
import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-0DeTMXwj.js";
|
|
20
|
+
import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-BX-0e71G.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-DmAPsfmx.js";
|
|
22
|
+
import { r as makeCylinder } from "./solidBuilders-0SgkQ386.js";
|
|
23
|
+
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-CvvenWkS.js";
|
|
24
|
+
import { t as cornerFinder } from "./cornerFinder-B8GvvW0U.js";
|
|
25
|
+
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-BNWuFXK_.js";
|
|
26
|
+
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-BNhsXv6q.js";
|
|
27
|
+
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-1SHLSNtG.js";
|
|
28
|
+
import { a as guidedSweep, c as sweep, i as complexExtrude, l as twistExtrude, n as extrudeAll, o as multiSectionSweep, r as revolve$1, s as supportExtrude, t as extrude$1 } from "./extrudeFns-CMr1tf7I.js";
|
|
29
|
+
import { a as Sketch, b as loftAll, 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, y as loft$1 } from "./textBlueprints-BXGrW7Ak.js";
|
|
30
|
+
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-k787od3u.js";
|
|
31
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-V7TXOETY.js";
|
|
32
|
+
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-DjGKujf0.js";
|
|
33
33
|
import { a as createTaskQueue, c as isEmpty$1, d as isDisposeRequest, f as isErrorResponse, h as isSuccessResponse, i as createWorkerClient, l as pendingCount, m as isOperationRequest, n as createWorkerHandler, o as dequeueTask, p as isInitRequest, r as registerHandler, s as enqueueTask, t as createOperationRegistry, u as rejectAll } from "./workerHandler-CFetYgIm.js";
|
|
34
34
|
//#region \0rolldown/runtime.js
|
|
35
35
|
var __defProp = Object.defineProperty;
|
|
@@ -229,8 +229,8 @@ function pointsInside(mesh, queries, id) {
|
|
|
229
229
|
}
|
|
230
230
|
//#endregion
|
|
231
231
|
//#region src/voxel/repairFns.ts
|
|
232
|
-
var DEFAULT_RESOLUTION$
|
|
233
|
-
var DEFAULT_PADDING$
|
|
232
|
+
var DEFAULT_RESOLUTION$3 = 48;
|
|
233
|
+
var DEFAULT_PADDING$3 = 2;
|
|
234
234
|
/**
|
|
235
235
|
* Repair a (possibly non-watertight) triangle-soup mesh into a closed surface:
|
|
236
236
|
* voxelize an FWN-signed SDF, then Surface-Nets contour it back to triangles.
|
|
@@ -243,16 +243,16 @@ function repairMesh(mesh, opts, id) {
|
|
|
243
243
|
const invalid = validateMesh(mesh);
|
|
244
244
|
if (invalid) return err(invalid);
|
|
245
245
|
if (mesh.vertices.length === 0 || mesh.triangles.length === 0) return err(validationError("VOXEL_EMPTY_MESH", "repairMesh requires a non-empty triangle mesh."));
|
|
246
|
-
const resolution = opts?.resolution ?? DEFAULT_RESOLUTION$
|
|
247
|
-
const padding = opts?.padding ?? DEFAULT_PADDING$
|
|
246
|
+
const resolution = opts?.resolution ?? DEFAULT_RESOLUTION$3;
|
|
247
|
+
const padding = opts?.padding ?? DEFAULT_PADDING$3;
|
|
248
248
|
if (!Number.isInteger(resolution) || resolution < 1) return err(validationError("VOXEL_INVALID_RESOLUTION", "resolution must be an integer >= 1."));
|
|
249
249
|
if (!Number.isInteger(padding) || padding < 1) return err(validationError("VOXEL_INVALID_PADDING", "padding must be an integer >= 1."));
|
|
250
250
|
const engine = resolveEngine(id);
|
|
251
251
|
if (isErr(engine)) return engine;
|
|
252
252
|
try {
|
|
253
253
|
try {
|
|
254
|
-
var _usingCtx$
|
|
255
|
-
const repaired = _usingCtx$
|
|
254
|
+
var _usingCtx$7 = _usingCtx();
|
|
255
|
+
const repaired = _usingCtx$7.u(engine.value.repair_mesh(mesh.vertices, mesh.triangles, resolution, padding));
|
|
256
256
|
const vertexCount = repaired.positions.length / 3;
|
|
257
257
|
return ok({
|
|
258
258
|
vertices: repaired.positions,
|
|
@@ -266,9 +266,9 @@ function repairMesh(mesh, opts, id) {
|
|
|
266
266
|
}]
|
|
267
267
|
});
|
|
268
268
|
} catch (_) {
|
|
269
|
-
_usingCtx$
|
|
269
|
+
_usingCtx$7.e = _;
|
|
270
270
|
} finally {
|
|
271
|
-
_usingCtx$
|
|
271
|
+
_usingCtx$7.d();
|
|
272
272
|
}
|
|
273
273
|
} catch (cause) {
|
|
274
274
|
return err(computationError("VOXEL_REPAIR_FAILED", cause instanceof Error ? cause.message : "voxel repair failed (grid too large?).", cause));
|
|
@@ -297,16 +297,16 @@ function shapeToMeshInput(shape, deflection = DEFAULT_DEFLECTION) {
|
|
|
297
297
|
}
|
|
298
298
|
//#endregion
|
|
299
299
|
//#region src/voxel/meshOpsFns.ts
|
|
300
|
-
var DEFAULT_RESOLUTION$
|
|
301
|
-
var DEFAULT_PADDING$
|
|
302
|
-
var BOOLEAN_OP_CODES = {
|
|
300
|
+
var DEFAULT_RESOLUTION$2 = 48;
|
|
301
|
+
var DEFAULT_PADDING$2 = 2;
|
|
302
|
+
var BOOLEAN_OP_CODES$1 = {
|
|
303
303
|
union: 0,
|
|
304
304
|
intersection: 1,
|
|
305
305
|
difference: 2
|
|
306
306
|
};
|
|
307
|
-
function resolveGridParams(opts) {
|
|
308
|
-
const resolution = opts?.resolution ?? DEFAULT_RESOLUTION$
|
|
309
|
-
const padding = opts?.padding ?? DEFAULT_PADDING$
|
|
307
|
+
function resolveGridParams$1(opts) {
|
|
308
|
+
const resolution = opts?.resolution ?? DEFAULT_RESOLUTION$2;
|
|
309
|
+
const padding = opts?.padding ?? DEFAULT_PADDING$2;
|
|
310
310
|
if (!Number.isInteger(resolution) || resolution < 1) return err(validationError("VOXEL_INVALID_RESOLUTION", "resolution must be an integer >= 1."));
|
|
311
311
|
if (!Number.isInteger(padding) || padding < 1) return err(validationError("VOXEL_INVALID_PADDING", "padding must be an integer >= 1."));
|
|
312
312
|
return ok({
|
|
@@ -341,18 +341,18 @@ function offsetMesh(mesh, distance, opts, id) {
|
|
|
341
341
|
if (invalid) return err(invalid);
|
|
342
342
|
if (mesh.vertices.length === 0 || mesh.triangles.length === 0) return err(validationError("VOXEL_EMPTY_MESH", "offsetMesh requires a non-empty triangle mesh."));
|
|
343
343
|
if (!Number.isFinite(distance)) return err(validationError("VOXEL_INVALID_DISTANCE", "distance must be a finite number."));
|
|
344
|
-
const params = resolveGridParams(opts);
|
|
344
|
+
const params = resolveGridParams$1(opts);
|
|
345
345
|
if (isErr(params)) return params;
|
|
346
346
|
const engine = resolveEngine(id);
|
|
347
347
|
if (isErr(engine)) return engine;
|
|
348
348
|
try {
|
|
349
349
|
try {
|
|
350
|
-
var _usingCtx$
|
|
351
|
-
return meshFromResult(_usingCtx$
|
|
350
|
+
var _usingCtx$6 = _usingCtx();
|
|
351
|
+
return meshFromResult(_usingCtx$6.u(engine.value.offset_mesh(mesh.vertices, mesh.triangles, distance, params.value.resolution, params.value.padding)));
|
|
352
352
|
} catch (_) {
|
|
353
|
-
_usingCtx$
|
|
353
|
+
_usingCtx$6.e = _;
|
|
354
354
|
} finally {
|
|
355
|
-
_usingCtx$
|
|
355
|
+
_usingCtx$6.d();
|
|
356
356
|
}
|
|
357
357
|
} catch (cause) {
|
|
358
358
|
return err(computationError("VOXEL_OFFSET_FAILED", cause instanceof Error ? cause.message : "voxel offset failed (grid too large?).", cause));
|
|
@@ -370,7 +370,7 @@ function shellMesh(mesh, thickness, opts, id) {
|
|
|
370
370
|
if (invalid) return err(invalid);
|
|
371
371
|
if (mesh.vertices.length === 0 || mesh.triangles.length === 0) return err(validationError("VOXEL_EMPTY_MESH", "shellMesh requires a non-empty triangle mesh."));
|
|
372
372
|
if (!Number.isFinite(thickness) || thickness <= 0) return err(validationError("VOXEL_INVALID_THICKNESS", "thickness must be a finite number > 0."));
|
|
373
|
-
const params = resolveGridParams(opts);
|
|
373
|
+
const params = resolveGridParams$1(opts);
|
|
374
374
|
if (isErr(params)) return params;
|
|
375
375
|
const engine = resolveEngine(id);
|
|
376
376
|
if (isErr(engine)) return engine;
|
|
@@ -401,8 +401,8 @@ function voxelBoolean(a, b, op, opts, id) {
|
|
|
401
401
|
if (invalidB) return err(invalidB);
|
|
402
402
|
if (a.vertices.length === 0 || a.triangles.length === 0) return err(validationError("VOXEL_EMPTY_MESH", "voxelBoolean requires a non-empty mesh for operand A."));
|
|
403
403
|
if (b.vertices.length === 0 || b.triangles.length === 0) return err(validationError("VOXEL_EMPTY_MESH", "voxelBoolean requires a non-empty mesh for operand B."));
|
|
404
|
-
const opCode = BOOLEAN_OP_CODES[op];
|
|
405
|
-
const params = resolveGridParams(opts);
|
|
404
|
+
const opCode = BOOLEAN_OP_CODES$1[op];
|
|
405
|
+
const params = resolveGridParams$1(opts);
|
|
406
406
|
if (isErr(params)) return params;
|
|
407
407
|
const engine = resolveEngine(id);
|
|
408
408
|
if (isErr(engine)) return engine;
|
|
@@ -452,6 +452,263 @@ function voxelBooleanShapes(a, b, op, opts, id) {
|
|
|
452
452
|
return voxelBoolean(meshA.value, meshB.value, op, opts, id);
|
|
453
453
|
}
|
|
454
454
|
//#endregion
|
|
455
|
+
//#region src/voxel/fieldFns.ts
|
|
456
|
+
var DEFAULT_RESOLUTION$1 = 48;
|
|
457
|
+
var DEFAULT_PADDING$1 = 2;
|
|
458
|
+
var BOOLEAN_OP_CODES = {
|
|
459
|
+
union: 0,
|
|
460
|
+
intersection: 1,
|
|
461
|
+
difference: 2
|
|
462
|
+
};
|
|
463
|
+
function resolveGridParams(opts) {
|
|
464
|
+
const resolution = opts?.resolution ?? DEFAULT_RESOLUTION$1;
|
|
465
|
+
const padding = opts?.padding ?? DEFAULT_PADDING$1;
|
|
466
|
+
if (!Number.isInteger(resolution) || resolution < 1) return err(validationError("VOXEL_INVALID_RESOLUTION", "resolution must be an integer >= 1."));
|
|
467
|
+
if (!Number.isInteger(padding) || padding < 1) return err(validationError("VOXEL_INVALID_PADDING", "padding must be an integer >= 1."));
|
|
468
|
+
return ok({
|
|
469
|
+
resolution,
|
|
470
|
+
padding
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Copy the buffers out of a WASM {@link VoxelRepairResult} into a plain
|
|
475
|
+
* {@link KernelMeshResult}, freeing the WASM result via `using` (the getters
|
|
476
|
+
* copy, so the mesh survives the free). An empty contour surfaces as an error.
|
|
477
|
+
*/
|
|
478
|
+
function meshFromField(field) {
|
|
479
|
+
try {
|
|
480
|
+
var _usingCtx$5 = _usingCtx();
|
|
481
|
+
const rawResult = field.contour();
|
|
482
|
+
const { positions, normals, indices } = _usingCtx$5.u({
|
|
483
|
+
value: rawResult,
|
|
484
|
+
[Symbol.dispose]() {
|
|
485
|
+
rawResult.free();
|
|
486
|
+
}
|
|
487
|
+
}).value;
|
|
488
|
+
if (positions.length === 0 || indices.length === 0) return err(computationError("VOXEL_DEGENERATE_RESULT", "the voxel field contoured to an empty mesh (over-shrunk offset or disjoint operands?)."));
|
|
489
|
+
const vertexCount = positions.length / 3;
|
|
490
|
+
return ok({
|
|
491
|
+
vertices: positions,
|
|
492
|
+
normals,
|
|
493
|
+
triangles: indices,
|
|
494
|
+
uvs: new Float32Array(vertexCount * 2),
|
|
495
|
+
faceGroups: [{
|
|
496
|
+
start: 0,
|
|
497
|
+
count: indices.length / 3,
|
|
498
|
+
faceHash: 0
|
|
499
|
+
}]
|
|
500
|
+
});
|
|
501
|
+
} catch (_) {
|
|
502
|
+
_usingCtx$5.e = _;
|
|
503
|
+
} finally {
|
|
504
|
+
_usingCtx$5.d();
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
function fieldDeletable(raw) {
|
|
508
|
+
return {
|
|
509
|
+
raw,
|
|
510
|
+
delete() {
|
|
511
|
+
raw.free();
|
|
512
|
+
}
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
function makeHandle(raw) {
|
|
516
|
+
const inner = createKernelHandle(fieldDeletable(raw));
|
|
517
|
+
const handle = {
|
|
518
|
+
get value() {
|
|
519
|
+
return inner.value.raw;
|
|
520
|
+
},
|
|
521
|
+
get disposed() {
|
|
522
|
+
return inner.disposed;
|
|
523
|
+
},
|
|
524
|
+
[Symbol.dispose]() {
|
|
525
|
+
inner[Symbol.dispose]();
|
|
526
|
+
},
|
|
527
|
+
boolean(other, op) {
|
|
528
|
+
this.value.boolean(other.value, BOOLEAN_OP_CODES[op]);
|
|
529
|
+
return handle;
|
|
530
|
+
},
|
|
531
|
+
offset(distance) {
|
|
532
|
+
this.value.offset(distance);
|
|
533
|
+
return handle;
|
|
534
|
+
},
|
|
535
|
+
shell(thickness) {
|
|
536
|
+
this.value.shell(thickness);
|
|
537
|
+
return handle;
|
|
538
|
+
},
|
|
539
|
+
reinit() {
|
|
540
|
+
this.value.reinit();
|
|
541
|
+
return handle;
|
|
542
|
+
},
|
|
543
|
+
contour() {
|
|
544
|
+
const mesh = meshFromField(this.value);
|
|
545
|
+
if (isErr(mesh)) throw new Error(mesh.error.message);
|
|
546
|
+
return mesh.value;
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
return handle;
|
|
550
|
+
}
|
|
551
|
+
/** Live-handle guard (the `VoxelFieldHandle` analogue of disposal's `isLive`). */
|
|
552
|
+
function isLive$1(handle) {
|
|
553
|
+
return !handle.disposed;
|
|
554
|
+
}
|
|
555
|
+
function disposedErr() {
|
|
556
|
+
return err(validationError("VOXEL_FIELD_DISPOSED", "the voxel field handle has been disposed."));
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* Voxelize a mesh into a persistent dense {@link VoxelFieldHandle}: one grid you
|
|
560
|
+
* can boolean / offset / shell / reinit in place, then contour once. The handle
|
|
561
|
+
* is disposable — free the WASM grid with `using` (or `[Symbol.dispose]()`).
|
|
562
|
+
*
|
|
563
|
+
* `resolution` sizes the longest bbox axis; `padding` is the air-margin ring.
|
|
564
|
+
* Errors on an empty/invalid mesh, or if the grid would exceed the dense budget
|
|
565
|
+
* (the persistent path is dense-only) or the voxel cap.
|
|
566
|
+
*/
|
|
567
|
+
function voxelField(mesh, opts, id) {
|
|
568
|
+
const invalid = validateMesh(mesh);
|
|
569
|
+
if (invalid) return err(invalid);
|
|
570
|
+
if (mesh.vertices.length === 0 || mesh.triangles.length === 0) return err(validationError("VOXEL_EMPTY_MESH", "voxelField requires a non-empty triangle mesh."));
|
|
571
|
+
const params = resolveGridParams(opts);
|
|
572
|
+
if (isErr(params)) return params;
|
|
573
|
+
const engine = resolveEngine(id);
|
|
574
|
+
if (isErr(engine)) return engine;
|
|
575
|
+
try {
|
|
576
|
+
return ok(makeHandle(new engine.value.VoxelField(mesh.vertices, mesh.triangles, params.value.resolution, params.value.padding)));
|
|
577
|
+
} catch (cause) {
|
|
578
|
+
return err(computationError("VOXEL_FIELD_VOXELIZE_FAILED", cause instanceof Error ? cause.message : "voxel field voxelization failed (grid too large or non-dense?).", cause));
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Boolean two meshes into ONE co-registered, chainable {@link VoxelFieldHandle}:
|
|
583
|
+
* voxelize both onto a single shared grid sized to their union bbox, combine by
|
|
584
|
+
* `op`, and keep the field. This is THE correct way to "boolean then chain
|
|
585
|
+
* offset/shell" two independently-described meshes — unlike {@link fieldBoolean},
|
|
586
|
+
* which requires the operands to already share grid geometry. The result is
|
|
587
|
+
* dirty (the blend drifts the gradient), so a subsequent offset/shell
|
|
588
|
+
* auto-reinitializes. The handle is disposable — free it with `using`.
|
|
589
|
+
*
|
|
590
|
+
* `op` is `'difference'` = A − B. Errors on an empty/invalid mesh, or if the
|
|
591
|
+
* shared grid would exceed the dense budget (the persistent path is dense-only).
|
|
592
|
+
*/
|
|
593
|
+
function voxelBooleanField(a, b, op, opts, id) {
|
|
594
|
+
const invalidA = validateMesh(a);
|
|
595
|
+
if (invalidA) return err(invalidA);
|
|
596
|
+
const invalidB = validateMesh(b);
|
|
597
|
+
if (invalidB) return err(invalidB);
|
|
598
|
+
if (a.vertices.length === 0 || a.triangles.length === 0) return err(validationError("VOXEL_EMPTY_MESH", "voxelBooleanField requires a non-empty mesh for operand A."));
|
|
599
|
+
if (b.vertices.length === 0 || b.triangles.length === 0) return err(validationError("VOXEL_EMPTY_MESH", "voxelBooleanField requires a non-empty mesh for operand B."));
|
|
600
|
+
const params = resolveGridParams(opts);
|
|
601
|
+
if (isErr(params)) return params;
|
|
602
|
+
const engine = resolveEngine(id);
|
|
603
|
+
if (isErr(engine)) return engine;
|
|
604
|
+
try {
|
|
605
|
+
return ok(makeHandle(engine.value.VoxelField.boolean_of(a.vertices, a.triangles, b.vertices, b.triangles, BOOLEAN_OP_CODES[op], params.value.resolution, params.value.padding)));
|
|
606
|
+
} catch (cause) {
|
|
607
|
+
return err(computationError("VOXEL_FIELD_BOOLEAN_FAILED", cause instanceof Error ? cause.message : "voxel field boolean failed (grid too large or non-dense?).", cause));
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
/**
|
|
611
|
+
* CSG-combine two fields IN PLACE, returning the SAME `handle` for chaining. The
|
|
612
|
+
* min/max blend keeps the zero set exact but drifts the gradient near the join,
|
|
613
|
+
* so a subsequent {@link fieldOffset}/{@link fieldShell} auto-reinitializes.
|
|
614
|
+
*
|
|
615
|
+
* PRECONDITION: both operands must be CO-REGISTERED — same origin, spacing, AND
|
|
616
|
+
* dims. Two fields built by {@link voxelField} from DIFFERENT meshes generally do
|
|
617
|
+
* NOT share geometry (each sizes its grid to its own bbox), and the WASM guard
|
|
618
|
+
* rejects that mismatch as an `err(...)` rather than silently blending mismatched
|
|
619
|
+
* coordinate frames. For the easy co-registered path, build the field directly
|
|
620
|
+
* from both meshes with {@link voxelBooleanField}.
|
|
621
|
+
*/
|
|
622
|
+
function fieldBoolean(handle, other, op) {
|
|
623
|
+
if (!isLive$1(handle) || !isLive$1(other)) return disposedErr();
|
|
624
|
+
try {
|
|
625
|
+
handle.value.boolean(other.value, BOOLEAN_OP_CODES[op]);
|
|
626
|
+
return ok(handle);
|
|
627
|
+
} catch (cause) {
|
|
628
|
+
return err(computationError("VOXEL_FIELD_BOOLEAN_FAILED", cause instanceof Error ? cause.message : "voxel field boolean failed (dim mismatch?).", cause));
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* Offset the field's surface IN PLACE (>0 outward, <0 inward), returning the
|
|
633
|
+
* SAME `handle`. Auto-reinitializes first if the field is dirty (post-boolean),
|
|
634
|
+
* so the iso-shift always rides a true SDF.
|
|
635
|
+
*/
|
|
636
|
+
function fieldOffset(handle, distance) {
|
|
637
|
+
if (!isLive$1(handle)) return disposedErr();
|
|
638
|
+
if (!Number.isFinite(distance)) return err(validationError("VOXEL_INVALID_DISTANCE", "distance must be a finite number."));
|
|
639
|
+
try {
|
|
640
|
+
handle.value.offset(distance);
|
|
641
|
+
return ok(handle);
|
|
642
|
+
} catch (cause) {
|
|
643
|
+
return err(computationError("VOXEL_FIELD_OFFSET_FAILED", cause instanceof Error ? cause.message : "voxel field offset failed.", cause));
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
/**
|
|
647
|
+
* Hollow the field into an inward shell of `thickness` IN PLACE, returning the
|
|
648
|
+
* SAME `handle`. Auto-reinitializes first if dirty; the result is dirty again
|
|
649
|
+
* (the shell re-introduces a kink).
|
|
650
|
+
*/
|
|
651
|
+
function fieldShell(handle, thickness) {
|
|
652
|
+
if (!isLive$1(handle)) return disposedErr();
|
|
653
|
+
if (!Number.isFinite(thickness) || thickness <= 0) return err(validationError("VOXEL_INVALID_THICKNESS", "thickness must be a finite number > 0."));
|
|
654
|
+
try {
|
|
655
|
+
handle.value.shell(thickness);
|
|
656
|
+
return ok(handle);
|
|
657
|
+
} catch (cause) {
|
|
658
|
+
return err(computationError("VOXEL_FIELD_SHELL_FAILED", cause instanceof Error ? cause.message : "voxel field shell failed.", cause));
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
/**
|
|
662
|
+
* Explicitly reinitialize φ to a true SDF (|∇φ|=1) while preserving the zero
|
|
663
|
+
* set, returning the SAME `handle`. Idempotent on a clean field. Offset/shell
|
|
664
|
+
* already auto-reinitialize, so this is for advanced control only.
|
|
665
|
+
*/
|
|
666
|
+
function fieldReinit(handle) {
|
|
667
|
+
if (!isLive$1(handle)) return disposedErr();
|
|
668
|
+
try {
|
|
669
|
+
handle.value.reinit();
|
|
670
|
+
return ok(handle);
|
|
671
|
+
} catch (cause) {
|
|
672
|
+
return err(computationError("VOXEL_FIELD_REINIT_FAILED", cause instanceof Error ? cause.message : "voxel field reinit failed.", cause));
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* Surface-Nets contour the current field to a {@link KernelMeshResult}. The
|
|
677
|
+
* field stays alive and chainable afterwards (contour borrows it). An empty
|
|
678
|
+
* contour surfaces as `VOXEL_DEGENERATE_RESULT`.
|
|
679
|
+
*/
|
|
680
|
+
function fieldContour(handle) {
|
|
681
|
+
if (!isLive$1(handle)) return disposedErr();
|
|
682
|
+
try {
|
|
683
|
+
return meshFromField(handle.value);
|
|
684
|
+
} catch (cause) {
|
|
685
|
+
return err(computationError("VOXEL_FIELD_CONTOUR_FAILED", cause instanceof Error ? cause.message : "voxel field contour failed.", cause));
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* Voxelize a B-rep shape into a persistent {@link VoxelFieldHandle}: tessellate
|
|
690
|
+
* it, then run {@link voxelField}. Threads a meshing failure back as an
|
|
691
|
+
* `err(...)`. The handle is disposable — free it with `using`.
|
|
692
|
+
*/
|
|
693
|
+
function voxelFieldFromShape(shape, opts, id) {
|
|
694
|
+
const meshInput = shapeToMeshInput(shape);
|
|
695
|
+
if (isErr(meshInput)) return meshInput;
|
|
696
|
+
return voxelField(meshInput.value, opts, id);
|
|
697
|
+
}
|
|
698
|
+
/**
|
|
699
|
+
* Boolean two B-rep shapes into one co-registered, chainable
|
|
700
|
+
* {@link VoxelFieldHandle}: tessellate both, then run {@link voxelBooleanField}.
|
|
701
|
+
* `op` is `'difference'` = A − B. Threads either meshing failure back as an
|
|
702
|
+
* `err(...)`. The handle is disposable — free it with `using`.
|
|
703
|
+
*/
|
|
704
|
+
function voxelBooleanFieldShapes(a, b, op, opts, id) {
|
|
705
|
+
const meshA = shapeToMeshInput(a);
|
|
706
|
+
if (isErr(meshA)) return meshA;
|
|
707
|
+
const meshB = shapeToMeshInput(b);
|
|
708
|
+
if (isErr(meshB)) return meshB;
|
|
709
|
+
return voxelBooleanField(meshA.value, meshB.value, op, opts, id);
|
|
710
|
+
}
|
|
711
|
+
//#endregion
|
|
455
712
|
//#region src/lattice/latticeFns.ts
|
|
456
713
|
var LATTICE_TAGS = {
|
|
457
714
|
gyroid: 0,
|
|
@@ -5583,4 +5840,4 @@ var csg_exports = /* @__PURE__ */ __exportAll({
|
|
|
5583
5840
|
withEvaluator: () => withEvaluator
|
|
5584
5841
|
});
|
|
5585
5842
|
//#endregion
|
|
5586
|
-
export { BaseSketcher2d, BlueprintSketcher, BrepBugError, BrepErrorCode, BrepWrapperError, BrepkitAdapter, CompoundSketch, DEFAULT_CAPABILITIES, DEG2RAD, DisposalScope, EXACT_BREP_CAPABILITIES, 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, currentQuality, 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, getActiveVoxelId, getBounds, getBounds2D, getCompSolids, getCurveType, getDisposalStats, getEdges, getFaceColor, getFaceOrigins, getFaceTags, getFaces, getFont, getHashCode, getShape as getHistoryShape, getKernel, getKernelCapabilities, getKernelTier, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getOrientation2D, getPerformanceStats, getShapeColor, getShapeKind, getShells, getSingleFace, getSolids, getSurfaceType, getTagMetadata, getVertices, getVoxel, getWires, guidedSweep, heal, healFace, healSolid, healWire, helix, hull, importDXF, importGLB, importIGES, importOBJ, importSTEP, importSTL, importSVG, importSVGPathD, importThreeMF, init, initFromManifold, initFromOC, initVoxel, 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, iterCompSolids, iterEdges, iterFaces, iterShells, iterSolids, iterTopo, iterVertices, iterWires, kernelCall, kernelCallRaw, kernelCallScoped, kernelError, latticeInfill, latticeInfillShape, 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, offsetMesh, offsetShape, offsetWire2D, ok, or, orElse, organiseBlueprints, orientedFace, outerWire, patterns_exports as patterns, pendingCount, pipeline, pivotPlane, planarFace, planarWire, planetPlacements, pocket, pointOnSurface, pointsInside, polygon, polyhedron, polysideInnerRadius, polysidesBlueprint, positionOnCurve, prewarm, primitives_exports as primitives, projectEdges, projectPointOnFace, query_exports as query, queryError, rectangularPattern, registerHandler, registerKernel, registerKernelTier, registerOperation, registerShape, registerVoxel, rejectAll, removeChild, removeHolesFromFace, repairMesh, 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, shapeToMeshInput, shapeType, sharedEdges, shell, shellMesh, shellShape, 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, tpmsLattice, 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, voxelBoolean, voxelBooleanShapes, walkAssembly, windingNumbers, wire, wireFinder, wireLoop, wiresOfFace, withKernel, withKernelDir, withKernelPnt, withKernelVec, withQuality, withScope, withScopeResult, withScopeResultAsync, withTier, zip as zipResults };
|
|
5843
|
+
export { BaseSketcher2d, BlueprintSketcher, BrepBugError, BrepErrorCode, BrepWrapperError, BrepkitAdapter, CompoundSketch, DEFAULT_CAPABILITIES, DEG2RAD, DisposalScope, EXACT_BREP_CAPABILITIES, 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, currentQuality, 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, fieldBoolean, fieldContour, fieldOffset, fieldReinit, fieldShell, 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, getActiveVoxelId, getBounds, getBounds2D, getCompSolids, getCurveType, getDisposalStats, getEdges, getFaceColor, getFaceOrigins, getFaceTags, getFaces, getFont, getHashCode, getShape as getHistoryShape, getKernel, getKernelCapabilities, getKernelTier, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getOrientation2D, getPerformanceStats, getShapeColor, getShapeKind, getShells, getSingleFace, getSolids, getSurfaceType, getTagMetadata, getVertices, getVoxel, getWires, guidedSweep, heal, healFace, healSolid, healWire, helix, hull, importDXF, importGLB, importIGES, importOBJ, importSTEP, importSTL, importSVG, importSVGPathD, importThreeMF, init, initFromManifold, initFromOC, initVoxel, 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, iterCompSolids, iterEdges, iterFaces, iterShells, iterSolids, iterTopo, iterVertices, iterWires, kernelCall, kernelCallRaw, kernelCallScoped, kernelError, latticeInfill, latticeInfillShape, 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, offsetMesh, offsetShape, offsetWire2D, ok, or, orElse, organiseBlueprints, orientedFace, outerWire, patterns_exports as patterns, pendingCount, pipeline, pivotPlane, planarFace, planarWire, planetPlacements, pocket, pointOnSurface, pointsInside, polygon, polyhedron, polysideInnerRadius, polysidesBlueprint, positionOnCurve, prewarm, primitives_exports as primitives, projectEdges, projectPointOnFace, query_exports as query, queryError, rectangularPattern, registerHandler, registerKernel, registerKernelTier, registerOperation, registerShape, registerVoxel, rejectAll, removeChild, removeHolesFromFace, repairMesh, 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, shapeToMeshInput, shapeType, sharedEdges, shell, shellMesh, shellShape, 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, tpmsLattice, 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, voxelBoolean, voxelBooleanField, voxelBooleanFieldShapes, voxelBooleanShapes, voxelField, voxelFieldFromShape, walkAssembly, windingNumbers, wire, wireFinder, wireLoop, wiresOfFace, withKernel, withKernelDir, withKernelPnt, withKernelVec, withQuality, withScope, withScopeResult, withScopeResultAsync, withTier, zip as zipResults };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-kAKwccy_.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-Ck5trXrW.cjs");
|
|
4
4
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
5
5
|
//#region src/projection/projectionPlanes.ts
|
|
6
6
|
/** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Z as getKernel, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, t as castShape } from "./shapeTypes-RYLpXWzG.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { s as getEdges } from "./topologyQueryFns-
|
|
3
|
+
import { s as getEdges } from "./topologyQueryFns-BtWPlP5v.js";
|
|
4
4
|
import { c as vecLength, d as vecNormalize, g as vecSub, r as vecCross } from "./vecOps-SKPRvPH-.js";
|
|
5
5
|
//#region src/projection/projectionPlanes.ts
|
|
6
6
|
/** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
|
package/dist/core.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
+
const require_shapeTypes = require("./shapeTypes-kAKwccy_.cjs");
|
|
3
3
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
package/dist/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, R as DisposalScope, S as isManifoldShell, _ as isSolid, b as closedWire, d as isCompound, f as isEdge, g as isShell, h as isShape3D, j as validSolid, m as isShape1D, p as isFace, q as withScopeResult, t as castShape, v as isVertex, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-
|
|
1
|
+
import { B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, R as DisposalScope, S as isManifoldShell, _ as isSolid, b as closedWire, d as isCompound, f as isEdge, g as isShell, h as isShape3D, j as validSolid, m as isShape1D, p as isFace, q as withScopeResult, t as castShape, v as isVertex, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-RYLpXWzG.js";
|
|
2
2
|
import { A as ok, B as unwrapOr, E as map, I as tryCatch, L as tryCatchAsync, O as mapErr, R as unwrap, T as isOk, V as unwrapOrElse, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, u as unsupportedError, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
4
4
|
import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N0.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
2
2
|
import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
3
|
-
import { _ as samePoint, p as distance2d, u as angle2d } from "./helpers-
|
|
3
|
+
import { _ as samePoint, p as distance2d, u as angle2d } from "./helpers-BX-0e71G.js";
|
|
4
4
|
//#region src/query/cornerFinder.ts
|
|
5
5
|
var PI_2 = 2 * Math.PI;
|
|
6
6
|
function positiveHalfAngle(angle) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
2
2
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
3
|
-
const require_helpers = require("./helpers-
|
|
3
|
+
const require_helpers = require("./helpers-wFts3ttt.cjs");
|
|
4
4
|
//#region src/query/cornerFinder.ts
|
|
5
5
|
var PI_2 = 2 * Math.PI;
|
|
6
6
|
function positiveHalfAngle(angle) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Z as getKernel, f as isEdge, t as castShape, y as isWire } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, f as isEdge, t as castShape, y as isWire } from "./shapeTypes-RYLpXWzG.js";
|
|
2
2
|
import { A as ok, b as err, l as typeCastError } from "./errors-DNWJsfVU.js";
|
|
3
3
|
//#region src/topology/curveFns.ts
|
|
4
4
|
/**
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
2
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_textBlueprints = require("./textBlueprints-Q2gxuZd1.cjs");
|
|
2
|
+
const require_shapeTypes = require("./shapeTypes-kAKwccy_.cjs");
|
|
3
3
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
4
4
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
5
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
5
|
+
const require_topologyQueryFns = require("./topologyQueryFns-Ck5trXrW.cjs");
|
|
6
6
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
7
7
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
8
8
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
9
9
|
const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
|
|
10
|
-
const require_faceFns = require("./faceFns-
|
|
11
|
-
const require_curveFns = require("./curveFns-
|
|
10
|
+
const require_faceFns = require("./faceFns-Byt7Vd3F.cjs");
|
|
11
|
+
const require_curveFns = require("./curveFns-CYP8UOgX.cjs");
|
|
12
12
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
13
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
14
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
15
|
-
const require_helpers = require("./helpers-
|
|
16
|
-
const require_blueprint = require("./blueprint-
|
|
17
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
18
|
-
const require_boolean2D = require("./boolean2D-
|
|
19
|
-
const require_cameraFns = require("./cameraFns-
|
|
13
|
+
const require_surfaceBuilders = require("./surfaceBuilders-BkvJS8pw.cjs");
|
|
14
|
+
const require_blueprintSketcher = require("./blueprintSketcher-4zOPSOnK.cjs");
|
|
15
|
+
const require_helpers = require("./helpers-wFts3ttt.cjs");
|
|
16
|
+
const require_blueprint = require("./blueprint-a7QLhV4U.cjs");
|
|
17
|
+
const require_cornerFinder = require("./cornerFinder-tTS3ny7e.cjs");
|
|
18
|
+
const require_boolean2D = require("./boolean2D-xDBZQH_n.cjs");
|
|
19
|
+
const require_cameraFns = require("./cameraFns-Bk8frXwa.cjs");
|
|
20
20
|
//#region src/2d/lib/stitching.ts
|
|
21
21
|
/**
|
|
22
22
|
* Group a flat list of curves into connected chains by matching endpoints.
|