brepjs 18.69.2 → 18.70.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-DIQeD9xj.cjs → blueprint-jlSsZ0sZ.cjs} +5 -5
- package/dist/{blueprint-Dgl9IkCV.js → blueprint-qVw9ZkE4.js} +5 -5
- package/dist/{blueprintFns-BO44cqFY.cjs → blueprintFns-DsuY7gCu.cjs} +2 -2
- package/dist/{blueprintFns-sKzHcJ4U.js → blueprintFns-zLwbytjs.js} +2 -2
- package/dist/{blueprintSketcher-DbINWerx.js → blueprintSketcher-BRKbVgE2.js} +3 -3
- package/dist/{blueprintSketcher-BpOknLmX.cjs → blueprintSketcher-dZZ8e5ey.cjs} +3 -3
- package/dist/{boolean2D-DZcOTOSA.cjs → boolean2D-4E1kbwQx.cjs} +4 -4
- package/dist/{boolean2D-CreNaKXt.js → boolean2D-CANP43pN.js} +4 -4
- package/dist/{booleanFns-DvXg6a2Y.cjs → booleanFns-Bp_wYEwG.cjs} +4 -4
- package/dist/{booleanFns-0jDBFjAv.js → booleanFns-DYSaupiG.js} +4 -4
- package/dist/brepjs.cjs +304 -95
- package/dist/brepjs.js +306 -98
- package/dist/{cameraFns-Bwxq0IDz.js → cameraFns-BFRGMXSn.js} +2 -2
- package/dist/{cameraFns-CsGSVYgb.cjs → cameraFns-dRK1CnFi.cjs} +2 -2
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-ChltJ_ur.cjs → cornerFinder-CQPXY8Aw.cjs} +1 -1
- package/dist/{cornerFinder-fMf9-El_.js → cornerFinder-DcHCKoUh.js} +1 -1
- package/dist/{curveFns-BhTtS18d.js → curveFns-CXhOkKR4.js} +1 -1
- package/dist/{curveFns-CXytEfTr.cjs → curveFns-uPVW6eo-.cjs} +1 -1
- package/dist/{drawFns-Bzr38vZx.js → drawFns-ZqWpAG8b.js} +12 -12
- package/dist/{drawFns-Bn4vzbUr.cjs → drawFns-eMU4H__w.cjs} +12 -12
- package/dist/{extrudeFns-rnUgev_g.js → extrudeFns-CSy2C7WW.js} +1 -1
- package/dist/{extrudeFns-C0FsOXev.cjs → extrudeFns-CzQans6p.cjs} +1 -1
- package/dist/{faceFns-Dreo5ksY.js → faceFns-BBcrvY7r.js} +11 -3
- package/dist/{faceFns-FAZgMVCx.cjs → faceFns-CcLFCtg4.cjs} +16 -2
- package/dist/{helpers-D8ycrNeD.cjs → helpers-BmY5kO0w.cjs} +6 -6
- package/dist/{helpers--BMa_zB7.js → helpers-CxT3j8jG.js} +6 -6
- package/dist/{historyFns-mnmeZ0kB.cjs → historyFns-BEB2Yjld.cjs} +4 -4
- package/dist/{historyFns-CR0RejKJ.js → historyFns-ClLT60_V.js} +4 -4
- package/dist/{importFns-DRPQExAD.js → importFns-BNDWuBuq.js} +2 -2
- package/dist/{importFns-4mi5Ih46.cjs → importFns-DA0Klh7_.cjs} +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/brepkit/geometryOps.d.ts +1 -0
- package/dist/kernel/interfaces/surfaceOps.d.ts +9 -0
- package/dist/kernel/occt/geometryQueryOps.d.ts +9 -0
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +4 -0
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/kernel/occtWasm/surfaceOps.d.ts +17 -0
- package/dist/kernel/solverAdapter.d.ts +8 -2
- package/dist/{measureFns-BLEx4ZU3.js → measureFns-DAP8LjBB.js} +3 -3
- package/dist/{measureFns-CT0XaSOt.cjs → measureFns-zGABZl6o.cjs} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-lwgHYQ79.cjs → meshFns-CEGnFm33.cjs} +3 -3
- package/dist/{meshFns-B3MjIqk1.js → meshFns-D-nLiHvU.js} +3 -3
- package/dist/{occtWasmAdapter-BH7r2nTq.cjs → occtWasmAdapter-Crs07qIe.cjs} +67 -0
- package/dist/{occtWasmAdapter-C7FDeTaw.js → occtWasmAdapter-D0MtWZYO.js} +67 -0
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-DcZDTQ_R.js → primitiveFns-CDbe5gjc.js} +7 -7
- package/dist/{primitiveFns-DZmgvzvk.cjs → primitiveFns-CpkG8ZkI.cjs} +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-w1YoIn_p.cjs → shapeFns-CDHya-nt.cjs} +2 -2
- package/dist/{shapeFns-BnkizFjV.js → shapeFns-DVUNOG2I.js} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeRefFns-B3myHs0D.cjs → shapeRefFns-B1Tygk9V.cjs} +4 -4
- package/dist/{shapeRefFns-OVWdFOAC.js → shapeRefFns-CAJUDLTi.js} +4 -4
- package/dist/{shapeTypes-yCQ8z5Hc.js → shapeTypes-2cKwu2z4.js} +35 -1
- package/dist/{shapeTypes-BIlZar9m.cjs → shapeTypes-DRxArFIc.cjs} +35 -1
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-CPOTKI5i.js → solidBuilders-Bx3UdW91.js} +2 -2
- package/dist/{solidBuilders-dNhToZgl.cjs → solidBuilders-ibLq_9EK.cjs} +2 -2
- package/dist/{surfaceBuilders-CS1QccDv.js → surfaceBuilders-BtNrSolT.js} +2 -2
- package/dist/{surfaceBuilders-CzHPZtd3.cjs → surfaceBuilders-D2PBBoja.cjs} +2 -2
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-TG6AH06v.cjs → textBlueprints-COG8m1aE.cjs} +7 -7
- package/dist/{textBlueprints-B57ej88L.js → textBlueprints-HfRD4iNF.js} +7 -7
- package/dist/{textMetrics-Dag-YREs.cjs → textMetrics-CTSpUXtk.cjs} +1 -1
- package/dist/{textMetrics-BxtB3sjj.js → textMetrics-Zp8rzokO.js} +1 -1
- package/dist/topology/faceFns.d.ts +9 -0
- package/dist/topology/index.d.ts +1 -1
- package/dist/topology.cjs +8 -7
- package/dist/topology.d.ts +1 -1
- package/dist/topology.js +8 -8
- package/dist/{topologyQueryFns-BuWZAQ_o.cjs → topologyQueryFns-024l64sD.cjs} +1 -1
- package/dist/{topologyQueryFns-Bxdnl5Vt.js → topologyQueryFns-c2RQIcfW.js} +1 -1
- 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-
|
|
2
|
-
import { E as EXACT_BREP_CAPABILITIES, T as DEFAULT_CAPABILITIES, t as OcctWasmAdapter } from "./occtWasmAdapter-
|
|
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-2cKwu2z4.js";
|
|
2
|
+
import { E as EXACT_BREP_CAPABILITIES, T as DEFAULT_CAPABILITIES, t as OcctWasmAdapter } from "./occtWasmAdapter-D0MtWZYO.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-c2RQIcfW.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
|
|
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$
|
|
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 { S as shapeType, _ as cast, a as faceOrientation, b as isCompSolid, 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, v as downcast, x as iterTopo, y as fromBREP } from "./faceFns-BBcrvY7r.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$3, 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-DVUNOG2I.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-CXhOkKR4.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-D-nLiHvU.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$1, 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$1, 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$1, 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-BtNrSolT.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-DYSaupiG.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$1, 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$1, x as subFace, y as solid, z as fillet$1 } from "./primitiveFns-CDbe5gjc.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-ClLT60_V.js";
|
|
19
|
+
import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-BRKbVgE2.js";
|
|
20
|
+
import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-CxT3j8jG.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-ZqWpAG8b.js";
|
|
22
|
+
import { r as makeCylinder } from "./solidBuilders-Bx3UdW91.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-DAP8LjBB.js";
|
|
24
|
+
import { t as cornerFinder } from "./cornerFinder-DcHCKoUh.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-CANP43pN.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-zLwbytjs.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-BNDWuBuq.js";
|
|
28
|
+
import { a as guidedSweep, c as sweep$1, 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-CSy2C7WW.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-HfRD4iNF.js";
|
|
30
|
+
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-BFRGMXSn.js";
|
|
31
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-Zp8rzokO.js";
|
|
32
|
+
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-CAJUDLTi.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;
|
|
@@ -2145,11 +2145,12 @@ function roof(w, options) {
|
|
|
2145
2145
|
//#endregion
|
|
2146
2146
|
//#region src/kernel/solverAdapter.ts
|
|
2147
2147
|
/**
|
|
2148
|
-
*
|
|
2149
|
-
*
|
|
2150
|
-
*
|
|
2151
|
-
*
|
|
2152
|
-
*
|
|
2148
|
+
* Degrees of freedom each constraint leaves unresolved when it can't be applied
|
|
2149
|
+
* (entity-type mismatch or an unreachable reference). All four types now solve
|
|
2150
|
+
* for well-typed inputs; these counts only feed the diagnostic `dof` for the
|
|
2151
|
+
* unsupported cases.
|
|
2152
|
+
* coincident: 3 translational · concentric: 2 rotational + 2 translational = 4
|
|
2153
|
+
* distance: 1 translational · angle: 1 rotational
|
|
2153
2154
|
*/
|
|
2154
2155
|
var UNSUPPORTED_DOF = {
|
|
2155
2156
|
coincident: 3,
|
|
@@ -2157,11 +2158,220 @@ var UNSUPPORTED_DOF = {
|
|
|
2157
2158
|
distance: 1,
|
|
2158
2159
|
angle: 1
|
|
2159
2160
|
};
|
|
2161
|
+
var IDENTITY_ROTATION = [
|
|
2162
|
+
1,
|
|
2163
|
+
0,
|
|
2164
|
+
0,
|
|
2165
|
+
0
|
|
2166
|
+
];
|
|
2167
|
+
function add$1(a, b) {
|
|
2168
|
+
return [
|
|
2169
|
+
a[0] + b[0],
|
|
2170
|
+
a[1] + b[1],
|
|
2171
|
+
a[2] + b[2]
|
|
2172
|
+
];
|
|
2173
|
+
}
|
|
2174
|
+
function sub(a, b) {
|
|
2175
|
+
return [
|
|
2176
|
+
a[0] - b[0],
|
|
2177
|
+
a[1] - b[1],
|
|
2178
|
+
a[2] - b[2]
|
|
2179
|
+
];
|
|
2180
|
+
}
|
|
2181
|
+
function dot(a, b) {
|
|
2182
|
+
return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
|
|
2183
|
+
}
|
|
2184
|
+
function cross(a, b) {
|
|
2185
|
+
return [
|
|
2186
|
+
a[1] * b[2] - a[2] * b[1],
|
|
2187
|
+
a[2] * b[0] - a[0] * b[2],
|
|
2188
|
+
a[0] * b[1] - a[1] * b[0]
|
|
2189
|
+
];
|
|
2190
|
+
}
|
|
2191
|
+
function scale$2(a, s) {
|
|
2192
|
+
return [
|
|
2193
|
+
a[0] * s,
|
|
2194
|
+
a[1] * s,
|
|
2195
|
+
a[2] * s
|
|
2196
|
+
];
|
|
2197
|
+
}
|
|
2198
|
+
function normalize(a) {
|
|
2199
|
+
const l = Math.hypot(a[0], a[1], a[2]) || 1;
|
|
2200
|
+
return [
|
|
2201
|
+
a[0] / l,
|
|
2202
|
+
a[1] / l,
|
|
2203
|
+
a[2] / l
|
|
2204
|
+
];
|
|
2205
|
+
}
|
|
2206
|
+
/** A unit vector perpendicular to `v` (for the 180° / parallel degenerate cases). */
|
|
2207
|
+
function anyPerpendicular(v) {
|
|
2208
|
+
return normalize(cross(v, Math.abs(v[0]) < .9 ? [
|
|
2209
|
+
1,
|
|
2210
|
+
0,
|
|
2211
|
+
0
|
|
2212
|
+
] : [
|
|
2213
|
+
0,
|
|
2214
|
+
1,
|
|
2215
|
+
0
|
|
2216
|
+
]));
|
|
2217
|
+
}
|
|
2218
|
+
/** Rotate vector `v` by quaternion `q` = [w, x, y, z]. */
|
|
2219
|
+
function qRotate(q, v) {
|
|
2220
|
+
const [w, x, y, z] = q;
|
|
2221
|
+
const tx = 2 * (y * v[2] - z * v[1]);
|
|
2222
|
+
const ty = 2 * (z * v[0] - x * v[2]);
|
|
2223
|
+
const tz = 2 * (x * v[1] - y * v[0]);
|
|
2224
|
+
return [
|
|
2225
|
+
v[0] + w * tx + (y * tz - z * ty),
|
|
2226
|
+
v[1] + w * ty + (z * tx - x * tz),
|
|
2227
|
+
v[2] + w * tz + (x * ty - y * tx)
|
|
2228
|
+
];
|
|
2229
|
+
}
|
|
2230
|
+
function qFromAxisAngle(axis, angle) {
|
|
2231
|
+
const h = angle / 2;
|
|
2232
|
+
const s = Math.sin(h);
|
|
2233
|
+
const u = normalize(axis);
|
|
2234
|
+
return [
|
|
2235
|
+
Math.cos(h),
|
|
2236
|
+
u[0] * s,
|
|
2237
|
+
u[1] * s,
|
|
2238
|
+
u[2] * s
|
|
2239
|
+
];
|
|
2240
|
+
}
|
|
2241
|
+
/** Shortest-arc quaternion rotating unit vector `from` onto unit vector `to`. */
|
|
2242
|
+
function qFromTo(from, to) {
|
|
2243
|
+
const a = normalize(from);
|
|
2244
|
+
const b = normalize(to);
|
|
2245
|
+
const d = dot(a, b);
|
|
2246
|
+
if (d >= .999999999) return IDENTITY_ROTATION;
|
|
2247
|
+
if (d <= -.999999999) return qFromAxisAngle(anyPerpendicular(a), Math.PI);
|
|
2248
|
+
const c = cross(a, b);
|
|
2249
|
+
const q = [
|
|
2250
|
+
1 + d,
|
|
2251
|
+
c[0],
|
|
2252
|
+
c[1],
|
|
2253
|
+
c[2]
|
|
2254
|
+
];
|
|
2255
|
+
const l = Math.hypot(q[0], q[1], q[2], q[3]) || 1;
|
|
2256
|
+
return [
|
|
2257
|
+
q[0] / l,
|
|
2258
|
+
q[1] / l,
|
|
2259
|
+
q[2] / l,
|
|
2260
|
+
q[3] / l
|
|
2261
|
+
];
|
|
2262
|
+
}
|
|
2263
|
+
/** Apply a pose (rotate then translate) to an entity's origin and any directions. */
|
|
2264
|
+
function transformEntity(e, pose) {
|
|
2265
|
+
const origin = add$1(qRotate(pose.rotation, e.origin), pose.position);
|
|
2266
|
+
return {
|
|
2267
|
+
type: e.type,
|
|
2268
|
+
origin,
|
|
2269
|
+
...e.normal ? { normal: qRotate(pose.rotation, e.normal) } : {},
|
|
2270
|
+
...e.direction ? { direction: qRotate(pose.rotation, e.direction) } : {}
|
|
2271
|
+
};
|
|
2272
|
+
}
|
|
2273
|
+
/**
|
|
2274
|
+
* Position a dependent plane against an already-placed reference plane.
|
|
2275
|
+
*
|
|
2276
|
+
* `ref` is the reference entity already in world space. The dependent is at the
|
|
2277
|
+
* origin (a node is only solved once, while unplaced), so the returned position
|
|
2278
|
+
* is its absolute translation along the reference normal. `extra` is the gap for
|
|
2279
|
+
* a distance mate (0 for coincident). Plane mates don't reorient the dependent.
|
|
2280
|
+
*/
|
|
2281
|
+
function solvePlanePair(ref, dep, extra) {
|
|
2282
|
+
const n = ref.normal ?? [
|
|
2283
|
+
0,
|
|
2284
|
+
0,
|
|
2285
|
+
1
|
|
2286
|
+
];
|
|
2287
|
+
return {
|
|
2288
|
+
position: scale$2(n, dot(n, sub(ref.origin, dep.origin)) + extra),
|
|
2289
|
+
rotation: IDENTITY_ROTATION
|
|
2290
|
+
};
|
|
2291
|
+
}
|
|
2292
|
+
/**
|
|
2293
|
+
* Concentric (axis-axis) mate: rotate the dependent so its axis is parallel to
|
|
2294
|
+
* the reference axis, then translate so the two axes are collinear (the
|
|
2295
|
+
* dependent's axis point is placed on the reference axis). `ref` is in world
|
|
2296
|
+
* space; the dependent is at the origin.
|
|
2297
|
+
*/
|
|
2298
|
+
function solveConcentric(ref, dep) {
|
|
2299
|
+
const dRef = ref.direction ?? [
|
|
2300
|
+
0,
|
|
2301
|
+
0,
|
|
2302
|
+
1
|
|
2303
|
+
];
|
|
2304
|
+
const rotation = qFromTo(dep.direction ?? [
|
|
2305
|
+
0,
|
|
2306
|
+
0,
|
|
2307
|
+
1
|
|
2308
|
+
], dRef);
|
|
2309
|
+
const rotatedOrigin = qRotate(rotation, dep.origin);
|
|
2310
|
+
return {
|
|
2311
|
+
position: sub(ref.origin, rotatedOrigin),
|
|
2312
|
+
rotation
|
|
2313
|
+
};
|
|
2314
|
+
}
|
|
2315
|
+
/**
|
|
2316
|
+
* Angle mate: rotate the dependent so the angle between its (plane) normal and
|
|
2317
|
+
* the reference normal equals `angleRad`. Orientation-only — position is left at
|
|
2318
|
+
* the origin. `ref` is in world space; the dependent is at the origin.
|
|
2319
|
+
*/
|
|
2320
|
+
function solveAngle(ref, dep, angleRad) {
|
|
2321
|
+
const nRef = normalize(ref.normal ?? [
|
|
2322
|
+
0,
|
|
2323
|
+
0,
|
|
2324
|
+
1
|
|
2325
|
+
]);
|
|
2326
|
+
const nDep = normalize(dep.normal ?? [
|
|
2327
|
+
0,
|
|
2328
|
+
0,
|
|
2329
|
+
1
|
|
2330
|
+
]);
|
|
2331
|
+
const phi = Math.acos(Math.max(-1, Math.min(1, dot(nDep, nRef))));
|
|
2332
|
+
const c = cross(nDep, nRef);
|
|
2333
|
+
return {
|
|
2334
|
+
position: [
|
|
2335
|
+
0,
|
|
2336
|
+
0,
|
|
2337
|
+
0
|
|
2338
|
+
],
|
|
2339
|
+
rotation: qFromAxisAngle(Math.hypot(c[0], c[1], c[2]) < 1e-9 ? anyPerpendicular(nDep) : c, phi - angleRad)
|
|
2340
|
+
};
|
|
2341
|
+
}
|
|
2342
|
+
/** Entity types each positioning constraint requires of (entityA, entityB). */
|
|
2343
|
+
var REQUIRED_ENTITIES = {
|
|
2344
|
+
coincident: "plane",
|
|
2345
|
+
distance: "plane",
|
|
2346
|
+
angle: "plane",
|
|
2347
|
+
concentric: "axis"
|
|
2348
|
+
};
|
|
2349
|
+
var POSITIONING_TYPES = new Set([
|
|
2350
|
+
"coincident",
|
|
2351
|
+
"distance",
|
|
2352
|
+
"angle",
|
|
2353
|
+
"concentric"
|
|
2354
|
+
]);
|
|
2355
|
+
/** Dispatch a positioning mate to its solver. `ref` is already in world space. */
|
|
2356
|
+
function solveMate(c, ref, dep) {
|
|
2357
|
+
switch (c.type) {
|
|
2358
|
+
case "concentric": return solveConcentric(ref, dep);
|
|
2359
|
+
case "angle": return solveAngle(ref, dep, (c.value ?? 0) * Math.PI / 180);
|
|
2360
|
+
case "distance": return solvePlanePair(ref, dep, c.value ?? 0);
|
|
2361
|
+
default: return solvePlanePair(ref, dep, 0);
|
|
2362
|
+
}
|
|
2363
|
+
}
|
|
2160
2364
|
/**
|
|
2161
2365
|
* Solve assembly constraints analytically.
|
|
2162
2366
|
*
|
|
2163
|
-
*
|
|
2164
|
-
*
|
|
2367
|
+
* Handles: fixed, coincident/distance (plane-plane), concentric (axis-axis), and
|
|
2368
|
+
* angle (plane-plane orientation). For a positioning mate, entityA is the
|
|
2369
|
+
* reference and entityB the dependent. Chain roots (nodes never positioned by a
|
|
2370
|
+
* mate) and explicit `fixed` nodes anchor at the origin; constraints then resolve
|
|
2371
|
+
* in topological order — each places its dependent against the reference's solved
|
|
2372
|
+
* pose (rotation included), so multi-body chains compose. Returns
|
|
2373
|
+
* `converged: false` with details for entity-type mismatches and any constraint
|
|
2374
|
+
* whose reference never resolves.
|
|
2165
2375
|
*/
|
|
2166
2376
|
function solveConstraints(nodes, constraints) {
|
|
2167
2377
|
const transforms = /* @__PURE__ */ new Map();
|
|
@@ -2171,69 +2381,51 @@ function solveConstraints(nodes, constraints) {
|
|
|
2171
2381
|
0,
|
|
2172
2382
|
0
|
|
2173
2383
|
],
|
|
2174
|
-
rotation:
|
|
2175
|
-
1,
|
|
2176
|
-
0,
|
|
2177
|
-
0,
|
|
2178
|
-
0
|
|
2179
|
-
]
|
|
2384
|
+
rotation: IDENTITY_ROTATION
|
|
2180
2385
|
});
|
|
2181
2386
|
const unsupported = [];
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
if (a.entity.type === "plane" && b.entity.type === "plane") {
|
|
2213
|
-
const aNormal = a.entity.normal ?? [
|
|
2214
|
-
0,
|
|
2215
|
-
0,
|
|
2216
|
-
1
|
|
2217
|
-
];
|
|
2218
|
-
const aOrigin = a.entity.origin;
|
|
2219
|
-
const bOrigin = b.entity.origin;
|
|
2220
|
-
const offset = aNormal[0] * (aOrigin[0] - bOrigin[0]) + aNormal[1] * (aOrigin[1] - bOrigin[1]) + aNormal[2] * (aOrigin[2] - bOrigin[2]) + c.value;
|
|
2221
|
-
const pos = [
|
|
2222
|
-
offset * aNormal[0],
|
|
2223
|
-
offset * aNormal[1],
|
|
2224
|
-
offset * aNormal[2]
|
|
2225
|
-
];
|
|
2226
|
-
transforms.set(b.node, {
|
|
2227
|
-
position: pos,
|
|
2228
|
-
rotation: [
|
|
2229
|
-
1,
|
|
2387
|
+
const positioning = constraints.filter((c) => POSITIONING_TYPES.has(c.type) && c.entityA && c.entityB);
|
|
2388
|
+
const dependents = /* @__PURE__ */ new Set();
|
|
2389
|
+
for (const c of positioning) if (c.entityB) dependents.add(c.entityB.node);
|
|
2390
|
+
const placed = /* @__PURE__ */ new Set();
|
|
2391
|
+
for (const node of nodes) if (!dependents.has(node)) placed.add(node);
|
|
2392
|
+
for (const c of constraints) if (c.type === "fixed" && c.entityA) placed.add(c.entityA.node);
|
|
2393
|
+
const pending = [];
|
|
2394
|
+
for (const c of positioning) {
|
|
2395
|
+
if (!c.entityA || !c.entityB) continue;
|
|
2396
|
+
const required = REQUIRED_ENTITIES[c.type];
|
|
2397
|
+
if (c.entityA.entity.type !== required || c.entityB.entity.type !== required) {
|
|
2398
|
+
unsupported.push(`${c.type}(${c.entityA.entity.type}-${c.entityB.entity.type})`);
|
|
2399
|
+
continue;
|
|
2400
|
+
}
|
|
2401
|
+
pending.push(c);
|
|
2402
|
+
}
|
|
2403
|
+
let progress = true;
|
|
2404
|
+
while (progress && pending.length > 0) {
|
|
2405
|
+
progress = false;
|
|
2406
|
+
for (let i = pending.length - 1; i >= 0; i--) {
|
|
2407
|
+
const c = pending[i];
|
|
2408
|
+
if (!c?.entityA || !c.entityB) continue;
|
|
2409
|
+
const ref = c.entityA;
|
|
2410
|
+
const dep = c.entityB;
|
|
2411
|
+
if (!placed.has(ref.node)) continue;
|
|
2412
|
+
pending.splice(i, 1);
|
|
2413
|
+
progress = true;
|
|
2414
|
+
if (placed.has(dep.node)) continue;
|
|
2415
|
+
const refPose = transforms.get(ref.node) ?? {
|
|
2416
|
+
position: [
|
|
2230
2417
|
0,
|
|
2231
2418
|
0,
|
|
2232
2419
|
0
|
|
2233
|
-
]
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2420
|
+
],
|
|
2421
|
+
rotation: IDENTITY_ROTATION
|
|
2422
|
+
};
|
|
2423
|
+
const refWorld = transformEntity(ref.entity, refPose);
|
|
2424
|
+
transforms.set(dep.node, solveMate(c, refWorld, dep.entity));
|
|
2425
|
+
placed.add(dep.node);
|
|
2426
|
+
}
|
|
2427
|
+
}
|
|
2428
|
+
for (const c of pending) unsupported.push(`${c.type}(unanchored)`);
|
|
2237
2429
|
return {
|
|
2238
2430
|
transforms,
|
|
2239
2431
|
dof: unsupported.reduce((sum, type) => {
|
|
@@ -2246,11 +2438,27 @@ function solveConstraints(nodes, constraints) {
|
|
|
2246
2438
|
//#endregion
|
|
2247
2439
|
//#region src/operations/mateFns.ts
|
|
2248
2440
|
function extractEntity(mate) {
|
|
2249
|
-
if (mate.face)
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2441
|
+
if (mate.face) {
|
|
2442
|
+
const axis = faceAxis(mate.face);
|
|
2443
|
+
if (axis) return {
|
|
2444
|
+
type: "axis",
|
|
2445
|
+
origin: axis.origin,
|
|
2446
|
+
direction: axis.direction
|
|
2447
|
+
};
|
|
2448
|
+
return {
|
|
2449
|
+
type: "plane",
|
|
2450
|
+
origin: faceCenter(mate.face),
|
|
2451
|
+
normal: normalAt(mate.face)
|
|
2452
|
+
};
|
|
2453
|
+
}
|
|
2454
|
+
if (mate.edge) {
|
|
2455
|
+
if (getCurveType(mate.edge) === "LINE") return {
|
|
2456
|
+
type: "axis",
|
|
2457
|
+
origin: curveStartPoint(mate.edge),
|
|
2458
|
+
direction: curveTangentAt(mate.edge)
|
|
2459
|
+
};
|
|
2460
|
+
return null;
|
|
2461
|
+
}
|
|
2254
2462
|
if (mate.point) return {
|
|
2255
2463
|
type: "point",
|
|
2256
2464
|
origin: mate.point
|
|
@@ -3010,7 +3218,7 @@ function mirror(shape, options) {
|
|
|
3010
3218
|
}
|
|
3011
3219
|
/** Scale a shape uniformly. Returns a new shape. */
|
|
3012
3220
|
function scale(shape, factor, options) {
|
|
3013
|
-
return scale$
|
|
3221
|
+
return scale$3(resolve(shape), factor, options?.center);
|
|
3014
3222
|
}
|
|
3015
3223
|
/** Clone a shape (deep copy). */
|
|
3016
3224
|
function clone(shape) {
|
|
@@ -5229,7 +5437,7 @@ function evalScale(node, ctx) {
|
|
|
5229
5437
|
if (!center.ok) return center;
|
|
5230
5438
|
const r = ctx.evalNode(node.target);
|
|
5231
5439
|
if (!r.ok) return r;
|
|
5232
|
-
return ok(scale$
|
|
5440
|
+
return ok(scale$3(r.value, f.value, center.value));
|
|
5233
5441
|
}
|
|
5234
5442
|
function evalMirror(node, ctx) {
|
|
5235
5443
|
if (node.target.kind === "Empty") return emptyResult("Mirror");
|
|
@@ -6139,4 +6347,4 @@ var csg_exports = /* @__PURE__ */ __exportAll({
|
|
|
6139
6347
|
withEvaluator: () => withEvaluator
|
|
6140
6348
|
});
|
|
6141
6349
|
//#endregion
|
|
6142
|
-
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, box$1 as sdfBox, capsule as sdfCapsule, cone$1 as sdfCone, cylinder$1 as sdfCylinder, fieldAxialRamp as sdfFieldAxialRamp, fieldClamp as sdfFieldClamp, fieldConst as sdfFieldConst, fieldFromSdf as sdfFieldFromSdf, fieldRadialRamp as sdfFieldRadialRamp, lattice as sdfLattice, plane as sdfPlane, roundedBox as sdfRoundedBox, sphere as sdfSphere, strutLattice as sdfStrutLattice, sweep as sdfSweep, torus as sdfTorus, 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$1 as sphere, split, stepCount, stepsFrom, stretch2D, subFace, supportExtrude, supportsConstraintSketch, supportsProjection, surfaceFromGrid, surfaceFromImage, sweep$1 as sweep, tagFaces, tangentArc, tap, tapErr, textBlueprints, textMetrics, thicken, threePointArc, toBREP, toBufferGeometryData, toGroupedBufferGeometryData, toKernelVec, toLODGeometryData, toLineGeometryData, toSVGPathD, toVec2, toVec3, torus$1 as 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 };
|
|
6350
|
+
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, faceAxis, 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, box$1 as sdfBox, capsule as sdfCapsule, cone$1 as sdfCone, cylinder$1 as sdfCylinder, fieldAxialRamp as sdfFieldAxialRamp, fieldClamp as sdfFieldClamp, fieldConst as sdfFieldConst, fieldFromSdf as sdfFieldFromSdf, fieldRadialRamp as sdfFieldRadialRamp, lattice as sdfLattice, plane as sdfPlane, roundedBox as sdfRoundedBox, sphere as sdfSphere, strutLattice as sdfStrutLattice, sweep as sdfSweep, torus as sdfTorus, 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$1 as sphere, split, stepCount, stepsFrom, stretch2D, subFace, supportExtrude, supportsConstraintSketch, supportsProjection, surfaceFromGrid, surfaceFromImage, sweep$1 as sweep, tagFaces, tangentArc, tap, tapErr, textBlueprints, textMetrics, thicken, threePointArc, toBREP, toBufferGeometryData, toGroupedBufferGeometryData, toKernelVec, toLODGeometryData, toLineGeometryData, toSVGPathD, toVec2, toVec3, torus$1 as 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
|
-
import { Z as getKernel, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, t as castShape } from "./shapeTypes-2cKwu2z4.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-c2RQIcfW.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. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DRxArFIc.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-024l64sD.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. */
|
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-DRxArFIc.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-2cKwu2z4.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
|
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-BmY5kO0w.cjs");
|
|
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
|
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-CxT3j8jG.js";
|
|
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-2cKwu2z4.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
|
-
import { R as DisposalScope, Y as _usingCtx, Z as getKernel, a as createEdge, o as createFace, u as createWire } from "./shapeTypes-
|
|
1
|
+
import { R as DisposalScope, Y as _usingCtx, Z as getKernel, a as createEdge, o as createFace, u as createWire } from "./shapeTypes-2cKwu2z4.js";
|
|
2
2
|
import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
|
|
3
3
|
import { R as unwrap, h as bug, s as safeIndex } from "./errors-DNWJsfVU.js";
|
|
4
|
-
import { s as getEdges } from "./topologyQueryFns-
|
|
4
|
+
import { s as getEdges } from "./topologyQueryFns-c2RQIcfW.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
8
|
import { a as planeToWorld, o as resolvePlane } from "./planeOps-DSjjtrjg.js";
|
|
9
|
-
import {
|
|
10
|
-
import { c as curveStartPoint, m as offsetWire2D, r as curveIsClosed } from "./curveFns-
|
|
9
|
+
import { d as pointOnSurface, l as normalAt, m as uvBounds, r as faceCenter, u as outerWire, v as downcast } from "./faceFns-BBcrvY7r.js";
|
|
10
|
+
import { c as curveStartPoint, m as offsetWire2D, r as curveIsClosed } from "./curveFns-CXhOkKR4.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 PRECISION_OFFSET, l as add2d, y as squareDistance2d } from "./helpers
|
|
15
|
-
import { _ as Curve2D, a as edgeToCurve, c as make2dCircle, d as make2dInerpolatedBSplineCurve, f as make2dSegmentCurve, g as approximateAsSvgCompatibleCurve, i as curvesAsEdgesOnPlane, l as make2dEllipse, o as make2dArcFromCenter, t as Blueprint, v as deserializeCurve2D, y as BoundingBox2d } from "./blueprint-
|
|
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-BtNrSolT.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-BRKbVgE2.js";
|
|
14
|
+
import { _ as samePoint$1, b as subtract2d, c as PRECISION_OFFSET, l as add2d, y as squareDistance2d } from "./helpers-CxT3j8jG.js";
|
|
15
|
+
import { _ as Curve2D, a as edgeToCurve, c as make2dCircle, d as make2dInerpolatedBSplineCurve, f as make2dSegmentCurve, g as approximateAsSvgCompatibleCurve, i as curvesAsEdgesOnPlane, l as make2dEllipse, o as make2dArcFromCenter, t as Blueprint, v as deserializeCurve2D, y as BoundingBox2d } from "./blueprint-qVw9ZkE4.js";
|
|
16
|
+
import { t as cornerFinder } from "./cornerFinder-DcHCKoUh.js";
|
|
17
|
+
import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-CANP43pN.js";
|
|
18
|
+
import { _ as wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-HfRD4iNF.js";
|
|
19
|
+
import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-BFRGMXSn.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.
|