@bitbybit-dev/base 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/GlobalCDNProvider.js +1 -1
- package/lib/api/bearings/ansi-bearings.constants.d.ts +2 -0
- package/lib/api/bearings/ansi-bearings.constants.js +26 -0
- package/lib/api/bearings/ansi-bearings.d.ts +4 -0
- package/lib/api/bearings/ansi-bearings.js +14 -0
- package/lib/api/bearings/bearing-types.d.ts +25 -0
- package/lib/api/bearings/bearing-types.js +1 -0
- package/lib/api/bearings/bearings.constants.d.ts +1 -0
- package/lib/api/bearings/bearings.constants.js +1 -0
- package/lib/api/bearings/iso-bearings.constants.d.ts +2 -0
- package/lib/api/bearings/iso-bearings.constants.js +30 -0
- package/lib/api/bearings/iso-bearings.d.ts +4 -0
- package/lib/api/bearings/iso-bearings.js +14 -0
- package/lib/api/color-space.d.ts +2 -0
- package/lib/api/color-space.js +5 -8
- package/lib/api/fasteners/ansi-fasteners.constants.d.ts +16 -0
- package/lib/api/fasteners/ansi-fasteners.constants.js +118 -0
- package/lib/api/fasteners/ansi-fasteners.d.ts +8 -0
- package/lib/api/fasteners/ansi-fasteners.js +64 -0
- package/lib/api/fasteners/fastener-types.d.ts +161 -0
- package/lib/api/fasteners/fastener-types.js +1 -0
- package/lib/api/fasteners/fasteners.constants.d.ts +5 -0
- package/lib/api/fasteners/fasteners.constants.js +5 -0
- package/lib/api/fasteners/fasteners.d.ts +2 -0
- package/lib/api/fasteners/fasteners.js +9 -0
- package/lib/api/fasteners/iso-fasteners.constants.d.ts +23 -0
- package/lib/api/fasteners/iso-fasteners.constants.js +110 -0
- package/lib/api/fasteners/iso-fasteners.d.ts +9 -0
- package/lib/api/fasteners/iso-fasteners.js +61 -0
- package/lib/api/gears/bevel-gears.d.ts +6 -0
- package/lib/api/gears/bevel-gears.js +69 -0
- package/lib/api/gears/gear-checks.d.ts +8 -0
- package/lib/api/gears/gear-checks.js +69 -0
- package/lib/api/gears/gear-pairs.d.ts +4 -0
- package/lib/api/gears/gear-pairs.js +140 -0
- package/lib/api/gears/gear-types.d.ts +425 -0
- package/lib/api/gears/gear-types.js +1 -0
- package/lib/api/gears/gears.constants.d.ts +19 -0
- package/lib/api/gears/gears.constants.js +19 -0
- package/lib/api/gears/gears.d.ts +10 -0
- package/lib/api/gears/gears.js +156 -0
- package/lib/api/gears/helical-gears.d.ts +5 -0
- package/lib/api/gears/helical-gears.js +33 -0
- package/lib/api/gears/involute-flank.d.ts +26 -0
- package/lib/api/gears/involute-flank.js +158 -0
- package/lib/api/gears/racks.d.ts +3 -0
- package/lib/api/gears/racks.js +64 -0
- package/lib/api/index.d.ts +10 -1
- package/lib/api/index.js +0 -1
- package/lib/api/inputs/base-inputs.d.ts +450 -3
- package/lib/api/inputs/base-inputs.js +12 -0
- package/lib/api/inputs/color-inputs.d.ts +14 -0
- package/lib/api/inputs/color-inputs.js +19 -0
- package/lib/api/inputs/engineering-inputs.d.ts +1539 -0
- package/lib/api/inputs/engineering-inputs.js +2181 -0
- package/lib/api/inputs/index.d.ts +2 -0
- package/lib/api/inputs/index.js +2 -0
- package/lib/api/inputs/io-inputs.d.ts +8 -1
- package/lib/api/inputs/io-inputs.js +4 -1
- package/lib/api/inputs/math-inputs.d.ts +61 -0
- package/lib/api/inputs/math-inputs.js +85 -0
- package/lib/api/inputs/mesh-inputs.d.ts +170 -0
- package/lib/api/inputs/mesh-inputs.js +206 -0
- package/lib/api/inputs/point-inputs.d.ts +4 -4
- package/lib/api/inputs/polyline-inputs.d.ts +144 -0
- package/lib/api/inputs/polyline-inputs.js +151 -0
- package/lib/api/inputs/recipes-inputs.d.ts +76 -0
- package/lib/api/inputs/recipes-inputs.js +74 -0
- package/lib/api/inputs/transforms-inputs.d.ts +34 -0
- package/lib/api/inputs/transforms-inputs.js +35 -0
- package/lib/api/keys/ansi-keys.constants.d.ts +3 -0
- package/lib/api/keys/ansi-keys.constants.js +16 -0
- package/lib/api/keys/ansi-keys.d.ts +3 -0
- package/lib/api/keys/ansi-keys.js +14 -0
- package/lib/api/keys/din-keys.constants.d.ts +3 -0
- package/lib/api/keys/din-keys.constants.js +14 -0
- package/lib/api/keys/din-keys.d.ts +3 -0
- package/lib/api/keys/din-keys.js +13 -0
- package/lib/api/keys/key-types.d.ts +17 -0
- package/lib/api/keys/key-types.js +1 -0
- package/lib/api/keys/keys.constants.d.ts +1 -0
- package/lib/api/keys/keys.constants.js +1 -0
- package/lib/api/knurls/ansi-knurls.constants.d.ts +4 -0
- package/lib/api/knurls/ansi-knurls.constants.js +8 -0
- package/lib/api/knurls/ansi-knurls.d.ts +3 -0
- package/lib/api/knurls/ansi-knurls.js +20 -0
- package/lib/api/knurls/din-knurls.constants.d.ts +2 -0
- package/lib/api/knurls/din-knurls.constants.js +2 -0
- package/lib/api/knurls/din-knurls.d.ts +3 -0
- package/lib/api/knurls/din-knurls.js +19 -0
- package/lib/api/knurls/knurl-types.d.ts +24 -0
- package/lib/api/knurls/knurl-types.js +1 -0
- package/lib/api/knurls/knurls.constants.d.ts +1 -0
- package/lib/api/knurls/knurls.constants.js +1 -0
- package/lib/api/knurls/knurls.d.ts +2 -0
- package/lib/api/knurls/knurls.js +9 -0
- package/lib/api/recipes/checks.d.ts +15 -0
- package/lib/api/recipes/checks.js +85 -0
- package/lib/api/recipes/limits.constants.d.ts +4 -0
- package/lib/api/recipes/limits.constants.js +4 -0
- package/lib/api/recipes/sources.d.ts +0 -13
- package/lib/api/recipes/sources.js +3 -15
- package/lib/api/recipes/surface-mesh.d.ts +0 -14
- package/lib/api/recipes/surface-mesh.js +8 -21
- package/lib/api/recipes/validate-brep.d.ts +2 -0
- package/lib/api/recipes/validate-brep.js +330 -0
- package/lib/api/recipes/validate.d.ts +0 -31
- package/lib/api/recipes/validate.js +7 -115
- package/lib/api/resolved-inputs/index.d.ts +80 -0
- package/lib/api/retaining-rings/ansi-retaining-rings.constants.d.ts +4 -0
- package/lib/api/retaining-rings/ansi-retaining-rings.constants.js +93 -0
- package/lib/api/retaining-rings/ansi-retaining-rings.d.ts +4 -0
- package/lib/api/retaining-rings/ansi-retaining-rings.js +20 -0
- package/lib/api/retaining-rings/din-retaining-rings.constants.d.ts +3 -0
- package/lib/api/retaining-rings/din-retaining-rings.constants.js +115 -0
- package/lib/api/retaining-rings/din-retaining-rings.d.ts +4 -0
- package/lib/api/retaining-rings/din-retaining-rings.js +20 -0
- package/lib/api/retaining-rings/retaining-ring-types.d.ts +30 -0
- package/lib/api/retaining-rings/retaining-ring-types.js +1 -0
- package/lib/api/retaining-rings/retaining-rings.constants.d.ts +1 -0
- package/lib/api/retaining-rings/retaining-rings.constants.js +1 -0
- package/lib/api/retaining-rings/retaining-rings.d.ts +2 -0
- package/lib/api/retaining-rings/retaining-rings.js +9 -0
- package/lib/api/services/base-bitbybit.d.ts +42 -0
- package/lib/api/services/base-bitbybit.js +43 -0
- package/lib/api/services/color.d.ts +35 -2
- package/lib/api/services/color.js +48 -12
- package/lib/api/services/engineering/engineering.d.ts +12 -0
- package/lib/api/services/engineering/engineering.js +13 -0
- package/lib/api/services/engineering/index.d.ts +2 -0
- package/lib/api/services/engineering/index.js +2 -0
- package/lib/api/services/engineering/mechanical/bearings-ansi.d.ts +40 -0
- package/lib/api/services/engineering/mechanical/bearings-ansi.js +47 -0
- package/lib/api/services/engineering/mechanical/bearings-iso.d.ts +39 -0
- package/lib/api/services/engineering/mechanical/bearings-iso.js +46 -0
- package/lib/api/services/engineering/mechanical/bearings.d.ts +14 -0
- package/lib/api/services/engineering/mechanical/bearings.js +15 -0
- package/lib/api/services/engineering/mechanical/fasteners-ansi.d.ts +109 -0
- package/lib/api/services/engineering/mechanical/fasteners-ansi.js +133 -0
- package/lib/api/services/engineering/mechanical/fasteners-iso.d.ts +123 -0
- package/lib/api/services/engineering/mechanical/fasteners-iso.js +151 -0
- package/lib/api/services/engineering/mechanical/fasteners.d.ts +13 -0
- package/lib/api/services/engineering/mechanical/fasteners.js +14 -0
- package/lib/api/services/engineering/mechanical/gears.d.ts +267 -0
- package/lib/api/services/engineering/mechanical/gears.js +318 -0
- package/lib/api/services/engineering/mechanical/index.d.ts +24 -0
- package/lib/api/services/engineering/mechanical/index.js +24 -0
- package/lib/api/services/engineering/mechanical/keys-ansi.d.ts +27 -0
- package/lib/api/services/engineering/mechanical/keys-ansi.js +32 -0
- package/lib/api/services/engineering/mechanical/keys-din.d.ts +26 -0
- package/lib/api/services/engineering/mechanical/keys-din.js +31 -0
- package/lib/api/services/engineering/mechanical/keys.d.ts +14 -0
- package/lib/api/services/engineering/mechanical/keys.js +15 -0
- package/lib/api/services/engineering/mechanical/knurls-ansi.d.ts +26 -0
- package/lib/api/services/engineering/mechanical/knurls-ansi.js +31 -0
- package/lib/api/services/engineering/mechanical/knurls-din.d.ts +26 -0
- package/lib/api/services/engineering/mechanical/knurls-din.js +31 -0
- package/lib/api/services/engineering/mechanical/knurls.d.ts +14 -0
- package/lib/api/services/engineering/mechanical/knurls.js +15 -0
- package/lib/api/services/engineering/mechanical/mechanical.d.ts +29 -0
- package/lib/api/services/engineering/mechanical/mechanical.js +30 -0
- package/lib/api/services/engineering/mechanical/retaining-rings-ansi.d.ts +43 -0
- package/lib/api/services/engineering/mechanical/retaining-rings-ansi.js +51 -0
- package/lib/api/services/engineering/mechanical/retaining-rings-din.d.ts +43 -0
- package/lib/api/services/engineering/mechanical/retaining-rings-din.js +51 -0
- package/lib/api/services/engineering/mechanical/retaining-rings.d.ts +13 -0
- package/lib/api/services/engineering/mechanical/retaining-rings.js +14 -0
- package/lib/api/services/engineering/mechanical/splines-ansi.d.ts +27 -0
- package/lib/api/services/engineering/mechanical/splines-ansi.js +32 -0
- package/lib/api/services/engineering/mechanical/splines-din.d.ts +26 -0
- package/lib/api/services/engineering/mechanical/splines-din.js +31 -0
- package/lib/api/services/engineering/mechanical/splines.d.ts +13 -0
- package/lib/api/services/engineering/mechanical/splines.js +14 -0
- package/lib/api/services/engineering/mechanical/springs.d.ts +27 -0
- package/lib/api/services/engineering/mechanical/springs.js +31 -0
- package/lib/api/services/engineering/mechanical/threads-ansi.d.ts +40 -0
- package/lib/api/services/engineering/mechanical/threads-ansi.js +48 -0
- package/lib/api/services/engineering/mechanical/threads-iso.d.ts +40 -0
- package/lib/api/services/engineering/mechanical/threads-iso.js +48 -0
- package/lib/api/services/engineering/mechanical/threads.d.ts +13 -0
- package/lib/api/services/engineering/mechanical/threads.js +14 -0
- package/lib/api/services/frame.js +3 -3
- package/lib/api/services/geometry-helper.js +8 -111
- package/lib/api/services/helpers/color/color-space.d.ts +2 -0
- package/lib/api/services/helpers/color/color-space.js +12 -0
- package/lib/api/services/helpers/{nurbs.d.ts → curves/nurbs.d.ts} +1 -1
- package/lib/api/services/helpers/{surface-triangulation.d.ts → curves/surface-triangulation.d.ts} +2 -2
- package/lib/api/services/helpers/{surface-triangulation.js → curves/surface-triangulation.js} +14 -8
- package/lib/api/services/helpers/{dxf → files/dxf}/dxf-generator.d.ts +2 -1
- package/lib/api/services/helpers/{dxf → files/dxf}/dxf-generator.js +19 -5
- package/lib/api/services/helpers/files/dxf/dxf.constants.d.ts +4 -0
- package/lib/api/services/helpers/files/dxf/dxf.constants.js +4 -0
- package/lib/api/services/helpers/{dxf → files/dxf}/dxf.d.ts +1 -1
- package/lib/api/services/helpers/{dxf → files/dxf}/dxf.js +2 -2
- package/lib/api/services/helpers/files/glb.constants.d.ts +11 -0
- package/lib/api/services/helpers/files/glb.constants.js +11 -0
- package/lib/api/services/helpers/files/glb.d.ts +1 -0
- package/lib/api/services/helpers/files/glb.js +69 -0
- package/lib/api/services/helpers/files/gzip.constants.d.ts +11 -0
- package/lib/api/services/helpers/files/gzip.constants.js +11 -0
- package/lib/api/services/helpers/files/gzip.d.ts +2 -0
- package/lib/api/services/helpers/files/gzip.js +50 -0
- package/lib/api/services/helpers/{inflate.constants.d.ts → files/inflate.constants.d.ts} +2 -0
- package/lib/api/services/helpers/{inflate.constants.js → files/inflate.constants.js} +2 -0
- package/lib/api/services/helpers/{inflate.d.ts → files/inflate.d.ts} +2 -2
- package/lib/api/services/helpers/{inflate.js → files/inflate.js} +16 -7
- package/lib/api/services/helpers/{zip.constants.d.ts → files/zip.constants.d.ts} +8 -0
- package/lib/api/services/helpers/{zip.constants.js → files/zip.constants.js} +8 -0
- package/lib/api/services/helpers/files/zip.d.ts +8 -0
- package/lib/api/services/helpers/files/zip.js +226 -0
- package/lib/api/services/helpers/geometry/arcs.d.ts +9 -0
- package/lib/api/services/helpers/{arcs.js → geometry/arcs.js} +7 -0
- package/lib/api/services/helpers/{frame-axes.d.ts → geometry/frame-axes.d.ts} +8 -5
- package/lib/api/services/helpers/{frame-axes.js → geometry/frame-axes.js} +21 -9
- package/lib/api/services/helpers/geometry/lengths.constants.d.ts +4 -0
- package/lib/api/services/helpers/geometry/lengths.constants.js +3 -0
- package/lib/api/services/helpers/geometry/lengths.d.ts +7 -0
- package/lib/api/services/helpers/geometry/lengths.js +20 -0
- package/lib/api/services/helpers/geometry/matrices.constants.d.ts +8 -0
- package/lib/api/services/helpers/geometry/matrices.constants.js +7 -0
- package/lib/api/services/helpers/geometry/matrices.d.ts +17 -0
- package/lib/api/services/helpers/{matrices.js → geometry/matrices.js} +28 -17
- package/lib/api/services/helpers/{paths.d.ts → geometry/paths.d.ts} +2 -1
- package/lib/api/services/helpers/{paths.js → geometry/paths.js} +36 -30
- package/lib/api/services/helpers/{polygons.d.ts → geometry/polygons.d.ts} +1 -1
- package/lib/api/services/helpers/geometry/polygons.js +111 -0
- package/lib/api/services/helpers/geometry/scalars.d.ts +9 -0
- package/lib/api/services/helpers/geometry/scalars.js +34 -0
- package/lib/api/services/helpers/{triangulation.js → geometry/triangulation.js} +11 -6
- package/lib/api/services/helpers/geometry/vector-grid.d.ts +12 -0
- package/lib/api/services/helpers/geometry/vector-grid.js +149 -0
- package/lib/api/services/helpers/{vectors.d.ts → geometry/vectors.d.ts} +8 -1
- package/lib/api/services/helpers/geometry/vectors.js +43 -0
- package/lib/api/services/helpers/helper-types.d.ts +77 -0
- package/lib/api/services/helpers/mesh/mesh-normals.d.ts +21 -0
- package/lib/api/services/helpers/{mesh-normals.js → mesh/mesh-normals.js} +54 -65
- package/lib/api/services/helpers/mesh/mesh-orientation.d.ts +24 -0
- package/lib/api/services/helpers/mesh/mesh-orientation.js +104 -0
- package/lib/api/services/helpers/{mesh-primitives.d.ts → mesh/mesh-primitives.d.ts} +1 -1
- package/lib/api/services/helpers/{mesh-primitives.js → mesh/mesh-primitives.js} +6 -5
- package/lib/api/services/helpers/mesh/mesh-proximity.constants.d.ts +7 -0
- package/lib/api/services/helpers/mesh/mesh-proximity.constants.js +11 -0
- package/lib/api/services/helpers/mesh/mesh-proximity.d.ts +11 -0
- package/lib/api/services/helpers/mesh/mesh-proximity.js +382 -0
- package/lib/api/services/index.d.ts +3 -0
- package/lib/api/services/index.js +3 -0
- package/lib/api/services/io.d.ts +1 -1
- package/lib/api/services/io.js +1 -1
- package/lib/api/services/line.js +2 -3
- package/lib/api/services/math.d.ts +47 -0
- package/lib/api/services/math.js +77 -10
- package/lib/api/services/mesh.d.ts +174 -2
- package/lib/api/services/mesh.js +305 -7
- package/lib/api/services/point.js +4 -10
- package/lib/api/services/polyline-types.d.ts +6 -0
- package/lib/api/services/polyline-types.js +1 -0
- package/lib/api/services/polyline.d.ts +163 -1
- package/lib/api/services/polyline.js +270 -13
- package/lib/api/services/recipes.d.ts +80 -0
- package/lib/api/services/recipes.js +107 -0
- package/lib/api/services/transforms.d.ts +74 -2
- package/lib/api/services/transforms.js +100 -3
- package/lib/api/services/vector.d.ts +4 -3
- package/lib/api/services/vector.js +14 -14
- package/lib/api/splines/ansi-splines.constants.d.ts +9 -0
- package/lib/api/splines/ansi-splines.constants.js +9 -0
- package/lib/api/splines/ansi-splines.d.ts +3 -0
- package/lib/api/splines/ansi-splines.js +28 -0
- package/lib/api/splines/din-splines.constants.d.ts +12 -0
- package/lib/api/splines/din-splines.constants.js +12 -0
- package/lib/api/splines/din-splines.d.ts +3 -0
- package/lib/api/splines/din-splines.js +38 -0
- package/lib/api/splines/spline-types.d.ts +32 -0
- package/lib/api/splines/spline-types.js +1 -0
- package/lib/api/splines/splines.constants.d.ts +1 -0
- package/lib/api/splines/splines.constants.js +1 -0
- package/lib/api/springs/spring-types.d.ts +26 -0
- package/lib/api/springs/spring-types.js +1 -0
- package/lib/api/springs/springs.constants.d.ts +9 -0
- package/lib/api/springs/springs.constants.js +9 -0
- package/lib/api/springs/springs.d.ts +2 -0
- package/lib/api/springs/springs.js +50 -0
- package/lib/api/threads/ansi-threads.constants.d.ts +6 -0
- package/lib/api/threads/ansi-threads.constants.js +27 -0
- package/lib/api/threads/ansi-threads.d.ts +4 -0
- package/lib/api/threads/ansi-threads.js +50 -0
- package/lib/api/threads/iso-threads.constants.d.ts +5 -0
- package/lib/api/threads/iso-threads.constants.js +20 -0
- package/lib/api/threads/iso-threads.d.ts +4 -0
- package/lib/api/threads/iso-threads.js +32 -0
- package/lib/api/threads/thread-profile.constants.d.ts +3 -0
- package/lib/api/threads/thread-profile.constants.js +3 -0
- package/lib/api/threads/thread-types.d.ts +66 -0
- package/lib/api/threads/thread-types.js +1 -0
- package/package.json +1 -1
- package/lib/api/recipes/index.d.ts +0 -4
- package/lib/api/recipes/index.js +0 -3
- package/lib/api/services/helpers/arcs.d.ts +0 -6
- package/lib/api/services/helpers/matrices.constants.d.ts +0 -2
- package/lib/api/services/helpers/matrices.constants.js +0 -2
- package/lib/api/services/helpers/matrices.d.ts +0 -25
- package/lib/api/services/helpers/mesh-normals.d.ts +0 -11
- package/lib/api/services/helpers/polygons.js +0 -59
- package/lib/api/services/helpers/vectors.js +0 -17
- package/lib/api/services/helpers/zip.d.ts +0 -4
- package/lib/api/services/helpers/zip.js +0 -89
- /package/lib/api/services/helpers/{nurbs.js → curves/nurbs.js} +0 -0
- /package/lib/api/services/helpers/{crc32.d.ts → files/crc32.d.ts} +0 -0
- /package/lib/api/services/helpers/{crc32.js → files/crc32.js} +0 -0
- /package/lib/api/services/helpers/{triangulation.d.ts → geometry/triangulation.d.ts} +0 -0
- /package/lib/api/services/helpers/{mesh-measures.d.ts → mesh/mesh-measures.d.ts} +0 -0
- /package/lib/api/services/helpers/{mesh-measures.js → mesh/mesh-measures.js} +0 -0
- /package/lib/api/services/helpers/{mesh-primitives.constants.d.ts → mesh/mesh-primitives.constants.d.ts} +0 -0
- /package/lib/api/services/helpers/{mesh-primitives.constants.js → mesh/mesh-primitives.constants.js} +0 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import * as Inputs from "../../../inputs";
|
|
2
|
+
import type { ChamferedWasherSizes, HexBoltSizes, HexNutSizes, SetScrewSizes, SocketHeadCapScrewSizes, WasherSizes } from "../../../fasteners/fastener-types";
|
|
3
|
+
/**
|
|
4
|
+
* The sizes of ISO metric fasteners from M1.6 to M24, with no CAD kernel needed: clearance holes,
|
|
5
|
+
* cap screws, hexagon bolts and nuts, plain washers and set screws, in the unit asked for; their
|
|
6
|
+
* threads are in `threads.iso`. `occt.parts.mechanical.fasteners.iso` builds them as solids.
|
|
7
|
+
* @beta
|
|
8
|
+
*/
|
|
9
|
+
export declare class EngineeringFastenersIso {
|
|
10
|
+
/**
|
|
11
|
+
* Gives the diameter of an ISO 273 clearance hole for a screw: close, normal or loose.
|
|
12
|
+
*
|
|
13
|
+
* Example: M6, normal -> 6.6 millimetres
|
|
14
|
+
* @param inputs - The size, the fit and the unit
|
|
15
|
+
* @returns The hole's diameter in `unit`
|
|
16
|
+
* @group holes
|
|
17
|
+
* @shortname iso clearance hole
|
|
18
|
+
* @drawable false
|
|
19
|
+
* @example
|
|
20
|
+
* ```typescript
|
|
21
|
+
* const hole = bitbybit.engineering.mechanical.fasteners.iso.clearanceHole({ size: Bit.Inputs.Engineering.isoThreadSizeEnum.m6, fit: Bit.Inputs.Engineering.clearanceFitEnum.normal });
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
clearanceHole(inputs: Inputs.Engineering.IsoClearanceHoleDto): number;
|
|
25
|
+
/**
|
|
26
|
+
* Gives the head of an ISO 4762 cap screw: its diameter and height, its hexagon recess, the
|
|
27
|
+
* threaded length and the DIN 974-1 counterbore that sinks it.
|
|
28
|
+
*
|
|
29
|
+
* The counterbore is the head's height and half a millimetre deep. Example: M5 -> head 8.5
|
|
30
|
+
* across and 5 high, a 4 mm recess, counterbore 10 across and 5.5 deep
|
|
31
|
+
* @param inputs - The size and the unit
|
|
32
|
+
* @returns The head's sizes in `unit`
|
|
33
|
+
* @group screws
|
|
34
|
+
* @shortname iso cap screw sizes
|
|
35
|
+
* @drawable false
|
|
36
|
+
* @example
|
|
37
|
+
* ```typescript
|
|
38
|
+
* const head = bitbybit.engineering.mechanical.fasteners.iso.socketHeadCapScrewSizes({ size: Bit.Inputs.Engineering.isoThreadSizeEnum.m5 });
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
socketHeadCapScrewSizes(inputs: Inputs.Engineering.IsoSizeDto): SocketHeadCapScrewSizes;
|
|
42
|
+
/**
|
|
43
|
+
* Gives the head of an ISO 4014 or 4017 hexagon bolt and how much of its length ISO 4014
|
|
44
|
+
* threads: the width across flats, the head's height and the threaded length.
|
|
45
|
+
*
|
|
46
|
+
* `length` is in `unit`. Example: M8, 40 millimetres long -> 13 across flats, a 5.3 high head, 22
|
|
47
|
+
* threaded
|
|
48
|
+
* @param inputs - The size, the length and the unit
|
|
49
|
+
* @returns The bolt's sizes in `unit`
|
|
50
|
+
* @group screws
|
|
51
|
+
* @shortname iso hex bolt sizes
|
|
52
|
+
* @drawable false
|
|
53
|
+
* @example
|
|
54
|
+
* ```typescript
|
|
55
|
+
* const bolt = bitbybit.engineering.mechanical.fasteners.iso.hexBoltSizes({ size: Bit.Inputs.Engineering.isoThreadSizeEnum.m8, length: 40 });
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
hexBoltSizes(inputs: Inputs.Engineering.IsoHexBoltSizesDto): HexBoltSizes;
|
|
59
|
+
/**
|
|
60
|
+
* Gives an ISO 4032 hexagon nut: its width across flats and its height.
|
|
61
|
+
*
|
|
62
|
+
* Example: M8 -> 13 across flats, 6.8 high, in millimetres
|
|
63
|
+
* @param inputs - The size and the unit
|
|
64
|
+
* @returns The nut's sizes in `unit`
|
|
65
|
+
* @group nuts and washers
|
|
66
|
+
* @shortname iso hex nut sizes
|
|
67
|
+
* @drawable false
|
|
68
|
+
* @example
|
|
69
|
+
* ```typescript
|
|
70
|
+
* const nut = bitbybit.engineering.mechanical.fasteners.iso.hexNutSizes({ size: Bit.Inputs.Engineering.isoThreadSizeEnum.m8 });
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
hexNutSizes(inputs: Inputs.Engineering.IsoSizeDto): HexNutSizes;
|
|
74
|
+
/**
|
|
75
|
+
* Gives an ISO 7089 plain washer: its inner and outer diameters and its thickness.
|
|
76
|
+
*
|
|
77
|
+
* Example: M8 -> 8.4 inside, 16 outside, 1.6 thick, in millimetres
|
|
78
|
+
* @param inputs - The size and the unit
|
|
79
|
+
* @returns The washer's sizes in `unit`
|
|
80
|
+
* @group nuts and washers
|
|
81
|
+
* @shortname iso washer sizes
|
|
82
|
+
* @drawable false
|
|
83
|
+
* @example
|
|
84
|
+
* ```typescript
|
|
85
|
+
* const washer = bitbybit.engineering.mechanical.fasteners.iso.washerSizes({ size: Bit.Inputs.Engineering.isoThreadSizeEnum.m8 });
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
washerSizes(inputs: Inputs.Engineering.IsoSizeDto): WasherSizes;
|
|
89
|
+
/**
|
|
90
|
+
* Gives a set screw with a hexagon recess by its size and point: the recess's size and least depth,
|
|
91
|
+
* and the point's diameter, length and angle, as ISO 4026 to 4029 give them.
|
|
92
|
+
*
|
|
93
|
+
* A short screw gets a shallower recess, a short dog and a blunter cone. Example: M5 dog -> a
|
|
94
|
+
* 2.5 mm recess and a 3.5 mm dog
|
|
95
|
+
* @param inputs - The size, the point, the length and the unit
|
|
96
|
+
* @returns The sizes in `unit` and the point's angle in degrees
|
|
97
|
+
* @group screws
|
|
98
|
+
* @shortname iso set screw sizes
|
|
99
|
+
* @drawable false
|
|
100
|
+
* @example
|
|
101
|
+
* ```typescript
|
|
102
|
+
* const grub = bitbybit.engineering.mechanical.fasteners.iso.setScrewSizes({ size: Bit.Inputs.Engineering.isoThreadSizeEnum.m5, point: Bit.Inputs.Engineering.isoSetScrewPointEnum.dog, length: 10 });
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
setScrewSizes(inputs: Inputs.Engineering.IsoSetScrewSizesDto): SetScrewSizes;
|
|
106
|
+
/**
|
|
107
|
+
* Gives an ISO 7090 washer, chamfered on the outside of one face: its inner and outer diameters,
|
|
108
|
+
* its thickness and its chamfer's height and width.
|
|
109
|
+
*
|
|
110
|
+
* It shares the ISO 7089 washer's sizes and starts at M5. Example: M8 -> 8.4 inside, 16 outside,
|
|
111
|
+
* 1.6 thick, in millimetres
|
|
112
|
+
* @param inputs - The size and the unit
|
|
113
|
+
* @returns The washer's sizes in `unit`
|
|
114
|
+
* @group nuts and washers
|
|
115
|
+
* @shortname iso chamfered washer sizes
|
|
116
|
+
* @drawable false
|
|
117
|
+
* @example
|
|
118
|
+
* ```typescript
|
|
119
|
+
* const washer = bitbybit.engineering.mechanical.fasteners.iso.chamferedWasherSizes({ size: Bit.Inputs.Engineering.isoThreadSizeEnum.m8 });
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
chamferedWasherSizes(inputs: Inputs.Engineering.IsoSizeDto): ChamferedWasherSizes;
|
|
123
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import * as Inputs from "../../../inputs";
|
|
2
|
+
import { resolveDto } from "../../../kernel-calls";
|
|
3
|
+
import { isoChamferedWasherSizes, isoClearanceHoleDiameter, isoHexBoltSizes, isoHexNutSizes, isoSetScrewSizes, isoSocketHeadCapScrewSizes, isoWasherSizes } from "../../../fasteners/iso-fasteners";
|
|
4
|
+
import { CHAMFERED_WASHER_LENGTHS } from "../../../fasteners/iso-fasteners.constants";
|
|
5
|
+
import { checkedUnitOfLength, lengthsConverted, snappedLength, tableLength } from "../../helpers/geometry/lengths";
|
|
6
|
+
import { HEX_BOLT_LENGTHS, HEX_NUT_LENGTHS, SCREW_HEAD_LENGTHS, SET_SCREW_LENGTHS, WASHER_LENGTHS } from "../../../fasteners/fasteners.constants";
|
|
7
|
+
/**
|
|
8
|
+
* The sizes of ISO metric fasteners from M1.6 to M24, with no CAD kernel needed: clearance holes,
|
|
9
|
+
* cap screws, hexagon bolts and nuts, plain washers and set screws, in the unit asked for; their
|
|
10
|
+
* threads are in `threads.iso`. `occt.parts.mechanical.fasteners.iso` builds them as solids.
|
|
11
|
+
* @beta
|
|
12
|
+
*/
|
|
13
|
+
export class EngineeringFastenersIso {
|
|
14
|
+
/**
|
|
15
|
+
* Gives the diameter of an ISO 273 clearance hole for a screw: close, normal or loose.
|
|
16
|
+
*
|
|
17
|
+
* Example: M6, normal -> 6.6 millimetres
|
|
18
|
+
* @param inputs - The size, the fit and the unit
|
|
19
|
+
* @returns The hole's diameter in `unit`
|
|
20
|
+
* @group holes
|
|
21
|
+
* @shortname iso clearance hole
|
|
22
|
+
* @drawable false
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* const hole = bitbybit.engineering.mechanical.fasteners.iso.clearanceHole({ size: Bit.Inputs.Engineering.isoThreadSizeEnum.m6, fit: Bit.Inputs.Engineering.clearanceFitEnum.normal });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
clearanceHole(inputs) {
|
|
29
|
+
const resolved = resolveDto(Inputs.Engineering.IsoClearanceHoleDto, inputs);
|
|
30
|
+
return snappedLength(isoClearanceHoleDiameter(resolved.size, resolved.fit), "mm", checkedUnitOfLength(resolved.unit, "unit"));
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Gives the head of an ISO 4762 cap screw: its diameter and height, its hexagon recess, the
|
|
34
|
+
* threaded length and the DIN 974-1 counterbore that sinks it.
|
|
35
|
+
*
|
|
36
|
+
* The counterbore is the head's height and half a millimetre deep. Example: M5 -> head 8.5
|
|
37
|
+
* across and 5 high, a 4 mm recess, counterbore 10 across and 5.5 deep
|
|
38
|
+
* @param inputs - The size and the unit
|
|
39
|
+
* @returns The head's sizes in `unit`
|
|
40
|
+
* @group screws
|
|
41
|
+
* @shortname iso cap screw sizes
|
|
42
|
+
* @drawable false
|
|
43
|
+
* @example
|
|
44
|
+
* ```typescript
|
|
45
|
+
* const head = bitbybit.engineering.mechanical.fasteners.iso.socketHeadCapScrewSizes({ size: Bit.Inputs.Engineering.isoThreadSizeEnum.m5 });
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
socketHeadCapScrewSizes(inputs) {
|
|
49
|
+
const resolved = resolveDto(Inputs.Engineering.IsoSizeDto, inputs);
|
|
50
|
+
return lengthsConverted(isoSocketHeadCapScrewSizes(resolved.size), SCREW_HEAD_LENGTHS, "mm", checkedUnitOfLength(resolved.unit, "unit"));
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Gives the head of an ISO 4014 or 4017 hexagon bolt and how much of its length ISO 4014
|
|
54
|
+
* threads: the width across flats, the head's height and the threaded length.
|
|
55
|
+
*
|
|
56
|
+
* `length` is in `unit`. Example: M8, 40 millimetres long -> 13 across flats, a 5.3 high head, 22
|
|
57
|
+
* threaded
|
|
58
|
+
* @param inputs - The size, the length and the unit
|
|
59
|
+
* @returns The bolt's sizes in `unit`
|
|
60
|
+
* @group screws
|
|
61
|
+
* @shortname iso hex bolt sizes
|
|
62
|
+
* @drawable false
|
|
63
|
+
* @example
|
|
64
|
+
* ```typescript
|
|
65
|
+
* const bolt = bitbybit.engineering.mechanical.fasteners.iso.hexBoltSizes({ size: Bit.Inputs.Engineering.isoThreadSizeEnum.m8, length: 40 });
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
hexBoltSizes(inputs) {
|
|
69
|
+
const resolved = resolveDto(Inputs.Engineering.IsoHexBoltSizesDto, inputs);
|
|
70
|
+
const unit = checkedUnitOfLength(resolved.unit, "unit");
|
|
71
|
+
return lengthsConverted(isoHexBoltSizes(resolved.size, tableLength(resolved.length, unit, "mm")), HEX_BOLT_LENGTHS, "mm", unit);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Gives an ISO 4032 hexagon nut: its width across flats and its height.
|
|
75
|
+
*
|
|
76
|
+
* Example: M8 -> 13 across flats, 6.8 high, in millimetres
|
|
77
|
+
* @param inputs - The size and the unit
|
|
78
|
+
* @returns The nut's sizes in `unit`
|
|
79
|
+
* @group nuts and washers
|
|
80
|
+
* @shortname iso hex nut sizes
|
|
81
|
+
* @drawable false
|
|
82
|
+
* @example
|
|
83
|
+
* ```typescript
|
|
84
|
+
* const nut = bitbybit.engineering.mechanical.fasteners.iso.hexNutSizes({ size: Bit.Inputs.Engineering.isoThreadSizeEnum.m8 });
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
hexNutSizes(inputs) {
|
|
88
|
+
const resolved = resolveDto(Inputs.Engineering.IsoSizeDto, inputs);
|
|
89
|
+
return lengthsConverted(isoHexNutSizes(resolved.size), HEX_NUT_LENGTHS, "mm", checkedUnitOfLength(resolved.unit, "unit"));
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Gives an ISO 7089 plain washer: its inner and outer diameters and its thickness.
|
|
93
|
+
*
|
|
94
|
+
* Example: M8 -> 8.4 inside, 16 outside, 1.6 thick, in millimetres
|
|
95
|
+
* @param inputs - The size and the unit
|
|
96
|
+
* @returns The washer's sizes in `unit`
|
|
97
|
+
* @group nuts and washers
|
|
98
|
+
* @shortname iso washer sizes
|
|
99
|
+
* @drawable false
|
|
100
|
+
* @example
|
|
101
|
+
* ```typescript
|
|
102
|
+
* const washer = bitbybit.engineering.mechanical.fasteners.iso.washerSizes({ size: Bit.Inputs.Engineering.isoThreadSizeEnum.m8 });
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
washerSizes(inputs) {
|
|
106
|
+
const resolved = resolveDto(Inputs.Engineering.IsoSizeDto, inputs);
|
|
107
|
+
return lengthsConverted(isoWasherSizes(resolved.size), WASHER_LENGTHS, "mm", checkedUnitOfLength(resolved.unit, "unit"));
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Gives a set screw with a hexagon recess by its size and point: the recess's size and least depth,
|
|
111
|
+
* and the point's diameter, length and angle, as ISO 4026 to 4029 give them.
|
|
112
|
+
*
|
|
113
|
+
* A short screw gets a shallower recess, a short dog and a blunter cone. Example: M5 dog -> a
|
|
114
|
+
* 2.5 mm recess and a 3.5 mm dog
|
|
115
|
+
* @param inputs - The size, the point, the length and the unit
|
|
116
|
+
* @returns The sizes in `unit` and the point's angle in degrees
|
|
117
|
+
* @group screws
|
|
118
|
+
* @shortname iso set screw sizes
|
|
119
|
+
* @drawable false
|
|
120
|
+
* @example
|
|
121
|
+
* ```typescript
|
|
122
|
+
* const grub = bitbybit.engineering.mechanical.fasteners.iso.setScrewSizes({ size: Bit.Inputs.Engineering.isoThreadSizeEnum.m5, point: Bit.Inputs.Engineering.isoSetScrewPointEnum.dog, length: 10 });
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
setScrewSizes(inputs) {
|
|
126
|
+
const resolved = resolveDto(Inputs.Engineering.IsoSetScrewSizesDto, inputs);
|
|
127
|
+
const unit = checkedUnitOfLength(resolved.unit, "unit");
|
|
128
|
+
const length = resolved.length === undefined ? undefined : tableLength(resolved.length, unit, "mm");
|
|
129
|
+
return lengthsConverted(isoSetScrewSizes(resolved.size, resolved.point, length), SET_SCREW_LENGTHS, "mm", unit);
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Gives an ISO 7090 washer, chamfered on the outside of one face: its inner and outer diameters,
|
|
133
|
+
* its thickness and its chamfer's height and width.
|
|
134
|
+
*
|
|
135
|
+
* It shares the ISO 7089 washer's sizes and starts at M5. Example: M8 -> 8.4 inside, 16 outside,
|
|
136
|
+
* 1.6 thick, in millimetres
|
|
137
|
+
* @param inputs - The size and the unit
|
|
138
|
+
* @returns The washer's sizes in `unit`
|
|
139
|
+
* @group nuts and washers
|
|
140
|
+
* @shortname iso chamfered washer sizes
|
|
141
|
+
* @drawable false
|
|
142
|
+
* @example
|
|
143
|
+
* ```typescript
|
|
144
|
+
* const washer = bitbybit.engineering.mechanical.fasteners.iso.chamferedWasherSizes({ size: Bit.Inputs.Engineering.isoThreadSizeEnum.m8 });
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
147
|
+
chamferedWasherSizes(inputs) {
|
|
148
|
+
const resolved = resolveDto(Inputs.Engineering.IsoSizeDto, inputs);
|
|
149
|
+
return lengthsConverted(isoChamferedWasherSizes(resolved.size), CHAMFERED_WASHER_LENGTHS, "mm", checkedUnitOfLength(resolved.unit, "unit"));
|
|
150
|
+
}
|
|
151
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EngineeringFastenersAnsi } from "./fasteners-ansi";
|
|
2
|
+
import { EngineeringFastenersIso } from "./fasteners-iso";
|
|
3
|
+
/**
|
|
4
|
+
* The sizes of fasteners by the standard that sets them, with no CAD kernel needed: `iso` holds the
|
|
5
|
+
* ISO metric clearance holes, cap screws, hexagon bolts and nuts, washers and set screws, `ansi` the
|
|
6
|
+
* ASME inch ones, each in the unit asked for. `occt.parts.mechanical.fasteners` builds the same parts as solids.
|
|
7
|
+
* @beta
|
|
8
|
+
*/
|
|
9
|
+
export declare class EngineeringFasteners {
|
|
10
|
+
readonly iso: EngineeringFastenersIso;
|
|
11
|
+
readonly ansi: EngineeringFastenersAnsi;
|
|
12
|
+
constructor();
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EngineeringFastenersAnsi } from "./fasteners-ansi";
|
|
2
|
+
import { EngineeringFastenersIso } from "./fasteners-iso";
|
|
3
|
+
/**
|
|
4
|
+
* The sizes of fasteners by the standard that sets them, with no CAD kernel needed: `iso` holds the
|
|
5
|
+
* ISO metric clearance holes, cap screws, hexagon bolts and nuts, washers and set screws, `ansi` the
|
|
6
|
+
* ASME inch ones, each in the unit asked for. `occt.parts.mechanical.fasteners` builds the same parts as solids.
|
|
7
|
+
* @beta
|
|
8
|
+
*/
|
|
9
|
+
export class EngineeringFasteners {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.iso = new EngineeringFastenersIso();
|
|
12
|
+
this.ansi = new EngineeringFastenersAnsi();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import * as Inputs from "../../../inputs";
|
|
2
|
+
import type { BevelGearSizes, GearPairSizes, GearSizes, HelicalGearSizes, InternalGearPairSizes, PlanetarySet, RackSizes } from "../../../gears/gear-types";
|
|
3
|
+
/**
|
|
4
|
+
* Involute gears by their numbers, with no CAD kernel needed: the circles of spur and ring gears,
|
|
5
|
+
* and their outlines as points on the XY plane for any kernel to extrude. `occt.parts.mechanical.gears` builds
|
|
6
|
+
* the same teeth as solids. Gears mesh when they share `module` and `pressureAngle`: two spur gears
|
|
7
|
+
* half the module times their teeth together apart, a spur gear in a ring half the module times the
|
|
8
|
+
* difference.
|
|
9
|
+
* @beta
|
|
10
|
+
*/
|
|
11
|
+
export declare class EngineeringGears {
|
|
12
|
+
/**
|
|
13
|
+
* Works out the circles of an involute spur gear: the pitch circle meshing gears roll on, the
|
|
14
|
+
* base circle its flanks unwind from, the tip and root circles, and half the angle a tooth
|
|
15
|
+
* spans at the pitch circle.
|
|
16
|
+
*
|
|
17
|
+
* Example: module 1, 20 teeth -> pitch radius 10, tip radius 11, root radius 8.75
|
|
18
|
+
* @param inputs - The teeth
|
|
19
|
+
* @returns The four radii in model units and the half tooth angle in radians
|
|
20
|
+
* @group spur
|
|
21
|
+
* @shortname spur gear sizes
|
|
22
|
+
* @drawable false
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* const pinion = bitbybit.engineering.mechanical.gears.spurGearSizes({ module: 1, teeth: 20 });
|
|
26
|
+
* const wheel = bitbybit.engineering.mechanical.gears.spurGearSizes({ module: 1, teeth: 30 });
|
|
27
|
+
* const centreDistance = pinion.pitchRadius + wheel.pitchRadius;
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
spurGearSizes(inputs: Inputs.Engineering.SpurGearSizesDto): GearSizes;
|
|
31
|
+
/**
|
|
32
|
+
* Draws the outline of an involute spur gear as points on the XY plane, a closed counterclockwise
|
|
33
|
+
* loop that does not repeat its start, ready to extrude in any kernel.
|
|
34
|
+
*
|
|
35
|
+
* The flanks follow the involute within a ten-thousandth of the module; `segments` sets the
|
|
36
|
+
* points per curve. Tips that reach only inside the base circle are refused.
|
|
37
|
+
* @param inputs - The teeth, the turn and the segments per curve
|
|
38
|
+
* @returns The points of the outline
|
|
39
|
+
* @group spur
|
|
40
|
+
* @shortname spur gear outline
|
|
41
|
+
* @drawable true
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* const outline = bitbybit.engineering.mechanical.gears.spurGearOutline({ module: 1, teeth: 20 });
|
|
45
|
+
* const gear = await bitbybit.jscad.extrusions.extrudeLinear({ geometry: await bitbybit.jscad.polygon.createFromPoints({ points: outline }), height: 5, twistAngle: 0, twistSteps: 1 });
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
spurGearOutline(inputs: Inputs.Engineering.SpurGearOutlineDto): Inputs.Base.Point3[];
|
|
49
|
+
/**
|
|
50
|
+
* Works out the circles of an involute ring gear, whose teeth point in toward its centre: the
|
|
51
|
+
* pitch and base circles, the tip circle inside them, the root circle beyond, and half the
|
|
52
|
+
* angle a tooth spans at the pitch circle.
|
|
53
|
+
*
|
|
54
|
+
* Example: module 1, 40 teeth -> pitch radius 20, tip radius 19, root radius 21.25
|
|
55
|
+
* @param inputs - The teeth
|
|
56
|
+
* @returns The four radii in model units and the half tooth angle in radians
|
|
57
|
+
* @group ring
|
|
58
|
+
* @shortname ring gear sizes
|
|
59
|
+
* @drawable false
|
|
60
|
+
* @example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* const ring = bitbybit.engineering.mechanical.gears.ringGearSizes({ module: 1, teeth: 40 });
|
|
63
|
+
* const outsideAtLeast = 2 * ring.rootRadius;
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
ringGearSizes(inputs: Inputs.Engineering.RingGearSizesDto): GearSizes;
|
|
67
|
+
/**
|
|
68
|
+
* Draws the teeth of an involute ring gear as points on the XY plane around the origin: the edge
|
|
69
|
+
* of the hole inside the ring, a closed loop counterclockwise that does not repeat its start.
|
|
70
|
+
*
|
|
71
|
+
* Cut it from a circle larger than twice the root radius to make the ring; `segments` sets how
|
|
72
|
+
* many points stand for each curve.
|
|
73
|
+
* @param inputs - The teeth, the turn and the segments per curve
|
|
74
|
+
* @returns The points of the outline
|
|
75
|
+
* @group ring
|
|
76
|
+
* @shortname ring gear outline
|
|
77
|
+
* @drawable true
|
|
78
|
+
* @example
|
|
79
|
+
* ```typescript
|
|
80
|
+
* const teeth = bitbybit.engineering.mechanical.gears.ringGearOutline({ module: 1, teeth: 40 });
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
ringGearOutline(inputs: Inputs.Engineering.RingGearOutlineDto): Inputs.Base.Point3[];
|
|
84
|
+
/**
|
|
85
|
+
* Works out the circles of an involute helical gear's section square to its axis, with that
|
|
86
|
+
* section's module and pressure angle, and how many degrees the teeth turn per model unit along
|
|
87
|
+
* the axis.
|
|
88
|
+
*
|
|
89
|
+
* Example: module 1, 20 teeth, 20 degrees -> pitch radius 10.64, twist 1.96
|
|
90
|
+
* @param inputs - The teeth and their lean
|
|
91
|
+
* @returns The radii, the half tooth angle, the transverse module and pressure angle and the twist
|
|
92
|
+
* @group helical
|
|
93
|
+
* @shortname helical gear sizes
|
|
94
|
+
* @drawable false
|
|
95
|
+
* @example
|
|
96
|
+
* ```typescript
|
|
97
|
+
* const pinion = bitbybit.engineering.mechanical.gears.helicalGearSizes({ module: 1, teeth: 20, helixAngle: 20 });
|
|
98
|
+
* const wheel = bitbybit.engineering.mechanical.gears.helicalGearSizes({ module: 1, teeth: 30, helixAngle: -20 });
|
|
99
|
+
* const centreDistance = pinion.pitchRadius + wheel.pitchRadius;
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
helicalGearSizes(inputs: Inputs.Engineering.HelicalGearSizesDto): HelicalGearSizes;
|
|
103
|
+
/**
|
|
104
|
+
* Draws a helical gear's section square to its axis as points on the XY plane around the origin, a
|
|
105
|
+
* closed loop counterclockwise that does not repeat its start.
|
|
106
|
+
*
|
|
107
|
+
* Extrude it with a twist of `twist` from `helicalGearSizes` times the height to make the gear.
|
|
108
|
+
* @param inputs - The teeth, their lean, the turn and the segments per curve
|
|
109
|
+
* @returns The points of the outline
|
|
110
|
+
* @group helical
|
|
111
|
+
* @shortname helical gear outline
|
|
112
|
+
* @drawable true
|
|
113
|
+
* @example
|
|
114
|
+
* ```typescript
|
|
115
|
+
* const sizes = bitbybit.engineering.mechanical.gears.helicalGearSizes({ module: 1, teeth: 20 });
|
|
116
|
+
* const outline = bitbybit.engineering.mechanical.gears.helicalGearOutline({ module: 1, teeth: 20 });
|
|
117
|
+
* const section = await bitbybit.jscad.polygon.createFromPoints({ points: outline });
|
|
118
|
+
* const gear = await bitbybit.jscad.extrusions.extrudeLinear({ geometry: section, height: 5, twistAngle: sizes.twist * 5, twistSteps: 10 });
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
helicalGearOutline(inputs: Inputs.Engineering.HelicalGearOutlineDto): Inputs.Base.Point3[];
|
|
122
|
+
/**
|
|
123
|
+
* Works out the cones and outer circles of a straight bevel gear meshing a mate at a shaft
|
|
124
|
+
* angle: its pitch, tip and root cones, back radii and apex distance.
|
|
125
|
+
*
|
|
126
|
+
* A tip cone of 90 degrees or more is refused.
|
|
127
|
+
* Example: module 2, 20 teeth meshing 40 at 90 degrees -> pitch cone 26.57 degrees, apex 40 away
|
|
128
|
+
* @param inputs - The teeth, the mate's teeth and the shaft angle
|
|
129
|
+
* @returns The radii and distances in model units and the cone angles in degrees
|
|
130
|
+
* @group bevel
|
|
131
|
+
* @shortname bevel gear sizes
|
|
132
|
+
* @drawable false
|
|
133
|
+
* @example
|
|
134
|
+
* ```typescript
|
|
135
|
+
* const pinion = bitbybit.engineering.mechanical.gears.bevelGearSizes({ module: 2, teeth: 20, mateTeeth: 40 });
|
|
136
|
+
* const wheel = bitbybit.engineering.mechanical.gears.bevelGearSizes({ module: 2, teeth: 40, mateTeeth: 20 });
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
bevelGearSizes(inputs: Inputs.Engineering.BevelGearSizesDto): BevelGearSizes;
|
|
140
|
+
/**
|
|
141
|
+
* Draws a straight bevel gear's teeth as points on the XY plane around the origin, as seen from
|
|
142
|
+
* the apex on the plane of the outer pitch circle, by Tredgold's approximation.
|
|
143
|
+
*
|
|
144
|
+
* The flanks run straight to the apex, so the section in a plane nearer it is this outline scaled
|
|
145
|
+
* by its distance over `apexDistance`.
|
|
146
|
+
* @param inputs - The teeth, the mate's teeth, the shaft angle, the turn and the segments per curve
|
|
147
|
+
* @returns The points of the outline
|
|
148
|
+
* @group bevel
|
|
149
|
+
* @shortname bevel gear outline
|
|
150
|
+
* @drawable true
|
|
151
|
+
* @example
|
|
152
|
+
* ```typescript
|
|
153
|
+
* const sizes = bitbybit.engineering.mechanical.gears.bevelGearSizes({ module: 1, teeth: 20, mateTeeth: 30 });
|
|
154
|
+
* const outline = bitbybit.engineering.mechanical.gears.bevelGearOutline({ module: 1, teeth: 20, mateTeeth: 30 });
|
|
155
|
+
* const section = await bitbybit.manifold.crossSection.crossSectionFromPoints({ points: outline, fillRule: Bit.Inputs.Manifold.fillRuleEnum.positive, removeDuplicates: false, tolerance: 1e-7 });
|
|
156
|
+
* const gear = await bitbybit.manifold.crossSection.operations.extrude({ crossSection: section, height: sizes.apexDistance / 4, nDivisions: 1, twistDegrees: 0, scaleTopX: 0.75, scaleTopY: 0.75, center: false });
|
|
157
|
+
* ```
|
|
158
|
+
*/
|
|
159
|
+
bevelGearOutline(inputs: Inputs.Engineering.BevelGearOutlineDto): Inputs.Base.Point3[];
|
|
160
|
+
/**
|
|
161
|
+
* Works out how two external spur gears mesh: centre distance, working pressure angle, contact
|
|
162
|
+
* ratio and ratio, profile shifts included.
|
|
163
|
+
*
|
|
164
|
+
* The contact ratio counts only involute contact, `interferes` flags tips reaching past it, and
|
|
165
|
+
* `tipShortening` and `clearance` show how shifts crowd tips into roots.
|
|
166
|
+
* Example: module 2, 20 and 30 teeth -> 50 apart, contact ratio 1.61
|
|
167
|
+
* @param inputs - The module, the teeth, the pressure angle, the tooth heights and the profile shifts
|
|
168
|
+
* @returns The centre distance, working pressure angle, contact ratio, ratio, interference, tip shortening and clearance
|
|
169
|
+
* @group pairs
|
|
170
|
+
* @shortname gear pair
|
|
171
|
+
* @drawable false
|
|
172
|
+
* @example
|
|
173
|
+
* ```typescript
|
|
174
|
+
* const pair = bitbybit.engineering.mechanical.gears.gearPair({ module: 2, teethA: 12, teethB: 20, profileShiftA: 0.5, profileShiftB: 0.5 });
|
|
175
|
+
* const sound = !pair.interferes && pair.clearance > 0 && pair.contactRatio > 1.2;
|
|
176
|
+
* ```
|
|
177
|
+
*/
|
|
178
|
+
gearPair(inputs: Inputs.Engineering.GearPairDto): GearPairSizes;
|
|
179
|
+
/**
|
|
180
|
+
* Works out a spur gear meshing inside a ring gear: centre distance, contact ratio, ratio and
|
|
181
|
+
* interference.
|
|
182
|
+
*
|
|
183
|
+
* The contact ratio counts only involute contact. `interferes` flags ring tips below the gear's
|
|
184
|
+
* base circle, or gear tips catching ring tips when the two differ by few teeth.
|
|
185
|
+
* Example: module 2, 20 teeth in 60 -> 40 apart, ratio 3
|
|
186
|
+
* @param inputs - The module, the teeth and the pressure angle
|
|
187
|
+
* @returns The centre distance, contact ratio, ratio and interference
|
|
188
|
+
* @group pairs
|
|
189
|
+
* @shortname internal gear pair
|
|
190
|
+
* @drawable false
|
|
191
|
+
* @example
|
|
192
|
+
* ```typescript
|
|
193
|
+
* const pair = bitbybit.engineering.mechanical.gears.internalGearPair({ module: 2, pinionTeeth: 24, ringTeeth: 60 });
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
196
|
+
internalGearPair(inputs: Inputs.Engineering.InternalGearPairDto): InternalGearPairSizes;
|
|
197
|
+
/**
|
|
198
|
+
* Lays out a planetary gear set around a sun at rotation 0: the ring's teeth, where the planets
|
|
199
|
+
* sit, how far each planet and the ring turn to mesh, the ratio with the ring held, and whether
|
|
200
|
+
* the planets mesh, keep clear of each other and interfere.
|
|
201
|
+
*
|
|
202
|
+
* They mesh when the sun's and ring's teeth together divide by the planets.
|
|
203
|
+
* @param inputs - The module, the sun's and a planet's teeth, the planets and the pressure angle
|
|
204
|
+
* @returns The layout and its checks
|
|
205
|
+
* @group planetary
|
|
206
|
+
* @shortname planetary set
|
|
207
|
+
* @drawable false
|
|
208
|
+
* @example
|
|
209
|
+
* ```typescript
|
|
210
|
+
* const set = bitbybit.engineering.mechanical.gears.planetarySet({ module: 1, sunTeeth: 24, planetTeeth: 24, planets: 4 });
|
|
211
|
+
* const ringTeeth = set.ringTeeth;
|
|
212
|
+
* ```
|
|
213
|
+
*/
|
|
214
|
+
planetarySet(inputs: Inputs.Engineering.PlanetarySetDto): PlanetarySet;
|
|
215
|
+
/**
|
|
216
|
+
* Works out the lines of an involute rack: its pitch, its length, how far its tips stand above
|
|
217
|
+
* the pitch line, how deep its gaps reach below it and how thick each tooth is on it.
|
|
218
|
+
*
|
|
219
|
+
* Example: module 2, 10 teeth -> pitch 6.28, 62.8 long
|
|
220
|
+
* @param inputs - The teeth and the height
|
|
221
|
+
* @returns The sizes in model units
|
|
222
|
+
* @group racks
|
|
223
|
+
* @shortname rack sizes
|
|
224
|
+
* @drawable false
|
|
225
|
+
* @example
|
|
226
|
+
* ```typescript
|
|
227
|
+
* const rack = bitbybit.engineering.mechanical.gears.rackSizes({ module: 2, teeth: 10, height: 6 });
|
|
228
|
+
* ```
|
|
229
|
+
*/
|
|
230
|
+
rackSizes(inputs: Inputs.Engineering.RackSizesDto): RackSizes;
|
|
231
|
+
/**
|
|
232
|
+
* Draws an involute rack's outline as points on the XY plane, a closed counterclockwise loop not
|
|
233
|
+
* repeating its start: pitch line on the x axis, teeth along +y, the first tooth's middle on the
|
|
234
|
+
* origin.
|
|
235
|
+
*
|
|
236
|
+
* A spur gear of the same module meshes with its centre its pitch radius, plus its profile shift
|
|
237
|
+
* times the module, above the pitch line.
|
|
238
|
+
* @param inputs - The teeth, the height and the segments per curve
|
|
239
|
+
* @returns The points of the outline
|
|
240
|
+
* @group racks
|
|
241
|
+
* @shortname rack outline
|
|
242
|
+
* @drawable true
|
|
243
|
+
* @example
|
|
244
|
+
* ```typescript
|
|
245
|
+
* const outline = bitbybit.engineering.mechanical.gears.rackOutline({ module: 2, teeth: 10, height: 6 });
|
|
246
|
+
* ```
|
|
247
|
+
*/
|
|
248
|
+
rackOutline(inputs: Inputs.Engineering.RackOutlineDto): Inputs.Base.Point3[];
|
|
249
|
+
/**
|
|
250
|
+
* Gives the module of an inch gear from its diametral pitch, in the model's unit, so the gear
|
|
251
|
+
* methods can size it.
|
|
252
|
+
*
|
|
253
|
+
* The module is the pitch diameter over the teeth, the inverse of the diametral pitch: 1 / DP
|
|
254
|
+
* inches, or 25.4 / DP millimetres. Example: 10 DP -> 0.1 inches, or 2.54 millimetres
|
|
255
|
+
* @param inputs - The diametral pitch and the unit
|
|
256
|
+
* @returns The module in `unit`
|
|
257
|
+
* @group spur
|
|
258
|
+
* @shortname module from diametral pitch
|
|
259
|
+
* @drawable false
|
|
260
|
+
* @example
|
|
261
|
+
* ```typescript
|
|
262
|
+
* const gearModule = bitbybit.engineering.mechanical.gears.moduleFromDiametralPitch({ diametralPitch: 12, unit: Bit.Inputs.Base.unitOfLengthEnum.inch });
|
|
263
|
+
* const pinion = bitbybit.engineering.mechanical.gears.spurGearSizes({ module: gearModule, teeth: 24 });
|
|
264
|
+
* ```
|
|
265
|
+
*/
|
|
266
|
+
moduleFromDiametralPitch(inputs: Inputs.Engineering.ModuleFromDiametralPitchDto): number;
|
|
267
|
+
}
|