brepjs 18.119.2 → 18.119.3
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/lib/curve2D.d.ts +6 -1
- package/dist/2d/lib/curve2dFns.d.ts +6 -1
- package/dist/2d.cjs +7 -7
- package/dist/2d.js +7 -7
- package/dist/{adjacencyFns-BdM5p58J.js → adjacencyFns-DLityMyV.js} +2 -2
- package/dist/{adjacencyFns-Brrc7jlS.cjs → adjacencyFns-DSxuQYnb.cjs} +2 -2
- package/dist/{blueprint-DTNT4qYJ.cjs → blueprint-BGcBMy3b.cjs} +39 -9
- package/dist/{blueprint-DJJo8WkI.js → blueprint-CAG6jseD.js} +33 -9
- package/dist/{blueprintFns-CcpboZ80.js → blueprintFns-B4C3zH7N.js} +9 -4
- package/dist/{blueprintFns-2XDZfCxX.cjs → blueprintFns-CnoqynzI.cjs} +9 -4
- package/dist/{blueprintSketcher-C0EXFVb2.cjs → blueprintSketcher-BNz6f36D.cjs} +166 -61
- package/dist/{blueprintSketcher-DDPyypmC.js → blueprintSketcher-CKKxvxB-.js} +159 -54
- package/dist/{boolean2D-Ddfo_dd0.cjs → boolean2D-B-0xobBP.cjs} +5 -5
- package/dist/{boolean2D-C_PVz8xT.js → boolean2D-C_1gMcZ6.js} +5 -5
- package/dist/brepjs.cjs +105 -92
- package/dist/brepjs.js +39 -27
- package/dist/{cameraFns-Czr5vABD.cjs → cameraFns-2-haLzLi.cjs} +4 -4
- package/dist/{cameraFns-D9tdBYLM.js → cameraFns-CG_J66Hl.js} +4 -4
- package/dist/core.cjs +12 -11
- package/dist/core.js +4 -3
- package/dist/{cornerFinder-Cqg-Dz74.js → cornerFinder-CPFM7bA0.js} +1 -1
- package/dist/{cornerFinder-DETRDOMz.cjs → cornerFinder-mfsUMi5g.cjs} +1 -1
- package/dist/{curveFns-RENXKp64.js → curveFns-DX13KRh2.js} +2 -2
- package/dist/{curveFns-D7utcbnf.cjs → curveFns-GmFnqNo3.cjs} +2 -2
- package/dist/{drawFns-D9Rf4foW.cjs → drawFns-B14M5M68.cjs} +14 -14
- package/dist/{drawFns-B9HbtAoc.js → drawFns-BShGVVXW.js} +14 -14
- package/dist/{errors-B3CDG537.js → errors-MHLiNE-C.js} +1 -92
- package/dist/{errors-CJU8CHng.cjs → errors-RHkKO5bZ.cjs} +0 -103
- package/dist/{faceFns-CPswi9Cm.cjs → faceFns-BK4r7Dxk.cjs} +3 -3
- package/dist/{faceFns-CB6uzvOg.js → faceFns-DJj9Nb6T.js} +3 -3
- package/dist/{healingFns-BFTYLiAm.js → healingFns-DxcRyVCG.js} +5 -6
- package/dist/{healingFns-bhMxTTqw.cjs → healingFns-Hx4oTlq8.cjs} +27 -28
- package/dist/{helpers-Cu4ag5bh.cjs → helpers-BfkBvokP.cjs} +8 -24
- package/dist/{helpers-BiN4qQZP.js → helpers-Du_OdHuy.js} +9 -25
- package/dist/{importFns-X8vBhZI2.js → importFns-BHs19muu.js} +3 -3
- package/dist/{importFns-DS4J1xLv.cjs → importFns-GySbuvVv.cjs} +3 -3
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/{loftFns-ChHjzUK-.cjs → loftFns-BdpZ8FMN.cjs} +2 -125
- package/dist/{loftFns-BF5X7ltI.js → loftFns-BeGJ6dxx.js} +4 -109
- package/dist/{measureFns-B5Zzg1qM.cjs → measureFns-CJGrmhHT.cjs} +4 -4
- package/dist/{measureFns-CC7HhAH3.js → measureFns-CMnbcUZC.js} +4 -4
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-D57Fyqyf.js → meshFns-Cs5EBsf7.js} +4 -4
- package/dist/{meshFns-CaXmWmhe.cjs → meshFns-Dqf5QBhQ.cjs} +5 -5
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/originTrackingFns-DZmdiQ-O.js +203 -0
- package/dist/originTrackingFns-fpEgTIwV.cjs +226 -0
- package/dist/{planeOps-Cp6GQ23-.js → planeOps-CQahLrCx.js} +1 -1
- package/dist/{planeOps-Cr25KWWA.cjs → planeOps-VlFxtvzY.cjs} +1 -1
- package/dist/primitiveFns-B_rflH83.cjs +773 -0
- package/dist/primitiveFns-Cxo3xDKY.js +558 -0
- 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/{refResolveFns-3bw9-U-e.js → refResolveFns-BbRLD8LA.js} +6 -6
- package/dist/{refResolveFns-BxmgIhQM.cjs → refResolveFns-CVDLwh12.cjs} +6 -6
- package/dist/result.cjs +1 -1
- package/dist/result.js +1 -1
- package/dist/rolldown-runtime-DakpK96I.cjs +43 -0
- package/dist/shapeFns-BTFx-os7.js +43 -0
- package/dist/shapeFns-D_5TgiUi.cjs +84 -0
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes-Bpsu5KJO.cjs → shapeTypes-CkcIL7zv.cjs} +1 -222
- package/dist/{shapeTypes-CnKFSfDT.js → shapeTypes-t49f64Dx.js} +2 -139
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-I8_V8qqU.js → solidBuilders-DTgqQC3W.js} +310 -8
- package/dist/{solidBuilders-Bp7lQW62.cjs → solidBuilders-IiIzjKAr.cjs} +401 -15
- package/dist/{surfaceBuilders-D8_08oOR.cjs → surfaceBuilders-Biqx51el.cjs} +6 -5
- package/dist/{surfaceBuilders-BNR7yMQO.js → surfaceBuilders-BryY-i0F.js} +4 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-B5zcLGvJ.cjs → textBlueprints-8EcWreab.cjs} +138 -51
- package/dist/{textBlueprints-igbNvKcd.js → textBlueprints-rA1HT6j1.js} +116 -11
- package/dist/{textMetrics-CJvtpbc3.js → textMetrics-Bcbso1Ns.js} +2 -2
- package/dist/{textMetrics-08fF0QNf.cjs → textMetrics-GPBu9JKi.cjs} +2 -2
- package/dist/{threadFns-CqSMNyTZ.js → threadFns-BOtXTHZ9.js} +8 -8
- package/dist/{threadFns-Co6vWEWx.cjs → threadFns-DRrk9Qod.cjs} +8 -8
- package/dist/topology.cjs +9 -9
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-C3fhJndG.cjs → topologyQueryFns-Bia7o8l_.cjs} +97 -6
- package/dist/{topologyQueryFns-DNqT88yx.js → topologyQueryFns-BkQ6Q7gN.js} +93 -2
- package/dist/validityTypes-DiTgeCD9.js +129 -0
- package/dist/validityTypes-ZGMVlv7b.cjs +200 -0
- package/dist/vectors.cjs +1 -1
- package/dist/vectors.js +1 -1
- package/package.json +8 -8
- package/dist/primitiveFns-CRy_CUVg.cjs +0 -492
- package/dist/primitiveFns-DCIH-SBm.js +0 -331
- package/dist/shapeFns-BrHFNLMA.js +0 -771
- package/dist/shapeFns-qm9VRo4i.cjs +0 -962
package/dist/brepjs.js
CHANGED
|
@@ -1,37 +1,39 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as prewarm, A as is2D, B as withArenaCheckpoint, C as isSolid, E as getShapeKind, F as getDisposalStats, G as getActiveKernelId, H as withScopeResult, I as isLive, J as getKernelCapabilities, K as getKernel, M as DisposalScope, N as createHandle, O as as2D, P as createKernelHandle, Q as initFromOC, R as resetDisposalStats, S as isShell, T as isWire, U as withScopeResultAsync, V as withScope, W as _usingCtx, X as init, Y as getKernelTier, Z as initFromManifold, _ as isCompound, a as castShape3D, at as BrepkitAdapter, b as isShape1D, c as createEdge, ct as currentQuality, d as createSolid, et as registerKernel, f as createVertex, h as disposeResultShape, i as castShape, it as withTier, j as is3D, k as as3D, l as createFace, lt as qualityDeflection, n as castResultShape, nt as withKernel, ot as getPerformanceStats, p as createWire, rt as withQuality, s as createCompound, st as resetPerformanceStats, tt as registerKernelTier, u as createShell, v as isEdge, w as isVertex, x as isShape3D, y as isFace } from "./shapeTypes-t49f64Dx.js";
|
|
2
2
|
import { A as EXACT_BREP_CAPABILITIES, k as DEFAULT_CAPABILITIES, t as OcctWasmAdapter } from "./occtWasmAdapter-CE6nV8_2.js";
|
|
3
3
|
import { i as wasmIndex, n as bug, t as BrepBugError } from "./bug-BdOHwn_e.js";
|
|
4
|
-
import { A as
|
|
5
|
-
import { C as vertexPosition, E as kernelCallScoped, T as kernelCallRaw, _ 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 kernelCall, x as iterWires, y as iterSolids } from "./topologyQueryFns-
|
|
4
|
+
import { A as tap, C as mapBoth, D as or, E as ok, F as unwrapErr, I as unwrapOr, L as unwrapOrElse, M as tryCatch, N as tryCatchAsync, O as orElse, P as unwrap, R as zip, S as map, T as match, _ as flatMap, a as moduleInitError, b as isErr, c as sketcherStateError, d as validationError, f as OK, g as err, h as collect, i as kernelError, j as tapErr, k as pipeline, l as typeCastError, m as andThen, n as computationError, o as queryError, p as all, r as ioError, t as BrepErrorCode, u as unsupportedError, v as flatten, w as mapErr, x as isOk, y as fromNullable } from "./errors-MHLiNE-C.js";
|
|
5
|
+
import { C as vertexPosition, E as kernelCallScoped, T as kernelCallRaw, _ 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 kernelCall, x as iterWires, y as iterSolids } from "./topologyQueryFns-BkQ6Q7gN.js";
|
|
6
|
+
import { a as isPlanarFace, c as manifoldShell, d as planarWire, f as validSolid, i as isOrientedFace, l as orientedFace, n as isClosedWire, o as isPlanarWire, r as isManifoldShell, s as isValidSolid, t as closedWire, u as planarFace } from "./validityTypes-DiTgeCD9.js";
|
|
6
7
|
import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
7
8
|
import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N0.js";
|
|
8
9
|
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
|
-
import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-
|
|
10
|
-
import { C as shapeType, S as iterTopo, _ as cast, a as faceOrientation, b as fromBREP, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, p as removeHolesFromFace, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { a as
|
|
10
|
+
import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-CQahLrCx.js";
|
|
11
|
+
import { C as shapeType, S as iterTopo, _ as cast, a as faceOrientation, b as fromBREP, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, p as removeHolesFromFace, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-DJj9Nb6T.js";
|
|
12
|
+
import { i as setShapeOrigin, t as getFaceOrigins } from "./originTrackingFns-DZmdiQ-O.js";
|
|
13
|
+
import { A as findFacesByTag, D as colorShape, E as colorFaces, M as getTagMetadata, N as setTagMetadata, O as getFaceColor, P as tagFaces, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, _ as section$1, b as split$1, d as booleanPipeline, f as cut$2, g as intersect$2, h as fuseAll$2, j as getFaceTags, k as getShapeColor, m as fuse$2, p as cutAll$2, r as makeCylinder, t as makeCompound, v as sectionToFace$1, y as slice$1 } from "./solidBuilders-DTgqQC3W.js";
|
|
14
|
+
import { A as locate$1, C as threePointArc, D as wireLoop, E as wire, F as transformCopy$1, I as translate$2, M as resize, N as rotate$2, O as applyMatrix$1, P as scale$3, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere$1, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, j as mirror$2, k as composeTransforms, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, v as sewShells, w as torus$1, x as subFace, y as solid } from "./primitiveFns-Cxo3xDKY.js";
|
|
15
|
+
import { a as isSameShape, i as isEqualShape, n as getHashCode, o as simplify$1, r as isEmpty$2, s as toBREP$1, t as clone$1 } from "./shapeFns-BTFx-os7.js";
|
|
16
|
+
import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as getCurveType, h as offsetWire2D, i as curveIsClosed, l as curveStartPoint, m as interpolateCurve, n as curveAxis, o as curveLength, p as getOrientation, r as curveEndPoint, s as curvePeriod, t as approximateCurve, u as curveTangentAt } from "./curveFns-DX13KRh2.js";
|
|
17
|
+
import { a as meshEdges$1, c as meshMultiLOD, d as createMeshCache, i as mesh$1, l as buildMeshCacheKey, n as exportSTEP, o as meshLODs, r as exportSTL, s as meshLODsProgressive, t as exportIGES, u as clearMeshCache } from "./meshFns-Cs5EBsf7.js";
|
|
14
18
|
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 { _ as
|
|
17
|
-
import { A as
|
|
18
|
-
import {
|
|
19
|
-
import { n as
|
|
20
|
-
import { a as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { t as
|
|
24
|
-
import { a as
|
|
25
|
-
import {
|
|
26
|
-
import { a as
|
|
27
|
-
import { a as
|
|
28
|
-
import { a as
|
|
29
|
-
import {
|
|
30
|
-
import { n as
|
|
31
|
-
import { a as
|
|
32
|
-
import { _ as createRef, a as isVertexRef, b as defaultScorer, c as resolveRefParams, d as createVertexRef, f as resolveVertexRef, g as captureHint, h as assignRoles, i as isLineageRef, l as createDerivedFaceRef, m as resolveEdgeRef, n as isEdgeRef, o as resolveLineageRef, p as createEdgeRef, r as isFaceRef, s as resolveRefIn, t as isDerivedFaceRef, u as resolveDerivedFaceRef, v as resolveRef, y as updateRoles } from "./refResolveFns-3bw9-U-e.js";
|
|
19
|
+
import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, r as makeFace, s as assembleWire } from "./surfaceBuilders-BryY-i0F.js";
|
|
20
|
+
import { A as toBufferGeometryData, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, M as toLODGeometryData, N as toLODGeometryLevels, O as getNurbsSurfaceData, P as toLineGeometryData, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, c as isValid$1, d as draft$1, f as fillet$1, g as variableFillet, h as thicken$1, i as heal$1, j as toGroupedBufferGeometryData, k as chamferDistAngle, l as solidFromShell, m as shell$1, n as fixSelfIntersection, o as healSolid, p as offset$1, r as fixShape, s as healWire, t as autoHeal, u as chamfer$1, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution } from "./healingFns-DxcRyVCG.js";
|
|
21
|
+
import { A as setJointValue, B as createAssemblyNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as quatMultiply, G as circularPattern, H as removeChild, I as quatRotate, J as exportAssemblySTEP, K as gridPattern, L as addChild, M as sphericalJoint, N as quatFromAxisAngle, O as prismaticJoint, P as quatFromTo, R as collectShapes, S as addJoint, T as jointTransform, U as updateNode, V as findNode, W as walkAssembly, Y as createAssembly, _ as exportURDF, a as deserializeHistory, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, p as serializeHistory, q as linearPattern, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as countNodes } from "./threadFns-BOtXTHZ9.js";
|
|
22
|
+
import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-CKKxvxB-.js";
|
|
23
|
+
import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-Du_OdHuy.js";
|
|
24
|
+
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-BShGVVXW.js";
|
|
25
|
+
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-CMnbcUZC.js";
|
|
26
|
+
import { t as cornerFinder } from "./cornerFinder-CPFM7bA0.js";
|
|
27
|
+
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-C_1gMcZ6.js";
|
|
28
|
+
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-B4C3zH7N.js";
|
|
29
|
+
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-BHs19muu.js";
|
|
30
|
+
import { a as multiSectionSweep, c as twistExtrude, i as guidedSweep, n as loftAll, o as supportExtrude, r as complexExtrude, s as sweep$1, t as loft$1 } from "./loftFns-BeGJ6dxx.js";
|
|
31
|
+
import { a as Sketch, b as extrudeAll, 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, x as revolve$1, y as extrude$1 } from "./textBlueprints-rA1HT6j1.js";
|
|
32
|
+
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-CG_J66Hl.js";
|
|
33
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-Bcbso1Ns.js";
|
|
34
|
+
import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, l as wiresOfFace, n as adjacentFaces, o as sharedEdges, r as edgesOfFace, s as verticesOfEdge } from "./adjacencyFns-DLityMyV.js";
|
|
35
|
+
import { _ as createRef, a as isVertexRef, b as defaultScorer, c as resolveRefParams, d as createVertexRef, f as resolveVertexRef, g as captureHint, h as assignRoles, i as isLineageRef, l as createDerivedFaceRef, m as resolveEdgeRef, n as isEdgeRef, o as resolveLineageRef, p as createEdgeRef, r as isFaceRef, s as resolveRefIn, t as isDerivedFaceRef, u as resolveDerivedFaceRef, v as resolveRef, y as updateRoles } from "./refResolveFns-BbRLD8LA.js";
|
|
33
36
|
import { _ as isSuccessResponse, a as createWorkerClient, c as enqueueTask, d as rejectAll, f as isBatchRequest, g as isOperationRequest, h as isInitRequest, i as registerHandler, l as isEmpty$1, m as isErrorResponse, n as createOperationRegistry, o as createTaskQueue, p as isDisposeRequest, r as createWorkerHandler, s as dequeueTask, t as createWorkerPool, u as pendingCount } from "./workerPool-XcYX2UZ0.js";
|
|
34
|
-
import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere$1, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, v as sewShells, w as torus$1, x as subFace, y as solid } from "./primitiveFns-DCIH-SBm.js";
|
|
35
37
|
//#region \0rolldown/runtime.js
|
|
36
38
|
var __defProp = Object.defineProperty;
|
|
37
39
|
var __exportAll = (all, no_symbols) => {
|
|
@@ -44,6 +46,16 @@ var __exportAll = (all, no_symbols) => {
|
|
|
44
46
|
return target;
|
|
45
47
|
};
|
|
46
48
|
//#endregion
|
|
49
|
+
//#region src/kernel/types.ts
|
|
50
|
+
/** Check if the kernel supports hidden-line-removal projection. */
|
|
51
|
+
function supportsProjection(kernel) {
|
|
52
|
+
return "projectEdges" in kernel;
|
|
53
|
+
}
|
|
54
|
+
/** Check if the kernel supports 2D constraint sketch solving. */
|
|
55
|
+
function supportsConstraintSketch(kernel) {
|
|
56
|
+
return "sketchNew" in kernel && "sketchDof" in kernel;
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
47
59
|
//#region src/topology/shapeBooleans.ts
|
|
48
60
|
var BOPAlgo_GlueShift = 1;
|
|
49
61
|
var BOPAlgo_GlueFull = 2;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CkcIL7zv.cjs");
|
|
2
|
+
const require_errors = require("./errors-RHkKO5bZ.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-Bia7o8l_.cjs");
|
|
4
4
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
5
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
+
const require_shapeFns = require("./shapeFns-D_5TgiUi.cjs");
|
|
6
6
|
//#region src/projection/projectionPlanes.ts
|
|
7
7
|
/** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
|
|
8
8
|
var PROJECTION_PLANES = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { s as getEdges } from "./topologyQueryFns-
|
|
1
|
+
import { K as getKernel, W as _usingCtx, n as castResultShape } from "./shapeTypes-t49f64Dx.js";
|
|
2
|
+
import { E as ok, P as unwrap, d as validationError, g as err } from "./errors-MHLiNE-C.js";
|
|
3
|
+
import { s as getEdges } from "./topologyQueryFns-BkQ6Q7gN.js";
|
|
4
4
|
import { c as vecLength, d as vecNormalize, g as vecSub, r as vecCross } from "./vecOps-SKPRvPH-.js";
|
|
5
|
-
import { t as clone } from "./shapeFns-
|
|
5
|
+
import { t as clone } from "./shapeFns-BTFx-os7.js";
|
|
6
6
|
//#region src/projection/projectionPlanes.ts
|
|
7
7
|
/** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
|
|
8
8
|
var PROJECTION_PLANES = {
|
package/dist/core.cjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
+
const require_shapeTypes = require("./shapeTypes-CkcIL7zv.cjs");
|
|
3
3
|
const require_bug = require("./bug-O02CsAmt.cjs");
|
|
4
|
-
const require_errors = require("./errors-
|
|
4
|
+
const require_errors = require("./errors-RHkKO5bZ.cjs");
|
|
5
|
+
const require_validityTypes = require("./validityTypes-ZGMVlv7b.cjs");
|
|
5
6
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
6
7
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
7
8
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
8
|
-
const require_planeOps = require("./planeOps-
|
|
9
|
+
const require_planeOps = require("./planeOps-VlFxtvzY.cjs");
|
|
9
10
|
exports.BrepBugError = require_bug.BrepBugError;
|
|
10
11
|
exports.DEG2RAD = require_constants.DEG2RAD;
|
|
11
12
|
exports.DisposalScope = require_shapeTypes.DisposalScope;
|
|
@@ -15,7 +16,7 @@ exports.RAD2DEG = require_constants.RAD2DEG;
|
|
|
15
16
|
exports.andThen = require_errors.andThen;
|
|
16
17
|
exports.bug = require_bug.bug;
|
|
17
18
|
exports.castShape = require_shapeTypes.castShape;
|
|
18
|
-
exports.closedWire =
|
|
19
|
+
exports.closedWire = require_validityTypes.closedWire;
|
|
19
20
|
exports.collect = require_errors.collect;
|
|
20
21
|
exports.computationError = require_errors.computationError;
|
|
21
22
|
exports.createHandle = require_shapeTypes.createHandle;
|
|
@@ -28,30 +29,30 @@ exports.getShapeKind = require_shapeTypes.getShapeKind;
|
|
|
28
29
|
exports.ioError = require_errors.ioError;
|
|
29
30
|
exports.is2D = require_shapeTypes.is2D;
|
|
30
31
|
exports.is3D = require_shapeTypes.is3D;
|
|
31
|
-
exports.isClosedWire =
|
|
32
|
+
exports.isClosedWire = require_validityTypes.isClosedWire;
|
|
32
33
|
exports.isCompound = require_shapeTypes.isCompound;
|
|
33
34
|
exports.isEdge = require_shapeTypes.isEdge;
|
|
34
35
|
exports.isErr = require_errors.isErr;
|
|
35
36
|
exports.isFace = require_shapeTypes.isFace;
|
|
36
37
|
exports.isLive = require_shapeTypes.isLive;
|
|
37
|
-
exports.isManifoldShell =
|
|
38
|
+
exports.isManifoldShell = require_validityTypes.isManifoldShell;
|
|
38
39
|
exports.isOk = require_errors.isOk;
|
|
39
|
-
exports.isOrientedFace =
|
|
40
|
+
exports.isOrientedFace = require_validityTypes.isOrientedFace;
|
|
40
41
|
exports.isShape1D = require_shapeTypes.isShape1D;
|
|
41
42
|
exports.isShape3D = require_shapeTypes.isShape3D;
|
|
42
43
|
exports.isShell = require_shapeTypes.isShell;
|
|
43
44
|
exports.isSolid = require_shapeTypes.isSolid;
|
|
44
|
-
exports.isValidSolid =
|
|
45
|
+
exports.isValidSolid = require_validityTypes.isValidSolid;
|
|
45
46
|
exports.isVertex = require_shapeTypes.isVertex;
|
|
46
47
|
exports.isWire = require_shapeTypes.isWire;
|
|
47
48
|
exports.kernelError = require_errors.kernelError;
|
|
48
|
-
exports.manifoldShell =
|
|
49
|
+
exports.manifoldShell = require_validityTypes.manifoldShell;
|
|
49
50
|
exports.map = require_errors.map;
|
|
50
51
|
exports.mapErr = require_errors.mapErr;
|
|
51
52
|
exports.match = require_errors.match;
|
|
52
53
|
exports.moduleInitError = require_errors.moduleInitError;
|
|
53
54
|
exports.ok = require_errors.ok;
|
|
54
|
-
exports.orientedFace =
|
|
55
|
+
exports.orientedFace = require_validityTypes.orientedFace;
|
|
55
56
|
exports.pivotPlane = require_planeOps.pivotPlane;
|
|
56
57
|
exports.queryError = require_errors.queryError;
|
|
57
58
|
exports.resolveDirection = require_types.resolveDirection;
|
|
@@ -68,7 +69,7 @@ exports.unwrap = require_errors.unwrap;
|
|
|
68
69
|
exports.unwrapErr = require_errors.unwrapErr;
|
|
69
70
|
exports.unwrapOr = require_errors.unwrapOr;
|
|
70
71
|
exports.unwrapOrElse = require_errors.unwrapOrElse;
|
|
71
|
-
exports.validSolid =
|
|
72
|
+
exports.validSolid = require_validityTypes.validSolid;
|
|
72
73
|
exports.validationError = require_errors.validationError;
|
|
73
74
|
exports.vecAdd = require_vecOps.vecAdd;
|
|
74
75
|
exports.vecAngle = require_vecOps.vecAngle;
|
package/dist/core.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as is2D, C as isSolid, E as getShapeKind, H as withScopeResult, I as isLive, M as DisposalScope, N as createHandle, P as createKernelHandle, S as isShell, T as isWire, U as withScopeResultAsync, V as withScope, _ as isCompound, b as isShape1D, i as castShape, j as is3D, v as isEdge, w as isVertex, x as isShape3D, y as isFace } from "./shapeTypes-t49f64Dx.js";
|
|
2
2
|
import { n as bug, t as BrepBugError } from "./bug-BdOHwn_e.js";
|
|
3
|
-
import {
|
|
3
|
+
import { E as ok, F as unwrapErr, I as unwrapOr, L as unwrapOrElse, M as tryCatch, N as tryCatchAsync, P as unwrap, S as map, T as match, _ as flatMap, a as moduleInitError, b as isErr, c as sketcherStateError, d as validationError, f as OK, g as err, h as collect, i as kernelError, l as typeCastError, m as andThen, n as computationError, o as queryError, r as ioError, u as unsupportedError, w as mapErr, x as isOk } from "./errors-MHLiNE-C.js";
|
|
4
|
+
import { c as manifoldShell, f as validSolid, i as isOrientedFace, l as orientedFace, n as isClosedWire, r as isManifoldShell, s as isValidSolid, t as closedWire } from "./validityTypes-DiTgeCD9.js";
|
|
4
5
|
import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
5
6
|
import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N0.js";
|
|
6
7
|
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";
|
|
7
|
-
import { i as pivotPlane, n as createPlane, o as resolvePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-
|
|
8
|
+
import { i as pivotPlane, n as createPlane, o as resolvePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-CQahLrCx.js";
|
|
8
9
|
export { BrepBugError, DEG2RAD, DisposalScope, HASH_CODE_MAX, OK, RAD2DEG, andThen, bug, castShape, closedWire, collect, computationError, createHandle, createKernelHandle, createNamedPlane, createPlane, err, flatMap, getShapeKind, ioError, is2D, is3D, isClosedWire, isCompound, isEdge, isErr, isFace, isLive, isManifoldShell, isOk, isOrientedFace, isShape1D, isShape3D, isShell, isSolid, isValidSolid, isVertex, isWire, kernelError, manifoldShell, map, mapErr, match, moduleInitError, ok, orientedFace, pivotPlane, queryError, resolveDirection, resolvePlane, sketcherStateError, toVec2, toVec3, translatePlane, tryCatch, tryCatchAsync, typeCastError, unsupportedError, unwrap, unwrapErr, unwrapOr, unwrapOrElse, validSolid, validationError, vecAdd, vecAngle, vecCross, vecDistance, vecDot, vecEquals, vecIsZero, vecLength, vecLengthSq, vecNegate, vecNormalize, vecProjectToPlane, vecRepr, vecRotate, vecScale, vecSub, withScope, withScopeResult, withScopeResultAsync };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
2
2
|
import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
3
|
-
import { _ as samePoint,
|
|
3
|
+
import { _ as samePoint, f as distance2d, l as angle2d } from "./helpers-Du_OdHuy.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-BfkBvokP.cjs");
|
|
4
4
|
//#region src/query/cornerFinder.ts
|
|
5
5
|
var PI_2 = 2 * Math.PI;
|
|
6
6
|
function positiveHalfAngle(angle) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { K as getKernel, T as isWire, h as disposeResultShape, n as castResultShape, v as isEdge } from "./shapeTypes-t49f64Dx.js";
|
|
2
|
+
import { E as ok, g as err, l as typeCastError } from "./errors-MHLiNE-C.js";
|
|
3
3
|
//#region src/topology/curveFns.ts
|
|
4
4
|
/**
|
|
5
5
|
* Curve and 1D shape functions — functional replacements for _1DShape/Curve methods.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CkcIL7zv.cjs");
|
|
2
|
+
const require_errors = require("./errors-RHkKO5bZ.cjs");
|
|
3
3
|
//#region src/topology/curveFns.ts
|
|
4
4
|
/**
|
|
5
5
|
* Curve and 1D shape functions — functional replacements for _1DShape/Curve methods.
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
const
|
|
2
|
-
const require_shapeTypes = require("./shapeTypes-Bpsu5KJO.cjs");
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CkcIL7zv.cjs");
|
|
3
2
|
const require_bug = require("./bug-O02CsAmt.cjs");
|
|
4
|
-
const require_errors = require("./errors-
|
|
5
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_errors = require("./errors-RHkKO5bZ.cjs");
|
|
4
|
+
const require_topologyQueryFns = require("./topologyQueryFns-Bia7o8l_.cjs");
|
|
6
5
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
7
6
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
8
7
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
9
|
-
const require_planeOps = require("./planeOps-
|
|
10
|
-
const require_faceFns = require("./faceFns-
|
|
11
|
-
const require_curveFns = require("./curveFns-
|
|
8
|
+
const require_planeOps = require("./planeOps-VlFxtvzY.cjs");
|
|
9
|
+
const require_faceFns = require("./faceFns-BK4r7Dxk.cjs");
|
|
10
|
+
const require_curveFns = require("./curveFns-GmFnqNo3.cjs");
|
|
12
11
|
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
|
|
12
|
+
const require_surfaceBuilders = require("./surfaceBuilders-Biqx51el.cjs");
|
|
13
|
+
const require_blueprintSketcher = require("./blueprintSketcher-BNz6f36D.cjs");
|
|
14
|
+
const require_helpers = require("./helpers-BfkBvokP.cjs");
|
|
15
|
+
const require_blueprint = require("./blueprint-BGcBMy3b.cjs");
|
|
16
|
+
const require_cornerFinder = require("./cornerFinder-mfsUMi5g.cjs");
|
|
17
|
+
const require_boolean2D = require("./boolean2D-B-0xobBP.cjs");
|
|
18
|
+
const require_textBlueprints = require("./textBlueprints-8EcWreab.cjs");
|
|
19
|
+
const require_cameraFns = require("./cameraFns-2-haLzLi.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.
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { K as getKernel, M as DisposalScope, W as _usingCtx, c as createEdge, l as createFace, p as createWire } from "./shapeTypes-t49f64Dx.js";
|
|
2
2
|
import { i as wasmIndex, n as bug } from "./bug-BdOHwn_e.js";
|
|
3
|
-
import {
|
|
4
|
-
import { s as getEdges } from "./topologyQueryFns-
|
|
3
|
+
import { P as unwrap, s as safeIndex } from "./errors-MHLiNE-C.js";
|
|
4
|
+
import { s as getEdges } from "./topologyQueryFns-BkQ6Q7gN.js";
|
|
5
5
|
import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
6
6
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
7
7
|
import { d as vecNormalize, g as vecSub, h as vecScale, m as vecRotate, r as vecCross } from "./vecOps-SKPRvPH-.js";
|
|
8
|
-
import { a as planeToWorld, o as resolvePlane } from "./planeOps-
|
|
9
|
-
import { d as pointOnSurface, l as normalAt, m as uvBounds, r as faceCenter, u as outerWire, v as copyShape, y as downcast } from "./faceFns-
|
|
10
|
-
import { h as offsetWire2D, i as curveIsClosed, l as curveStartPoint } from "./curveFns-
|
|
8
|
+
import { a as planeToWorld, o as resolvePlane } from "./planeOps-CQahLrCx.js";
|
|
9
|
+
import { d as pointOnSurface, l as normalAt, m as uvBounds, r as faceCenter, u as outerWire, v as copyShape, y as downcast } from "./faceFns-DJj9Nb6T.js";
|
|
10
|
+
import { h as offsetWire2D, i as curveIsClosed, l as curveStartPoint } from "./curveFns-DX13KRh2.js";
|
|
11
11
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
12
|
-
import { c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, m as makeHelix, r as makeFace, s as assembleWire } from "./surfaceBuilders-
|
|
13
|
-
import { a as Blueprints, c as make2dOffset, i as CompoundBlueprint, l as intersectCurves, n as BaseSketcher2d, o as chamferCurves, s as filletCurves, u as Flatbush } from "./blueprintSketcher-
|
|
14
|
-
import { _ as samePoint$1, b as subtract2d, c as
|
|
15
|
-
import { _ as Curve2D, a as edgeToCurve, c as make2dCircle, d as make2dInerpolatedBSplineCurve, f as make2dSegmentCurve, g as approximateAsSvgCompatibleCurve, i as curvesAsEdgesOnPlane, l as make2dEllipse, o as make2dArcFromCenter, t as Blueprint, v as deserializeCurve2D
|
|
16
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
17
|
-
import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-
|
|
18
|
-
import { _ as wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-
|
|
19
|
-
import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-
|
|
12
|
+
import { c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, m as makeHelix, r as makeFace, s as assembleWire } from "./surfaceBuilders-BryY-i0F.js";
|
|
13
|
+
import { a as Blueprints, c as make2dOffset, i as CompoundBlueprint, l as intersectCurves, n as BaseSketcher2d, o as chamferCurves, s as filletCurves, u as Flatbush } from "./blueprintSketcher-CKKxvxB-.js";
|
|
14
|
+
import { _ as samePoint$1, b as subtract2d, c as add2d, s as PRECISION_OFFSET, y as squareDistance2d } from "./helpers-Du_OdHuy.js";
|
|
15
|
+
import { _ as Curve2D, a as edgeToCurve, b as BoundingBox2d, c as make2dCircle, d as make2dInerpolatedBSplineCurve, f as make2dSegmentCurve, g as approximateAsSvgCompatibleCurve, i as curvesAsEdgesOnPlane, l as make2dEllipse, o as make2dArcFromCenter, t as Blueprint, v as deserializeCurve2D } from "./blueprint-CAG6jseD.js";
|
|
16
|
+
import { t as cornerFinder } from "./cornerFinder-CPFM7bA0.js";
|
|
17
|
+
import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-C_1gMcZ6.js";
|
|
18
|
+
import { _ as wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-rA1HT6j1.js";
|
|
19
|
+
import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-CG_J66Hl.js";
|
|
20
20
|
//#region src/2d/lib/stitching.ts
|
|
21
21
|
/**
|
|
22
22
|
* Group a flat list of curves into connected chains by matching endpoints.
|
|
@@ -165,97 +165,6 @@ function pipeline(input) {
|
|
|
165
165
|
return makePipeline(initial);
|
|
166
166
|
}
|
|
167
167
|
//#endregion
|
|
168
|
-
//#region src/core/kernelErrorTranslation.ts
|
|
169
|
-
/**
|
|
170
|
-
* Kernel error translation — maps cryptic kernel messages to user-friendly explanations.
|
|
171
|
-
*
|
|
172
|
-
* Extracted from errors.ts to separate pure type/constructor definitions
|
|
173
|
-
* from OCCT-specific regex matching logic.
|
|
174
|
-
*/
|
|
175
|
-
/**
|
|
176
|
-
* Common kernel error patterns and their user-friendly translations.
|
|
177
|
-
* Used by kernelCall to provide actionable error messages.
|
|
178
|
-
*/
|
|
179
|
-
var kernel_ERROR_PATTERNS = [
|
|
180
|
-
{
|
|
181
|
-
pattern: /invalid edge configuration|edges?.*(not|fail|invalid)/i,
|
|
182
|
-
translation: "The edges may not form a continuous loop. Check that edges connect end-to-end without gaps."
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
pattern: /BRepAlgoAPI.*failed|boolean.*operation.*failed/i,
|
|
186
|
-
translation: "Boolean operation failed. Common causes: overlapping faces, zero-thickness geometry, or degenerate shapes. Try healing input shapes first."
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
pattern: /fillet.*radius.*too.*large|fillet.*failed/i,
|
|
190
|
-
translation: "Fillet operation failed. The radius may be too large for the selected edges. Try reducing the radius or check that edges have enough room."
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
pattern: /chamfer.*failed|chamfer.*distance.*too.*large/i,
|
|
194
|
-
translation: "Chamfer operation failed. The distance may be too large for the selected edges. Try reducing the distance or check edge geometry."
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
pattern: /shell.*failed|offset.*failed/i,
|
|
198
|
-
translation: "Shell/offset operation failed. The thickness may be too large, or the shape may have complex geometry. Try reducing thickness."
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
pattern: /sweep.*failed|pipe.*failed/i,
|
|
202
|
-
translation: "Sweep operation failed. Check that the profile and spine are compatible, and that the spine has no sharp twists or self-intersections."
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
pattern: /loft.*failed/i,
|
|
206
|
-
translation: "Loft operation failed. Profiles may be incompatible or have different orientations. Ensure profiles are ordered consistently."
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
pattern: /extrude.*failed|prism.*failed/i,
|
|
210
|
-
translation: "Extrusion failed. The profile may be invalid or self-intersecting. Check that the profile forms a valid closed wire."
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
pattern: /revolve.*failed|revolution.*failed/i,
|
|
214
|
-
translation: "Revolution operation failed. The profile may intersect the axis of revolution, or the angle may be invalid."
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
pattern: /self.*intersect|self-intersect/i,
|
|
218
|
-
translation: "Shape has self-intersections. The operation resulted in overlapping geometry. Simplify the input or adjust parameters."
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
pattern: /degener|degenerat/i,
|
|
222
|
-
translation: "Degenerate geometry detected. The shape has edges or faces with zero length/area. Check input geometry for collapsed elements."
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
pattern: /BRepCheck.*fail|shape.*invalid|shape.*not.*valid/i,
|
|
226
|
-
translation: "Shape validation failed. The resulting shape has invalid topology. Try healing the shape or checking input geometry."
|
|
227
|
-
}
|
|
228
|
-
];
|
|
229
|
-
var ERROR_CODE_SUGGESTIONS = {
|
|
230
|
-
FUSE_FAILED: "Try autoHeal() on both operands before the boolean operation. Check for overlapping faces or zero-thickness geometry.",
|
|
231
|
-
CUT_FAILED: "Try autoHeal() on both operands before the boolean operation. Check for overlapping faces or zero-thickness geometry.",
|
|
232
|
-
FUSE_NOT_3D: "The boolean result was not a 3D solid. Ensure both input shapes are valid 3D solids, not shells or open surfaces.",
|
|
233
|
-
CUT_NOT_3D: "The boolean result was not a 3D solid. Ensure both input shapes are valid 3D solids, not shells or open surfaces.",
|
|
234
|
-
INTERSECT_NOT_3D: "The boolean result was not a 3D solid. Ensure both input shapes are valid 3D solids, not shells or open surfaces.",
|
|
235
|
-
SWEEP_FAILED: "Ensure the spine curve has no sharp corners or self-intersections. Try simplifying the profile or using a smoother path.",
|
|
236
|
-
LOFT_FAILED: "Check that all profiles have the same number of edges and consistent orientation. Try reordering profiles.",
|
|
237
|
-
FILLET_NOT_3D: "The fillet radius may be too large for the selected edges. Try a smaller radius or check that adjacent faces have enough room.",
|
|
238
|
-
CHAMFER_NOT_3D: "The chamfer distance may be too large. Try a smaller distance or check edge geometry.",
|
|
239
|
-
SHELL_NOT_3D: "The shell thickness may be too large for the shape. Try reducing thickness or removing problematic faces.",
|
|
240
|
-
OFFSET_NOT_3D: "The offset distance may be too large for the shape geometry. Try a smaller distance.",
|
|
241
|
-
DRAFT_FAILED: "The draft angle may be too large or the selected faces incompatible. Try a smaller angle or different faces."
|
|
242
|
-
};
|
|
243
|
-
/** Look up an actionable suggestion for a given error code. */
|
|
244
|
-
function getSuggestionForCode(code) {
|
|
245
|
-
return ERROR_CODE_SUGGESTIONS[code];
|
|
246
|
-
}
|
|
247
|
-
/**
|
|
248
|
-
* Translate an kernel error message into a user-friendly explanation.
|
|
249
|
-
* If no pattern matches, returns the original message.
|
|
250
|
-
*
|
|
251
|
-
* @param kernelMessage - The raw error message from kernel
|
|
252
|
-
* @returns User-friendly error message with actionable guidance
|
|
253
|
-
*/
|
|
254
|
-
function translateKernelError(kernelMessage) {
|
|
255
|
-
for (const { pattern, translation } of kernel_ERROR_PATTERNS) if (pattern.test(kernelMessage)) return `${translation} (kernel: ${kernelMessage})`;
|
|
256
|
-
return kernelMessage;
|
|
257
|
-
}
|
|
258
|
-
//#endregion
|
|
259
168
|
//#region src/core/errors.ts
|
|
260
169
|
/**
|
|
261
170
|
* Domain error types and constructors for brepjs.
|
|
@@ -468,4 +377,4 @@ function safeIndex(arr, index, context) {
|
|
|
468
377
|
return wasmIndex(arr, index);
|
|
469
378
|
}
|
|
470
379
|
//#endregion
|
|
471
|
-
export {
|
|
380
|
+
export { tap as A, mapBoth as C, or as D, ok as E, unwrapErr as F, unwrapOr as I, unwrapOrElse as L, tryCatch as M, tryCatchAsync as N, orElse as O, unwrap as P, zip as R, map as S, match as T, flatMap as _, moduleInitError as a, isErr as b, sketcherStateError as c, validationError as d, OK as f, err as g, collect as h, kernelError as i, tapErr as j, pipeline as k, typeCastError as l, andThen as m, computationError as n, queryError as o, all as p, ioError as r, safeIndex as s, BrepErrorCode as t, unsupportedError as u, flatten as v, mapErr as w, isOk as x, fromNullable as y };
|
|
@@ -165,97 +165,6 @@ function pipeline(input) {
|
|
|
165
165
|
return makePipeline(initial);
|
|
166
166
|
}
|
|
167
167
|
//#endregion
|
|
168
|
-
//#region src/core/kernelErrorTranslation.ts
|
|
169
|
-
/**
|
|
170
|
-
* Kernel error translation — maps cryptic kernel messages to user-friendly explanations.
|
|
171
|
-
*
|
|
172
|
-
* Extracted from errors.ts to separate pure type/constructor definitions
|
|
173
|
-
* from OCCT-specific regex matching logic.
|
|
174
|
-
*/
|
|
175
|
-
/**
|
|
176
|
-
* Common kernel error patterns and their user-friendly translations.
|
|
177
|
-
* Used by kernelCall to provide actionable error messages.
|
|
178
|
-
*/
|
|
179
|
-
var kernel_ERROR_PATTERNS = [
|
|
180
|
-
{
|
|
181
|
-
pattern: /invalid edge configuration|edges?.*(not|fail|invalid)/i,
|
|
182
|
-
translation: "The edges may not form a continuous loop. Check that edges connect end-to-end without gaps."
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
pattern: /BRepAlgoAPI.*failed|boolean.*operation.*failed/i,
|
|
186
|
-
translation: "Boolean operation failed. Common causes: overlapping faces, zero-thickness geometry, or degenerate shapes. Try healing input shapes first."
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
pattern: /fillet.*radius.*too.*large|fillet.*failed/i,
|
|
190
|
-
translation: "Fillet operation failed. The radius may be too large for the selected edges. Try reducing the radius or check that edges have enough room."
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
pattern: /chamfer.*failed|chamfer.*distance.*too.*large/i,
|
|
194
|
-
translation: "Chamfer operation failed. The distance may be too large for the selected edges. Try reducing the distance or check edge geometry."
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
pattern: /shell.*failed|offset.*failed/i,
|
|
198
|
-
translation: "Shell/offset operation failed. The thickness may be too large, or the shape may have complex geometry. Try reducing thickness."
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
pattern: /sweep.*failed|pipe.*failed/i,
|
|
202
|
-
translation: "Sweep operation failed. Check that the profile and spine are compatible, and that the spine has no sharp twists or self-intersections."
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
pattern: /loft.*failed/i,
|
|
206
|
-
translation: "Loft operation failed. Profiles may be incompatible or have different orientations. Ensure profiles are ordered consistently."
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
pattern: /extrude.*failed|prism.*failed/i,
|
|
210
|
-
translation: "Extrusion failed. The profile may be invalid or self-intersecting. Check that the profile forms a valid closed wire."
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
pattern: /revolve.*failed|revolution.*failed/i,
|
|
214
|
-
translation: "Revolution operation failed. The profile may intersect the axis of revolution, or the angle may be invalid."
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
pattern: /self.*intersect|self-intersect/i,
|
|
218
|
-
translation: "Shape has self-intersections. The operation resulted in overlapping geometry. Simplify the input or adjust parameters."
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
pattern: /degener|degenerat/i,
|
|
222
|
-
translation: "Degenerate geometry detected. The shape has edges or faces with zero length/area. Check input geometry for collapsed elements."
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
pattern: /BRepCheck.*fail|shape.*invalid|shape.*not.*valid/i,
|
|
226
|
-
translation: "Shape validation failed. The resulting shape has invalid topology. Try healing the shape or checking input geometry."
|
|
227
|
-
}
|
|
228
|
-
];
|
|
229
|
-
var ERROR_CODE_SUGGESTIONS = {
|
|
230
|
-
FUSE_FAILED: "Try autoHeal() on both operands before the boolean operation. Check for overlapping faces or zero-thickness geometry.",
|
|
231
|
-
CUT_FAILED: "Try autoHeal() on both operands before the boolean operation. Check for overlapping faces or zero-thickness geometry.",
|
|
232
|
-
FUSE_NOT_3D: "The boolean result was not a 3D solid. Ensure both input shapes are valid 3D solids, not shells or open surfaces.",
|
|
233
|
-
CUT_NOT_3D: "The boolean result was not a 3D solid. Ensure both input shapes are valid 3D solids, not shells or open surfaces.",
|
|
234
|
-
INTERSECT_NOT_3D: "The boolean result was not a 3D solid. Ensure both input shapes are valid 3D solids, not shells or open surfaces.",
|
|
235
|
-
SWEEP_FAILED: "Ensure the spine curve has no sharp corners or self-intersections. Try simplifying the profile or using a smoother path.",
|
|
236
|
-
LOFT_FAILED: "Check that all profiles have the same number of edges and consistent orientation. Try reordering profiles.",
|
|
237
|
-
FILLET_NOT_3D: "The fillet radius may be too large for the selected edges. Try a smaller radius or check that adjacent faces have enough room.",
|
|
238
|
-
CHAMFER_NOT_3D: "The chamfer distance may be too large. Try a smaller distance or check edge geometry.",
|
|
239
|
-
SHELL_NOT_3D: "The shell thickness may be too large for the shape. Try reducing thickness or removing problematic faces.",
|
|
240
|
-
OFFSET_NOT_3D: "The offset distance may be too large for the shape geometry. Try a smaller distance.",
|
|
241
|
-
DRAFT_FAILED: "The draft angle may be too large or the selected faces incompatible. Try a smaller angle or different faces."
|
|
242
|
-
};
|
|
243
|
-
/** Look up an actionable suggestion for a given error code. */
|
|
244
|
-
function getSuggestionForCode(code) {
|
|
245
|
-
return ERROR_CODE_SUGGESTIONS[code];
|
|
246
|
-
}
|
|
247
|
-
/**
|
|
248
|
-
* Translate an kernel error message into a user-friendly explanation.
|
|
249
|
-
* If no pattern matches, returns the original message.
|
|
250
|
-
*
|
|
251
|
-
* @param kernelMessage - The raw error message from kernel
|
|
252
|
-
* @returns User-friendly error message with actionable guidance
|
|
253
|
-
*/
|
|
254
|
-
function translateKernelError(kernelMessage) {
|
|
255
|
-
for (const { pattern, translation } of kernel_ERROR_PATTERNS) if (pattern.test(kernelMessage)) return `${translation} (kernel: ${kernelMessage})`;
|
|
256
|
-
return kernelMessage;
|
|
257
|
-
}
|
|
258
|
-
//#endregion
|
|
259
168
|
//#region src/core/errors.ts
|
|
260
169
|
/**
|
|
261
170
|
* Domain error types and constructors for brepjs.
|
|
@@ -528,12 +437,6 @@ Object.defineProperty(exports, "fromNullable", {
|
|
|
528
437
|
return fromNullable;
|
|
529
438
|
}
|
|
530
439
|
});
|
|
531
|
-
Object.defineProperty(exports, "getSuggestionForCode", {
|
|
532
|
-
enumerable: true,
|
|
533
|
-
get: function() {
|
|
534
|
-
return getSuggestionForCode;
|
|
535
|
-
}
|
|
536
|
-
});
|
|
537
440
|
Object.defineProperty(exports, "ioError", {
|
|
538
441
|
enumerable: true,
|
|
539
442
|
get: function() {
|
|
@@ -642,12 +545,6 @@ Object.defineProperty(exports, "tapErr", {
|
|
|
642
545
|
return tapErr;
|
|
643
546
|
}
|
|
644
547
|
});
|
|
645
|
-
Object.defineProperty(exports, "translateKernelError", {
|
|
646
|
-
enumerable: true,
|
|
647
|
-
get: function() {
|
|
648
|
-
return translateKernelError;
|
|
649
|
-
}
|
|
650
|
-
});
|
|
651
548
|
Object.defineProperty(exports, "tryCatch", {
|
|
652
549
|
enumerable: true,
|
|
653
550
|
get: function() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CkcIL7zv.cjs");
|
|
2
|
+
const require_errors = require("./errors-RHkKO5bZ.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-Bia7o8l_.cjs");
|
|
4
4
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
5
5
|
//#region src/topology/cast.ts
|
|
6
6
|
var TOPO_ENUM = {
|