@rulecad/gears 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/contact.mjs +1 -1
- package/core.d.mts +419 -0
- package/core.mjs +696 -0
- package/diagram.mjs +1 -1
- package/gears.d.mts +1 -419
- package/gears.mjs +4 -684
- package/package.json +4 -1
- package/planetary.mjs +1 -1
- package/tooth.mjs +1 -1
- package/worm.mjs +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rulecad/gears",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Gears for printed parts: involute spur gears, racks and ring gears drawn from their rules, with their numbers, how a pair meshes (centre distance, ratio, contact ratio, phase) and how they print.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -15,18 +15,21 @@
|
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"gears.mjs",
|
|
18
|
+
"core.mjs",
|
|
18
19
|
"planetary.mjs",
|
|
19
20
|
"contact.mjs",
|
|
20
21
|
"tooth.mjs",
|
|
21
22
|
"worm.mjs",
|
|
22
23
|
"diagram.mjs",
|
|
23
24
|
"gears.d.mts",
|
|
25
|
+
"core.d.mts",
|
|
24
26
|
"planetary.d.mts",
|
|
25
27
|
"contact.d.mts",
|
|
26
28
|
"tooth.d.mts",
|
|
27
29
|
"worm.d.mts",
|
|
28
30
|
"diagram.d.mts",
|
|
29
31
|
"README.md",
|
|
32
|
+
"CHANGELOG.md",
|
|
30
33
|
"LICENSE"
|
|
31
34
|
],
|
|
32
35
|
"license": "MIT",
|
package/planetary.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// −R / S). planetary() finds the teeth for a wanted ratio that also put together: the ring is the sun and two planets
|
|
4
4
|
// across (R = S + 2P), the planets go in evenly spaced ((S + R) a whole number of times the planets), and they clear
|
|
5
5
|
// each other. It lays the gearbox out with every planet in phase with the sun and the ring.
|
|
6
|
-
import { gearModel, internalModel, mesh, phase } from './
|
|
6
|
+
import { gearModel, internalModel, mesh, phase } from './core.mjs';
|
|
7
7
|
|
|
8
8
|
const DEG = Math.PI / 180;
|
|
9
9
|
const MEMBERS = ['sun', 'carrier', 'ring'];
|
package/tooth.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// stress), the rim's cut edges held, the load at the tip along the line of action. The peak stress at the root, with
|
|
3
3
|
// the fillet and the printed shape as they are, against Lewis's number, which leaves the fillet's concentration out.
|
|
4
4
|
import { grid, analyse, positions } from '@rulecad/fea';
|
|
5
|
-
import { gearModel, spurProfile, lewisFactor } from './
|
|
5
|
+
import { gearModel, spurProfile, lewisFactor } from './core.mjs';
|
|
6
6
|
|
|
7
7
|
const fmt = (x, d = 1) => String(+x.toFixed(d));
|
|
8
8
|
const inside = ([x, y], pts) => { let c = false; for (let i = 0, j = pts.length - 1; i < pts.length; j = i++) { const [xi, yi] = pts[i], [xj, yj] = pts[j]; if ((yi > y) !== (yj > y) && x < ((xj - xi) * (y - yi)) / (yj - yi) + xi) c = !c; } return c; };
|
package/worm.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// printed teeth, a little soft, spread). One turn of a worm of s starts moves its wheel s teeth. With a lead angle
|
|
4
4
|
// under the friction angle it locks: the wheel can't turn the worm.
|
|
5
5
|
import jscad from '@jscad/modeling';
|
|
6
|
-
import { rackProfile, helical, gearModel } from './
|
|
6
|
+
import { rackProfile, helical, gearModel } from './core.mjs';
|
|
7
7
|
|
|
8
8
|
const { extrudeFromSlices, slice } = jscad.extrusions;
|
|
9
9
|
const { mat4 } = jscad.maths;
|