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
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-0fYW_YnO.js";
|
|
2
|
+
import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-Do6xNsLt.js";
|
|
3
|
+
//#region src/text/sketchText.ts
|
|
4
|
+
/**
|
|
5
|
+
* Render text as 3D sketch outlines on a plane.
|
|
6
|
+
*
|
|
7
|
+
* Combines {@link textBlueprints} with `sketchOnPlane` to produce a
|
|
8
|
+
* {@link Sketches} collection that can be extruded, revolved, etc.
|
|
9
|
+
*
|
|
10
|
+
* @param text - The string to render.
|
|
11
|
+
* @param textConfig - Font size, family, and start position.
|
|
12
|
+
* @param planeConfig - Plane name / origin to sketch on (defaults to XY at origin).
|
|
13
|
+
* @returns A {@link Sketches} collection of the text outlines.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* await loadFont("/fonts/Roboto.ttf");
|
|
18
|
+
* const textSketches = sketchText("Hello", { fontSize: 24 });
|
|
19
|
+
* const solid = textSketches.extrude(2);
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
function sketchText(text, textConfig, planeConfig = {}) {
|
|
23
|
+
const textBp = textBlueprints(text, textConfig);
|
|
24
|
+
return new Sketches((typeof planeConfig.plane === "string" || planeConfig.plane === void 0 ? textBp.sketchOnPlane(planeConfig.plane, planeConfig.origin) : textBp.sketchOnPlane(planeConfig.plane)).map((item) => Array.isArray(item) ? new CompoundSketch(item.map(wrapSketchData)) : wrapSketchData(item)));
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/text/textMetrics.ts
|
|
28
|
+
/**
|
|
29
|
+
* Measure the dimensions of a text string without generating geometry.
|
|
30
|
+
*
|
|
31
|
+
* Requires a font to be loaded via {@link loadFont} first.
|
|
32
|
+
*/
|
|
33
|
+
function textMetrics(text, options) {
|
|
34
|
+
const fontSize = options?.fontSize ?? 1;
|
|
35
|
+
const font = getFont(options?.fontFamily);
|
|
36
|
+
if (!font) return err(validationError(BrepErrorCode.NO_FONT_LOADED, "No font loaded. Call loadFont() first.", void 0, void 0, "Load a font with loadFont() before calling textMetrics()"));
|
|
37
|
+
const width = font.getAdvanceWidth(text, fontSize);
|
|
38
|
+
const scale = fontSize / font.unitsPerEm;
|
|
39
|
+
const ascender = font.ascender * scale;
|
|
40
|
+
const descender = font.descender * scale;
|
|
41
|
+
return ok({
|
|
42
|
+
width,
|
|
43
|
+
height: ascender - descender,
|
|
44
|
+
ascender,
|
|
45
|
+
descender
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Retrieve font-level metrics without referencing specific text.
|
|
50
|
+
*
|
|
51
|
+
* Requires a font to be loaded via {@link loadFont} first.
|
|
52
|
+
*/
|
|
53
|
+
function fontMetrics(options) {
|
|
54
|
+
const fontSize = options?.fontSize ?? 1;
|
|
55
|
+
const font = getFont(options?.fontFamily);
|
|
56
|
+
if (!font) return err(validationError(BrepErrorCode.NO_FONT_LOADED, "No font loaded. Call loadFont() first.", void 0, void 0, "Load a font with loadFont() before calling fontMetrics()"));
|
|
57
|
+
const scale = fontSize / font.unitsPerEm;
|
|
58
|
+
const ascender = font.ascender * scale;
|
|
59
|
+
const descender = font.descender * scale;
|
|
60
|
+
const lineGap = (font.tables?.os2?.sTypoLineGap ?? 0) * scale;
|
|
61
|
+
return ok({
|
|
62
|
+
ascender,
|
|
63
|
+
descender,
|
|
64
|
+
unitsPerEm: font.unitsPerEm,
|
|
65
|
+
lineHeight: ascender - descender + lineGap
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
export { textMetrics as n, sketchText as r, fontMetrics as t };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
const require_textBlueprints = require("./textBlueprints-oWhiABaY.cjs");
|
|
2
|
+
const require_errors = require("./errors-Dv6pfNct.cjs");
|
|
3
|
+
//#region src/text/sketchText.ts
|
|
4
|
+
/**
|
|
5
|
+
* Render text as 3D sketch outlines on a plane.
|
|
6
|
+
*
|
|
7
|
+
* Combines {@link textBlueprints} with `sketchOnPlane` to produce a
|
|
8
|
+
* {@link Sketches} collection that can be extruded, revolved, etc.
|
|
9
|
+
*
|
|
10
|
+
* @param text - The string to render.
|
|
11
|
+
* @param textConfig - Font size, family, and start position.
|
|
12
|
+
* @param planeConfig - Plane name / origin to sketch on (defaults to XY at origin).
|
|
13
|
+
* @returns A {@link Sketches} collection of the text outlines.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* await loadFont("/fonts/Roboto.ttf");
|
|
18
|
+
* const textSketches = sketchText("Hello", { fontSize: 24 });
|
|
19
|
+
* const solid = textSketches.extrude(2);
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
function sketchText(text, textConfig, planeConfig = {}) {
|
|
23
|
+
const textBp = require_textBlueprints.textBlueprints(text, textConfig);
|
|
24
|
+
return new require_textBlueprints.Sketches((typeof planeConfig.plane === "string" || planeConfig.plane === void 0 ? textBp.sketchOnPlane(planeConfig.plane, planeConfig.origin) : textBp.sketchOnPlane(planeConfig.plane)).map((item) => Array.isArray(item) ? new require_textBlueprints.CompoundSketch(item.map(require_textBlueprints.wrapSketchData)) : require_textBlueprints.wrapSketchData(item)));
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/text/textMetrics.ts
|
|
28
|
+
/**
|
|
29
|
+
* Measure the dimensions of a text string without generating geometry.
|
|
30
|
+
*
|
|
31
|
+
* Requires a font to be loaded via {@link loadFont} first.
|
|
32
|
+
*/
|
|
33
|
+
function textMetrics(text, options) {
|
|
34
|
+
const fontSize = options?.fontSize ?? 1;
|
|
35
|
+
const font = require_textBlueprints.getFont(options?.fontFamily);
|
|
36
|
+
if (!font) return require_errors.err(require_errors.validationError(require_errors.BrepErrorCode.NO_FONT_LOADED, "No font loaded. Call loadFont() first.", void 0, void 0, "Load a font with loadFont() before calling textMetrics()"));
|
|
37
|
+
const width = font.getAdvanceWidth(text, fontSize);
|
|
38
|
+
const scale = fontSize / font.unitsPerEm;
|
|
39
|
+
const ascender = font.ascender * scale;
|
|
40
|
+
const descender = font.descender * scale;
|
|
41
|
+
return require_errors.ok({
|
|
42
|
+
width,
|
|
43
|
+
height: ascender - descender,
|
|
44
|
+
ascender,
|
|
45
|
+
descender
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Retrieve font-level metrics without referencing specific text.
|
|
50
|
+
*
|
|
51
|
+
* Requires a font to be loaded via {@link loadFont} first.
|
|
52
|
+
*/
|
|
53
|
+
function fontMetrics(options) {
|
|
54
|
+
const fontSize = options?.fontSize ?? 1;
|
|
55
|
+
const font = require_textBlueprints.getFont(options?.fontFamily);
|
|
56
|
+
if (!font) return require_errors.err(require_errors.validationError(require_errors.BrepErrorCode.NO_FONT_LOADED, "No font loaded. Call loadFont() first.", void 0, void 0, "Load a font with loadFont() before calling fontMetrics()"));
|
|
57
|
+
const scale = fontSize / font.unitsPerEm;
|
|
58
|
+
const ascender = font.ascender * scale;
|
|
59
|
+
const descender = font.descender * scale;
|
|
60
|
+
const lineGap = (font.tables?.os2?.sTypoLineGap ?? 0) * scale;
|
|
61
|
+
return require_errors.ok({
|
|
62
|
+
ascender,
|
|
63
|
+
descender,
|
|
64
|
+
unitsPerEm: font.unitsPerEm,
|
|
65
|
+
lineHeight: ascender - descender + lineGap
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
Object.defineProperty(exports, "fontMetrics", {
|
|
70
|
+
enumerable: true,
|
|
71
|
+
get: function() {
|
|
72
|
+
return fontMetrics;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
Object.defineProperty(exports, "sketchText", {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
get: function() {
|
|
78
|
+
return sketchText;
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
Object.defineProperty(exports, "textMetrics", {
|
|
82
|
+
enumerable: true,
|
|
83
|
+
get: function() {
|
|
84
|
+
return textMetrics;
|
|
85
|
+
}
|
|
86
|
+
});
|
|
@@ -50,4 +50,3 @@ export declare function adjacentFaces<D extends Dimension>(parent: AnyShape<D>,
|
|
|
50
50
|
* @returns Array of edges present in both faces (via isSame comparison).
|
|
51
51
|
*/
|
|
52
52
|
export declare function sharedEdges<D extends Dimension>(face1: Face<D>, face2: Face<D>): Edge<D>[];
|
|
53
|
-
//# sourceMappingURL=adjacencyFns.d.ts.map
|
package/dist/topology/api.d.ts
CHANGED
|
@@ -125,4 +125,3 @@ export declare function fromBREP(data: string): Result<AnyShape<Dimension>>;
|
|
|
125
125
|
export declare function isValid(shape: Shapeable<AnyShape<Dimension>>): boolean;
|
|
126
126
|
/** Check if a shape is empty (null). */
|
|
127
127
|
export declare function isEmpty(shape: Shapeable<AnyShape<Dimension>>): boolean;
|
|
128
|
-
//# sourceMappingURL=api.d.ts.map
|
|
@@ -126,4 +126,3 @@ export type Shapeable<T extends AnyShape<Dimension>> = T | WrappedMarker<T>;
|
|
|
126
126
|
export declare function resolve<T extends AnyShape<Dimension>>(s: Shapeable<T>): T;
|
|
127
127
|
/** Extract the raw branded 3D shape from a Shapeable<Shape3D>. */
|
|
128
128
|
export declare function resolve3D(s: Shapeable<Shape3D>): Shape3D;
|
|
129
|
-
//# sourceMappingURL=apiTypes.d.ts.map
|
|
@@ -139,4 +139,3 @@ export interface BooleanPipelineStep {
|
|
|
139
139
|
export declare function booleanPipeline(base: Shape3D, steps: readonly BooleanPipelineStep[], options?: {
|
|
140
140
|
readonly optimisation?: 'none' | 'commonFace' | 'sameFace' | undefined;
|
|
141
141
|
}): Result<Shape3D>;
|
|
142
|
-
//# sourceMappingURL=booleanFns.d.ts.map
|
package/dist/topology/cast.d.ts
CHANGED
|
@@ -34,4 +34,3 @@ export declare function isCompSolid(shape: AnyShape<Dimension>): shape is CompSo
|
|
|
34
34
|
* @returns Ok with the deserialized shape, or Err if parsing fails.
|
|
35
35
|
*/
|
|
36
36
|
export declare function fromBREP(data: string): Result<AnyShape<Dimension>>;
|
|
37
|
-
//# sourceMappingURL=cast.d.ts.map
|
|
@@ -15,4 +15,3 @@ import { Result } from '../core/result.js';
|
|
|
15
15
|
* @remarks Uses `BRepFilletAPI_MakeChamfer.AddDA(dist, angle, edge, face)` internally.
|
|
16
16
|
*/
|
|
17
17
|
export declare function chamferDistAngle(shape: Shape3D, edges: Edge[], distance: number, angleDeg: number): Result<Shape3D>;
|
|
18
|
-
//# sourceMappingURL=chamferAngleFns.d.ts.map
|
|
@@ -53,6 +53,18 @@ export interface BSplineApproximationOptions {
|
|
|
53
53
|
* @returns An error if the kernel approximation algorithm fails.
|
|
54
54
|
*/
|
|
55
55
|
export declare function makeBSplineApproximation(points: Vec3[], { tolerance, smoothing, degMax, degMin }?: BSplineApproximationOptions): Result<Edge>;
|
|
56
|
+
export interface BSplineInterpolationOptions {
|
|
57
|
+
/** Treat the curve as periodic (closed loop). */
|
|
58
|
+
periodic?: boolean;
|
|
59
|
+
/** Vertex-coincidence tolerance. */
|
|
60
|
+
tolerance?: number;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Create a B-spline edge that passes exactly through every input point. Use
|
|
64
|
+
* over {@link makeBSplineApproximation} when downstream wire assembly needs
|
|
65
|
+
* precise endpoint coincidence with neighbouring edges.
|
|
66
|
+
*/
|
|
67
|
+
export declare function makeBSplineInterpolation(points: Vec3[], { periodic, tolerance }?: BSplineInterpolationOptions): Result<Edge>;
|
|
56
68
|
/**
|
|
57
69
|
* Create a Bezier curve edge from control points.
|
|
58
70
|
*
|
|
@@ -72,4 +84,3 @@ export declare function makeTangentArc(startPoint: Vec3, startTgt: Vec3, endPoin
|
|
|
72
84
|
* @returns An error if the edges cannot form a valid wire (e.g. disconnected).
|
|
73
85
|
*/
|
|
74
86
|
export declare function assembleWire(listOfEdges: (Edge | Wire)[]): Result<Wire>;
|
|
75
|
-
//# sourceMappingURL=curveBuilders.d.ts.map
|
|
@@ -77,4 +77,3 @@ export declare function approximateCurve(points: Vec3[], options?: ApproximateCu
|
|
|
77
77
|
* @returns Ok with the offset wire, or Err if the operation fails.
|
|
78
78
|
*/
|
|
79
79
|
export declare function offsetWire2D(wire: Wire<Dimension>, offset: number, kind?: 'arc' | 'intersection' | 'tangent' | 'chamfer'): Result<Wire>;
|
|
80
|
-
//# sourceMappingURL=curveFns.d.ts.map
|
|
@@ -68,4 +68,3 @@ export declare function chamferWithEvolution(shape: ValidSolid, edges: ReadonlyA
|
|
|
68
68
|
* @param tolerance - Shell operation tolerance (default 1e-3).
|
|
69
69
|
*/
|
|
70
70
|
export declare function shellWithEvolution(shape: ValidSolid, faces: ReadonlyArray<Face>, thickness: number, tolerance?: number): Result<EvolutionResult<Shape3D>>;
|
|
71
|
-
//# sourceMappingURL=evolutionFns.d.ts.map
|
|
@@ -70,4 +70,3 @@ export declare function outerWire<D extends Dimension = '3D'>(face: Face<D>): Cl
|
|
|
70
70
|
export declare function removeHolesFromFace<D extends Dimension = '3D'>(face: Face<D>): Face<D>;
|
|
71
71
|
/** Get the inner wires (holes) of a face. Hole boundaries are always closed. */
|
|
72
72
|
export declare function innerWires<D extends Dimension = '3D'>(face: Face<D>): ClosedWire<D>[];
|
|
73
|
-
//# sourceMappingURL=faceFns.d.ts.map
|
package/dist/topology/index.d.ts
CHANGED
|
@@ -11,4 +11,3 @@ export { getSurfaceType, faceGeomType, faceOrientation, flipFaceOrientation, uvB
|
|
|
11
11
|
export { exportSTEP, exportSTL, type EdgeMesh, type MeshOptions } from './meshFns.js';
|
|
12
12
|
export { fuseAll, cutAll, type BooleanOptions } from './booleanFns.js';
|
|
13
13
|
export { toBufferGeometryData, toLineGeometryData, type BufferGeometryData, type LineGeometryData, } from './threeHelpers.js';
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -29,4 +29,3 @@ export declare function getFaceColor(shape: AnyShape<Dimension>, face: Face<Dime
|
|
|
29
29
|
* kernel-provided ShapeEvolution record (no direct kernel op access needed).
|
|
30
30
|
*/
|
|
31
31
|
export declare function propagateColorsFromEvolution(evolution: ShapeEvolution, inputs: readonly AnyShape<Dimension>[], result: AnyShape<Dimension>): void;
|
|
32
|
-
//# sourceMappingURL=colorFns.d.ts.map
|
|
@@ -35,4 +35,3 @@ export declare function getTagMetadata(shape: AnyShape<Dimension>, tag: string):
|
|
|
35
35
|
* kernel-provided ShapeEvolution record (no direct kernel op access needed).
|
|
36
36
|
*/
|
|
37
37
|
export declare function propagateFaceTagsFromEvolution(evolution: ShapeEvolution, inputs: readonly AnyShape<Dimension>[], result: AnyShape<Dimension>): void;
|
|
38
|
-
//# sourceMappingURL=faceTagFns.d.ts.map
|
|
@@ -27,4 +27,3 @@ export declare function propagateAllMetadata(evolution: ShapeEvolution, inputs:
|
|
|
27
27
|
* have weaker metadata guarantees than pairwise booleans (`fuse`, `cut`).
|
|
28
28
|
*/
|
|
29
29
|
export declare function propagateMetadataByHash(inputs: readonly AnyShape<Dimension>[], result: AnyShape<Dimension>): void;
|
|
30
|
-
//# sourceMappingURL=metadataPropagation.d.ts.map
|
|
@@ -20,4 +20,3 @@ export declare function propagateOriginsFromEvolution(evolution: ShapeEvolution,
|
|
|
20
20
|
* are found, falls back to geometric matching (normal + centroid comparison).
|
|
21
21
|
*/
|
|
22
22
|
export declare function propagateOriginsByHash(inputs: readonly AnyShape<Dimension>[], result: AnyShape<Dimension>): void;
|
|
23
|
-
//# sourceMappingURL=originTrackingFns.d.ts.map
|
|
@@ -77,4 +77,3 @@ export interface VariableFilletRadius {
|
|
|
77
77
|
* Returns UNSUPPORTED_CAPABILITY error on OCCT.
|
|
78
78
|
*/
|
|
79
79
|
export declare function variableFillet(shape: ValidSolid, edge: Edge, radii: ReadonlyArray<VariableFilletRadius>): Result<ValidSolid>;
|
|
80
|
-
//# sourceMappingURL=modifierFns.d.ts.map
|
|
@@ -10,4 +10,3 @@ export declare function getNurbsCurveData(edge: Edge): NurbsCurveData | null;
|
|
|
10
10
|
* Returns null if the face is not a BSpline surface (e.g., plane, cylinder).
|
|
11
11
|
*/
|
|
12
12
|
export declare function getNurbsSurfaceData<D extends Dimension>(face: Face<D>): NurbsSurfaceData | null;
|
|
13
|
-
//# sourceMappingURL=nurbsFns.d.ts.map
|
|
@@ -223,4 +223,3 @@ export declare function sewShells(facesOrShells: Array<Face | Shell>, ignoreType
|
|
|
223
223
|
*/
|
|
224
224
|
export declare function addHoles(f: PlanarFace, holes: Array<ClosedWire & PlanarWire>): OrientedFace & PlanarFace;
|
|
225
225
|
export declare function addHoles(f: Face, holes: ClosedWire[]): OrientedFace;
|
|
226
|
-
//# sourceMappingURL=primitiveFns.d.ts.map
|
|
@@ -19,4 +19,3 @@ export type { TransformOp, ComposedTransform } from './transformFns.js';
|
|
|
19
19
|
export { getEdges, getFaces, getWires, getVertices, iterEdges, iterFaces, iterWires, iterVertices, getBounds, getCachedShapeKind, describe, vertexPosition, invalidateShapeCache, } from './topologyQueryFns.js';
|
|
20
20
|
export type { Bounds3D, ShapeDescription } from './topologyQueryFns.js';
|
|
21
21
|
export { setShapeOrigin, getFaceOrigins, propagateOriginsFromEvolution, propagateOriginsByHash, } from './metadata/originTrackingFns.js';
|
|
22
|
-
//# sourceMappingURL=shapeFns.d.ts.map
|
|
@@ -6,4 +6,3 @@ export { makeLine, makeCircle, makeEllipse, makeHelix, makeThreePointArc, makeEl
|
|
|
6
6
|
export { makeFace, makeNewFaceWithinFace, makeNonPlanarFace, addHolesInFace, makePolygon, } from './surfaceBuilders.js';
|
|
7
7
|
export { makeCylinder, makeSphere, makeCone, makeTorus, makeEllipsoid, makeBox, makeVertex, makeOffset, makeCompound, makeSolid, } from './solidBuilders.js';
|
|
8
8
|
export { weldShellsAndFaces } from './shapeUtils.js';
|
|
9
|
-
//# sourceMappingURL=shapeHelpers.d.ts.map
|
|
@@ -27,4 +27,3 @@ export type RadiusOptions<R = number> = ((e: Edge) => R | null) | R | {
|
|
|
27
27
|
export declare function isNumber(r: unknown): r is number;
|
|
28
28
|
export declare function isChamferRadius(r: unknown): r is ChamferRadius;
|
|
29
29
|
export declare function isFilletRadius(r: unknown): r is FilletRadius;
|
|
30
|
-
//# sourceMappingURL=shapeModifiers.d.ts.map
|
|
@@ -4,4 +4,3 @@
|
|
|
4
4
|
export type { GeometricHint, ShapeRef, RoleTable, ResolvedRef, BrokenRef, } from './shapeRefTypes.js';
|
|
5
5
|
export { type FaceScorer, defaultScorer } from './scoring.js';
|
|
6
6
|
export { captureHint, assignRoles, createRef, updateRoles, resolveRef } from './shapeRefFns.js';
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -44,4 +44,3 @@ export declare function updateRoles(roles: RoleTable, origin: string, evolution:
|
|
|
44
44
|
* 4. Not-found if no match above minimum score
|
|
45
45
|
*/
|
|
46
46
|
export declare function resolveRef(ref: ShapeRef, roles: RoleTable, currentShape: Shape3D, scorer?: FaceScorer): ResolvedRef | BrokenRef;
|
|
47
|
-
//# sourceMappingURL=shapeRefFns.d.ts.map
|
|
@@ -10,4 +10,3 @@ export declare function weldShapes(facesOrShells: Array<Face | Shell>): AnyShape
|
|
|
10
10
|
* @returns A shell that contains all the faces and shells.
|
|
11
11
|
*/
|
|
12
12
|
export declare function weldShellsAndFaces(facesOrShells: Array<Face | Shell>, ignoreType?: boolean): Result<Shell>;
|
|
13
|
-
//# sourceMappingURL=shapeUtils.d.ts.map
|
|
@@ -41,4 +41,3 @@ export declare function addHolesInFace<D extends Dimension = '3D'>(face: Face<D>
|
|
|
41
41
|
* @returns An error if fewer than 3 points are provided or the face cannot be built.
|
|
42
42
|
*/
|
|
43
43
|
export declare function makePolygon(points: Vec3[]): Result<OrientedFace & PlanarFace>;
|
|
44
|
-
//# sourceMappingURL=surfaceBuilders.d.ts.map
|
|
@@ -35,4 +35,3 @@ export interface SurfaceFromImageOptions extends SurfaceFromGridOptions {
|
|
|
35
35
|
* @returns A Result containing the surface shape
|
|
36
36
|
*/
|
|
37
37
|
export declare function surfaceFromImage(blob: Blob, options?: SurfaceFromImageOptions): Promise<Result<AnyShape>>;
|
|
38
|
-
//# sourceMappingURL=surfaceFns.d.ts.map
|
|
@@ -79,4 +79,3 @@ export interface ShapeDescription {
|
|
|
79
79
|
export declare function describe(shape: AnyShape<Dimension>): ShapeDescription;
|
|
80
80
|
/** Get the position of a vertex as a Vec3 tuple. */
|
|
81
81
|
export declare function vertexPosition(vertex: Vertex): Vec3;
|
|
82
|
-
//# sourceMappingURL=topologyQueryFns.d.ts.map
|
|
@@ -47,4 +47,3 @@ export declare function composeTransforms(ops: readonly TransformOp[]): Composed
|
|
|
47
47
|
* Much faster than separate clone() + translate() + rotate() calls.
|
|
48
48
|
*/
|
|
49
49
|
export declare function transformCopy<T extends AnyShape<Dimension>>(shape: T, composed: ComposedTransform): T;
|
|
50
|
-
//# sourceMappingURL=transformFns.d.ts.map
|
|
@@ -152,4 +152,3 @@ export declare function shape(edge: Edge): WrappedCurve<Edge>;
|
|
|
152
152
|
export declare function shape(wire: Wire): WrappedCurve<Wire>;
|
|
153
153
|
/** Create a typed shape wrapper from any shape. */
|
|
154
154
|
export declare function shape<T extends AnyShape>(s: T): Wrapped<T>;
|
|
155
|
-
//# sourceMappingURL=wrapperFns.d.ts.map
|
package/dist/topology.cjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-BU0qdNJP.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-DP7i60yJ.cjs");
|
|
4
|
+
const require_shapeFns = require("./shapeFns-B7x82K11.cjs");
|
|
5
|
+
const require_curveFns = require("./curveFns-CD20-4fM.cjs");
|
|
6
|
+
const require_meshFns = require("./meshFns-BCRVZgPi.cjs");
|
|
7
|
+
const require_booleanFns = require("./booleanFns-qmgMQyDl.cjs");
|
|
8
|
+
const require_primitiveFns = require("./primitiveFns-BH-JQPzh.cjs");
|
|
8
9
|
exports.addHoles = require_primitiveFns.addHoles;
|
|
9
10
|
exports.adjacentFaces = require_primitiveFns.adjacentFaces;
|
|
10
11
|
exports.approximateCurve = require_curveFns.approximateCurve;
|
|
@@ -56,17 +57,17 @@ exports.flipFaceOrientation = require_faceFns.flipFaceOrientation;
|
|
|
56
57
|
exports.flipOrientation = require_curveFns.flipOrientation;
|
|
57
58
|
exports.fuseAll = require_booleanFns.fuseAll;
|
|
58
59
|
exports.fuseWithEvolution = require_primitiveFns.fuseWithEvolution;
|
|
59
|
-
exports.getBounds =
|
|
60
|
+
exports.getBounds = require_topologyQueryFns.getBounds;
|
|
60
61
|
exports.getCurveType = require_curveFns.getCurveType;
|
|
61
|
-
exports.getEdges =
|
|
62
|
-
exports.getFaces =
|
|
62
|
+
exports.getEdges = require_topologyQueryFns.getEdges;
|
|
63
|
+
exports.getFaces = require_topologyQueryFns.getFaces;
|
|
63
64
|
exports.getHashCode = require_shapeFns.getHashCode;
|
|
64
65
|
exports.getNurbsCurveData = require_primitiveFns.getNurbsCurveData;
|
|
65
66
|
exports.getNurbsSurfaceData = require_primitiveFns.getNurbsSurfaceData;
|
|
66
67
|
exports.getOrientation = require_curveFns.getOrientation;
|
|
67
68
|
exports.getSurfaceType = require_faceFns.getSurfaceType;
|
|
68
|
-
exports.getVertices =
|
|
69
|
-
exports.getWires =
|
|
69
|
+
exports.getVertices = require_topologyQueryFns.getVertices;
|
|
70
|
+
exports.getWires = require_topologyQueryFns.getWires;
|
|
70
71
|
exports.healFace = require_primitiveFns.healFace;
|
|
71
72
|
exports.healSolid = require_primitiveFns.healSolid;
|
|
72
73
|
exports.healWire = require_primitiveFns.healWire;
|
|
@@ -74,15 +75,15 @@ exports.helix = require_primitiveFns.helix;
|
|
|
74
75
|
exports.innerWires = require_faceFns.innerWires;
|
|
75
76
|
exports.interpolateCurve = require_curveFns.interpolateCurve;
|
|
76
77
|
exports.intersectWithEvolution = require_primitiveFns.intersectWithEvolution;
|
|
77
|
-
exports.invalidateShapeCache =
|
|
78
|
+
exports.invalidateShapeCache = require_topologyQueryFns.invalidateShapeCache;
|
|
78
79
|
exports.isCompSolid = require_faceFns.isCompSolid;
|
|
79
80
|
exports.isEqualShape = require_shapeFns.isEqualShape;
|
|
80
81
|
exports.isSameShape = require_shapeFns.isSameShape;
|
|
81
|
-
exports.iterEdges =
|
|
82
|
-
exports.iterFaces =
|
|
82
|
+
exports.iterEdges = require_topologyQueryFns.iterEdges;
|
|
83
|
+
exports.iterFaces = require_topologyQueryFns.iterFaces;
|
|
83
84
|
exports.iterTopo = require_faceFns.iterTopo;
|
|
84
|
-
exports.iterVertices =
|
|
85
|
-
exports.iterWires =
|
|
85
|
+
exports.iterVertices = require_topologyQueryFns.iterVertices;
|
|
86
|
+
exports.iterWires = require_topologyQueryFns.iterWires;
|
|
86
87
|
exports.line = require_primitiveFns.line;
|
|
87
88
|
exports.normalAt = require_faceFns.normalAt;
|
|
88
89
|
exports.offsetFace = require_primitiveFns.offsetFace;
|
|
@@ -110,7 +111,7 @@ exports.uvBounds = require_faceFns.uvBounds;
|
|
|
110
111
|
exports.uvCoordinates = require_faceFns.uvCoordinates;
|
|
111
112
|
exports.variableFillet = require_primitiveFns.variableFillet;
|
|
112
113
|
exports.vertex = require_primitiveFns.vertex;
|
|
113
|
-
exports.vertexPosition =
|
|
114
|
+
exports.vertexPosition = require_topologyQueryFns.vertexPosition;
|
|
114
115
|
exports.verticesOfEdge = require_primitiveFns.verticesOfEdge;
|
|
115
116
|
exports.wire = require_primitiveFns.wire;
|
|
116
117
|
exports.wireLoop = require_primitiveFns.wireLoop;
|
package/dist/topology.d.ts
CHANGED
|
@@ -24,4 +24,3 @@ export { toBufferGeometryData, toLineGeometryData, toGroupedBufferGeometryData,
|
|
|
24
24
|
export { positionOnCurve } from './topology/positionFns.js';
|
|
25
25
|
export { healSolid, healFace, healWire, autoHeal, fixShape, solidFromShell, fixSelfIntersection, type HealingReport, type AutoHealOptions, type HealingStepDiagnostic, } from './topology/healingFns.js';
|
|
26
26
|
export { cast, downcast, shapeType, iterTopo, asTopo, isCompSolid, deserializeShape, type TopoEntity, type GenericTopo, } from './topology/index.js';
|
|
27
|
-
//# sourceMappingURL=topology.d.ts.map
|
package/dist/topology.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import { a as
|
|
4
|
-
import { c as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { d as invalidateShapeCache, f as iterEdges, g as vertexPosition, h as iterWires, l as getVertices, m as iterVertices, n as getBounds, o as getEdges, p as iterFaces, s as getFaces, u as getWires } from "./topologyQueryFns-Dhf85ZBK.js";
|
|
2
|
+
import { _ as downcast, a as flipFaceOrientation, b as iterTopo, c as normalAt, d as projectPointOnFace, g as cast, h as asTopo, i as faceOrientation, l as outerWire, m as uvCoordinates, n as faceCenter, o as getSurfaceType, p as uvBounds, r as faceGeomType, s as innerWires, t as classifyPointOnFace, u as pointOnSurface, v as fromBREP, x as shapeType, y as isCompSolid } from "./faceFns-BFWz17_E.js";
|
|
3
|
+
import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-BhZ9weSI.js";
|
|
4
|
+
import { a as curveLength, c as curveStartPoint, d as getCurveType, f as getOrientation, i as curveIsPeriodic, l as curveTangentAt, m as offsetWire2D, n as curveEndPoint, o as curvePeriod, p as interpolateCurve, r as curveIsClosed, s as curvePointAt, t as approximateCurve, u as flipOrientation } from "./curveFns-B4tWuinR.js";
|
|
5
|
+
import { c as createMeshCache, n as exportSTEP, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-DSdkRFWq.js";
|
|
6
|
+
import { a as fuseAll, r as cutAll } from "./booleanFns-CRa80qMX.js";
|
|
7
|
+
import { $ as getNurbsSurfaceData, A as fixShape, C as threePointArc, D as wireLoop, E as wire, G as chamferWithEvolution, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as getNurbsCurveData, S as tangentArc, T as vertex, U as variableFillet, W as positionOnCurve, X as shellWithEvolution, Y as intersectWithEvolution, Z as checkBoolean, _ as polygon, a as circle, at as wiresOfFace, b as sphere, c as cylinder, ct as toGroupedBufferGeometryData, d as ellipsoid, et as adjacentFaces, f as face, g as offsetFace, h as line, i as bsplineApprox, it as verticesOfEdge, k as fixSelfIntersection, l as ellipse, m as helix, n as bezier, nt as facesOfEdge, o as compound, ot as chamferDistAngle, p as filledFace, q as filletWithEvolution, r as box, rt as sharedEdges, s as cone, st as toBufferGeometryData, t as addHoles, tt as edgesOfFace, u as ellipseArc, ut as toLineGeometryData, v as sewShells, w as torus, x as subFace, y as solid } from "./primitiveFns-C1p92ZcD.js";
|
|
7
8
|
export { addHoles, adjacentFaces, approximateCurve, asTopo, autoHeal, bezier, box, bsplineApprox, cast, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkBoolean, circle, classifyPointOnFace, clearMeshCache, compound, cone, createMeshCache, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cutAll, cutWithEvolution, cylinder, fromBREP as deserializeShape, downcast, edgesOfFace, ellipse, ellipseArc, ellipsoid, exportIGES, exportSTEP, exportSTL, face, faceCenter, faceGeomType, faceOrientation, facesOfEdge, filledFace, filletWithEvolution, fixSelfIntersection, fixShape, flipFaceOrientation, flipOrientation, fuseAll, fuseWithEvolution, getBounds, getCurveType, getEdges, getFaces, getHashCode, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getSurfaceType, getVertices, getWires, healFace, healSolid, healWire, helix, innerWires, interpolateCurve, intersectWithEvolution, invalidateShapeCache, isCompSolid, isEqualShape, isSameShape, iterEdges, iterFaces, iterTopo, iterVertices, iterWires, line, normalAt, offsetFace, offsetWire2D, outerWire, pointOnSurface, polygon, positionOnCurve, projectPointOnFace, sewShells, shapeType, sharedEdges, shellWithEvolution, solid, solidFromShell, sphere, subFace, tangentArc, threePointArc, toBufferGeometryData, toGroupedBufferGeometryData, toLineGeometryData, torus, uvBounds, uvCoordinates, variableFillet, vertex, vertexPosition, verticesOfEdge, wire, wireLoop, wiresOfFace };
|