brepjs 18.6.0 → 18.14.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/README.md +6 -0
- package/dist/{sketching/sketcher2d.d.ts → 2d/blueprints/baseSketcher2d.d.ts} +4 -91
- package/dist/2d/blueprints/blueprint.d.ts +0 -1
- package/dist/2d/blueprints/blueprintApproximations.d.ts +0 -1
- package/dist/2d/blueprints/blueprintCustomCorners.d.ts +0 -1
- package/dist/2d/blueprints/blueprintFns.d.ts +0 -1
- package/dist/2d/blueprints/blueprintOffset.d.ts +0 -1
- package/dist/2d/blueprints/blueprintSketcher.d.ts +29 -0
- package/dist/2d/blueprints/blueprints.d.ts +0 -1
- package/dist/2d/blueprints/boolean2D.d.ts +0 -1
- package/dist/2d/blueprints/booleanHelpers.d.ts +0 -1
- package/dist/2d/blueprints/booleanOperations.d.ts +0 -1
- package/dist/2d/blueprints/cannedBlueprints.d.ts +0 -1
- package/dist/2d/blueprints/compoundBlueprint.d.ts +0 -1
- package/dist/{sketching → 2d/blueprints}/ellipseUtils.d.ts +19 -2
- package/dist/{sketching/sketcherlib.d.ts → 2d/blueprints/genericSketcher.d.ts} +1 -20
- package/dist/2d/blueprints/index.d.ts +0 -1
- package/dist/2d/blueprints/intersectionSegments.d.ts +0 -1
- package/dist/2d/blueprints/lib.d.ts +0 -1
- package/dist/2d/blueprints/segmentAssembly.d.ts +0 -1
- package/dist/2d/blueprints/svg.d.ts +0 -1
- package/dist/2d/curve2dGeometryFns.d.ts +0 -1
- package/dist/2d/curves.d.ts +0 -1
- package/dist/2d/lib/approximations.d.ts +0 -1
- package/dist/2d/lib/boundingBox2d.d.ts +0 -1
- package/dist/2d/lib/curve2D.d.ts +0 -1
- package/dist/2d/lib/curve2dFns.d.ts +0 -1
- package/dist/2d/lib/customCorners.d.ts +0 -1
- package/dist/2d/lib/definitions.d.ts +0 -1
- package/dist/2d/lib/index.d.ts +0 -1
- package/dist/2d/lib/intersections.d.ts +0 -1
- package/dist/2d/lib/makeCurves.d.ts +0 -1
- package/dist/2d/lib/offset.d.ts +0 -1
- package/dist/2d/lib/precision.d.ts +0 -1
- package/dist/2d/lib/stitching.d.ts +0 -1
- package/dist/2d/lib/svgPath.d.ts +0 -1
- package/dist/2d/lib/utils.d.ts +0 -1
- package/dist/2d/lib/vectorOperations.d.ts +0 -1
- package/dist/2d.cjs +20 -19
- package/dist/2d.d.ts +0 -1
- package/dist/2d.js +7 -6
- package/dist/{blueprint-CscZ0-wr.cjs → blueprint-B8ogGJiQ.cjs} +16 -15
- package/dist/{blueprint-BCoJbaQN.js → blueprint-Dv45Evnu.js} +16 -15
- package/dist/{blueprintFns-DQP4KQHE.cjs → blueprintFns-BK3FYYjO.cjs} +4 -4
- package/dist/{blueprintFns-BZlx6BjG.js → blueprintFns-a9C2g8_E.js} +3 -3
- package/dist/{boolean2D-k1AJmCMp.cjs → blueprintSketcher-Bei866Bt.cjs} +65 -1383
- package/dist/{boolean2D-JvgjbESt.js → blueprintSketcher-xDsl9GXO.js} +70 -1316
- package/dist/boolean2D-DGuiEJHA.cjs +902 -0
- package/dist/boolean2D-Z7P0c012.js +855 -0
- package/dist/{booleanFns-D13Pb-NO.js → booleanFns-CRa80qMX.js} +9 -9
- package/dist/{booleanFns-DQW4lt7H.cjs → booleanFns-qmgMQyDl.cjs} +12 -12
- package/dist/brepjs.cjs +772 -112
- package/dist/brepjs.js +692 -42
- package/dist/cameraFns-1y1NyACI.cjs +315 -0
- package/dist/cameraFns-CUzI5RKS.js +274 -0
- package/dist/core/constants.d.ts +0 -1
- package/dist/core/curve2dHandle.d.ts +0 -1
- package/dist/core/dimensionTypes.d.ts +0 -1
- package/dist/core/disposal.d.ts +0 -1
- package/dist/core/errors.d.ts +0 -1
- package/dist/core/kernelBoundary.d.ts +0 -1
- package/dist/core/kernelCall.d.ts +0 -1
- package/dist/core/kernelErrorTranslation.d.ts +0 -1
- package/dist/core/planeOps.d.ts +0 -1
- package/dist/core/planeTypes.d.ts +0 -1
- package/dist/core/result.d.ts +0 -1
- package/dist/core/shapeTypeCache.d.ts +0 -1
- package/dist/core/shapeTypes.d.ts +0 -1
- package/dist/core/typeDiscriminants.d.ts +0 -1
- package/dist/core/types.d.ts +0 -1
- package/dist/core/validityTypes.d.ts +0 -1
- package/dist/core/vecOps.d.ts +0 -1
- package/dist/core.cjs +6 -6
- package/dist/core.d.ts +0 -1
- package/dist/core.js +6 -6
- package/dist/{cornerFinder-5BYE2cbd.cjs → cornerFinder-CC8EBRCR.cjs} +3 -3
- package/dist/{cornerFinder-Zg7pf2s0.js → cornerFinder-Dix2ghke.js} +3 -3
- package/dist/{curveFns-DhqUp0EI.js → curveFns-B4tWuinR.js} +2 -2
- package/dist/{curveFns-DrT54cm8.cjs → curveFns-CD20-4fM.cjs} +2 -2
- package/dist/{drawFns-lUXjhTYL.js → drawFns-BsarLfUN.js} +163 -769
- package/dist/{drawFns-DmP2o1oF.cjs → drawFns-LlOZoFyp.cjs} +203 -985
- package/dist/{errors-DboJwVCf.js → errors-0fYW_YnO.js} +2 -1
- package/dist/{errors-CXRNVCec.cjs → errors-Dv6pfNct.cjs} +2 -1
- package/dist/{extrudeFns-B9bVCt3C.js → extrudeFns-7pE8dIWz.js} +3 -3
- package/dist/{extrudeFns-BtblHdaJ.cjs → extrudeFns-DD36mWKv.cjs} +3 -3
- package/dist/faceFns-BFWz17_E.js +218 -0
- package/dist/faceFns-DP7i60yJ.cjs +343 -0
- package/dist/gear/gearFns.d.ts +129 -0
- package/dist/gear/gearMath.d.ts +88 -0
- package/dist/gear/gearProfile.d.ts +16 -0
- package/dist/gear/index.d.ts +3 -0
- package/dist/{helpers-BpXNcxuJ.cjs → helpers-Cyj6gaqy.cjs} +14 -13
- package/dist/{helpers-S_Ht6gwX.js → helpers-vV2ONZwD.js} +9 -8
- package/dist/{historyFns-B01hrkcJ.js → historyFns-DGb61ETW.js} +6 -6
- package/dist/{historyFns-RHO-QvEZ.cjs → historyFns-DfyrPjnK.cjs} +6 -6
- package/dist/{importFns-CG49lyTm.cjs → importFns-C-p0vl_h.cjs} +11 -19
- package/dist/{importFns-C0tUyeiW.js → importFns-Ci-L2iB3.js} +11 -19
- package/dist/index.d.ts +16 -8
- package/dist/io/dxfExportFns.d.ts +0 -1
- package/dist/io/dxfImportFns.d.ts +0 -1
- package/dist/io/gltfExportFns.d.ts +0 -1
- package/dist/io/gltfImportFns.d.ts +0 -1
- package/dist/io/importFns.d.ts +0 -1
- package/dist/io/ioUtils.d.ts +0 -1
- package/dist/io/objExportFns.d.ts +0 -1
- package/dist/io/objImportFns.d.ts +0 -1
- package/dist/io/stepConfigFns.d.ts +0 -1
- package/dist/io/svgImportFns.d.ts +0 -1
- package/dist/io/threemfExportFns.d.ts +0 -1
- package/dist/io/threemfImportFns.d.ts +0 -1
- package/dist/io.cjs +2 -2
- package/dist/io.d.ts +0 -1
- package/dist/io.js +2 -2
- package/dist/kernel/brepkit/booleanOps.d.ts +23 -1
- package/dist/kernel/brepkit/brepkitAdapter.d.ts +21 -408
- package/dist/kernel/brepkit/brepkitWasmTypes.d.ts +0 -1
- package/dist/kernel/brepkit/constructionOps.d.ts +51 -1
- package/dist/kernel/brepkit/evolutionOps.d.ts +34 -3
- package/dist/kernel/brepkit/geometryOps.d.ts +63 -2
- package/dist/kernel/brepkit/helpers.d.ts +6 -1
- package/dist/kernel/brepkit/internalOps.d.ts +0 -1
- package/dist/kernel/brepkit/ioOps.d.ts +47 -9
- package/dist/kernel/brepkit/kernel2dOps.d.ts +113 -1
- package/dist/kernel/brepkit/measureOps.d.ts +39 -1
- package/dist/kernel/brepkit/meshOps.d.ts +7 -1
- package/dist/kernel/brepkit/modifierOps.d.ts +15 -1
- package/dist/kernel/brepkit/repairOps.d.ts +14 -1
- package/dist/kernel/brepkit/sketchOps.d.ts +3 -1
- package/dist/kernel/brepkit/sweepOps.d.ts +37 -1
- package/dist/kernel/brepkit/topologyOps.d.ts +16 -1
- package/dist/kernel/brepkit/transformOps.d.ts +18 -1
- package/dist/kernel/geometry2d.d.ts +0 -1
- package/dist/kernel/index.d.ts +0 -1
- package/dist/kernel/interfaces/booleanOps.d.ts +0 -1
- package/dist/kernel/interfaces/builderOps.d.ts +0 -1
- package/dist/kernel/interfaces/core.d.ts +0 -1
- package/dist/kernel/interfaces/curveOps.d.ts +0 -1
- package/dist/kernel/interfaces/evolutionOps.d.ts +0 -1
- package/dist/kernel/interfaces/index.d.ts +0 -1
- package/dist/kernel/interfaces/ioOps.d.ts +0 -1
- package/dist/kernel/interfaces/measureOps.d.ts +0 -1
- package/dist/kernel/interfaces/meshOps.d.ts +0 -1
- package/dist/kernel/interfaces/modifierOps.d.ts +0 -1
- package/dist/kernel/interfaces/primitiveOps.d.ts +0 -1
- package/dist/kernel/interfaces/repairOps.d.ts +0 -1
- package/dist/kernel/interfaces/surfaceOps.d.ts +0 -1
- package/dist/kernel/interfaces/sweepOps.d.ts +0 -1
- package/dist/kernel/interfaces/topologyOps.d.ts +0 -1
- package/dist/kernel/interfaces/transformOps.d.ts +0 -1
- package/dist/kernel/kernel2dTypes.d.ts +0 -1
- package/dist/kernel/occt/advancedOps.d.ts +126 -24
- package/dist/kernel/occt/booleanBatchOps.d.ts +0 -1
- package/dist/kernel/occt/booleanOps.d.ts +11 -1
- package/dist/kernel/occt/booleanPipelineOps.d.ts +10 -1
- package/dist/kernel/occt/constructorOps.d.ts +14 -1
- package/dist/kernel/occt/curveOps.d.ts +13 -1
- package/dist/kernel/occt/defaultAdapter.d.ts +10 -441
- package/dist/kernel/occt/evolutionOps.d.ts +0 -1
- package/dist/kernel/occt/extendedConstructorOps.d.ts +31 -1
- package/dist/kernel/occt/geometryQueryOps.d.ts +40 -1
- package/dist/kernel/occt/healingOps.d.ts +6 -1
- package/dist/kernel/occt/historyOps.d.ts +17 -1
- package/dist/kernel/occt/hullOps.d.ts +14 -1
- package/dist/kernel/occt/ioOps.d.ts +9 -1
- package/dist/kernel/occt/kernel2dOps.d.ts +113 -1
- package/dist/kernel/occt/measureOps.d.ts +19 -1
- package/dist/kernel/occt/meshOps.d.ts +5 -1
- package/dist/kernel/occt/modifierOps.d.ts +24 -1
- package/dist/kernel/occt/nurbsQueryOps.d.ts +5 -1
- package/dist/kernel/occt/sweepOps.d.ts +23 -1
- package/dist/kernel/occt/topologyOps.d.ts +10 -1
- package/dist/kernel/occt/transformOps.d.ts +14 -4
- package/dist/kernel/occt/wasmTypes/externals.d.ts +0 -1
- package/dist/kernel/occt/wasmTypes/index.d.ts +0 -1
- package/dist/kernel/occt/wasmTypes/occtBuilders.d.ts +0 -1
- package/dist/kernel/occtWasm/adapterShims.d.ts +4 -0
- package/dist/kernel/occtWasm/booleanOps.d.ts +11 -0
- package/dist/kernel/occtWasm/constructionOps.d.ts +36 -0
- package/dist/kernel/occtWasm/curveOps.d.ts +23 -0
- package/dist/kernel/occtWasm/evolutionOps.d.ts +17 -0
- package/dist/kernel/occtWasm/helpers.d.ts +31 -0
- package/dist/kernel/occtWasm/hullOps.d.ts +12 -0
- package/dist/kernel/occtWasm/ioOps.d.ts +52 -0
- package/dist/kernel/occtWasm/kernel2dOps.d.ts +90 -0
- package/dist/kernel/occtWasm/measureOps.d.ts +31 -0
- package/dist/kernel/occtWasm/meshOps.d.ts +6 -0
- package/dist/kernel/occtWasm/modifierOps.d.ts +14 -0
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +30 -31
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/kernel/occtWasm/occtWasmTypes.d.ts +0 -1
- package/dist/kernel/occtWasm/primitiveOps.d.ts +10 -0
- package/dist/kernel/occtWasm/repairOps.d.ts +10 -0
- package/dist/kernel/occtWasm/surfaceOps.d.ts +28 -0
- package/dist/kernel/occtWasm/sweepOps.d.ts +38 -0
- package/dist/kernel/occtWasm/topologyOps.d.ts +14 -0
- package/dist/kernel/occtWasm/transformOps.d.ts +27 -0
- package/dist/kernel/perfStats.d.ts +0 -1
- package/dist/kernel/solverAdapter.d.ts +0 -1
- package/dist/kernel/types.d.ts +0 -1
- package/dist/{measureFns-C751QGI1.cjs → measureFns-6ifSQfJt.cjs} +6 -5
- package/dist/{measureFns-B8C85hbT.js → measureFns-Io2nHE1k.js} +4 -3
- package/dist/measurement/interferenceFns.d.ts +0 -1
- package/dist/measurement/measureCache.d.ts +0 -1
- package/dist/measurement/measureFns.d.ts +0 -1
- package/dist/measurement/measureTypes.d.ts +0 -1
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.d.ts +0 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-Cdhtbrhm.cjs → meshFns-BCRVZgPi.cjs} +3 -3
- package/dist/{meshFns-BgvsA-xA.js → meshFns-DSdkRFWq.js} +3 -3
- package/dist/ns/booleans.d.ts +0 -1
- package/dist/ns/construction.d.ts +0 -1
- package/dist/ns/ioNs.d.ts +0 -1
- package/dist/ns/measurement.d.ts +0 -1
- package/dist/ns/modifiers.d.ts +0 -1
- package/dist/ns/patterns.d.ts +0 -1
- package/dist/ns/primitives.d.ts +0 -1
- package/dist/ns/query.d.ts +0 -1
- package/dist/ns/transforms.d.ts +0 -1
- package/dist/occtWasmAdapter--TZGP9DX.js +4606 -0
- package/dist/occtWasmAdapter-C2VW-uYg.cjs +4719 -0
- package/dist/operations/api.d.ts +0 -1
- package/dist/operations/assemblyFns.d.ts +0 -1
- package/dist/operations/compoundOpsFns.d.ts +0 -1
- package/dist/operations/convexHullFns.d.ts +0 -1
- package/dist/operations/exporterFns.d.ts +0 -1
- package/dist/operations/exporterUtils.d.ts +0 -1
- package/dist/operations/exporters.d.ts +0 -1
- package/dist/operations/extrudeFns.d.ts +0 -1
- package/dist/operations/extrudeUtils.d.ts +0 -1
- package/dist/operations/guidedSweepFns.d.ts +0 -1
- package/dist/operations/historyFns.d.ts +0 -1
- package/dist/operations/loftFns.d.ts +0 -1
- package/dist/operations/mateFns.d.ts +0 -1
- package/dist/operations/multiSweepFns.d.ts +0 -1
- package/dist/operations/patternFns.d.ts +0 -1
- package/dist/operations/roofFns.d.ts +0 -1
- package/dist/operations/straightSkeleton.d.ts +0 -1
- package/dist/operations/sweepFns.d.ts +0 -1
- package/dist/operations.cjs +2 -2
- package/dist/operations.d.ts +0 -1
- package/dist/operations.js +2 -2
- package/dist/{planeOps-sTrM3dcQ.js → planeOps-4i2qEraD.js} +4 -4
- package/dist/{planeOps-BJOIbn4K.cjs → planeOps-CH4ruLuj.cjs} +4 -4
- package/dist/{primitiveFns-BLxaJ40A.cjs → primitiveFns-BH-JQPzh.cjs} +20 -19
- package/dist/{primitiveFns-fR9sWOEb.js → primitiveFns-C1p92ZcD.js} +8 -7
- package/dist/projection/cameraFns.d.ts +0 -1
- package/dist/projection/makeProjectedEdges.d.ts +0 -1
- package/dist/projection/projectionPlanes.d.ts +0 -1
- package/dist/projection.cjs +9 -0
- package/dist/projection.d.ts +11 -0
- package/dist/projection.js +2 -0
- package/dist/query/cornerFinder.d.ts +0 -1
- package/dist/query/directionUtils.d.ts +0 -1
- package/dist/query/edgeFinder.d.ts +0 -1
- package/dist/query/faceFinder.d.ts +0 -1
- package/dist/query/finderCore.d.ts +0 -1
- package/dist/query/finderFns.d.ts +0 -1
- package/dist/query/helpers.d.ts +0 -1
- package/dist/query/shapeDistanceFilter.d.ts +0 -1
- package/dist/query/shapeFinders.d.ts +0 -1
- package/dist/query/vertexFinder.d.ts +0 -1
- package/dist/query/wireFinder.d.ts +0 -1
- package/dist/query.cjs +2 -2
- package/dist/query.d.ts +0 -1
- package/dist/query.js +2 -2
- package/dist/result.cjs +1 -1
- package/dist/result.d.ts +0 -1
- package/dist/result.js +1 -1
- package/dist/{shapeFns-183zCtMc.cjs → shapeFns-B7x82K11.cjs} +17 -17
- package/dist/{shapeFns-2X3VOi1a.js → shapeFns-BhZ9weSI.js} +4 -4
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.d.ts +0 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeRefFns-CU1Jwq9C.js → shapeRefFns-B9PsEqWf.js} +6 -4
- package/dist/{shapeRefFns-CFyv5cdW.cjs → shapeRefFns-wDY88A8u.cjs} +8 -6
- package/dist/{shapeTypes-C0MDggKf.cjs → shapeTypes-BTt_LLbk.cjs} +6922 -7884
- package/dist/{shapeTypes-CN0GUoHr.js → shapeTypes-C--1jaT1.js} +6900 -7862
- package/dist/sketching/cannedSketches.d.ts +0 -1
- package/dist/sketching/compoundSketch.d.ts +8 -7
- package/dist/sketching/draw3d.d.ts +1 -2
- package/dist/sketching/drawFns.d.ts +4 -3
- package/dist/sketching/{draw.d.ts → drawing.d.ts} +2 -127
- package/dist/sketching/drawingFactories.d.ts +94 -0
- package/dist/sketching/drawingPen.d.ts +34 -0
- package/dist/sketching/faceSketcher.d.ts +52 -0
- package/dist/sketching/shortcuts.d.ts +0 -1
- package/dist/sketching/sketch.d.ts +64 -10
- package/dist/sketching/sketchFns.d.ts +42 -95
- package/dist/sketching/sketcher.d.ts +2 -3
- package/dist/sketching/sketches.d.ts +5 -6
- package/dist/sketching.cjs +19 -18
- package/dist/sketching.d.ts +8 -5
- package/dist/sketching.js +3 -2
- package/dist/{solidBuilders-DACzFqvX.cjs → solidBuilders-CX_197Xm.cjs} +3 -3
- package/dist/{solidBuilders-BuS5ByIl.js → solidBuilders-Xs7VDMGD.js} +3 -3
- package/dist/{surfaceBuilders-CbH4FIW5.cjs → surfaceBuilders-CYeTNW33.cjs} +25 -3
- package/dist/{surfaceBuilders-BVH2SL-z.js → surfaceBuilders-CinmHCbZ.js} +20 -4
- package/dist/text/fontRegistry.d.ts +22 -0
- package/dist/text/sketchText.d.ts +30 -0
- package/dist/text/textBlueprints.d.ts +0 -91
- package/dist/text/textMetrics.d.ts +39 -0
- package/dist/text.cjs +9 -0
- package/dist/text.d.ts +12 -0
- package/dist/text.js +3 -0
- package/dist/textBlueprints-Do6xNsLt.js +643 -0
- package/dist/textBlueprints-oWhiABaY.cjs +800 -0
- package/dist/textMetrics-BjJ8sn_e.js +69 -0
- package/dist/textMetrics-CUvtglQE.cjs +86 -0
- package/dist/topology/adjacencyFns.d.ts +0 -1
- package/dist/topology/api.d.ts +0 -1
- package/dist/topology/apiTypes.d.ts +0 -1
- package/dist/topology/booleanDiagnosticFns.d.ts +0 -1
- package/dist/topology/booleanFns.d.ts +0 -1
- package/dist/topology/cast.d.ts +0 -1
- package/dist/topology/chamferAngleFns.d.ts +0 -1
- package/dist/topology/compoundOpsFns.d.ts +0 -1
- package/dist/topology/curveBuilders.d.ts +12 -1
- package/dist/topology/curveFns.d.ts +0 -1
- package/dist/topology/evolutionFns.d.ts +0 -1
- package/dist/topology/faceFns.d.ts +0 -1
- package/dist/topology/healingFns.d.ts +0 -1
- package/dist/topology/hullFns.d.ts +0 -1
- package/dist/topology/index.d.ts +0 -1
- package/dist/topology/meshCache.d.ts +0 -1
- package/dist/topology/meshFns.d.ts +0 -1
- package/dist/topology/metadata/colorFns.d.ts +0 -1
- package/dist/topology/metadata/faceTagFns.d.ts +0 -1
- package/dist/topology/metadata/metadataPropagation.d.ts +0 -1
- package/dist/topology/metadata/originTrackingFns.d.ts +0 -1
- package/dist/topology/minkowskiFns.d.ts +0 -1
- package/dist/topology/modifierFns.d.ts +0 -1
- package/dist/topology/nurbsFns.d.ts +0 -1
- package/dist/topology/polyhedronFns.d.ts +0 -1
- package/dist/topology/positionFns.d.ts +0 -1
- package/dist/topology/primitiveFns.d.ts +0 -1
- package/dist/topology/shapeBooleans.d.ts +0 -1
- package/dist/topology/shapeFns.d.ts +0 -1
- package/dist/topology/shapeHelpers.d.ts +0 -1
- package/dist/topology/shapeModifiers.d.ts +0 -1
- package/dist/topology/shapeRef/index.d.ts +0 -1
- package/dist/topology/shapeRef/scoring.d.ts +0 -1
- package/dist/topology/shapeRef/shapeRefFns.d.ts +0 -1
- package/dist/topology/shapeRef/shapeRefTypes.d.ts +0 -1
- package/dist/topology/shapeUtils.d.ts +0 -1
- package/dist/topology/solidBuilders.d.ts +0 -1
- package/dist/topology/surfaceBuilders.d.ts +0 -1
- package/dist/topology/surfaceFns.d.ts +0 -1
- package/dist/topology/threeHelpers.d.ts +0 -1
- package/dist/topology/topologyQueryFns.d.ts +0 -1
- package/dist/topology/transformFns.d.ts +0 -1
- package/dist/topology/wrapperFns.d.ts +0 -1
- package/dist/topology.cjs +18 -17
- package/dist/topology.d.ts +0 -1
- package/dist/topology.js +7 -6
- package/dist/{faceFns-22idS-ht.cjs → topologyQueryFns-BU0qdNJP.cjs} +2 -342
- package/dist/{faceFns-NbWd8-iR.js → topologyQueryFns-Dhf85ZBK.js} +3 -217
- package/dist/utils/arrayAccess.d.ts +0 -1
- package/dist/utils/bug.d.ts +0 -1
- package/dist/utils/ioFilename.d.ts +0 -1
- package/dist/utils/precisionRound.d.ts +0 -1
- package/dist/utils/range.d.ts +0 -1
- package/dist/utils/uuid.d.ts +0 -1
- package/dist/utils/vec2d.d.ts +0 -1
- package/dist/utils/vec3.d.ts +8 -1
- package/dist/utils/zip.d.ts +0 -1
- package/dist/vec3-BRj3eI54.js +25 -0
- package/dist/vec3-S4Oh59IX.cjs +36 -0
- package/dist/vectors.cjs +4 -4
- package/dist/vectors.d.ts +0 -1
- package/dist/vectors.js +4 -4
- package/dist/worker/index.d.ts +0 -1
- package/dist/worker/protocol.d.ts +0 -1
- package/dist/worker/taskQueue.d.ts +0 -1
- package/dist/worker/workerClient.d.ts +0 -1
- package/dist/worker/workerHandler.d.ts +0 -1
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.ts +0 -1
- package/dist/worker.js +1 -1
- package/package.json +35 -14
- package/dist/2d/blueprints/blueprint.d.ts.map +0 -1
- package/dist/2d/blueprints/blueprintApproximations.d.ts.map +0 -1
- package/dist/2d/blueprints/blueprintCustomCorners.d.ts.map +0 -1
- package/dist/2d/blueprints/blueprintFns.d.ts.map +0 -1
- package/dist/2d/blueprints/blueprintOffset.d.ts.map +0 -1
- package/dist/2d/blueprints/blueprints.d.ts.map +0 -1
- package/dist/2d/blueprints/boolean2D.d.ts.map +0 -1
- package/dist/2d/blueprints/booleanHelpers.d.ts.map +0 -1
- package/dist/2d/blueprints/booleanOperations.d.ts.map +0 -1
- package/dist/2d/blueprints/cannedBlueprints.d.ts.map +0 -1
- package/dist/2d/blueprints/compoundBlueprint.d.ts.map +0 -1
- package/dist/2d/blueprints/index.d.ts.map +0 -1
- package/dist/2d/blueprints/intersectionSegments.d.ts.map +0 -1
- package/dist/2d/blueprints/lib.d.ts.map +0 -1
- package/dist/2d/blueprints/segmentAssembly.d.ts.map +0 -1
- package/dist/2d/blueprints/svg.d.ts.map +0 -1
- package/dist/2d/curve2dGeometryFns.d.ts.map +0 -1
- package/dist/2d/curves.d.ts.map +0 -1
- package/dist/2d/lib/approximations.d.ts.map +0 -1
- package/dist/2d/lib/boundingBox2d.d.ts.map +0 -1
- package/dist/2d/lib/curve2D.d.ts.map +0 -1
- package/dist/2d/lib/curve2dFns.d.ts.map +0 -1
- package/dist/2d/lib/customCorners.d.ts.map +0 -1
- package/dist/2d/lib/definitions.d.ts.map +0 -1
- package/dist/2d/lib/index.d.ts.map +0 -1
- package/dist/2d/lib/intersections.d.ts.map +0 -1
- package/dist/2d/lib/makeCurves.d.ts.map +0 -1
- package/dist/2d/lib/offset.d.ts.map +0 -1
- package/dist/2d/lib/precision.d.ts.map +0 -1
- package/dist/2d/lib/stitching.d.ts.map +0 -1
- package/dist/2d/lib/svgPath.d.ts.map +0 -1
- package/dist/2d/lib/utils.d.ts.map +0 -1
- package/dist/2d/lib/vectorOperations.d.ts.map +0 -1
- package/dist/2d.d.ts.map +0 -1
- package/dist/core/constants.d.ts.map +0 -1
- package/dist/core/curve2dHandle.d.ts.map +0 -1
- package/dist/core/dimensionTypes.d.ts.map +0 -1
- package/dist/core/disposal.d.ts.map +0 -1
- package/dist/core/errors.d.ts.map +0 -1
- package/dist/core/kernelBoundary.d.ts.map +0 -1
- package/dist/core/kernelCall.d.ts.map +0 -1
- package/dist/core/kernelErrorTranslation.d.ts.map +0 -1
- package/dist/core/planeOps.d.ts.map +0 -1
- package/dist/core/planeTypes.d.ts.map +0 -1
- package/dist/core/result.d.ts.map +0 -1
- package/dist/core/shapeTypeCache.d.ts.map +0 -1
- package/dist/core/shapeTypes.d.ts.map +0 -1
- package/dist/core/typeDiscriminants.d.ts.map +0 -1
- package/dist/core/types.d.ts.map +0 -1
- package/dist/core/validityTypes.d.ts.map +0 -1
- package/dist/core/vecOps.d.ts.map +0 -1
- package/dist/core.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/io/dxfExportFns.d.ts.map +0 -1
- package/dist/io/dxfImportFns.d.ts.map +0 -1
- package/dist/io/gltfExportFns.d.ts.map +0 -1
- package/dist/io/gltfImportFns.d.ts.map +0 -1
- package/dist/io/importFns.d.ts.map +0 -1
- package/dist/io/ioUtils.d.ts.map +0 -1
- package/dist/io/objExportFns.d.ts.map +0 -1
- package/dist/io/objImportFns.d.ts.map +0 -1
- package/dist/io/stepConfigFns.d.ts.map +0 -1
- package/dist/io/svgImportFns.d.ts.map +0 -1
- package/dist/io/threemfExportFns.d.ts.map +0 -1
- package/dist/io/threemfImportFns.d.ts.map +0 -1
- package/dist/io.d.ts.map +0 -1
- package/dist/kernel/brepkit/booleanOps.d.ts.map +0 -1
- package/dist/kernel/brepkit/brepkitAdapter.d.ts.map +0 -1
- package/dist/kernel/brepkit/brepkitWasmTypes.d.ts.map +0 -1
- package/dist/kernel/brepkit/constructionOps.d.ts.map +0 -1
- package/dist/kernel/brepkit/evolutionOps.d.ts.map +0 -1
- package/dist/kernel/brepkit/geometryOps.d.ts.map +0 -1
- package/dist/kernel/brepkit/helpers.d.ts.map +0 -1
- package/dist/kernel/brepkit/internalOps.d.ts.map +0 -1
- package/dist/kernel/brepkit/ioOps.d.ts.map +0 -1
- package/dist/kernel/brepkit/kernel2dOps.d.ts.map +0 -1
- package/dist/kernel/brepkit/measureOps.d.ts.map +0 -1
- package/dist/kernel/brepkit/meshOps.d.ts.map +0 -1
- package/dist/kernel/brepkit/modifierOps.d.ts.map +0 -1
- package/dist/kernel/brepkit/repairOps.d.ts.map +0 -1
- package/dist/kernel/brepkit/sketchOps.d.ts.map +0 -1
- package/dist/kernel/brepkit/sweepOps.d.ts.map +0 -1
- package/dist/kernel/brepkit/topologyOps.d.ts.map +0 -1
- package/dist/kernel/brepkit/transformOps.d.ts.map +0 -1
- package/dist/kernel/geometry2d.d.ts.map +0 -1
- package/dist/kernel/index.d.ts.map +0 -1
- package/dist/kernel/interfaces/booleanOps.d.ts.map +0 -1
- package/dist/kernel/interfaces/builderOps.d.ts.map +0 -1
- package/dist/kernel/interfaces/core.d.ts.map +0 -1
- package/dist/kernel/interfaces/curveOps.d.ts.map +0 -1
- package/dist/kernel/interfaces/evolutionOps.d.ts.map +0 -1
- package/dist/kernel/interfaces/index.d.ts.map +0 -1
- package/dist/kernel/interfaces/ioOps.d.ts.map +0 -1
- package/dist/kernel/interfaces/measureOps.d.ts.map +0 -1
- package/dist/kernel/interfaces/meshOps.d.ts.map +0 -1
- package/dist/kernel/interfaces/modifierOps.d.ts.map +0 -1
- package/dist/kernel/interfaces/primitiveOps.d.ts.map +0 -1
- package/dist/kernel/interfaces/repairOps.d.ts.map +0 -1
- package/dist/kernel/interfaces/surfaceOps.d.ts.map +0 -1
- package/dist/kernel/interfaces/sweepOps.d.ts.map +0 -1
- package/dist/kernel/interfaces/topologyOps.d.ts.map +0 -1
- package/dist/kernel/interfaces/transformOps.d.ts.map +0 -1
- package/dist/kernel/kernel2dTypes.d.ts.map +0 -1
- package/dist/kernel/occt/advancedOps.d.ts.map +0 -1
- package/dist/kernel/occt/booleanBatchOps.d.ts.map +0 -1
- package/dist/kernel/occt/booleanOps.d.ts.map +0 -1
- package/dist/kernel/occt/booleanPipelineOps.d.ts.map +0 -1
- package/dist/kernel/occt/constructorOps.d.ts.map +0 -1
- package/dist/kernel/occt/curveOps.d.ts.map +0 -1
- package/dist/kernel/occt/defaultAdapter.d.ts.map +0 -1
- package/dist/kernel/occt/evolutionOps.d.ts.map +0 -1
- package/dist/kernel/occt/extendedConstructorOps.d.ts.map +0 -1
- package/dist/kernel/occt/geometryQueryOps.d.ts.map +0 -1
- package/dist/kernel/occt/healingOps.d.ts.map +0 -1
- package/dist/kernel/occt/historyOps.d.ts.map +0 -1
- package/dist/kernel/occt/hullOps.d.ts.map +0 -1
- package/dist/kernel/occt/ioOps.d.ts.map +0 -1
- package/dist/kernel/occt/kernel2dOps.d.ts.map +0 -1
- package/dist/kernel/occt/measureOps.d.ts.map +0 -1
- package/dist/kernel/occt/meshOps.d.ts.map +0 -1
- package/dist/kernel/occt/modifierOps.d.ts.map +0 -1
- package/dist/kernel/occt/nurbsQueryOps.d.ts.map +0 -1
- package/dist/kernel/occt/sweepOps.d.ts.map +0 -1
- package/dist/kernel/occt/topologyOps.d.ts.map +0 -1
- package/dist/kernel/occt/transformOps.d.ts.map +0 -1
- package/dist/kernel/occt/wasmTypes/externals.d.ts.map +0 -1
- package/dist/kernel/occt/wasmTypes/index.d.ts.map +0 -1
- package/dist/kernel/occt/wasmTypes/occtBuilders.d.ts.map +0 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.d.ts.map +0 -1
- package/dist/kernel/occtWasm/occtWasmTypes.d.ts.map +0 -1
- package/dist/kernel/perfStats.d.ts.map +0 -1
- package/dist/kernel/solverAdapter.d.ts.map +0 -1
- package/dist/kernel/types.d.ts.map +0 -1
- package/dist/measurement/interferenceFns.d.ts.map +0 -1
- package/dist/measurement/measureCache.d.ts.map +0 -1
- package/dist/measurement/measureFns.d.ts.map +0 -1
- package/dist/measurement/measureTypes.d.ts.map +0 -1
- package/dist/measurement.d.ts.map +0 -1
- package/dist/ns/booleans.d.ts.map +0 -1
- package/dist/ns/construction.d.ts.map +0 -1
- package/dist/ns/ioNs.d.ts.map +0 -1
- package/dist/ns/measurement.d.ts.map +0 -1
- package/dist/ns/modifiers.d.ts.map +0 -1
- package/dist/ns/patterns.d.ts.map +0 -1
- package/dist/ns/primitives.d.ts.map +0 -1
- package/dist/ns/query.d.ts.map +0 -1
- package/dist/ns/transforms.d.ts.map +0 -1
- package/dist/occtWasmAdapter-CuZRRioz.cjs +0 -3947
- package/dist/occtWasmAdapter-DIhUXubY.js +0 -3834
- package/dist/operations/api.d.ts.map +0 -1
- package/dist/operations/assemblyFns.d.ts.map +0 -1
- package/dist/operations/compoundOpsFns.d.ts.map +0 -1
- package/dist/operations/convexHullFns.d.ts.map +0 -1
- package/dist/operations/exporterFns.d.ts.map +0 -1
- package/dist/operations/exporterUtils.d.ts.map +0 -1
- package/dist/operations/exporters.d.ts.map +0 -1
- package/dist/operations/extrudeFns.d.ts.map +0 -1
- package/dist/operations/extrudeUtils.d.ts.map +0 -1
- package/dist/operations/guidedSweepFns.d.ts.map +0 -1
- package/dist/operations/historyFns.d.ts.map +0 -1
- package/dist/operations/loftFns.d.ts.map +0 -1
- package/dist/operations/mateFns.d.ts.map +0 -1
- package/dist/operations/multiSweepFns.d.ts.map +0 -1
- package/dist/operations/patternFns.d.ts.map +0 -1
- package/dist/operations/roofFns.d.ts.map +0 -1
- package/dist/operations/straightSkeleton.d.ts.map +0 -1
- package/dist/operations/sweepFns.d.ts.map +0 -1
- package/dist/operations.d.ts.map +0 -1
- package/dist/projection/cameraFns.d.ts.map +0 -1
- package/dist/projection/makeProjectedEdges.d.ts.map +0 -1
- package/dist/projection/projectionPlanes.d.ts.map +0 -1
- package/dist/query/cornerFinder.d.ts.map +0 -1
- package/dist/query/directionUtils.d.ts.map +0 -1
- package/dist/query/edgeFinder.d.ts.map +0 -1
- package/dist/query/faceFinder.d.ts.map +0 -1
- package/dist/query/finderCore.d.ts.map +0 -1
- package/dist/query/finderFns.d.ts.map +0 -1
- package/dist/query/helpers.d.ts.map +0 -1
- package/dist/query/shapeDistanceFilter.d.ts.map +0 -1
- package/dist/query/shapeFinders.d.ts.map +0 -1
- package/dist/query/vertexFinder.d.ts.map +0 -1
- package/dist/query/wireFinder.d.ts.map +0 -1
- package/dist/query.d.ts.map +0 -1
- package/dist/quick.d.ts.map +0 -1
- package/dist/result.d.ts.map +0 -1
- package/dist/shapeRef.d.ts.map +0 -1
- package/dist/sketching/cannedSketches.d.ts.map +0 -1
- package/dist/sketching/compoundSketch.d.ts.map +0 -1
- package/dist/sketching/draw.d.ts.map +0 -1
- package/dist/sketching/draw3d.d.ts.map +0 -1
- package/dist/sketching/drawFns.d.ts.map +0 -1
- package/dist/sketching/ellipseUtils.d.ts.map +0 -1
- package/dist/sketching/shortcuts.d.ts.map +0 -1
- package/dist/sketching/sketch.d.ts.map +0 -1
- package/dist/sketching/sketchFns.d.ts.map +0 -1
- package/dist/sketching/sketchLib.d.ts +0 -47
- package/dist/sketching/sketchLib.d.ts.map +0 -1
- package/dist/sketching/sketchUtils.d.ts +0 -8
- package/dist/sketching/sketchUtils.d.ts.map +0 -1
- package/dist/sketching/sketcher.d.ts.map +0 -1
- package/dist/sketching/sketcher2d.d.ts.map +0 -1
- package/dist/sketching/sketcherlib.d.ts.map +0 -1
- package/dist/sketching/sketches.d.ts.map +0 -1
- package/dist/sketching.d.ts.map +0 -1
- package/dist/text/textBlueprints.d.ts.map +0 -1
- package/dist/topology/adjacencyFns.d.ts.map +0 -1
- package/dist/topology/api.d.ts.map +0 -1
- package/dist/topology/apiTypes.d.ts.map +0 -1
- package/dist/topology/booleanDiagnosticFns.d.ts.map +0 -1
- package/dist/topology/booleanFns.d.ts.map +0 -1
- package/dist/topology/cast.d.ts.map +0 -1
- package/dist/topology/chamferAngleFns.d.ts.map +0 -1
- package/dist/topology/compoundOpsFns.d.ts.map +0 -1
- package/dist/topology/curveBuilders.d.ts.map +0 -1
- package/dist/topology/curveFns.d.ts.map +0 -1
- package/dist/topology/evolutionFns.d.ts.map +0 -1
- package/dist/topology/faceFns.d.ts.map +0 -1
- package/dist/topology/healingFns.d.ts.map +0 -1
- package/dist/topology/hullFns.d.ts.map +0 -1
- package/dist/topology/index.d.ts.map +0 -1
- package/dist/topology/meshCache.d.ts.map +0 -1
- package/dist/topology/meshFns.d.ts.map +0 -1
- package/dist/topology/metadata/colorFns.d.ts.map +0 -1
- package/dist/topology/metadata/faceTagFns.d.ts.map +0 -1
- package/dist/topology/metadata/metadataPropagation.d.ts.map +0 -1
- package/dist/topology/metadata/originTrackingFns.d.ts.map +0 -1
- package/dist/topology/minkowskiFns.d.ts.map +0 -1
- package/dist/topology/modifierFns.d.ts.map +0 -1
- package/dist/topology/nurbsFns.d.ts.map +0 -1
- package/dist/topology/polyhedronFns.d.ts.map +0 -1
- package/dist/topology/positionFns.d.ts.map +0 -1
- package/dist/topology/primitiveFns.d.ts.map +0 -1
- package/dist/topology/shapeBooleans.d.ts.map +0 -1
- package/dist/topology/shapeFns.d.ts.map +0 -1
- package/dist/topology/shapeHelpers.d.ts.map +0 -1
- package/dist/topology/shapeModifiers.d.ts.map +0 -1
- package/dist/topology/shapeRef/index.d.ts.map +0 -1
- package/dist/topology/shapeRef/scoring.d.ts.map +0 -1
- package/dist/topology/shapeRef/shapeRefFns.d.ts.map +0 -1
- package/dist/topology/shapeRef/shapeRefTypes.d.ts.map +0 -1
- package/dist/topology/shapeUtils.d.ts.map +0 -1
- package/dist/topology/solidBuilders.d.ts.map +0 -1
- package/dist/topology/surfaceBuilders.d.ts.map +0 -1
- package/dist/topology/surfaceFns.d.ts.map +0 -1
- package/dist/topology/threeHelpers.d.ts.map +0 -1
- package/dist/topology/topologyQueryFns.d.ts.map +0 -1
- package/dist/topology/transformFns.d.ts.map +0 -1
- package/dist/topology/wrapperFns.d.ts.map +0 -1
- package/dist/topology.d.ts.map +0 -1
- package/dist/utils/arrayAccess.d.ts.map +0 -1
- package/dist/utils/bug.d.ts.map +0 -1
- package/dist/utils/ioFilename.d.ts.map +0 -1
- package/dist/utils/precisionRound.d.ts.map +0 -1
- package/dist/utils/range.d.ts.map +0 -1
- package/dist/utils/uuid.d.ts.map +0 -1
- package/dist/utils/vec2d.d.ts.map +0 -1
- package/dist/utils/vec3.d.ts.map +0 -1
- package/dist/utils/zip.d.ts.map +0 -1
- package/dist/vectors.d.ts.map +0 -1
- package/dist/worker/index.d.ts.map +0 -1
- package/dist/worker/protocol.d.ts.map +0 -1
- package/dist/worker/taskQueue.d.ts.map +0 -1
- package/dist/worker/workerClient.d.ts.map +0 -1
- package/dist/worker/workerHandler.d.ts.map +0 -1
- package/dist/worker.d.ts.map +0 -1
- /package/dist/{arrayAccess-DsnQpdSD.cjs → arrayAccess-7pTWqkJu.cjs} +0 -0
- /package/dist/{arrayAccess-tCIbjLs5.js → arrayAccess-C5IWcxs9.js} +0 -0
- /package/dist/{constants-csSEYddm.js → constants-Ci5CA3aZ.js} +0 -0
- /package/dist/{constants-BNP_xnBN.cjs → constants-DTorLmes.cjs} +0 -0
- /package/dist/{types--GD-LVc6.js → types-BIdk_GJY.js} +0 -0
- /package/dist/{types-gLi9wL0N.cjs → types-CDkxah-M.cjs} +0 -0
- /package/dist/{vecOps-CODplJp3.cjs → vecOps-D7xplSx8.cjs} +0 -0
- /package/dist/{vecOps-B-PCHgyB.js → vecOps-DVROrqTV.js} +0 -0
- /package/dist/{workerHandler-C-3cFcsQ.cjs → workerHandler-C7seK7H-.cjs} +0 -0
- /package/dist/{workerHandler-Dm0_0F8Z.js → workerHandler-DaulgMax.js} +0 -0
package/dist/brepjs.cjs
CHANGED
|
@@ -1,31 +1,37 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
3
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
2
|
+
const require_textBlueprints = require("./textBlueprints-oWhiABaY.cjs");
|
|
3
|
+
const require_shapeTypes = require("./shapeTypes-BTt_LLbk.cjs");
|
|
4
|
+
const require_vec3 = require("./vec3-S4Oh59IX.cjs");
|
|
5
|
+
const require_occtWasmAdapter = require("./occtWasmAdapter-C2VW-uYg.cjs");
|
|
6
|
+
const require_errors = require("./errors-Dv6pfNct.cjs");
|
|
7
|
+
const require_topologyQueryFns = require("./topologyQueryFns-BU0qdNJP.cjs");
|
|
8
|
+
const require_constants = require("./constants-DTorLmes.cjs");
|
|
9
|
+
const require_types = require("./types-CDkxah-M.cjs");
|
|
10
|
+
const require_vecOps = require("./vecOps-D7xplSx8.cjs");
|
|
11
|
+
const require_planeOps = require("./planeOps-CH4ruLuj.cjs");
|
|
12
|
+
const require_faceFns = require("./faceFns-DP7i60yJ.cjs");
|
|
13
|
+
const require_shapeFns = require("./shapeFns-B7x82K11.cjs");
|
|
14
|
+
const require_curveFns = require("./curveFns-CD20-4fM.cjs");
|
|
15
|
+
const require_meshFns = require("./meshFns-BCRVZgPi.cjs");
|
|
16
|
+
const require_arrayAccess = require("./arrayAccess-7pTWqkJu.cjs");
|
|
17
|
+
const require_surfaceBuilders = require("./surfaceBuilders-CYeTNW33.cjs");
|
|
18
|
+
const require_booleanFns = require("./booleanFns-qmgMQyDl.cjs");
|
|
19
|
+
const require_primitiveFns = require("./primitiveFns-BH-JQPzh.cjs");
|
|
20
|
+
const require_historyFns = require("./historyFns-DfyrPjnK.cjs");
|
|
21
|
+
const require_blueprintSketcher = require("./blueprintSketcher-Bei866Bt.cjs");
|
|
22
|
+
const require_helpers = require("./helpers-Cyj6gaqy.cjs");
|
|
23
|
+
const require_drawFns = require("./drawFns-LlOZoFyp.cjs");
|
|
24
|
+
const require_solidBuilders = require("./solidBuilders-CX_197Xm.cjs");
|
|
25
|
+
const require_measureFns = require("./measureFns-6ifSQfJt.cjs");
|
|
26
|
+
const require_cornerFinder = require("./cornerFinder-CC8EBRCR.cjs");
|
|
27
|
+
const require_boolean2D = require("./boolean2D-DGuiEJHA.cjs");
|
|
28
|
+
const require_blueprintFns = require("./blueprintFns-BK3FYYjO.cjs");
|
|
29
|
+
const require_importFns = require("./importFns-C-p0vl_h.cjs");
|
|
30
|
+
const require_extrudeFns = require("./extrudeFns-DD36mWKv.cjs");
|
|
31
|
+
const require_cameraFns = require("./cameraFns-1y1NyACI.cjs");
|
|
32
|
+
const require_textMetrics = require("./textMetrics-CUvtglQE.cjs");
|
|
33
|
+
const require_shapeRefFns = require("./shapeRefFns-wDY88A8u.cjs");
|
|
34
|
+
const require_workerHandler = require("./workerHandler-C7seK7H-.cjs");
|
|
29
35
|
//#region src/topology/shapeBooleans.ts
|
|
30
36
|
var BOPAlgo_GlueShift = 1;
|
|
31
37
|
var BOPAlgo_GlueFull = 2;
|
|
@@ -69,9 +75,9 @@ function withNearestPostFilter(baseFinder, nearestPoint) {
|
|
|
69
75
|
const candidates = baseFinder.findAll(shape);
|
|
70
76
|
if (candidates.length === 0) return [];
|
|
71
77
|
let bestIdx = 0;
|
|
72
|
-
let bestDist = require_vecOps.vecDistance(
|
|
78
|
+
let bestDist = require_vecOps.vecDistance(require_topologyQueryFns.vertexPosition(require_arrayAccess.firstOrThrow(candidates)), nearestPoint);
|
|
73
79
|
for (let i = 1; i < candidates.length; i++) {
|
|
74
|
-
const d = require_vecOps.vecDistance(
|
|
80
|
+
const d = require_vecOps.vecDistance(require_topologyQueryFns.vertexPosition(require_arrayAccess.getAtOrThrow(candidates, i)), nearestPoint);
|
|
75
81
|
if (d < bestDist) {
|
|
76
82
|
bestDist = d;
|
|
77
83
|
bestIdx = i;
|
|
@@ -93,9 +99,9 @@ function withNearestPostFilter(baseFinder, nearestPoint) {
|
|
|
93
99
|
function buildVertexFinder(filters) {
|
|
94
100
|
return require_helpers.createTypedFinder("vertex", filters, buildVertexFinder, (_base, withFilter) => ({
|
|
95
101
|
nearestTo: (point) => withNearestPostFilter(buildVertexFinder(filters), point),
|
|
96
|
-
atPosition: (point, tolerance = 1e-4) => withFilter((vertex) => require_vecOps.vecDistance(
|
|
102
|
+
atPosition: (point, tolerance = 1e-4) => withFilter((vertex) => require_vecOps.vecDistance(require_topologyQueryFns.vertexPosition(vertex), point) < tolerance),
|
|
97
103
|
withinBox: (min, max) => withFilter((vertex) => {
|
|
98
|
-
const pos =
|
|
104
|
+
const pos = require_topologyQueryFns.vertexPosition(vertex);
|
|
99
105
|
return pos[0] >= min[0] - 1e-6 && pos[0] <= max[0] + 1e-6 && pos[1] >= min[1] - 1e-6 && pos[1] <= max[1] + 1e-6 && pos[2] >= min[2] - 1e-6 && pos[2] <= max[2] + 1e-6;
|
|
100
106
|
}),
|
|
101
107
|
atDistance: (distance, point = [
|
|
@@ -103,7 +109,7 @@ function buildVertexFinder(filters) {
|
|
|
103
109
|
0,
|
|
104
110
|
0
|
|
105
111
|
], tolerance = 1e-4) => withFilter((vertex) => {
|
|
106
|
-
const pos =
|
|
112
|
+
const pos = require_topologyQueryFns.vertexPosition(vertex);
|
|
107
113
|
return Math.abs(require_vecOps.vecDistance(pos, point) - distance) < tolerance;
|
|
108
114
|
})
|
|
109
115
|
}));
|
|
@@ -411,10 +417,10 @@ function convexHull(points) {
|
|
|
411
417
|
* type is 'sphere'.
|
|
412
418
|
*/
|
|
413
419
|
function detectSphere(shape) {
|
|
414
|
-
const faces =
|
|
420
|
+
const faces = require_topologyQueryFns.getFaces(shape);
|
|
415
421
|
if (faces.length !== 1) return null;
|
|
416
|
-
const face = faces
|
|
417
|
-
if (
|
|
422
|
+
const face = require_vec3.wasmIndex(faces, 0);
|
|
423
|
+
if (require_topologyQueryFns.getCachedSurfaceType(face) !== "sphere") return null;
|
|
418
424
|
const faceArea = require_shapeTypes.getKernel().area(face.wrapped);
|
|
419
425
|
return Math.sqrt(faceArea / (4 * Math.PI));
|
|
420
426
|
}
|
|
@@ -444,8 +450,8 @@ function minkowskiSphere(shape, radius, tolerance) {
|
|
|
444
450
|
function minkowskiGeneral(shape, tool, tolerance) {
|
|
445
451
|
const kernel = require_shapeTypes.getKernel();
|
|
446
452
|
try {
|
|
447
|
-
const shapeVerts =
|
|
448
|
-
const toolVerts =
|
|
453
|
+
const shapeVerts = require_topologyQueryFns.getVertices(shape);
|
|
454
|
+
const toolVerts = require_topologyQueryFns.getVertices(tool);
|
|
449
455
|
if (shapeVerts.length === 0 || toolVerts.length === 0) return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.MINKOWSKI_FAILED, "Minkowski sum: one or both shapes have no vertices", void 0, { operation: "minkowski" }));
|
|
450
456
|
const sumPoints = [];
|
|
451
457
|
for (const sv of shapeVerts) {
|
|
@@ -938,7 +944,7 @@ function computeStraightSkeletonImpl(polygon) {
|
|
|
938
944
|
* evaluation. The kernel builds the actual B-Rep faces and solid.
|
|
939
945
|
*/
|
|
940
946
|
function extractPolygon(w) {
|
|
941
|
-
const pts =
|
|
947
|
+
const pts = require_topologyQueryFns.getEdges(w).map((e) => {
|
|
942
948
|
const pt = require_curveFns.curveStartPoint(e);
|
|
943
949
|
return {
|
|
944
950
|
x: pt[0],
|
|
@@ -1410,11 +1416,11 @@ function checkInterference(shape1, shape2, tolerance = 1e-6) {
|
|
|
1410
1416
|
*/
|
|
1411
1417
|
function checkAllInterferences(shapes, tolerance = 1e-6) {
|
|
1412
1418
|
const pairs = [];
|
|
1413
|
-
const boxes = shapes.map((s) =>
|
|
1419
|
+
const boxes = shapes.map((s) => require_topologyQueryFns.getBounds(s));
|
|
1414
1420
|
shapes.forEach((si, i) => {
|
|
1415
1421
|
for (let j = i + 1; j < shapes.length; j++) {
|
|
1416
|
-
if (aabbDisjoint(boxes
|
|
1417
|
-
const result = require_errors.unwrap(checkInterference(si, shapes
|
|
1422
|
+
if (aabbDisjoint(require_vec3.wasmIndex(boxes, i), require_vec3.wasmIndex(boxes, j), tolerance)) continue;
|
|
1423
|
+
const result = require_errors.unwrap(checkInterference(si, require_vec3.wasmIndex(shapes, j), tolerance));
|
|
1418
1424
|
if (result.hasInterference) pairs.push({
|
|
1419
1425
|
i,
|
|
1420
1426
|
j,
|
|
@@ -2118,7 +2124,7 @@ function chamfer(shape, edgesOrDistance, maybeDistance) {
|
|
|
2118
2124
|
}
|
|
2119
2125
|
const normalized = normalizeChamferDistance(distance);
|
|
2120
2126
|
if (normalized.mode === "distAngle") {
|
|
2121
|
-
const selectedEdges = edges ??
|
|
2127
|
+
const selectedEdges = edges ?? require_topologyQueryFns.getEdges(s);
|
|
2122
2128
|
return require_primitiveFns.chamferDistAngle(s, [...selectedEdges], normalized.distance, normalized.angle);
|
|
2123
2129
|
}
|
|
2124
2130
|
return require_primitiveFns.chamfer(s, edges, normalized.distance);
|
|
@@ -2167,7 +2173,7 @@ function meshEdges(shape, options) {
|
|
|
2167
2173
|
}
|
|
2168
2174
|
/** Get a summary description of a shape. */
|
|
2169
2175
|
function describe(shape) {
|
|
2170
|
-
return
|
|
2176
|
+
return require_topologyQueryFns.describe(resolve(shape));
|
|
2171
2177
|
}
|
|
2172
2178
|
/** Serialize a shape to BREP format. */
|
|
2173
2179
|
function toBREP(shape) {
|
|
@@ -2223,14 +2229,14 @@ function revolve(face, options) {
|
|
|
2223
2229
|
*/
|
|
2224
2230
|
function loft(wires, options) {
|
|
2225
2231
|
const resolvedWires = wires.map((w) => resolve(w));
|
|
2226
|
-
return
|
|
2232
|
+
return require_textBlueprints.loft(resolvedWires, options);
|
|
2227
2233
|
}
|
|
2228
2234
|
//#endregion
|
|
2229
2235
|
//#region src/operations/compoundOpsFns.ts
|
|
2230
2236
|
/** Resolve a face selection: Face, FinderFn, or default (top Z-facing face). */
|
|
2231
2237
|
function resolveTargetFace(shape, faceSpec) {
|
|
2232
2238
|
if (faceSpec === void 0) {
|
|
2233
|
-
const faces =
|
|
2239
|
+
const faces = require_topologyQueryFns.getFaces(shape);
|
|
2234
2240
|
if (faces.length === 0) return require_errors.err(require_errors.validationError(require_errors.BrepErrorCode.COMPOUND_NO_FACES, "compoundOps: shape has no faces"));
|
|
2235
2241
|
let best = require_arrayAccess.firstOrThrow(faces);
|
|
2236
2242
|
let bestZ = require_faceFns.faceCenter(best)[2];
|
|
@@ -2247,7 +2253,7 @@ function resolveTargetFace(shape, faceSpec) {
|
|
|
2247
2253
|
if (typeof faceSpec === "function") {
|
|
2248
2254
|
const found = faceSpec(require_helpers.faceFinder()).findAll(shape);
|
|
2249
2255
|
if (found.length === 0) return require_errors.err(require_errors.queryError(require_errors.BrepErrorCode.COMPOUND_FACE_NOT_FOUND, "compoundOps: face finder matched no faces"));
|
|
2250
|
-
return require_errors.ok(found
|
|
2256
|
+
return require_errors.ok(require_vec3.wasmIndex(found, 0));
|
|
2251
2257
|
}
|
|
2252
2258
|
return require_errors.ok(faceSpec);
|
|
2253
2259
|
}
|
|
@@ -2285,7 +2291,7 @@ function drill(shape, options) {
|
|
|
2285
2291
|
let tool;
|
|
2286
2292
|
if (options.depth !== void 0) tool = require_solidBuilders.makeCylinder(radius, options.depth, pos, dir);
|
|
2287
2293
|
else {
|
|
2288
|
-
const b =
|
|
2294
|
+
const b = require_topologyQueryFns.getBounds(s);
|
|
2289
2295
|
const corners = [
|
|
2290
2296
|
[
|
|
2291
2297
|
b.xMin,
|
|
@@ -2457,6 +2463,15 @@ function unwrapOrThrow(result) {
|
|
|
2457
2463
|
if (require_errors.isErr(result)) throw new BrepWrapperError(result.error);
|
|
2458
2464
|
return result.value;
|
|
2459
2465
|
}
|
|
2466
|
+
function asValidSolid(s) {
|
|
2467
|
+
return s;
|
|
2468
|
+
}
|
|
2469
|
+
function asOrientedPlanarFace(f) {
|
|
2470
|
+
return f;
|
|
2471
|
+
}
|
|
2472
|
+
function asClosedWire(w) {
|
|
2473
|
+
return w;
|
|
2474
|
+
}
|
|
2460
2475
|
function createWrappedBase(val) {
|
|
2461
2476
|
return {
|
|
2462
2477
|
val,
|
|
@@ -2496,7 +2511,7 @@ function createWrappedBase(val) {
|
|
|
2496
2511
|
0,
|
|
2497
2512
|
1
|
|
2498
2513
|
] })),
|
|
2499
|
-
bounds: () =>
|
|
2514
|
+
bounds: () => require_topologyQueryFns.getBounds(val),
|
|
2500
2515
|
describe: () => describe(val),
|
|
2501
2516
|
clone: () => wrapAny(unwrapOrThrow(clone(val))),
|
|
2502
2517
|
mesh: (opts) => mesh(val, opts),
|
|
@@ -2538,16 +2553,16 @@ function createWrapped3D(val) {
|
|
|
2538
2553
|
split: (tools) => wrapAny(unwrapOrThrow(split(val, tools))),
|
|
2539
2554
|
slice: (planes, opts) => unwrapOrThrow(slice(val, planes, opts)),
|
|
2540
2555
|
fillet(...args) {
|
|
2541
|
-
if (args.length === 1) return wrap3D(unwrapOrThrow(fillet(val, args[0])));
|
|
2542
|
-
return wrap3D(unwrapOrThrow(fillet(val, args[0], args[1])));
|
|
2556
|
+
if (args.length === 1) return wrap3D(unwrapOrThrow(fillet(asValidSolid(val), args[0])));
|
|
2557
|
+
return wrap3D(unwrapOrThrow(fillet(asValidSolid(val), args[0], args[1])));
|
|
2543
2558
|
},
|
|
2544
2559
|
chamfer(...args) {
|
|
2545
|
-
if (args.length === 1) return wrap3D(unwrapOrThrow(chamfer(val, args[0])));
|
|
2546
|
-
return wrap3D(unwrapOrThrow(chamfer(val, args[0], args[1])));
|
|
2560
|
+
if (args.length === 1) return wrap3D(unwrapOrThrow(chamfer(asValidSolid(val), args[0])));
|
|
2561
|
+
return wrap3D(unwrapOrThrow(chamfer(asValidSolid(val), args[0], args[1])));
|
|
2547
2562
|
},
|
|
2548
|
-
shell: (faces, thickness, opts) => wrap3D(unwrapOrThrow(shell(val, faces, thickness, opts))),
|
|
2549
|
-
offset: (distance, opts) => wrap3D(unwrapOrThrow(offset(val, distance, opts))),
|
|
2550
|
-
draft: (faces, opts) => wrap3D(unwrapOrThrow(draft(val, faces, opts))),
|
|
2563
|
+
shell: (faces, thickness, opts) => wrap3D(unwrapOrThrow(shell(asValidSolid(val), faces, thickness, opts))),
|
|
2564
|
+
offset: (distance, opts) => wrap3D(unwrapOrThrow(offset(asValidSolid(val), distance, opts))),
|
|
2565
|
+
draft: (faces, opts) => wrap3D(unwrapOrThrow(draft(asValidSolid(val), faces, opts))),
|
|
2551
2566
|
drill: (opts) => wrap3D(unwrapOrThrow(drill(val, opts))),
|
|
2552
2567
|
pocket: (opts) => wrap3D(unwrapOrThrow(pocket(val, opts))),
|
|
2553
2568
|
boss: (opts) => wrap3D(unwrapOrThrow(boss(val, opts))),
|
|
@@ -2557,10 +2572,10 @@ function createWrapped3D(val) {
|
|
|
2557
2572
|
area: () => unwrapOrThrow(require_measureFns.measureArea(val)),
|
|
2558
2573
|
volumeProps: () => unwrapOrThrow(require_measureFns.measureVolumeProps(val)),
|
|
2559
2574
|
surfaceProps: () => unwrapOrThrow(require_measureFns.measureSurfaceProps(val)),
|
|
2560
|
-
edges: () =>
|
|
2561
|
-
faces: () =>
|
|
2562
|
-
wires: () =>
|
|
2563
|
-
vertices: () =>
|
|
2575
|
+
edges: () => require_topologyQueryFns.getEdges(val),
|
|
2576
|
+
faces: () => require_topologyQueryFns.getFaces(val),
|
|
2577
|
+
wires: () => require_topologyQueryFns.getWires(val),
|
|
2578
|
+
vertices: () => require_topologyQueryFns.getVertices(val),
|
|
2564
2579
|
linearPattern: (dir, count, spacing) => wrap3D(unwrapOrThrow(require_historyFns.linearPattern(val, dir, count, spacing))),
|
|
2565
2580
|
circularPattern: (axis, count, angle) => wrap3D(unwrapOrThrow(require_historyFns.circularPattern(val, axis, count, angle)))
|
|
2566
2581
|
};
|
|
@@ -2576,7 +2591,7 @@ function createWrappedCurve(val) {
|
|
|
2576
2591
|
isClosed: () => require_curveFns.curveIsClosed(val),
|
|
2577
2592
|
sweep(spine, opts) {
|
|
2578
2593
|
if (!require_shapeTypes.isWire(val)) throw new Error("sweep requires a Wire");
|
|
2579
|
-
const result = unwrapOrThrow(require_extrudeFns.sweep(val, resolve(spine), opts));
|
|
2594
|
+
const result = unwrapOrThrow(require_extrudeFns.sweep(asClosedWire(val), resolve(spine), opts));
|
|
2580
2595
|
return wrap3D(Array.isArray(result) ? result[0] : result);
|
|
2581
2596
|
}
|
|
2582
2597
|
};
|
|
@@ -2590,8 +2605,8 @@ function createWrappedFace(val) {
|
|
|
2590
2605
|
surfaceType: () => unwrapOrThrow(require_faceFns.getSurfaceType(val)),
|
|
2591
2606
|
outerWire: () => require_faceFns.outerWire(val),
|
|
2592
2607
|
innerWires: () => require_faceFns.innerWires(val),
|
|
2593
|
-
extrude: (height) => wrap3D(unwrapOrThrow(extrude(val, height))),
|
|
2594
|
-
revolve: (opts) => wrap3D(unwrapOrThrow(revolve(val, opts)))
|
|
2608
|
+
extrude: (height) => wrap3D(unwrapOrThrow(extrude(asOrientedPlanarFace(val), height))),
|
|
2609
|
+
revolve: (opts) => wrap3D(unwrapOrThrow(revolve(asOrientedPlanarFace(val), opts)))
|
|
2595
2610
|
};
|
|
2596
2611
|
}
|
|
2597
2612
|
function wrapAny(val) {
|
|
@@ -2613,9 +2628,644 @@ function shape(s) {
|
|
|
2613
2628
|
}
|
|
2614
2629
|
throw new Error("shape() requires a Sketch or branded shape type");
|
|
2615
2630
|
}
|
|
2631
|
+
var DEFAULT_CLEARANCE = .25;
|
|
2632
|
+
var inv = (alpha) => Math.tan(alpha) - alpha;
|
|
2633
|
+
function involutePoint(rb, alpha, theta0, sign) {
|
|
2634
|
+
const r = rb / Math.cos(alpha);
|
|
2635
|
+
const theta = theta0 + sign * (Math.tan(alpha) - alpha);
|
|
2636
|
+
return [
|
|
2637
|
+
r * Math.cos(theta),
|
|
2638
|
+
r * Math.sin(theta),
|
|
2639
|
+
0
|
|
2640
|
+
];
|
|
2641
|
+
}
|
|
2642
|
+
function cosineSpaceFlankSamples(rb, alphaMax, theta0, count, sign) {
|
|
2643
|
+
const pts = [];
|
|
2644
|
+
for (let i = 0; i <= count; i++) {
|
|
2645
|
+
const t = .5 - .5 * Math.cos(i / count * Math.PI);
|
|
2646
|
+
pts.push(involutePoint(rb, t * alphaMax, theta0, sign));
|
|
2647
|
+
}
|
|
2648
|
+
return pts;
|
|
2649
|
+
}
|
|
2650
|
+
function adaptiveSampleCount(moduleSize) {
|
|
2651
|
+
return Math.max(16, Math.round(8 * Math.sqrt(moduleSize)));
|
|
2652
|
+
}
|
|
2653
|
+
function gearGeometry(z, moduleSize, alpha, shift, clearance, backlashHalf, isInternal) {
|
|
2654
|
+
const rPitch = z * moduleSize / 2;
|
|
2655
|
+
const rb = rPitch * Math.cos(alpha);
|
|
2656
|
+
const addendum = moduleSize * (1 + shift);
|
|
2657
|
+
const dedendum = moduleSize * (1 + clearance - shift);
|
|
2658
|
+
const rTip = isInternal ? rPitch - moduleSize * (1 - shift) : rPitch + addendum;
|
|
2659
|
+
const rRoot = isInternal ? rPitch + moduleSize * (1 + clearance + shift) : rPitch - dedendum;
|
|
2660
|
+
const blAng = backlashHalf / rPitch;
|
|
2661
|
+
const halfToothAngle = (Math.PI / 2 + 2 * shift * Math.tan(alpha)) / z + (isInternal ? blAng : -blAng);
|
|
2662
|
+
const rOuter = isInternal ? rRoot : rTip;
|
|
2663
|
+
return {
|
|
2664
|
+
rPitch,
|
|
2665
|
+
rb,
|
|
2666
|
+
rTip,
|
|
2667
|
+
rRoot,
|
|
2668
|
+
alphaPitch: alpha,
|
|
2669
|
+
halfToothAngle,
|
|
2670
|
+
alphaTip: rOuter <= rb ? 0 : Math.acos(Math.min(1, rb / rOuter)),
|
|
2671
|
+
toothPitch: 2 * Math.PI / z,
|
|
2672
|
+
isInternal
|
|
2673
|
+
};
|
|
2674
|
+
}
|
|
2675
|
+
/**
|
|
2676
|
+
* Solve `inv(αw) = inv(α) + 2·(summedShift)·tan α / totalTeeth` by bisection.
|
|
2677
|
+
*
|
|
2678
|
+
* For external-external mesh: summedShift = x1 + x2, totalTeeth = z1 + z2.
|
|
2679
|
+
* For external-internal mesh: summedShift = xInternal − xExternal, totalTeeth = zInternal − zExternal.
|
|
2680
|
+
*
|
|
2681
|
+
* Returns Err for shifts that push αw outside (epsilon, π/2).
|
|
2682
|
+
*/
|
|
2683
|
+
function solveWorkingPressureAngle(alpha, summedShift, totalTeeth) {
|
|
2684
|
+
if (summedShift === 0) return require_errors.ok(alpha);
|
|
2685
|
+
const target = inv(alpha) + 2 * summedShift * Math.tan(alpha) / totalTeeth;
|
|
2686
|
+
const epsilon = 1e-4;
|
|
2687
|
+
let lo, hi;
|
|
2688
|
+
if (target > inv(alpha)) {
|
|
2689
|
+
lo = alpha;
|
|
2690
|
+
hi = Math.PI / 2 - 1e-6;
|
|
2691
|
+
} else {
|
|
2692
|
+
lo = epsilon;
|
|
2693
|
+
hi = alpha;
|
|
2694
|
+
}
|
|
2695
|
+
if (target > inv(hi) || target < inv(lo)) return require_errors.err(require_errors.validationError("GEAR_PA_OUT_OF_RANGE", `working pressure angle out of range — target inv(αw)=${target.toFixed(4)} not in [${inv(lo).toFixed(4)}, ${inv(hi).toFixed(4)}]`, void 0, {
|
|
2696
|
+
target,
|
|
2697
|
+
invLo: inv(lo),
|
|
2698
|
+
invHi: inv(hi)
|
|
2699
|
+
}));
|
|
2700
|
+
for (let i = 0; i < 50; i++) {
|
|
2701
|
+
const mid = .5 * (lo + hi);
|
|
2702
|
+
if (inv(mid) < target) lo = mid;
|
|
2703
|
+
else hi = mid;
|
|
2704
|
+
}
|
|
2705
|
+
return require_errors.ok(.5 * (lo + hi));
|
|
2706
|
+
}
|
|
2707
|
+
/** Convenience: working PA for an external-external mesh (sun-planet). */
|
|
2708
|
+
function solveSunPlanetWorkingPressureAngle(alpha, xSun, xPlanet, zSun, zPlanet) {
|
|
2709
|
+
return solveWorkingPressureAngle(alpha, xSun + xPlanet, zSun + zPlanet);
|
|
2710
|
+
}
|
|
2711
|
+
/** Convenience: working PA for an external-internal mesh (planet-ring). */
|
|
2712
|
+
function solvePlanetRingWorkingPressureAngle(alpha, xPlanet, xRing, zPlanet, zRing) {
|
|
2713
|
+
return solveWorkingPressureAngle(alpha, xRing - xPlanet, zRing - zPlanet);
|
|
2714
|
+
}
|
|
2715
|
+
function workingCenterDistance(zs, zp, moduleSize, alpha, alphaW) {
|
|
2716
|
+
return (zs + zp) * moduleSize * Math.cos(alpha) / (2 * Math.cos(alphaW));
|
|
2717
|
+
}
|
|
2718
|
+
function validatePlanetary(zs, zp, n, planetShift) {
|
|
2719
|
+
if (!Number.isInteger(zs) || !Number.isInteger(zp) || !Number.isInteger(n)) return require_errors.err(require_errors.validationError("GEAR_NON_INTEGER_TEETH", "tooth counts and planet count must be integers"));
|
|
2720
|
+
if (zs < 4 || zp < 4 || n < 2) return require_errors.err(require_errors.validationError("GEAR_TEETH_TOO_FEW", "zs ≥ 4, zp ≥ 4, N ≥ 2 required"));
|
|
2721
|
+
if ((2 * zs + 2 * zp) % n !== 0) return require_errors.err(require_errors.validationError("GEAR_ASSEMBLY", `(2·zs + 2·zp) must be divisible by N — got ${2 * zs + 2 * zp} mod ${n} = ${(2 * zs + 2 * zp) % n}`));
|
|
2722
|
+
const planetTipDiameter = zp + 2 + 2 * planetShift;
|
|
2723
|
+
const minClearance = (zs + zp) * Math.sin(Math.PI / n);
|
|
2724
|
+
if (minClearance <= planetTipDiameter) return require_errors.err(require_errors.validationError("GEAR_PLANET_COLLISION", `planet tips would collide: (zs+zp)·sin(π/N) = ${minClearance.toFixed(3)} ≤ planet tip = ${planetTipDiameter.toFixed(3)}`));
|
|
2725
|
+
return require_errors.ok(void 0);
|
|
2726
|
+
}
|
|
2727
|
+
function externalExternalContactRatio(ra1, rb1, ra2, rb2, centerDistance, moduleSize, alpha, alphaW) {
|
|
2728
|
+
return (Math.sqrt(Math.max(0, ra1 * ra1 - rb1 * rb1)) + Math.sqrt(Math.max(0, ra2 * ra2 - rb2 * rb2)) - centerDistance * Math.sin(alphaW)) / (Math.PI * moduleSize * Math.cos(alpha));
|
|
2729
|
+
}
|
|
2730
|
+
function externalInternalContactRatio(ra_p, rb_p, ra_r, rb_r, centerDistance, moduleSize, alpha, alphaW) {
|
|
2731
|
+
return (Math.sqrt(Math.max(0, ra_p * ra_p - rb_p * rb_p)) - Math.sqrt(Math.max(0, ra_r * ra_r - rb_r * rb_r)) + centerDistance * Math.sin(alphaW)) / (Math.PI * moduleSize * Math.cos(alpha));
|
|
2732
|
+
}
|
|
2733
|
+
function undercutMinimumShift(z, alpha) {
|
|
2734
|
+
return 1 - z * Math.sin(alpha) * Math.sin(alpha) / 2;
|
|
2735
|
+
}
|
|
2736
|
+
function undercutDeficit(z, alpha, shift) {
|
|
2737
|
+
return Math.max(0, undercutMinimumShift(z, alpha) - shift);
|
|
2738
|
+
}
|
|
2739
|
+
function lewisYFactor(z) {
|
|
2740
|
+
if (z < 8) return .2;
|
|
2741
|
+
return .485 - 2.88 / z;
|
|
2742
|
+
}
|
|
2743
|
+
function lewisRootStress(appliedTorqueNm, moduleSize, faceWidth, z) {
|
|
2744
|
+
const torqueNmm = appliedTorqueNm * 1e3;
|
|
2745
|
+
const Y = lewisYFactor(z);
|
|
2746
|
+
if (Y <= 0 || faceWidth <= 0 || moduleSize <= 0) return Infinity;
|
|
2747
|
+
return 2 * torqueNmm / (z * moduleSize * moduleSize * faceWidth * Y);
|
|
2748
|
+
}
|
|
2749
|
+
/**
|
|
2750
|
+
* Dolan-Broghamer fit is for *external* spur teeth. Set `isInternal=true` on
|
|
2751
|
+
* ring gears to apply Niemann's 0.85× reduction — the concave root fillet has
|
|
2752
|
+
* a gentler geometric riser (matches AGMA 908-B89 trend).
|
|
2753
|
+
*/
|
|
2754
|
+
function filletStressConcentrationFactor(z, alpha, isInternal = false) {
|
|
2755
|
+
const kf20 = 1.4 + 6.5 / z;
|
|
2756
|
+
const alphaDeg = alpha * 180 / Math.PI;
|
|
2757
|
+
const kf = kf20 * Math.pow(20 / alphaDeg, .15);
|
|
2758
|
+
return isInternal ? kf * .85 : kf;
|
|
2759
|
+
}
|
|
2760
|
+
function lewisRootStressCorrected(appliedTorqueNm, moduleSize, faceWidth, z, alpha, isInternal = false) {
|
|
2761
|
+
return lewisRootStress(appliedTorqueNm, moduleSize, faceWidth, z) * filletStressConcentrationFactor(z, alpha, isInternal);
|
|
2762
|
+
}
|
|
2763
|
+
function backlashHalf(totalBacklash) {
|
|
2764
|
+
return totalBacklash / 2;
|
|
2765
|
+
}
|
|
2766
|
+
function ringTeeth(zs, zp) {
|
|
2767
|
+
return zs + 2 * zp;
|
|
2768
|
+
}
|
|
2769
|
+
function evenToothPhaseOffset(z) {
|
|
2770
|
+
return z % 2 === 0 ? Math.PI / z : 0;
|
|
2771
|
+
}
|
|
2772
|
+
function planetSelfRotationAngle(orbitalAngle, zs, zp) {
|
|
2773
|
+
return orbitalAngle * (1 + zs / zp) + evenToothPhaseOffset(zp);
|
|
2774
|
+
}
|
|
2775
|
+
/**
|
|
2776
|
+
* Compute the rigid placement of each planet without building any solid.
|
|
2777
|
+
*
|
|
2778
|
+
* Pairs with one materialized planet from `makeExternalGear` to support
|
|
2779
|
+
* GPU-instanced rendering: mesh once, draw N times under these transforms.
|
|
2780
|
+
* Defaults match {@link PlanetaryGearParams}.
|
|
2781
|
+
*/
|
|
2782
|
+
function planetPlacements(params = {}) {
|
|
2783
|
+
const moduleSize = params.moduleSize ?? 3;
|
|
2784
|
+
const sunTeeth = params.sunTeeth ?? 15;
|
|
2785
|
+
const planetTeeth = params.planetTeeth ?? 12;
|
|
2786
|
+
const numPlanets = params.numPlanets ?? 3;
|
|
2787
|
+
const alpha = (params.pressureAngleDeg ?? 20) * Math.PI / 180;
|
|
2788
|
+
const sunShift = params.sunShift ?? 0;
|
|
2789
|
+
const planetShift = params.planetShift ?? 0;
|
|
2790
|
+
const validation = validatePlanetary(sunTeeth, planetTeeth, numPlanets, planetShift);
|
|
2791
|
+
if (require_errors.isErr(validation)) return validation;
|
|
2792
|
+
const sp = solveSunPlanetWorkingPressureAngle(alpha, sunShift, planetShift, sunTeeth, planetTeeth);
|
|
2793
|
+
if (require_errors.isErr(sp)) return sp;
|
|
2794
|
+
const centerDistance = workingCenterDistance(sunTeeth, planetTeeth, moduleSize, alpha, sp.value);
|
|
2795
|
+
const placements = [];
|
|
2796
|
+
for (let i = 0; i < numPlanets; i++) {
|
|
2797
|
+
const orbital = i * 2 * Math.PI / numPlanets;
|
|
2798
|
+
const selfRot = planetSelfRotationAngle(orbital, sunTeeth, planetTeeth);
|
|
2799
|
+
placements.push({
|
|
2800
|
+
rotationDeg: selfRot * 180 / Math.PI,
|
|
2801
|
+
position: [
|
|
2802
|
+
centerDistance * Math.cos(orbital),
|
|
2803
|
+
centerDistance * Math.sin(orbital),
|
|
2804
|
+
0
|
|
2805
|
+
]
|
|
2806
|
+
});
|
|
2807
|
+
}
|
|
2808
|
+
return require_errors.ok(placements);
|
|
2809
|
+
}
|
|
2810
|
+
//#endregion
|
|
2811
|
+
//#region src/gear/gearProfile.ts
|
|
2812
|
+
function buildToothPeriodEdges(tm, toothIndex, totalTeeth, samples, scope) {
|
|
2813
|
+
const center = toothIndex * tm.toothPitch;
|
|
2814
|
+
const nextCenter = (toothIndex + 1) % totalTeeth * tm.toothPitch;
|
|
2815
|
+
const invPitch = inv(tm.alphaPitch);
|
|
2816
|
+
const thetaLeft = center - tm.halfToothAngle - invPitch;
|
|
2817
|
+
const thetaRight = center + tm.halfToothAngle + invPitch;
|
|
2818
|
+
const leftFlank = cosineSpaceFlankSamples(tm.rb, tm.alphaTip, thetaLeft, samples, 1);
|
|
2819
|
+
const rightFlank = cosineSpaceFlankSamples(tm.rb, tm.alphaTip, thetaRight, samples, -1).reverse();
|
|
2820
|
+
const leftBase = require_arrayAccess.firstOrThrow(leftFlank);
|
|
2821
|
+
const leftTip = require_arrayAccess.lastOrThrow(leftFlank);
|
|
2822
|
+
const rightTip = require_arrayAccess.firstOrThrow(rightFlank);
|
|
2823
|
+
const rightBase = require_arrayAccess.lastOrThrow(rightFlank);
|
|
2824
|
+
const edges = [];
|
|
2825
|
+
const push = (e) => {
|
|
2826
|
+
scope.register(e);
|
|
2827
|
+
edges.push(e);
|
|
2828
|
+
};
|
|
2829
|
+
const needsRadialBridge = tm.isInternal ? tm.rb < tm.rRoot : tm.rb > tm.rRoot;
|
|
2830
|
+
if (needsRadialBridge) push(require_surfaceBuilders.makeLine([
|
|
2831
|
+
tm.rRoot * Math.cos(thetaLeft),
|
|
2832
|
+
tm.rRoot * Math.sin(thetaLeft),
|
|
2833
|
+
0
|
|
2834
|
+
], leftBase));
|
|
2835
|
+
const interpTol = tm.rPitch * 1e-5;
|
|
2836
|
+
const leftEdge = require_surfaceBuilders.makeBSplineInterpolation(leftFlank, { tolerance: interpTol });
|
|
2837
|
+
if (require_errors.isErr(leftEdge)) return leftEdge;
|
|
2838
|
+
push(leftEdge.value);
|
|
2839
|
+
push(require_surfaceBuilders.makeThreePointArc(leftTip, [
|
|
2840
|
+
tm.rTip * Math.cos(center),
|
|
2841
|
+
tm.rTip * Math.sin(center),
|
|
2842
|
+
0
|
|
2843
|
+
], rightTip));
|
|
2844
|
+
const rightEdge = require_surfaceBuilders.makeBSplineInterpolation(rightFlank, { tolerance: interpTol });
|
|
2845
|
+
if (require_errors.isErr(rightEdge)) return rightEdge;
|
|
2846
|
+
push(rightEdge.value);
|
|
2847
|
+
if (needsRadialBridge) push(require_surfaceBuilders.makeLine(rightBase, [
|
|
2848
|
+
tm.rRoot * Math.cos(thetaRight),
|
|
2849
|
+
tm.rRoot * Math.sin(thetaRight),
|
|
2850
|
+
0
|
|
2851
|
+
]));
|
|
2852
|
+
const rootEndAngle = nextCenter - tm.halfToothAngle - invPitch;
|
|
2853
|
+
let midAngle = .5 * (thetaRight + rootEndAngle);
|
|
2854
|
+
if (rootEndAngle < thetaRight) midAngle += Math.PI;
|
|
2855
|
+
push(require_surfaceBuilders.makeThreePointArc(needsRadialBridge ? [
|
|
2856
|
+
tm.rRoot * Math.cos(thetaRight),
|
|
2857
|
+
tm.rRoot * Math.sin(thetaRight),
|
|
2858
|
+
0
|
|
2859
|
+
] : rightBase, [
|
|
2860
|
+
tm.rRoot * Math.cos(midAngle),
|
|
2861
|
+
tm.rRoot * Math.sin(midAngle),
|
|
2862
|
+
0
|
|
2863
|
+
], needsRadialBridge ? [
|
|
2864
|
+
tm.rRoot * Math.cos(rootEndAngle),
|
|
2865
|
+
tm.rRoot * Math.sin(rootEndAngle),
|
|
2866
|
+
0
|
|
2867
|
+
] : [
|
|
2868
|
+
tm.rb * Math.cos(rootEndAngle),
|
|
2869
|
+
tm.rb * Math.sin(rootEndAngle),
|
|
2870
|
+
0
|
|
2871
|
+
]));
|
|
2872
|
+
return require_errors.ok(edges);
|
|
2873
|
+
}
|
|
2874
|
+
function makeExternalGearProfileWire(params) {
|
|
2875
|
+
return makeProfileWire(params, false);
|
|
2876
|
+
}
|
|
2877
|
+
function makeInternalGearProfileWire(params) {
|
|
2878
|
+
return makeProfileWire(params, true);
|
|
2879
|
+
}
|
|
2880
|
+
function makeProfileWire(params, isInternal) {
|
|
2881
|
+
try {
|
|
2882
|
+
var _usingCtx$2 = require_shapeTypes._usingCtx();
|
|
2883
|
+
const { teeth, moduleSize, pressureAngle, shift, clearance, flankThinning, samples = adaptiveSampleCount(moduleSize) } = params;
|
|
2884
|
+
if (teeth < 4) return require_errors.err(require_errors.validationError("GEAR_TEETH_TOO_FEW", `gear needs ≥ 4 teeth, got ${teeth}`));
|
|
2885
|
+
if (moduleSize <= 0) return require_errors.err(require_errors.validationError("GEAR_MODULE_NONPOSITIVE", `module must be > 0, got ${moduleSize}`));
|
|
2886
|
+
const tm = gearGeometry(teeth, moduleSize, pressureAngle, shift, clearance, flankThinning, isInternal);
|
|
2887
|
+
const scope = _usingCtx$2.u(new require_shapeTypes.DisposalScope());
|
|
2888
|
+
const allEdges = [];
|
|
2889
|
+
for (let i = 0; i < teeth; i++) {
|
|
2890
|
+
const periodEdges = buildToothPeriodEdges(tm, i, teeth, samples, scope);
|
|
2891
|
+
if (require_errors.isErr(periodEdges)) return periodEdges;
|
|
2892
|
+
allEdges.push(...periodEdges.value);
|
|
2893
|
+
}
|
|
2894
|
+
const wireResult = require_surfaceBuilders.assembleWire(allEdges);
|
|
2895
|
+
if (require_errors.isErr(wireResult)) return wireResult;
|
|
2896
|
+
return require_errors.ok(wireResult.value);
|
|
2897
|
+
} catch (_) {
|
|
2898
|
+
_usingCtx$2.e = _;
|
|
2899
|
+
} finally {
|
|
2900
|
+
_usingCtx$2.d();
|
|
2901
|
+
}
|
|
2902
|
+
}
|
|
2903
|
+
//#endregion
|
|
2904
|
+
//#region src/gear/gearFns.ts
|
|
2905
|
+
function makeExternalGear(params) {
|
|
2906
|
+
const { teeth, moduleSize, thickness, pressureAngleDeg = 20, shift = 0, clearance = DEFAULT_CLEARANCE, flankThinning = 0, bore = 0, samples } = params;
|
|
2907
|
+
if (thickness <= 0) return require_errors.err(require_errors.validationError("GEAR_THICKNESS_NONPOSITIVE", "thickness must be > 0"));
|
|
2908
|
+
if (samples !== void 0 && (!Number.isInteger(samples) || samples < 1)) return require_errors.err(require_errors.validationError("GEAR_SAMPLES_INVALID", `samples must be a positive integer; got ${String(samples)}`));
|
|
2909
|
+
const alpha = pressureAngleDeg * Math.PI / 180;
|
|
2910
|
+
const geom = gearGeometry(teeth, moduleSize, alpha, shift, clearance, flankThinning, false);
|
|
2911
|
+
if (bore > 0 && bore >= 2 * geom.rRoot) return require_errors.err(require_errors.validationError("GEAR_BORE_TOO_LARGE", `bore diameter ${bore.toFixed(2)} ≥ root diameter ${(2 * geom.rRoot).toFixed(2)} — would erase the gear teeth`));
|
|
2912
|
+
const wireResult = makeExternalGearProfileWire({
|
|
2913
|
+
teeth,
|
|
2914
|
+
moduleSize,
|
|
2915
|
+
pressureAngle: alpha,
|
|
2916
|
+
shift,
|
|
2917
|
+
clearance,
|
|
2918
|
+
flankThinning,
|
|
2919
|
+
...samples !== void 0 ? { samples } : {}
|
|
2920
|
+
});
|
|
2921
|
+
if (require_errors.isErr(wireResult)) return wireResult;
|
|
2922
|
+
const diagnostics = externalGearDiagnostics(teeth, alpha, shift);
|
|
2923
|
+
return finalizeExternalSolid(wireResult.value, thickness, bore, geom, diagnostics);
|
|
2924
|
+
}
|
|
2925
|
+
function makeInternalGear(params) {
|
|
2926
|
+
const { teeth, moduleSize, thickness, pressureAngleDeg = 20, shift = 0, clearance = DEFAULT_CLEARANCE, flankThinning = 0, ringWallThickness = 2 * params.moduleSize, samples } = params;
|
|
2927
|
+
if (thickness <= 0) return require_errors.err(require_errors.validationError("GEAR_THICKNESS_NONPOSITIVE", "thickness must be > 0"));
|
|
2928
|
+
if (ringWallThickness <= 0) return require_errors.err(require_errors.validationError("GEAR_WALL_NONPOSITIVE", "ringWallThickness must be > 0"));
|
|
2929
|
+
if (samples !== void 0 && (!Number.isInteger(samples) || samples < 1)) return require_errors.err(require_errors.validationError("GEAR_SAMPLES_INVALID", `samples must be a positive integer; got ${String(samples)}`));
|
|
2930
|
+
const alpha = pressureAngleDeg * Math.PI / 180;
|
|
2931
|
+
const innerWireResult = makeInternalGearProfileWire({
|
|
2932
|
+
teeth,
|
|
2933
|
+
moduleSize,
|
|
2934
|
+
pressureAngle: alpha,
|
|
2935
|
+
shift,
|
|
2936
|
+
clearance,
|
|
2937
|
+
flankThinning,
|
|
2938
|
+
...samples !== void 0 ? { samples } : {}
|
|
2939
|
+
});
|
|
2940
|
+
if (require_errors.isErr(innerWireResult)) return innerWireResult;
|
|
2941
|
+
const geom = gearGeometry(teeth, moduleSize, alpha, shift, clearance, flankThinning, true);
|
|
2942
|
+
const outerWireResult = makeOuterCircleWire(geom.rPitch + ringWallThickness);
|
|
2943
|
+
if (require_errors.isErr(outerWireResult)) return outerWireResult;
|
|
2944
|
+
return finalizeInternalSolid(outerWireResult.value, innerWireResult.value, thickness, geom, []);
|
|
2945
|
+
}
|
|
2946
|
+
/** Diagnostics for an external (rack-cut) gear in isolation. Not valid for internal gears. */
|
|
2947
|
+
function externalGearDiagnostics(teeth, alpha, shift) {
|
|
2948
|
+
const deficit = undercutDeficit(teeth, alpha, shift);
|
|
2949
|
+
if (deficit <= 0) return [];
|
|
2950
|
+
return [{
|
|
2951
|
+
code: "UNDERCUT_RISK",
|
|
2952
|
+
severity: "warning",
|
|
2953
|
+
message: `gear is undercut: increase shift by ${deficit.toFixed(3)} to avoid (z=${teeth})`,
|
|
2954
|
+
context: {
|
|
2955
|
+
deficit,
|
|
2956
|
+
teeth
|
|
2957
|
+
}
|
|
2958
|
+
}];
|
|
2959
|
+
}
|
|
2960
|
+
function makePlanetaryGear(params) {
|
|
2961
|
+
const resolved = resolvePlanetaryParams(params);
|
|
2962
|
+
if (require_errors.isErr(resolved)) return resolved;
|
|
2963
|
+
const cfg = resolved.value;
|
|
2964
|
+
const stages = buildPlanetaryStages(cfg);
|
|
2965
|
+
if (require_errors.isErr(stages)) return stages;
|
|
2966
|
+
const { sun, planet, ring } = stages.value;
|
|
2967
|
+
const metrics = computeMeshMetrics(cfg, sun, planet, ring);
|
|
2968
|
+
const planets = placePlanets(planet.solid, cfg);
|
|
2969
|
+
planet.solid.delete();
|
|
2970
|
+
const ringPhased = applyRingPhase(ring.solid, cfg.zr);
|
|
2971
|
+
const diagnostics = collectDiagnostics(cfg, metrics);
|
|
2972
|
+
return require_errors.ok({
|
|
2973
|
+
sun: sun.solid,
|
|
2974
|
+
planets,
|
|
2975
|
+
ring: ringPhased,
|
|
2976
|
+
ringTeeth: cfg.zr,
|
|
2977
|
+
workingPressureAngle: cfg.alphaW_sp,
|
|
2978
|
+
centerDistance: cfg.centerDistance,
|
|
2979
|
+
contactRatio: {
|
|
2980
|
+
sunPlanet: metrics.crSunPlanet,
|
|
2981
|
+
planetRing: metrics.crPlanetRing
|
|
2982
|
+
},
|
|
2983
|
+
undercutDeficit: {
|
|
2984
|
+
sun: metrics.undercutSun,
|
|
2985
|
+
planet: metrics.undercutPlanet
|
|
2986
|
+
},
|
|
2987
|
+
...metrics.lewisStress ? { lewisStress: metrics.lewisStress } : {},
|
|
2988
|
+
...metrics.stressConcentrationFactor ? { stressConcentrationFactor: metrics.stressConcentrationFactor } : {},
|
|
2989
|
+
diagnostics
|
|
2990
|
+
});
|
|
2991
|
+
}
|
|
2992
|
+
function buildPlanetaryStages(cfg) {
|
|
2993
|
+
const samplesField = cfg.samples !== void 0 ? { samples: cfg.samples } : {};
|
|
2994
|
+
const common = {
|
|
2995
|
+
moduleSize: cfg.moduleSize,
|
|
2996
|
+
thickness: cfg.thickness,
|
|
2997
|
+
pressureAngleDeg: cfg.pressureAngleDeg,
|
|
2998
|
+
clearance: cfg.clearance,
|
|
2999
|
+
flankThinning: cfg.bHalf,
|
|
3000
|
+
...samplesField
|
|
3001
|
+
};
|
|
3002
|
+
const sun = makeExternalGear({
|
|
3003
|
+
...common,
|
|
3004
|
+
teeth: cfg.sunTeeth,
|
|
3005
|
+
shift: cfg.sunShift,
|
|
3006
|
+
bore: cfg.sunBore
|
|
3007
|
+
});
|
|
3008
|
+
if (require_errors.isErr(sun)) return sun;
|
|
3009
|
+
const planet = makeExternalGear({
|
|
3010
|
+
...common,
|
|
3011
|
+
teeth: cfg.planetTeeth,
|
|
3012
|
+
shift: cfg.planetShift,
|
|
3013
|
+
bore: cfg.planetBore
|
|
3014
|
+
});
|
|
3015
|
+
if (require_errors.isErr(planet)) {
|
|
3016
|
+
sun.value.solid.delete();
|
|
3017
|
+
return planet;
|
|
3018
|
+
}
|
|
3019
|
+
const ring = makeInternalGear({
|
|
3020
|
+
...common,
|
|
3021
|
+
teeth: cfg.zr,
|
|
3022
|
+
shift: cfg.ringShift,
|
|
3023
|
+
ringWallThickness: cfg.ringWallThickness
|
|
3024
|
+
});
|
|
3025
|
+
if (require_errors.isErr(ring)) {
|
|
3026
|
+
sun.value.solid.delete();
|
|
3027
|
+
planet.value.solid.delete();
|
|
3028
|
+
return ring;
|
|
3029
|
+
}
|
|
3030
|
+
return require_errors.ok({
|
|
3031
|
+
sun: sun.value,
|
|
3032
|
+
planet: planet.value,
|
|
3033
|
+
ring: ring.value
|
|
3034
|
+
});
|
|
3035
|
+
}
|
|
3036
|
+
function resolvePlanetaryParams(params) {
|
|
3037
|
+
const moduleSize = params.moduleSize ?? 3;
|
|
3038
|
+
const sunTeeth = params.sunTeeth ?? 15;
|
|
3039
|
+
const planetTeeth = params.planetTeeth ?? 12;
|
|
3040
|
+
const numPlanets = params.numPlanets ?? 3;
|
|
3041
|
+
const pressureAngleDeg = params.pressureAngleDeg ?? 20;
|
|
3042
|
+
const alpha = pressureAngleDeg * Math.PI / 180;
|
|
3043
|
+
const sunShift = params.sunShift ?? 0;
|
|
3044
|
+
const planetShift = params.planetShift ?? 0;
|
|
3045
|
+
const ringShift = params.ringShift ?? 0;
|
|
3046
|
+
if (params.thickness <= 0) return require_errors.err(require_errors.validationError("GEAR_THICKNESS_NONPOSITIVE", "thickness must be > 0"));
|
|
3047
|
+
const validation = validatePlanetary(sunTeeth, planetTeeth, numPlanets, planetShift);
|
|
3048
|
+
if (require_errors.isErr(validation)) return validation;
|
|
3049
|
+
const zr = ringTeeth(sunTeeth, planetTeeth);
|
|
3050
|
+
const sp = solveSunPlanetWorkingPressureAngle(alpha, sunShift, planetShift, sunTeeth, planetTeeth);
|
|
3051
|
+
if (require_errors.isErr(sp)) return sp;
|
|
3052
|
+
const pr = solvePlanetRingWorkingPressureAngle(alpha, planetShift, ringShift, planetTeeth, zr);
|
|
3053
|
+
if (require_errors.isErr(pr)) return pr;
|
|
3054
|
+
const centerDistance = workingCenterDistance(sunTeeth, planetTeeth, moduleSize, alpha, sp.value);
|
|
3055
|
+
return require_errors.ok({
|
|
3056
|
+
moduleSize,
|
|
3057
|
+
sunTeeth,
|
|
3058
|
+
planetTeeth,
|
|
3059
|
+
numPlanets,
|
|
3060
|
+
pressureAngleDeg,
|
|
3061
|
+
alpha,
|
|
3062
|
+
alphaW_sp: sp.value,
|
|
3063
|
+
alphaW_pr: pr.value,
|
|
3064
|
+
clearance: params.clearance ?? .25,
|
|
3065
|
+
bHalf: backlashHalf(params.backlash ?? 0),
|
|
3066
|
+
sunShift,
|
|
3067
|
+
planetShift,
|
|
3068
|
+
ringShift,
|
|
3069
|
+
ringWallThickness: params.ringWallThickness ?? 2 * moduleSize,
|
|
3070
|
+
thickness: params.thickness,
|
|
3071
|
+
sunBore: params.sunBore ?? 0,
|
|
3072
|
+
planetBore: params.planetBore ?? 0,
|
|
3073
|
+
...params.appliedTorque !== void 0 ? { appliedTorque: params.appliedTorque } : {},
|
|
3074
|
+
...params.samples !== void 0 ? { samples: params.samples } : {},
|
|
3075
|
+
zr,
|
|
3076
|
+
centerDistance
|
|
3077
|
+
});
|
|
3078
|
+
}
|
|
3079
|
+
function makeOuterCircleWire(radius) {
|
|
3080
|
+
try {
|
|
3081
|
+
var _usingCtx$1 = require_shapeTypes._usingCtx();
|
|
3082
|
+
const wireResult = require_surfaceBuilders.assembleWire([_usingCtx$1.u(new require_shapeTypes.DisposalScope()).register(require_surfaceBuilders.makeCircle(radius, [
|
|
3083
|
+
0,
|
|
3084
|
+
0,
|
|
3085
|
+
0
|
|
3086
|
+
], [
|
|
3087
|
+
0,
|
|
3088
|
+
0,
|
|
3089
|
+
1
|
|
3090
|
+
]))]);
|
|
3091
|
+
if (require_errors.isErr(wireResult)) return wireResult;
|
|
3092
|
+
return require_errors.ok(wireResult.value);
|
|
3093
|
+
} catch (_) {
|
|
3094
|
+
_usingCtx$1.e = _;
|
|
3095
|
+
} finally {
|
|
3096
|
+
_usingCtx$1.d();
|
|
3097
|
+
}
|
|
3098
|
+
}
|
|
3099
|
+
function finalizeExternalSolid(wire, thickness, bore, geom, diagnostics) {
|
|
3100
|
+
try {
|
|
3101
|
+
var _usingCtx3 = require_shapeTypes._usingCtx();
|
|
3102
|
+
const faceResult = require_surfaceBuilders.makeFace(wire);
|
|
3103
|
+
if (require_errors.isErr(faceResult)) return faceResult;
|
|
3104
|
+
const solidResult = require_extrudeFns.extrude(faceResult.value, [
|
|
3105
|
+
0,
|
|
3106
|
+
0,
|
|
3107
|
+
thickness
|
|
3108
|
+
]);
|
|
3109
|
+
if (require_errors.isErr(solidResult)) return solidResult;
|
|
3110
|
+
if (bore <= 0) return require_errors.ok(buildGearResult(solidResult.value, geom, diagnostics));
|
|
3111
|
+
const boreScope = _usingCtx3.u(new require_shapeTypes.DisposalScope());
|
|
3112
|
+
const boreFaceResult = makeBoreFace(bore / 2);
|
|
3113
|
+
if (require_errors.isErr(boreFaceResult)) return boreFaceResult;
|
|
3114
|
+
boreScope.register(boreFaceResult.value);
|
|
3115
|
+
const boreRaw = require_extrudeFns.extrude(boreFaceResult.value, [
|
|
3116
|
+
0,
|
|
3117
|
+
0,
|
|
3118
|
+
thickness + 1
|
|
3119
|
+
]);
|
|
3120
|
+
if (require_errors.isErr(boreRaw)) return boreRaw;
|
|
3121
|
+
boreScope.register(boreRaw.value);
|
|
3122
|
+
const boreSolid = boreScope.register(require_shapeFns.translate(boreRaw.value, [
|
|
3123
|
+
0,
|
|
3124
|
+
0,
|
|
3125
|
+
-.5
|
|
3126
|
+
]));
|
|
3127
|
+
const cutResult = require_booleanFns.cut(solidResult.value, boreSolid);
|
|
3128
|
+
if (require_errors.isErr(cutResult)) return cutResult;
|
|
3129
|
+
return require_errors.ok(buildGearResult(cutResult.value, geom, diagnostics));
|
|
3130
|
+
} catch (_) {
|
|
3131
|
+
_usingCtx3.e = _;
|
|
3132
|
+
} finally {
|
|
3133
|
+
_usingCtx3.d();
|
|
3134
|
+
}
|
|
3135
|
+
}
|
|
3136
|
+
function makeBoreFace(radius) {
|
|
3137
|
+
const wireResult = makeOuterCircleWire(radius);
|
|
3138
|
+
if (require_errors.isErr(wireResult)) return wireResult;
|
|
3139
|
+
return require_surfaceBuilders.makeFace(wireResult.value);
|
|
3140
|
+
}
|
|
3141
|
+
function finalizeInternalSolid(outerWire, innerToothedWire, thickness, geom, diagnostics) {
|
|
3142
|
+
const faceResult = require_surfaceBuilders.makeFace(outerWire, [innerToothedWire]);
|
|
3143
|
+
if (require_errors.isErr(faceResult)) return faceResult;
|
|
3144
|
+
const solidResult = require_extrudeFns.extrude(faceResult.value, [
|
|
3145
|
+
0,
|
|
3146
|
+
0,
|
|
3147
|
+
thickness
|
|
3148
|
+
]);
|
|
3149
|
+
if (require_errors.isErr(solidResult)) return solidResult;
|
|
3150
|
+
return require_errors.ok(buildGearResult(solidResult.value, geom, diagnostics));
|
|
3151
|
+
}
|
|
3152
|
+
function buildGearResult(solid, geom, diagnostics = []) {
|
|
3153
|
+
return {
|
|
3154
|
+
solid,
|
|
3155
|
+
diagnostics,
|
|
3156
|
+
pitchDiameter: 2 * geom.rPitch,
|
|
3157
|
+
baseDiameter: 2 * geom.rb,
|
|
3158
|
+
tipDiameter: 2 * geom.rTip,
|
|
3159
|
+
rootDiameter: 2 * geom.rRoot
|
|
3160
|
+
};
|
|
3161
|
+
}
|
|
3162
|
+
function placePlanets(planetProto, cfg) {
|
|
3163
|
+
const planets = [];
|
|
3164
|
+
try {
|
|
3165
|
+
for (let i = 0; i < cfg.numPlanets; i++) {
|
|
3166
|
+
const orbital = i * 2 * Math.PI / cfg.numPlanets;
|
|
3167
|
+
const rotated = require_shapeFns.rotate(planetProto, planetSelfRotationAngle(orbital, cfg.sunTeeth, cfg.planetTeeth) * 180 / Math.PI);
|
|
3168
|
+
try {
|
|
3169
|
+
const offset = [
|
|
3170
|
+
cfg.centerDistance * Math.cos(orbital),
|
|
3171
|
+
cfg.centerDistance * Math.sin(orbital),
|
|
3172
|
+
0
|
|
3173
|
+
];
|
|
3174
|
+
planets.push(require_shapeFns.translate(rotated, offset));
|
|
3175
|
+
} finally {
|
|
3176
|
+
rotated.delete();
|
|
3177
|
+
}
|
|
3178
|
+
}
|
|
3179
|
+
return planets;
|
|
3180
|
+
} catch (e) {
|
|
3181
|
+
for (const p of planets) p.delete();
|
|
3182
|
+
throw e;
|
|
3183
|
+
}
|
|
3184
|
+
}
|
|
3185
|
+
function applyRingPhase(ring, zr) {
|
|
3186
|
+
const phaseRad = evenToothPhaseOffset(zr);
|
|
3187
|
+
if (phaseRad === 0) return ring;
|
|
3188
|
+
const rotated = require_shapeFns.rotate(ring, phaseRad * 180 / Math.PI);
|
|
3189
|
+
ring.delete();
|
|
3190
|
+
return rotated;
|
|
3191
|
+
}
|
|
3192
|
+
function computeMeshMetrics(cfg, sun, planet, ring) {
|
|
3193
|
+
const metrics = {
|
|
3194
|
+
crSunPlanet: externalExternalContactRatio(sun.tipDiameter / 2, sun.baseDiameter / 2, planet.tipDiameter / 2, planet.baseDiameter / 2, cfg.centerDistance, cfg.moduleSize, cfg.alpha, cfg.alphaW_sp),
|
|
3195
|
+
crPlanetRing: externalInternalContactRatio(planet.tipDiameter / 2, planet.baseDiameter / 2, ring.tipDiameter / 2, ring.baseDiameter / 2, cfg.centerDistance, cfg.moduleSize, cfg.alpha, cfg.alphaW_pr),
|
|
3196
|
+
undercutSun: undercutDeficit(cfg.sunTeeth, cfg.alpha, cfg.sunShift),
|
|
3197
|
+
undercutPlanet: undercutDeficit(cfg.planetTeeth, cfg.alpha, cfg.planetShift)
|
|
3198
|
+
};
|
|
3199
|
+
if (cfg.appliedTorque !== void 0) {
|
|
3200
|
+
const tSun = cfg.appliedTorque;
|
|
3201
|
+
metrics.lewisStress = {
|
|
3202
|
+
sun: lewisRootStressCorrected(tSun, cfg.moduleSize, cfg.thickness, cfg.sunTeeth, cfg.alpha),
|
|
3203
|
+
planet: lewisRootStressCorrected(tSun * cfg.planetTeeth / cfg.sunTeeth, cfg.moduleSize, cfg.thickness, cfg.planetTeeth, cfg.alpha),
|
|
3204
|
+
ring: lewisRootStressCorrected(tSun * cfg.zr / cfg.sunTeeth, cfg.moduleSize, cfg.thickness, cfg.zr, cfg.alpha, true)
|
|
3205
|
+
};
|
|
3206
|
+
metrics.stressConcentrationFactor = {
|
|
3207
|
+
sun: filletStressConcentrationFactor(cfg.sunTeeth, cfg.alpha),
|
|
3208
|
+
planet: filletStressConcentrationFactor(cfg.planetTeeth, cfg.alpha),
|
|
3209
|
+
ring: filletStressConcentrationFactor(cfg.zr, cfg.alpha, true)
|
|
3210
|
+
};
|
|
3211
|
+
}
|
|
3212
|
+
return metrics;
|
|
3213
|
+
}
|
|
3214
|
+
function collectDiagnostics(cfg, metrics) {
|
|
3215
|
+
const diagnostics = [];
|
|
3216
|
+
if (metrics.crSunPlanet < 1.2) diagnostics.push({
|
|
3217
|
+
code: "CONTACT_RATIO_LOW_SUN_PLANET",
|
|
3218
|
+
severity: "warning",
|
|
3219
|
+
message: `sun-planet contact ratio ${metrics.crSunPlanet.toFixed(2)} is below 1.2 — may run unevenly`,
|
|
3220
|
+
context: { value: metrics.crSunPlanet }
|
|
3221
|
+
});
|
|
3222
|
+
if (metrics.crPlanetRing < 1.2) diagnostics.push({
|
|
3223
|
+
code: "CONTACT_RATIO_LOW_PLANET_RING",
|
|
3224
|
+
severity: "warning",
|
|
3225
|
+
message: `planet-ring contact ratio ${metrics.crPlanetRing.toFixed(2)} is below 1.2 — may run unevenly`,
|
|
3226
|
+
context: { value: metrics.crPlanetRing }
|
|
3227
|
+
});
|
|
3228
|
+
if (metrics.undercutSun > 0) diagnostics.push({
|
|
3229
|
+
code: "UNDERCUT_RISK_SUN",
|
|
3230
|
+
severity: "warning",
|
|
3231
|
+
message: `sun gear is undercut: increase sunShift by ${metrics.undercutSun.toFixed(3)} to avoid`,
|
|
3232
|
+
context: {
|
|
3233
|
+
deficit: metrics.undercutSun,
|
|
3234
|
+
sunTeeth: cfg.sunTeeth
|
|
3235
|
+
}
|
|
3236
|
+
});
|
|
3237
|
+
if (metrics.undercutPlanet > 0) diagnostics.push({
|
|
3238
|
+
code: "UNDERCUT_RISK_PLANET",
|
|
3239
|
+
severity: "warning",
|
|
3240
|
+
message: `planet gear is undercut: increase planetShift by ${metrics.undercutPlanet.toFixed(3)} to avoid`,
|
|
3241
|
+
context: {
|
|
3242
|
+
deficit: metrics.undercutPlanet,
|
|
3243
|
+
planetTeeth: cfg.planetTeeth
|
|
3244
|
+
}
|
|
3245
|
+
});
|
|
3246
|
+
const totalShiftMagnitude = Math.abs(cfg.sunShift) + Math.abs(cfg.planetShift) + Math.abs(cfg.ringShift);
|
|
3247
|
+
if (cfg.appliedTorque !== void 0 && totalShiftMagnitude > .05) diagnostics.push({
|
|
3248
|
+
code: "LEWIS_Y_SHIFT_UNCORRECTED",
|
|
3249
|
+
severity: "info",
|
|
3250
|
+
message: "Lewis stress uses unshifted Y(z) and K_f approximations; expect ±5% per 0.1 of profile shift"
|
|
3251
|
+
});
|
|
3252
|
+
const kinematicError = cfg.ringShift - (cfg.sunShift + 2 * cfg.planetShift);
|
|
3253
|
+
if (Math.abs(kinematicError) > 1e-6) diagnostics.push({
|
|
3254
|
+
code: "PLANETARY_SHIFT_KINEMATIC_MISMATCH",
|
|
3255
|
+
severity: "warning",
|
|
3256
|
+
message: `ringShift should equal sunShift + 2·planetShift for both meshes to share working PA; off by ${kinematicError.toFixed(3)}`,
|
|
3257
|
+
context: {
|
|
3258
|
+
kinematicError,
|
|
3259
|
+
sunShift: cfg.sunShift,
|
|
3260
|
+
planetShift: cfg.planetShift,
|
|
3261
|
+
ringShift: cfg.ringShift
|
|
3262
|
+
}
|
|
3263
|
+
});
|
|
3264
|
+
return diagnostics;
|
|
3265
|
+
}
|
|
2616
3266
|
//#endregion
|
|
2617
3267
|
//#region src/ns/primitives.ts
|
|
2618
|
-
var primitives_exports = /* @__PURE__ */
|
|
3268
|
+
var primitives_exports = /* @__PURE__ */ require_textBlueprints.__exportAll({
|
|
2619
3269
|
addHoles: () => require_primitiveFns.addHoles,
|
|
2620
3270
|
bezier: () => require_primitiveFns.bezier,
|
|
2621
3271
|
box: () => require_primitiveFns.box,
|
|
@@ -2648,7 +3298,7 @@ var primitives_exports = /* @__PURE__ */ require_drawFns.__exportAll({
|
|
|
2648
3298
|
});
|
|
2649
3299
|
//#endregion
|
|
2650
3300
|
//#region src/ns/booleans.ts
|
|
2651
|
-
var booleans_exports = /* @__PURE__ */
|
|
3301
|
+
var booleans_exports = /* @__PURE__ */ require_textBlueprints.__exportAll({
|
|
2652
3302
|
checkBoolean: () => require_primitiveFns.checkBoolean,
|
|
2653
3303
|
convexHull: () => convexHull,
|
|
2654
3304
|
cut: () => cut,
|
|
@@ -2665,7 +3315,7 @@ var booleans_exports = /* @__PURE__ */ require_drawFns.__exportAll({
|
|
|
2665
3315
|
});
|
|
2666
3316
|
//#endregion
|
|
2667
3317
|
//#region src/ns/modifiers.ts
|
|
2668
|
-
var modifiers_exports = /* @__PURE__ */
|
|
3318
|
+
var modifiers_exports = /* @__PURE__ */ require_textBlueprints.__exportAll({
|
|
2669
3319
|
chamfer: () => chamfer,
|
|
2670
3320
|
draft: () => draft,
|
|
2671
3321
|
fillet: () => fillet,
|
|
@@ -2678,7 +3328,7 @@ var modifiers_exports = /* @__PURE__ */ require_drawFns.__exportAll({
|
|
|
2678
3328
|
});
|
|
2679
3329
|
//#endregion
|
|
2680
3330
|
//#region src/ns/transforms.ts
|
|
2681
|
-
var transforms_exports = /* @__PURE__ */
|
|
3331
|
+
var transforms_exports = /* @__PURE__ */ require_textBlueprints.__exportAll({
|
|
2682
3332
|
applyMatrix: () => applyMatrix,
|
|
2683
3333
|
clone: () => clone,
|
|
2684
3334
|
composeTransforms: () => require_shapeFns.composeTransforms,
|
|
@@ -2690,7 +3340,7 @@ var transforms_exports = /* @__PURE__ */ require_drawFns.__exportAll({
|
|
|
2690
3340
|
});
|
|
2691
3341
|
//#endregion
|
|
2692
3342
|
//#region src/ns/measurement.ts
|
|
2693
|
-
var measurement_exports = /* @__PURE__ */
|
|
3343
|
+
var measurement_exports = /* @__PURE__ */ require_textBlueprints.__exportAll({
|
|
2694
3344
|
checkAllInterferences: () => checkAllInterferences,
|
|
2695
3345
|
checkInterference: () => checkInterference,
|
|
2696
3346
|
createDistanceQuery: () => require_measureFns.createDistanceQuery,
|
|
@@ -2707,7 +3357,7 @@ var measurement_exports = /* @__PURE__ */ require_drawFns.__exportAll({
|
|
|
2707
3357
|
});
|
|
2708
3358
|
//#endregion
|
|
2709
3359
|
//#region src/ns/ioNs.ts
|
|
2710
|
-
var ioNs_exports = /* @__PURE__ */
|
|
3360
|
+
var ioNs_exports = /* @__PURE__ */ require_textBlueprints.__exportAll({
|
|
2711
3361
|
blueprintToDXF: () => require_importFns.blueprintToDXF,
|
|
2712
3362
|
exportAssemblySTEP: () => require_historyFns.exportAssemblySTEP,
|
|
2713
3363
|
exportDXF: () => require_importFns.exportDXF,
|
|
@@ -2731,7 +3381,7 @@ var ioNs_exports = /* @__PURE__ */ require_drawFns.__exportAll({
|
|
|
2731
3381
|
});
|
|
2732
3382
|
//#endregion
|
|
2733
3383
|
//#region src/ns/query.ts
|
|
2734
|
-
var query_exports = /* @__PURE__ */
|
|
3384
|
+
var query_exports = /* @__PURE__ */ require_textBlueprints.__exportAll({
|
|
2735
3385
|
cornerFinder: () => require_cornerFinder.cornerFinder,
|
|
2736
3386
|
edgeFinder: () => require_helpers.edgeFinder,
|
|
2737
3387
|
faceFinder: () => require_helpers.faceFinder,
|
|
@@ -2741,7 +3391,7 @@ var query_exports = /* @__PURE__ */ require_drawFns.__exportAll({
|
|
|
2741
3391
|
});
|
|
2742
3392
|
//#endregion
|
|
2743
3393
|
//#region src/ns/construction.ts
|
|
2744
|
-
var construction_exports = /* @__PURE__ */
|
|
3394
|
+
var construction_exports = /* @__PURE__ */ require_textBlueprints.__exportAll({
|
|
2745
3395
|
complexExtrude: () => require_extrudeFns.complexExtrude,
|
|
2746
3396
|
extrude: () => extrude,
|
|
2747
3397
|
guidedSweep: () => require_extrudeFns.guidedSweep,
|
|
@@ -2757,24 +3407,28 @@ var construction_exports = /* @__PURE__ */ require_drawFns.__exportAll({
|
|
|
2757
3407
|
});
|
|
2758
3408
|
//#endregion
|
|
2759
3409
|
//#region src/ns/patterns.ts
|
|
2760
|
-
var patterns_exports = /* @__PURE__ */
|
|
3410
|
+
var patterns_exports = /* @__PURE__ */ require_textBlueprints.__exportAll({
|
|
2761
3411
|
circularPattern: () => require_historyFns.circularPattern,
|
|
2762
3412
|
linearPattern: () => require_historyFns.linearPattern
|
|
2763
3413
|
});
|
|
2764
3414
|
//#endregion
|
|
3415
|
+
exports.BaseSketcher2d = require_blueprintSketcher.BaseSketcher2d;
|
|
3416
|
+
exports.BlueprintSketcher = require_blueprintSketcher.BlueprintSketcher;
|
|
2765
3417
|
exports.BrepBugError = require_errors.BrepBugError;
|
|
2766
3418
|
exports.BrepErrorCode = require_errors.BrepErrorCode;
|
|
2767
3419
|
exports.BrepWrapperError = BrepWrapperError;
|
|
2768
3420
|
exports.BrepkitAdapter = require_shapeTypes.BrepkitAdapter;
|
|
2769
|
-
exports.CompoundSketch =
|
|
3421
|
+
exports.CompoundSketch = require_textBlueprints.CompoundSketch;
|
|
2770
3422
|
exports.DEG2RAD = require_constants.DEG2RAD;
|
|
2771
3423
|
exports.DisposalScope = require_shapeTypes.DisposalScope;
|
|
3424
|
+
exports.FaceSketcher = require_drawFns.FaceSketcher;
|
|
2772
3425
|
exports.HASH_CODE_MAX = require_constants.HASH_CODE_MAX;
|
|
2773
3426
|
exports.OK = require_errors.OK;
|
|
2774
3427
|
exports.OcctWasmAdapter = require_occtWasmAdapter.OcctWasmAdapter;
|
|
2775
3428
|
exports.RAD2DEG = require_constants.RAD2DEG;
|
|
2776
|
-
exports.Sketch =
|
|
2777
|
-
exports.
|
|
3429
|
+
exports.Sketch = require_textBlueprints.Sketch;
|
|
3430
|
+
exports.Sketcher = require_drawFns.Sketcher;
|
|
3431
|
+
exports.Sketches = require_textBlueprints.Sketches;
|
|
2778
3432
|
exports.addChild = require_historyFns.addChild;
|
|
2779
3433
|
exports.addHoles = require_primitiveFns.addHoles;
|
|
2780
3434
|
exports.addMate = addMate;
|
|
@@ -2803,8 +3457,8 @@ exports.boss = boss;
|
|
|
2803
3457
|
exports.box = require_primitiveFns.box;
|
|
2804
3458
|
exports.bsplineApprox = require_primitiveFns.bsplineApprox;
|
|
2805
3459
|
exports.bug = require_errors.bug;
|
|
2806
|
-
exports.cameraFromPlane =
|
|
2807
|
-
exports.cameraLookAt =
|
|
3460
|
+
exports.cameraFromPlane = require_cameraFns.cameraFromPlane;
|
|
3461
|
+
exports.cameraLookAt = require_cameraFns.cameraLookAt;
|
|
2808
3462
|
exports.captureHint = require_shapeRefFns.captureHint;
|
|
2809
3463
|
exports.cast = require_faceFns.cast;
|
|
2810
3464
|
exports.castShape = require_shapeTypes.castShape;
|
|
@@ -2828,10 +3482,10 @@ exports.colorShape = require_shapeFns.colorShape;
|
|
|
2828
3482
|
exports.complexExtrude = require_extrudeFns.complexExtrude;
|
|
2829
3483
|
exports.composeTransforms = require_shapeFns.composeTransforms;
|
|
2830
3484
|
exports.compound = require_primitiveFns.compound;
|
|
2831
|
-
exports.compoundSketchExtrude =
|
|
2832
|
-
exports.compoundSketchFace =
|
|
2833
|
-
exports.compoundSketchLoft =
|
|
2834
|
-
exports.compoundSketchRevolve =
|
|
3485
|
+
exports.compoundSketchExtrude = require_textBlueprints.compoundSketchExtrude;
|
|
3486
|
+
exports.compoundSketchFace = require_textBlueprints.compoundSketchFace;
|
|
3487
|
+
exports.compoundSketchLoft = require_textBlueprints.compoundSketchLoft;
|
|
3488
|
+
exports.compoundSketchRevolve = require_textBlueprints.compoundSketchRevolve;
|
|
2835
3489
|
exports.computationError = require_errors.computationError;
|
|
2836
3490
|
exports.computeStraightSkeleton = computeStraightSkeleton;
|
|
2837
3491
|
exports.cone = require_primitiveFns.cone;
|
|
@@ -2847,7 +3501,7 @@ exports.countNodes = require_historyFns.countNodes;
|
|
|
2847
3501
|
exports.createAssembly = require_historyFns.createAssembly;
|
|
2848
3502
|
exports.createAssemblyNode = require_historyFns.createAssemblyNode;
|
|
2849
3503
|
exports.createBlueprint = require_blueprintFns.createBlueprint;
|
|
2850
|
-
exports.createCamera =
|
|
3504
|
+
exports.createCamera = require_cameraFns.createCamera;
|
|
2851
3505
|
exports.createCompound = require_shapeTypes.createCompound;
|
|
2852
3506
|
exports.createCompoundBlueprint = require_blueprintFns.createCompoundBlueprint;
|
|
2853
3507
|
exports.createDistanceQuery = require_measureFns.createDistanceQuery;
|
|
@@ -2957,7 +3611,7 @@ exports.flatMap = require_errors.flatMap;
|
|
|
2957
3611
|
exports.flatten = require_errors.flatten;
|
|
2958
3612
|
exports.flipFaceOrientation = require_faceFns.flipFaceOrientation;
|
|
2959
3613
|
exports.flipOrientation = require_curveFns.flipOrientation;
|
|
2960
|
-
exports.fontMetrics =
|
|
3614
|
+
exports.fontMetrics = require_textMetrics.fontMetrics;
|
|
2961
3615
|
exports.fromBREP = fromBREP$1;
|
|
2962
3616
|
exports.fromKernelDir = fromKernelDir;
|
|
2963
3617
|
exports.fromKernelPnt = fromKernelPnt;
|
|
@@ -2968,16 +3622,17 @@ exports.fuse2D = require_boolean2D.fuse2D;
|
|
|
2968
3622
|
exports.fuseAll = require_booleanFns.fuseAll;
|
|
2969
3623
|
exports.fuseBlueprints = require_boolean2D.fuseBlueprints;
|
|
2970
3624
|
exports.fuseWithEvolution = require_primitiveFns.fuseWithEvolution;
|
|
2971
|
-
exports.
|
|
3625
|
+
exports.gearGeometry = gearGeometry;
|
|
3626
|
+
exports.getBounds = require_topologyQueryFns.getBounds;
|
|
2972
3627
|
exports.getBounds2D = require_blueprintFns.getBounds2D;
|
|
2973
3628
|
exports.getCurveType = require_curveFns.getCurveType;
|
|
2974
3629
|
exports.getDisposalStats = require_shapeTypes.getDisposalStats;
|
|
2975
|
-
exports.getEdges =
|
|
3630
|
+
exports.getEdges = require_topologyQueryFns.getEdges;
|
|
2976
3631
|
exports.getFaceColor = require_shapeFns.getFaceColor;
|
|
2977
3632
|
exports.getFaceOrigins = require_shapeFns.getFaceOrigins;
|
|
2978
3633
|
exports.getFaceTags = require_shapeFns.getFaceTags;
|
|
2979
|
-
exports.getFaces =
|
|
2980
|
-
exports.getFont =
|
|
3634
|
+
exports.getFaces = require_topologyQueryFns.getFaces;
|
|
3635
|
+
exports.getFont = require_textBlueprints.getFont;
|
|
2981
3636
|
exports.getHashCode = require_shapeFns.getHashCode;
|
|
2982
3637
|
exports.getHistoryShape = require_historyFns.getShape;
|
|
2983
3638
|
exports.getKernel = require_shapeTypes.getKernel;
|
|
@@ -2991,8 +3646,8 @@ exports.getShapeKind = require_shapeTypes.getShapeKind;
|
|
|
2991
3646
|
exports.getSingleFace = require_helpers.getSingleFace;
|
|
2992
3647
|
exports.getSurfaceType = require_faceFns.getSurfaceType;
|
|
2993
3648
|
exports.getTagMetadata = require_shapeFns.getTagMetadata;
|
|
2994
|
-
exports.getVertices =
|
|
2995
|
-
exports.getWires =
|
|
3649
|
+
exports.getVertices = require_topologyQueryFns.getVertices;
|
|
3650
|
+
exports.getWires = require_topologyQueryFns.getWires;
|
|
2996
3651
|
exports.guidedSweep = require_extrudeFns.guidedSweep;
|
|
2997
3652
|
exports.heal = heal;
|
|
2998
3653
|
exports.healFace = require_primitiveFns.healFace;
|
|
@@ -3017,7 +3672,7 @@ exports.intersect = intersect;
|
|
|
3017
3672
|
exports.intersect2D = require_boolean2D.intersect2D;
|
|
3018
3673
|
exports.intersectBlueprints = require_boolean2D.intersectBlueprints;
|
|
3019
3674
|
exports.intersectWithEvolution = require_primitiveFns.intersectWithEvolution;
|
|
3020
|
-
exports.invalidateShapeCache =
|
|
3675
|
+
exports.invalidateShapeCache = require_topologyQueryFns.invalidateShapeCache;
|
|
3021
3676
|
Object.defineProperty(exports, "io", {
|
|
3022
3677
|
enumerable: true,
|
|
3023
3678
|
get: function() {
|
|
@@ -3049,7 +3704,7 @@ exports.isOperationRequest = require_workerHandler.isOperationRequest;
|
|
|
3049
3704
|
exports.isOrientedFace = require_shapeTypes.isOrientedFace;
|
|
3050
3705
|
exports.isPlanarFace = require_shapeTypes.isPlanarFace;
|
|
3051
3706
|
exports.isPlanarWire = require_shapeTypes.isPlanarWire;
|
|
3052
|
-
exports.isProjectionPlane =
|
|
3707
|
+
exports.isProjectionPlane = require_cameraFns.isProjectionPlane;
|
|
3053
3708
|
exports.isQueueEmpty = require_workerHandler.isEmpty;
|
|
3054
3709
|
exports.isSameShape = require_shapeFns.isSameShape;
|
|
3055
3710
|
exports.isShape1D = require_shapeTypes.isShape1D;
|
|
@@ -3061,23 +3716,26 @@ exports.isValid = isValid;
|
|
|
3061
3716
|
exports.isValidSolid = require_shapeTypes.isValidSolid;
|
|
3062
3717
|
exports.isVertex = require_shapeTypes.isVertex;
|
|
3063
3718
|
exports.isWire = require_shapeTypes.isWire;
|
|
3064
|
-
exports.iterEdges =
|
|
3065
|
-
exports.iterFaces =
|
|
3719
|
+
exports.iterEdges = require_topologyQueryFns.iterEdges;
|
|
3720
|
+
exports.iterFaces = require_topologyQueryFns.iterFaces;
|
|
3066
3721
|
exports.iterTopo = require_faceFns.iterTopo;
|
|
3067
|
-
exports.iterVertices =
|
|
3068
|
-
exports.iterWires =
|
|
3069
|
-
exports.kernelCall =
|
|
3070
|
-
exports.kernelCallRaw =
|
|
3071
|
-
exports.kernelCallScoped =
|
|
3722
|
+
exports.iterVertices = require_topologyQueryFns.iterVertices;
|
|
3723
|
+
exports.iterWires = require_topologyQueryFns.iterWires;
|
|
3724
|
+
exports.kernelCall = require_topologyQueryFns.kernelCall;
|
|
3725
|
+
exports.kernelCallRaw = require_topologyQueryFns.kernelCallRaw;
|
|
3726
|
+
exports.kernelCallScoped = require_topologyQueryFns.kernelCallScoped;
|
|
3072
3727
|
exports.kernelError = require_errors.kernelError;
|
|
3073
3728
|
exports.line = require_primitiveFns.line;
|
|
3074
3729
|
exports.linearPattern = require_historyFns.linearPattern;
|
|
3075
|
-
exports.loadFont =
|
|
3730
|
+
exports.loadFont = require_textBlueprints.loadFont;
|
|
3076
3731
|
exports.loft = loft;
|
|
3077
|
-
exports.loftAll =
|
|
3732
|
+
exports.loftAll = require_textBlueprints.loftAll;
|
|
3078
3733
|
exports.makeBaseBox = require_drawFns.makeBaseBox;
|
|
3734
|
+
exports.makeExternalGear = makeExternalGear;
|
|
3735
|
+
exports.makeInternalGear = makeInternalGear;
|
|
3079
3736
|
exports.makePlane = require_planeOps.makePlane;
|
|
3080
|
-
exports.
|
|
3737
|
+
exports.makePlanetaryGear = makePlanetaryGear;
|
|
3738
|
+
exports.makeProjectedEdges = require_cameraFns.makeProjectedEdges;
|
|
3081
3739
|
exports.manifoldShell = require_shapeTypes.manifoldShell;
|
|
3082
3740
|
exports.map = require_errors.map;
|
|
3083
3741
|
exports.mapBoth = require_errors.mapBoth;
|
|
@@ -3123,7 +3781,7 @@ exports.offsetWire2D = require_curveFns.offsetWire2D;
|
|
|
3123
3781
|
exports.ok = require_errors.ok;
|
|
3124
3782
|
exports.or = require_errors.or;
|
|
3125
3783
|
exports.orElse = require_errors.orElse;
|
|
3126
|
-
exports.organiseBlueprints =
|
|
3784
|
+
exports.organiseBlueprints = require_blueprintSketcher.organiseBlueprints;
|
|
3127
3785
|
exports.orientedFace = require_shapeTypes.orientedFace;
|
|
3128
3786
|
exports.outerWire = require_faceFns.outerWire;
|
|
3129
3787
|
Object.defineProperty(exports, "patterns", {
|
|
@@ -3137,6 +3795,7 @@ exports.pipeline = require_errors.pipeline;
|
|
|
3137
3795
|
exports.pivotPlane = require_planeOps.pivotPlane;
|
|
3138
3796
|
exports.planarFace = require_shapeTypes.planarFace;
|
|
3139
3797
|
exports.planarWire = require_shapeTypes.planarWire;
|
|
3798
|
+
exports.planetPlacements = planetPlacements;
|
|
3140
3799
|
exports.pocket = pocket;
|
|
3141
3800
|
exports.pointOnSurface = require_faceFns.pointOnSurface;
|
|
3142
3801
|
exports.polygon = require_primitiveFns.polygon;
|
|
@@ -3151,7 +3810,7 @@ Object.defineProperty(exports, "primitives", {
|
|
|
3151
3810
|
return primitives_exports;
|
|
3152
3811
|
}
|
|
3153
3812
|
});
|
|
3154
|
-
exports.projectEdges =
|
|
3813
|
+
exports.projectEdges = require_cameraFns.projectEdges;
|
|
3155
3814
|
exports.projectPointOnFace = require_faceFns.projectPointOnFace;
|
|
3156
3815
|
Object.defineProperty(exports, "query", {
|
|
3157
3816
|
enumerable: true,
|
|
@@ -3202,21 +3861,21 @@ exports.shellWithEvolution = require_primitiveFns.shellWithEvolution;
|
|
|
3202
3861
|
exports.simplify = simplify;
|
|
3203
3862
|
exports.sketchCircle = require_drawFns.sketchCircle;
|
|
3204
3863
|
exports.sketchEllipse = require_drawFns.sketchEllipse;
|
|
3205
|
-
exports.sketchExtrude =
|
|
3206
|
-
exports.sketchFace =
|
|
3864
|
+
exports.sketchExtrude = require_textBlueprints.sketchExtrude;
|
|
3865
|
+
exports.sketchFace = require_textBlueprints.sketchFace;
|
|
3207
3866
|
exports.sketchFaceOffset = require_drawFns.sketchFaceOffset;
|
|
3208
3867
|
exports.sketchHelix = require_drawFns.sketchHelix;
|
|
3209
|
-
exports.sketchLoft =
|
|
3868
|
+
exports.sketchLoft = require_textBlueprints.sketchLoft;
|
|
3210
3869
|
exports.sketchOnFace2D = require_blueprintFns.sketchOnFace2D;
|
|
3211
3870
|
exports.sketchOnPlane2D = require_blueprintFns.sketchOnPlane2D;
|
|
3212
3871
|
exports.sketchParametricFunction = require_drawFns.sketchParametricFunction;
|
|
3213
3872
|
exports.sketchPolysides = require_drawFns.sketchPolysides;
|
|
3214
3873
|
exports.sketchRectangle = require_drawFns.sketchRectangle;
|
|
3215
|
-
exports.sketchRevolve =
|
|
3874
|
+
exports.sketchRevolve = require_textBlueprints.sketchRevolve;
|
|
3216
3875
|
exports.sketchRoundedRectangle = require_drawFns.sketchRoundedRectangle;
|
|
3217
|
-
exports.sketchSweep =
|
|
3218
|
-
exports.sketchText =
|
|
3219
|
-
exports.sketchWires =
|
|
3876
|
+
exports.sketchSweep = require_textBlueprints.sketchSweep;
|
|
3877
|
+
exports.sketchText = require_textMetrics.sketchText;
|
|
3878
|
+
exports.sketchWires = require_textBlueprints.sketchWires;
|
|
3220
3879
|
exports.sketcherStateError = require_errors.sketcherStateError;
|
|
3221
3880
|
exports.slice = slice;
|
|
3222
3881
|
exports.solid = require_primitiveFns.solid;
|
|
@@ -3238,8 +3897,8 @@ exports.tagFaces = require_shapeFns.tagFaces;
|
|
|
3238
3897
|
exports.tangentArc = require_primitiveFns.tangentArc;
|
|
3239
3898
|
exports.tap = require_errors.tap;
|
|
3240
3899
|
exports.tapErr = require_errors.tapErr;
|
|
3241
|
-
exports.textBlueprints =
|
|
3242
|
-
exports.textMetrics =
|
|
3900
|
+
exports.textBlueprints = require_textBlueprints.textBlueprints;
|
|
3901
|
+
exports.textMetrics = require_textMetrics.textMetrics;
|
|
3243
3902
|
exports.thicken = thicken;
|
|
3244
3903
|
exports.threePointArc = require_primitiveFns.threePointArc;
|
|
3245
3904
|
exports.toBREP = toBREP;
|
|
@@ -3278,6 +3937,7 @@ exports.updateRoles = require_shapeRefFns.updateRoles;
|
|
|
3278
3937
|
exports.uvBounds = require_faceFns.uvBounds;
|
|
3279
3938
|
exports.uvCoordinates = require_faceFns.uvCoordinates;
|
|
3280
3939
|
exports.validSolid = require_shapeTypes.validSolid;
|
|
3940
|
+
exports.validatePlanetary = validatePlanetary;
|
|
3281
3941
|
exports.validationError = require_errors.validationError;
|
|
3282
3942
|
exports.variableFillet = require_primitiveFns.variableFillet;
|
|
3283
3943
|
exports.vecAdd = require_vecOps.vecAdd;
|
|
@@ -3298,7 +3958,7 @@ exports.vecScale = require_vecOps.vecScale;
|
|
|
3298
3958
|
exports.vecSub = require_vecOps.vecSub;
|
|
3299
3959
|
exports.vertex = require_primitiveFns.vertex;
|
|
3300
3960
|
exports.vertexFinder = vertexFinder;
|
|
3301
|
-
exports.vertexPosition =
|
|
3961
|
+
exports.vertexPosition = require_topologyQueryFns.vertexPosition;
|
|
3302
3962
|
exports.verticesOfEdge = require_primitiveFns.verticesOfEdge;
|
|
3303
3963
|
exports.walkAssembly = require_historyFns.walkAssembly;
|
|
3304
3964
|
exports.wire = require_primitiveFns.wire;
|