@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.
Files changed (312) hide show
  1. package/lib/api/GlobalCDNProvider.js +1 -1
  2. package/lib/api/bearings/ansi-bearings.constants.d.ts +2 -0
  3. package/lib/api/bearings/ansi-bearings.constants.js +26 -0
  4. package/lib/api/bearings/ansi-bearings.d.ts +4 -0
  5. package/lib/api/bearings/ansi-bearings.js +14 -0
  6. package/lib/api/bearings/bearing-types.d.ts +25 -0
  7. package/lib/api/bearings/bearing-types.js +1 -0
  8. package/lib/api/bearings/bearings.constants.d.ts +1 -0
  9. package/lib/api/bearings/bearings.constants.js +1 -0
  10. package/lib/api/bearings/iso-bearings.constants.d.ts +2 -0
  11. package/lib/api/bearings/iso-bearings.constants.js +30 -0
  12. package/lib/api/bearings/iso-bearings.d.ts +4 -0
  13. package/lib/api/bearings/iso-bearings.js +14 -0
  14. package/lib/api/color-space.d.ts +2 -0
  15. package/lib/api/color-space.js +5 -8
  16. package/lib/api/fasteners/ansi-fasteners.constants.d.ts +16 -0
  17. package/lib/api/fasteners/ansi-fasteners.constants.js +118 -0
  18. package/lib/api/fasteners/ansi-fasteners.d.ts +8 -0
  19. package/lib/api/fasteners/ansi-fasteners.js +64 -0
  20. package/lib/api/fasteners/fastener-types.d.ts +161 -0
  21. package/lib/api/fasteners/fastener-types.js +1 -0
  22. package/lib/api/fasteners/fasteners.constants.d.ts +5 -0
  23. package/lib/api/fasteners/fasteners.constants.js +5 -0
  24. package/lib/api/fasteners/fasteners.d.ts +2 -0
  25. package/lib/api/fasteners/fasteners.js +9 -0
  26. package/lib/api/fasteners/iso-fasteners.constants.d.ts +23 -0
  27. package/lib/api/fasteners/iso-fasteners.constants.js +110 -0
  28. package/lib/api/fasteners/iso-fasteners.d.ts +9 -0
  29. package/lib/api/fasteners/iso-fasteners.js +61 -0
  30. package/lib/api/gears/bevel-gears.d.ts +6 -0
  31. package/lib/api/gears/bevel-gears.js +69 -0
  32. package/lib/api/gears/gear-checks.d.ts +8 -0
  33. package/lib/api/gears/gear-checks.js +69 -0
  34. package/lib/api/gears/gear-pairs.d.ts +4 -0
  35. package/lib/api/gears/gear-pairs.js +140 -0
  36. package/lib/api/gears/gear-types.d.ts +425 -0
  37. package/lib/api/gears/gear-types.js +1 -0
  38. package/lib/api/gears/gears.constants.d.ts +19 -0
  39. package/lib/api/gears/gears.constants.js +19 -0
  40. package/lib/api/gears/gears.d.ts +10 -0
  41. package/lib/api/gears/gears.js +156 -0
  42. package/lib/api/gears/helical-gears.d.ts +5 -0
  43. package/lib/api/gears/helical-gears.js +33 -0
  44. package/lib/api/gears/involute-flank.d.ts +26 -0
  45. package/lib/api/gears/involute-flank.js +158 -0
  46. package/lib/api/gears/racks.d.ts +3 -0
  47. package/lib/api/gears/racks.js +64 -0
  48. package/lib/api/index.d.ts +10 -1
  49. package/lib/api/index.js +0 -1
  50. package/lib/api/inputs/base-inputs.d.ts +450 -3
  51. package/lib/api/inputs/base-inputs.js +12 -0
  52. package/lib/api/inputs/color-inputs.d.ts +14 -0
  53. package/lib/api/inputs/color-inputs.js +19 -0
  54. package/lib/api/inputs/engineering-inputs.d.ts +1539 -0
  55. package/lib/api/inputs/engineering-inputs.js +2181 -0
  56. package/lib/api/inputs/index.d.ts +2 -0
  57. package/lib/api/inputs/index.js +2 -0
  58. package/lib/api/inputs/io-inputs.d.ts +8 -1
  59. package/lib/api/inputs/io-inputs.js +4 -1
  60. package/lib/api/inputs/math-inputs.d.ts +61 -0
  61. package/lib/api/inputs/math-inputs.js +85 -0
  62. package/lib/api/inputs/mesh-inputs.d.ts +170 -0
  63. package/lib/api/inputs/mesh-inputs.js +206 -0
  64. package/lib/api/inputs/point-inputs.d.ts +4 -4
  65. package/lib/api/inputs/polyline-inputs.d.ts +144 -0
  66. package/lib/api/inputs/polyline-inputs.js +151 -0
  67. package/lib/api/inputs/recipes-inputs.d.ts +76 -0
  68. package/lib/api/inputs/recipes-inputs.js +74 -0
  69. package/lib/api/inputs/transforms-inputs.d.ts +34 -0
  70. package/lib/api/inputs/transforms-inputs.js +35 -0
  71. package/lib/api/keys/ansi-keys.constants.d.ts +3 -0
  72. package/lib/api/keys/ansi-keys.constants.js +16 -0
  73. package/lib/api/keys/ansi-keys.d.ts +3 -0
  74. package/lib/api/keys/ansi-keys.js +14 -0
  75. package/lib/api/keys/din-keys.constants.d.ts +3 -0
  76. package/lib/api/keys/din-keys.constants.js +14 -0
  77. package/lib/api/keys/din-keys.d.ts +3 -0
  78. package/lib/api/keys/din-keys.js +13 -0
  79. package/lib/api/keys/key-types.d.ts +17 -0
  80. package/lib/api/keys/key-types.js +1 -0
  81. package/lib/api/keys/keys.constants.d.ts +1 -0
  82. package/lib/api/keys/keys.constants.js +1 -0
  83. package/lib/api/knurls/ansi-knurls.constants.d.ts +4 -0
  84. package/lib/api/knurls/ansi-knurls.constants.js +8 -0
  85. package/lib/api/knurls/ansi-knurls.d.ts +3 -0
  86. package/lib/api/knurls/ansi-knurls.js +20 -0
  87. package/lib/api/knurls/din-knurls.constants.d.ts +2 -0
  88. package/lib/api/knurls/din-knurls.constants.js +2 -0
  89. package/lib/api/knurls/din-knurls.d.ts +3 -0
  90. package/lib/api/knurls/din-knurls.js +19 -0
  91. package/lib/api/knurls/knurl-types.d.ts +24 -0
  92. package/lib/api/knurls/knurl-types.js +1 -0
  93. package/lib/api/knurls/knurls.constants.d.ts +1 -0
  94. package/lib/api/knurls/knurls.constants.js +1 -0
  95. package/lib/api/knurls/knurls.d.ts +2 -0
  96. package/lib/api/knurls/knurls.js +9 -0
  97. package/lib/api/recipes/checks.d.ts +15 -0
  98. package/lib/api/recipes/checks.js +85 -0
  99. package/lib/api/recipes/limits.constants.d.ts +4 -0
  100. package/lib/api/recipes/limits.constants.js +4 -0
  101. package/lib/api/recipes/sources.d.ts +0 -13
  102. package/lib/api/recipes/sources.js +3 -15
  103. package/lib/api/recipes/surface-mesh.d.ts +0 -14
  104. package/lib/api/recipes/surface-mesh.js +8 -21
  105. package/lib/api/recipes/validate-brep.d.ts +2 -0
  106. package/lib/api/recipes/validate-brep.js +330 -0
  107. package/lib/api/recipes/validate.d.ts +0 -31
  108. package/lib/api/recipes/validate.js +7 -115
  109. package/lib/api/resolved-inputs/index.d.ts +80 -0
  110. package/lib/api/retaining-rings/ansi-retaining-rings.constants.d.ts +4 -0
  111. package/lib/api/retaining-rings/ansi-retaining-rings.constants.js +93 -0
  112. package/lib/api/retaining-rings/ansi-retaining-rings.d.ts +4 -0
  113. package/lib/api/retaining-rings/ansi-retaining-rings.js +20 -0
  114. package/lib/api/retaining-rings/din-retaining-rings.constants.d.ts +3 -0
  115. package/lib/api/retaining-rings/din-retaining-rings.constants.js +115 -0
  116. package/lib/api/retaining-rings/din-retaining-rings.d.ts +4 -0
  117. package/lib/api/retaining-rings/din-retaining-rings.js +20 -0
  118. package/lib/api/retaining-rings/retaining-ring-types.d.ts +30 -0
  119. package/lib/api/retaining-rings/retaining-ring-types.js +1 -0
  120. package/lib/api/retaining-rings/retaining-rings.constants.d.ts +1 -0
  121. package/lib/api/retaining-rings/retaining-rings.constants.js +1 -0
  122. package/lib/api/retaining-rings/retaining-rings.d.ts +2 -0
  123. package/lib/api/retaining-rings/retaining-rings.js +9 -0
  124. package/lib/api/services/base-bitbybit.d.ts +42 -0
  125. package/lib/api/services/base-bitbybit.js +43 -0
  126. package/lib/api/services/color.d.ts +35 -2
  127. package/lib/api/services/color.js +48 -12
  128. package/lib/api/services/engineering/engineering.d.ts +12 -0
  129. package/lib/api/services/engineering/engineering.js +13 -0
  130. package/lib/api/services/engineering/index.d.ts +2 -0
  131. package/lib/api/services/engineering/index.js +2 -0
  132. package/lib/api/services/engineering/mechanical/bearings-ansi.d.ts +40 -0
  133. package/lib/api/services/engineering/mechanical/bearings-ansi.js +47 -0
  134. package/lib/api/services/engineering/mechanical/bearings-iso.d.ts +39 -0
  135. package/lib/api/services/engineering/mechanical/bearings-iso.js +46 -0
  136. package/lib/api/services/engineering/mechanical/bearings.d.ts +14 -0
  137. package/lib/api/services/engineering/mechanical/bearings.js +15 -0
  138. package/lib/api/services/engineering/mechanical/fasteners-ansi.d.ts +109 -0
  139. package/lib/api/services/engineering/mechanical/fasteners-ansi.js +133 -0
  140. package/lib/api/services/engineering/mechanical/fasteners-iso.d.ts +123 -0
  141. package/lib/api/services/engineering/mechanical/fasteners-iso.js +151 -0
  142. package/lib/api/services/engineering/mechanical/fasteners.d.ts +13 -0
  143. package/lib/api/services/engineering/mechanical/fasteners.js +14 -0
  144. package/lib/api/services/engineering/mechanical/gears.d.ts +267 -0
  145. package/lib/api/services/engineering/mechanical/gears.js +318 -0
  146. package/lib/api/services/engineering/mechanical/index.d.ts +24 -0
  147. package/lib/api/services/engineering/mechanical/index.js +24 -0
  148. package/lib/api/services/engineering/mechanical/keys-ansi.d.ts +27 -0
  149. package/lib/api/services/engineering/mechanical/keys-ansi.js +32 -0
  150. package/lib/api/services/engineering/mechanical/keys-din.d.ts +26 -0
  151. package/lib/api/services/engineering/mechanical/keys-din.js +31 -0
  152. package/lib/api/services/engineering/mechanical/keys.d.ts +14 -0
  153. package/lib/api/services/engineering/mechanical/keys.js +15 -0
  154. package/lib/api/services/engineering/mechanical/knurls-ansi.d.ts +26 -0
  155. package/lib/api/services/engineering/mechanical/knurls-ansi.js +31 -0
  156. package/lib/api/services/engineering/mechanical/knurls-din.d.ts +26 -0
  157. package/lib/api/services/engineering/mechanical/knurls-din.js +31 -0
  158. package/lib/api/services/engineering/mechanical/knurls.d.ts +14 -0
  159. package/lib/api/services/engineering/mechanical/knurls.js +15 -0
  160. package/lib/api/services/engineering/mechanical/mechanical.d.ts +29 -0
  161. package/lib/api/services/engineering/mechanical/mechanical.js +30 -0
  162. package/lib/api/services/engineering/mechanical/retaining-rings-ansi.d.ts +43 -0
  163. package/lib/api/services/engineering/mechanical/retaining-rings-ansi.js +51 -0
  164. package/lib/api/services/engineering/mechanical/retaining-rings-din.d.ts +43 -0
  165. package/lib/api/services/engineering/mechanical/retaining-rings-din.js +51 -0
  166. package/lib/api/services/engineering/mechanical/retaining-rings.d.ts +13 -0
  167. package/lib/api/services/engineering/mechanical/retaining-rings.js +14 -0
  168. package/lib/api/services/engineering/mechanical/splines-ansi.d.ts +27 -0
  169. package/lib/api/services/engineering/mechanical/splines-ansi.js +32 -0
  170. package/lib/api/services/engineering/mechanical/splines-din.d.ts +26 -0
  171. package/lib/api/services/engineering/mechanical/splines-din.js +31 -0
  172. package/lib/api/services/engineering/mechanical/splines.d.ts +13 -0
  173. package/lib/api/services/engineering/mechanical/splines.js +14 -0
  174. package/lib/api/services/engineering/mechanical/springs.d.ts +27 -0
  175. package/lib/api/services/engineering/mechanical/springs.js +31 -0
  176. package/lib/api/services/engineering/mechanical/threads-ansi.d.ts +40 -0
  177. package/lib/api/services/engineering/mechanical/threads-ansi.js +48 -0
  178. package/lib/api/services/engineering/mechanical/threads-iso.d.ts +40 -0
  179. package/lib/api/services/engineering/mechanical/threads-iso.js +48 -0
  180. package/lib/api/services/engineering/mechanical/threads.d.ts +13 -0
  181. package/lib/api/services/engineering/mechanical/threads.js +14 -0
  182. package/lib/api/services/frame.js +3 -3
  183. package/lib/api/services/geometry-helper.js +8 -111
  184. package/lib/api/services/helpers/color/color-space.d.ts +2 -0
  185. package/lib/api/services/helpers/color/color-space.js +12 -0
  186. package/lib/api/services/helpers/{nurbs.d.ts → curves/nurbs.d.ts} +1 -1
  187. package/lib/api/services/helpers/{surface-triangulation.d.ts → curves/surface-triangulation.d.ts} +2 -2
  188. package/lib/api/services/helpers/{surface-triangulation.js → curves/surface-triangulation.js} +14 -8
  189. package/lib/api/services/helpers/{dxf → files/dxf}/dxf-generator.d.ts +2 -1
  190. package/lib/api/services/helpers/{dxf → files/dxf}/dxf-generator.js +19 -5
  191. package/lib/api/services/helpers/files/dxf/dxf.constants.d.ts +4 -0
  192. package/lib/api/services/helpers/files/dxf/dxf.constants.js +4 -0
  193. package/lib/api/services/helpers/{dxf → files/dxf}/dxf.d.ts +1 -1
  194. package/lib/api/services/helpers/{dxf → files/dxf}/dxf.js +2 -2
  195. package/lib/api/services/helpers/files/glb.constants.d.ts +11 -0
  196. package/lib/api/services/helpers/files/glb.constants.js +11 -0
  197. package/lib/api/services/helpers/files/glb.d.ts +1 -0
  198. package/lib/api/services/helpers/files/glb.js +69 -0
  199. package/lib/api/services/helpers/files/gzip.constants.d.ts +11 -0
  200. package/lib/api/services/helpers/files/gzip.constants.js +11 -0
  201. package/lib/api/services/helpers/files/gzip.d.ts +2 -0
  202. package/lib/api/services/helpers/files/gzip.js +52 -0
  203. package/lib/api/services/helpers/{inflate.constants.d.ts → files/inflate.constants.d.ts} +1 -0
  204. package/lib/api/services/helpers/{inflate.constants.js → files/inflate.constants.js} +1 -0
  205. package/lib/api/services/helpers/{inflate.d.ts → files/inflate.d.ts} +1 -1
  206. package/lib/api/services/helpers/{inflate.js → files/inflate.js} +5 -4
  207. package/lib/api/services/helpers/{zip.d.ts → files/zip.d.ts} +1 -1
  208. package/lib/api/services/helpers/geometry/arcs.d.ts +9 -0
  209. package/lib/api/services/helpers/{arcs.js → geometry/arcs.js} +7 -0
  210. package/lib/api/services/helpers/{frame-axes.d.ts → geometry/frame-axes.d.ts} +8 -5
  211. package/lib/api/services/helpers/{frame-axes.js → geometry/frame-axes.js} +21 -9
  212. package/lib/api/services/helpers/geometry/lengths.constants.d.ts +4 -0
  213. package/lib/api/services/helpers/geometry/lengths.constants.js +3 -0
  214. package/lib/api/services/helpers/geometry/lengths.d.ts +7 -0
  215. package/lib/api/services/helpers/geometry/lengths.js +20 -0
  216. package/lib/api/services/helpers/geometry/matrices.constants.d.ts +8 -0
  217. package/lib/api/services/helpers/geometry/matrices.constants.js +7 -0
  218. package/lib/api/services/helpers/geometry/matrices.d.ts +17 -0
  219. package/lib/api/services/helpers/{matrices.js → geometry/matrices.js} +28 -17
  220. package/lib/api/services/helpers/{paths.d.ts → geometry/paths.d.ts} +2 -1
  221. package/lib/api/services/helpers/{paths.js → geometry/paths.js} +36 -30
  222. package/lib/api/services/helpers/{polygons.d.ts → geometry/polygons.d.ts} +1 -1
  223. package/lib/api/services/helpers/geometry/polygons.js +111 -0
  224. package/lib/api/services/helpers/geometry/scalars.d.ts +9 -0
  225. package/lib/api/services/helpers/geometry/scalars.js +34 -0
  226. package/lib/api/services/helpers/{triangulation.js → geometry/triangulation.js} +11 -6
  227. package/lib/api/services/helpers/geometry/vector-grid.d.ts +12 -0
  228. package/lib/api/services/helpers/geometry/vector-grid.js +149 -0
  229. package/lib/api/services/helpers/{vectors.d.ts → geometry/vectors.d.ts} +8 -1
  230. package/lib/api/services/helpers/geometry/vectors.js +43 -0
  231. package/lib/api/services/helpers/helper-types.d.ts +57 -0
  232. package/lib/api/services/helpers/mesh/mesh-normals.d.ts +21 -0
  233. package/lib/api/services/helpers/{mesh-normals.js → mesh/mesh-normals.js} +54 -65
  234. package/lib/api/services/helpers/mesh/mesh-orientation.d.ts +24 -0
  235. package/lib/api/services/helpers/mesh/mesh-orientation.js +104 -0
  236. package/lib/api/services/helpers/{mesh-primitives.d.ts → mesh/mesh-primitives.d.ts} +1 -1
  237. package/lib/api/services/helpers/{mesh-primitives.js → mesh/mesh-primitives.js} +6 -5
  238. package/lib/api/services/helpers/mesh/mesh-proximity.constants.d.ts +7 -0
  239. package/lib/api/services/helpers/mesh/mesh-proximity.constants.js +11 -0
  240. package/lib/api/services/helpers/mesh/mesh-proximity.d.ts +11 -0
  241. package/lib/api/services/helpers/mesh/mesh-proximity.js +382 -0
  242. package/lib/api/services/index.d.ts +3 -0
  243. package/lib/api/services/index.js +3 -0
  244. package/lib/api/services/io.d.ts +1 -1
  245. package/lib/api/services/io.js +1 -1
  246. package/lib/api/services/line.js +2 -3
  247. package/lib/api/services/math.d.ts +47 -0
  248. package/lib/api/services/math.js +77 -10
  249. package/lib/api/services/mesh.d.ts +174 -2
  250. package/lib/api/services/mesh.js +305 -7
  251. package/lib/api/services/point.js +4 -10
  252. package/lib/api/services/polyline-types.d.ts +6 -0
  253. package/lib/api/services/polyline-types.js +1 -0
  254. package/lib/api/services/polyline.d.ts +163 -1
  255. package/lib/api/services/polyline.js +270 -13
  256. package/lib/api/services/recipes.d.ts +80 -0
  257. package/lib/api/services/recipes.js +107 -0
  258. package/lib/api/services/transforms.d.ts +74 -2
  259. package/lib/api/services/transforms.js +100 -3
  260. package/lib/api/services/vector.d.ts +4 -3
  261. package/lib/api/services/vector.js +14 -14
  262. package/lib/api/splines/ansi-splines.constants.d.ts +9 -0
  263. package/lib/api/splines/ansi-splines.constants.js +9 -0
  264. package/lib/api/splines/ansi-splines.d.ts +3 -0
  265. package/lib/api/splines/ansi-splines.js +28 -0
  266. package/lib/api/splines/din-splines.constants.d.ts +12 -0
  267. package/lib/api/splines/din-splines.constants.js +12 -0
  268. package/lib/api/splines/din-splines.d.ts +3 -0
  269. package/lib/api/splines/din-splines.js +38 -0
  270. package/lib/api/splines/spline-types.d.ts +32 -0
  271. package/lib/api/splines/spline-types.js +1 -0
  272. package/lib/api/splines/splines.constants.d.ts +1 -0
  273. package/lib/api/splines/splines.constants.js +1 -0
  274. package/lib/api/springs/spring-types.d.ts +26 -0
  275. package/lib/api/springs/spring-types.js +1 -0
  276. package/lib/api/springs/springs.constants.d.ts +9 -0
  277. package/lib/api/springs/springs.constants.js +9 -0
  278. package/lib/api/springs/springs.d.ts +2 -0
  279. package/lib/api/springs/springs.js +50 -0
  280. package/lib/api/threads/ansi-threads.constants.d.ts +6 -0
  281. package/lib/api/threads/ansi-threads.constants.js +27 -0
  282. package/lib/api/threads/ansi-threads.d.ts +4 -0
  283. package/lib/api/threads/ansi-threads.js +50 -0
  284. package/lib/api/threads/iso-threads.constants.d.ts +5 -0
  285. package/lib/api/threads/iso-threads.constants.js +20 -0
  286. package/lib/api/threads/iso-threads.d.ts +4 -0
  287. package/lib/api/threads/iso-threads.js +32 -0
  288. package/lib/api/threads/thread-profile.constants.d.ts +3 -0
  289. package/lib/api/threads/thread-profile.constants.js +3 -0
  290. package/lib/api/threads/thread-types.d.ts +66 -0
  291. package/lib/api/threads/thread-types.js +1 -0
  292. package/package.json +1 -1
  293. package/lib/api/recipes/index.d.ts +0 -4
  294. package/lib/api/recipes/index.js +0 -3
  295. package/lib/api/services/helpers/arcs.d.ts +0 -6
  296. package/lib/api/services/helpers/matrices.constants.d.ts +0 -2
  297. package/lib/api/services/helpers/matrices.constants.js +0 -2
  298. package/lib/api/services/helpers/matrices.d.ts +0 -25
  299. package/lib/api/services/helpers/mesh-normals.d.ts +0 -11
  300. package/lib/api/services/helpers/polygons.js +0 -59
  301. package/lib/api/services/helpers/vectors.js +0 -17
  302. /package/lib/api/services/helpers/{nurbs.js → curves/nurbs.js} +0 -0
  303. /package/lib/api/services/helpers/{crc32.d.ts → files/crc32.d.ts} +0 -0
  304. /package/lib/api/services/helpers/{crc32.js → files/crc32.js} +0 -0
  305. /package/lib/api/services/helpers/{zip.constants.d.ts → files/zip.constants.d.ts} +0 -0
  306. /package/lib/api/services/helpers/{zip.constants.js → files/zip.constants.js} +0 -0
  307. /package/lib/api/services/helpers/{zip.js → files/zip.js} +0 -0
  308. /package/lib/api/services/helpers/{triangulation.d.ts → geometry/triangulation.d.ts} +0 -0
  309. /package/lib/api/services/helpers/{mesh-measures.d.ts → mesh/mesh-measures.d.ts} +0 -0
  310. /package/lib/api/services/helpers/{mesh-measures.js → mesh/mesh-measures.js} +0 -0
  311. /package/lib/api/services/helpers/{mesh-primitives.constants.d.ts → mesh/mesh-primitives.constants.d.ts} +0 -0
  312. /package/lib/api/services/helpers/{mesh-primitives.constants.js → mesh/mesh-primitives.constants.js} +0 -0
