create-rulecad 0.3.22 → 0.3.23
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
CHANGED
|
@@ -5,6 +5,19 @@ print (a hole's diameter, a seat's depth, a part's outline). Each release lists
|
|
|
5
5
|
it makes, with its reason. A **fasten** is an entry in an assembly's `"fasten"` list: one screwed joint, naming the
|
|
6
6
|
screw by thread and head, the parts it passes through and the part it ends in.
|
|
7
7
|
|
|
8
|
+
## 0.3.23: the leg on a 17HS4401 knee and 12 V
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- `--machine leg` makes the stand on a 17HS4401 at hip and knee, the 12 V bench supply limited to 1.5 A and
|
|
13
|
+
`"have": true` on the motors, drivers, shield and supply, as the worked leg in @rulecad/cad's EXAMPLES chapter 14.
|
|
14
|
+
Its stand steps under `leg.stand_load`, the larger of the robot's share and what rides the rods (`leg.riding`,
|
|
15
|
+
1.01 kg), and the message says which: a 2 kg robot's 1 kg share is under it, a 3 kg robot's 1.5 kg is over.
|
|
16
|
+
|
|
17
|
+
### Printed sizes
|
|
18
|
+
|
|
19
|
+
- The thigh: the knee motor's four M3 holes on a 31 mm square (the 17HS4401's), was 26 mm (the NEMA 14's).
|
|
20
|
+
|
|
8
21
|
## 0.3.22: the arm streams in time (#181)
|
|
9
22
|
|
|
10
23
|
### Changed
|
package/index.mjs
CHANGED
|
@@ -105,7 +105,9 @@ async function sized() {
|
|
|
105
105
|
const file = path.join(dir, 'rules/leg.json'), rules = JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
106
106
|
rules.rules.robot = { ...rules.rules.robot, value: robot };
|
|
107
107
|
fs.writeFileSync(file, `${JSON.stringify(rules, null, 2)}\n`);
|
|
108
|
-
|
|
108
|
+
// The stand steps under the robot's share, or under what rides its rods (the leg and its carriage) if that is more
|
|
109
|
+
const riding = rules.rules.riding.value, load = Math.max(robot / 2, riding);
|
|
110
|
+
return console.log(` a leg on its stand, for a ${robot} kg robot; its share of the weight is ${robot / 2} kg, and the stand steps under ${load} kg${load > robot / 2 ? ', what the leg and its carriage weigh' : ''}: rules/leg.json`);
|
|
109
111
|
}
|
|
110
112
|
if (!SHEETS[sheet]) { console.error(`--sheet is ${Object.keys(SHEETS).join(', ')} (got "${o.sheet}"; a larger sheet's links wouldn't fit a 256 mm bed)`); process.exit(1); }
|
|
111
113
|
if (!(accuracy > 0)) { console.error(`--accuracy is above 0 mm (got "${o.accuracy}")`); process.exit(1); }
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
{ "id": "carriage", "object": "carriage", "rotate": [90, 0, 0] },
|
|
10
10
|
{ "id": "lm1", "bought": "lm8uu", "at": ["0 - leg.rod_x", "0 - leg.rod_y", "0 - carriage.boss_long / 2"] },
|
|
11
11
|
{ "id": "lm2", "bought": "lm8uu", "at": ["leg.rod_x", "0 - leg.rod_y", "0 - carriage.boss_long / 2"] },
|
|
12
|
-
{ "id": "m1", "motor": { "model": "17HS4401", "drives": "hd", "speed": 200, "duty": 0.3, "driver": "d1", "current": 0.5, "microsteps": 8 } },
|
|
12
|
+
{ "id": "m1", "motor": { "model": "17HS4401", "drives": "hd", "speed": 200, "duty": 0.3, "driver": "d1", "current": 0.5, "microsteps": 8 }, "have": true },
|
|
13
13
|
{ "id": "housing", "object": "housing", "rotate": [-90, 0, 0] },
|
|
14
14
|
{ "id": "sun", "object": "sun" },
|
|
15
15
|
{ "id": "carrier", "object": "speck" },
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
{ "id": "bridge", "object": "bridge", "at": [0, "leg.bridge_low", 0], "rotate": [-90, 0, 0] },
|
|
20
20
|
{ "id": "b1", "bought": "bearing-6800", "at": [0, "leg.bridge_low + leg.bridge - leg.bearing_width", 0], "rotate": [-90, 0, 0] },
|
|
21
21
|
{ "id": "thigh", "object": "thigh" },
|
|
22
|
-
{ "id": "m2", "motor": { "model": "
|
|
22
|
+
{ "id": "m2", "motor": { "model": "17HS4401", "drives": "kd", "speed": 200, "duty": 0.3, "driver": "d2", "current": 0.5, "microsteps": 8 }, "have": true },
|
|
23
23
|
{ "id": "esun", "object": "sun", "set": { "tip": 11.7 } },
|
|
24
24
|
{ "id": "ecarrier", "object": "speck" }, { "id": "ering", "object": "speck" },
|
|
25
25
|
{ "id": "ep1", "object": "planet" }, { "id": "ep2", "object": "planet" }, { "id": "ep3", "object": "planet" },
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
{ "id": "collar1", "object": "collar", "rotate": [0, 0, 180], "at": ["0 - leg.rod_x", "0 - leg.rod_y", "0 - carriage.boss_long / 2 - leg.stop_drop - collar1.high"] },
|
|
35
35
|
{ "id": "collar2", "object": "collar", "at": ["leg.rod_x", "0 - leg.rod_y", "0 - carriage.boss_long / 2 - leg.stop_drop - collar2.high"] },
|
|
36
36
|
{ "id": "scale", "object": "scale", "at": [0, 5, "0 - leg.stance - leg.foot_r - leg.scale_h"] },
|
|
37
|
-
{ "id": "d1", "bought": "drv8825", "at": [240, -30, -180] },
|
|
38
|
-
{ "id": "d2", "bought": "drv8825", "at": [240, 0, -180] },
|
|
39
|
-
{ "id": "shield", "bought": "cnc-shield-v3", "at": [240, 0, -190] },
|
|
40
|
-
{ "id": "psu", "bought": "supply-
|
|
37
|
+
{ "id": "d1", "bought": "drv8825", "at": [240, -30, -180], "have": true },
|
|
38
|
+
{ "id": "d2", "bought": "drv8825", "at": [240, 0, -180], "have": true },
|
|
39
|
+
{ "id": "shield", "bought": "cnc-shield-v3", "at": [240, 0, -190], "have": true },
|
|
40
|
+
{ "id": "psu", "bought": "supply-12v", "set": { "output_current": 1.5 }, "at": [300, 150, -190], "have": true }
|
|
41
41
|
],
|
|
42
42
|
"joints": [
|
|
43
43
|
{ "id": "m1_on", "type": "fixed", "parent": "housing.motor", "child": "m1.face" },
|
|
@@ -104,8 +104,8 @@
|
|
|
104
104
|
"wires": [
|
|
105
105
|
{ "id": "hip_wire", "from": "m1.connector", "to": "shield.X", "via": ["carriage.cable"], "gauge": "awg24", "colour": "black, red, green, blue", "connectors": ["JST-XH 4 pin", "screw terminal"] },
|
|
106
106
|
{ "id": "knee_wire", "from": "m2.connector", "to": "shield.Y", "via": ["thigh.cable", "carriage.cable"], "gauge": "awg24", "colour": "black, red, green, blue", "connectors": ["JST-XH 4 pin", "screw terminal"] },
|
|
107
|
-
{ "id": "power", "from": "psu.terminals", "to": "shield.top", "gauge": "awg22", "colour": "red, black", "conductors": 2, "current": 2, "connectors": ["Ring terminal", "Screw terminal"], "note": "
|
|
107
|
+
{ "id": "power", "from": "psu.terminals", "to": "shield.top", "gauge": "awg22", "colour": "red, black", "conductors": 2, "current": 2, "connectors": ["Ring terminal", "Screw terminal"], "note": "12 V from the bench supply, its current limit at 1.5 A, into the shield's motor terminals" }
|
|
108
108
|
],
|
|
109
|
-
"gait": { "legs": ["shin.tip"], "pattern": { "duty": 0.6, "phase": [0] }, "stride": "leg.stride", "lift": "leg.lift", "period": 2, "height": "leg.stance", "mass": "leg.
|
|
109
|
+
"gait": { "legs": ["shin.tip"], "pattern": { "duty": 0.6, "phase": [0] }, "stride": "leg.stride", "lift": "leg.lift", "period": 2, "height": "leg.stance", "mass": "leg.stand_load", "clearance": 12 },
|
|
110
110
|
"poses": { "standing": { "hd": -5587.7, "kd": -2236 } }
|
|
111
111
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// The thigh, drawn as it prints: its outer face on the bed, the knee's ring standing on it, the hub's socket opening
|
|
2
|
-
// upward. The knee's
|
|
2
|
+
// upward. The knee's 17HS4401, the hip's motor, bolts on the bed side, its shaft up through the plate, as the arm's elbow does.
|
|
3
3
|
// The screws' holes are v.fixings': an M3 clearance hole through the socket's floor for the screw into the spindle,
|
|
4
4
|
// and an M3 pilot in each post for its clip.
|
|
5
5
|
import jscad from '@jscad/modeling'
|
|
@@ -10,7 +10,7 @@ const { hull } = jscad.hulls
|
|
|
10
10
|
|
|
11
11
|
export function main (v) {
|
|
12
12
|
const screw = v.fixings.holeModel('M3').diameter, pilot = v.fixings.holeModel('M3', { kind: 'pilot' }).diameter
|
|
13
|
-
const motor = v.motors.motorModel('
|
|
13
|
+
const motor = v.motors.motorModel('17HS4401')
|
|
14
14
|
const at = (r, a) => [v.long + r * Math.cos(a), r * Math.sin(a)]
|
|
15
15
|
const posts = [v.p1, v.p2, v.p3].map((a) => a * v.rad)
|
|
16
16
|
const round = (r, c) => translate([c, 0], circle({ radius: r, segments: v.segments }))
|
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
"lift": {"value": 15, "unit": "mm", "rule": "The foot's lift in swing", "kind": "default", "source": "EXAMPLES chapter 14", "checked": "2026-11-09"},
|
|
27
27
|
"robot": {"value": 1.5, "unit": "kg", "rule": "The small robot the leg is sized for first; the quadruped built from these parts weighs more, and the chapter says how much", "kind": "default", "source": "EXAMPLES chapter 14", "checked": "2026-11-09"},
|
|
28
28
|
"share": {"value": "robot / 2", "unit": "kg", "rule": "Each leg's share in a trot, the most: two feet down at once", "kind": "default", "source": "Statics: the weight split over the two feet in stance", "checked": "2026-11-09"},
|
|
29
|
+
"riding": {"value": 1.01, "unit": "kg", "rule": "What rides the stand's rods, and so stands on the foot: the leg (its two 17HS4401s 560 g, its prints 295 g, the 6800 5 g), the carriage 92 g, its two LM8UU 32 g and the screws 24 g", "kind": "derived", "source": "cad list leg/stand, summed by hand", "checked": "2026-11-23"},
|
|
30
|
+
"stand_load": {"value": "max(share, riding)", "unit": "kg", "rule": "The stand's load in its gait: the robot's share, or what rides the rods if that is more, since the foot carries all of it", "kind": "derived", "source": "Statics: the carriage, lifted off its stops, stands on the foot", "checked": "2026-11-23"},
|
|
29
31
|
"scale_h": {"value": 25, "unit": "mm", "rule": "A kitchen scale's height: the foot's ground is its top. Yours differs", "kind": "estimate", "source": "A guess at a common 5 kg scale: measure yours", "checked": "2026-11-09"},
|
|
30
32
|
"stop_drop": {"value": 3, "unit": "mm", "rule": "How far the carriage drops onto its stops when the foot lifts: the foot pushes it up this much standing, so the scale carries the leg", "kind": "default", "source": "EXAMPLES chapter 14", "checked": "2026-11-09"},
|
|
31
33
|
"rod_x": {"value": 90, "unit": "mm", "rule": "Each rod's distance from the middle: a 130 mm scale fits between the feet", "kind": "default", "source": "EXAMPLES chapter 14", "checked": "2026-11-09"},
|
|
@@ -36,7 +38,7 @@
|
|
|
36
38
|
"body_half": {"value": 75, "unit": "mm", "rule": "Hip to hip along the body, halved: the side plate, 242 mm long, fits on a 256 mm bed, and the knees point outward so they stay apart", "kind": "default", "source": "EXAMPLES chapter 14", "checked": "2026-11-09"},
|
|
37
39
|
"body_w": {"value": 50, "unit": "mm", "rule": "The body's half-width, to the hips' plates: two hip motors back to back fit inside", "kind": "default", "source": "EXAMPLES chapter 14", "checked": "2026-11-09"},
|
|
38
40
|
"side_t": {"value": 6, "unit": "mm", "rule": "The side plate's thickness", "kind": "default", "source": "EXAMPLES chapter 14", "checked": "2026-11-09"},
|
|
39
|
-
"robot_mass": {"value":
|
|
41
|
+
"robot_mass": {"value": 4.2, "unit": "kg", "rule": "The quadruped as drawn: 3.83 kg of prints, eight 17HS4401s, bearings and screws from cad list, and about 0.4 kg for its drivers, an Uno and shield, a battery and the wires, an estimate until built", "kind": "estimate", "source": "cad list leg/quadruped (3834 g, the knees 17HS4401s at 280 g each) and a guess at the electronics", "checked": "2026-11-23"},
|
|
40
42
|
"foot_socket": {"value": 12, "unit": "mm", "rule": "How far each rod goes into a foot block", "kind": "default", "source": "EXAMPLES chapter 14", "checked": "2026-11-09"}
|
|
41
43
|
}
|
|
42
44
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-rulecad",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.23",
|
|
4
4
|
"description": "Start a rulecad project: npm create rulecad my-designs. A workspace with a soap tray to start from, ready to check, preview, export and share.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|