@bitbybit-dev/base 1.5.0-rc.0 → 1.6.0-rc.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 +52 -0
- package/lib/api/services/helpers/{inflate.constants.d.ts → files/inflate.constants.d.ts} +1 -0
- package/lib/api/services/helpers/{inflate.constants.js → files/inflate.constants.js} +1 -0
- package/lib/api/services/helpers/{inflate.d.ts → files/inflate.d.ts} +1 -1
- package/lib/api/services/helpers/{inflate.js → files/inflate.js} +5 -4
- package/lib/api/services/helpers/{zip.d.ts → files/zip.d.ts} +1 -1
- 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 +57 -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/{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/{zip.constants.d.ts → files/zip.constants.d.ts} +0 -0
- /package/lib/api/services/helpers/{zip.constants.js → files/zip.constants.js} +0 -0
- /package/lib/api/services/helpers/{zip.js → files/zip.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,15 @@
|
|
|
1
|
+
import { EngineeringKnurlsDin } from "./knurls-din";
|
|
2
|
+
import { EngineeringKnurlsAnsi } from "./knurls-ansi";
|
|
3
|
+
/**
|
|
4
|
+
* The grooves of knurls on a cylinder by the standard that sets them, with no CAD kernel needed:
|
|
5
|
+
* `din` holds the metric DIN 82 knurls, `ansi` the ASME B94.6 diametral pitch ones, each in the unit
|
|
6
|
+
* asked for. `occt.parts.mechanical.machining`
|
|
7
|
+
* cuts them into a body.
|
|
8
|
+
* @beta
|
|
9
|
+
*/
|
|
10
|
+
export class EngineeringKnurls {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.din = new EngineeringKnurlsDin();
|
|
13
|
+
this.ansi = new EngineeringKnurlsAnsi();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { EngineeringFasteners } from "./fasteners";
|
|
2
|
+
import { EngineeringGears } from "./gears";
|
|
3
|
+
import { EngineeringBearings } from "./bearings";
|
|
4
|
+
import { EngineeringKeys } from "./keys";
|
|
5
|
+
import { EngineeringKnurls } from "./knurls";
|
|
6
|
+
import { EngineeringRetainingRings } from "./retaining-rings";
|
|
7
|
+
import { EngineeringSplines } from "./splines";
|
|
8
|
+
import { EngineeringSprings } from "./springs";
|
|
9
|
+
import { EngineeringThreads } from "./threads";
|
|
10
|
+
/**
|
|
11
|
+
* Mechanical engineering by its numbers: the sizes and outlines of involute gears and racks, and
|
|
12
|
+
* the threads, fasteners, ball bearings, parallel keys, retaining rings, splines and knurls of each
|
|
13
|
+
* standard, with compression springs, for any kernel to build from. Each family holds one member per
|
|
14
|
+
* standard, such as `iso` or `din`, whose sizes come in the `unit` asked for; gears and springs are
|
|
15
|
+
* in model units. `occt.parts.mechanical` builds the same parts as solids with named faces.
|
|
16
|
+
* @beta
|
|
17
|
+
*/
|
|
18
|
+
export declare class EngineeringMechanical {
|
|
19
|
+
readonly gears: EngineeringGears;
|
|
20
|
+
readonly threads: EngineeringThreads;
|
|
21
|
+
readonly fasteners: EngineeringFasteners;
|
|
22
|
+
readonly bearings: EngineeringBearings;
|
|
23
|
+
readonly keys: EngineeringKeys;
|
|
24
|
+
readonly retainingRings: EngineeringRetainingRings;
|
|
25
|
+
readonly splines: EngineeringSplines;
|
|
26
|
+
readonly knurls: EngineeringKnurls;
|
|
27
|
+
readonly springs: EngineeringSprings;
|
|
28
|
+
constructor();
|
|
29
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { EngineeringFasteners } from "./fasteners";
|
|
2
|
+
import { EngineeringGears } from "./gears";
|
|
3
|
+
import { EngineeringBearings } from "./bearings";
|
|
4
|
+
import { EngineeringKeys } from "./keys";
|
|
5
|
+
import { EngineeringKnurls } from "./knurls";
|
|
6
|
+
import { EngineeringRetainingRings } from "./retaining-rings";
|
|
7
|
+
import { EngineeringSplines } from "./splines";
|
|
8
|
+
import { EngineeringSprings } from "./springs";
|
|
9
|
+
import { EngineeringThreads } from "./threads";
|
|
10
|
+
/**
|
|
11
|
+
* Mechanical engineering by its numbers: the sizes and outlines of involute gears and racks, and
|
|
12
|
+
* the threads, fasteners, ball bearings, parallel keys, retaining rings, splines and knurls of each
|
|
13
|
+
* standard, with compression springs, for any kernel to build from. Each family holds one member per
|
|
14
|
+
* standard, such as `iso` or `din`, whose sizes come in the `unit` asked for; gears and springs are
|
|
15
|
+
* in model units. `occt.parts.mechanical` builds the same parts as solids with named faces.
|
|
16
|
+
* @beta
|
|
17
|
+
*/
|
|
18
|
+
export class EngineeringMechanical {
|
|
19
|
+
constructor() {
|
|
20
|
+
this.gears = new EngineeringGears();
|
|
21
|
+
this.threads = new EngineeringThreads();
|
|
22
|
+
this.fasteners = new EngineeringFasteners();
|
|
23
|
+
this.bearings = new EngineeringBearings();
|
|
24
|
+
this.keys = new EngineeringKeys();
|
|
25
|
+
this.retainingRings = new EngineeringRetainingRings();
|
|
26
|
+
this.splines = new EngineeringSplines();
|
|
27
|
+
this.knurls = new EngineeringKnurls();
|
|
28
|
+
this.springs = new EngineeringSprings();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as Inputs from "../../../inputs";
|
|
2
|
+
import type { RetainingRingSizes } from "../../../retaining-rings/retaining-ring-types";
|
|
3
|
+
/**
|
|
4
|
+
* The sizes of inch tapered retaining rings, external for shafts and internal for bores, with their
|
|
5
|
+
* grooves, with no CAD kernel needed, in the unit asked for: the series interchangeable with MS16624
|
|
6
|
+
* and MS16625. `occt.parts.mechanical.retainingRings.ansi` builds the rings as solids.
|
|
7
|
+
* @beta
|
|
8
|
+
*/
|
|
9
|
+
export declare class EngineeringRetainingRingsAnsi {
|
|
10
|
+
/**
|
|
11
|
+
* Gives the inch ring for a shaft or a bore, with its groove: the ring's thickness, free diameter,
|
|
12
|
+
* lugs and lug holes, and the groove's diameter, width and least distance from the end.
|
|
13
|
+
*
|
|
14
|
+
* A diameter within a thousandth of an inch of a listed one takes it. Example: a 3/4 shaft -> a
|
|
15
|
+
* groove 0.704 across
|
|
16
|
+
* @param inputs - Shaft or bore, its diameter and the unit
|
|
17
|
+
* @returns The ring's and the groove's sizes in `unit`
|
|
18
|
+
* @group circlips
|
|
19
|
+
* @shortname ansi retaining ring sizes
|
|
20
|
+
* @drawable false
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* const clip = bitbybit.engineering.mechanical.retainingRings.ansi.retainingRingSizes({ kind: Bit.Inputs.Engineering.retainingRingKindEnum.shaft, diameter: 0.75 });
|
|
24
|
+
* const groove = clip.grooveDiameter;
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
retainingRingSizes(inputs: Inputs.Engineering.AnsiRetainingRingSizesDto): RetainingRingSizes;
|
|
28
|
+
/**
|
|
29
|
+
* Lists the shaft or bore diameters the inch rings come for.
|
|
30
|
+
*
|
|
31
|
+
* Example: shaft -> 0.125, 0.156, 0.188 and on up to 2, in inches
|
|
32
|
+
* @param inputs - Shaft or bore, and the unit
|
|
33
|
+
* @returns The diameters in `unit`, smallest first
|
|
34
|
+
* @group circlips
|
|
35
|
+
* @shortname ansi retaining ring diameters
|
|
36
|
+
* @drawable false
|
|
37
|
+
* @example
|
|
38
|
+
* ```typescript
|
|
39
|
+
* const sizes = bitbybit.engineering.mechanical.retainingRings.ansi.diameters({ kind: Bit.Inputs.Engineering.retainingRingKindEnum.bore });
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
diameters(inputs: Inputs.Engineering.AnsiRetainingRingDiametersDto): number[];
|
|
43
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as Inputs from "../../../inputs";
|
|
2
|
+
import { resolveDto } from "../../../kernel-calls";
|
|
3
|
+
import { ansiRetainingRingDiameters, ansiRetainingRingSizes } from "../../../retaining-rings/ansi-retaining-rings";
|
|
4
|
+
import { checkedUnitOfLength } from "../../helpers/geometry/lengths";
|
|
5
|
+
/**
|
|
6
|
+
* The sizes of inch tapered retaining rings, external for shafts and internal for bores, with their
|
|
7
|
+
* grooves, with no CAD kernel needed, in the unit asked for: the series interchangeable with MS16624
|
|
8
|
+
* and MS16625. `occt.parts.mechanical.retainingRings.ansi` builds the rings as solids.
|
|
9
|
+
* @beta
|
|
10
|
+
*/
|
|
11
|
+
export class EngineeringRetainingRingsAnsi {
|
|
12
|
+
/**
|
|
13
|
+
* Gives the inch ring for a shaft or a bore, with its groove: the ring's thickness, free diameter,
|
|
14
|
+
* lugs and lug holes, and the groove's diameter, width and least distance from the end.
|
|
15
|
+
*
|
|
16
|
+
* A diameter within a thousandth of an inch of a listed one takes it. Example: a 3/4 shaft -> a
|
|
17
|
+
* groove 0.704 across
|
|
18
|
+
* @param inputs - Shaft or bore, its diameter and the unit
|
|
19
|
+
* @returns The ring's and the groove's sizes in `unit`
|
|
20
|
+
* @group circlips
|
|
21
|
+
* @shortname ansi retaining ring sizes
|
|
22
|
+
* @drawable false
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* const clip = bitbybit.engineering.mechanical.retainingRings.ansi.retainingRingSizes({ kind: Bit.Inputs.Engineering.retainingRingKindEnum.shaft, diameter: 0.75 });
|
|
26
|
+
* const groove = clip.grooveDiameter;
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
retainingRingSizes(inputs) {
|
|
30
|
+
const resolved = resolveDto(Inputs.Engineering.AnsiRetainingRingSizesDto, inputs);
|
|
31
|
+
return ansiRetainingRingSizes(resolved.kind, resolved.diameter, checkedUnitOfLength(resolved.unit, "unit"));
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Lists the shaft or bore diameters the inch rings come for.
|
|
35
|
+
*
|
|
36
|
+
* Example: shaft -> 0.125, 0.156, 0.188 and on up to 2, in inches
|
|
37
|
+
* @param inputs - Shaft or bore, and the unit
|
|
38
|
+
* @returns The diameters in `unit`, smallest first
|
|
39
|
+
* @group circlips
|
|
40
|
+
* @shortname ansi retaining ring diameters
|
|
41
|
+
* @drawable false
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* const sizes = bitbybit.engineering.mechanical.retainingRings.ansi.diameters({ kind: Bit.Inputs.Engineering.retainingRingKindEnum.bore });
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
diameters(inputs) {
|
|
48
|
+
const resolved = resolveDto(Inputs.Engineering.AnsiRetainingRingDiametersDto, inputs);
|
|
49
|
+
return ansiRetainingRingDiameters(resolved.kind, checkedUnitOfLength(resolved.unit, "unit"));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as Inputs from "../../../inputs";
|
|
2
|
+
import type { RetainingRingSizes } from "../../../retaining-rings/retaining-ring-types";
|
|
3
|
+
/**
|
|
4
|
+
* The sizes of DIN 471 retaining rings for shafts and DIN 472 rings for bores, with their grooves,
|
|
5
|
+
* with no CAD kernel needed, in the unit asked for. `occt.parts.mechanical.retainingRings.din`
|
|
6
|
+
* builds the rings as solids.
|
|
7
|
+
* @beta
|
|
8
|
+
*/
|
|
9
|
+
export declare class EngineeringRetainingRingsDin {
|
|
10
|
+
/**
|
|
11
|
+
* Gives the DIN 471 ring for a shaft or the DIN 472 ring for a bore, with its groove: the
|
|
12
|
+
* ring's thickness, free diameter, lugs and lug holes, and the groove's diameter, width and
|
|
13
|
+
* least distance from the end.
|
|
14
|
+
*
|
|
15
|
+
* Example: a 20 mm shaft -> a 1.2 thick ring in a groove 19 across and 1.3 wide
|
|
16
|
+
* @param inputs - Shaft or bore, its diameter and the unit
|
|
17
|
+
* @returns The ring's and the groove's sizes in `unit`
|
|
18
|
+
* @group circlips
|
|
19
|
+
* @shortname din retaining ring sizes
|
|
20
|
+
* @drawable false
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* const clip = bitbybit.engineering.mechanical.retainingRings.din.retainingRingSizes({ kind: Bit.Inputs.Engineering.retainingRingKindEnum.shaft, diameter: 20 });
|
|
24
|
+
* const groove = clip.grooveDiameter;
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
retainingRingSizes(inputs: Inputs.Engineering.DinRetainingRingSizesDto): RetainingRingSizes;
|
|
28
|
+
/**
|
|
29
|
+
* Lists the shaft or bore diameters DIN 471 or DIN 472 gives a ring for.
|
|
30
|
+
*
|
|
31
|
+
* Example: shaft -> 3, 4, 5 and on up to 100, in millimetres
|
|
32
|
+
* @param inputs - Shaft or bore, and the unit
|
|
33
|
+
* @returns The diameters in `unit`, smallest first
|
|
34
|
+
* @group circlips
|
|
35
|
+
* @shortname din retaining ring diameters
|
|
36
|
+
* @drawable false
|
|
37
|
+
* @example
|
|
38
|
+
* ```typescript
|
|
39
|
+
* const sizes = bitbybit.engineering.mechanical.retainingRings.din.diameters({ kind: Bit.Inputs.Engineering.retainingRingKindEnum.bore });
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
diameters(inputs: Inputs.Engineering.DinRetainingRingDiametersDto): number[];
|
|
43
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as Inputs from "../../../inputs";
|
|
2
|
+
import { resolveDto } from "../../../kernel-calls";
|
|
3
|
+
import { dinRetainingRingDiameters, dinRetainingRingSizes } from "../../../retaining-rings/din-retaining-rings";
|
|
4
|
+
import { checkedUnitOfLength } from "../../helpers/geometry/lengths";
|
|
5
|
+
/**
|
|
6
|
+
* The sizes of DIN 471 retaining rings for shafts and DIN 472 rings for bores, with their grooves,
|
|
7
|
+
* with no CAD kernel needed, in the unit asked for. `occt.parts.mechanical.retainingRings.din`
|
|
8
|
+
* builds the rings as solids.
|
|
9
|
+
* @beta
|
|
10
|
+
*/
|
|
11
|
+
export class EngineeringRetainingRingsDin {
|
|
12
|
+
/**
|
|
13
|
+
* Gives the DIN 471 ring for a shaft or the DIN 472 ring for a bore, with its groove: the
|
|
14
|
+
* ring's thickness, free diameter, lugs and lug holes, and the groove's diameter, width and
|
|
15
|
+
* least distance from the end.
|
|
16
|
+
*
|
|
17
|
+
* Example: a 20 mm shaft -> a 1.2 thick ring in a groove 19 across and 1.3 wide
|
|
18
|
+
* @param inputs - Shaft or bore, its diameter and the unit
|
|
19
|
+
* @returns The ring's and the groove's sizes in `unit`
|
|
20
|
+
* @group circlips
|
|
21
|
+
* @shortname din retaining ring sizes
|
|
22
|
+
* @drawable false
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* const clip = bitbybit.engineering.mechanical.retainingRings.din.retainingRingSizes({ kind: Bit.Inputs.Engineering.retainingRingKindEnum.shaft, diameter: 20 });
|
|
26
|
+
* const groove = clip.grooveDiameter;
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
retainingRingSizes(inputs) {
|
|
30
|
+
const resolved = resolveDto(Inputs.Engineering.DinRetainingRingSizesDto, inputs);
|
|
31
|
+
return dinRetainingRingSizes(resolved.kind, resolved.diameter, checkedUnitOfLength(resolved.unit, "unit"));
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Lists the shaft or bore diameters DIN 471 or DIN 472 gives a ring for.
|
|
35
|
+
*
|
|
36
|
+
* Example: shaft -> 3, 4, 5 and on up to 100, in millimetres
|
|
37
|
+
* @param inputs - Shaft or bore, and the unit
|
|
38
|
+
* @returns The diameters in `unit`, smallest first
|
|
39
|
+
* @group circlips
|
|
40
|
+
* @shortname din retaining ring diameters
|
|
41
|
+
* @drawable false
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* const sizes = bitbybit.engineering.mechanical.retainingRings.din.diameters({ kind: Bit.Inputs.Engineering.retainingRingKindEnum.bore });
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
diameters(inputs) {
|
|
48
|
+
const resolved = resolveDto(Inputs.Engineering.DinRetainingRingDiametersDto, inputs);
|
|
49
|
+
return dinRetainingRingDiameters(resolved.kind, checkedUnitOfLength(resolved.unit, "unit"));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EngineeringRetainingRingsDin } from "./retaining-rings-din";
|
|
2
|
+
import { EngineeringRetainingRingsAnsi } from "./retaining-rings-ansi";
|
|
3
|
+
/**
|
|
4
|
+
* The sizes of retaining rings and their grooves by the standard that sets them, with no CAD kernel
|
|
5
|
+
* needed: `din` holds the metric DIN 471 rings for shafts and DIN 472 rings for bores, `ansi` the inch
|
|
6
|
+
* tapered rings, each in the unit asked for. `occt.parts.mechanical.retainingRings` builds the rings as solids.
|
|
7
|
+
* @beta
|
|
8
|
+
*/
|
|
9
|
+
export declare class EngineeringRetainingRings {
|
|
10
|
+
readonly din: EngineeringRetainingRingsDin;
|
|
11
|
+
readonly ansi: EngineeringRetainingRingsAnsi;
|
|
12
|
+
constructor();
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EngineeringRetainingRingsDin } from "./retaining-rings-din";
|
|
2
|
+
import { EngineeringRetainingRingsAnsi } from "./retaining-rings-ansi";
|
|
3
|
+
/**
|
|
4
|
+
* The sizes of retaining rings and their grooves by the standard that sets them, with no CAD kernel
|
|
5
|
+
* needed: `din` holds the metric DIN 471 rings for shafts and DIN 472 rings for bores, `ansi` the inch
|
|
6
|
+
* tapered rings, each in the unit asked for. `occt.parts.mechanical.retainingRings` builds the rings as solids.
|
|
7
|
+
* @beta
|
|
8
|
+
*/
|
|
9
|
+
export class EngineeringRetainingRings {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.din = new EngineeringRetainingRingsDin();
|
|
12
|
+
this.ansi = new EngineeringRetainingRingsAnsi();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as Inputs from "../../../inputs";
|
|
2
|
+
import type { InvoluteSplineSizes } from "../../../splines/spline-types";
|
|
3
|
+
/**
|
|
4
|
+
* The sizes of ANSI B92.1 involute splines, 30 degree flat root side fit, with no CAD kernel needed,
|
|
5
|
+
* in the unit asked for. `occt.parts.mechanical.machining.ansi` builds a splined shaft and cuts the
|
|
6
|
+
* hub to fit it.
|
|
7
|
+
* @beta
|
|
8
|
+
*/
|
|
9
|
+
export declare class EngineeringSplinesAnsi {
|
|
10
|
+
/**
|
|
11
|
+
* Works out an ANSI B92.1 involute spline from its teeth and pitch: its pitch diameter and module,
|
|
12
|
+
* and the major and minor diameters of the shaft and the hub.
|
|
13
|
+
*
|
|
14
|
+
* The teeth are unshifted, the pitch diameter the teeth over the pitch. Example: 24 teeth of 16/32
|
|
15
|
+
* -> 1.5 pitch diameter, shaft 1.5625 across its tips, hub 1.4375 across its own
|
|
16
|
+
* @param inputs - The teeth, the pitch and the unit
|
|
17
|
+
* @returns The spline's sizes in `unit`
|
|
18
|
+
* @group involute
|
|
19
|
+
* @shortname ansi involute spline sizes
|
|
20
|
+
* @drawable false
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* const spline = bitbybit.engineering.mechanical.splines.ansi.involuteSplineSizes({ teeth: 24, pitch: Bit.Inputs.Engineering.ansiSplinePitchEnum.p16_32 });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
involuteSplineSizes(inputs: Inputs.Engineering.AnsiInvoluteSplineSizesDto): InvoluteSplineSizes;
|
|
27
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as Inputs from "../../../inputs";
|
|
2
|
+
import { resolveDto } from "../../../kernel-calls";
|
|
3
|
+
import { ansiInvoluteSplineSizes } from "../../../splines/ansi-splines";
|
|
4
|
+
import { checkedUnitOfLength } from "../../helpers/geometry/lengths";
|
|
5
|
+
/**
|
|
6
|
+
* The sizes of ANSI B92.1 involute splines, 30 degree flat root side fit, with no CAD kernel needed,
|
|
7
|
+
* in the unit asked for. `occt.parts.mechanical.machining.ansi` builds a splined shaft and cuts the
|
|
8
|
+
* hub to fit it.
|
|
9
|
+
* @beta
|
|
10
|
+
*/
|
|
11
|
+
export class EngineeringSplinesAnsi {
|
|
12
|
+
/**
|
|
13
|
+
* Works out an ANSI B92.1 involute spline from its teeth and pitch: its pitch diameter and module,
|
|
14
|
+
* and the major and minor diameters of the shaft and the hub.
|
|
15
|
+
*
|
|
16
|
+
* The teeth are unshifted, the pitch diameter the teeth over the pitch. Example: 24 teeth of 16/32
|
|
17
|
+
* -> 1.5 pitch diameter, shaft 1.5625 across its tips, hub 1.4375 across its own
|
|
18
|
+
* @param inputs - The teeth, the pitch and the unit
|
|
19
|
+
* @returns The spline's sizes in `unit`
|
|
20
|
+
* @group involute
|
|
21
|
+
* @shortname ansi involute spline sizes
|
|
22
|
+
* @drawable false
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* const spline = bitbybit.engineering.mechanical.splines.ansi.involuteSplineSizes({ teeth: 24, pitch: Bit.Inputs.Engineering.ansiSplinePitchEnum.p16_32 });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
involuteSplineSizes(inputs) {
|
|
29
|
+
const resolved = resolveDto(Inputs.Engineering.AnsiInvoluteSplineSizesDto, inputs);
|
|
30
|
+
return ansiInvoluteSplineSizes(resolved.teeth, resolved.pitch, checkedUnitOfLength(resolved.unit, "unit"));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as Inputs from "../../../inputs";
|
|
2
|
+
import type { InvoluteSplineSizes } from "../../../splines/spline-types";
|
|
3
|
+
/**
|
|
4
|
+
* The sizes of DIN 5480 involute splines, with no CAD kernel needed, in the unit asked for.
|
|
5
|
+
* `occt.parts.mechanical.machining.din` builds a splined shaft and cuts the hub to fit it.
|
|
6
|
+
* @beta
|
|
7
|
+
*/
|
|
8
|
+
export declare class EngineeringSplinesDin {
|
|
9
|
+
/**
|
|
10
|
+
* Works out a DIN 5480 involute spline from its reference diameter and module: its teeth,
|
|
11
|
+
* profile shift, and the shaft's and the hub's tip and root diameters.
|
|
12
|
+
*
|
|
13
|
+
* Both inputs are in millimetres, as the standard names them; the sizes come back in `unit`.
|
|
14
|
+
* Example: 25 by 1.25 -> 18 teeth, shaft tips 24.75 across, hub tips 22.5
|
|
15
|
+
* @param inputs - The reference diameter, the module and the unit
|
|
16
|
+
* @returns The spline's sizes in `unit`
|
|
17
|
+
* @group involute
|
|
18
|
+
* @shortname din involute spline sizes
|
|
19
|
+
* @drawable false
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* const spline = bitbybit.engineering.mechanical.splines.din.involuteSplineSizes({ referenceDiameter: 25, module: 1.25 });
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
involuteSplineSizes(inputs: Inputs.Engineering.DinInvoluteSplineSizesDto): InvoluteSplineSizes;
|
|
26
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as Inputs from "../../../inputs";
|
|
2
|
+
import { resolveDto } from "../../../kernel-calls";
|
|
3
|
+
import { dinInvoluteSplineSizes } from "../../../splines/din-splines";
|
|
4
|
+
import { checkedUnitOfLength } from "../../helpers/geometry/lengths";
|
|
5
|
+
/**
|
|
6
|
+
* The sizes of DIN 5480 involute splines, with no CAD kernel needed, in the unit asked for.
|
|
7
|
+
* `occt.parts.mechanical.machining.din` builds a splined shaft and cuts the hub to fit it.
|
|
8
|
+
* @beta
|
|
9
|
+
*/
|
|
10
|
+
export class EngineeringSplinesDin {
|
|
11
|
+
/**
|
|
12
|
+
* Works out a DIN 5480 involute spline from its reference diameter and module: its teeth,
|
|
13
|
+
* profile shift, and the shaft's and the hub's tip and root diameters.
|
|
14
|
+
*
|
|
15
|
+
* Both inputs are in millimetres, as the standard names them; the sizes come back in `unit`.
|
|
16
|
+
* Example: 25 by 1.25 -> 18 teeth, shaft tips 24.75 across, hub tips 22.5
|
|
17
|
+
* @param inputs - The reference diameter, the module and the unit
|
|
18
|
+
* @returns The spline's sizes in `unit`
|
|
19
|
+
* @group involute
|
|
20
|
+
* @shortname din involute spline sizes
|
|
21
|
+
* @drawable false
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* const spline = bitbybit.engineering.mechanical.splines.din.involuteSplineSizes({ referenceDiameter: 25, module: 1.25 });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
involuteSplineSizes(inputs) {
|
|
28
|
+
const resolved = resolveDto(Inputs.Engineering.DinInvoluteSplineSizesDto, inputs);
|
|
29
|
+
return dinInvoluteSplineSizes(resolved.referenceDiameter, resolved.module, checkedUnitOfLength(resolved.unit, "unit"));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EngineeringSplinesDin } from "./splines-din";
|
|
2
|
+
import { EngineeringSplinesAnsi } from "./splines-ansi";
|
|
3
|
+
/**
|
|
4
|
+
* The sizes of involute splines by the standard that sets them, with no CAD kernel needed: `din`
|
|
5
|
+
* holds the metric DIN 5480 splines, `ansi` the ANSI B92.1 inch splines, each in the unit asked for. `occt.parts.mechanical.machining` builds
|
|
6
|
+
* a splined shaft and cuts the hub to fit it.
|
|
7
|
+
* @beta
|
|
8
|
+
*/
|
|
9
|
+
export declare class EngineeringSplines {
|
|
10
|
+
readonly din: EngineeringSplinesDin;
|
|
11
|
+
readonly ansi: EngineeringSplinesAnsi;
|
|
12
|
+
constructor();
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EngineeringSplinesDin } from "./splines-din";
|
|
2
|
+
import { EngineeringSplinesAnsi } from "./splines-ansi";
|
|
3
|
+
/**
|
|
4
|
+
* The sizes of involute splines by the standard that sets them, with no CAD kernel needed: `din`
|
|
5
|
+
* holds the metric DIN 5480 splines, `ansi` the ANSI B92.1 inch splines, each in the unit asked for. `occt.parts.mechanical.machining` builds
|
|
6
|
+
* a splined shaft and cuts the hub to fit it.
|
|
7
|
+
* @beta
|
|
8
|
+
*/
|
|
9
|
+
export class EngineeringSplines {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.din = new EngineeringSplinesDin();
|
|
12
|
+
this.ansi = new EngineeringSplinesAnsi();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as Inputs from "../../../inputs";
|
|
2
|
+
import type { CompressionSpringPath } from "../../../springs/spring-types";
|
|
3
|
+
/**
|
|
4
|
+
* Compression springs with closed and ground ends, with no CAD kernel needed: the path of the wire's
|
|
5
|
+
* centre, its pitch and its solid length. `occt.parts.mechanical.springs` sweeps the wire into a solid.
|
|
6
|
+
* @beta
|
|
7
|
+
*/
|
|
8
|
+
export declare class EngineeringSprings {
|
|
9
|
+
/**
|
|
10
|
+
* Works out the centre line of a compression spring's wire up +Z, with a closed coil at each
|
|
11
|
+
* end, the active coils' pitch and the solid length, where every coil touches the next.
|
|
12
|
+
*
|
|
13
|
+
* The wire runs three quarters of a coil past 0 and `length`: sweep it along the points, then
|
|
14
|
+
* cut it flat at both.
|
|
15
|
+
* @param inputs - The wire, the coils and the length
|
|
16
|
+
* @returns The centre line's points, the pitch and the solid length
|
|
17
|
+
* @group compression
|
|
18
|
+
* @shortname compression spring path
|
|
19
|
+
* @drawable false
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* const spring = bitbybit.engineering.mechanical.springs.compressionSpringPath({ wireDiameter: 0.2, diameter: 2, activeCoils: 6, length: 4 });
|
|
23
|
+
* const wire = spring.points;
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
compressionSpringPath(inputs: Inputs.Engineering.CompressionSpringPathDto): CompressionSpringPath;
|
|
27
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as Inputs from "../../../inputs";
|
|
2
|
+
import { resolveDto } from "../../../kernel-calls";
|
|
3
|
+
import { compressionSpringPath } from "../../../springs/springs";
|
|
4
|
+
/**
|
|
5
|
+
* Compression springs with closed and ground ends, with no CAD kernel needed: the path of the wire's
|
|
6
|
+
* centre, its pitch and its solid length. `occt.parts.mechanical.springs` sweeps the wire into a solid.
|
|
7
|
+
* @beta
|
|
8
|
+
*/
|
|
9
|
+
export class EngineeringSprings {
|
|
10
|
+
/**
|
|
11
|
+
* Works out the centre line of a compression spring's wire up +Z, with a closed coil at each
|
|
12
|
+
* end, the active coils' pitch and the solid length, where every coil touches the next.
|
|
13
|
+
*
|
|
14
|
+
* The wire runs three quarters of a coil past 0 and `length`: sweep it along the points, then
|
|
15
|
+
* cut it flat at both.
|
|
16
|
+
* @param inputs - The wire, the coils and the length
|
|
17
|
+
* @returns The centre line's points, the pitch and the solid length
|
|
18
|
+
* @group compression
|
|
19
|
+
* @shortname compression spring path
|
|
20
|
+
* @drawable false
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* const spring = bitbybit.engineering.mechanical.springs.compressionSpringPath({ wireDiameter: 0.2, diameter: 2, activeCoils: 6, length: 4 });
|
|
24
|
+
* const wire = spring.points;
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
compressionSpringPath(inputs) {
|
|
28
|
+
const resolved = resolveDto(Inputs.Engineering.CompressionSpringPathDto, inputs);
|
|
29
|
+
return compressionSpringPath(resolved);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as Inputs from "../../../inputs";
|
|
2
|
+
import type { AnsiThreadSize, AnsiThreadSizes } from "../../../threads/thread-types";
|
|
3
|
+
/**
|
|
4
|
+
* The sizes of Unified inch screw threads after ASME B1.1, from #0 to 1 inch, with no CAD kernel
|
|
5
|
+
* needed: diameters, pitches and tap drills, coarse (UNC), fine (UNF) or of a pitch of their own, in
|
|
6
|
+
* the unit asked for. The fasteners of `occt.parts.mechanical.fasteners.ansi` carry them.
|
|
7
|
+
* @beta
|
|
8
|
+
*/
|
|
9
|
+
export declare class EngineeringThreadsAnsi {
|
|
10
|
+
/**
|
|
11
|
+
* Gives a Unified inch thread by its size and series: the nominal, pitch and minor diameters, the
|
|
12
|
+
* pitch, the internal thread's minor diameter and the drill for tapping it.
|
|
13
|
+
*
|
|
14
|
+
* The minor diameter is the rounded UNR root's; `threadsPerInch` names a pitch of its own, a UN
|
|
15
|
+
* thread. Example: 1/4 UNC -> 20 threads per inch, tap drill 0.201 inches
|
|
16
|
+
* @param inputs - The size, the series, an optional pitch of its own and the unit
|
|
17
|
+
* @returns The thread's diameters and pitch in `unit`
|
|
18
|
+
* @group threads
|
|
19
|
+
* @shortname ansi thread
|
|
20
|
+
* @drawable false
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* const thread = bitbybit.engineering.mechanical.threads.ansi.thread({ size: Bit.Inputs.Engineering.ansiThreadSizeEnum.in1_4, series: Bit.Inputs.Engineering.ansiThreadSeriesEnum.unc });
|
|
24
|
+
* const drill = thread.tapDrill;
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
thread(inputs: Inputs.Engineering.AnsiThreadDto): AnsiThreadSizes;
|
|
28
|
+
/**
|
|
29
|
+
* Lists the Unified inch thread sizes the tables hold, from #0 to 1 inch.
|
|
30
|
+
* @returns The sizes, smallest first
|
|
31
|
+
* @group threads
|
|
32
|
+
* @shortname ansi thread sizes
|
|
33
|
+
* @drawable false
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const sizes = bitbybit.engineering.mechanical.threads.ansi.sizes();
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
sizes(): AnsiThreadSize[];
|
|
40
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as Inputs from "../../../inputs";
|
|
2
|
+
import { resolveDto } from "../../../kernel-calls";
|
|
3
|
+
import { ansiThread, ansiThreadSizes } from "../../../threads/ansi-threads";
|
|
4
|
+
import { THREAD_LENGTHS } from "../../../threads/thread-profile.constants";
|
|
5
|
+
import { checkedUnitOfLength, lengthsConverted } from "../../helpers/geometry/lengths";
|
|
6
|
+
/**
|
|
7
|
+
* The sizes of Unified inch screw threads after ASME B1.1, from #0 to 1 inch, with no CAD kernel
|
|
8
|
+
* needed: diameters, pitches and tap drills, coarse (UNC), fine (UNF) or of a pitch of their own, in
|
|
9
|
+
* the unit asked for. The fasteners of `occt.parts.mechanical.fasteners.ansi` carry them.
|
|
10
|
+
* @beta
|
|
11
|
+
*/
|
|
12
|
+
export class EngineeringThreadsAnsi {
|
|
13
|
+
/**
|
|
14
|
+
* Gives a Unified inch thread by its size and series: the nominal, pitch and minor diameters, the
|
|
15
|
+
* pitch, the internal thread's minor diameter and the drill for tapping it.
|
|
16
|
+
*
|
|
17
|
+
* The minor diameter is the rounded UNR root's; `threadsPerInch` names a pitch of its own, a UN
|
|
18
|
+
* thread. Example: 1/4 UNC -> 20 threads per inch, tap drill 0.201 inches
|
|
19
|
+
* @param inputs - The size, the series, an optional pitch of its own and the unit
|
|
20
|
+
* @returns The thread's diameters and pitch in `unit`
|
|
21
|
+
* @group threads
|
|
22
|
+
* @shortname ansi thread
|
|
23
|
+
* @drawable false
|
|
24
|
+
* @example
|
|
25
|
+
* ```typescript
|
|
26
|
+
* const thread = bitbybit.engineering.mechanical.threads.ansi.thread({ size: Bit.Inputs.Engineering.ansiThreadSizeEnum.in1_4, series: Bit.Inputs.Engineering.ansiThreadSeriesEnum.unc });
|
|
27
|
+
* const drill = thread.tapDrill;
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
thread(inputs) {
|
|
31
|
+
const resolved = resolveDto(Inputs.Engineering.AnsiThreadDto, inputs);
|
|
32
|
+
return lengthsConverted(ansiThread(resolved.size, resolved.series, resolved.threadsPerInch), THREAD_LENGTHS, "in", checkedUnitOfLength(resolved.unit, "unit"));
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Lists the Unified inch thread sizes the tables hold, from #0 to 1 inch.
|
|
36
|
+
* @returns The sizes, smallest first
|
|
37
|
+
* @group threads
|
|
38
|
+
* @shortname ansi thread sizes
|
|
39
|
+
* @drawable false
|
|
40
|
+
* @example
|
|
41
|
+
* ```typescript
|
|
42
|
+
* const sizes = bitbybit.engineering.mechanical.threads.ansi.sizes();
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
sizes() {
|
|
46
|
+
return ansiThreadSizes();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as Inputs from "../../../inputs";
|
|
2
|
+
import type { IsoThreadSize, IsoThreadSizes } from "../../../threads/thread-types";
|
|
3
|
+
/**
|
|
4
|
+
* The sizes of ISO metric screw threads from M1.6 to M24, with no CAD kernel needed: diameters,
|
|
5
|
+
* pitches and tap drills, coarse or fine, in the unit asked for. The fasteners of
|
|
6
|
+
* `occt.parts.mechanical.fasteners.iso` carry them.
|
|
7
|
+
* @beta
|
|
8
|
+
*/
|
|
9
|
+
export declare class EngineeringThreadsIso {
|
|
10
|
+
/**
|
|
11
|
+
* Gives an ISO metric thread by its size: the nominal, pitch and minor diameters, the pitch,
|
|
12
|
+
* the internal thread's minor diameter and the drill for tapping it.
|
|
13
|
+
*
|
|
14
|
+
* The coarse pitch unless `pitch` gives a fine one, in millimetres as ISO names it; the sizes come
|
|
15
|
+
* back in `unit`. Example: M8 -> pitch 1.25, tap drill 6.8
|
|
16
|
+
* @param inputs - The size, an optional fine pitch and the unit
|
|
17
|
+
* @returns The thread's diameters and pitch in `unit`
|
|
18
|
+
* @group threads
|
|
19
|
+
* @shortname iso thread
|
|
20
|
+
* @drawable false
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* const thread = bitbybit.engineering.mechanical.threads.iso.thread({ size: Bit.Inputs.Engineering.isoThreadSizeEnum.m8 });
|
|
24
|
+
* const drill = thread.tapDrill;
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
thread(inputs: Inputs.Engineering.IsoThreadDto): IsoThreadSizes;
|
|
28
|
+
/**
|
|
29
|
+
* Lists the ISO metric thread sizes the tables hold, from M1.6 to M24.
|
|
30
|
+
* @returns The sizes, smallest first
|
|
31
|
+
* @group threads
|
|
32
|
+
* @shortname iso thread sizes
|
|
33
|
+
* @drawable false
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const sizes = bitbybit.engineering.mechanical.threads.iso.sizes();
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
sizes(): IsoThreadSize[];
|
|
40
|
+
}
|