@@ -1,3 +1,3 @@
1
1
  export class GlobalCDNProvider {
2
2
  }
3
- GlobalCDNProvider.BITBYBIT_CDN_URL = "https://git-cdn.bitbybit.dev/v1.5.0-rc.0";
3
+ GlobalCDNProvider.BITBYBIT_CDN_URL = "https://git-cdn.bitbybit.dev/v1.6.0-rc.0";
@@ -0,0 +1,2 @@
1
+ import type { AnsiBallBearingDesignation, AnsiBallBearingRow } from "./bearing-types";
2
+ export declare const ANSI_BALL_BEARINGS: Readonly<Record<AnsiBallBearingDesignation, AnsiBallBearingRow>>;
@@ -0,0 +1,26 @@
1
+ export const ANSI_BALL_BEARINGS = {
2
+ "R1-4": { bore: 0.078125, outside: 0.25, width: 0.09375, shieldedWidth: 0.140625 },
3
+ "R1-5": { bore: 0.09375, outside: 0.3125, width: 0.109375, shieldedWidth: 0.140625 },
4
+ "R133": { bore: 0.09375, outside: 0.1875, width: 0.0625, shieldedWidth: 0.09375 },
5
+ "R144": { bore: 0.125, outside: 0.25, width: 0.09375, shieldedWidth: 0.109375 },
6
+ "R155": { bore: 0.15625, outside: 0.3125, width: 0.109375, shieldedWidth: 0.125 },
7
+ "R156": { bore: 0.1875, outside: 0.3125, width: 0.109375, shieldedWidth: 0.125 },
8
+ "R166": { bore: 0.1875, outside: 0.375, width: 0.125, shieldedWidth: 0.125 },
9
+ "R168": { bore: 0.25, outside: 0.375, width: 0.125, shieldedWidth: 0.125 },
10
+ "R188": { bore: 0.25, outside: 0.5, width: 0.125, shieldedWidth: 0.1875 },
11
+ "R1810": { bore: 0.3125, outside: 0.5, width: 0.15625, shieldedWidth: 0.15625 },
12
+ "R2": { bore: 0.125, outside: 0.375, width: 0.15625, shieldedWidth: 0.15625 },
13
+ "R2-5": { bore: 0.125, outside: 0.3125, width: 0.109375, shieldedWidth: 0.140625 },
14
+ "R2-6": { bore: 0.125, outside: 0.375, width: 0.109375, shieldedWidth: 0.140625 },
15
+ "R3": { bore: 0.1875, outside: 0.5, width: 0.15625, shieldedWidth: 0.196 },
16
+ "R4": { bore: 0.25, outside: 0.625, width: 0.196, shieldedWidth: 0.196 },
17
+ "R4A": { bore: 0.25, outside: 0.75, width: 0.21875, shieldedWidth: 0.28125 },
18
+ "R6": { bore: 0.375, outside: 0.875, width: 0.21875, shieldedWidth: 0.28125 },
19
+ "R8": { bore: 0.5, outside: 1.125, width: 0.25, shieldedWidth: 0.3125 },
20
+ "R10": { bore: 0.625, outside: 1.375, width: 0.28125, shieldedWidth: 0.34375 },
21
+ "R12": { bore: 0.75, outside: 1.625, width: 0.3125, shieldedWidth: 0.4375 },
22
+ "R14": { bore: 0.875, outside: 1.875, width: 0.375, shieldedWidth: 0.5 },
23
+ "R16": { bore: 1, outside: 2, width: 0.375, shieldedWidth: 0.5 },
24
+ "R18": { bore: 1.125, outside: 2.125, width: 0.375, shieldedWidth: 0.5 },
25
+ "R20": { bore: 1.25, outside: 2.25, width: 0.375, shieldedWidth: 0.5 },
26
+ };
@@ -0,0 +1,4 @@
1
+ import type { Base } from "../inputs/base-inputs";
2
+ import type { AnsiBallBearingDesignation, BallBearingSizes } from "./bearing-types";
3
+ export declare function ansiBallBearingDesignations(): AnsiBallBearingDesignation[];
4
+ export declare function ansiBallBearingSizes(designation: AnsiBallBearingDesignation, shields: boolean, unit: `${Base.unitOfLengthEnum}`): BallBearingSizes;
@@ -0,0 +1,14 @@
1
+ import { InputError } from "../kernel-calls/errors";
2
+ import { lengthsConverted } from "../services/helpers/geometry/lengths";
3
+ import { ANSI_BALL_BEARINGS } from "./ansi-bearings.constants";
4
+ import { BEARING_LENGTHS } from "./bearings.constants";
5
+ export function ansiBallBearingDesignations() {
6
+ return Object.keys(ANSI_BALL_BEARINGS);
7
+ }
8
+ export function ansiBallBearingSizes(designation, shields, unit) {
9
+ const row = ANSI_BALL_BEARINGS[designation];
10
+ if (row === undefined) {
11
+ throw new InputError(`\`designation\` is not one of ${ansiBallBearingDesignations().join(", ")}.`, "designation");
12
+ }
13
+ return lengthsConverted({ bore: row.bore, outside: row.outside, width: shields ? row.shieldedWidth : row.width }, BEARING_LENGTHS, "in", unit);
14
+ }
@@ -0,0 +1,25 @@
1
+ import type * as Inputs from "../inputs";
2
+ /**
3
+ * A deep groove ball bearing's ISO designation, from the 60 and 62 series and the small 62x and 60x
4
+ * sizes: the bore in millimetres is in its last digits, five times them from 04 up.
5
+ */
6
+ export type IsoBallBearingDesignation = `${Inputs.Engineering.isoBallBearingEnum}`;
7
+ /**
8
+ * The boundary sizes of a deep groove ball bearing, from `bearings.iso.ballBearingSizes` or
9
+ * `bearings.ansi.ballBearingSizes`, in the unit asked for.
10
+ */
11
+ export interface BallBearingSizes {
12
+ /** The diameter of the bore, the shaft it sits on. */
13
+ readonly bore: number;
14
+ /** The outside diameter, the housing it sits in. */
15
+ readonly outside: number;
16
+ /** The width along the axis. */
17
+ readonly width: number;
18
+ }
19
+ /**
20
+ * An inch deep groove ball bearing's R-series designation, such as R8 or R188.
21
+ */
22
+ export type AnsiBallBearingDesignation = `${Inputs.Engineering.ansiBallBearingEnum}`;
23
+ export interface AnsiBallBearingRow extends BallBearingSizes {
24
+ readonly shieldedWidth: number;
25
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export declare const BEARING_LENGTHS: readonly ["bore", "outside", "width"];
@@ -0,0 +1 @@
1
+ export const BEARING_LENGTHS = ["bore", "outside", "width"];
@@ -0,0 +1,2 @@
1
+ import type { BallBearingSizes, IsoBallBearingDesignation } from "./bearing-types";
2
+ export declare const BALL_BEARINGS: Readonly<Record<IsoBallBearingDesignation, BallBearingSizes>>;
@@ -0,0 +1,30 @@
1
+ export const BALL_BEARINGS = {
2
+ "623": { bore: 3, outside: 10, width: 4 },
3
+ "624": { bore: 4, outside: 13, width: 5 },
4
+ "625": { bore: 5, outside: 16, width: 5 },
5
+ "626": { bore: 6, outside: 19, width: 6 },
6
+ "608": { bore: 8, outside: 22, width: 7 },
7
+ "609": { bore: 9, outside: 24, width: 7 },
8
+ "6000": { bore: 10, outside: 26, width: 8 },
9
+ "6001": { bore: 12, outside: 28, width: 8 },
10
+ "6002": { bore: 15, outside: 32, width: 9 },
11
+ "6003": { bore: 17, outside: 35, width: 10 },
12
+ "6004": { bore: 20, outside: 42, width: 12 },
13
+ "6005": { bore: 25, outside: 47, width: 12 },
14
+ "6006": { bore: 30, outside: 55, width: 13 },
15
+ "6007": { bore: 35, outside: 62, width: 14 },
16
+ "6008": { bore: 40, outside: 68, width: 15 },
17
+ "6009": { bore: 45, outside: 75, width: 16 },
18
+ "6010": { bore: 50, outside: 80, width: 16 },
19
+ "6200": { bore: 10, outside: 30, width: 9 },
20
+ "6201": { bore: 12, outside: 32, width: 10 },
21
+ "6202": { bore: 15, outside: 35, width: 11 },
22
+ "6203": { bore: 17, outside: 40, width: 12 },
23
+ "6204": { bore: 20, outside: 47, width: 14 },
24
+ "6205": { bore: 25, outside: 52, width: 15 },
25
+ "6206": { bore: 30, outside: 62, width: 16 },
26
+ "6207": { bore: 35, outside: 72, width: 17 },
27
+ "6208": { bore: 40, outside: 80, width: 18 },
28
+ "6209": { bore: 45, outside: 85, width: 19 },
29
+ "6210": { bore: 50, outside: 90, width: 20 },
30
+ };
@@ -0,0 +1,4 @@
1
+ import type { Base } from "../inputs/base-inputs";
2
+ import type { BallBearingSizes, IsoBallBearingDesignation } from "./bearing-types";
3
+ export declare function isoBallBearingDesignations(): IsoBallBearingDesignation[];
4
+ export declare function isoBallBearingSizes(designation: IsoBallBearingDesignation, unit: `${Base.unitOfLengthEnum}`): BallBearingSizes;
@@ -0,0 +1,14 @@
1
+ import { InputError } from "../kernel-calls/errors";
2
+ import { lengthsConverted } from "../services/helpers/geometry/lengths";
3
+ import { BALL_BEARINGS } from "./iso-bearings.constants";
4
+ import { BEARING_LENGTHS } from "./bearings.constants";
5
+ export function isoBallBearingDesignations() {
6
+ return Object.keys(BALL_BEARINGS);
7
+ }
8
+ export function isoBallBearingSizes(designation, unit) {
9
+ const row = BALL_BEARINGS[designation];
10
+ if (row === undefined) {
11
+ throw new InputError(`\`designation\` is not one of ${isoBallBearingDesignations().join(", ")}.`, "designation");
12
+ }
13
+ return lengthsConverted(Object.assign({}, row), BEARING_LENGTHS, "mm", unit);
14
+ }
@@ -3,6 +3,7 @@
3
3
  * renderers' lighting expect it.
4
4
  * @param channel - The encoded channel, from 0 to 1
5
5
  * @returns The linear channel, from 0 to 1
6
+ * @deprecated Use `color.srgbToLinear`, which takes `{ channel }`; this function leaves the package's index in the next major version.
6
7
  */
7
8
  export declare function srgbToLinear(channel: number): number;
8
9
  /**
@@ -10,5 +11,6 @@ export declare function srgbToLinear(channel: number): number;
10
11
  * `srgbToLinear`.
11
12
  * @param channel - The linear channel, from 0 to 1
12
13
  * @returns The encoded channel, from 0 to 1
14
+ * @deprecated Use `color.linearToSrgb`, which takes `{ channel }`; this function leaves the package's index in the next major version.
13
15
  */
14
16
  export declare function linearToSrgb(channel: number): number;
@@ -1,24 +1,21 @@
1
- const ENCODED_KNEE = 0.04045;
2
- const LINEAR_KNEE = 0.0031308;
3
- const LINEAR_SLOPE = 12.92;
4
- const CURVE_OFFSET = 0.055;
5
- const CURVE_SCALE = 1.055;
6
- const CURVE_EXPONENT = 2.4;
1
+ import { linearToSrgb as encodedOf, srgbToLinear as linearOf } from "./services/helpers/color/color-space";
7
2
  /**
8
3
  * Turns one sRGB-encoded color channel, from 0 to 1, into linear light, as glTF, XCAF and the
9
4
  * renderers' lighting expect it.
10
5
  * @param channel - The encoded channel, from 0 to 1
11
6
  * @returns The linear channel, from 0 to 1
7
+ * @deprecated Use `color.srgbToLinear`, which takes `{ channel }`; this function leaves the package's index in the next major version.
12
8
  */
13
9
  export function srgbToLinear(channel) {
14
- return channel <= ENCODED_KNEE ? channel / LINEAR_SLOPE : Math.pow(((channel + CURVE_OFFSET) / CURVE_SCALE), CURVE_EXPONENT);
10
+ return linearOf(channel);
15
11
  }
16
12
  /**
17
13
  * Turns one linear-light color channel, from 0 to 1, back into its sRGB encoding, the inverse of
18
14
  * `srgbToLinear`.
19
15
  * @param channel - The linear channel, from 0 to 1
20
16
  * @returns The encoded channel, from 0 to 1
17
+ * @deprecated Use `color.linearToSrgb`, which takes `{ channel }`; this function leaves the package's index in the next major version.
21
18
  */
22
19
  export function linearToSrgb(channel) {
23
- return channel <= LINEAR_KNEE ? channel * LINEAR_SLOPE : CURVE_SCALE * Math.pow(channel, (1 / CURVE_EXPONENT)) - CURVE_OFFSET;
20
+ return encodedOf(channel);
24
21
  }
@@ -0,0 +1,16 @@
1
+ import type { AnsiThreadSize } from "../threads/thread-types";
2
+ import type { AnsiScrewHeadRow, AnsiSetScrewRow, AnsiWasherRow, ClearanceRow, HexRow } from "./fastener-types";
3
+ export declare const ANSI_CLEARANCE_HOLES: Readonly<Partial<Record<AnsiThreadSize, ClearanceRow>>>;
4
+ export declare const ANSI_SOCKET_HEAD_CAP_SCREWS: Readonly<Partial<Record<AnsiThreadSize, AnsiScrewHeadRow>>>;
5
+ export declare const ANSI_HEX_CAP_SCREWS: Readonly<Partial<Record<AnsiThreadSize, HexRow>>>;
6
+ export declare const ANSI_HEX_NUTS: Readonly<Record<AnsiThreadSize, HexRow>>;
7
+ export declare const ANSI_PLAIN_WASHERS: Readonly<Partial<Record<AnsiThreadSize, AnsiWasherRow>>>;
8
+ export declare const ANSI_SET_SCREWS: Readonly<Partial<Record<AnsiThreadSize, AnsiSetScrewRow>>>;
9
+ export declare const ANSI_COUNTERBORE_SINK = 0.02;
10
+ export declare const HEX_CAP_THREAD_EXTRA_SHORT = 0.25;
11
+ export declare const HEX_CAP_THREAD_EXTRA_LONG = 0.5;
12
+ export declare const HEX_CAP_LENGTH_BREAK = 6;
13
+ export declare const ANSI_CUP_ANGLE = 118;
14
+ export declare const ANSI_FLAT_ANGLE = 90;
15
+ export declare const ANSI_CONE_LONG_ANGLE = 90;
16
+ export declare const ANSI_CONE_SHORT_ANGLE = 118;
@@ -0,0 +1,118 @@
1
+ export const ANSI_CLEARANCE_HOLES = {
2
+ "#0": { close: 0.067, normal: 0.076, loose: 0.094 },
3
+ "#1": { close: 0.081, normal: 0.089, loose: 0.104 },
4
+ "#2": { close: 0.094, normal: 0.102, loose: 0.116 },
5
+ "#3": { close: 0.106, normal: 0.116, loose: 0.128 },
6
+ "#4": { close: 0.12, normal: 0.128, loose: 0.144 },
7
+ "#5": { close: 0.141, normal: 0.156, loose: 0.172 },
8
+ "#6": { close: 0.154, normal: 0.17, loose: 0.185 },
9
+ "#8": { close: 0.18, normal: 0.196, loose: 0.213 },
10
+ "#10": { close: 0.206, normal: 0.221, loose: 0.238 },
11
+ "1/4": { close: 0.266, normal: 0.281, loose: 0.297 },
12
+ "5/16": { close: 0.328, normal: 0.344, loose: 0.359 },
13
+ "3/8": { close: 0.391, normal: 0.406, loose: 0.422 },
14
+ "7/16": { close: 0.453, normal: 0.469, loose: 0.484 },
15
+ "1/2": { close: 0.531, normal: 0.562, loose: 0.609 },
16
+ "5/8": { close: 0.656, normal: 0.688, loose: 0.734 },
17
+ "3/4": { close: 0.781, normal: 0.812, loose: 0.906 },
18
+ "7/8": { close: 0.906, normal: 0.938, loose: 1.031 },
19
+ "1": { close: 1.031, normal: 1.094, loose: 1.156 },
20
+ };
21
+ export const ANSI_SOCKET_HEAD_CAP_SCREWS = {
22
+ "#0": { headDiameter: 0.096, headHeight: 0.06, socketSize: 0.05, socketDepth: 0.025, threadLength: 0.5, counterboreDiameter: 0.125, counterboreDepth: 0.06 },
23
+ "#1": { headDiameter: 0.118, headHeight: 0.073, socketSize: 0.0625, socketDepth: 0.031, threadLength: 0.625, counterboreDiameter: 0.15625, counterboreDepth: 0.073 },
24
+ "#2": { headDiameter: 0.14, headHeight: 0.086, socketSize: 0.078125, socketDepth: 0.038, threadLength: 0.625, counterboreDiameter: 0.1875, counterboreDepth: 0.086 },
25
+ "#3": { headDiameter: 0.161, headHeight: 0.099, socketSize: 0.078125, socketDepth: 0.044, threadLength: 0.625, counterboreDiameter: 0.21875, counterboreDepth: 0.099 },
26
+ "#4": { headDiameter: 0.183, headHeight: 0.112, socketSize: 0.09375, socketDepth: 0.051, threadLength: 0.75, counterboreDiameter: 0.21875, counterboreDepth: 0.112 },
27
+ "#5": { headDiameter: 0.205, headHeight: 0.125, socketSize: 0.09375, socketDepth: 0.057, threadLength: 0.75, counterboreDiameter: 0.25, counterboreDepth: 0.125 },
28
+ "#6": { headDiameter: 0.226, headHeight: 0.138, socketSize: 0.109375, socketDepth: 0.064, threadLength: 0.75, counterboreDiameter: 0.28125, counterboreDepth: 0.138 },
29
+ "#8": { headDiameter: 0.27, headHeight: 0.164, socketSize: 0.140625, socketDepth: 0.077, threadLength: 0.875, counterboreDiameter: 0.3125, counterboreDepth: 0.164 },
30
+ "#10": { headDiameter: 0.312, headHeight: 0.19, socketSize: 0.15625, socketDepth: 0.09, threadLength: 0.875, counterboreDiameter: 0.375, counterboreDepth: 0.19 },
31
+ "1/4": { headDiameter: 0.375, headHeight: 0.25, socketSize: 0.1875, socketDepth: 0.12, threadLength: 1, counterboreDiameter: 0.4375, counterboreDepth: 0.25 },
32
+ "5/16": { headDiameter: 0.469, headHeight: 0.312, socketSize: 0.25, socketDepth: 0.151, threadLength: 1.125, counterboreDiameter: 0.53125, counterboreDepth: 0.312 },
33
+ "3/8": { headDiameter: 0.562, headHeight: 0.375, socketSize: 0.3125, socketDepth: 0.182, threadLength: 1.25, counterboreDiameter: 0.625, counterboreDepth: 0.375 },
34
+ "7/16": { headDiameter: 0.656, headHeight: 0.438, socketSize: 0.375, socketDepth: 0.213, threadLength: 1.375, counterboreDiameter: 0.71875, counterboreDepth: 0.438 },
35
+ "1/2": { headDiameter: 0.75, headHeight: 0.5, socketSize: 0.375, socketDepth: 0.245, threadLength: 1.5, counterboreDiameter: 0.8125, counterboreDepth: 0.5 },
36
+ "5/8": { headDiameter: 0.938, headHeight: 0.625, socketSize: 0.5, socketDepth: 0.307, threadLength: 1.75, counterboreDiameter: 1, counterboreDepth: 0.625 },
37
+ "3/4": { headDiameter: 1.125, headHeight: 0.75, socketSize: 0.625, socketDepth: 0.37, threadLength: 2, counterboreDiameter: 1.1875, counterboreDepth: 0.75 },
38
+ "7/8": { headDiameter: 1.312, headHeight: 0.875, socketSize: 0.75, socketDepth: 0.432, threadLength: 2.25, counterboreDiameter: 1.375, counterboreDepth: 0.875 },
39
+ "1": { headDiameter: 1.5, headHeight: 1, socketSize: 0.75, socketDepth: 0.495, threadLength: 2.5, counterboreDiameter: 1.625, counterboreDepth: 1 },
40
+ };
41
+ export const ANSI_HEX_CAP_SCREWS = {
42
+ "1/4": { acrossFlats: 0.4375, height: 0.15625 },
43
+ "5/16": { acrossFlats: 0.5, height: 0.203125 },
44
+ "3/8": { acrossFlats: 0.5625, height: 0.234375 },
45
+ "7/16": { acrossFlats: 0.625, height: 0.28125 },
46
+ "1/2": { acrossFlats: 0.75, height: 0.3125 },
47
+ "9/16": { acrossFlats: 0.8125, height: 0.359375 },
48
+ "5/8": { acrossFlats: 0.9375, height: 0.390625 },
49
+ "3/4": { acrossFlats: 1.125, height: 0.46875 },
50
+ "7/8": { acrossFlats: 1.3125, height: 0.546875 },
51
+ "1": { acrossFlats: 1.5, height: 0.609375 },
52
+ };
53
+ export const ANSI_HEX_NUTS = {
54
+ "#0": { acrossFlats: 0.15625, height: 0.046875 },
55
+ "#1": { acrossFlats: 0.15625, height: 0.046875 },
56
+ "#2": { acrossFlats: 0.1875, height: 0.0625 },
57
+ "#3": { acrossFlats: 0.1875, height: 0.0625 },
58
+ "#4": { acrossFlats: 0.25, height: 0.09375 },
59
+ "#5": { acrossFlats: 0.3125, height: 0.109375 },
60
+ "#6": { acrossFlats: 0.3125, height: 0.109375 },
61
+ "#8": { acrossFlats: 0.34375, height: 0.125 },
62
+ "#10": { acrossFlats: 0.375, height: 0.125 },
63
+ "#12": { acrossFlats: 0.4375, height: 0.15625 },
64
+ "1/4": { acrossFlats: 0.4375, height: 0.21875 },
65
+ "5/16": { acrossFlats: 0.5, height: 0.265625 },
66
+ "3/8": { acrossFlats: 0.5625, height: 0.328125 },
67
+ "7/16": { acrossFlats: 0.6875, height: 0.375 },
68
+ "1/2": { acrossFlats: 0.75, height: 0.4375 },
69
+ "9/16": { acrossFlats: 0.875, height: 0.484375 },
70
+ "5/8": { acrossFlats: 0.9375, height: 0.546875 },
71
+ "3/4": { acrossFlats: 1.125, height: 0.640625 },
72
+ "7/8": { acrossFlats: 1.3125, height: 0.75 },
73
+ "1": { acrossFlats: 1.5, height: 0.859375 },
74
+ };
75
+ export const ANSI_PLAIN_WASHERS = {
76
+ "#6": { narrow: { innerDiameter: 0.156, outerDiameter: 0.375, thickness: 0.049 }, wide: { innerDiameter: 0.156, outerDiameter: 0.375, thickness: 0.049 } },
77
+ "#8": { narrow: { innerDiameter: 0.188, outerDiameter: 0.438, thickness: 0.049 }, wide: { innerDiameter: 0.188, outerDiameter: 0.438, thickness: 0.049 } },
78
+ "#10": { narrow: { innerDiameter: 0.219, outerDiameter: 0.5, thickness: 0.049 }, wide: { innerDiameter: 0.219, outerDiameter: 0.5, thickness: 0.049 } },
79
+ "#12": { narrow: { innerDiameter: 0.25, outerDiameter: 0.562, thickness: 0.065 }, wide: { innerDiameter: 0.25, outerDiameter: 0.562, thickness: 0.065 } },
80
+ "1/4": { narrow: { innerDiameter: 0.281, outerDiameter: 0.625, thickness: 0.065 }, wide: { innerDiameter: 0.312, outerDiameter: 0.734, thickness: 0.065 } },
81
+ "5/16": { narrow: { innerDiameter: 0.344, outerDiameter: 0.688, thickness: 0.065 }, wide: { innerDiameter: 0.375, outerDiameter: 0.875, thickness: 0.083 } },
82
+ "3/8": { narrow: { innerDiameter: 0.406, outerDiameter: 0.812, thickness: 0.065 }, wide: { innerDiameter: 0.438, outerDiameter: 1, thickness: 0.083 } },
83
+ "7/16": { narrow: { innerDiameter: 0.469, outerDiameter: 0.922, thickness: 0.065 }, wide: { innerDiameter: 0.5, outerDiameter: 1.25, thickness: 0.083 } },
84
+ "1/2": { narrow: { innerDiameter: 0.531, outerDiameter: 1.062, thickness: 0.095 }, wide: { innerDiameter: 0.562, outerDiameter: 1.375, thickness: 0.109 } },
85
+ "9/16": { narrow: { innerDiameter: 0.594, outerDiameter: 1.156, thickness: 0.095 }, wide: { innerDiameter: 0.625, outerDiameter: 1.469, thickness: 0.109 } },
86
+ "5/8": { narrow: { innerDiameter: 0.656, outerDiameter: 1.312, thickness: 0.095 }, wide: { innerDiameter: 0.688, outerDiameter: 1.75, thickness: 0.134 } },
87
+ "3/4": { narrow: { innerDiameter: 0.812, outerDiameter: 1.469, thickness: 0.134 }, wide: { innerDiameter: 0.812, outerDiameter: 2, thickness: 0.148 } },
88
+ "7/8": { narrow: { innerDiameter: 0.938, outerDiameter: 1.75, thickness: 0.134 }, wide: { innerDiameter: 0.938, outerDiameter: 2.25, thickness: 0.165 } },
89
+ "1": { narrow: { innerDiameter: 1.062, outerDiameter: 2, thickness: 0.134 }, wide: { innerDiameter: 1.062, outerDiameter: 2.5, thickness: 0.165 } },
90
+ };
91
+ export const ANSI_SET_SCREWS = {
92
+ "#0": { key: 0.028, depthShort: 0.035, depthLong: 0.05, cupAndFlatShortUpTo: 0.125, coneAndOvalShortUpTo: 0.125, halfDogShortUpTo: 0.125, pointDiameter: 0.033, coneSteepFrom: 0.09375, ovalRadius: 0.045, halfDogDiameter: 0.04, halfDogLength: 0.017 },
93
+ "#1": { key: 0.035, depthShort: 0.035, depthLong: 0.06, cupAndFlatShortUpTo: 0.125, coneAndOvalShortUpTo: 0.1875, halfDogShortUpTo: 0.125, pointDiameter: 0.04, coneSteepFrom: 0.09375, ovalRadius: 0.055, halfDogDiameter: 0.049, halfDogLength: 0.021 },
94
+ "#2": { key: 0.035, depthShort: 0.035, depthLong: 0.06, cupAndFlatShortUpTo: 0.125, coneAndOvalShortUpTo: 0.1875, halfDogShortUpTo: 0.1875, pointDiameter: 0.047, coneSteepFrom: 0.125, ovalRadius: 0.064, halfDogDiameter: 0.057, halfDogLength: 0.024 },
95
+ "#3": { key: 0.05, depthShort: 0.06, depthLong: 0.07, cupAndFlatShortUpTo: 0.1875, coneAndOvalShortUpTo: 0.1875, halfDogShortUpTo: 0.1875, pointDiameter: 0.054, coneSteepFrom: 0.125, ovalRadius: 0.074, halfDogDiameter: 0.066, halfDogLength: 0.027 },
96
+ "#4": { key: 0.05, depthShort: 0.075, depthLong: 0.07, cupAndFlatShortUpTo: 0.1875, coneAndOvalShortUpTo: 0.1875, halfDogShortUpTo: 0.1875, pointDiameter: 0.061, coneSteepFrom: 0.1875, ovalRadius: 0.084, halfDogDiameter: 0.075, halfDogLength: 0.03 },
97
+ "#5": { key: 0.0625, depthShort: 0.075, depthLong: 0.08, cupAndFlatShortUpTo: 0.1875, coneAndOvalShortUpTo: 0.1875, halfDogShortUpTo: 0.1875, pointDiameter: 0.067, coneSteepFrom: 0.1875, ovalRadius: 0.094, halfDogDiameter: 0.083, halfDogLength: 0.033 },
98
+ "#6": { key: 0.0625, depthShort: 0.075, depthLong: 0.08, cupAndFlatShortUpTo: 0.1875, coneAndOvalShortUpTo: 0.25, halfDogShortUpTo: 0.1875, pointDiameter: 0.074, coneSteepFrom: 0.1875, ovalRadius: 0.104, halfDogDiameter: 0.092, halfDogLength: 0.038 },
99
+ "#8": { key: 0.078125, depthShort: 0.075, depthLong: 0.09, cupAndFlatShortUpTo: 0.1875, coneAndOvalShortUpTo: 0.25, halfDogShortUpTo: 0.25, pointDiameter: 0.087, coneSteepFrom: 0.25, ovalRadius: 0.123, halfDogDiameter: 0.109, halfDogLength: 0.043 },
100
+ "#10": { key: 0.09375, depthShort: 0.105, depthLong: 0.1, cupAndFlatShortUpTo: 0.1875, coneAndOvalShortUpTo: 0.25, halfDogShortUpTo: 0.25, pointDiameter: 0.102, coneSteepFrom: 0.25, ovalRadius: 0.142, halfDogDiameter: 0.127, halfDogLength: 0.049 },
101
+ "1/4": { key: 0.125, depthShort: 0.105, depthLong: 0.125, cupAndFlatShortUpTo: 0.25, coneAndOvalShortUpTo: 0.3125, halfDogShortUpTo: 0.3125, pointDiameter: 0.132, coneSteepFrom: 0.3125, ovalRadius: 0.188, halfDogDiameter: 0.156, halfDogLength: 0.067 },
102
+ "5/16": { key: 0.15625, depthShort: 0.14, depthLong: 0.156, cupAndFlatShortUpTo: 0.3125, coneAndOvalShortUpTo: 0.4375, halfDogShortUpTo: 0.375, pointDiameter: 0.172, coneSteepFrom: 0.375, ovalRadius: 0.234, halfDogDiameter: 0.203, halfDogLength: 0.082 },
103
+ "3/8": { key: 0.1875, depthShort: 0.14, depthLong: 0.188, cupAndFlatShortUpTo: 0.375, coneAndOvalShortUpTo: 0.4375, halfDogShortUpTo: 0.4375, pointDiameter: 0.212, coneSteepFrom: 0.4375, ovalRadius: 0.281, halfDogDiameter: 0.25, halfDogLength: 0.099 },
104
+ "7/16": { key: 0.21875, depthShort: 0.19, depthLong: 0.219, cupAndFlatShortUpTo: 0.4375, coneAndOvalShortUpTo: 0.625, halfDogShortUpTo: 0.5, pointDiameter: 0.252, coneSteepFrom: 0.5, ovalRadius: 0.328, halfDogDiameter: 0.297, halfDogLength: 0.114 },
105
+ "1/2": { key: 0.25, depthShort: 0.21, depthLong: 0.25, cupAndFlatShortUpTo: 0.5, coneAndOvalShortUpTo: 0.625, halfDogShortUpTo: 0.625, pointDiameter: 0.291, coneSteepFrom: 0.57, ovalRadius: 0.375, halfDogDiameter: 0.344, halfDogLength: 0.13 },
106
+ "5/8": { key: 0.3125, depthShort: 0.265, depthLong: 0.312, cupAndFlatShortUpTo: 0.625, coneAndOvalShortUpTo: 0.875, halfDogShortUpTo: 0.875, pointDiameter: 0.371, coneSteepFrom: 0.75, ovalRadius: 0.469, halfDogDiameter: 0.469, halfDogLength: 0.164 },
107
+ "3/4": { key: 0.375, depthShort: 0.33, depthLong: 0.375, cupAndFlatShortUpTo: 0.75, coneAndOvalShortUpTo: 1, halfDogShortUpTo: 1, pointDiameter: 0.45, coneSteepFrom: 0.875, ovalRadius: 0.562, halfDogDiameter: 0.562, halfDogLength: 0.196 },
108
+ "7/8": { key: 0.5, depthShort: 0.45, depthLong: 0.5, cupAndFlatShortUpTo: 0.875, coneAndOvalShortUpTo: 1, halfDogShortUpTo: 1, pointDiameter: 0.53, coneSteepFrom: 1, ovalRadius: 0.656, halfDogDiameter: 0.656, halfDogLength: 0.227 },
109
+ "1": { key: 0.5625, depthShort: 0.55, depthLong: 0.562, cupAndFlatShortUpTo: 1, coneAndOvalShortUpTo: 1.25, halfDogShortUpTo: 1.25, pointDiameter: 0.609, coneSteepFrom: 1.125, ovalRadius: 0.75, halfDogDiameter: 0.75, halfDogLength: 0.26 },
110
+ };
111
+ export const ANSI_COUNTERBORE_SINK = 0.02;
112
+ export const HEX_CAP_THREAD_EXTRA_SHORT = 0.25;
113
+ export const HEX_CAP_THREAD_EXTRA_LONG = 0.5;
114
+ export const HEX_CAP_LENGTH_BREAK = 6;
115
+ export const ANSI_CUP_ANGLE = 118;
116
+ export const ANSI_FLAT_ANGLE = 90;
117
+ export const ANSI_CONE_LONG_ANGLE = 90;
118
+ export const ANSI_CONE_SHORT_ANGLE = 118;
@@ -0,0 +1,8 @@
1
+ import type { AnsiThreadSize } from "../threads/thread-types";
2
+ import type { AnsiSetScrewPoint, AnsiWasherSeries, ClearanceFit, HexBoltSizes, HexNutSizes, SetScrewSizes, SocketHeadCapScrewSizes, WasherSizes } from "./fastener-types";
3
+ export declare function ansiClearanceHoleDiameter(size: AnsiThreadSize, fit: ClearanceFit): number;
4
+ export declare function ansiSocketHeadCapScrewSizes(size: AnsiThreadSize): SocketHeadCapScrewSizes;
5
+ export declare function ansiHexBoltSizes(size: AnsiThreadSize, length: number): HexBoltSizes;
6
+ export declare function ansiHexNutSizes(size: AnsiThreadSize): HexNutSizes;
7
+ export declare function ansiWasherSizes(size: AnsiThreadSize, series: AnsiWasherSeries): WasherSizes;
8
+ export declare function ansiSetScrewSizes(size: AnsiThreadSize, point: AnsiSetScrewPoint, series: "UNC" | "UNF", length?: number): SetScrewSizes;
@@ -0,0 +1,64 @@
1
+ import * as Inputs from "../inputs";
2
+ import { InputError } from "../kernel-calls/errors";
3
+ import { radiansOf, roundedToMillionths } from "../services/helpers/geometry/scalars";
4
+ import { ansiThread, checkedAnsiSize } from "../threads/ansi-threads";
5
+ import { UNIFIED_THREADS } from "../threads/ansi-threads.constants";
6
+ import { ANSI_CLEARANCE_HOLES, ANSI_CONE_LONG_ANGLE, ANSI_CONE_SHORT_ANGLE, ANSI_COUNTERBORE_SINK, ANSI_CUP_ANGLE, ANSI_FLAT_ANGLE, ANSI_HEX_CAP_SCREWS, ANSI_HEX_NUTS, ANSI_PLAIN_WASHERS, ANSI_SET_SCREWS, ANSI_SOCKET_HEAD_CAP_SCREWS, HEX_CAP_LENGTH_BREAK, HEX_CAP_THREAD_EXTRA_LONG, HEX_CAP_THREAD_EXTRA_SHORT, } from "./ansi-fasteners.constants";
7
+ import { checkedFit } from "./fasteners";
8
+ const POINTS = Object.values(Inputs.Engineering.ansiSetScrewPointEnum);
9
+ const WASHER_SERIES = Object.values(Inputs.Engineering.ansiWasherSeriesEnum);
10
+ const listed = (row, size, standard) => {
11
+ if (row === undefined) {
12
+ throw new InputError(`\`size\` is ${size}, which ${standard} gives no size for.`, "size");
13
+ }
14
+ return row;
15
+ };
16
+ export function ansiClearanceHoleDiameter(size, fit) {
17
+ return listed(ANSI_CLEARANCE_HOLES[checkedAnsiSize(size)], size, "ASME B18.2.8")[checkedFit(fit)];
18
+ }
19
+ export function ansiSocketHeadCapScrewSizes(size) {
20
+ const row = listed(ANSI_SOCKET_HEAD_CAP_SCREWS[checkedAnsiSize(size)], size, "ASME B18.3");
21
+ return Object.assign(Object.assign({}, row), { counterboreDepth: roundedToMillionths(row.counterboreDepth + ANSI_COUNTERBORE_SINK) });
22
+ }
23
+ export function ansiHexBoltSizes(size, length) {
24
+ const row = listed(ANSI_HEX_CAP_SCREWS[checkedAnsiSize(size)], size, "ASME B18.2.1");
25
+ if (!(length > 0)) {
26
+ throw new InputError("`length` is not more than 0.", "length");
27
+ }
28
+ const extra = length <= HEX_CAP_LENGTH_BREAK ? HEX_CAP_THREAD_EXTRA_SHORT : HEX_CAP_THREAD_EXTRA_LONG;
29
+ return { acrossFlats: row.acrossFlats, headHeight: row.height, threadLength: roundedToMillionths(2 * UNIFIED_THREADS[size].diameter + extra) };
30
+ }
31
+ export function ansiHexNutSizes(size) {
32
+ const row = ANSI_HEX_NUTS[checkedAnsiSize(size)];
33
+ return { acrossFlats: row.acrossFlats, height: row.height };
34
+ }
35
+ export function ansiWasherSizes(size, series) {
36
+ const row = listed(ANSI_PLAIN_WASHERS[checkedAnsiSize(size)], size, "ASME B18.22.1");
37
+ if (!WASHER_SERIES.includes(series)) {
38
+ throw new InputError(`\`series\` is not one of ${WASHER_SERIES.join(", ")}.`, "series");
39
+ }
40
+ return Object.assign({}, row[series]);
41
+ }
42
+ export function ansiSetScrewSizes(size, point, series, length = Infinity) {
43
+ const row = listed(ANSI_SET_SCREWS[checkedAnsiSize(size)], size, "ASME B18.3");
44
+ if (!POINTS.includes(point)) {
45
+ throw new InputError(`\`point\` is not one of ${POINTS.join(", ")}.`, "point");
46
+ }
47
+ const root = ansiThread(size, series).minorDiameter / 2;
48
+ const shortUpTo = point === "cup" || point === "flat" ? row.cupAndFlatShortUpTo : point === "halfDog" ? row.halfDogShortUpTo : row.coneAndOvalShortUpTo;
49
+ const short = length < shortUpTo;
50
+ const socket = { socketSize: row.key, socketDepth: short ? Math.min(row.depthShort, row.depthLong) : row.depthLong, shortUpTo };
51
+ if (point === "cup") {
52
+ return Object.assign(Object.assign({}, socket), { pointDiameter: row.pointDiameter, pointLength: roundedToMillionths(row.pointDiameter / 2 / Math.tan(radiansOf(ANSI_CUP_ANGLE / 2))), pointAngle: ANSI_CUP_ANGLE, pointRadius: 0 });
53
+ }
54
+ if (point === "cone") {
55
+ const angle = length >= row.coneSteepFrom ? ANSI_CONE_LONG_ANGLE : ANSI_CONE_SHORT_ANGLE;
56
+ return Object.assign(Object.assign({}, socket), { pointDiameter: 0, pointLength: roundedToMillionths(root / Math.tan(radiansOf(angle / 2))), pointAngle: angle, pointRadius: 0 });
57
+ }
58
+ if (point === "oval") {
59
+ return Object.assign(Object.assign({}, socket), { pointDiameter: 0, pointLength: roundedToMillionths(row.ovalRadius - Math.sqrt(row.ovalRadius * row.ovalRadius - root * root)), pointAngle: 0, pointRadius: row.ovalRadius });
60
+ }
61
+ const diameter = point === "flat" ? row.pointDiameter : row.halfDogDiameter;
62
+ const chamfer = (root - diameter / 2) / Math.tan(radiansOf(ANSI_FLAT_ANGLE / 2));
63
+ return Object.assign(Object.assign({}, socket), { pointDiameter: diameter, pointLength: roundedToMillionths(chamfer + (point === "halfDog" ? row.halfDogLength : 0)), pointAngle: ANSI_FLAT_ANGLE, pointRadius: 0 });
64
+ }
@@ -0,0 +1,161 @@
1
+ import type * as Inputs from "../inputs";
2
+ /**
3
+ * How closely a clearance hole fits its screw: `close` (fine), `normal` (medium) or `loose`
4
+ * (coarse), as ISO 273 and ASME B18.2.8 grade it.
5
+ */
6
+ export type ClearanceFit = `${Inputs.Engineering.clearanceFitEnum}`;
7
+ /**
8
+ * The sizes of a socket head cap screw's head, from `fasteners.iso.socketHeadCapScrewSizes` or
9
+ * `fasteners.ansi.socketHeadCapScrewSizes`, in the unit asked for.
10
+ */
11
+ export interface SocketHeadCapScrewSizes {
12
+ /** The diameter of the round head. */
13
+ readonly headDiameter: number;
14
+ /** The height of the head. */
15
+ readonly headHeight: number;
16
+ /** The width across the flats of the hexagon socket, the key that turns it. */
17
+ readonly socketSize: number;
18
+ /** How deep the socket goes. */
19
+ readonly socketDepth: number;
20
+ /** The length of thread on a screw too long to be threaded to the head. */
21
+ readonly threadLength: number;
22
+ /** The diameter of the counterbore that sinks the head. */
23
+ readonly counterboreDiameter: number;
24
+ /** The depth of that counterbore, so the head sits just below the face. */
25
+ readonly counterboreDepth: number;
26
+ }
27
+ /**
28
+ * The sizes of a hexagon head bolt's head, from `fasteners.iso.hexBoltSizes` or
29
+ * `fasteners.ansi.hexBoltSizes`, in the unit asked for.
30
+ */
31
+ export interface HexBoltSizes {
32
+ /** The width across the flats of the head. */
33
+ readonly acrossFlats: number;
34
+ /** The height of the head. */
35
+ readonly headHeight: number;
36
+ /** The length of thread on a bolt threaded only part of its length. */
37
+ readonly threadLength: number;
38
+ }
39
+ /**
40
+ * The sizes of a hexagon nut, from `fasteners.iso.hexNutSizes` or `fasteners.ansi.hexNutSizes`, in
41
+ * the unit asked for.
42
+ */
43
+ export interface HexNutSizes {
44
+ /** The width across the flats. */
45
+ readonly acrossFlats: number;
46
+ /** The height of the nut. */
47
+ readonly height: number;
48
+ }
49
+ /**
50
+ * The sizes of a plain washer, from `fasteners.iso.washerSizes` or `fasteners.ansi.washerSizes`, in
51
+ * the unit asked for.
52
+ */
53
+ export interface WasherSizes {
54
+ /** The diameter of the hole. */
55
+ readonly innerDiameter: number;
56
+ /** The outside diameter. */
57
+ readonly outerDiameter: number;
58
+ /** How thick the washer is. */
59
+ readonly thickness: number;
60
+ }
61
+ /**
62
+ * The point of an ISO hexagon socket set screw: flat (ISO 4026), cone (ISO 4027), dog (ISO 4028) or
63
+ * cup (ISO 4029).
64
+ */
65
+ export type IsoSetScrewPoint = `${Inputs.Engineering.isoSetScrewPointEnum}`;
66
+ /**
67
+ * A hexagon socket set screw, from `fasteners.iso.setScrewSizes` or `fasteners.ansi.setScrewSizes`,
68
+ * in the unit asked for.
69
+ */
70
+ export interface SetScrewSizes {
71
+ /** The hexagon socket's width across flats. */
72
+ readonly socketSize: number;
73
+ /** How deep the socket is at least, which the standard may set lower for a short screw. */
74
+ readonly socketDepth: number;
75
+ /** The diameter of the point: the flat or the dog, the cup's rim, or the cone's tip. */
76
+ readonly pointDiameter: number;
77
+ /**
78
+ * How long the point is along the axis below the thread's root: the chamfer down to a flat, the
79
+ * cone, the dog's cylinder after its chamfer, or the depth of the cup.
80
+ */
81
+ readonly pointLength: number;
82
+ /** The included angle of the point's chamfer or cone, in degrees; 0 for an oval point. */
83
+ readonly pointAngle: number;
84
+ /** The radius of an oval point's dome; 0 for every other point. */
85
+ readonly pointRadius: number;
86
+ /** Where short screws end: ISO counts a screw this long as short, ASME B18.3 only a shorter one. A short screw has a shallower socket, and under ISO a blunter cone. */
87
+ readonly shortUpTo: number;
88
+ }
89
+ /**
90
+ * A plain washer chamfered on the outside of one face, from `fasteners.iso.chamferedWasherSizes`,
91
+ * in the unit asked for.
92
+ */
93
+ export interface ChamferedWasherSizes extends WasherSizes {
94
+ /** How far the chamfer reaches down the outside, along the axis. */
95
+ readonly chamferHeight: number;
96
+ /** How far the chamfer reaches in from the outside, across the face. */
97
+ readonly chamferWidth: number;
98
+ }
99
+ export interface ScrewHeadRow {
100
+ readonly headDiameter: number;
101
+ readonly headHeight: number;
102
+ readonly socketSize: number;
103
+ readonly socketDepth: number;
104
+ readonly counterboreDiameter: number;
105
+ }
106
+ export interface HexRow {
107
+ readonly acrossFlats: number;
108
+ readonly height: number;
109
+ }
110
+ export interface ClearanceRow {
111
+ readonly close: number;
112
+ readonly normal: number;
113
+ readonly loose: number;
114
+ }
115
+ export interface SetScrewPointRow {
116
+ readonly diameter: number;
117
+ readonly shortUpTo: number;
118
+ }
119
+ export interface DogPointRow extends SetScrewPointRow {
120
+ readonly lengthShort: number;
121
+ readonly lengthLong: number;
122
+ }
123
+ export interface IsoSetScrewRow {
124
+ readonly key: number;
125
+ readonly depthShort: number;
126
+ readonly depthLong: number;
127
+ readonly flat: SetScrewPointRow;
128
+ readonly cone: SetScrewPointRow;
129
+ readonly dog: DogPointRow;
130
+ readonly cup: SetScrewPointRow;
131
+ }
132
+ /**
133
+ * The point of an ASME B18.3 hexagon socket set screw: cup, flat, cone, oval or half dog.
134
+ */
135
+ export type AnsiSetScrewPoint = `${Inputs.Engineering.ansiSetScrewPointEnum}`;
136
+ /**
137
+ * The series of an ASME B18.22.1 type A plain washer: narrow, the former SAE sizes, or wide, the
138
+ * former standard plate sizes.
139
+ */
140
+ export type AnsiWasherSeries = `${Inputs.Engineering.ansiWasherSeriesEnum}`;
141
+ export interface AnsiScrewHeadRow extends ScrewHeadRow {
142
+ readonly threadLength: number;
143
+ readonly counterboreDepth: number;
144
+ }
145
+ export interface AnsiWasherRow {
146
+ readonly narrow: WasherSizes;
147
+ readonly wide: WasherSizes;
148
+ }
149
+ export interface AnsiSetScrewRow {
150
+ readonly key: number;
151
+ readonly depthShort: number;
152
+ readonly depthLong: number;
153
+ readonly cupAndFlatShortUpTo: number;
154
+ readonly coneAndOvalShortUpTo: number;
155
+ readonly halfDogShortUpTo: number;
156
+ readonly pointDiameter: number;
157
+ readonly coneSteepFrom: number;
158
+ readonly ovalRadius: number;
159
+ readonly halfDogDiameter: number;
160
+ readonly halfDogLength: number;
161
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare const SCREW_HEAD_LENGTHS: readonly ["headDiameter", "headHeight", "socketSize", "socketDepth", "threadLength", "counterboreDiameter", "counterboreDepth"];
2
+ export declare const HEX_BOLT_LENGTHS: readonly ["acrossFlats", "headHeight", "threadLength"];
3
+ export declare const HEX_NUT_LENGTHS: readonly ["acrossFlats", "height"];
4
+ export declare const WASHER_LENGTHS: readonly ["innerDiameter", "outerDiameter", "thickness"];
5
+ export declare const SET_SCREW_LENGTHS: readonly ["socketSize", "socketDepth", "pointDiameter", "pointLength", "pointRadius", "shortUpTo"];
@@ -0,0 +1,5 @@
1
+ export const SCREW_HEAD_LENGTHS = ["headDiameter", "headHeight", "socketSize", "socketDepth", "threadLength", "counterboreDiameter", "counterboreDepth"];
2
+ export const HEX_BOLT_LENGTHS = ["acrossFlats", "headHeight", "threadLength"];
3
+ export const HEX_NUT_LENGTHS = ["acrossFlats", "height"];
4
+ export const WASHER_LENGTHS = ["innerDiameter", "outerDiameter", "thickness"];
5
+ export const SET_SCREW_LENGTHS = ["socketSize", "socketDepth", "pointDiameter", "pointLength", "pointRadius", "shortUpTo"];
@@ -0,0 +1,2 @@
1
+ import type { ClearanceFit } from "./fastener-types";
2
+ export declare function checkedFit(fit: ClearanceFit): ClearanceFit;
@@ -0,0 +1,9 @@
1
+ import * as Inputs from "../inputs";
2
+ import { InputError } from "../kernel-calls/errors";
3
+ const FITS = Object.values(Inputs.Engineering.clearanceFitEnum);
4
+ export function checkedFit(fit) {
5
+ if (!FITS.includes(fit)) {
6
+ throw new InputError(`\`fit\` is not one of ${FITS.join(", ")}.`, "fit");
7
+ }
8
+ return fit;
9
+ }