@rulecad/cad 0.7.55 → 0.7.56
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/AGENTS.md +16 -7
- package/CHANGELOG.md +108 -0
- package/EXAMPLES.md +579 -267
- package/README.md +30 -11
- package/TUTORIAL.md +25 -15
- package/bin/cad.mjs +21 -5
- package/lib/assembly.mjs +6 -0
- package/lib/design.mjs +6 -4
- package/lib/edit.mjs +26 -1
- package/lib/fasten.mjs +72 -15
- package/lib/jsonedit.mjs +19 -0
- package/lib/list.mjs +2 -2
- package/lib/motors.mjs +21 -10
- package/lib/order.mjs +4 -1
- package/lib/schema.mjs +3 -2
- package/lib/sheet.mjs +20 -3
- package/package.json +6 -5
- package/schemas/assembly.schema.json +14 -9
- package/schemas/object.schema.json +2 -2
package/EXAMPLES.md
CHANGED
|
@@ -289,7 +289,8 @@ whether the stiffness has settled.
|
|
|
289
289
|
## 6. A board, and a case that reads it
|
|
290
290
|
|
|
291
291
|
A four-key pad: keys in a matrix, one diode each, and a Pico beside them. Every track is drawn by rule; the
|
|
292
|
-
checks run the fab's design rules.
|
|
292
|
+
checks run the fab's design rules. Then a printed case for it, which reads the board's size and holes, and the board
|
|
293
|
+
screwed into it.
|
|
293
294
|
|
|
294
295
|
```json projects/home/objects/pad.json
|
|
295
296
|
{
|
|
@@ -298,6 +299,7 @@ checks run the fab's design rules.
|
|
|
298
299
|
"title": "Four-key pad",
|
|
299
300
|
"version": "0.1.0",
|
|
300
301
|
"engine": "pcb",
|
|
302
|
+
"role": "board",
|
|
301
303
|
"uses": ["mx", "pico", "sod123", "m2", "jlcpcb"],
|
|
302
304
|
"variables": {
|
|
303
305
|
"rows": { "value": 2, "rule": "Two rows" },
|
|
@@ -309,7 +311,7 @@ checks run the fab's design rules.
|
|
|
309
311
|
"mcu_gap": { "value": 2, "unit": "mm", "rule": "Between the keys and the Pico" },
|
|
310
312
|
"mcu_side": { "value": "left", "choice": ["left", "right"], "rule": "Which way the Pico's USB faces" },
|
|
311
313
|
"mcu_row": { "value": 0, "rule": "Which key row the Pico sits beside" },
|
|
312
|
-
"mount_holes": { "value": 1, "rule": "
|
|
314
|
+
"mount_holes": { "value": 1, "rule": "A mounting hole in each corner: the recipe names each by its screw's thread, below" },
|
|
313
315
|
"controller": { "value": "beside", "choice": ["beside", "under"], "rule": "The Pico beside the keys" }
|
|
314
316
|
}
|
|
315
317
|
}
|
|
@@ -323,13 +325,112 @@ export function main (v) {
|
|
|
323
325
|
}
|
|
324
326
|
```
|
|
325
327
|
|
|
328
|
+
`"role": "board"` says the fab makes it: it is not printed, and a list leaves it out of the plastic.
|
|
329
|
+
|
|
326
330
|
```sh
|
|
327
331
|
npx cad check home/pad
|
|
328
332
|
npx cad export home/pad
|
|
329
333
|
```
|
|
330
334
|
|
|
335
|
+
The board's mounting holes are named by their screws' thread. The keyboard recipe draws one in each corner with
|
|
336
|
+
`v.pcb.mount('M2', x, y)`, which sizes it from the thread's rule set: `m2.clearance`, 2.4 mm (ISO 273's normal
|
|
337
|
+
clearance hole), as the fab drills it, with nothing added for a printer. A board drawn by hand names its own the same
|
|
338
|
+
way, in its `holes`: `v.pcb.mount('M2', 10, 5)`, or `v.pcb.mount('M2', 10, 5, { fit: 'close' })` for the close hole.
|
|
339
|
+
|
|
340
|
+
### The case
|
|
341
|
+
|
|
331
342
|
A case reads the board rather than copying its numbers: `"uses": ["home/pad"]`, then `v.pad.board_w` and
|
|
332
|
-
`v.pad.board_holes` are the board's own.
|
|
343
|
+
`v.pad.board_holes` are the board's own. The board stands on four bosses, one under each of its holes, each with a
|
|
344
|
+
heat-set insert's hole in its top: `v.fixings.insertBoss('M2', ...)` sizes the hole, its depth and the least wall from
|
|
345
|
+
the insert's rules, and draws the column with its foot flared. A boss is as tall as the room the board needs under it,
|
|
346
|
+
so each is the board's standoff too.
|
|
347
|
+
|
|
348
|
+
```json projects/home/objects/case.json
|
|
349
|
+
{
|
|
350
|
+
"$schema": "https://jonibach.github.io/rulecad/schemas/object.schema.json",
|
|
351
|
+
"name": "case",
|
|
352
|
+
"title": "Four-key pad case",
|
|
353
|
+
"version": "0.1.0",
|
|
354
|
+
"uses": ["x1c", "home/pad"],
|
|
355
|
+
"material": "PLA",
|
|
356
|
+
"orientation": "Upright, its floor on the bed, open at the top: the board drops in from above",
|
|
357
|
+
"variables": {
|
|
358
|
+
"floor": { "value": "x1c.layer * 10", "unit": "mm", "rule": "The floor: whole layers, stiff under a hand on the keys" },
|
|
359
|
+
"wall": { "value": "x1c.line * 5", "unit": "mm", "rule": "The walls: five lines" },
|
|
360
|
+
"gap": { "value": "x1c.fit * 2", "unit": "mm", "rule": "Round the board inside the walls, so it drops in" },
|
|
361
|
+
"stand": { "value": "x1c.layer * 25", "unit": "mm", "rule": "Under the board: room for the switches' pins and the diodes on its back, and deeper than the inserts' holes" },
|
|
362
|
+
"round": { "value": 1, "unit": "mm", "rule": "The inside corners, rounded: tight enough to clear the board's square corners by the gap" },
|
|
363
|
+
"chamfer": { "value": "x1c.chamfer * 2", "unit": "mm", "rule": "A 45° chamfer where the walls meet the floor, so no inside corner is square" }
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
```js projects/home/objects/case.js
|
|
369
|
+
// A tray for the four-key pad: walls round the board, and a heat-set insert's boss under each of its mounting holes,
|
|
370
|
+
// for the board to stand on. The case reads the board (its size, where it is, its holes); the bosses come from
|
|
371
|
+
// v.fixings, named by the board's M2 screws.
|
|
372
|
+
import jscad from '@jscad/modeling'
|
|
373
|
+
const { roundedRectangle } = jscad.primitives
|
|
374
|
+
const { extrudeLinear } = jscad.extrusions
|
|
375
|
+
const { translate } = jscad.transforms
|
|
376
|
+
const { hull } = jscad.hulls
|
|
377
|
+
|
|
378
|
+
export function main (v) {
|
|
379
|
+
const b = v.pad, f = v.fixings, top = v.floor + v.stand + b.thickness, c = v.chamfer
|
|
380
|
+
const w = b.board_w + 2 * v.gap, d = b.board_d + 2 * v.gap
|
|
381
|
+
const plan = (x, y, r) => roundedRectangle({ size: [x, y], roundRadius: r, center: [b.board_x, b.board_y] })
|
|
382
|
+
const shell = extrudeLinear({ height: top }, plan(w + 2 * v.wall, d + 2 * v.wall, v.round + v.wall))
|
|
383
|
+
const inside = v.ops.union(
|
|
384
|
+
hull(translate([0, 0, v.floor], extrudeLinear({ height: c }, plan(w - 2 * c, d - 2 * c, v.round - c))),
|
|
385
|
+
translate([0, 0, v.floor + c], extrudeLinear({ height: c }, plan(w, d, v.round)))),
|
|
386
|
+
translate([0, 0, v.floor + c], extrudeLinear({ height: top }, plan(w, d, v.round))))
|
|
387
|
+
// a boss under each hole, wide enough to join the wall beside it
|
|
388
|
+
const bosses = b.board_holes.map((h) => {
|
|
389
|
+
const edge = Math.min(b.board_w / 2 - Math.abs(h.x - b.board_x), b.board_d / 2 - Math.abs(h.y - b.board_y))
|
|
390
|
+
return f.insertBoss('M2', { height: v.stand, outer: 2 * (edge + v.gap + v.wall / 2), at: [h.x, h.y, v.floor] })
|
|
391
|
+
})
|
|
392
|
+
return v.ops.subtract(v.ops.union(v.ops.subtract(shell, inside), ...bosses.map((x) => x.boss)), ...bosses.map((x) => x.hole))
|
|
393
|
+
}
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
Each boss is 7.9 mm across round a 3.2 mm hole 4 mm deep (`m2.insert_hole` and `m2.insert_depth`), with 2.35 mm of
|
|
397
|
+
wall where `m2.insert_wall` asks 1.3 mm, and joins the wall beside it. The case prints upright with no supports.
|
|
398
|
+
|
|
399
|
+
### Screwed in
|
|
400
|
+
|
|
401
|
+
The board sits on the bosses, and one `fasten` holds it: M2 cap screws down the board's own holes (`"holes":
|
|
402
|
+
"pad.board"`) into the case. The check finds the four holes in the board, follows each screw's axis into its boss, and
|
|
403
|
+
chooses the length. Chapter 15 explains `fasten` in full: every finding it makes, nuts, countersunk heads, and the
|
|
404
|
+
order the screws go in.
|
|
405
|
+
|
|
406
|
+
```json projects/home/assemblies/padcase.json
|
|
407
|
+
{
|
|
408
|
+
"$schema": "https://jonibach.github.io/rulecad/schemas/assembly.schema.json",
|
|
409
|
+
"title": "The four-key pad in its case",
|
|
410
|
+
"kind": "fit",
|
|
411
|
+
"items": [
|
|
412
|
+
{ "id": "case", "object": "case" },
|
|
413
|
+
{ "id": "pad", "object": "pad", "at": [0, 0, "case.floor + case.stand"] }
|
|
414
|
+
],
|
|
415
|
+
"fits": [
|
|
416
|
+
{ "a": "pad", "b": "case", "min": 0, "max": 0.05, "note": "The board stands on the bosses" }
|
|
417
|
+
],
|
|
418
|
+
"fasten": [
|
|
419
|
+
{ "screw": "M2 cap", "through": ["pad"], "into": "case", "holes": "pad.board", "note": "The board's screws" }
|
|
420
|
+
]
|
|
421
|
+
}
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
```sh
|
|
425
|
+
npx cad check home/case
|
|
426
|
+
npx cad check home/padcase
|
|
427
|
+
npx cad list home/padcase
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
The check says the board's holes measure 2.4 mm, an M2 clearance hole; each screw ends in an insert's hole, 3.2 mm
|
|
431
|
+
and 4 mm deep; M2x4 cap is the shortest sold that fits, 1.6 mm under its head and 2.4 mm into the insert; the head
|
|
432
|
+
sits flat on the board; and a 1.5 mm hex key reaches each one. `cad list` counts four M2x4 cap screws and four M2
|
|
433
|
+
inserts, with the case's 18.3 g of plastic.
|
|
333
434
|
|
|
334
435
|
## 7. A mechanism printed flat
|
|
335
436
|
|
|
@@ -408,7 +509,7 @@ moves the slide π × 14 × 1 = 43.98 mm.
|
|
|
408
509
|
"teeth": { "value": 14, "rule": "Few teeth for a fine travel a turn" },
|
|
409
510
|
"shift": { "value": 0.2, "rule": "Profile shift: 14 teeth at 20° need at least 0.19, or they are undercut" },
|
|
410
511
|
"width": { "value": "x1c.layer * 30", "unit": "mm", "rule": "Face width, thirty layers" },
|
|
411
|
-
"bore": { "value": 3.2, "unit": "mm", "rule": "
|
|
512
|
+
"bore": { "value": 3.2, "unit": "mm", "rule": "The bore, turning on the base's printed axle: the base sizes its pin from it (rail.pin)" },
|
|
412
513
|
"knob": { "value": 5.5, "unit": "mm", "rule": "The knob's radius, inside the teeth's roots" },
|
|
413
514
|
"grip": { "value": "x1c.layer * 40", "unit": "mm", "rule": "The knob's height, forty layers" }
|
|
414
515
|
}
|
|
@@ -569,7 +670,7 @@ planets, the carrier with the planets' pins and the crank arm, and the crank's h
|
|
|
569
670
|
"snap_lip": { "value": 0.3, "unit": "mm", "rule": "The barb's lip, clicking over the floor of the ring's counterbore" },
|
|
570
671
|
"snap_back": { "value": 90, "unit": "deg", "rule": "A square back: it holds for good" },
|
|
571
672
|
"snap_at": { "value": 30.6, "unit": "mm", "rule": "Halfway across the ring's rim, between its roots and its outside" },
|
|
572
|
-
"snap_length": { "value": 4, "unit": "mm", "rule": "Up the ring's 6 mm rim to
|
|
673
|
+
"snap_length": { "value": 4, "unit": "mm", "rule": "Up the ring's 6 mm rim, to the 2 mm step at its top the barb clicks over" },
|
|
573
674
|
"flange": { "value": 2, "unit": "mm", "rule": "A push pin's foot flange, buried in the rim" },
|
|
574
675
|
"hub": { "value": 12, "unit": "mm", "rule": "Round the sun's axle" },
|
|
575
676
|
"spoke": { "value": "x1c.line * 12", "unit": "mm", "rule": "Three spokes from the hub to the rim" },
|
|
@@ -611,7 +712,7 @@ export function main (v) {
|
|
|
611
712
|
"clear": { "value": "x1c.line / 2", "unit": "mm", "rule": "Half a line round a pin" },
|
|
612
713
|
"snap_at": { "value": 30.6, "unit": "mm", "rule": "As the case's pins" },
|
|
613
714
|
"counterbore": { "value": 2, "unit": "mm", "rule": "Deep enough that a barb clicks below the ring's top, clear of the crank arm" },
|
|
614
|
-
"barb": { "value": 1.6, "unit": "mm", "rule": "The
|
|
715
|
+
"barb": { "value": 1.6, "unit": "mm", "rule": "The radius of the step the barb sits in: the barb, and room round it" },
|
|
615
716
|
"module": { "value": 1, "unit": "mm", "rule": "3.6 lines across a tooth on the X1C" },
|
|
616
717
|
"teeth": { "value": 54, "rule": "The sun and two planets across: 18 + 2 × 18" },
|
|
617
718
|
"width": { "value": "x1c.layer * 30", "unit": "mm", "rule": "Face width, thirty layers: plenty for a spool's pull" }
|
|
@@ -828,7 +929,9 @@ drives, the viewer's slider moves in the motor's steps, and `loads` say what it
|
|
|
828
929
|
kinds: the 28BYJ-48's torque varies between makers, and the check says what its answer rests on.
|
|
829
930
|
|
|
830
931
|
The pinion takes the motor's shaft, two flats and all, with `v.motors.bore`. The motor sits under the plate, shaft up
|
|
831
|
-
through it, so its body needs room below: two feet stand the rail up.
|
|
932
|
+
through it, so its body needs room below: two feet stand the rail up. An M3 cap screw down through the rail holds
|
|
933
|
+
each foot, cutting its own thread in a pilot in the foot's top. Both holes come from `v.fixings`, named by the thread:
|
|
934
|
+
the rail's is an M3 clearance hole, the foot's an M3 pilot, each the printer's own figure.
|
|
832
935
|
|
|
833
936
|
```json projects/home/objects/drive-pinion.json
|
|
834
937
|
{
|
|
@@ -868,20 +971,21 @@ export function main (v) {
|
|
|
868
971
|
"engine": "manifold",
|
|
869
972
|
"anchors": {
|
|
870
973
|
"axle": { "at": [0, "centre", "thick"], "axis": [0, 0, 1] },
|
|
871
|
-
"track": { "at": ["start", 0, "thick"], "axis": [1, 0, 0] }
|
|
974
|
+
"track": { "at": ["start", 0, "thick"], "axis": [1, 0, 0] },
|
|
975
|
+
"f1": { "at": ["0 - foot_x", "foot_y", "thick"], "axis": [0, 0, 1] },
|
|
976
|
+
"f2": { "at": ["foot_x", "foot_y", "thick"], "axis": [0, 0, 1] }
|
|
872
977
|
},
|
|
873
978
|
"variables": {
|
|
874
979
|
"centre": { "value": 7.2, "unit": "mm", "rule": "The pinion's axis above the rack's pitch line: m z / 2 + x m" },
|
|
875
980
|
"length": { "value": 120, "unit": "mm", "rule": "The rack and its travel" },
|
|
876
981
|
"start": { "value": -37.7, "unit": "mm", "rule": "The rack's middle under the pinion at rest" },
|
|
877
|
-
"thick": { "value": "x1c.layer * 23", "unit": "mm", "rule": "23 layers: the motor's boss pocket, and enough for its
|
|
982
|
+
"thick": { "value": "x1c.layer * 23", "unit": "mm", "rule": "23 layers: the motor's boss pocket, and plate enough for its screws" },
|
|
878
983
|
"y0": { "value": -14.5, "unit": "mm", "rule": "Past the motor's near ear" },
|
|
879
984
|
"y1": { "value": 29, "unit": "mm", "rule": "Past its far ear, 17.5 mm off the axis" },
|
|
880
985
|
"plate": { "value": 26, "unit": "mm", "rule": "Wide enough round the motor's boss and its ears" },
|
|
881
986
|
"guide_y": { "value": "0 - 5.45 - x1c.line / 2", "unit": "mm", "rule": "Behind the rack's back, half a line clear" },
|
|
882
987
|
"guide": { "value": "x1c.line * 4", "unit": "mm", "rule": "The guide wall: four lines" },
|
|
883
988
|
"guide_height": { "value": "x1c.layer * 20", "unit": "mm", "rule": "Most of the rack's width" },
|
|
884
|
-
"hole": { "value": 3.5, "unit": "mm", "rule": "M3 clearance, for the feet" },
|
|
885
989
|
"foot_x": { "value": 52, "unit": "mm", "rule": "Each foot's screw, from the middle" },
|
|
886
990
|
"foot_y": { "value": -11, "unit": "mm", "rule": "On the strip, behind the guide" }
|
|
887
991
|
}
|
|
@@ -890,18 +994,18 @@ export function main (v) {
|
|
|
890
994
|
|
|
891
995
|
```js projects/home/objects/drive-rail.js
|
|
892
996
|
// The rail: a strip under the rack, a plate for the motor (turned 90° on its shaft, so its ears clear the rack), a wall
|
|
893
|
-
// behind the rack, and the motor's own cuts.
|
|
997
|
+
// behind the rack, and the motor's own cuts. Each foot's screw passes an M3 clearance hole from v.fixings.
|
|
894
998
|
import jscad from '@jscad/modeling'
|
|
895
999
|
const { cuboid, cylinder } = jscad.primitives
|
|
896
1000
|
const { translate, rotateZ } = jscad.transforms
|
|
897
1001
|
|
|
898
1002
|
export function main (v) {
|
|
899
|
-
const motor = v.motors.motorModel('28byj48')
|
|
1003
|
+
const motor = v.motors.motorModel('28byj48'), hole = v.fixings.holeModel('M3').diameter
|
|
900
1004
|
const strip = cuboid({ size: [v.length, 12, v.thick], center: [0, v.y0 + 6, v.thick / 2] })
|
|
901
1005
|
const seat = cuboid({ size: [v.plate, v.y1 - v.y0, v.thick], center: [8, (v.y0 + v.y1) / 2, v.thick / 2] })
|
|
902
1006
|
const guide = cuboid({ size: [v.length, v.guide, v.guide_height], center: [0, v.guide_y - v.guide / 2, v.thick + v.guide_height / 2] })
|
|
903
1007
|
const cuts = translate([0, v.centre, 0], rotateZ(Math.PI / 2, v.motors.mount(motor, { plate: v.thick, screw: 'M3' }, v.ops)))
|
|
904
|
-
const screws = [1, -1].map((s) => cylinder({ radius:
|
|
1008
|
+
const screws = [1, -1].map((s) => cylinder({ radius: hole / 2, height: v.thick + 2, center: [s * v.foot_x, v.foot_y, v.thick / 2] }))
|
|
905
1009
|
return v.ops.subtract(v.ops.union(strip, seat, guide), cuts, screws)
|
|
906
1010
|
}
|
|
907
1011
|
```
|
|
@@ -917,27 +1021,31 @@ export function main (v) {
|
|
|
917
1021
|
"height": { "value": 21, "unit": "mm", "rule": "Under the motor: its 19 mm can and 2 mm to the table" },
|
|
918
1022
|
"size": { "value": 12, "unit": "mm", "rule": "As wide as the strip" },
|
|
919
1023
|
"long": { "value": 28, "unit": "mm", "rule": "Across the strip's end, for a stance that doesn't rock" },
|
|
920
|
-
"
|
|
921
|
-
"depth": { "value": 12, "unit": "mm", "rule": "Plenty for an M3 × 16" }
|
|
1024
|
+
"depth": { "value": 12, "unit": "mm", "rule": "The pilot's depth: more than the screw down through the rail needs, so the check chooses its length" }
|
|
922
1025
|
}
|
|
923
1026
|
}
|
|
924
1027
|
```
|
|
925
1028
|
|
|
926
1029
|
```js projects/home/objects/drive-foot.js
|
|
927
|
-
// A foot: a block under each end of the rail, screwed on from above
|
|
1030
|
+
// A foot: a block under each end of the rail, screwed on from above by an M3 cap screw through the rail, which cuts
|
|
1031
|
+
// its own thread in the M3 pilot from v.fixings.
|
|
928
1032
|
import jscad from '@jscad/modeling'
|
|
929
1033
|
const { cuboid, cylinder } = jscad.primitives
|
|
930
1034
|
const { subtract } = jscad.booleans
|
|
931
1035
|
|
|
932
1036
|
export function main (v) {
|
|
1037
|
+
const pilot = v.fixings.holeModel('M3', { kind: 'pilot' }).diameter
|
|
933
1038
|
const block = cuboid({ size: [v.size, v.long, v.height], center: [0, 0, v.height / 2] })
|
|
934
|
-
return subtract(block, cylinder({ radius:
|
|
1039
|
+
return subtract(block, cylinder({ radius: pilot / 2, height: v.depth, center: [0, 0, v.height - v.depth / 2] }))
|
|
935
1040
|
}
|
|
936
1041
|
```
|
|
937
1042
|
|
|
938
1043
|
The assembly says the motor drives the pinion's joint, the slide follows by its `mesh`, and the load is a force on the
|
|
939
1044
|
slide: a 200 g camera on a rail with the friction of plastic on plastic, about 1 N. The `shaft` fit reads the bore from
|
|
940
1045
|
the pinion as drawn. `duty` says the motor runs a fifth of the time, since a focus stack is mostly standing still.
|
|
1046
|
+
Each foot's screw is a `fasten`, as the pad's in chapter 6: the screw named by thread and head with no length, the
|
|
1047
|
+
part it passes through, the part it ends in and the anchor on its axis. The check follows the screw through the parts
|
|
1048
|
+
as drawn and chooses its length, and `cad list` counts it; chapter 15 explains `fasten` in full.
|
|
941
1049
|
|
|
942
1050
|
```json projects/home/assemblies/driven.json
|
|
943
1051
|
{
|
|
@@ -957,11 +1065,15 @@ the pinion as drawn. `duty` says the motor runs a fifth of the time, since a foc
|
|
|
957
1065
|
"mesh": { "with": "pinion", "module": "gear.module", "teeth": ["gear.teeth", "rack.teeth"], "shift": ["gear.shift", 0] } }
|
|
958
1066
|
],
|
|
959
1067
|
"fits": [
|
|
960
|
-
{ "a": "foot_a", "b": "rail", "
|
|
961
|
-
{ "a": "foot_b", "b": "rail", "
|
|
1068
|
+
{ "a": "foot_a", "b": "rail", "min": 0, "note": "A foot, under the rail" },
|
|
1069
|
+
{ "a": "foot_b", "b": "rail", "min": 0, "note": "A foot, under the rail" },
|
|
962
1070
|
{ "a": "drive", "b": "rail", "fastens": true, "min": 0, "note": "The motor, on its two ears" },
|
|
963
1071
|
{ "a": "drive", "b": "gear", "shaft": true, "note": "The motor's shaft in the pinion" }
|
|
964
1072
|
],
|
|
1073
|
+
"fasten": [
|
|
1074
|
+
{ "screw": "M3 cap", "through": ["rail"], "into": "foot_a", "at": ["rail.f1"], "note": "A foot, screwed on from above" },
|
|
1075
|
+
{ "screw": "M3 cap", "through": ["rail"], "into": "foot_b", "at": ["rail.f2"], "note": "A foot, screwed on from above" }
|
|
1076
|
+
],
|
|
965
1077
|
"loads": [{ "joint": "slide", "force": 1, "note": "A 200 g camera sliding, plastic on plastic" }],
|
|
966
1078
|
"poses": { "home": { "pinion": 0 } }
|
|
967
1079
|
}
|
|
@@ -978,7 +1090,9 @@ slide moves, and that the slide holds with the power off: the 28BYJ-48's own gea
|
|
|
978
1090
|
turn it back with. The torque's line ends `(rests on community figures: measure it)`, because that's what its torque is.
|
|
979
1091
|
`motor.mount` bends the rail under the motor by FE, held where its feet are screwed on: the shaft's tip moves a few
|
|
980
1092
|
thousandths of a millimetre against the pinion's seat on the rail, far inside the 0.2 mm the pinion is drawn with. A NEMA 17 hung from a 2 mm PLA plate would
|
|
981
|
-
fail the same check, and say how thick the plate would need to be.
|
|
1093
|
+
fail the same check, and say how thick the plate would need to be. Each foot's `fasten` passes: an M3x10 cap, the
|
|
1094
|
+
shortest sold that fits, 5.4 mm into the foot's 2.9 mm pilot against the 5 mm `m3.pilot_depth` asks, its head flat on
|
|
1095
|
+
the rail and a 2.5 mm hex key clear above it. `npx cad list home/driven` lists the two, beside the motor's own two M3x8.
|
|
982
1096
|
|
|
983
1097
|
### The spool winder, driven
|
|
984
1098
|
|
|
@@ -987,7 +1101,8 @@ the sun now, and the slow part is the carrier: four turns of the motor's shaft f
|
|
|
987
1101
|
moves onto the carrier. What changes:
|
|
988
1102
|
|
|
989
1103
|
- The case loses its axle pin. The motor hangs under the hub on its two M1.6 screws, and three ears reach out past the
|
|
990
|
-
ring for feet tall enough to stand it over the motor.
|
|
1104
|
+
ring for feet tall enough to stand it over the motor. An M3 cap screw down through each ear holds its foot, in an
|
|
1105
|
+
M3 pilot in the foot's top, as the slider's feet are held.
|
|
991
1106
|
- The sun takes the motor's D-shaft with `v.motors.bore`, and keeps its 8 mm shaft, which the spool now turns on.
|
|
992
1107
|
- The carrier and the spool are one part, printed upside down: the outer cheek on the bed, the drum, a 45° cone out
|
|
993
1108
|
to the carrier's plate (the spool's inner cheek, printed without supports), and the planets' pins on top. The drum
|
|
@@ -1005,6 +1120,11 @@ one's torque as about half until it has been measured.
|
|
|
1005
1120
|
"version": "0.1.0",
|
|
1006
1121
|
"uses": ["x1c"],
|
|
1007
1122
|
"engine": "manifold",
|
|
1123
|
+
"anchors": {
|
|
1124
|
+
"e1": { "at": [0, "ear_at", "t"], "axis": [0, 0, 1] },
|
|
1125
|
+
"e2": { "at": ["0 - ear_at * 0.8660254", "0 - ear_at / 2", "t"], "axis": [0, 0, 1] },
|
|
1126
|
+
"e3": { "at": ["ear_at * 0.8660254", "0 - ear_at / 2", "t"], "axis": [0, 0, 1] }
|
|
1127
|
+
},
|
|
1008
1128
|
"variables": {
|
|
1009
1129
|
"radius": { "value": 33, "unit": "mm", "rule": "The ring's rim: as the hand winder's case" },
|
|
1010
1130
|
"rim": { "value": "x1c.line * 14", "unit": "mm", "rule": "The rim under the ring's, wide enough for its push pins" },
|
|
@@ -1012,35 +1132,35 @@ one's torque as about half until it has been measured.
|
|
|
1012
1132
|
"snap_lip": { "value": 0.3, "unit": "mm", "rule": "The barb's lip, clicking over the floor of the ring's counterbore" },
|
|
1013
1133
|
"snap_back": { "value": 90, "unit": "deg", "rule": "A square back: it holds for good" },
|
|
1014
1134
|
"snap_at": { "value": 30.6, "unit": "mm", "rule": "Halfway across the ring's rim, between its roots and its outside" },
|
|
1015
|
-
"snap_length": { "value": 4, "unit": "mm", "rule": "Up the ring's 6 mm rim to
|
|
1135
|
+
"snap_length": { "value": 4, "unit": "mm", "rule": "Up the ring's 6 mm rim, to the 2 mm step at its top the barb clicks over" },
|
|
1016
1136
|
"flange": { "value": 2, "unit": "mm", "rule": "A push pin's foot flange, buried in the rim" },
|
|
1017
1137
|
"hub": { "value": 14, "unit": "mm", "rule": "Round the N20's face: its two M1.6 holes 9 mm apart, with a wall outside them" },
|
|
1018
1138
|
"spoke": { "value": "x1c.line * 12", "unit": "mm", "rule": "Three spokes from the hub to the rim" },
|
|
1019
1139
|
"spokes": { "value": 3, "rule": "Three: it stands without rocking" },
|
|
1020
1140
|
"t": { "value": "x1c.layer * 15", "unit": "mm", "rule": "Base, fifteen layers" },
|
|
1021
1141
|
"ear_at": { "value": 38, "unit": "mm", "rule": "A foot's screw, outside the ring (33 mm) by a screw head's radius and a little" },
|
|
1022
|
-
"ear": { "value": 10, "unit": "mm", "rule": "An ear's width, round its screw" }
|
|
1023
|
-
"hole": { "value": "3 + x1c.hole_comp + x1c.fit * 2", "unit": "mm", "rule": "M3 clearance for a foot's screw" }
|
|
1142
|
+
"ear": { "value": 10, "unit": "mm", "rule": "An ear's width, round its screw" }
|
|
1024
1143
|
}
|
|
1025
1144
|
}
|
|
1026
1145
|
```
|
|
1027
1146
|
|
|
1028
1147
|
```js projects/home/objects/winder-base.js
|
|
1029
1148
|
// The hand winder's case with the motor under it: the axle pin goes, the hub takes the N20's face and screws, and three
|
|
1030
|
-
// ears reach out past the ring, a quarter turn round from the spokes, for the feet that stand it over the motor.
|
|
1149
|
+
// ears reach out past the ring, a quarter turn round from the spokes, for the feet that stand it over the motor. Each
|
|
1150
|
+
// ear has an M3 clearance hole from v.fixings for its foot's screw.
|
|
1031
1151
|
import jscad from '@jscad/modeling'
|
|
1032
1152
|
const { cylinder, cuboid } = jscad.primitives
|
|
1033
1153
|
const { rotateZ, translate } = jscad.transforms
|
|
1034
1154
|
|
|
1035
1155
|
export function main (v) {
|
|
1036
|
-
const motor = v.motors.motorModel('n20')
|
|
1156
|
+
const motor = v.motors.motorModel('n20'), hole = v.fixings.holeModel('M3').diameter
|
|
1037
1157
|
const rim = v.ops.subtract(cylinder({ radius: v.radius, height: v.t, center: [0, 0, v.t / 2] }), cylinder({ radius: v.radius - v.rim, height: v.t, center: [0, 0, v.t / 2] }))
|
|
1038
1158
|
const turn = (k) => (2 * Math.PI * k) / v.spokes
|
|
1039
1159
|
const spokes = Array.from({ length: v.spokes }, (_, k) => rotateZ(turn(k), cuboid({ size: [v.radius - v.rim / 2, v.spoke, v.t], center: [(v.radius - v.rim / 2) / 2, 0, v.t / 2] })))
|
|
1040
1160
|
const ears = Array.from({ length: v.spokes }, (_, k) => rotateZ(turn(k) + Math.PI / 2, v.ops.union(
|
|
1041
1161
|
cuboid({ size: [v.ear_at - v.radius + v.rim, v.ear, v.t], center: [(v.ear_at + v.radius - v.rim) / 2, 0, v.t / 2] }),
|
|
1042
1162
|
cylinder({ radius: v.ear / 2, height: v.t, center: [v.ear_at, 0, v.t / 2] }))))
|
|
1043
|
-
const holes = Array.from({ length: v.spokes }, (_, k) => rotateZ(turn(k) + Math.PI / 2, cylinder({ radius:
|
|
1163
|
+
const holes = Array.from({ length: v.spokes }, (_, k) => rotateZ(turn(k) + Math.PI / 2, cylinder({ radius: hole / 2, height: v.t * 2, center: [v.ear_at, 0, v.t / 2] })))
|
|
1044
1164
|
const snaps = [0, Math.PI].map((a) => translate([v.snap_at * Math.cos(a), v.snap_at * Math.sin(a), v.t - v.flange], v.flexures.snapPin({ diameter: v.snap, length: v.snap_length, lip: v.snap_lip, back: v.snap_back }, v.ops)))
|
|
1045
1165
|
const body = v.ops.union(rim, cylinder({ radius: v.hub / 2, height: v.t, center: [0, 0, v.t / 2] }), ...spokes, ...ears, ...snaps)
|
|
1046
1166
|
return v.ops.subtract(body, v.motors.mount(motor, { plate: v.t, screw: 'M1.6' }, v.ops), ...holes)
|
|
@@ -1057,20 +1177,21 @@ export function main (v) {
|
|
|
1057
1177
|
"variables": {
|
|
1058
1178
|
"height": { "value": 32, "unit": "mm", "rule": "Under the motor: its 25 mm, its terminals, and room for the wires to bend" },
|
|
1059
1179
|
"size": { "value": 10, "unit": "mm", "rule": "As wide as the base's ear" },
|
|
1060
|
-
"
|
|
1061
|
-
"depth": { "value": 12, "unit": "mm", "rule": "Plenty for an M3 × 16 through the 3 mm ear" }
|
|
1180
|
+
"depth": { "value": 12, "unit": "mm", "rule": "The pilot's depth: more than the screw down through the 3 mm ear needs, so the check chooses its length" }
|
|
1062
1181
|
}
|
|
1063
1182
|
}
|
|
1064
1183
|
```
|
|
1065
1184
|
|
|
1066
1185
|
```js projects/home/objects/winder-foot.js
|
|
1067
|
-
// A foot under each of the base's ears, screwed on from above
|
|
1186
|
+
// A foot under each of the base's ears, screwed on from above by an M3 cap screw through the ear, which cuts its own
|
|
1187
|
+
// thread in the M3 pilot from v.fixings.
|
|
1068
1188
|
import jscad from '@jscad/modeling'
|
|
1069
1189
|
const { cylinder } = jscad.primitives
|
|
1070
1190
|
|
|
1071
1191
|
export function main (v) {
|
|
1192
|
+
const pilot = v.fixings.holeModel('M3', { kind: 'pilot' }).diameter
|
|
1072
1193
|
const block = cylinder({ radius: v.size / 2, height: v.height, center: [0, 0, v.height / 2] })
|
|
1073
|
-
return v.ops.subtract(block, cylinder({ radius:
|
|
1194
|
+
return v.ops.subtract(block, cylinder({ radius: pilot / 2, height: v.depth, center: [0, 0, v.height - v.depth / 2] }))
|
|
1074
1195
|
}
|
|
1075
1196
|
```
|
|
1076
1197
|
|
|
@@ -1202,9 +1323,14 @@ speed to it.
|
|
|
1202
1323
|
{ "a": "ring", "b": "base", "fastens": true, "note": "The ring held still on the base by its two push pins" },
|
|
1203
1324
|
{ "a": "drive", "b": "base", "fastens": true, "min": 0, "note": "The motor, on its two M1.6 screws" },
|
|
1204
1325
|
{ "a": "drive", "b": "sun", "shaft": true, "note": "The motor's shaft in the sun" },
|
|
1205
|
-
{ "a": "foot_a", "b": "base", "
|
|
1206
|
-
{ "a": "foot_b", "b": "base", "
|
|
1207
|
-
{ "a": "foot_c", "b": "base", "
|
|
1326
|
+
{ "a": "foot_a", "b": "base", "min": 0, "note": "A foot, under an ear" },
|
|
1327
|
+
{ "a": "foot_b", "b": "base", "min": 0, "note": "A foot, under an ear" },
|
|
1328
|
+
{ "a": "foot_c", "b": "base", "min": 0, "note": "A foot, under an ear" }
|
|
1329
|
+
],
|
|
1330
|
+
"fasten": [
|
|
1331
|
+
{ "screw": "M3 cap", "through": ["base"], "into": "foot_a", "at": ["base.e1"], "note": "A foot, screwed on from above" },
|
|
1332
|
+
{ "screw": "M3 cap", "through": ["base"], "into": "foot_b", "at": ["base.e2"], "note": "A foot, screwed on from above" },
|
|
1333
|
+
{ "screw": "M3 cap", "through": ["base"], "into": "foot_c", "at": ["base.e3"], "note": "A foot, screwed on from above" }
|
|
1208
1334
|
],
|
|
1209
1335
|
"loads": [{ "joint": "reel", "torque": 0.2, "note": "A strap pulled with 10 N at the full spool's 20 mm radius" }],
|
|
1210
1336
|
"poses": { "rest": { "sun": 0 } }
|
|
@@ -1227,7 +1353,8 @@ bore, and the motor gives `0.45 N m there against 0.2 N m needed, 2.25 times ove
|
|
|
1227
1353
|
from the 100:1 gearbox's, so measure it. It takes a DC motor's working speed as half its free speed: the reel at
|
|
1228
1354
|
about 26 rpm, a turn in 2.3 s, about 2 m of strap a minute onto the bare drum. `npx cad preview home/winder-driven`
|
|
1229
1355
|
draws the motor's curve beside the picture, with that point on it: against the 0.2 N m load alone it would run nearer
|
|
1230
|
-
40 rpm. Printed, it's 51 g in ten parts, the reel 19 g of it.
|
|
1356
|
+
40 rpm. Printed, it's 51 g in ten parts, the reel 19 g of it. The feet take three M3x8 caps through the 3 mm ears, 5 mm
|
|
1357
|
+
into their pilots, and the motor its two M1.6x3.
|
|
1231
1358
|
|
|
1232
1359
|
It warns that nothing says whether the spool holds with the power off. It doesn't: an N20's spur gearbox can be turned
|
|
1233
1360
|
back from its shaft, and the planetary is no help, since a pull on the reel turns the motor four times as fast the
|
|
@@ -1255,7 +1382,7 @@ the load can't turn it backwards: the joint holds with the power off.
|
|
|
1255
1382
|
"engine": "manifold",
|
|
1256
1383
|
"anchors": { "axis": { "at": [0, 0, "plate"], "axis": [0, 0, 1] } },
|
|
1257
1384
|
"variables": {
|
|
1258
|
-
"plate": { "value": 5, "unit": "mm", "rule": "
|
|
1385
|
+
"plate": { "value": 5, "unit": "mm", "rule": "Deep enough for the motor's four screws to bite, 1.5 times their thread" },
|
|
1259
1386
|
"width": { "value": 8, "unit": "mm", "rule": "The fixed ring's face: strong enough for the motor's whole torque" },
|
|
1260
1387
|
"rim": { "value": 62, "unit": "mm", "rule": "Round the 54-tooth ring, three lines and more of wall" },
|
|
1261
1388
|
"module": { "value": 1, "unit": "mm", "rule": "The gears'" },
|
|
@@ -1263,20 +1390,20 @@ the load can't turn it backwards: the joint holds with the power off.
|
|
|
1263
1390
|
"post_r": { "value": 37, "unit": "mm", "rule": "Three posts outside the output ring's 33 mm" },
|
|
1264
1391
|
"post": { "value": 7, "unit": "mm", "rule": "Each post's diameter" },
|
|
1265
1392
|
"post_height": { "value": 19.7, "unit": "mm", "rule": "From the plate to under the clips, just over the output ring" },
|
|
1266
|
-
"
|
|
1267
|
-
"pilot_depth": { "value": 8, "unit": "mm", "rule": "For an M3 × 10" }
|
|
1393
|
+
"pilot_depth": { "value": 8, "unit": "mm", "rule": "Each post's pilot, deep enough for its clip's screw" }
|
|
1268
1394
|
}
|
|
1269
1395
|
}
|
|
1270
1396
|
```
|
|
1271
1397
|
|
|
1272
1398
|
```js projects/home/objects/joint-housing.js
|
|
1273
1399
|
// A motor plate with the fixed ring standing on it. The motor bolts underneath, its shaft up through the middle.
|
|
1400
|
+
// Each post has an M3 pilot from v.fixings: its clip's screw cuts its own thread in it.
|
|
1274
1401
|
import jscad from '@jscad/modeling'
|
|
1275
1402
|
const { cylinder } = jscad.primitives
|
|
1276
1403
|
const { translate } = jscad.transforms
|
|
1277
1404
|
|
|
1278
1405
|
export function main (v) {
|
|
1279
|
-
const motor = v.motors.motorModel('nema17')
|
|
1406
|
+
const motor = v.motors.motorModel('nema17'), pilot = v.fixings.holeModel('M3', { kind: 'pilot' }).diameter
|
|
1280
1407
|
const plate = cylinder({ radius: v.rim / 2, height: v.plate, center: [0, 0, v.plate / 2], segments: 96 })
|
|
1281
1408
|
const ring = translate([0, 0, v.plate], v.gears.internal({ module: v.module, teeth: v.teeth, width: v.width, rim: v.rim }))
|
|
1282
1409
|
const at = (a) => [v.post_r * Math.cos(a), v.post_r * Math.sin(a)]
|
|
@@ -1284,7 +1411,7 @@ export function main (v) {
|
|
|
1284
1411
|
const lobes = angles.map((a) => cylinder({ radius: v.post, height: v.plate, center: [...at(a), v.plate / 2], segments: 32 }))
|
|
1285
1412
|
const posts = angles.map((a) => cylinder({ radius: v.post / 2, height: v.post_height + v.plate, center: [...at(a), (v.post_height + v.plate) / 2], segments: 32 }))
|
|
1286
1413
|
const arms = angles.map((a) => jscad.transforms.rotateZ(a, jscad.primitives.cuboid({ size: [v.post_r - v.rim / 2 + 2, v.post, v.plate], center: [(v.post_r + v.rim / 2 - 2) / 2, 0, v.plate / 2] })))
|
|
1287
|
-
const pilots = angles.map((a) => cylinder({ radius:
|
|
1414
|
+
const pilots = angles.map((a) => cylinder({ radius: pilot / 2, height: v.pilot_depth, center: [...at(a), v.plate + v.post_height - v.pilot_depth / 2], segments: 24 }))
|
|
1288
1415
|
return v.ops.subtract(v.ops.union(plate, ring, lobes, posts, arms), v.motors.mount(motor, { plate: v.plate, counterbore: true }, v.ops), pilots)
|
|
1289
1416
|
}
|
|
1290
1417
|
```
|
|
@@ -1369,29 +1496,32 @@ export function main (v) {
|
|
|
1369
1496
|
"rim": { "value": 66, "unit": "mm", "rule": "Round the 57-tooth ring" },
|
|
1370
1497
|
"module": { "value": 1, "unit": "mm", "rule": "The gears'" },
|
|
1371
1498
|
"teeth": { "value": 57, "rule": "The output ring" },
|
|
1372
|
-
"hole": { "value": 3.5, "unit": "mm", "rule": "M3 clearance, on a 40 mm circle, for the arm" },
|
|
1373
1499
|
"middle": { "value": 15, "unit": "mm", "rule": "A hole in the middle for the motor's shaft to come up in" },
|
|
1374
|
-
"bolt": { "value": 20, "unit": "mm", "rule": "Radius of the arm's bolt circle" }
|
|
1500
|
+
"bolt": { "value": 20, "unit": "mm", "rule": "Radius of the arm's bolt circle: four screws, each through a clearance hole" }
|
|
1375
1501
|
}
|
|
1376
1502
|
}
|
|
1377
1503
|
```
|
|
1378
1504
|
|
|
1379
1505
|
```js projects/home/objects/joint-output.js
|
|
1380
|
-
// The output ring, drawn as it prints: its flange on the bed, the teeth standing on it; it goes on upside down.
|
|
1506
|
+
// The output ring, drawn as it prints: its flange on the bed, the teeth standing on it; it goes on upside down. An
|
|
1507
|
+
// arm would bolt to its flange through four M3 clearance holes from v.fixings.
|
|
1381
1508
|
import jscad from '@jscad/modeling'
|
|
1382
1509
|
const { cylinder } = jscad.primitives
|
|
1383
1510
|
const { translate } = jscad.transforms
|
|
1384
1511
|
|
|
1385
1512
|
export function main (v) {
|
|
1513
|
+
const hole = v.fixings.holeModel('M3').diameter
|
|
1386
1514
|
const flange = cylinder({ radius: v.rim / 2, height: v.top, center: [0, 0, v.top / 2], segments: 96 })
|
|
1387
1515
|
const ring = translate([0, 0, v.top], v.gears.internal({ module: v.module, teeth: v.teeth, width: v.width, rim: v.rim }))
|
|
1388
|
-
const holes = [0, 1, 2, 3].map((k) => cylinder({ radius:
|
|
1516
|
+
const holes = [0, 1, 2, 3].map((k) => cylinder({ radius: hole / 2, height: v.top + 1, center: [v.bolt * Math.cos(k * Math.PI / 2), v.bolt * Math.sin(k * Math.PI / 2), v.top / 2], segments: 24 }))
|
|
1389
1517
|
const middle = cylinder({ radius: v.middle / 2, height: v.top + 1, center: [0, 0, v.top / 2], segments: 48 })
|
|
1390
1518
|
return v.ops.subtract(v.ops.union(flange, ring), holes, middle)
|
|
1391
1519
|
}
|
|
1392
1520
|
```
|
|
1393
1521
|
|
|
1394
|
-
Three clips on three posts keep the output ring from lifting off. It turns under them with 0.3 mm to spare.
|
|
1522
|
+
Three clips on three posts keep the output ring from lifting off. It turns under them with 0.3 mm to spare. Each clip
|
|
1523
|
+
is held by an M3 cap screw through a clearance hole, cutting its own thread in an M3 pilot in its post, both from
|
|
1524
|
+
`v.fixings`.
|
|
1395
1525
|
|
|
1396
1526
|
```json projects/home/objects/joint-clip.json
|
|
1397
1527
|
{
|
|
@@ -1400,25 +1530,27 @@ Three clips on three posts keep the output ring from lifting off. It turns under
|
|
|
1400
1530
|
"title": "Retaining clip",
|
|
1401
1531
|
"version": "0.1.0",
|
|
1402
1532
|
"uses": ["x1c"],
|
|
1533
|
+
"anchors": { "post": { "at": [0, 0, "thick"], "axis": [0, 0, 1] } },
|
|
1403
1534
|
"variables": {
|
|
1404
1535
|
"reach": { "value": 6, "unit": "mm", "rule": "In over the flange's edge, 4 mm" },
|
|
1405
1536
|
"back": { "value": 4, "unit": "mm", "rule": "Round the post" },
|
|
1406
1537
|
"wide": { "value": 8, "unit": "mm", "rule": "As wide as the post and a little" },
|
|
1407
|
-
"thick": { "value": 3, "unit": "mm", "rule": "Fifteen layers" }
|
|
1408
|
-
"hole": { "value": 3.5, "unit": "mm", "rule": "M3 clearance" }
|
|
1538
|
+
"thick": { "value": 3, "unit": "mm", "rule": "Fifteen layers" }
|
|
1409
1539
|
}
|
|
1410
1540
|
}
|
|
1411
1541
|
```
|
|
1412
1542
|
|
|
1413
1543
|
```js projects/home/objects/joint-clip.js
|
|
1414
|
-
// A flat tab screwed to a post, its nose over the flange.
|
|
1544
|
+
// A flat tab screwed to a post by an M3 cap screw, its nose over the flange. The screw passes an M3 clearance hole
|
|
1545
|
+
// from v.fixings.
|
|
1415
1546
|
import jscad from '@jscad/modeling'
|
|
1416
1547
|
const { cuboid, cylinder } = jscad.primitives
|
|
1417
1548
|
const { subtract } = jscad.booleans
|
|
1418
1549
|
|
|
1419
1550
|
export function main (v) {
|
|
1551
|
+
const hole = v.fixings.holeModel('M3').diameter
|
|
1420
1552
|
const tab = cuboid({ size: [v.reach + v.back, v.wide, v.thick], center: [(v.back - v.reach) / 2, 0, v.thick / 2] })
|
|
1421
|
-
return subtract(tab, cylinder({ radius:
|
|
1553
|
+
return subtract(tab, cylinder({ radius: hole / 2, height: v.thick + 1, center: [0, 0, v.thick / 2], segments: 24 }))
|
|
1422
1554
|
}
|
|
1423
1555
|
```
|
|
1424
1556
|
|
|
@@ -1478,11 +1610,16 @@ The joint's load is a mass on the output. The check finds the worst angle by run
|
|
|
1478
1610
|
"planetary": [{ "sun": "sun", "carrier": "carrier", "ring": "housing", "planets": ["p1", "p2", "p3"], "drive": "sun", "module": 1, "teeth": [18, 18, 54], "output": { "ring": "output", "planet": 21, "teeth": 57 } }],
|
|
1479
1611
|
"fits": [
|
|
1480
1612
|
{ "a": "motor", "b": "housing", "fastens": true, "min": 0, "note": "The motor, on its four screws" },
|
|
1481
|
-
{ "a": "clip1", "b": "housing", "
|
|
1482
|
-
{ "a": "clip2", "b": "housing", "
|
|
1483
|
-
{ "a": "clip3", "b": "housing", "
|
|
1613
|
+
{ "a": "clip1", "b": "housing", "min": 0, "note": "A clip, on its post" },
|
|
1614
|
+
{ "a": "clip2", "b": "housing", "min": 0, "note": "A clip, on its post" },
|
|
1615
|
+
{ "a": "clip3", "b": "housing", "min": 0, "note": "A clip, on its post" },
|
|
1484
1616
|
{ "a": "motor", "b": "sun", "shaft": true, "note": "The motor's shaft in the sun" }
|
|
1485
1617
|
],
|
|
1618
|
+
"fasten": [
|
|
1619
|
+
{ "screw": "M3 cap", "through": ["clip1"], "into": "housing", "at": ["clip1.post"], "note": "A clip, screwed on" },
|
|
1620
|
+
{ "screw": "M3 cap", "through": ["clip2"], "into": "housing", "at": ["clip2.post"], "note": "A clip, screwed on" },
|
|
1621
|
+
{ "screw": "M3 cap", "through": ["clip3"], "into": "housing", "at": ["clip3.post"], "note": "A clip, screwed on" }
|
|
1622
|
+
],
|
|
1486
1623
|
"loads": [{ "mass": 0.5, "at": "output.tip", "note": "500 g at 150 mm: a forearm" }],
|
|
1487
1624
|
"poses": { "home": { "drive": 0 } }
|
|
1488
1625
|
}
|
|
@@ -1495,7 +1632,8 @@ npx cad check home/shoulder
|
|
|
1495
1632
|
The check says the output ring turns 1/38 of the motor's turn, the other way; that 7.44 N m reaches the joint at 300 rpm
|
|
1496
1633
|
against the 0.735 N m it needs at its worst, ten times over; that it turns a full turn in 7.6 s at that speed; and
|
|
1497
1634
|
that the gears, under 50% efficient, hold it with the power off. `npx cad check home/shoulder --sweep --steps 24` turns the
|
|
1498
|
-
motor all the way round and finds no teeth touching, and neither do the output ring's steps.
|
|
1635
|
+
motor all the way round and finds no teeth touching, and neither do the output ring's steps. Each clip's `fasten`
|
|
1636
|
+
chooses an M3x8 cap, 5 mm into its post's pilot.
|
|
1499
1637
|
|
|
1500
1638
|
Ten times over is more margin than the job needs, but the gearbox is the size it is for what the motor could do to it, not
|
|
1501
1639
|
the arm: stalled against a stop, the 7.44 N m at the output puts 33 MPa on the planets' top teeth (`strength`, the Lewis
|
|
@@ -1597,10 +1735,10 @@ The rules: the reach, the stack of parts from the bench up, and what the budget
|
|
|
1597
1735
|
"room": {"value": 2, "unit": "mm", "rule": "Air between the shoulder motor's back and the base plate", "kind": "default", "source": "Design", "checked": "2026-11-09"},
|
|
1598
1736
|
"motor17": {"value": 40, "unit": "mm", "rule": "The 17HS4401's body length", "kind": "community", "source": "nema17 variant 17HS4401 (https://market.samm.com/17hs4401-nema17-step-motor-en)", "checked": "2026-11-09"},
|
|
1599
1737
|
"face": {"value": "foot + room + motor17", "unit": "mm", "rule": "The shoulder motor's mounting face above the bench: the base's height", "kind": "default", "source": "The stack", "checked": "2026-11-09"},
|
|
1600
|
-
"plate": {"value": 5, "unit": "mm", "rule": "The shoulder housing's plate: enough for
|
|
1738
|
+
"plate": {"value": 5, "unit": "mm", "rule": "The shoulder housing's plate: deep enough for the motor's four screws to bite, 1.5 times their thread", "kind": "default", "source": "Chapter 11's housing", "checked": "2026-11-09"},
|
|
1601
1739
|
"gear": {"value": 8, "unit": "mm", "rule": "Each gear stage's face", "kind": "default", "source": "Chapter 11's gearbox", "checked": "2026-11-09"},
|
|
1602
1740
|
"ring_gap": {"value": 0.4, "unit": "mm", "rule": "Between the fixed ring and the output ring", "kind": "default", "source": "Chapter 11's gearbox", "checked": "2026-11-09"},
|
|
1603
|
-
"flange": {"value": 5, "unit": "mm", "rule": "The output ring's flange: thick enough for four
|
|
1741
|
+
"flange": {"value": 5, "unit": "mm", "rule": "The output ring's flange: thick enough for the spindle's four screws to bite", "kind": "default", "source": "Design", "checked": "2026-11-09"},
|
|
1604
1742
|
"output_top": {"value": "face + plate + gear + ring_gap + gear + flange", "unit": "mm", "rule": "Top of the shoulder's output flange above the bench", "kind": "default", "source": "The stack", "checked": "2026-11-09"},
|
|
1605
1743
|
"disc": {"value": 3, "unit": "mm", "rule": "The spindle's disc, on the flange", "kind": "default", "source": "Design", "checked": "2026-11-09"},
|
|
1606
1744
|
"bridge_gap": {"value": 0.6, "unit": "mm", "rule": "Between the spindle's disc and the bridge above it", "kind": "default", "source": "Design", "checked": "2026-11-09"},
|
|
@@ -1608,7 +1746,7 @@ The rules: the reach, the stack of parts from the bench up, and what the budget
|
|
|
1608
1746
|
"bridge_low": {"value": "output_top + disc + bridge_gap", "unit": "mm", "rule": "The bridge's underside above the bench", "kind": "default", "source": "The stack", "checked": "2026-11-09"},
|
|
1609
1747
|
"arm_gap": {"value": 0.5, "unit": "mm", "rule": "Between the bridge's top and the upper arm's underside", "kind": "default", "source": "Design", "checked": "2026-11-09"},
|
|
1610
1748
|
"arm": {"value": 12, "unit": "mm", "rule": "The upper arm's thickness, a plate over the elbow too: about 1.7 mm of sag under its load at 8 mm thick, 0.5 mm at 12", "kind": "default", "source": "The cantilever formula in EXAMPLES.md chapter 12", "checked": "2026-11-09"},
|
|
1611
|
-
"switch_pitch": {"value": 9.5, "unit": "mm", "rule": "Between the endstop's two
|
|
1749
|
+
"switch_pitch": {"value": 9.5, "unit": "mm", "rule": "Between the endstop's two mounting screws", "kind": "estimate", "source": "endstop-10t85 in @rulecad/rules: the set has words among its figures, so an object can't read it through uses", "checked": "2026-11-09"},
|
|
1612
1750
|
"bearing_bore": {"value": 10, "unit": "mm", "rule": "The 6800's bore", "kind": "spec", "source": "bearing-6800 in @rulecad/rules (NTN)", "checked": "2026-11-09"},
|
|
1613
1751
|
"bearing_outer": {"value": 19, "unit": "mm", "rule": "The 6800's outside diameter", "kind": "spec", "source": "bearing-6800", "checked": "2026-11-09"},
|
|
1614
1752
|
"bearing_width": {"value": 5, "unit": "mm", "rule": "The 6800's width", "kind": "spec", "source": "bearing-6800", "checked": "2026-11-09"},
|
|
@@ -1647,7 +1785,10 @@ The rules: the reach, the stack of parts from the bench up, and what the budget
|
|
|
1647
1785
|
### The base and the shoulder
|
|
1648
1786
|
|
|
1649
1787
|
A square plate that takes four M5 bolts, flat on the bench or upright on a stand. Three columns hold the shoulder housing,
|
|
1650
|
-
with the motor hanging between them, and a post carries the shoulder's home switch.
|
|
1788
|
+
with the motor hanging between them, and a post carries the shoulder's home switch. Every hole a screw goes in comes
|
|
1789
|
+
from `v.fixings`, named by its thread: the M5 bolts' clearance holes, an M3 pilot in each column for the housing's
|
|
1790
|
+
screw, and two M2 pilots in the post for the switch's. The housing and the bridge counterbore their M3 cap heads a
|
|
1791
|
+
layer below their faces.
|
|
1651
1792
|
|
|
1652
1793
|
```json projects/arm/objects/base.json
|
|
1653
1794
|
{
|
|
@@ -1655,11 +1796,13 @@ with the motor hanging between them, and a post carries the shoulder's home swit
|
|
|
1655
1796
|
"name": "base",
|
|
1656
1797
|
"title": "Base: plate and motor stand",
|
|
1657
1798
|
"version": "0.1.0",
|
|
1658
|
-
"uses": ["x1c", "arm"
|
|
1799
|
+
"uses": ["x1c", "arm"],
|
|
1659
1800
|
"engine": "manifold",
|
|
1660
1801
|
"orientation": "The plate on the bed, columns up",
|
|
1661
1802
|
"description": "A square plate that bolts down through four corner holes, flat on the bench or upright on a stand, with three columns round the motor carrying the shoulder housing and a post for the home switch.",
|
|
1662
1803
|
"anchors": {
|
|
1804
|
+
"sw1": {"at": ["(post_r + switch_pitch / 2) * cosd(post_a)", "(post_r + switch_pitch / 2) * sind(post_a)", "post_top"], "axis": [0, 0, 1]},
|
|
1805
|
+
"sw2": {"at": ["(post_r - switch_pitch / 2) * cosd(post_a)", "(post_r - switch_pitch / 2) * sind(post_a)", "post_top"], "axis": [0, 0, 1]},
|
|
1663
1806
|
"top": {"at": [0, 0, "column_top"], "axis": [0, 0, 1]},
|
|
1664
1807
|
"cable": {"at": ["0 - side / 2", 0, "foot"], "axis": [0, 0, 1]},
|
|
1665
1808
|
"switch": {"at": ["(post_r + switch_pitch / 2) * cosd(post_a)", "(post_r + switch_pitch / 2) * sind(post_a)", "post_top + switch_half"], "axis": [0, 0, 1], "ref": ["0 - cosd(post_a)", "0 - sind(post_a)", 0]}
|
|
@@ -1668,21 +1811,18 @@ with the motor hanging between them, and a post carries the shoulder's home swit
|
|
|
1668
1811
|
"side": {"value": 96, "unit": "mm", "rule": "The plate's side: round the columns, with room for the bolts", "label": "Plate", "show": true},
|
|
1669
1812
|
"foot": {"value": "arm.foot", "unit": "mm", "rule": "The plate's thickness"},
|
|
1670
1813
|
"corner": {"value": 8, "unit": "mm", "rule": "The plate's corners, rounded"},
|
|
1671
|
-
"bolt": {"value": "m5.clearance", "unit": "mm", "rule": "Bolts through to the bench, or an upright stand"},
|
|
1672
1814
|
"bolt_at": {"value": 38, "unit": "mm", "rule": "Half the bolts' square: the same pattern on a bench and on a stand"},
|
|
1673
1815
|
"column_top": {"value": "arm.face", "unit": "mm", "rule": "Up to the shoulder motor's mounting face"},
|
|
1674
1816
|
"column_r": {"value": 37, "unit": "mm", "rule": "Round the motor's corners"},
|
|
1675
1817
|
"column": {"value": 10, "unit": "mm", "rule": "Solid, stiff enough for the arm's tipping load: section against 2 x the arm's weight in the chapter"},
|
|
1676
|
-
"
|
|
1677
|
-
"pilot_depth": {"value": 16, "unit": "mm", "rule": "For an M3 × 20 through the housing's plate"},
|
|
1818
|
+
"pilot_depth": {"value": 16, "unit": "mm", "rule": "Each column's pilot, deep enough for the housing's screw"},
|
|
1678
1819
|
"post_r": {"value": 50, "unit": "mm", "rule": "The switch post, outside the housing's posts", "interface": true},
|
|
1679
1820
|
"post_a": {"value": 235, "unit": "°", "rule": "Round from the front: where the upper arm's flag meets the switch's lever at the shoulder's home, -116°", "interface": true},
|
|
1680
1821
|
"post_w": {"value": 14, "unit": "mm", "rule": "The post's width along the radius, for the switch's two screws"},
|
|
1681
1822
|
"post_d": {"value": 12, "unit": "mm", "rule": "The post's depth, tangential"},
|
|
1682
1823
|
"post_top": {"value": "arm.bridge_low + arm.bridge - 6", "unit": "mm", "rule": "The switch lies on the post, its lever under the arm's flag"},
|
|
1683
|
-
"switch_pilot": {"value": "m2.clearance - 0.6", "unit": "mm", "rule": "An M2 screw self-tapped into the post", "kind": "community"},
|
|
1684
1824
|
"switch_pitch": {"value": "arm.switch_pitch", "unit": "mm", "rule": "The switch's screw spacing"},
|
|
1685
|
-
"switch_depth": {"value": 10, "unit": "mm", "rule": "
|
|
1825
|
+
"switch_depth": {"value": 10, "unit": "mm", "rule": "Each switch screw's pilot depth"},
|
|
1686
1826
|
"segments": {"value": 64, "rule": "Round enough"},
|
|
1687
1827
|
"rad": {"value": 0.017453293, "rule": "Radians in a degree"},
|
|
1688
1828
|
"c1": {"value": 90, "unit": "°", "rule": "First column, between the motor's corners"},
|
|
@@ -1694,22 +1834,24 @@ with the motor hanging between them, and a post carries the shoulder's home swit
|
|
|
1694
1834
|
```
|
|
1695
1835
|
|
|
1696
1836
|
```js projects/arm/objects/base.js
|
|
1697
|
-
// A plate with three columns and a post: first layer one square with four holes.
|
|
1837
|
+
// A plate with three columns and a post: first layer one square with four holes. Every screw's hole is v.fixings':
|
|
1838
|
+
// the M5 bolts' clearance, the M3 pilots the housing's screws cut their thread in, and the switch's M2 pilots.
|
|
1698
1839
|
import jscad from '@jscad/modeling'
|
|
1699
1840
|
const { cylinder, cuboid, roundedRectangle } = jscad.primitives
|
|
1700
1841
|
const { extrudeLinear } = jscad.extrusions
|
|
1701
1842
|
const { translate, rotateZ } = jscad.transforms
|
|
1702
1843
|
|
|
1703
1844
|
export function main (v) {
|
|
1845
|
+
const bolt = v.fixings.holeModel('M5').diameter, pilot = v.fixings.holeModel('M3', { kind: 'pilot' }).diameter, switchPilot = v.fixings.holeModel('M2', { kind: 'pilot' }).diameter
|
|
1704
1846
|
const plate = extrudeLinear({ height: v.foot }, roundedRectangle({ size: [v.side, v.side], roundRadius: v.corner, segments: v.segments }))
|
|
1705
1847
|
const angles = [v.c1, v.c2, v.c3].map((a) => a * v.rad)
|
|
1706
1848
|
const at = (r, a) => [r * Math.cos(a), r * Math.sin(a)]
|
|
1707
1849
|
const columns = angles.map((a) => cylinder({ radius: v.column / 2, height: v.column_top, center: [...at(v.column_r, a), v.column_top / 2], segments: v.segments }))
|
|
1708
|
-
const pilots = angles.map((a) => cylinder({ radius:
|
|
1850
|
+
const pilots = angles.map((a) => cylinder({ radius: pilot / 2, height: v.pilot_depth, center: [...at(v.column_r, a), v.column_top - v.pilot_depth / 2], segments: v.segments }))
|
|
1709
1851
|
const a = v.post_a * v.rad
|
|
1710
1852
|
const post = translate([...at(v.post_r, a), 0], rotateZ(a, cuboid({ size: [v.post_w, v.post_d, v.post_top], center: [0, 0, v.post_top / 2] })))
|
|
1711
|
-
const pads = [-1, 1].map((s) => cylinder({ radius:
|
|
1712
|
-
const holes = [[1, 1], [-1, 1], [1, -1], [-1, -1]].map(([x, y]) => cylinder({ radius:
|
|
1853
|
+
const pads = [-1, 1].map((s) => cylinder({ radius: switchPilot / 2, height: v.switch_depth, center: [...at(v.post_r + s * v.switch_pitch / 2, a), v.post_top - v.switch_depth / 2], segments: v.segments }))
|
|
1854
|
+
const holes = [[1, 1], [-1, 1], [1, -1], [-1, -1]].map(([x, y]) => cylinder({ radius: bolt / 2, height: v.foot + 1, center: [x * v.bolt_at, y * v.bolt_at, v.foot / 2], segments: v.segments }))
|
|
1713
1855
|
return v.ops.subtract(v.ops.union(plate, columns, post), pilots, pads, holes)
|
|
1714
1856
|
}
|
|
1715
1857
|
```
|
|
@@ -1723,10 +1865,13 @@ The housing is chapter 11's with its posts longer, and with the bridge in place
|
|
|
1723
1865
|
"name": "housing",
|
|
1724
1866
|
"title": "Shoulder housing and fixed ring",
|
|
1725
1867
|
"version": "0.1.0",
|
|
1726
|
-
"uses": ["x1c", "arm"
|
|
1868
|
+
"uses": ["x1c", "arm"],
|
|
1727
1869
|
"engine": "manifold",
|
|
1728
1870
|
"orientation": "The motor plate on the bed, the ring and posts up",
|
|
1729
1871
|
"anchors": {
|
|
1872
|
+
"f1": {"at": ["column_r * cosd(f1)", "column_r * sind(f1)", "plate"], "axis": [0, 0, 1]},
|
|
1873
|
+
"f2": {"at": ["column_r * cosd(f2)", "column_r * sind(f2)", "plate"], "axis": [0, 0, 1]},
|
|
1874
|
+
"f3": {"at": ["column_r * cosd(f3)", "column_r * sind(f3)", "plate"], "axis": [0, 0, 1]},
|
|
1730
1875
|
"axis": {"at": [0, 0, "plate"], "axis": [0, 0, 1]},
|
|
1731
1876
|
"motor": {"at": [0, 0, 0], "axis": [0, 0, 1], "ref": [1, 0, 0]}
|
|
1732
1877
|
},
|
|
@@ -1739,13 +1884,10 @@ The housing is chapter 11's with its posts longer, and with the bridge in place
|
|
|
1739
1884
|
"post_r": {"value": 37, "unit": "mm", "rule": "Three posts outside the output ring", "interface": true},
|
|
1740
1885
|
"post": {"value": 7, "unit": "mm", "rule": "Each post's diameter"},
|
|
1741
1886
|
"post_high": {"value": "arm.bridge_low - arm.face - plate", "unit": "mm", "rule": "From the plate to under the bridge", "interface": true},
|
|
1742
|
-
"
|
|
1743
|
-
"pilot_depth": {"value": 8, "unit": "mm", "rule": "For an M3 × 16 through the bridge"},
|
|
1887
|
+
"pilot_depth": {"value": 8, "unit": "mm", "rule": "Each post's pilot, deep enough for the bridge's screw"},
|
|
1744
1888
|
"column_r": {"value": 37, "unit": "mm", "rule": "Over the base's columns"},
|
|
1745
1889
|
"lobe": {"value": 12, "unit": "mm", "rule": "The plate reaches out over each column"},
|
|
1746
|
-
"
|
|
1747
|
-
"head": {"value": "m3.head + 2 * x1c.fit + x1c.hole_comp", "unit": "mm", "rule": "The screw head's counterbore"},
|
|
1748
|
-
"head_depth": {"value": "m3.head_height + x1c.layer", "unit": "mm", "rule": "A socket head's height, sunk"},
|
|
1890
|
+
"sink": {"value": "x1c.layer", "unit": "mm", "rule": "Each foot's screw head sits a layer under the plate's face"},
|
|
1749
1891
|
"segments": {"value": 64, "rule": "Round enough"},
|
|
1750
1892
|
"ring_segments": {"value": 96, "rule": "Smooth to the eye and to the gear"},
|
|
1751
1893
|
"rad": {"value": 0.017453293, "rule": "Radians in a degree"},
|
|
@@ -1761,11 +1903,14 @@ The housing is chapter 11's with its posts longer, and with the bridge in place
|
|
|
1761
1903
|
|
|
1762
1904
|
```js projects/arm/objects/housing.js
|
|
1763
1905
|
// The motor plate with the fixed ring and posts standing on it. The motor bolts underneath, its shaft up through the middle.
|
|
1906
|
+
// The screws' holes are v.fixings': an M3 pilot in each post for the bridge, and an M3 clearance hole with its cap
|
|
1907
|
+
// head's counterbore in each foot, sunk a layer, for the screw down into the base's column.
|
|
1764
1908
|
import jscad from '@jscad/modeling'
|
|
1765
1909
|
const { cylinder, cylinderElliptic } = jscad.primitives
|
|
1766
1910
|
const { translate } = jscad.transforms
|
|
1767
1911
|
|
|
1768
1912
|
export function main (v) {
|
|
1913
|
+
const pilot = v.fixings.holeModel('M3', { kind: 'pilot' }).diameter, screw = v.fixings.holeModel('M3').diameter, cb = v.fixings.counterboreModel('M3 cap'), head = cb.diameter, headDepth = cb.depth + v.sink
|
|
1769
1914
|
const motor = v.motors.motorModel('17HS4401')
|
|
1770
1915
|
const at = (r, a) => [r * Math.cos(a), r * Math.sin(a)]
|
|
1771
1916
|
const posts = [v.p1, v.p2, v.p3].map((a) => a * v.rad), feet = [v.f1, v.f2, v.f3].map((a) => a * v.rad)
|
|
@@ -1774,9 +1919,9 @@ export function main (v) {
|
|
|
1774
1919
|
const lobes = [...posts, ...feet].map((a) => cylinder({ radius: v.lobe / 2, height: v.plate, center: [...at(v.post_r, a), v.plate / 2], segments: v.segments }))
|
|
1775
1920
|
const joins = [...posts, ...feet].map((a) => jscad.transforms.rotateZ(a, jscad.primitives.cuboid({ size: [v.post_r - v.rim / 2 + 2, v.lobe, v.plate], center: [(v.post_r + v.rim / 2 - 2) / 2, 0, v.plate / 2] })))
|
|
1776
1921
|
const uprights = posts.map((a) => cylinder({ radius: v.post / 2, height: v.post_high + v.plate, center: [...at(v.post_r, a), (v.post_high + v.plate) / 2], segments: v.segments }))
|
|
1777
|
-
const pilots = posts.map((a) => cylinder({ radius:
|
|
1778
|
-
const screws = feet.map((a) => cylinder({ radius:
|
|
1779
|
-
const heads = feet.map((a) => cylinder({ radius:
|
|
1922
|
+
const pilots = posts.map((a) => cylinder({ radius: pilot / 2, height: v.pilot_depth, center: [...at(v.post_r, a), v.plate + v.post_high - v.pilot_depth / 2], segments: v.segments }))
|
|
1923
|
+
const screws = feet.map((a) => cylinder({ radius: screw / 2, height: v.plate + 1, center: [...at(v.column_r, a), v.plate / 2], segments: v.segments }))
|
|
1924
|
+
const heads = feet.map((a) => cylinder({ radius: head / 2, height: headDepth, center: [...at(v.column_r, a), v.plate - headDepth / 2], segments: v.segments }))
|
|
1780
1925
|
// the pocket for the motor's boss would be bridged across: a 45° cone from its roof up through the plate needs no bridge
|
|
1781
1926
|
const hole = v.motors.mountModel(motor, { plate: v.plate, counterbore: true }), rise = v.plate - hole.pocketDepth
|
|
1782
1927
|
const roof = cylinderElliptic({ height: rise + 1, startRadius: [hole.pocket / 2, hole.pocket / 2], endRadius: [hole.pocket / 2 - rise - 1, hole.pocket / 2 - rise - 1], center: [0, 0, hole.pocketDepth + (rise + 1) / 2], segments: v.segments })
|
|
@@ -1894,7 +2039,7 @@ export function main (v) { return sphere({ radius: v.r, center: [0, 0, v.far] })
|
|
|
1894
2039
|
"name": "output",
|
|
1895
2040
|
"title": "Output ring and flange",
|
|
1896
2041
|
"version": "0.1.0",
|
|
1897
|
-
"uses": ["x1c", "arm"
|
|
2042
|
+
"uses": ["x1c", "arm"],
|
|
1898
2043
|
"engine": "manifold",
|
|
1899
2044
|
"orientation": "The flange on the bed, the teeth standing on it",
|
|
1900
2045
|
"description": "Printed flange down and fitted upside down: the same part on the shoulder and the elbow.",
|
|
@@ -1908,7 +2053,6 @@ export function main (v) { return sphere({ radius: v.r, center: [0, 0, v.far] })
|
|
|
1908
2053
|
"rim": {"value": 66, "unit": "mm", "rule": "Round the 57-tooth ring"},
|
|
1909
2054
|
"module": {"value": 1, "unit": "mm", "rule": "The gears'"},
|
|
1910
2055
|
"teeth": {"value": 57, "rule": "The output ring"},
|
|
1911
|
-
"pilot": {"value": 2.9, "unit": "mm", "rule": "An M3 screw self-tapped into the flange", "kind": "community"},
|
|
1912
2056
|
"middle": {"value": 15, "unit": "mm", "rule": "A hole in the middle for the motor's shaft to come up in"},
|
|
1913
2057
|
"bolt": {"value": 20, "unit": "mm", "rule": "Radius of the bolt circle", "interface": true},
|
|
1914
2058
|
"segments": {"value": 24, "rule": "Small holes"},
|
|
@@ -1921,20 +2065,24 @@ export function main (v) { return sphere({ radius: v.r, center: [0, 0, v.far] })
|
|
|
1921
2065
|
|
|
1922
2066
|
```js projects/arm/objects/output.js
|
|
1923
2067
|
// The output ring, drawn as it prints: its flange on the bed, the teeth standing on it; it goes on upside down.
|
|
2068
|
+
// Its four holes are v.fixings' M3 pilots, through the flange: the spindle's screws cut their thread in them.
|
|
1924
2069
|
import jscad from '@jscad/modeling'
|
|
1925
2070
|
const { cylinder } = jscad.primitives
|
|
1926
2071
|
const { translate } = jscad.transforms
|
|
1927
2072
|
|
|
1928
2073
|
export function main (v) {
|
|
2074
|
+
const pilot = v.fixings.holeModel('M3', { kind: 'pilot' }).diameter
|
|
1929
2075
|
const flange = cylinder({ radius: v.rim / 2, height: v.top, center: [0, 0, v.top / 2], segments: v.ring_segments })
|
|
1930
2076
|
const ring = translate([0, 0, v.top], v.gears.internal({ module: v.module, teeth: v.teeth, width: v.width, rim: v.rim }))
|
|
1931
|
-
const holes = Array.from({ length: v.bolts }, (_, k) => cylinder({ radius:
|
|
2077
|
+
const holes = Array.from({ length: v.bolts }, (_, k) => cylinder({ radius: pilot / 2, height: v.top + 1, center: [v.bolt * Math.cos(k * v.quarter), v.bolt * Math.sin(k * v.quarter), v.top / 2], segments: v.segments }))
|
|
1932
2078
|
const middle = cylinder({ radius: v.middle / 2, height: v.top + 1, center: [0, 0, v.top / 2], segments: v.ring_segments })
|
|
1933
2079
|
return v.ops.subtract(v.ops.union(flange, ring), holes, middle)
|
|
1934
2080
|
}
|
|
1935
2081
|
```
|
|
1936
2082
|
|
|
1937
|
-
The spindle bolts onto the output's flange
|
|
2083
|
+
The spindle bolts onto the output's flange with four M3 countersunk screws into the flange's pilots, each head flush in a
|
|
2084
|
+
countersink as wide as an ISO 10642 head (6.72 mm), so the bridge passes over; the disc is 48 mm across so the
|
|
2085
|
+
countersinks keep an edge outside them. It carries the bearing's inner race on a shoulder. The bridge, on the housing's
|
|
1938
2086
|
posts, holds the outer race in a seat drawn from the 6800's rule set and this printer's press fit.
|
|
1939
2087
|
|
|
1940
2088
|
```json projects/arm/objects/bridge.json
|
|
@@ -1943,11 +2091,14 @@ posts, holds the outer race in a seat drawn from the 6800's rule set and this pr
|
|
|
1943
2091
|
"name": "bridge",
|
|
1944
2092
|
"title": "Bridge: the 6800's seat",
|
|
1945
2093
|
"version": "0.1.0",
|
|
1946
|
-
"uses": ["x1c", "arm"
|
|
2094
|
+
"uses": ["x1c", "arm"],
|
|
1947
2095
|
"engine": "manifold",
|
|
1948
2096
|
"orientation": "Upside to the sky, as it goes on: the pocket opens upward and its ledge prints flat",
|
|
1949
2097
|
"description": "Three arms across the housing's posts, holding the bearing that takes the output's tipping load.",
|
|
1950
2098
|
"anchors": {
|
|
2099
|
+
"s1": {"at": ["post_r * cosd(p1)", "post_r * sind(p1)", "thick"], "axis": [0, 0, 1]},
|
|
2100
|
+
"s2": {"at": ["post_r * cosd(p2)", "post_r * sind(p2)", "thick"], "axis": [0, 0, 1]},
|
|
2101
|
+
"s3": {"at": ["post_r * cosd(p3)", "post_r * sind(p3)", "thick"], "axis": [0, 0, 1]},
|
|
1951
2102
|
"seat": {"at": [0, 0, "thick - width"], "axis": [0, 0, 1]},
|
|
1952
2103
|
"under": {"at": [0, 0, 0], "axis": [0, 0, 1]}
|
|
1953
2104
|
},
|
|
@@ -1964,9 +2115,7 @@ posts, holds the outer race in a seat drawn from the 6800's rule set and this pr
|
|
|
1964
2115
|
"p2": {"value": 150, "unit": "°", "rule": "Second post"},
|
|
1965
2116
|
"p3": {"value": 270, "unit": "°", "rule": "Third post"},
|
|
1966
2117
|
"rad": {"value": 0.017453293, "rule": "Radians in a degree"},
|
|
1967
|
-
"
|
|
1968
|
-
"head": {"value": "m3.head + 2 * x1c.fit + x1c.hole_comp", "unit": "mm", "rule": "The screw head's counterbore"},
|
|
1969
|
-
"head_depth": {"value": "m3.head_height + x1c.layer", "unit": "mm", "rule": "A socket head's height, sunk, so the arm passes over"},
|
|
2118
|
+
"sink": {"value": "x1c.layer", "unit": "mm", "rule": "Each screw head sits a layer under the face, so the arm passes over"},
|
|
1970
2119
|
"segments": {"value": 64, "rule": "Round enough"}
|
|
1971
2120
|
}
|
|
1972
2121
|
}
|
|
@@ -1974,18 +2123,20 @@ posts, holds the outer race in a seat drawn from the 6800's rule set and this pr
|
|
|
1974
2123
|
|
|
1975
2124
|
```js projects/arm/objects/bridge.js
|
|
1976
2125
|
// A three-armed plate over the gearbox, the bearing's seat in the middle.
|
|
2126
|
+
// Each post's screw: an M3 clearance hole and its cap head's counterbore, sunk a layer, both v.fixings'.
|
|
1977
2127
|
import jscad from '@jscad/modeling'
|
|
1978
2128
|
const { cylinder, cuboid } = jscad.primitives
|
|
1979
2129
|
const { rotateZ } = jscad.transforms
|
|
1980
2130
|
|
|
1981
2131
|
export function main (v) {
|
|
2132
|
+
const screw = v.fixings.holeModel('M3').diameter, cb = v.fixings.counterboreModel('M3 cap'), head = cb.diameter, headDepth = cb.depth + v.sink
|
|
1982
2133
|
const posts = [v.p1, v.p2, v.p3].map((a) => a * v.rad), at = (a) => [v.post_r * Math.cos(a), v.post_r * Math.sin(a)]
|
|
1983
2134
|
const hub = cylinder({ radius: v.hub / 2, height: v.thick, center: [0, 0, v.thick / 2], segments: v.segments * 2 })
|
|
1984
2135
|
const arms = posts.map((a) => rotateZ(a, cuboid({ size: [v.post_r, v.lobe, v.thick], center: [v.post_r / 2, 0, v.thick / 2] })))
|
|
1985
2136
|
const lobes = posts.map((a) => cylinder({ radius: v.lobe / 2, height: v.thick, center: [...at(a), v.thick / 2], segments: v.segments }))
|
|
1986
2137
|
const seat = v.shapes.bearingSeat({ bore: v.bore, outer_diameter: v.outer, width: v.width }, { fit: 'press', relief: v.relief, through: true, printer: v.x1c, at: [0, 0, v.thick], into: '-z', lead: 0 })
|
|
1987
|
-
const screws = posts.map((a) => cylinder({ radius:
|
|
1988
|
-
const heads = posts.map((a) => cylinder({ radius:
|
|
2138
|
+
const screws = posts.map((a) => cylinder({ radius: screw / 2, height: v.thick + 1, center: [...at(a), v.thick / 2], segments: v.segments }))
|
|
2139
|
+
const heads = posts.map((a) => cylinder({ radius: head / 2, height: headDepth + 1, center: [...at(a), v.thick - (headDepth - 1) / 2], segments: v.segments }))
|
|
1989
2140
|
return v.ops.subtract(v.ops.union(hub, arms, lobes), seat, screws, heads)
|
|
1990
2141
|
}
|
|
1991
2142
|
```
|
|
@@ -1996,28 +2147,29 @@ export function main (v) {
|
|
|
1996
2147
|
"name": "spindle",
|
|
1997
2148
|
"title": "Spindle: disc and shaft",
|
|
1998
2149
|
"version": "0.1.0",
|
|
1999
|
-
"uses": ["x1c", "arm"
|
|
2150
|
+
"uses": ["x1c", "arm"],
|
|
2000
2151
|
"engine": "manifold",
|
|
2001
2152
|
"orientation": "The disc on the bed, the shaft up, as it goes on",
|
|
2002
2153
|
"description": "The output's flange turns the spindle; the spindle's shaft runs in the 6800 and carries the upper arm on a hexagon at its top.",
|
|
2003
2154
|
"anchors": {
|
|
2155
|
+
"b1": {"at": ["bolt", 0, "disc"], "axis": [0, 0, 1]},
|
|
2156
|
+
"b2": {"at": [0, "bolt", "disc"], "axis": [0, 0, 1]},
|
|
2157
|
+
"b3": {"at": ["0 - bolt", 0, "disc"], "axis": [0, 0, 1]},
|
|
2158
|
+
"b4": {"at": [0, "0 - bolt", "disc"], "axis": [0, 0, 1]},
|
|
2004
2159
|
"down": {"at": [0, 0, 0], "axis": [0, 0, 1], "ref": [1, 0, 0]},
|
|
2005
2160
|
"seat": {"at": [0, 0, "collar_top + width"], "axis": [0, 0, 1], "ref": [1, 0, 0]}
|
|
2006
2161
|
},
|
|
2007
2162
|
"variables": {
|
|
2008
|
-
"disc": {"value": "arm.disc", "unit": "mm", "rule": "Thick enough for a
|
|
2009
|
-
"rim": {"value":
|
|
2163
|
+
"disc": {"value": "arm.disc", "unit": "mm", "rule": "Thick enough for the countersinks, with a wall of screw hole under each"},
|
|
2164
|
+
"rim": {"value": 48, "unit": "mm", "rule": "Round the 40 mm bolt circle and its countersinks, 6.82 mm across, with a 0.6 mm edge outside them"},
|
|
2010
2165
|
"bolt": {"value": 20, "unit": "mm", "rule": "On the output's bolt circle"},
|
|
2011
|
-
"hole": {"value": "m3.clearance + x1c.hole_comp", "unit": "mm", "rule": "M3 clearance"},
|
|
2012
|
-
"head": {"value": "m3.head", "unit": "mm", "rule": "A countersunk head, flush with the disc so the bridge passes over"},
|
|
2013
2166
|
"shaft": {"value": "arm.bearing_bore - x1c.press", "unit": "mm", "rule": "A close slide into the bearing's bore, clamped end to end by the upper arm's screw"},
|
|
2014
2167
|
"width": {"value": "arm.bearing_width", "unit": "mm", "rule": "The bearing"},
|
|
2015
2168
|
"collar_top": {"value": "arm.bridge_low + arm.bridge - width - arm.output_top", "unit": "mm", "rule": "Where the inner race rests, above the disc's underside"},
|
|
2016
2169
|
"shoulder": {"value": 13, "unit": "mm", "rule": "Stops the inner race; clears the outer race"},
|
|
2017
2170
|
"hex": {"value": 8, "unit": "mm", "rule": "Hexagon across its flats: inside the bore, drives the upper arm"},
|
|
2018
2171
|
"hex_long": {"value": 5, "unit": "mm", "rule": "Into the arm's socket"},
|
|
2019
|
-
"
|
|
2020
|
-
"pilot_depth": {"value": 12, "unit": "mm", "rule": "For the arm's M3"},
|
|
2172
|
+
"pilot_depth": {"value": 12, "unit": "mm", "rule": "The pilot in the hexagon's top, for the upper arm's screw"},
|
|
2021
2173
|
"cos30": {"value": "cosd(30)", "rule": "A hexagon, across corners to across flats"},
|
|
2022
2174
|
"bolts": {"value": 4, "rule": "On the bolt circle"},
|
|
2023
2175
|
"quarter": {"value": 1.57079633, "rule": "A quarter turn in radians"},
|
|
@@ -2029,10 +2181,13 @@ export function main (v) {
|
|
|
2029
2181
|
|
|
2030
2182
|
```js projects/arm/objects/spindle.js
|
|
2031
2183
|
// A disc on the output's flange and a shaft up through the bearing, a hexagon at its top for the arm.
|
|
2184
|
+
// The screws are v.fixings': four M3 countersunk screws down through the disc into the output's flange, each hole's
|
|
2185
|
+
// countersink as wide as an ISO 10642 head so it sits flush, and an M3 pilot in the hexagon's top for the upper arm's screw.
|
|
2032
2186
|
import jscad from '@jscad/modeling'
|
|
2033
2187
|
const { cylinder } = jscad.primitives
|
|
2034
2188
|
|
|
2035
2189
|
export function main (v) {
|
|
2190
|
+
const pilotD = v.fixings.holeModel('M3', { kind: 'pilot' }).diameter
|
|
2036
2191
|
const plate = cylinder({ radius: v.rim / 2, height: v.disc, center: [0, 0, v.disc / 2], segments: v.segments * 2 })
|
|
2037
2192
|
const top = v.collar_top + v.width
|
|
2038
2193
|
const shaft = cylinder({ radius: v.shaft / 2, height: top - 1, center: [0, 0, (top + 1) / 2], segments: v.segments * 2 })
|
|
@@ -2040,9 +2195,9 @@ export function main (v) {
|
|
|
2040
2195
|
const hex = cylinder({ radius: v.hex / 2 / v.cos30, height: v.hex_long, center: [0, 0, top + v.hex_long / 2], segments: v.hex_segments })
|
|
2041
2196
|
const screws = Array.from({ length: v.bolts }, (_, k) => {
|
|
2042
2197
|
const c = [v.bolt * Math.cos(k * v.quarter), v.bolt * Math.sin(k * v.quarter), v.disc]
|
|
2043
|
-
return v.
|
|
2198
|
+
return v.fixings.countersink('M3', { length: v.disc + 1, at: c, into: '-z' })
|
|
2044
2199
|
})
|
|
2045
|
-
const pilot = cylinder({ radius:
|
|
2200
|
+
const pilot = cylinder({ radius: pilotD / 2, height: v.pilot_depth, center: [0, 0, top + v.hex_long - v.pilot_depth / 2], segments: v.segments })
|
|
2046
2201
|
return v.ops.subtract(v.ops.union(plate, shaft, collar, hex), screws, pilot)
|
|
2047
2202
|
}
|
|
2048
2203
|
```
|
|
@@ -2058,11 +2213,13 @@ hexagon's socket, the elbow's fixed ring and posts. The elbow's motor bolts to t
|
|
|
2058
2213
|
"name": "upper",
|
|
2059
2214
|
"title": "Upper arm",
|
|
2060
2215
|
"version": "0.1.0",
|
|
2061
|
-
"uses": ["x1c", "arm"
|
|
2216
|
+
"uses": ["x1c", "arm"],
|
|
2062
2217
|
"engine": "manifold",
|
|
2063
2218
|
"orientation": "The arm's top face on the bed: the hub, the elbow's fixed ring and its posts all rise from the one flat face, and go on hanging down",
|
|
2064
2219
|
"description": "From the shoulder's hexagon to the elbow's motor. Printed as one part with the elbow's fixed ring, so the elbow's gearbox costs a sun, three planets and an output ring.",
|
|
2065
2220
|
"anchors": {
|
|
2221
|
+
"sw1": {"at": ["switch_x - switch_pitch / 2 * cosd(switch_a)", "switch_y - switch_pitch / 2 * sind(switch_a)", "thick + switch_high"], "axis": [0, 0, 1]},
|
|
2222
|
+
"sw2": {"at": ["switch_x + switch_pitch / 2 * cosd(switch_a)", "switch_y + switch_pitch / 2 * sind(switch_a)", "thick + switch_high"], "axis": [0, 0, 1]},
|
|
2066
2223
|
"hub": {"at": [0, 0, "thick + collar"], "axis": [0, 0, -1], "ref": [1, 0, 0]},
|
|
2067
2224
|
"elbow": {"at": ["long", 0, "thick"], "axis": [0, 0, 1], "ref": [1, 0, 0]},
|
|
2068
2225
|
"output": {"at": ["long", 0, "thick + gear + arm_gap"], "axis": [0, 0, 1], "ref": [1, 0, 0]},
|
|
@@ -2084,7 +2241,6 @@ hexagon's socket, the elbow's fixed ring and posts. The elbow's motor bolts to t
|
|
|
2084
2241
|
"hex_depth": {"value": "thick + collar - floor", "unit": "mm", "rule": "The socket's depth"},
|
|
2085
2242
|
"floor": {"value": 3, "unit": "mm", "rule": "What the screw pulls against: a socket's floor"},
|
|
2086
2243
|
"hex_fit": {"value": "x1c.fit + x1c.hole_comp", "unit": "mm", "rule": "Across the socket's flats, over the spindle's, printed"},
|
|
2087
|
-
"screw": {"value": "m3.clearance + x1c.hole_comp", "unit": "mm", "rule": "M3 clearance"},
|
|
2088
2244
|
"gear": {"value": "arm.gear", "unit": "mm", "rule": "The fixed ring's face"},
|
|
2089
2245
|
"arm_gap": {"value": "arm.ring_gap", "unit": "mm", "rule": "Between the fixed ring and the output ring"},
|
|
2090
2246
|
"rim": {"value": 62, "unit": "mm", "rule": "Round the 54-tooth ring"},
|
|
@@ -2099,8 +2255,7 @@ hexagon's socket, the elbow's fixed ring and posts. The elbow's motor bolts to t
|
|
|
2099
2255
|
"rad": {"value": 0.017453293, "rule": "Radians in a degree"},
|
|
2100
2256
|
"clip_at": {"value": "thick + gear + arm_gap + gear + arm.flange + clip_gap", "unit": "mm", "rule": "Each post's tip, where its clip goes on, just past the output's flange"},
|
|
2101
2257
|
"clip_gap": {"value": 0.3, "unit": "mm", "rule": "The output turns under the clips with this to spare"},
|
|
2102
|
-
"
|
|
2103
|
-
"pilot_depth": {"value": 8, "unit": "mm", "rule": "For an M3 × 10 through a clip"},
|
|
2258
|
+
"pilot_depth": {"value": 8, "unit": "mm", "rule": "Each post's pilot, deep enough for its clip's screw"},
|
|
2104
2259
|
"flag_r": {"value": 50, "unit": "mm", "rule": "The home flag, as far from the shoulder as its switch"},
|
|
2105
2260
|
"flag_h": {"value": 5.5, "unit": "mm", "rule": "Down from the arm's underside far enough to reach the switch's lever"},
|
|
2106
2261
|
"flag_wide": {"value": 14, "unit": "mm", "rule": "Along the radius"},
|
|
@@ -2113,8 +2268,7 @@ hexagon's socket, the elbow's fixed ring and posts. The elbow's motor bolts to t
|
|
|
2113
2268
|
"post_w": {"value": 14, "unit": "mm", "rule": "Elbow switch post, along the radius"},
|
|
2114
2269
|
"post_d": {"value": 12, "unit": "mm", "rule": "Elbow switch post, tangential"},
|
|
2115
2270
|
"switch_pitch": {"value": "arm.switch_pitch", "unit": "mm", "rule": "The switch's screw spacing"},
|
|
2116
|
-
"
|
|
2117
|
-
"switch_depth": {"value": 9, "unit": "mm", "rule": "Pilot depth for M2 × 8"},
|
|
2271
|
+
"switch_depth": {"value": 9, "unit": "mm", "rule": "Each switch screw's pilot depth"},
|
|
2118
2272
|
"segments": {"value": 64, "rule": "Round enough"},
|
|
2119
2273
|
"ring_segments": {"value": 96, "rule": "The rim's circle"},
|
|
2120
2274
|
"hex_segments": {"value": 6, "rule": "A hexagon's sides"},
|
|
@@ -2131,6 +2285,8 @@ hexagon's socket, the elbow's fixed ring and posts. The elbow's motor bolts to t
|
|
|
2131
2285
|
```js projects/arm/objects/upper.js
|
|
2132
2286
|
// The upper arm, drawn as it prints: its top face on the bed, the elbow's ring standing on it, the hub's socket opening
|
|
2133
2287
|
// upward. The elbow's NEMA 14 bolts on the bed side, its shaft up through the plate, as chapter 11's housing does.
|
|
2288
|
+
// The screws' holes are v.fixings': an M3 clearance hole through the socket's floor for the screw into the spindle,
|
|
2289
|
+
// an M3 pilot in each post for its clip, and the elbow switch's M2 pilots.
|
|
2134
2290
|
import jscad from '@jscad/modeling'
|
|
2135
2291
|
const { cylinder, cylinderElliptic, cuboid, circle } = jscad.primitives
|
|
2136
2292
|
const { translate, rotateZ } = jscad.transforms
|
|
@@ -2138,6 +2294,7 @@ const { extrudeLinear } = jscad.extrusions
|
|
|
2138
2294
|
const { hull } = jscad.hulls
|
|
2139
2295
|
|
|
2140
2296
|
export function main (v) {
|
|
2297
|
+
const screw = v.fixings.holeModel('M3').diameter, pilot = v.fixings.holeModel('M3', { kind: 'pilot' }).diameter, switchPilot = v.fixings.holeModel('M2', { kind: 'pilot' }).diameter
|
|
2141
2298
|
const motor = v.motors.motorModel('nema14')
|
|
2142
2299
|
const at = (r, a) => [v.long + r * Math.cos(a), r * Math.sin(a)]
|
|
2143
2300
|
const posts = [v.p1, v.p2, v.p3].map((a) => a * v.rad)
|
|
@@ -2149,14 +2306,14 @@ export function main (v) {
|
|
|
2149
2306
|
const lobes = posts.map((a) => cylinder({ radius: v.lobe / 2, height: v.thick, center: [...at(v.post_r, a), v.thick / 2], segments: v.segments }))
|
|
2150
2307
|
const joins = posts.map((a) => translate([v.long, 0, 0], rotateZ(a, cuboid({ size: [v.post_r - v.rim / 2 + 2, v.lobe, v.thick], center: [(v.post_r + v.rim / 2 - 2) / 2, 0, v.thick / 2] }))))
|
|
2151
2308
|
const uprights = posts.map((a) => cylinder({ radius: v.post / 2, height: v.clip_at, center: [...at(v.post_r, a), v.clip_at / 2], segments: v.segments }))
|
|
2152
|
-
const pilots = posts.map((a) => cylinder({ radius:
|
|
2309
|
+
const pilots = posts.map((a) => cylinder({ radius: pilot / 2, height: v.pilot_depth, center: [...at(v.post_r, a), v.clip_at - v.pilot_depth / 2], segments: v.segments }))
|
|
2153
2310
|
const collar = cylinder({ radius: v.collar_d / 2, height: v.collar + 1, center: [0, 0, v.thick + (v.collar - 1) / 2], segments: v.segments })
|
|
2154
2311
|
const socket = cylinder({ radius: (v.hex + v.hex_fit) / 2 / v.cos30, height: v.hex_depth + 1, center: [0, 0, v.floor + (v.hex_depth + 1) / 2], segments: v.hex_segments })
|
|
2155
|
-
const through = cylinder({ radius:
|
|
2312
|
+
const through = cylinder({ radius: screw / 2, height: v.floor + 1, center: [0, 0, (v.floor - 1) / 2], segments: v.segments })
|
|
2156
2313
|
const flag = cuboid({ size: [v.flag_wide, v.flag_thick, v.flag_h], center: [v.flag_r, 0, v.thick + v.flag_h / 2] })
|
|
2157
2314
|
const a = v.switch_a * v.rad
|
|
2158
2315
|
const switchPost = translate([v.switch_x, v.switch_y, 0], rotateZ(a, cuboid({ size: [v.post_w, v.post_d, v.thick + v.switch_high], center: [0, 0, (v.thick + v.switch_high) / 2] })))
|
|
2159
|
-
const switchPilots = [-1, 1].map((s) => cylinder({ radius:
|
|
2316
|
+
const switchPilots = [-1, 1].map((s) => cylinder({ radius: switchPilot / 2, height: v.switch_depth, center: [v.switch_x + s * v.switch_pitch / 2 * Math.cos(a), v.switch_y + s * v.switch_pitch / 2 * Math.sin(a), v.thick + v.switch_high - v.switch_depth / 2], segments: v.segments }))
|
|
2160
2317
|
const bands = [v.bias_1, v.bias_2].map((x) => cylinder({ radius: v.bias_d / 2, height: v.thick + 1, center: [x, 0, v.thick / 2], segments: v.segments }))
|
|
2161
2318
|
const hole = v.motors.mountModel(motor, { plate: v.thick, counterbore: true }), rise = v.thick - hole.pocketDepth
|
|
2162
2319
|
const roof = translate([v.long, 0, 0], cylinderElliptic({ height: rise + 1, startRadius: [hole.pocket / 2, hole.pocket / 2], endRadius: [hole.pocket / 2 - rise - 1, hole.pocket / 2 - rise - 1], center: [0, 0, hole.pocketDepth + (rise + 1) / 2], segments: v.segments }))
|
|
@@ -2171,7 +2328,7 @@ export function main (v) {
|
|
|
2171
2328
|
"name": "clip",
|
|
2172
2329
|
"title": "Retaining clip",
|
|
2173
2330
|
"version": "0.1.0",
|
|
2174
|
-
"uses": ["x1c"
|
|
2331
|
+
"uses": ["x1c"],
|
|
2175
2332
|
"orientation": "Flat on the bed",
|
|
2176
2333
|
"description": "Holds the elbow's output ring from dropping off its posts.",
|
|
2177
2334
|
"anchors": {
|
|
@@ -2182,7 +2339,6 @@ export function main (v) {
|
|
|
2182
2339
|
"back": {"value": 4, "unit": "mm", "rule": "Round the post"},
|
|
2183
2340
|
"wide": {"value": 8, "unit": "mm", "rule": "As wide as the post and a little"},
|
|
2184
2341
|
"thick": {"value": 3, "unit": "mm", "rule": "Fifteen layers"},
|
|
2185
|
-
"hole": {"value": "m3.clearance + x1c.hole_comp", "unit": "mm", "rule": "M3 clearance"},
|
|
2186
2342
|
"segments": {"value": 24, "rule": "Small round hole"}
|
|
2187
2343
|
}
|
|
2188
2344
|
}
|
|
@@ -2190,13 +2346,15 @@ export function main (v) {
|
|
|
2190
2346
|
|
|
2191
2347
|
```js projects/arm/objects/clip.js
|
|
2192
2348
|
// A flat tab screwed to a post, its nose over the flange.
|
|
2349
|
+
// Its screw's hole is v.fixings' M3 clearance hole.
|
|
2193
2350
|
import jscad from '@jscad/modeling'
|
|
2194
2351
|
const { cuboid, cylinder } = jscad.primitives
|
|
2195
2352
|
const { subtract } = jscad.booleans
|
|
2196
2353
|
|
|
2197
2354
|
export function main (v) {
|
|
2355
|
+
const hole = v.fixings.holeModel('M3').diameter
|
|
2198
2356
|
const tab = cuboid({ size: [v.reach + v.back, v.wide, v.thick], center: [(v.back - v.reach) / 2, 0, v.thick / 2] })
|
|
2199
|
-
return subtract(tab, cylinder({ radius:
|
|
2357
|
+
return subtract(tab, cylinder({ radius: hole / 2, height: v.thick + 1, center: [0, 0, v.thick / 2], segments: v.segments }))
|
|
2200
2358
|
}
|
|
2201
2359
|
```
|
|
2202
2360
|
|
|
@@ -2206,10 +2364,16 @@ export function main (v) {
|
|
|
2206
2364
|
"name": "forearm",
|
|
2207
2365
|
"title": "Forearm",
|
|
2208
2366
|
"version": "0.1.0",
|
|
2209
|
-
"uses": ["x1c", "arm"
|
|
2367
|
+
"uses": ["x1c", "arm"],
|
|
2210
2368
|
"engine": "manifold",
|
|
2211
2369
|
"orientation": "The bar flat on the bed, the boss and flag up",
|
|
2212
2370
|
"anchors": {
|
|
2371
|
+
"b1": {"at": ["bolt", 0, 0], "axis": [0, 0, 1]},
|
|
2372
|
+
"b2": {"at": [0, "bolt", 0], "axis": [0, 0, 1]},
|
|
2373
|
+
"b3": {"at": ["0 - bolt", 0, 0], "axis": [0, 0, 1]},
|
|
2374
|
+
"b4": {"at": [0, "0 - bolt", 0], "axis": [0, 0, 1]},
|
|
2375
|
+
"h1": {"at": ["long - pitch", 0, "mid"], "axis": [0, 1, 0]},
|
|
2376
|
+
"h2": {"at": ["long + pitch", 0, "mid"], "axis": [0, 1, 0]},
|
|
2213
2377
|
"hub": {"at": [0, 0, "boss"], "axis": [0, 0, -1], "ref": [1, 0, 0]},
|
|
2214
2378
|
"holder": {"at": ["long", 0, "mid"], "axis": [0, 1, 0], "ref": [1, 0, 0]},
|
|
2215
2379
|
"flag": {"at": ["flag_x", "flag_y", "bar + flag_h"], "axis": [0, 0, 1]},
|
|
@@ -2223,9 +2387,7 @@ export function main (v) {
|
|
|
2223
2387
|
"mid": {"value": "arm.arm_mid", "unit": "mm", "rule": "Half the thickness"},
|
|
2224
2388
|
"boss": {"value": "arm.boss", "unit": "mm", "rule": "The bar passes under the elbow's clips, the boss above reaches the flange"},
|
|
2225
2389
|
"boss_d": {"value": 46, "unit": "mm", "rule": "Round the 40 mm bolt circle"},
|
|
2226
|
-
"
|
|
2227
|
-
"head": {"value": "m3.head + 2 * x1c.fit + x1c.hole_comp", "unit": "mm", "rule": "The screw's head, counterbored in the bed side"},
|
|
2228
|
-
"head_depth": {"value": "m3.head_height + x1c.layer", "unit": "mm", "rule": "Sunk"},
|
|
2390
|
+
"sink": {"value": 1.5, "unit": "mm", "rule": "Each screw head sits this far into the boss, so an M3x12 engages the whole flange and its tip stops at the flange's far face, clear of the planets"},
|
|
2229
2391
|
"bolt": {"value": 20, "unit": "mm", "rule": "The output's bolt circle, radius"},
|
|
2230
2392
|
"bolts": {"value": 4, "rule": "On the bolt circle"},
|
|
2231
2393
|
"quarter": {"value": 1.57079633, "rule": "A quarter turn in radians"},
|
|
@@ -2248,7 +2410,11 @@ export function main (v) {
|
|
|
2248
2410
|
```
|
|
2249
2411
|
|
|
2250
2412
|
```js projects/arm/objects/forearm.js
|
|
2251
|
-
// A short bar from the elbow's output to a yoke round the pen holder's block.
|
|
2413
|
+
// A short bar from the elbow's output to a yoke round the pen holder's block. The yoke's cheeks run parallel along the
|
|
2414
|
+
// slot, so the heads and nuts of the screws across it sit square.
|
|
2415
|
+
// The screws' holes are v.fixings': two M3 clearance holes across the yoke for the holder's screws, each head
|
|
2416
|
+
// counterbored into the near cheek (on its side, so a teardrop) so an M3x30 reaches its nut on the far one, and four
|
|
2417
|
+
// in the boss with their cap heads' counterbores for the screws into the elbow's output.
|
|
2252
2418
|
import jscad from '@jscad/modeling'
|
|
2253
2419
|
const { cylinder, cuboid, circle, rectangle } = jscad.primitives
|
|
2254
2420
|
const { translate } = jscad.transforms
|
|
@@ -2256,14 +2422,15 @@ const { extrudeLinear } = jscad.extrusions
|
|
|
2256
2422
|
const { hull } = jscad.hulls
|
|
2257
2423
|
|
|
2258
2424
|
export function main (v) {
|
|
2425
|
+
const screw = v.fixings.holeModel('M3').diameter, cb = v.fixings.counterboreModel('M3 cap'), head = cb.diameter, headDepth = cb.depth + v.sink
|
|
2259
2426
|
const endWide = v.block + v.cheek * 2, tip = v.long + v.reach
|
|
2260
2427
|
const dot = (r, x) => translate([x, 0], circle({ radius: r, segments: v.segments }))
|
|
2261
|
-
const bar = extrudeLinear({ height: v.bar }, hull(dot(v.wide / 2, 0), rectangle({ size: [
|
|
2428
|
+
const bar = extrudeLinear({ height: v.bar }, hull(dot(v.wide / 2, 0), rectangle({ size: [tip - v.long + v.slot_from, endWide], center: [(tip + v.long - v.slot_from) / 2, 0] })))
|
|
2262
2429
|
const boss = cylinder({ radius: v.boss_d / 2, height: v.boss, center: [0, 0, v.boss / 2], segments: v.segments * 2 })
|
|
2263
2430
|
const slot = cuboid({ size: [tip + 1 - (v.long - v.slot_from), v.block + v.slot_fit, v.bar + 1], center: [(tip + 1 + v.long - v.slot_from) / 2, 0, v.bar / 2] })
|
|
2264
|
-
const holes = [-1, 1].map((s) => v.
|
|
2265
|
-
const bolts = Array.from({ length: v.bolts }, (_, k) => cylinder({ radius:
|
|
2266
|
-
const heads = Array.from({ length: v.bolts }, (_, k) => cylinder({ radius:
|
|
2431
|
+
const holes = [-1, 1].map((s) => v.fixings.counterbore('M3 cap', { length: endWide, at: [v.long + s * v.pitch, 0 - endWide / 2, v.mid], into: '+y' }))
|
|
2432
|
+
const bolts = Array.from({ length: v.bolts }, (_, k) => cylinder({ radius: screw / 2, height: v.boss + 1, center: [v.bolt * Math.cos(k * v.quarter), v.bolt * Math.sin(k * v.quarter), v.boss / 2], segments: v.segments }))
|
|
2433
|
+
const heads = Array.from({ length: v.bolts }, (_, k) => cylinder({ radius: head / 2, height: headDepth + 1, center: [v.bolt * Math.cos(k * v.quarter), v.bolt * Math.sin(k * v.quarter), (headDepth - 1) / 2], segments: v.segments }))
|
|
2267
2434
|
const flag = cuboid({ size: [v.flag_wide, v.flag_thick, v.flag_h], center: [v.flag_x, v.flag_y, v.bar + v.flag_h / 2] })
|
|
2268
2435
|
const band = cylinder({ radius: v.bias_d / 2, height: v.bar + 1, center: [v.bias_at, 0, v.bar / 2], segments: v.segments })
|
|
2269
2436
|
return v.ops.subtract(v.ops.union(bar, boss, flag), slot, holes, bolts, heads, band)
|
|
@@ -2284,12 +2451,13 @@ come out of the build: the holder's `.js` computes them and refuses to build if
|
|
|
2284
2451
|
"name": "holder",
|
|
2285
2452
|
"title": "Pen holder with lift",
|
|
2286
2453
|
"version": "0.1.0",
|
|
2287
|
-
"uses": ["x1c", "arm", "petg"
|
|
2454
|
+
"uses": ["x1c", "arm", "petg"],
|
|
2288
2455
|
"engine": "manifold",
|
|
2289
2456
|
"material": "PETG",
|
|
2290
2457
|
"orientation": "Flat on the bed: the drawing's x and y are the bed's, the pen's axis along y. The leaves bend within their layers. PETG: it creeps less than PLA held bent",
|
|
2291
2458
|
"description": "A shuttle holding the pen on two tapered leaves: a parallel guide. Its spring is the pen's pressure; an SG90 on a stock horn lifts it. Drawn at rest, the leaves straight.",
|
|
2292
2459
|
"anchors": {
|
|
2460
|
+
"clamp": {"at": ["pen_x", 0, "thick"], "axis": [0, 0, 1]},
|
|
2293
2461
|
"mount": {"at": [0, 0, "half"], "axis": [0, 0, -1], "ref": [1, 0, 0]},
|
|
2294
2462
|
"tool": {"at": ["pen_x", "paper", "half"], "axis": [0, 1, 0], "ref": [1, 0, 0]},
|
|
2295
2463
|
"pen": {"at": ["pen_x", "paper - arm.press", "half"], "axis": [0, 1, 0], "ref": [1, 0, 0]},
|
|
@@ -2313,8 +2481,6 @@ come out of the build: the holder's `.js` computes them and refuses to build if
|
|
|
2313
2481
|
"block_x": {"value": 8, "unit": "mm", "rule": "Half the bolt block's length along x"},
|
|
2314
2482
|
"shuttle": {"value": 14, "unit": "mm", "rule": "Half the shuttle's height along y"},
|
|
2315
2483
|
"bolt_y": {"value": 4, "unit": "mm", "rule": "Half the bolts' spacing along x"},
|
|
2316
|
-
"bolt": {"value": "m3.clearance + x1c.hole_comp", "unit": "mm", "rule": "M3 clearance, through the block"},
|
|
2317
|
-
"clamp": {"value": "m3.clearance - 0.6", "unit": "mm", "rule": "The pen's clamp screw, self-tapped through the shuttle's wall", "kind": "community"},
|
|
2318
2484
|
"lug_x0": {"value": 43, "unit": "mm", "rule": "The lug the horn lifts, its left edge"},
|
|
2319
2485
|
"lug_x1": {"value": 47.5, "unit": "mm", "rule": "Its right edge, clear of the pen"},
|
|
2320
2486
|
"lug_y": {"value": -22.2, "unit": "mm", "rule": "Its underside, a hair above the horn at rest"},
|
|
@@ -2333,11 +2499,14 @@ come out of the build: the holder's `.js` computes them and refuses to build if
|
|
|
2333
2499
|
|
|
2334
2500
|
```js projects/arm/objects/holder.js
|
|
2335
2501
|
// All in one flat print: a fixed frame with the servo, two tapered leaves, the shuttle with the pen's bore and a lug for the horn.
|
|
2502
|
+
// The screws' holes are v.fixings': M3 clearance through the block for the forearm's two screws, and an M3 pilot down
|
|
2503
|
+
// through the shuttle's wall for the screw that clamps the pen.
|
|
2336
2504
|
import jscad from '@jscad/modeling'
|
|
2337
2505
|
const { cuboid, cylinder } = jscad.primitives
|
|
2338
2506
|
const { translate } = jscad.transforms
|
|
2339
2507
|
|
|
2340
2508
|
export function main (v) {
|
|
2509
|
+
const bolt = v.fixings.holeModel('M3').diameter, clampPilot = v.fixings.holeModel('M3', { kind: 'pilot' }).diameter
|
|
2341
2510
|
const f = v.flexures, material = f.flexureMaterial({ modulus: v.petg.modulus, strength: v.petg.strength, name: 'PETG' })
|
|
2342
2511
|
const leaf = { length: v.leaf_l, thickness: v.leaf_t, width: v.thick, gap: v.gap, taper: v.taper, fillet: v.fillet, shuttle: v.pen_x - v.block_x - v.leaf_l + v.pen_wall, base: v.block_x * 2 }
|
|
2343
2512
|
const model = f.parallelGuideModel(leaf, { E: v.petg.modulus })
|
|
@@ -2350,9 +2519,9 @@ export function main (v) {
|
|
|
2350
2519
|
const tabBody = cuboid({ size: [v.lug_x1 - v.lug_x0, (0 - v.shuttle) - v.lug_y + 1, v.thick], center: [(v.lug_x0 + v.lug_x1) / 2, (v.lug_y + (0 - v.shuttle) + 1) / 2, v.half] })
|
|
2351
2520
|
const lug = cuboid({ size: [v.lug_x1 - v.lug_x0, v.lug_wide, v.lug_top - v.thick + 1], center: [(v.lug_x0 + v.lug_x1) / 2, v.lug_y + v.lug_wide / 2, v.thick + (v.lug_top - v.thick - 1) / 2] })
|
|
2352
2521
|
const bore = v.shapes.teardropHole({ d: v.pen_d, length: v.shuttle * 2 + 1, at: [v.pen_x, 0 - v.shuttle - 1 / 2, v.half], into: '+y', through: true })
|
|
2353
|
-
const clamp = cylinder({ radius:
|
|
2522
|
+
const clamp = cylinder({ radius: clampPilot / 2, height: v.thick, center: [v.pen_x, 0, v.thick - v.half / 2], segments: v.segments })
|
|
2354
2523
|
const servo = translate([v.xh, v.yh, v.thick], v.motors.mount(v.motors.motorModel('sg90'), { plate: v.thick }, v.ops))
|
|
2355
|
-
const holes = [-1, 1].map((s) => cylinder({ radius:
|
|
2524
|
+
const holes = [-1, 1].map((s) => cylinder({ radius: bolt / 2, height: v.thick + 1, center: [s * v.bolt_y, 0, v.half], segments: v.segments }))
|
|
2356
2525
|
return v.ops.subtract(v.ops.union(guide, block, frameBody, tail, shuttleBlock, tabBody, lug), bore, clamp, servo, holes)
|
|
2357
2526
|
}
|
|
2358
2527
|
```
|
|
@@ -2427,7 +2596,12 @@ export function main (v) {
|
|
|
2427
2596
|
|
|
2428
2597
|
One assembly, every output. The `task` block says what it is for; the `planetary` blocks are chapter 11's; the
|
|
2429
2598
|
drivers, the supply and the wires are `bought` items and `wires` entries; the joints carry their home switches
|
|
2430
|
-
and the error terms that read the rules.
|
|
2599
|
+
and the error terms that read the rules. Each screwed joint is a `fasten`: the screw named by thread and head with no
|
|
2600
|
+
length, the parts it passes through and the part it ends in, at anchors on the holes' axes. The check follows each
|
|
2601
|
+
screw through the parts as drawn and chooses its length, and `cad list` counts it. Chapter 15 explains `fasten` in
|
|
2602
|
+
full. The forearm's four screws into the elbow's output are sunk 1.5 mm in their counterbores, so an M3x12 takes the
|
|
2603
|
+
whole 5 mm flange and stops at its face, clear of the planets; the yoke's heads are counterbored into its near cheek
|
|
2604
|
+
so an M3x30, the longest sold, reaches its nut on the far one.
|
|
2431
2605
|
|
|
2432
2606
|
```json projects/arm/assemblies/arm.json
|
|
2433
2607
|
{
|
|
@@ -2506,11 +2680,11 @@ and the error terms that read the rules.
|
|
|
2506
2680
|
{ "a": "m1", "b": "sun", "shaft": true, "note": "The shaft in the sun" },
|
|
2507
2681
|
{ "a": "m2", "b": "esun", "shaft": true, "note": "The elbow motor's shaft in its sun" },
|
|
2508
2682
|
{ "a": "m2", "b": "upper", "fastens": true, "min": -0.1, "note": "The elbow motor, on its four screws, its boss seated in the plate's pocket" },
|
|
2509
|
-
{ "a": "housing", "b": "base", "
|
|
2510
|
-
{ "a": "bridge", "b": "housing", "
|
|
2683
|
+
{ "a": "housing", "b": "base", "min": 0, "note": "The housing, on the base's three columns" },
|
|
2684
|
+
{ "a": "bridge", "b": "housing", "min": 0, "note": "The bridge, on the housing's posts" },
|
|
2511
2685
|
{ "a": "b1", "b": "bridge", "seat": "press", "note": "The 6800 in its seat" },
|
|
2512
|
-
{ "a": "es1", "b": "base", "
|
|
2513
|
-
{ "a": "es2", "b": "upper", "
|
|
2686
|
+
{ "a": "es1", "b": "base", "min": -0.1, "note": "The home switch on its post, 0.1 mm of resting contact allowed" },
|
|
2687
|
+
{ "a": "es2", "b": "upper", "min": -0.1, "note": "The elbow's home switch on its post" },
|
|
2514
2688
|
{ "a": "es1", "b": "upper", "min": -30, "note": "The arm's flag on the home switch's lever at the end of the range" },
|
|
2515
2689
|
{ "a": "es2", "b": "forearm", "min": -30, "note": "The forearm's flag on the elbow switch's lever" },
|
|
2516
2690
|
{ "a": "horn", "b": "holder", "min": -30, "note": "The horn lifts the shuttle's lug: drawn at rest, the lug doesn't rise here" },
|
|
@@ -2518,6 +2692,20 @@ and the error terms that read the rules.
|
|
|
2518
2692
|
{ "a": "d1", "b": "shield", "fastens": true, "min": -20, "note": "Plugged in" },
|
|
2519
2693
|
{ "a": "d2", "b": "shield", "fastens": true, "min": -20, "note": "Plugged in" }
|
|
2520
2694
|
],
|
|
2695
|
+
"fasten": [
|
|
2696
|
+
{ "screw": "M3 cap", "through": ["housing"], "into": "base", "at": ["housing.f1", "housing.f2", "housing.f3"], "note": "The housing on the base's three columns" },
|
|
2697
|
+
{ "screw": "M3 cap", "through": ["bridge"], "into": "housing", "at": ["bridge.s1", "bridge.s2", "bridge.s3"], "note": "The bridge on the housing's posts" },
|
|
2698
|
+
{ "screw": "M3 countersunk", "through": ["spindle"], "into": "output", "at": ["spindle.b1", "spindle.b2", "spindle.b3", "spindle.b4"], "note": "The spindle on the output's flange, its heads flush under the bridge" },
|
|
2699
|
+
{ "screw": "M3 cap", "through": ["upper"], "into": "spindle", "at": ["upper.hub"], "note": "The upper arm clamped down on the spindle's hexagon" },
|
|
2700
|
+
{ "screw": "M3 cap", "through": ["clip1"], "into": "upper", "at": ["clip1.post"], "note": "A clip on its post" },
|
|
2701
|
+
{ "screw": "M3 cap", "through": ["clip2"], "into": "upper", "at": ["clip2.post"], "note": "A clip on its post" },
|
|
2702
|
+
{ "screw": "M3 cap", "through": ["clip3"], "into": "upper", "at": ["clip3.post"], "note": "A clip on its post" },
|
|
2703
|
+
{ "screw": "M3 cap", "through": ["forearm"], "into": "eoutput", "at": ["forearm.b1", "forearm.b2", "forearm.b3", "forearm.b4"], "note": "The forearm on the elbow's output" },
|
|
2704
|
+
{ "screw": "M3 cap", "through": ["forearm", "holder"], "into": "forearm", "at": ["forearm.h1", "forearm.h2"], "nut": true, "note": "The pen holder in the forearm's yoke" },
|
|
2705
|
+
{ "screw": "M3 set", "through": [], "into": "holder", "at": ["holder.clamp"], "length": 3, "note": "The pen's clamp screw, down through the shuttle's wall" },
|
|
2706
|
+
{ "screw": "M2 cap", "through": ["es1"], "into": "base", "at": ["base.sw1", "base.sw2"], "note": "The home switch on its post" },
|
|
2707
|
+
{ "screw": "M2 cap", "through": ["es2"], "into": "upper", "at": ["upper.sw1", "upper.sw2"], "note": "The elbow's home switch on its post" }
|
|
2708
|
+
],
|
|
2521
2709
|
"wires": [
|
|
2522
2710
|
{ "id": "shoulder", "from": "m1.connector", "to": "shield.X", "via": ["base.cable"], "gauge": "awg24", "colour": "black, red, green, blue", "connectors": ["JST-XH 4 pin", "screw terminal"], "note": "From the motor's own lead, down through the base" },
|
|
2523
2711
|
{ "id": "elbow", "from": "m2.connector", "to": "shield.Y", "via": ["upper.cable", "base.cable"], "gauge": "awg24", "colour": "black, red, green, blue", "connectors": ["JST-XH 4 pin", "screw terminal"] },
|
|
@@ -2561,7 +2749,7 @@ npx cad preview arm/arm
|
|
|
2561
2749
|
The check runs with `--json` here because the arm's budget rests on estimates, and those are warnings the test would stop at: run
|
|
2562
2750
|
it without `--json` and read them. What it says:
|
|
2563
2751
|
|
|
2564
|
-
- `task.reach` passes: `holder.tool` reaches the whole sheet with the elbow to the left,
|
|
2752
|
+
- `task.reach` passes: `holder.tool` reaches the whole sheet with the elbow to the left, 5.6 mm to spare at the worst point, the
|
|
2565
2753
|
shoulder between -11° and 101° and the elbow between 58° and 157°.
|
|
2566
2754
|
- `task.speed` passes, just: 51.3 mm/s at the slowest point, the middle of the near edge, against the 50 asked for. The
|
|
2567
2755
|
motors are at 300 rpm, 8000 steps a second at 1/8 step, which is about what the Uno's firmware streams; any faster and
|
|
@@ -2571,13 +2759,20 @@ it without `--json` and read them. What it says:
|
|
|
2571
2759
|
The worst case is 81% of the budget, under the 100% where the check would fail, over the 80% where it stops saying pass.
|
|
2572
2760
|
Bench test 14 (play) and 17 (repeatability) decide whether this arm draws to 0.3 mm or to 0.5.
|
|
2573
2761
|
- The rules that are guesses are named in one warning line, `uses estimates, not measurements`, and each settles with `cad measured arm/arm <name>=<value>`.
|
|
2574
|
-
- `joint.moment` puts
|
|
2762
|
+
- `joint.moment` puts 88.6 N equivalent on the 6800, against its 925 N static rating, ten times over; `fit.seat` says the
|
|
2575
2763
|
pocket is drawn 19.038 mm, a press fit, with a 1.11 mm lip on the outer race and clear of the inner.
|
|
2576
|
-
- `m1 into out` gives
|
|
2577
|
-
|
|
2764
|
+
- `m1 into out` gives 8.4 times the 0.2 N m the task asks at the shoulder, at the 0.5 A chosen, and `m2 into elbow` 17.7
|
|
2765
|
+
times its 0.08 N m. Both joints hold with the power off: 38:1 at 47% can't be driven backwards.
|
|
2766
|
+
- Each `fasten` is followed screw by screw: the holes line up, each far end is a pilot (an M3's 2.9 mm, `x1c.pilot_m3`,
|
|
2767
|
+
measured; an M2's 2.1 mm, `m2.pilot`, a community figure) or the yoke's nut, the length is the shortest sold that fits
|
|
2768
|
+
(M3x8 into the base's columns, M3x10 into the posts, M3x8 countersunk into the output's flange, M3x12 into the elbow's,
|
|
2769
|
+
M3x16 down into the spindle, M3x30 through the yoke, M2x10 for the switches, and an M3x3 set screw that clamps the
|
|
2770
|
+
pen), each cap screw in a pilot has the thread its rule set's `pilot_depth` asks, and a hex key reaches every head,
|
|
2771
|
+
the bridge's and the spindle's before the parts above them go on.
|
|
2578
2772
|
- `motor.driver` gives 0.25 V on each trimmer for 0.5 A. `power.supply`: the machine draws under 1 A at 24 V, and an
|
|
2579
2773
|
LRS-50-24 gives 2.2 A.
|
|
2580
|
-
- `cad list` is the shopping list: 440 g of printing in 20 parts, about 8 hours, and everything bought
|
|
2774
|
+
- `cad list` is the shopping list: 440 g of printing in 20 parts, about 8 hours, and everything bought, the screws
|
|
2775
|
+
included: 33 of them and the yoke's two nuts, 30 g, each length the one the check chose. `cad wires` is the
|
|
2581
2776
|
wiring sheet: each wire's length through the arm's whole range, its gauge, its colours and its board pins.
|
|
2582
2777
|
- `cad machine` writes `exports/arm/arm.machine.json`: steps per degree, 168.9 at 1/8 step through 38:1, the rates and the
|
|
2583
2778
|
homing. `cad plot` plans the test drawing, a 100 mm square and a circle, in 15 s, and the preview in `.preview/arm/`
|
|
@@ -2677,17 +2872,20 @@ The rules these figures come from:
|
|
|
2677
2872
|
}
|
|
2678
2873
|
```
|
|
2679
2874
|
|
|
2680
|
-
The two objects, drawn at rest with the fingers straight. The gripper is one print, the fingers joined only through their leaves; the `part` variable lets the closing check below take it apart. The double horn is the one the SG90 comes with, drawn from a few measurements of the bag's contents:
|
|
2875
|
+
The two objects, drawn at rest with the fingers straight. The gripper is one print, the fingers joined only through their leaves; the `part` variable lets the closing check below take it apart. Its holes are named, never typed: the block's two are `v.fixings`' M3 clearance holes, 3.5 mm, for the yoke's screws, and the posts under the servo's tabs have pilots of 1.7 mm for the screws that come with the SG90, sized from its tabs as `v.motors.mount` sizes them. The double horn is the one the SG90 comes with, drawn from a few measurements of the bag's contents:
|
|
2681
2876
|
|
|
2682
2877
|
```js projects/arm/objects/gripper.js
|
|
2683
2878
|
// A compliant gripper, printed flat in PETG: a palm with the servo on it, and two fingers, each a rigid jaw on one long
|
|
2684
2879
|
// leaf with rounded ends. A double-arm horn in the leaves' own plane pushes each finger inward at its outer face.
|
|
2880
|
+
// The screws' holes: M3 clearance through the block for the yoke's two screws, from v.fixings, and pilots for the
|
|
2881
|
+
// servo's own self-tapping screws, sized from its tabs' holes as v.motors.mount sizes them.
|
|
2685
2882
|
import jscad from '@jscad/modeling'
|
|
2686
2883
|
const { cuboid, cylinder, polygon } = jscad.primitives
|
|
2687
2884
|
const { translate } = jscad.transforms
|
|
2688
2885
|
const { extrudeLinear } = jscad.extrusions
|
|
2689
2886
|
|
|
2690
2887
|
export function main (v) {
|
|
2888
|
+
const bolt = v.fixings.holeModel('M3').diameter, pilot = v.motors.mountModel(v.motors.motorModel('sg90'), { plate: v.pilot_d }).holes[0].diameter
|
|
2691
2889
|
const f = v.flexures, W = v.width, box = (x0, x1, y0, y1, z0 = 0, z1 = W) => cuboid({ size: [x1 - x0, y1 - y0, z1 - z0], center: [(x0 + x1) / 2, (y0 + y1) / 2, (z0 + z1) / 2] })
|
|
2692
2890
|
const leaf = (end, y) => translate([end - v.leaf_l, y + v.leaf_t / 2, 0], f.leaf({ length: v.leaf_l, thickness: v.leaf_t, width: W, taper: v.taper, fillet: v.fillet, tip: true, into: v.into }))
|
|
2693
2891
|
const wedge = (a0, a1, r, h, z0) => extrudeLinear({ height: h }, polygon({ points: [[0, 0], ...Array.from({ length: v.wedge_n + 1 }, (_, i) => { const a = (a0 + (a1 - a0) * i / v.wedge_n) * v.deg; return [r * Math.cos(a), r * Math.sin(a)] })] }))
|
|
@@ -2697,8 +2895,8 @@ export function main (v) {
|
|
|
2697
2895
|
const stem = v.ops.union(box(v.block_x - 1, v.xs - v.pocket_back, -v.stem_y0, v.stem_y0), box(v.xs - v.pocket_back - 2, v.stem_x1, -v.stem_y, v.stem_y))
|
|
2698
2896
|
const armUp = box(v.up_root - v.root, v.up_root + v.into, v.arm_y, v.y_in + v.leaf_t), armLow = box(v.low_root - v.root, v.low_root + v.into, -(v.y_in + v.leaf_t), -v.arm_y)
|
|
2699
2897
|
const pads = [box(v.xs + v.pocket_front + v.pad_gap, v.xs + v.pad_front + v.pad_x, -v.pad_y, v.pad_y, W - v.dip, v.face), box(v.xs - v.pad_back - v.pad_x, v.xs - v.pocket_back - v.pad_gap, -v.pad_y, v.pad_y, W - v.dip, v.face)]
|
|
2700
|
-
const pilots = [v.xs + v.pad_front, v.xs - v.pad_back].map((x) => cylinder({ radius:
|
|
2701
|
-
const bolts = [-1, 1].map((s) => cylinder({ radius:
|
|
2898
|
+
const pilots = [v.xs + v.pad_front, v.xs - v.pad_back].map((x) => cylinder({ radius: pilot / 2, height: v.pilot_d + 1, center: [x, 0, v.face - (v.pilot_d - 1) / 2], segments: v.segments }))
|
|
2899
|
+
const bolts = [-1, 1].map((s) => cylinder({ radius: bolt / 2, height: W + 1, center: [s * v.bolt_x, 0, W / 2], segments: v.segments }))
|
|
2702
2900
|
// The servo's case and boss come down into the stem from above; the horn turns in two wedges cut from the stem's top
|
|
2703
2901
|
const pocket = box(v.xs - v.pocket_back, v.xs + v.pocket_front, -v.pocket_y, v.pocket_y, v.case_z, W + 1)
|
|
2704
2902
|
const boss = cylinder({ radius: v.boss / 2, height: v.case_z - v.horn_z + 1, center: [v.xs, 0, v.horn_z + (v.case_z - v.horn_z + 1) / 2], segments: v.segments })
|
|
@@ -2726,9 +2924,7 @@ export function main (v) {
|
|
|
2726
2924
|
"title": "Gripper: palm and two fingers on leaves",
|
|
2727
2925
|
"version": "0.1.0",
|
|
2728
2926
|
"uses": [
|
|
2729
|
-
"x1c"
|
|
2730
|
-
"m2",
|
|
2731
|
-
"m3"
|
|
2927
|
+
"x1c"
|
|
2732
2928
|
],
|
|
2733
2929
|
"engine": "manifold",
|
|
2734
2930
|
"material": "PETG",
|
|
@@ -2883,12 +3079,7 @@ export function main (v) {
|
|
|
2883
3079
|
"bolt_x": {
|
|
2884
3080
|
"value": 4,
|
|
2885
3081
|
"unit": "mm",
|
|
2886
|
-
"rule": "Half the yoke's two
|
|
2887
|
-
},
|
|
2888
|
-
"bolt": {
|
|
2889
|
-
"value": "m3.clearance + x1c.hole_comp",
|
|
2890
|
-
"unit": "mm",
|
|
2891
|
-
"rule": "M3 clearance through the block"
|
|
3082
|
+
"rule": "Half the spacing of the yoke's two screws, as the pen holder's"
|
|
2892
3083
|
},
|
|
2893
3084
|
"xs": {
|
|
2894
3085
|
"value": 62,
|
|
@@ -3097,16 +3288,10 @@ export function main (v) {
|
|
|
3097
3288
|
"unit": "mm",
|
|
3098
3289
|
"rule": "How far the posts run down into the stem"
|
|
3099
3290
|
},
|
|
3100
|
-
"pilot": {
|
|
3101
|
-
"value": "m2.clearance - 0.6",
|
|
3102
|
-
"unit": "mm",
|
|
3103
|
-
"rule": "An M2 screw self-tapped into a post",
|
|
3104
|
-
"kind": "community"
|
|
3105
|
-
},
|
|
3106
3291
|
"pilot_d": {
|
|
3107
3292
|
"value": 8,
|
|
3108
3293
|
"unit": "mm",
|
|
3109
|
-
"rule": "
|
|
3294
|
+
"rule": "How deep each of the servo's screws goes into its post"
|
|
3110
3295
|
},
|
|
3111
3296
|
"reach": {
|
|
3112
3297
|
"value": 18,
|
|
@@ -3217,7 +3402,7 @@ The project lists the new objects:
|
|
|
3217
3402
|
|
|
3218
3403
|
### The upright assembly
|
|
3219
3404
|
|
|
3220
|
-
`arm-upright` is `arm` from chapter 12 with five differences: the base, the housing, the bridge and its bearing are rotated 90° about the x axis and the rest follows through the joints (their positions become `[0, "0 - arm.face", 0]` and so on: a rotation of x, y, z to x, -z, y); the pen holder is replaced by the gripper on the forearm's same anchor; the task is a box of points with `payload` and `grip`; `gravity` is set to `[0, 0, -1]` as the check needs the word down; and the elbow folds only to 140°, not 160°, for the reason under the commands below. Its one pose, `reach`, is the far corner of the box: the assembly is drawn there because the shoulder's load is worst there, and "drawn" is what `motor.torque` sweeps its motor from. The fingers are straight in it, as every flexure here is.
|
|
3405
|
+
`arm-upright` is `arm` from chapter 12 with five differences: the base, the housing, the bridge and its bearing are rotated 90° about the x axis and the rest follows through the joints (their positions become `[0, "0 - arm.face", 0]` and so on: a rotation of x, y, z to x, -z, y); the pen holder is replaced by the gripper on the forearm's same anchor; the task is a box of points with `payload` and `grip`; `gravity` is set to `[0, 0, -1]` as the check needs the word down; and the elbow folds only to 140°, not 160°, for the reason under the commands below. Its one pose, `reach`, is the far corner of the box: the assembly is drawn there because the shoulder's load is worst there, and "drawn" is what `motor.torque` sweeps its motor from. The fingers are straight in it, as every flexure here is. Its `fasten` list is chapter 12's, with the yoke's two screws and their nuts through the gripper where they went through the pen holder, and no set screw, since there is no pen to clamp. The check chooses each screw's length and `cad list` counts it; chapter 15 explains `fasten` in full.
|
|
3221
3406
|
|
|
3222
3407
|
```json projects/arm/assemblies/arm-upright.json
|
|
3223
3408
|
{
|
|
@@ -3295,11 +3480,11 @@ The project lists the new objects:
|
|
|
3295
3480
|
{ "a": "m1", "b": "sun", "shaft": true, "note": "The shaft in the sun" },
|
|
3296
3481
|
{ "a": "m2", "b": "esun", "shaft": true, "note": "The elbow motor's shaft in its sun" },
|
|
3297
3482
|
{ "a": "m2", "b": "upper", "fastens": true, "min": -0.1, "note": "The elbow motor, on its four screws, its boss seated in the plate's pocket" },
|
|
3298
|
-
{ "a": "housing", "b": "base", "
|
|
3299
|
-
{ "a": "bridge", "b": "housing", "
|
|
3483
|
+
{ "a": "housing", "b": "base", "min": 0, "note": "The housing, on the base's three columns" },
|
|
3484
|
+
{ "a": "bridge", "b": "housing", "min": 0, "note": "The bridge, on the housing's posts" },
|
|
3300
3485
|
{ "a": "b1", "b": "bridge", "seat": "press", "note": "The 6800 in its seat" },
|
|
3301
|
-
{ "a": "es1", "b": "base", "
|
|
3302
|
-
{ "a": "es2", "b": "upper", "
|
|
3486
|
+
{ "a": "es1", "b": "base", "min": -0.1, "note": "The home switch on its post, 0.1 mm of resting contact allowed" },
|
|
3487
|
+
{ "a": "es2", "b": "upper", "min": -0.1, "note": "The elbow's home switch on its post" },
|
|
3303
3488
|
{ "a": "es1", "b": "upper", "min": -30, "note": "The arm's flag on the home switch's lever at the end of the range" },
|
|
3304
3489
|
{ "a": "es2", "b": "forearm", "min": -30, "note": "The forearm's flag on the elbow switch's lever" },
|
|
3305
3490
|
{ "a": "ghorn", "b": "gripper", "min": -30, "note": "The horn presses the fingers' flats: drawn at rest, the fingers don't move here" },
|
|
@@ -3308,6 +3493,19 @@ The project lists the new objects:
|
|
|
3308
3493
|
{ "a": "d1", "b": "shield", "fastens": true, "min": -20, "note": "Plugged in" },
|
|
3309
3494
|
{ "a": "d2", "b": "shield", "fastens": true, "min": -20, "note": "Plugged in" }
|
|
3310
3495
|
],
|
|
3496
|
+
"fasten": [
|
|
3497
|
+
{ "screw": "M3 cap", "through": ["housing"], "into": "base", "at": ["housing.f1", "housing.f2", "housing.f3"], "note": "The housing on the base's three columns" },
|
|
3498
|
+
{ "screw": "M3 cap", "through": ["bridge"], "into": "housing", "at": ["bridge.s1", "bridge.s2", "bridge.s3"], "note": "The bridge on the housing's posts" },
|
|
3499
|
+
{ "screw": "M3 countersunk", "through": ["spindle"], "into": "output", "at": ["spindle.b1", "spindle.b2", "spindle.b3", "spindle.b4"], "note": "The spindle on the output's flange, its heads flush under the bridge" },
|
|
3500
|
+
{ "screw": "M3 cap", "through": ["upper"], "into": "spindle", "at": ["upper.hub"], "note": "The upper arm clamped down on the spindle's hexagon" },
|
|
3501
|
+
{ "screw": "M3 cap", "through": ["clip1"], "into": "upper", "at": ["clip1.post"], "note": "A clip on its post" },
|
|
3502
|
+
{ "screw": "M3 cap", "through": ["clip2"], "into": "upper", "at": ["clip2.post"], "note": "A clip on its post" },
|
|
3503
|
+
{ "screw": "M3 cap", "through": ["clip3"], "into": "upper", "at": ["clip3.post"], "note": "A clip on its post" },
|
|
3504
|
+
{ "screw": "M3 cap", "through": ["forearm"], "into": "eoutput", "at": ["forearm.b1", "forearm.b2", "forearm.b3", "forearm.b4"], "note": "The forearm on the elbow's output" },
|
|
3505
|
+
{ "screw": "M3 cap", "through": ["forearm", "gripper"], "into": "forearm", "at": ["forearm.h1", "forearm.h2"], "nut": true, "note": "The gripper in the forearm's yoke" },
|
|
3506
|
+
{ "screw": "M2 cap", "through": ["es1"], "into": "base", "at": ["base.sw1", "base.sw2"], "note": "The home switch on its post" },
|
|
3507
|
+
{ "screw": "M2 cap", "through": ["es2"], "into": "upper", "at": ["upper.sw1", "upper.sw2"], "note": "The elbow's home switch on its post" }
|
|
3508
|
+
],
|
|
3311
3509
|
"wires": [
|
|
3312
3510
|
{ "id": "shoulder", "from": "m1.connector", "to": "shield.X", "via": ["base.cable"], "gauge": "awg24", "colour": "black, red, green, blue", "connectors": ["JST-XH 4 pin", "screw terminal"], "note": "From the motor's own lead, down through the base" },
|
|
3313
3511
|
{ "id": "elbow", "from": "m2.connector", "to": "shield.Y", "via": ["upper.cable", "base.cable"], "gauge": "awg24", "colour": "black, red, green, blue", "connectors": ["JST-XH 4 pin", "screw terminal"] },
|
|
@@ -3332,7 +3530,7 @@ The shoulder's bearing is the same `support` with the 6800 named; the elbow's th
|
|
|
3332
3530
|
|
|
3333
3531
|
`assembly.frequency` puts the lowest mode at about 12 Hz at full stretch, from the same FE stiffness and the mass it carries: slow enough to see, and worth moving gently at the start and end of a motion. The FE's coarseness is why this is said to one significant figure.
|
|
3334
3532
|
|
|
3335
|
-
The joints in chapter 12's gearboxes (the motor's sun, the carriers and the planets) also now show `joint.moment` warnings that nothing named takes their tipping: they carry grams, on shafts and printed pins inside the gear train, and the check doesn't know them from a real joint. They stay as warnings; the check runs with `--json` for that reason, and because the rules are estimates.
|
|
3533
|
+
The joints in chapter 12's gearboxes (the motor's sun, the carriers and the planets) also now show `joint.moment` warnings that nothing named takes their tipping: they carry grams, on shafts and printed pins inside the gear train, and the check doesn't know them from a real joint. `fasten.load` warns once, too: the upper arm's one screw down on the spindle's hexagon would hold the shoulder's 1.455 N m of twist by friction alone. It doesn't have to, since the hexagon carries that twist, but the check reads the screw and not the shape the parts lock by, so it can't see that. They stay as warnings; the check runs with `--json` for that reason, and because the rules are estimates.
|
|
3336
3534
|
|
|
3337
3535
|
### Closing the gripper, shown at rest
|
|
3338
3536
|
|
|
@@ -3524,23 +3722,26 @@ Lifting wants a Z, the tool up and down, and on a flat arm a Z is the only way t
|
|
|
3524
3722
|
|
|
3525
3723
|
So the Z goes at the wrist, bolted into the forearm's yoke where the gripper goes, and on the drawing arm only: on the upright arm a wrist Z runs level, in and out from the wall, and adds to the shoulder's load instead of lifting anything. The motor is the small geared stepper, the 28BYJ-48: 30 g rather than the 190 g NEMA 14, because a 250 g load on an 8 mm lead needs only 2.45 N. Everything turns on the lead's torque, `F = T × 2π × η / lead`: with an 8 mm lead the 28BYJ-48's 0.034 N m gives 15.5 N at about 58% (μ 0.2 on the nut, an `estimate` in the rule set), 6 times over.
|
|
3526
3724
|
|
|
3527
|
-
The frame bolts into the yoke, two bars hold two 8 mm rods with teardrop holes, and the screw hangs from a coupler at the top with its far end loose in the bottom bar, steadied only by the nut: this is small enough that the rods keep it straight. The carriage rides the rods on two LM8UUs and carries a flanged T8 nut. Printed standing, its pockets and trap open from the top.
|
|
3725
|
+
The frame bolts into the yoke, two bars hold two 8 mm rods with teardrop holes, and the screw hangs from a coupler at the top with its far end loose in the bottom bar, steadied only by the nut: this is small enough that the rods keep it straight. The carriage rides the rods on two LM8UUs and carries a flanged T8 nut. Printed standing, its pockets and trap open from the top. The frame's holes come from `v.fixings`: M3 clearance holes for the yoke's two screws, and for the motor's ears a clearance hole for the thread its mount takes, M4, 4.6 mm, as teardrops on their sides. The carriage reads the T8 nut's figures from the kit's `t8-nut` set.
|
|
3528
3726
|
|
|
3529
3727
|
```js projects/arm/objects/zframe.js
|
|
3530
3728
|
// A Z axis for the wrist, printed flat: a frame bolted into the forearm's yoke, two bars with the rods' holes, and the
|
|
3531
3729
|
// small stepper on the top bar, its shaft down through the bar to a lead screw.
|
|
3730
|
+
// The screws' holes are v.fixings' clearance holes: M3 for the yoke's two screws, and for the motor's ears the
|
|
3731
|
+
// thread its mount takes (v.motors), on their sides as teardrops.
|
|
3532
3732
|
import jscad from '@jscad/modeling'
|
|
3533
3733
|
const { cuboid, cylinder } = jscad.primitives
|
|
3534
3734
|
|
|
3535
3735
|
export function main (v) {
|
|
3736
|
+
const bolt = v.fixings.holeModel('M3').diameter, motorHole = v.fixings.holeModel(v.motors.mountModel(v.motors.motorModel('28byj48'), { plate: v.y_out - v.y_in }).screw.thread).diameter
|
|
3536
3737
|
const W = v.width, box = (x0, x1, y0, y1, z0 = 0, z1 = W) => cuboid({ size: [x1 - x0, y1 - y0, z1 - z0], center: [(x0 + x1) / 2, (y0 + y1) / 2, (z0 + z1) / 2] })
|
|
3537
3738
|
const block = box(-v.block_x, v.block_x, -v.block_y, v.block_y, 0, v.block_w)
|
|
3538
3739
|
const spine = box(v.block_x - 1, v.spine_x, -v.y_out, v.y_out)
|
|
3539
3740
|
const top = box(v.block_x - 1, v.bar_x, v.y_in, v.y_out), bottom = box(v.block_x - 1, v.bar_x, -v.y_out, -v.y_in)
|
|
3540
3741
|
const rods = [v.sx - v.rod_gap, v.sx + v.rod_gap].map((x) => v.shapes.teardropHole({ d: v.rod, length: 2 * v.y_out + 2, at: [x, -v.y_out - 1, v.half], into: '+y', through: true }))
|
|
3541
3742
|
const screwFree = v.shapes.teardropHole({ d: v.screw, length: v.y_out - v.y_in + 2, at: [v.sx, -v.y_out - 1, v.half], into: '+y', through: true })
|
|
3542
|
-
const bolts = [-1, 1].map((s) => cylinder({ radius:
|
|
3543
|
-
const motorHoles = [-1, 1].map((s) => v.shapes.teardropHole({ d:
|
|
3743
|
+
const bolts = [-1, 1].map((s) => cylinder({ radius: bolt / 2, height: W + 1, center: [s * v.bolt_x, 0, v.half], segments: v.segments }))
|
|
3744
|
+
const motorHoles = [-1, 1].map((s) => v.shapes.teardropHole({ d: motorHole, length: v.y_out - v.y_in + 2, at: [v.sx + s * v.tab, v.y_in - 1, v.half - v.offset], into: '+y', through: true }))
|
|
3544
3745
|
const boss = v.shapes.teardropHole({ d: v.boss, length: v.y_out - v.y_in + 2, at: [v.sx, v.y_in - 1, v.half], into: '+y', through: true })
|
|
3545
3746
|
return v.ops.subtract(v.ops.union(block, spine, top, bottom), rods, screwFree, bolts, motorHoles, boss)
|
|
3546
3747
|
}
|
|
@@ -3552,7 +3753,7 @@ export function main (v) {
|
|
|
3552
3753
|
"name": "zframe",
|
|
3553
3754
|
"title": "Z axis frame",
|
|
3554
3755
|
"version": "0.1.0",
|
|
3555
|
-
"uses": ["x1c"
|
|
3756
|
+
"uses": ["x1c"],
|
|
3556
3757
|
"engine": "manifold",
|
|
3557
3758
|
"orientation": "Flat on the bed: the rods' holes run along the bed and have teardrop roofs, the motor's mount cut through the top bar",
|
|
3558
3759
|
"description": "Bolts into the forearm's yoke where the pen holder or gripper bolts. Two bars hold two 8 mm rods; a 28BYJ-48 on the top bar turns a T8 screw between them.",
|
|
@@ -3572,7 +3773,6 @@ export function main (v) {
|
|
|
3572
3773
|
"block_x": {"value": 8, "unit": "mm", "rule": "Half the block in the yoke"},
|
|
3573
3774
|
"block_y": {"value": 9, "unit": "mm", "rule": "Half the block across it"},
|
|
3574
3775
|
"bolt_x": {"value": 4, "unit": "mm", "rule": "Half the yoke's screws' spacing"},
|
|
3575
|
-
"bolt": {"value": "m3.clearance + x1c.hole_comp", "unit": "mm", "rule": "M3 clearance"},
|
|
3576
3776
|
"spine_x": {"value": 12, "unit": "mm", "rule": "The spine's far edge"},
|
|
3577
3777
|
"bar_x": {"value": 75, "unit": "mm", "rule": "The bars' far edge: past the second rod's hole"},
|
|
3578
3778
|
"y_in": {"value": 41, "unit": "mm", "rule": "Half the window between the bars: the carriage and its 50 mm of travel", "interface": true},
|
|
@@ -3583,7 +3783,6 @@ export function main (v) {
|
|
|
3583
3783
|
"screw": {"value": 9, "unit": "mm", "rule": "The lead screw through the bottom bar, loose: its end only steadied"},
|
|
3584
3784
|
"tab": {"value": 17.5, "unit": "mm", "rule": "Half the 28BYJ-48's tab screws' spacing", "kind": "community", "source": "28byj48 in @rulecad/rules"},
|
|
3585
3785
|
"offset": {"value": 8, "unit": "mm", "rule": "The 28BYJ-48's screws sit this far from its shaft", "kind": "community", "source": "28byj48 in @rulecad/rules"},
|
|
3586
|
-
"motor_hole": {"value": 4.2, "unit": "mm", "rule": "The motor's tab screws, an M3 or a 4 mm"},
|
|
3587
3786
|
"boss": {"value": 12, "unit": "mm", "rule": "Round the motor's boss, through the top bar"},
|
|
3588
3787
|
"segments": {"value": 48, "rule": "Round enough"}
|
|
3589
3788
|
}
|
|
@@ -3611,7 +3810,7 @@ export function main (v) {
|
|
|
3611
3810
|
"name": "zcar",
|
|
3612
3811
|
"title": "Z axis carriage",
|
|
3613
3812
|
"version": "0.1.0",
|
|
3614
|
-
"uses": ["x1c"],
|
|
3813
|
+
"uses": ["x1c", "t8-nut"],
|
|
3615
3814
|
"engine": "manifold",
|
|
3616
3815
|
"orientation": "Standing, the rods' direction vertical: both LM8UU pockets and the nut trap open from the top, nothing to bridge",
|
|
3617
3816
|
"description": "Rides the frame's two rods on LM8UU bearings; a flanged T8 nut in the middle takes the screw's push. The tool anchor is on its front face.",
|
|
@@ -3629,13 +3828,13 @@ export function main (v) {
|
|
|
3629
3828
|
"rod_d": {"value": 8, "unit": "mm", "rule": "The rod, the LM8UU's bore"},
|
|
3630
3829
|
"lm_d": {"value": 15, "unit": "mm", "rule": "The LM8UU's outside diameter"},
|
|
3631
3830
|
"lm_l": {"value": 24, "unit": "mm", "rule": "The LM8UU's length"},
|
|
3632
|
-
"flange": {"value":
|
|
3633
|
-
"flange_t": {"value":
|
|
3634
|
-
"nut_d": {"value":
|
|
3635
|
-
"nut_l": {"value":
|
|
3636
|
-
"hole_c": {"value":
|
|
3637
|
-
"holes": {"value":
|
|
3638
|
-
"hole_d": {"value":
|
|
3831
|
+
"flange": {"value": "t8_nut.flange_diameter", "unit": "mm", "rule": "The T8 nut's flange"},
|
|
3832
|
+
"flange_t": {"value": "t8_nut.flange_width", "unit": "mm", "rule": "The flange's thickness"},
|
|
3833
|
+
"nut_d": {"value": "t8_nut.body_diameter", "unit": "mm", "rule": "The lead nut's round body"},
|
|
3834
|
+
"nut_l": {"value": "t8_nut.length", "unit": "mm", "rule": "The lead nut's length"},
|
|
3835
|
+
"hole_c": {"value": "t8_nut.hole_circle", "unit": "mm", "rule": "The flange's bolt circle"},
|
|
3836
|
+
"holes": {"value": "t8_nut.hole_count", "rule": "Bolts in the flange"},
|
|
3837
|
+
"hole_d": {"value": "t8_nut.mount_hole_diameter", "unit": "mm", "rule": "A flange bolt's hole"},
|
|
3639
3838
|
"segments": {"value": 48, "rule": "Round enough"}
|
|
3640
3839
|
}
|
|
3641
3840
|
}
|
|
@@ -4095,7 +4294,8 @@ What it says:
|
|
|
4095
4294
|
- `task.reach` passes with 48.9 mm in hand.
|
|
4096
4295
|
- `tool.grip` warns at 100 g (1.2 times over) on `arm-upright` and passes on `gripper-check` at 50 g (2.3 times over). `tool.strain` passes at 10% of PETG's strength at full close, in the leaf the check reads as a plain cantilever (`leafModel`).
|
|
4097
4296
|
- The Z axis gives 512 steps a mm, 15.5 N of force at 6 times over its 2.45 N load, and holds with the power off because of the motor's gearbox. The belt gives 102.4 steps a mm and 5.1 N, 2 times over, with 0.07 mm of stretch in the budget.
|
|
4098
|
-
- `
|
|
4297
|
+
- `fasten` chooses every screw and passes each: the housing's three M3x8 caps into the base, the spindle's four M3x8 countersunk, the bridge's and the clips' six M3x10, the forearm's four M3x12, the upper arm's M3x16 into the hexagon, the home switches' four M2x10, and two M3x30 with their nuts through the yoke and the gripper. Each head has room for its hex key. The one warning, the twist on the hexagon's screw, is above.
|
|
4298
|
+
- `cad list` prints the same 444.2 g printed as `check`'s mass table, with the gripper's 37 g in it, and buys those screws with the motors' own (4 M3x6 and 4 M3x12 from their mounts): 30.3 g of fixings. The whole machine weighs about 1.3 kg before the wires and the wall.
|
|
4099
4299
|
|
|
4100
4300
|
`npx cad check arm/arm-upright --sweep` swings each joint of the arm through its range and finds nothing colliding, with the finger-flat contact allowed by its `fits` entry. It earned its keep: with chapter 12's limit of 160° of fold, the sweep found the gripper's servo hitting the shoulder housing and the output ring, because the gripper is 32 mm longer than the pen holder and its servo stands up from the print. The elbow is limited to 140° here, which clears with room to spare and costs nothing, since the box needs at most about 113°. Like chapter 12's sweep it is slow, half an hour on a busy laptop, so the replay leaves it out.
|
|
4101
4301
|
|
|
@@ -4144,10 +4344,10 @@ The stack of the same gearbox with the motor's face as zero, what the leg stands
|
|
|
4144
4344
|
"_doc": "A leg made from the drawing arm's parts: the stack of the same gearbox, with the arm's motor face as this leg's zero, what the leg is asked to stand up, and the stand it does that on. Examples chapter 14 explains each.",
|
|
4145
4345
|
"name": "leg",
|
|
4146
4346
|
"rules": {
|
|
4147
|
-
"plate": {"value": 5, "unit": "mm", "rule": "The hip housing's plate: enough for
|
|
4347
|
+
"plate": {"value": 5, "unit": "mm", "rule": "The hip housing's plate: deep enough for the motor's four screws to bite, 1.5 times their thread", "kind": "default", "source": "EXAMPLES chapter 11's housing", "checked": "2026-11-09"},
|
|
4148
4348
|
"gear": {"value": 8, "unit": "mm", "rule": "Each gear stage's face", "kind": "default", "source": "EXAMPLES chapter 11's gearbox", "checked": "2026-11-09"},
|
|
4149
4349
|
"ring_gap": {"value": 0.4, "unit": "mm", "rule": "Between the fixed ring and the output ring", "kind": "default", "source": "EXAMPLES chapter 11's gearbox", "checked": "2026-11-09"},
|
|
4150
|
-
"flange": {"value": 5, "unit": "mm", "rule": "The output ring's flange: thick enough for four
|
|
4350
|
+
"flange": {"value": 5, "unit": "mm", "rule": "The output ring's flange: thick enough for the spindle's four screws to bite", "kind": "default", "source": "EXAMPLES chapter 12", "checked": "2026-11-09"},
|
|
4151
4351
|
"output_top": {"value": "plate + gear + ring_gap + gear + flange", "unit": "mm", "rule": "The top of the hip's output flange, from the motor's face", "kind": "default", "source": "The stack", "checked": "2026-11-09"},
|
|
4152
4352
|
"disc": {"value": 3, "unit": "mm", "rule": "The spindle's disc, on the flange", "kind": "default", "source": "EXAMPLES chapter 12", "checked": "2026-11-09"},
|
|
4153
4353
|
"bridge_gap": {"value": 0.6, "unit": "mm", "rule": "Between the spindle's disc and the bridge above it", "kind": "default", "source": "EXAMPLES chapter 12", "checked": "2026-11-09"},
|
|
@@ -4212,7 +4412,7 @@ The stack of the same gearbox with the motor's face as zero, what the leg stands
|
|
|
4212
4412
|
|
|
4213
4413
|
### The gearbox, as the arm's
|
|
4214
4414
|
|
|
4215
|
-
The housing, the sun, the planets, the carrier that isn't printed, the output ring with its flange, the spindle with its shaft through a 6800, the bridge, and the clips are chapter 12's prints, read through this leg's rule set. The hip is the arm's shoulder and the knee the elbow, each turned on its side.
|
|
4415
|
+
The housing, the sun, the planets, the carrier that isn't printed, the output ring with its flange, the spindle with its shaft through a 6800, the bridge, and the clips are chapter 12's prints, read through this leg's rule set. The hip is the arm's shoulder and the knee the elbow, each turned on its side. Their screw holes are chapter 12's too, each from `v.fixings` by its thread: clearance holes, pilots, the cap heads' counterbores sunk a layer, and the spindle's countersinks, 6.82 mm across for an ISO 10642 head so it sits flush under the bridge, on the 48 mm disc that keeps 0.6 mm of edge round them.
|
|
4216
4416
|
|
|
4217
4417
|
```json projects/leg/objects/housing.json
|
|
4218
4418
|
{
|
|
@@ -4220,10 +4420,13 @@ The housing, the sun, the planets, the carrier that isn't printed, the output ri
|
|
|
4220
4420
|
"name": "housing",
|
|
4221
4421
|
"title": "Shoulder housing and fixed ring",
|
|
4222
4422
|
"version": "0.1.0",
|
|
4223
|
-
"uses": ["x1c", "leg"
|
|
4423
|
+
"uses": ["x1c", "leg"],
|
|
4224
4424
|
"engine": "manifold",
|
|
4225
4425
|
"orientation": "The motor plate on the bed, the ring and posts up",
|
|
4226
4426
|
"anchors": {
|
|
4427
|
+
"f1": {"at": ["column_r * cosd(f1)", "column_r * sind(f1)", "plate"], "axis": [0, 0, 1]},
|
|
4428
|
+
"f2": {"at": ["column_r * cosd(f2)", "column_r * sind(f2)", "plate"], "axis": [0, 0, 1]},
|
|
4429
|
+
"f3": {"at": ["column_r * cosd(f3)", "column_r * sind(f3)", "plate"], "axis": [0, 0, 1]},
|
|
4227
4430
|
"axis": {"at": [0, 0, "plate"], "axis": [0, 0, 1]},
|
|
4228
4431
|
"motor": {"at": [0, 0, 0], "axis": [0, 0, 1], "ref": [1, 0, 0]}
|
|
4229
4432
|
},
|
|
@@ -4236,13 +4439,10 @@ The housing, the sun, the planets, the carrier that isn't printed, the output ri
|
|
|
4236
4439
|
"post_r": {"value": 37, "unit": "mm", "rule": "Three posts outside the output ring", "interface": true},
|
|
4237
4440
|
"post": {"value": 7, "unit": "mm", "rule": "Each post's diameter"},
|
|
4238
4441
|
"post_high": {"value": "leg.bridge_low - 0 - plate", "unit": "mm", "rule": "From the plate to under the bridge", "interface": true},
|
|
4239
|
-
"
|
|
4240
|
-
"pilot_depth": {"value": 8, "unit": "mm", "rule": "For an M3 × 16 through the bridge"},
|
|
4442
|
+
"pilot_depth": {"value": 8, "unit": "mm", "rule": "Each post's pilot, deep enough for the bridge's screw"},
|
|
4241
4443
|
"column_r": {"value": 37, "unit": "mm", "rule": "Over the base's columns"},
|
|
4242
4444
|
"lobe": {"value": 12, "unit": "mm", "rule": "The plate reaches out over each column"},
|
|
4243
|
-
"
|
|
4244
|
-
"head": {"value": "m3.head + 2 * x1c.fit + x1c.hole_comp", "unit": "mm", "rule": "The screw head's counterbore"},
|
|
4245
|
-
"head_depth": {"value": "m3.head_height + x1c.layer", "unit": "mm", "rule": "A socket head's height, sunk"},
|
|
4445
|
+
"sink": {"value": "x1c.layer", "unit": "mm", "rule": "Each foot's screw head sits a layer under the plate's face"},
|
|
4246
4446
|
"segments": {"value": 64, "rule": "Round enough"},
|
|
4247
4447
|
"ring_segments": {"value": 96, "rule": "Smooth to the eye and to the gear"},
|
|
4248
4448
|
"rad": {"value": 0.017453293, "rule": "Radians in a degree"},
|
|
@@ -4258,11 +4458,14 @@ The housing, the sun, the planets, the carrier that isn't printed, the output ri
|
|
|
4258
4458
|
|
|
4259
4459
|
```js projects/leg/objects/housing.js
|
|
4260
4460
|
// The motor plate with the fixed ring and posts standing on it. The motor bolts underneath, its shaft up through the middle.
|
|
4461
|
+
// The screws' holes are v.fixings': an M3 pilot in each post for the bridge, and an M3 clearance hole with its cap
|
|
4462
|
+
// head's counterbore in each foot, sunk a layer, for the screw down into the plate under it.
|
|
4261
4463
|
import jscad from '@jscad/modeling'
|
|
4262
4464
|
const { cylinder, cylinderElliptic } = jscad.primitives
|
|
4263
4465
|
const { translate } = jscad.transforms
|
|
4264
4466
|
|
|
4265
4467
|
export function main (v) {
|
|
4468
|
+
const pilot = v.fixings.holeModel('M3', { kind: 'pilot' }).diameter, screw = v.fixings.holeModel('M3').diameter, cb = v.fixings.counterboreModel('M3 cap'), head = cb.diameter, headDepth = cb.depth + v.sink
|
|
4266
4469
|
const motor = v.motors.motorModel('17HS4401')
|
|
4267
4470
|
const at = (r, a) => [r * Math.cos(a), r * Math.sin(a)]
|
|
4268
4471
|
const posts = [v.p1, v.p2, v.p3].map((a) => a * v.rad), feet = [v.f1, v.f2, v.f3].map((a) => a * v.rad)
|
|
@@ -4271,9 +4474,9 @@ export function main (v) {
|
|
|
4271
4474
|
const lobes = [...posts, ...feet].map((a) => cylinder({ radius: v.lobe / 2, height: v.plate, center: [...at(v.post_r, a), v.plate / 2], segments: v.segments }))
|
|
4272
4475
|
const joins = [...posts, ...feet].map((a) => jscad.transforms.rotateZ(a, jscad.primitives.cuboid({ size: [v.post_r - v.rim / 2 + 2, v.lobe, v.plate], center: [(v.post_r + v.rim / 2 - 2) / 2, 0, v.plate / 2] })))
|
|
4273
4476
|
const uprights = posts.map((a) => cylinder({ radius: v.post / 2, height: v.post_high + v.plate, center: [...at(v.post_r, a), (v.post_high + v.plate) / 2], segments: v.segments }))
|
|
4274
|
-
const pilots = posts.map((a) => cylinder({ radius:
|
|
4275
|
-
const screws = feet.map((a) => cylinder({ radius:
|
|
4276
|
-
const heads = feet.map((a) => cylinder({ radius:
|
|
4477
|
+
const pilots = posts.map((a) => cylinder({ radius: pilot / 2, height: v.pilot_depth, center: [...at(v.post_r, a), v.plate + v.post_high - v.pilot_depth / 2], segments: v.segments }))
|
|
4478
|
+
const screws = feet.map((a) => cylinder({ radius: screw / 2, height: v.plate + 1, center: [...at(v.column_r, a), v.plate / 2], segments: v.segments }))
|
|
4479
|
+
const heads = feet.map((a) => cylinder({ radius: head / 2, height: headDepth, center: [...at(v.column_r, a), v.plate - headDepth / 2], segments: v.segments }))
|
|
4277
4480
|
// the pocket for the motor's boss would be bridged across: a 45° cone from its roof up through the plate needs no bridge
|
|
4278
4481
|
const hole = v.motors.mountModel(motor, { plate: v.plate, counterbore: true }), rise = v.plate - hole.pocketDepth
|
|
4279
4482
|
const roof = cylinderElliptic({ height: rise + 1, startRadius: [hole.pocket / 2, hole.pocket / 2], endRadius: [hole.pocket / 2 - rise - 1, hole.pocket / 2 - rise - 1], center: [0, 0, hole.pocketDepth + (rise + 1) / 2], segments: v.segments })
|
|
@@ -4388,7 +4591,7 @@ export function main (v) { return sphere({ radius: v.r, center: [0, 0, v.far] })
|
|
|
4388
4591
|
"name": "output",
|
|
4389
4592
|
"title": "Output ring and flange",
|
|
4390
4593
|
"version": "0.1.0",
|
|
4391
|
-
"uses": ["x1c", "leg"
|
|
4594
|
+
"uses": ["x1c", "leg"],
|
|
4392
4595
|
"engine": "manifold",
|
|
4393
4596
|
"orientation": "The flange on the bed, the teeth standing on it",
|
|
4394
4597
|
"description": "Printed flange down and fitted upside down: the same part on the shoulder and the elbow.",
|
|
@@ -4402,7 +4605,6 @@ export function main (v) { return sphere({ radius: v.r, center: [0, 0, v.far] })
|
|
|
4402
4605
|
"rim": {"value": 66, "unit": "mm", "rule": "Round the 57-tooth ring"},
|
|
4403
4606
|
"module": {"value": 1, "unit": "mm", "rule": "The gears'"},
|
|
4404
4607
|
"teeth": {"value": 57, "rule": "The output ring"},
|
|
4405
|
-
"pilot": {"value": 2.9, "unit": "mm", "rule": "An M3 screw self-tapped into the flange", "kind": "community"},
|
|
4406
4608
|
"middle": {"value": 15, "unit": "mm", "rule": "A hole in the middle for the motor's shaft to come up in"},
|
|
4407
4609
|
"bolt": {"value": 20, "unit": "mm", "rule": "Radius of the bolt circle", "interface": true},
|
|
4408
4610
|
"segments": {"value": 24, "rule": "Small holes"},
|
|
@@ -4415,14 +4617,16 @@ export function main (v) { return sphere({ radius: v.r, center: [0, 0, v.far] })
|
|
|
4415
4617
|
|
|
4416
4618
|
```js projects/leg/objects/output.js
|
|
4417
4619
|
// The output ring, drawn as it prints: its flange on the bed, the teeth standing on it; it goes on upside down.
|
|
4620
|
+
// Its four holes are v.fixings' M3 pilots, through the flange: the spindle's screws cut their thread in them.
|
|
4418
4621
|
import jscad from '@jscad/modeling'
|
|
4419
4622
|
const { cylinder } = jscad.primitives
|
|
4420
4623
|
const { translate } = jscad.transforms
|
|
4421
4624
|
|
|
4422
4625
|
export function main (v) {
|
|
4626
|
+
const pilot = v.fixings.holeModel('M3', { kind: 'pilot' }).diameter
|
|
4423
4627
|
const flange = cylinder({ radius: v.rim / 2, height: v.top, center: [0, 0, v.top / 2], segments: v.ring_segments })
|
|
4424
4628
|
const ring = translate([0, 0, v.top], v.gears.internal({ module: v.module, teeth: v.teeth, width: v.width, rim: v.rim }))
|
|
4425
|
-
const holes = Array.from({ length: v.bolts }, (_, k) => cylinder({ radius:
|
|
4629
|
+
const holes = Array.from({ length: v.bolts }, (_, k) => cylinder({ radius: pilot / 2, height: v.top + 1, center: [v.bolt * Math.cos(k * v.quarter), v.bolt * Math.sin(k * v.quarter), v.top / 2], segments: v.segments }))
|
|
4426
4630
|
const middle = cylinder({ radius: v.middle / 2, height: v.top + 1, center: [0, 0, v.top / 2], segments: v.ring_segments })
|
|
4427
4631
|
return v.ops.subtract(v.ops.union(flange, ring), holes, middle)
|
|
4428
4632
|
}
|
|
@@ -4434,11 +4638,14 @@ export function main (v) {
|
|
|
4434
4638
|
"name": "bridge",
|
|
4435
4639
|
"title": "Bridge: the 6800's seat",
|
|
4436
4640
|
"version": "0.1.0",
|
|
4437
|
-
"uses": ["x1c", "leg"
|
|
4641
|
+
"uses": ["x1c", "leg"],
|
|
4438
4642
|
"engine": "manifold",
|
|
4439
4643
|
"orientation": "Upside to the sky, as it goes on: the pocket opens upward and its ledge prints flat",
|
|
4440
4644
|
"description": "Three arms across the housing's posts, holding the bearing that takes the output's tipping load.",
|
|
4441
4645
|
"anchors": {
|
|
4646
|
+
"s1": {"at": ["post_r * cosd(p1)", "post_r * sind(p1)", "thick"], "axis": [0, 0, 1]},
|
|
4647
|
+
"s2": {"at": ["post_r * cosd(p2)", "post_r * sind(p2)", "thick"], "axis": [0, 0, 1]},
|
|
4648
|
+
"s3": {"at": ["post_r * cosd(p3)", "post_r * sind(p3)", "thick"], "axis": [0, 0, 1]},
|
|
4442
4649
|
"seat": {"at": [0, 0, "thick - width"], "axis": [0, 0, 1]},
|
|
4443
4650
|
"under": {"at": [0, 0, 0], "axis": [0, 0, 1]}
|
|
4444
4651
|
},
|
|
@@ -4455,9 +4662,7 @@ export function main (v) {
|
|
|
4455
4662
|
"p2": {"value": 150, "unit": "°", "rule": "Second post"},
|
|
4456
4663
|
"p3": {"value": 270, "unit": "°", "rule": "Third post"},
|
|
4457
4664
|
"rad": {"value": 0.017453293, "rule": "Radians in a degree"},
|
|
4458
|
-
"
|
|
4459
|
-
"head": {"value": "m3.head + 2 * x1c.fit + x1c.hole_comp", "unit": "mm", "rule": "The screw head's counterbore"},
|
|
4460
|
-
"head_depth": {"value": "m3.head_height + x1c.layer", "unit": "mm", "rule": "A socket head's height, sunk, so the thigh passes over"},
|
|
4665
|
+
"sink": {"value": "x1c.layer", "unit": "mm", "rule": "Each screw head sits a layer under the face, so the thigh passes over"},
|
|
4461
4666
|
"segments": {"value": 64, "rule": "Round enough"}
|
|
4462
4667
|
}
|
|
4463
4668
|
}
|
|
@@ -4465,18 +4670,20 @@ export function main (v) {
|
|
|
4465
4670
|
|
|
4466
4671
|
```js projects/leg/objects/bridge.js
|
|
4467
4672
|
// A three-armed plate over the gearbox, the bearing's seat in the middle.
|
|
4673
|
+
// Each post's screw: an M3 clearance hole and its cap head's counterbore, sunk a layer, both v.fixings'.
|
|
4468
4674
|
import jscad from '@jscad/modeling'
|
|
4469
4675
|
const { cylinder, cuboid } = jscad.primitives
|
|
4470
4676
|
const { rotateZ } = jscad.transforms
|
|
4471
4677
|
|
|
4472
4678
|
export function main (v) {
|
|
4679
|
+
const screw = v.fixings.holeModel('M3').diameter, cb = v.fixings.counterboreModel('M3 cap'), head = cb.diameter, headDepth = cb.depth + v.sink
|
|
4473
4680
|
const posts = [v.p1, v.p2, v.p3].map((a) => a * v.rad), at = (a) => [v.post_r * Math.cos(a), v.post_r * Math.sin(a)]
|
|
4474
4681
|
const hub = cylinder({ radius: v.hub / 2, height: v.thick, center: [0, 0, v.thick / 2], segments: v.segments * 2 })
|
|
4475
4682
|
const arms = posts.map((a) => rotateZ(a, cuboid({ size: [v.post_r, v.lobe, v.thick], center: [v.post_r / 2, 0, v.thick / 2] })))
|
|
4476
4683
|
const lobes = posts.map((a) => cylinder({ radius: v.lobe / 2, height: v.thick, center: [...at(a), v.thick / 2], segments: v.segments }))
|
|
4477
4684
|
const seat = v.shapes.bearingSeat({ bore: v.bore, outer_diameter: v.outer, width: v.width }, { fit: 'press', relief: v.relief, through: true, printer: v.x1c, at: [0, 0, v.thick], into: '-z', lead: 0 })
|
|
4478
|
-
const screws = posts.map((a) => cylinder({ radius:
|
|
4479
|
-
const heads = posts.map((a) => cylinder({ radius:
|
|
4685
|
+
const screws = posts.map((a) => cylinder({ radius: screw / 2, height: v.thick + 1, center: [...at(a), v.thick / 2], segments: v.segments }))
|
|
4686
|
+
const heads = posts.map((a) => cylinder({ radius: head / 2, height: headDepth + 1, center: [...at(a), v.thick - (headDepth - 1) / 2], segments: v.segments }))
|
|
4480
4687
|
return v.ops.subtract(v.ops.union(hub, arms, lobes), seat, screws, heads)
|
|
4481
4688
|
}
|
|
4482
4689
|
```
|
|
@@ -4487,28 +4694,29 @@ export function main (v) {
|
|
|
4487
4694
|
"name": "spindle",
|
|
4488
4695
|
"title": "Spindle: disc and shaft",
|
|
4489
4696
|
"version": "0.1.0",
|
|
4490
|
-
"uses": ["x1c", "leg"
|
|
4697
|
+
"uses": ["x1c", "leg"],
|
|
4491
4698
|
"engine": "manifold",
|
|
4492
4699
|
"orientation": "The disc on the bed, the shaft up, as it goes on",
|
|
4493
4700
|
"description": "The output's flange turns the spindle; the spindle's shaft runs in the 6800 and carries the thigh on a hexagon at its top.",
|
|
4494
4701
|
"anchors": {
|
|
4702
|
+
"b1": {"at": ["bolt", 0, "disc"], "axis": [0, 0, 1]},
|
|
4703
|
+
"b2": {"at": [0, "bolt", "disc"], "axis": [0, 0, 1]},
|
|
4704
|
+
"b3": {"at": ["0 - bolt", 0, "disc"], "axis": [0, 0, 1]},
|
|
4705
|
+
"b4": {"at": [0, "0 - bolt", "disc"], "axis": [0, 0, 1]},
|
|
4495
4706
|
"down": {"at": [0, 0, 0], "axis": [0, 0, 1], "ref": [1, 0, 0]},
|
|
4496
4707
|
"seat": {"at": [0, 0, "collar_top + width"], "axis": [0, 0, 1], "ref": [1, 0, 0]}
|
|
4497
4708
|
},
|
|
4498
4709
|
"variables": {
|
|
4499
|
-
"disc": {"value": "leg.disc", "unit": "mm", "rule": "Thick enough for a
|
|
4500
|
-
"rim": {"value":
|
|
4710
|
+
"disc": {"value": "leg.disc", "unit": "mm", "rule": "Thick enough for the countersinks, with a wall of screw hole under each"},
|
|
4711
|
+
"rim": {"value": 48, "unit": "mm", "rule": "Round the 40 mm bolt circle and its countersinks, 6.82 mm across, with a 0.6 mm edge outside them"},
|
|
4501
4712
|
"bolt": {"value": 20, "unit": "mm", "rule": "On the output's bolt circle"},
|
|
4502
|
-
"hole": {"value": "m3.clearance + x1c.hole_comp", "unit": "mm", "rule": "M3 clearance"},
|
|
4503
|
-
"head": {"value": "m3.head", "unit": "mm", "rule": "A countersunk head, flush with the disc so the bridge passes over"},
|
|
4504
4713
|
"shaft": {"value": "leg.bearing_bore - x1c.press", "unit": "mm", "rule": "A close slide into the bearing's bore, clamped end to end by the thigh's screw"},
|
|
4505
4714
|
"width": {"value": "leg.bearing_width", "unit": "mm", "rule": "The bearing"},
|
|
4506
4715
|
"collar_top": {"value": "leg.bridge_low + leg.bridge - width - leg.output_top", "unit": "mm", "rule": "Where the inner race rests, above the disc's underside"},
|
|
4507
4716
|
"shoulder": {"value": 13, "unit": "mm", "rule": "Stops the inner race; clears the outer race"},
|
|
4508
4717
|
"hex": {"value": 8, "unit": "mm", "rule": "Hexagon across its flats: inside the bore, drives the thigh"},
|
|
4509
4718
|
"hex_long": {"value": 5, "unit": "mm", "rule": "Into the thigh's socket"},
|
|
4510
|
-
"
|
|
4511
|
-
"pilot_depth": {"value": 12, "unit": "mm", "rule": "For the thigh's M3"},
|
|
4719
|
+
"pilot_depth": {"value": 12, "unit": "mm", "rule": "The pilot in the hexagon's top, for the thigh's screw"},
|
|
4512
4720
|
"cos30": {"value": "cosd(30)", "rule": "A hexagon, across corners to across flats"},
|
|
4513
4721
|
"bolts": {"value": 4, "rule": "On the bolt circle"},
|
|
4514
4722
|
"quarter": {"value": 1.57079633, "rule": "A quarter turn in radians"},
|
|
@@ -4520,10 +4728,13 @@ export function main (v) {
|
|
|
4520
4728
|
|
|
4521
4729
|
```js projects/leg/objects/spindle.js
|
|
4522
4730
|
// A disc on the output's flange and a shaft up through the bearing, a hexagon at its top for the arm.
|
|
4731
|
+
// The screws are v.fixings': four M3 countersunk screws down through the disc into the output's flange, each hole's
|
|
4732
|
+
// countersink as wide as an ISO 10642 head so it sits flush, and an M3 pilot in the hexagon's top for the thigh's screw.
|
|
4523
4733
|
import jscad from '@jscad/modeling'
|
|
4524
4734
|
const { cylinder } = jscad.primitives
|
|
4525
4735
|
|
|
4526
4736
|
export function main (v) {
|
|
4737
|
+
const pilotD = v.fixings.holeModel('M3', { kind: 'pilot' }).diameter
|
|
4527
4738
|
const plate = cylinder({ radius: v.rim / 2, height: v.disc, center: [0, 0, v.disc / 2], segments: v.segments * 2 })
|
|
4528
4739
|
const top = v.collar_top + v.width
|
|
4529
4740
|
const shaft = cylinder({ radius: v.shaft / 2, height: top - 1, center: [0, 0, (top + 1) / 2], segments: v.segments * 2 })
|
|
@@ -4531,9 +4742,9 @@ export function main (v) {
|
|
|
4531
4742
|
const hex = cylinder({ radius: v.hex / 2 / v.cos30, height: v.hex_long, center: [0, 0, top + v.hex_long / 2], segments: v.hex_segments })
|
|
4532
4743
|
const screws = Array.from({ length: v.bolts }, (_, k) => {
|
|
4533
4744
|
const c = [v.bolt * Math.cos(k * v.quarter), v.bolt * Math.sin(k * v.quarter), v.disc]
|
|
4534
|
-
return v.
|
|
4745
|
+
return v.fixings.countersink('M3', { length: v.disc + 1, at: c, into: '-z' })
|
|
4535
4746
|
})
|
|
4536
|
-
const pilot = cylinder({ radius:
|
|
4747
|
+
const pilot = cylinder({ radius: pilotD / 2, height: v.pilot_depth, center: [0, 0, top + v.hex_long - v.pilot_depth / 2], segments: v.segments })
|
|
4537
4748
|
return v.ops.subtract(v.ops.union(plate, shaft, collar, hex), screws, pilot)
|
|
4538
4749
|
}
|
|
4539
4750
|
```
|
|
@@ -4544,7 +4755,7 @@ export function main (v) {
|
|
|
4544
4755
|
"name": "clip",
|
|
4545
4756
|
"title": "Retaining clip",
|
|
4546
4757
|
"version": "0.1.0",
|
|
4547
|
-
"uses": ["x1c"
|
|
4758
|
+
"uses": ["x1c"],
|
|
4548
4759
|
"orientation": "Flat on the bed",
|
|
4549
4760
|
"description": "Holds the knee's output ring from dropping off its posts.",
|
|
4550
4761
|
"anchors": {
|
|
@@ -4555,7 +4766,6 @@ export function main (v) {
|
|
|
4555
4766
|
"back": {"value": 4, "unit": "mm", "rule": "Round the post"},
|
|
4556
4767
|
"wide": {"value": 8, "unit": "mm", "rule": "As wide as the post and a little"},
|
|
4557
4768
|
"thick": {"value": 3, "unit": "mm", "rule": "Fifteen layers"},
|
|
4558
|
-
"hole": {"value": "m3.clearance + x1c.hole_comp", "unit": "mm", "rule": "M3 clearance"},
|
|
4559
4769
|
"segments": {"value": 24, "rule": "Small round hole"}
|
|
4560
4770
|
}
|
|
4561
4771
|
}
|
|
@@ -4563,19 +4773,21 @@ export function main (v) {
|
|
|
4563
4773
|
|
|
4564
4774
|
```js projects/leg/objects/clip.js
|
|
4565
4775
|
// A flat tab screwed to a post, its nose over the flange.
|
|
4776
|
+
// Its screw's hole is v.fixings' M3 clearance hole.
|
|
4566
4777
|
import jscad from '@jscad/modeling'
|
|
4567
4778
|
const { cuboid, cylinder } = jscad.primitives
|
|
4568
4779
|
const { subtract } = jscad.booleans
|
|
4569
4780
|
|
|
4570
4781
|
export function main (v) {
|
|
4782
|
+
const hole = v.fixings.holeModel('M3').diameter
|
|
4571
4783
|
const tab = cuboid({ size: [v.reach + v.back, v.wide, v.thick], center: [(v.back - v.reach) / 2, 0, v.thick / 2] })
|
|
4572
|
-
return subtract(tab, cylinder({ radius:
|
|
4784
|
+
return subtract(tab, cylinder({ radius: hole / 2, height: v.thick + 1, center: [0, 0, v.thick / 2], segments: v.segments }))
|
|
4573
4785
|
}
|
|
4574
4786
|
```
|
|
4575
4787
|
|
|
4576
4788
|
### The thigh, the shin and the foot
|
|
4577
4789
|
|
|
4578
|
-
The thigh is the arm's upper arm, 100 mm long, without its home switch or bands. The shin is new
|
|
4790
|
+
The thigh is the arm's upper arm, 100 mm long, without its home switch or bands. The shin is new, and its four screws into the knee's output are sunk 1.5 mm in their counterbores, as the forearm's are, so an M3x12 takes the whole flange and stops short of the planets. It is a tapered bar from the knee's flange to a disc, printed flat, so the bending under a foot's load runs along the layers. A disc for a foot means the contact rolls as the shin leans, so a point at the disc's centre stays over the ground: that centre is the `tip` the gait moves, and `height` is the hip to that centre. The pad is TPU, printed lying down, its ridge snapping into a groove round the disc so a wet floor can't pull it off and PLA doesn't skate on a scale's top.
|
|
4579
4791
|
|
|
4580
4792
|
```json projects/leg/objects/thigh.json
|
|
4581
4793
|
{
|
|
@@ -4583,7 +4795,7 @@ The thigh is the arm's upper arm, 100 mm long, without its home switch or bands.
|
|
|
4583
4795
|
"name": "thigh",
|
|
4584
4796
|
"title": "Thigh",
|
|
4585
4797
|
"version": "0.1.0",
|
|
4586
|
-
"uses": ["x1c", "leg"
|
|
4798
|
+
"uses": ["x1c", "leg"],
|
|
4587
4799
|
"engine": "manifold",
|
|
4588
4800
|
"orientation": "The thigh's outer face on the bed: the hub, the knee's fixed ring and its posts all rise from the one flat face",
|
|
4589
4801
|
"description": "From the hip's hexagon to the knee's motor. The drawing arm's upper arm, shorter and without its home switch or bands: printed as one part with the knee's fixed ring, so the knee's gearbox costs a sun, three planets and an output ring.",
|
|
@@ -4607,7 +4819,6 @@ The thigh is the arm's upper arm, 100 mm long, without its home switch or bands.
|
|
|
4607
4819
|
"hex_depth": {"value": "thick + collar - floor", "unit": "mm", "rule": "The socket's depth"},
|
|
4608
4820
|
"floor": {"value": 3, "unit": "mm", "rule": "What the screw pulls against: a socket's floor"},
|
|
4609
4821
|
"hex_fit": {"value": "x1c.fit + x1c.hole_comp", "unit": "mm", "rule": "Across the socket's flats, over the spindle's, printed"},
|
|
4610
|
-
"screw": {"value": "m3.clearance + x1c.hole_comp", "unit": "mm", "rule": "M3 clearance"},
|
|
4611
4822
|
"gear": {"value": "leg.gear", "unit": "mm", "rule": "The fixed ring's face"},
|
|
4612
4823
|
"arm_gap": {"value": "leg.ring_gap", "unit": "mm", "rule": "Between the fixed ring and the output ring"},
|
|
4613
4824
|
"rim": {"value": 62, "unit": "mm", "rule": "Round the 54-tooth ring"},
|
|
@@ -4622,8 +4833,7 @@ The thigh is the arm's upper arm, 100 mm long, without its home switch or bands.
|
|
|
4622
4833
|
"rad": {"value": 0.017453293, "rule": "Radians in a degree"},
|
|
4623
4834
|
"clip_at": {"value": "thick + gear + arm_gap + gear + leg.flange + clip_gap", "unit": "mm", "rule": "Each post's tip, where its clip goes on, just past the output's flange"},
|
|
4624
4835
|
"clip_gap": {"value": 0.3, "unit": "mm", "rule": "The output turns under the clips with this to spare"},
|
|
4625
|
-
"
|
|
4626
|
-
"pilot_depth": {"value": 8, "unit": "mm", "rule": "For an M3 × 10 through a clip"},
|
|
4836
|
+
"pilot_depth": {"value": 8, "unit": "mm", "rule": "Each post's pilot, deep enough for its clip's screw"},
|
|
4627
4837
|
"segments": {"value": 64, "rule": "Round enough"},
|
|
4628
4838
|
"ring_segments": {"value": 96, "rule": "The rim's circle"},
|
|
4629
4839
|
"hex_segments": {"value": 6, "rule": "A hexagon's sides"},
|
|
@@ -4636,6 +4846,8 @@ The thigh is the arm's upper arm, 100 mm long, without its home switch or bands.
|
|
|
4636
4846
|
```js projects/leg/objects/thigh.js
|
|
4637
4847
|
// The thigh, drawn as it prints: its outer face on the bed, the knee's ring standing on it, the hub's socket opening
|
|
4638
4848
|
// upward. The knee's NEMA 14 bolts on the bed side, its shaft up through the plate, as the arm's elbow does.
|
|
4849
|
+
// The screws' holes are v.fixings': an M3 clearance hole through the socket's floor for the screw into the spindle,
|
|
4850
|
+
// and an M3 pilot in each post for its clip.
|
|
4639
4851
|
import jscad from '@jscad/modeling'
|
|
4640
4852
|
const { cylinder, cylinderElliptic, cuboid, circle } = jscad.primitives
|
|
4641
4853
|
const { translate, rotateZ } = jscad.transforms
|
|
@@ -4643,6 +4855,7 @@ const { extrudeLinear } = jscad.extrusions
|
|
|
4643
4855
|
const { hull } = jscad.hulls
|
|
4644
4856
|
|
|
4645
4857
|
export function main (v) {
|
|
4858
|
+
const screw = v.fixings.holeModel('M3').diameter, pilot = v.fixings.holeModel('M3', { kind: 'pilot' }).diameter
|
|
4646
4859
|
const motor = v.motors.motorModel('nema14')
|
|
4647
4860
|
const at = (r, a) => [v.long + r * Math.cos(a), r * Math.sin(a)]
|
|
4648
4861
|
const posts = [v.p1, v.p2, v.p3].map((a) => a * v.rad)
|
|
@@ -4654,10 +4867,10 @@ export function main (v) {
|
|
|
4654
4867
|
const lobes = posts.map((a) => cylinder({ radius: v.lobe / 2, height: v.thick, center: [...at(v.post_r, a), v.thick / 2], segments: v.segments }))
|
|
4655
4868
|
const joins = posts.map((a) => translate([v.long, 0, 0], rotateZ(a, cuboid({ size: [v.post_r - v.rim / 2 + 2, v.lobe, v.thick], center: [(v.post_r + v.rim / 2 - 2) / 2, 0, v.thick / 2] }))))
|
|
4656
4869
|
const uprights = posts.map((a) => cylinder({ radius: v.post / 2, height: v.clip_at, center: [...at(v.post_r, a), v.clip_at / 2], segments: v.segments }))
|
|
4657
|
-
const pilots = posts.map((a) => cylinder({ radius:
|
|
4870
|
+
const pilots = posts.map((a) => cylinder({ radius: pilot / 2, height: v.pilot_depth, center: [...at(v.post_r, a), v.clip_at - v.pilot_depth / 2], segments: v.segments }))
|
|
4658
4871
|
const collar = cylinder({ radius: v.collar_d / 2, height: v.collar + 1, center: [0, 0, v.thick + (v.collar - 1) / 2], segments: v.segments })
|
|
4659
4872
|
const socket = cylinder({ radius: (v.hex + v.hex_fit) / 2 / v.cos30, height: v.hex_depth + 1, center: [0, 0, v.floor + (v.hex_depth + 1) / 2], segments: v.hex_segments })
|
|
4660
|
-
const through = cylinder({ radius:
|
|
4873
|
+
const through = cylinder({ radius: screw / 2, height: v.floor + 1, center: [0, 0, (v.floor - 1) / 2], segments: v.segments })
|
|
4661
4874
|
const hole = v.motors.mountModel(motor, { plate: v.thick, counterbore: true }), rise = v.thick - hole.pocketDepth
|
|
4662
4875
|
const roof = translate([v.long, 0, 0], cylinderElliptic({ height: rise + 1, startRadius: [hole.pocket / 2, hole.pocket / 2], endRadius: [hole.pocket / 2 - rise - 1, hole.pocket / 2 - rise - 1], center: [0, 0, hole.pocketDepth + (rise + 1) / 2], segments: v.segments }))
|
|
4663
4876
|
const mount = translate([v.long, 0, 0], v.motors.mount(motor, { plate: v.thick, counterbore: true }, v.ops))
|
|
@@ -4671,11 +4884,15 @@ export function main (v) {
|
|
|
4671
4884
|
"name": "shin",
|
|
4672
4885
|
"title": "Shin and foot",
|
|
4673
4886
|
"version": "0.1.0",
|
|
4674
|
-
"uses": ["x1c", "leg"
|
|
4887
|
+
"uses": ["x1c", "leg"],
|
|
4675
4888
|
"engine": "manifold",
|
|
4676
4889
|
"orientation": "The bar and the foot flat on the bed, the boss up. The foot's V groove at 45° needs no support",
|
|
4677
4890
|
"description": "From the knee's output flange to a round foot: a bar in one piece with the disc the grip pad snaps round.",
|
|
4678
4891
|
"anchors": {
|
|
4892
|
+
"b1": {"at": ["bolt", 0, 0], "axis": [0, 0, 1]},
|
|
4893
|
+
"b2": {"at": [0, "bolt", 0], "axis": [0, 0, 1]},
|
|
4894
|
+
"b3": {"at": ["0 - bolt", 0, 0], "axis": [0, 0, 1]},
|
|
4895
|
+
"b4": {"at": [0, "0 - bolt", 0], "axis": [0, 0, 1]},
|
|
4679
4896
|
"hub": {"at": [0, 0, "boss"], "axis": [0, 0, -1], "ref": [1, 0, 0]},
|
|
4680
4897
|
"tip": {"at": ["long", 0, "foot_w / 2"], "axis": [0, 0, 1], "ref": [1, 0, 0]},
|
|
4681
4898
|
"pad": {"at": ["long", 0, 0], "axis": [0, 0, 1], "ref": [1, 0, 0]},
|
|
@@ -4688,9 +4905,7 @@ export function main (v) {
|
|
|
4688
4905
|
"toe": {"value": 16, "unit": "mm", "rule": "Its width at the foot: tapered, as the bending falls to nothing at the foot"},
|
|
4689
4906
|
"boss": {"value": "leg.boss", "unit": "mm", "rule": "The bar passes under the knee's clips, the boss above reaches the flange"},
|
|
4690
4907
|
"boss_d": {"value": 46, "unit": "mm", "rule": "Round the 40 mm bolt circle"},
|
|
4691
|
-
"
|
|
4692
|
-
"head": {"value": "m3.head + 2 * x1c.fit + x1c.hole_comp", "unit": "mm", "rule": "The screw's head, counterbored in the bed side"},
|
|
4693
|
-
"head_depth": {"value": "m3.head_height + x1c.layer", "unit": "mm", "rule": "Sunk"},
|
|
4908
|
+
"sink": {"value": 1.5, "unit": "mm", "rule": "Each screw head sits this far into the boss, so an M3x12 engages the whole flange and its tip stops at the flange's far face, clear of the planets"},
|
|
4694
4909
|
"bolt": {"value": 20, "unit": "mm", "rule": "The output's bolt circle, radius"},
|
|
4695
4910
|
"bolts": {"value": 4, "rule": "On the bolt circle"},
|
|
4696
4911
|
"quarter": {"value": 1.57079633, "rule": "A quarter turn in radians"},
|
|
@@ -4705,6 +4920,7 @@ export function main (v) {
|
|
|
4705
4920
|
|
|
4706
4921
|
```js projects/leg/objects/shin.js
|
|
4707
4922
|
// A tapered bar from the knee's boss to a round foot, flat on the bed. The foot's rim has a V groove for the pad's ridge.
|
|
4923
|
+
// The four screws into the knee's output are v.fixings': M3 clearance holes with their cap heads' counterbores.
|
|
4708
4924
|
import jscad from '@jscad/modeling'
|
|
4709
4925
|
const { cylinder, circle, polygon } = jscad.primitives
|
|
4710
4926
|
const { translate } = jscad.transforms
|
|
@@ -4712,13 +4928,14 @@ const { extrudeLinear, extrudeRotate } = jscad.extrusions
|
|
|
4712
4928
|
const { hull } = jscad.hulls
|
|
4713
4929
|
|
|
4714
4930
|
export function main (v) {
|
|
4931
|
+
const screw = v.fixings.holeModel('M3').diameter, cb = v.fixings.counterboreModel('M3 cap'), head = cb.diameter, headDepth = cb.depth + v.sink
|
|
4715
4932
|
const dot = (r, x) => translate([x, 0], circle({ radius: r, segments: v.segments }))
|
|
4716
4933
|
const bar = extrudeLinear({ height: v.bar }, hull(dot(v.wide / 2, 0), dot(v.toe / 2, v.long)))
|
|
4717
4934
|
const boss = cylinder({ radius: v.boss_d / 2, height: v.boss, center: [0, 0, v.boss / 2], segments: v.segments * 2 })
|
|
4718
4935
|
const r = v.foot_r, mid = v.foot_w / 2, g = v.groove
|
|
4719
4936
|
const foot = translate([v.long, 0, 0], extrudeRotate({ segments: v.segments }, polygon({ points: [[0, 0], [r, 0], [r, mid - g], [r - g, mid], [r, mid + g], [r, v.foot_w], [0, v.foot_w]] })))
|
|
4720
|
-
const bolts = Array.from({ length: v.bolts }, (_, k) => cylinder({ radius:
|
|
4721
|
-
const heads = Array.from({ length: v.bolts }, (_, k) => cylinder({ radius:
|
|
4937
|
+
const bolts = Array.from({ length: v.bolts }, (_, k) => cylinder({ radius: screw / 2, height: v.boss + 1, center: [v.bolt * Math.cos(k * v.quarter), v.bolt * Math.sin(k * v.quarter), v.boss / 2], segments: v.segments }))
|
|
4938
|
+
const heads = Array.from({ length: v.bolts }, (_, k) => cylinder({ radius: head / 2, height: headDepth + 1, center: [v.bolt * Math.cos(k * v.quarter), v.bolt * Math.sin(k * v.quarter), (headDepth - 1) / 2], segments: v.segments }))
|
|
4722
4939
|
return v.ops.subtract(v.ops.union(bar, boss, foot), bolts, heads)
|
|
4723
4940
|
}
|
|
4724
4941
|
```
|
|
@@ -4772,7 +4989,7 @@ export function main (v) {
|
|
|
4772
4989
|
|
|
4773
4990
|
### The stand
|
|
4774
4991
|
|
|
4775
|
-
A carriage rides up two 8 mm rods on two LM8UU bushings; the hip's housing screws to its face and the hip motor goes through a window in the middle. A foot block holds each rod to the bench and a tie across their tops stops them leaning. The scale sits on the bench under the foot, between the two feet; a collar on each rod is the stop the carriage rests on when the foot lifts.
|
|
4992
|
+
A carriage rides up two 8 mm rods on two LM8UU bushings; the hip's housing screws to its face and the hip motor goes through a window in the middle. A foot block holds each rod to the bench and a tie across their tops stops them leaning. The scale sits on the bench under the foot, between the two feet; a collar on each rod is the stop the carriage rests on when the foot lifts. The housing's three screws cut their thread in M3 pilots through the carriage's plate, the foot blocks take M5 bolts to the bench through clearance holes of 5.6 mm, and the collar's clamp screw crosses its slot in an M3 clearance hole drawn as a teardrop, all from `v.fixings`.
|
|
4776
4993
|
|
|
4777
4994
|
In this design the body's frame is the world: the hip is at the origin, so the gait's targets are in the body's frame as they should be, and the stand hangs off it rather than the other way round. That is why nothing joins the carriage to the rods: the slide is real on the bench, but the check treats the frame as still and the leg as stepping from it.
|
|
4778
4995
|
|
|
@@ -4782,7 +4999,7 @@ In this design the body's frame is the world: the hip is at the origin, so the g
|
|
|
4782
4999
|
"name": "carriage",
|
|
4783
5000
|
"title": "Stand carriage: the leg's mount on two rods",
|
|
4784
5001
|
"version": "0.1.0",
|
|
4785
|
-
"uses": ["x1c", "leg", "
|
|
5002
|
+
"uses": ["x1c", "leg", "lm8uu"],
|
|
4786
5003
|
"engine": "manifold",
|
|
4787
5004
|
"orientation": "The hip's face on the bed, the bosses up; each bearing pocket is a teardrop across the layers",
|
|
4788
5005
|
"description": "A plate on two LM8UU bushings. The hip housing screws to its face and the hip's motor goes through its middle. It rides up the rods as the foot pushes, so the scale reads the leg.",
|
|
@@ -4791,7 +5008,7 @@ In this design the body's frame is the world: the hip is at the origin, so the g
|
|
|
4791
5008
|
"cable": {"at": ["half_w", 0, 0], "axis": [0, 0, -1]}
|
|
4792
5009
|
},
|
|
4793
5010
|
"variables": {
|
|
4794
|
-
"plate": {"value": 8, "unit": "mm", "rule": "The plate's thickness: three
|
|
5011
|
+
"plate": {"value": 8, "unit": "mm", "rule": "The plate's thickness: the housing's three screws bite here and carry the leg into the bushings"},
|
|
4795
5012
|
"feet_r": {"value": 37, "unit": "mm", "rule": "The housing's three feet", "interface": true},
|
|
4796
5013
|
"hub": {"value": 46, "unit": "mm", "rule": "The plate's round middle: past the feet, for the screws"},
|
|
4797
5014
|
"arm_w": {"value": 24, "unit": "mm", "rule": "The arms' width, out to the bosses"},
|
|
@@ -4803,7 +5020,6 @@ In this design the body's frame is the world: the hip is at the origin, so the g
|
|
|
4803
5020
|
"rod_y": {"value": "leg.rod_y", "unit": "mm", "rule": "The rods' distance behind the face"},
|
|
4804
5021
|
"cut": {"value": 44.5, "unit": "mm", "rule": "The motor's way through: a NEMA 17 and 1.1 mm each side"},
|
|
4805
5022
|
"corner": {"value": 3, "unit": "mm", "rule": "Round the corners of the motor's window"},
|
|
4806
|
-
"pilot": {"value": 2.9, "unit": "mm", "rule": "M3 self-tapped into the plate, from the housing", "kind": "community"},
|
|
4807
5023
|
"a1": {"value": 90, "unit": "°", "rule": "The housing's first foot"},
|
|
4808
5024
|
"a2": {"value": 210, "unit": "°", "rule": "Second"},
|
|
4809
5025
|
"a3": {"value": 330, "unit": "°", "rule": "Third"},
|
|
@@ -4815,16 +5031,18 @@ In this design the body's frame is the world: the hip is at the origin, so the g
|
|
|
4815
5031
|
|
|
4816
5032
|
```js projects/leg/objects/carriage.js
|
|
4817
5033
|
// A round hub for the hip, arms out to two bushing bosses, the hip's face down on the bed.
|
|
5034
|
+
// The housing's three screws cut their thread in v.fixings' M3 pilots, through the plate.
|
|
4818
5035
|
import jscad from '@jscad/modeling'
|
|
4819
5036
|
const { cylinder, cuboid, roundedRectangle } = jscad.primitives
|
|
4820
5037
|
const { extrudeLinear } = jscad.extrusions
|
|
4821
5038
|
|
|
4822
5039
|
export function main (v) {
|
|
5040
|
+
const pilot = v.fixings.holeModel('M3', { kind: 'pilot' }).diameter
|
|
4823
5041
|
const arms = cuboid({ size: [v.half_w * 2, v.arm_w, v.plate], center: [0, 0, v.plate / 2] })
|
|
4824
5042
|
const hub = cylinder({ radius: v.hub, height: v.plate, center: [0, 0, v.plate / 2], segments: v.segments * 2 })
|
|
4825
5043
|
const bosses = [-1, 1].map((s) => cuboid({ size: [v.boss_x * 2, v.boss_long, v.boss_h], center: [s * v.rod_x, 0, v.boss_h / 2] }))
|
|
4826
5044
|
const window = extrudeLinear({ height: v.plate + 1 }, roundedRectangle({ size: [v.cut, v.cut], roundRadius: v.corner, segments: v.segments }))
|
|
4827
|
-
const feet = [v.a1, v.a2, v.a3].map((a) => a * v.rad).map((a) => cylinder({ radius:
|
|
5045
|
+
const feet = [v.a1, v.a2, v.a3].map((a) => a * v.rad).map((a) => cylinder({ radius: pilot / 2, height: v.plate + 1, center: [v.feet_r * Math.cos(a), 0 - v.feet_r * Math.sin(a), v.plate / 2], segments: v.segments }))
|
|
4828
5046
|
const pockets = [-1, 1].map((s) => v.shapes.lm8uuPocket(v.lm8uu, { printer: v.x1c, at: [s * v.rod_x, 0 - v.boss_long / 2, v.rod_y], into: '+y', through: true }))
|
|
4829
5047
|
return v.ops.subtract(v.ops.union(arms, hub, bosses), window, feet, pockets)
|
|
4830
5048
|
}
|
|
@@ -4836,7 +5054,7 @@ export function main (v) {
|
|
|
4836
5054
|
"name": "foot",
|
|
4837
5055
|
"title": "Stand foot block",
|
|
4838
5056
|
"version": "0.1.0",
|
|
4839
|
-
"uses": ["x1c", "leg"
|
|
5057
|
+
"uses": ["x1c", "leg"],
|
|
4840
5058
|
"engine": "manifold",
|
|
4841
5059
|
"orientation": "Flat on the bed, the rod's socket opening up",
|
|
4842
5060
|
"description": "Holds a rod upright, and bolts to the bench through two holes.",
|
|
@@ -4846,7 +5064,6 @@ export function main (v) {
|
|
|
4846
5064
|
"thick": {"value": "leg.foot_block", "unit": "mm", "rule": "The socket's depth and a floor"},
|
|
4847
5065
|
"socket": {"value": "leg.rod_d + x1c.hole_comp", "unit": "mm", "rule": "The rod, a press into the printed bore"},
|
|
4848
5066
|
"depth": {"value": "leg.foot_socket", "unit": "mm", "rule": "How far the rod goes in"},
|
|
4849
|
-
"bolt": {"value": "m5.clearance", "unit": "mm", "rule": "To the bench"},
|
|
4850
5067
|
"bolt_x": {"value": 12, "unit": "mm", "rule": "The bolts, either side of the rod"},
|
|
4851
5068
|
"corner": {"value": 4, "unit": "mm", "rule": "The block's corners, rounded"},
|
|
4852
5069
|
"segments": {"value": 48, "rule": "Round enough"}
|
|
@@ -4856,14 +5073,16 @@ export function main (v) {
|
|
|
4856
5073
|
|
|
4857
5074
|
```js projects/leg/objects/foot.js
|
|
4858
5075
|
// A block with a rod's socket in the top and a bolt through each end.
|
|
5076
|
+
// The bolts' holes are v.fixings' M5 clearance holes.
|
|
4859
5077
|
import jscad from '@jscad/modeling'
|
|
4860
5078
|
const { cylinder, roundedRectangle } = jscad.primitives
|
|
4861
5079
|
const { extrudeLinear } = jscad.extrusions
|
|
4862
5080
|
|
|
4863
5081
|
export function main (v) {
|
|
5082
|
+
const bolt = v.fixings.holeModel('M5').diameter
|
|
4864
5083
|
const block = extrudeLinear({ height: v.thick }, roundedRectangle({ size: [v.long, v.wide], roundRadius: v.corner, segments: v.segments }))
|
|
4865
5084
|
const socket = cylinder({ radius: v.socket / 2, height: v.depth + 1, center: [0, 0, v.thick - v.depth + (v.depth + 1) / 2], segments: v.segments })
|
|
4866
|
-
const bolts = [-1, 1].map((s) => cylinder({ radius:
|
|
5085
|
+
const bolts = [-1, 1].map((s) => cylinder({ radius: bolt / 2, height: v.thick + 1, center: [s * v.bolt_x, 0, v.thick / 2], segments: v.segments }))
|
|
4867
5086
|
return v.ops.subtract(block, socket, bolts)
|
|
4868
5087
|
}
|
|
4869
5088
|
```
|
|
@@ -4909,7 +5128,7 @@ export function main (v) {
|
|
|
4909
5128
|
"name": "collar",
|
|
4910
5129
|
"title": "Rod collar: the carriage's stop",
|
|
4911
5130
|
"version": "0.1.0",
|
|
4912
|
-
"uses": ["x1c", "leg"
|
|
5131
|
+
"uses": ["x1c", "leg"],
|
|
4913
5132
|
"engine": "manifold",
|
|
4914
5133
|
"orientation": "Flat on the bed, the rod's hole upright, the clamp's slot through one side",
|
|
4915
5134
|
"description": "Set on a rod under the carriage: the carriage drops onto it when the foot lifts, so the foot really leaves the scale.",
|
|
@@ -4918,7 +5137,6 @@ export function main (v) {
|
|
|
4918
5137
|
"outer": {"value": 22, "unit": "mm", "rule": "Round the rod, wall enough to take the screw"},
|
|
4919
5138
|
"high": {"value": 10, "unit": "mm", "rule": "Along the rod"},
|
|
4920
5139
|
"slot": {"value": 1.5, "unit": "mm", "rule": "The slot the clamp screw closes"},
|
|
4921
|
-
"screw": {"value": "m3.clearance + x1c.hole_comp", "unit": "mm", "rule": "The clamp's M3, across the slot: its hole a teardrop"},
|
|
4922
5140
|
"screw_out": {"value": 8, "unit": "mm", "rule": "The screw, clear of the rod"},
|
|
4923
5141
|
"segments": {"value": 48, "rule": "Round enough"}
|
|
4924
5142
|
}
|
|
@@ -4927,14 +5145,16 @@ export function main (v) {
|
|
|
4927
5145
|
|
|
4928
5146
|
```js projects/leg/objects/collar.js
|
|
4929
5147
|
// A ring with a slot and a screw across it, closing round the rod. The screw's hole is a teardrop across the layers.
|
|
5148
|
+
// The clamp screw's hole is v.fixings' M3 clearance hole.
|
|
4930
5149
|
import jscad from '@jscad/modeling'
|
|
4931
5150
|
const { cylinder, cuboid } = jscad.primitives
|
|
4932
5151
|
|
|
4933
5152
|
export function main (v) {
|
|
5153
|
+
const screwD = v.fixings.holeModel('M3').diameter
|
|
4934
5154
|
const ring = cylinder({ radius: v.outer / 2, height: v.high, center: [0, 0, v.high / 2], segments: v.segments * 2 })
|
|
4935
5155
|
const hole = cylinder({ radius: v.bore / 2, height: v.high + 1, center: [0, 0, v.high / 2], segments: v.segments })
|
|
4936
5156
|
const slot = cuboid({ size: [v.outer / 2 + 1, v.slot, v.high + 1], center: [(v.outer / 2 + 1) / 2, 0, v.high / 2] })
|
|
4937
|
-
const screw = v.shapes.teardropHole({ d:
|
|
5157
|
+
const screw = v.shapes.teardropHole({ d: screwD, length: v.outer, at: [v.screw_out, 0 - v.outer / 2, v.high / 2], into: '+y', through: true })
|
|
4938
5158
|
return v.ops.subtract(ring, hole, slot, screw)
|
|
4939
5159
|
}
|
|
4940
5160
|
```
|
|
@@ -5039,13 +5259,23 @@ Standing, the foot is under the hip with the knee behind it. The gait is a singl
|
|
|
5039
5259
|
{ "sun": "sun", "carrier": "carrier", "ring": "housing", "planets": ["p1", "p2", "p3"], "drive": "sun", "module": 1, "teeth": [18, 18, 54], "output": { "ring": "output", "planet": 21, "teeth": 57 } },
|
|
5040
5260
|
{ "sun": "esun", "carrier": "ecarrier", "ring": "ering", "planets": ["ep1", "ep2", "ep3"], "drive": "sun", "module": 1, "teeth": [18, 18, 54], "output": { "ring": "eoutput", "planet": 21, "teeth": 57 } }
|
|
5041
5261
|
],
|
|
5262
|
+
"fasten": [
|
|
5263
|
+
{"screw": "M3 cap", "through": ["housing"], "into": "carriage", "at": ["housing.f1", "housing.f2", "housing.f3"], "note": "The housing on the carriage's face"},
|
|
5264
|
+
{"screw": "M3 cap", "through": ["bridge"], "into": "housing", "at": ["bridge.s1", "bridge.s2", "bridge.s3"], "note": "The bridge on the housing's posts"},
|
|
5265
|
+
{"screw": "M3 countersunk", "through": ["spindle"], "into": "output", "at": ["spindle.b1", "spindle.b2", "spindle.b3", "spindle.b4"], "note": "The spindle on the hip's output, its heads flush under the bridge"},
|
|
5266
|
+
{"screw": "M3 cap", "through": ["thigh"], "into": "spindle", "at": ["thigh.hub"], "note": "The thigh clamped down on the spindle's hexagon"},
|
|
5267
|
+
{"screw": "M3 cap", "through": ["clip1"], "into": "thigh", "at": ["clip1.post"], "note": "A clip on its post"},
|
|
5268
|
+
{"screw": "M3 cap", "through": ["clip2"], "into": "thigh", "at": ["clip2.post"], "note": "A clip on its post"},
|
|
5269
|
+
{"screw": "M3 cap", "through": ["clip3"], "into": "thigh", "at": ["clip3.post"], "note": "A clip on its post"},
|
|
5270
|
+
{"screw": "M3 cap", "through": ["shin"], "into": "eoutput", "at": ["shin.b1", "shin.b2", "shin.b3", "shin.b4"], "note": "The shin on the knee's output"}
|
|
5271
|
+
],
|
|
5042
5272
|
"fits": [
|
|
5043
5273
|
{ "a": "m1", "b": "housing", "fastens": true, "min": -0.1, "note": "The hip motor, on its four screws, its boss seated in the plate's pocket" },
|
|
5044
5274
|
{ "a": "m1", "b": "sun", "shaft": true, "note": "The shaft in the sun" },
|
|
5045
5275
|
{ "a": "m2", "b": "esun", "shaft": true, "note": "The knee motor's shaft in its sun" },
|
|
5046
5276
|
{ "a": "m2", "b": "thigh", "fastens": true, "min": -0.1, "note": "The knee motor, on its four screws" },
|
|
5047
|
-
{ "a": "housing", "b": "carriage", "
|
|
5048
|
-
{ "a": "bridge", "b": "housing", "
|
|
5277
|
+
{ "a": "housing", "b": "carriage", "min": 0, "note": "The housing, screwed to the carriage's face" },
|
|
5278
|
+
{ "a": "bridge", "b": "housing", "min": 0, "note": "The bridge, on the housing's posts" },
|
|
5049
5279
|
{ "a": "b1", "b": "bridge", "seat": "press", "note": "The 6800 in its seat" },
|
|
5050
5280
|
{ "a": "ecarrier", "b": "ering", "min": -1, "note": "Two specks: neither is printed" },
|
|
5051
5281
|
{ "a": "lm1", "b": "carriage", "fastens": true, "min": -0.5, "note": "The bushing, pressed in its pocket" },
|
|
@@ -5079,13 +5309,14 @@ npx cad list leg/stand
|
|
|
5079
5309
|
npx cad animate leg/stand
|
|
5080
5310
|
```
|
|
5081
5311
|
|
|
5082
|
-
The check runs with `--json` here because the stand's
|
|
5312
|
+
The check runs with `--json` here because the stand's warnings, that its figures rest on estimates and that two of the shin's screws want a ball-end key, would otherwise stop the test: run it plain to read it. What it says:
|
|
5083
5313
|
|
|
5084
5314
|
- `gait.clearance` passes: the swing foot lifts 15 mm clear of the scale (asked 12).
|
|
5085
5315
|
- `motor.torque` through the gait: the hip needs 0.147 N m at the worst of the cycle against 1.682 N m the 17HS4401 gives at 0.5 A through 38:1 at 47%, 11.4 times; the knee 0.451 N m against 1.419 N m, 3.1 times. Those figures are the foot's load only, not the leg's own weight in the swing, and the gearbox efficiency is an estimate.
|
|
5086
5316
|
- `gait.sweep` passes: the leg, moved through the cycle pose by pose, hits nothing, with every planet and the sun turning as they should (the gait moves the motor's shaft that leads each output, and the rest follows).
|
|
5087
5317
|
- The gears' overlap is zero: the second ring is put in phase at the joint's own zero, wherever its range starts. (A range that left out zero once put the ring 30° out, and every planet into its teeth.)
|
|
5088
|
-
- `
|
|
5318
|
+
- `fasten` chooses every screw and passes each: the housing's three M3x8 caps into the carriage, the bridge's three M3x10, the spindle's four M3x8 countersunk, the thigh's M3x16 into the hexagon, the clips' three M3x8 and the shin's four M3x12. It warns that the shin's first and third screws are reached only by a ball-end key tilted up to 25°: in the standing pose rod1, and for one of them collar1, stands over the straight line. That is true on the bench, so the shin goes on the knee before the leg goes on the stand. The collar's clamp screw is not a `fasten` yet: its head and nut would sit on the collar's round outside, and the collar needs flats for them first.
|
|
5319
|
+
- `cad list` gives 471 g of printing and about 8.6 hours, and buys those screws with the motors' own (4 M3x6 and 4 M3x12 from their mounts): 24 g of fixings. Per part, printed and bought, the leg (without the stand) is the sum above; the heaviest prints are the thigh (98 g), the carriage (92 g), the tie (43 g) and the shin (43 g).
|
|
5089
5320
|
- Margin per part, by hand (`estimate`, PLA at 39 MPa, bending at the worst stance load): the thigh 80 times, the shin 45 times, the carriage's arms 130 times. The motors' margins above are the small ones.
|
|
5090
5321
|
- `cad animate leg/stand` writes `.preview/leg/stand-gait.svg`: the leg's sticks in side view, the foot's stance in blue and swing in orange. The model page plays the same cycle in the Motion panel of a link: `cad link leg/stand` carries it.
|
|
5091
5322
|
|
|
@@ -5093,7 +5324,7 @@ To run the leg on the bench: tare the scale with the carriage resting on its sto
|
|
|
5093
5324
|
|
|
5094
5325
|
### The quadruped
|
|
5095
5326
|
|
|
5096
|
-
Four legs, on a body two plates wide: a design exercise. The two side plates are the same 242 mm print, turned end for end, held apart by two beams and each with two hips. Each hip motor goes through its plate, inward, so a body 100 mm wide takes two motors back to back. The knees point outward, front and back, so a front knee never reaches a back hip.
|
|
5327
|
+
Four legs, on a body two plates wide: a design exercise. The two side plates are the same 242 mm print, turned end for end, held apart by two beams and each with two hips. Each hip motor goes through its plate, inward, so a body 100 mm wide takes two motors back to back. The knees point outward, front and back, so a front knee never reaches a back hip. Each hip's housing screws into M3 pilots in its plate, and each beam is held by screws through M3 clearance holes in the plates into pilots in the beam's ends: a pilot in the plate as well would leave the screw nothing to clamp, and the check's `fasten.clearance` would fail it.
|
|
5097
5328
|
|
|
5098
5329
|
```json projects/leg/objects/side.json
|
|
5099
5330
|
{
|
|
@@ -5101,7 +5332,7 @@ Four legs, on a body two plates wide: a design exercise. The two side plates are
|
|
|
5101
5332
|
"name": "side",
|
|
5102
5333
|
"title": "Body side plate",
|
|
5103
5334
|
"version": "0.1.0",
|
|
5104
|
-
"uses": ["x1c", "leg"
|
|
5335
|
+
"uses": ["x1c", "leg"],
|
|
5105
5336
|
"engine": "manifold",
|
|
5106
5337
|
"orientation": "Flat on the bed: the hips' faces down",
|
|
5107
5338
|
"description": "Two hip hubs joined by a spar, with the windows the hip motors go through and four pilot holes for the cross beams. The two sides are the same print, turned end for end.",
|
|
@@ -5111,14 +5342,13 @@ Four legs, on a body two plates wide: a design exercise. The two side plates are
|
|
|
5111
5342
|
},
|
|
5112
5343
|
"variables": {
|
|
5113
5344
|
"half": {"value": "leg.body_half", "unit": "mm", "rule": "Hip to the middle: the body's half-length", "interface": true},
|
|
5114
|
-
"thick": {"value": 6, "unit": "mm", "rule": "The plate: enough for the housing's three
|
|
5345
|
+
"thick": {"value": 6, "unit": "mm", "rule": "The plate: enough for the housing's three screws to bite"},
|
|
5115
5346
|
"hub": {"value": 46, "unit": "mm", "rule": "A hub's radius: past the housing's feet"},
|
|
5116
5347
|
"spar": {"value": 30, "unit": "mm", "rule": "The spar's depth between the hubs"},
|
|
5117
5348
|
"feet_r": {"value": 37, "unit": "mm", "rule": "The housing's three feet", "interface": true},
|
|
5118
5349
|
"a1": {"value": 90, "unit": "°", "rule": "The housing's first foot"},
|
|
5119
5350
|
"a2": {"value": 210, "unit": "°", "rule": "Second"},
|
|
5120
5351
|
"a3": {"value": 330, "unit": "°", "rule": "Third"},
|
|
5121
|
-
"pilot": {"value": 2.9, "unit": "mm", "rule": "M3, self-tapped", "kind": "community"},
|
|
5122
5352
|
"window": {"value": 44.5, "unit": "mm", "rule": "The motor's way through the plate: a NEMA 17 and 1.1 mm each side"},
|
|
5123
5353
|
"corner": {"value": 3, "unit": "mm", "rule": "Round the corners of the window"},
|
|
5124
5354
|
"beam_at": {"value": 27, "unit": "mm", "rule": "The two cross beams, between the hip motors: the motors take the space from 54 mm to the plate's end"},
|
|
@@ -5131,17 +5361,20 @@ Four legs, on a body two plates wide: a design exercise. The two side plates are
|
|
|
5131
5361
|
|
|
5132
5362
|
```js projects/leg/objects/side.js
|
|
5133
5363
|
// Two hubs and a spar, flat on the bed. Each hub is a window for a hip motor with the housing's three pilot holes round it.
|
|
5364
|
+
// The screws' holes are v.fixings': an M3 pilot for each of a housing's screws, and an M3 clearance hole for each of
|
|
5365
|
+
// the screws on into a beam's end.
|
|
5134
5366
|
import jscad from '@jscad/modeling'
|
|
5135
5367
|
const { cylinder, cuboid, roundedRectangle } = jscad.primitives
|
|
5136
5368
|
const { extrudeLinear } = jscad.extrusions
|
|
5137
5369
|
const { translate } = jscad.transforms
|
|
5138
5370
|
|
|
5139
5371
|
export function main (v) {
|
|
5372
|
+
const pilot = v.fixings.holeModel('M3', { kind: 'pilot' }).diameter, screw = v.fixings.holeModel('M3').diameter
|
|
5140
5373
|
const hubs = [-1, 1].map((s) => cylinder({ radius: v.hub, height: v.thick, center: [s * v.half, 0, v.thick / 2], segments: v.segments * 2 }))
|
|
5141
5374
|
const spar = cuboid({ size: [v.half * 2, v.spar, v.thick], center: [0, 0, v.thick / 2] })
|
|
5142
5375
|
const windows = [-1, 1].map((s) => translate([s * v.half, 0, 0], extrudeLinear({ height: v.thick + 1 }, roundedRectangle({ size: [v.window, v.window], roundRadius: v.corner, segments: v.segments }))))
|
|
5143
|
-
const feet = [-1, 1].flatMap((s) => [v.a1, v.a2, v.a3].map((a) => a * v.rad).map((a) => cylinder({ radius:
|
|
5144
|
-
const beams = [-1, 1].flatMap((x) => [-1, 1].map((s) => cylinder({ radius:
|
|
5376
|
+
const feet = [-1, 1].flatMap((s) => [v.a1, v.a2, v.a3].map((a) => a * v.rad).map((a) => cylinder({ radius: pilot / 2, height: v.thick + 1, center: [s * v.half + v.feet_r * Math.cos(a), 0 - v.feet_r * Math.sin(a), v.thick / 2], segments: v.segments })))
|
|
5377
|
+
const beams = [-1, 1].flatMap((x) => [-1, 1].map((s) => cylinder({ radius: screw / 2, height: v.thick + 1, center: [x * v.beam_at + s * v.beam_y, 0, v.thick / 2], segments: v.segments })))
|
|
5145
5378
|
return v.ops.subtract(v.ops.union(hubs, spar), windows, feet, beams)
|
|
5146
5379
|
}
|
|
5147
5380
|
```
|
|
@@ -5152,7 +5385,7 @@ export function main (v) {
|
|
|
5152
5385
|
"name": "beam",
|
|
5153
5386
|
"title": "Body cross beam",
|
|
5154
5387
|
"version": "0.1.0",
|
|
5155
|
-
"uses": ["x1c", "leg"
|
|
5388
|
+
"uses": ["x1c", "leg"],
|
|
5156
5389
|
"engine": "manifold",
|
|
5157
5390
|
"orientation": "Flat on one side, its screw holes along the bed: each hole a teardrop",
|
|
5158
5391
|
"description": "A beam across the body between the side plates: it holds them square against the legs' push. Three of them, screwed in through the plates.",
|
|
@@ -5164,8 +5397,7 @@ export function main (v) {
|
|
|
5164
5397
|
"long": {"value": "leg.body_w * 2 - leg.side_t * 2", "unit": "mm", "rule": "Between the two side plates' inner faces"},
|
|
5165
5398
|
"deep": {"value": 46, "unit": "mm", "rule": "Across the body's length: its two screws at each end, plus room, and clear of the hip motors"},
|
|
5166
5399
|
"wide": {"value": 12, "unit": "mm", "rule": "Thick: 25 layers of stiffness for the side plates to pull on"},
|
|
5167
|
-
"
|
|
5168
|
-
"pilot_len": {"value": 12, "unit": "mm", "rule": "For an M3 × 16 through a side plate"},
|
|
5400
|
+
"pilot_len": {"value": 12, "unit": "mm", "rule": "Each end's pilot depth, for the screw through the side plate"},
|
|
5169
5401
|
"screw_y": {"value": 16, "unit": "mm", "rule": "The two screws at each end"},
|
|
5170
5402
|
"segments": {"value": 32, "rule": "Round enough"}
|
|
5171
5403
|
}
|
|
@@ -5174,12 +5406,14 @@ export function main (v) {
|
|
|
5174
5406
|
|
|
5175
5407
|
```js projects/leg/objects/beam.js
|
|
5176
5408
|
// A flat bar with two teardrop pilot holes in each end.
|
|
5409
|
+
// The pilots are v.fixings' M3 pilots, lying on their sides: the side plates' screws cut their thread in them.
|
|
5177
5410
|
import jscad from '@jscad/modeling'
|
|
5178
5411
|
const { cuboid } = jscad.primitives
|
|
5179
5412
|
|
|
5180
5413
|
export function main (v) {
|
|
5414
|
+
const pilot = v.fixings.holeModel('M3', { kind: 'pilot', into: '+x' }).diameter
|
|
5181
5415
|
const bar = cuboid({ size: [v.long, v.deep, v.wide], center: [0, 0, v.wide / 2] })
|
|
5182
|
-
const holes = [1, -1].flatMap((end) => [-1, 1].map((s) => v.shapes.teardropHole({ d:
|
|
5416
|
+
const holes = [1, -1].flatMap((end) => [-1, 1].map((s) => v.shapes.teardropHole({ d: pilot, length: v.pilot_len + 1, at: [end * (v.long / 2 + 1), s * v.screw_y, v.wide / 2], into: end > 0 ? '-x' : '+x' })))
|
|
5183
5417
|
return v.ops.subtract(bar, holes)
|
|
5184
5418
|
}
|
|
5185
5419
|
```
|
|
@@ -5407,17 +5641,55 @@ The quadruped carries the leg's parts, every one, as items of a single assembly.
|
|
|
5407
5641
|
{"sun": "br_sun", "carrier": "br_carrier", "ring": "br_housing", "planets": ["br_p1", "br_p2", "br_p3"], "drive": "sun", "module": 1, "teeth": [18,18,54], "output": {"ring": "br_output", "planet": 21, "teeth": 57}},
|
|
5408
5642
|
{"sun": "br_esun", "carrier": "br_ecarrier", "ring": "br_ering", "planets": ["br_ep1", "br_ep2", "br_ep3"], "drive": "sun", "module": 1, "teeth": [18,18,54], "output": {"ring": "br_eoutput", "planet": 21, "teeth": 57}}
|
|
5409
5643
|
],
|
|
5644
|
+
"fasten": [
|
|
5645
|
+
{"screw": "M3 cap", "through": ["fl_housing"], "into": "left", "at": ["fl_housing.f1", "fl_housing.f2", "fl_housing.f3"], "note": "The fl housing on the left side plate"},
|
|
5646
|
+
{"screw": "M3 cap", "through": ["fl_bridge"], "into": "fl_housing", "at": ["fl_bridge.s1", "fl_bridge.s2", "fl_bridge.s3"], "note": "The fl bridge on the housing's posts"},
|
|
5647
|
+
{"screw": "M3 countersunk", "through": ["fl_spindle"], "into": "fl_output", "at": ["fl_spindle.b1", "fl_spindle.b2", "fl_spindle.b3", "fl_spindle.b4"], "note": "The fl spindle on the hip's output, its heads flush under the bridge"},
|
|
5648
|
+
{"screw": "M3 cap", "through": ["fl_thigh"], "into": "fl_spindle", "at": ["fl_thigh.hub"], "note": "The fl thigh clamped down on the spindle's hexagon"},
|
|
5649
|
+
{"screw": "M3 cap", "through": ["fl_clip1"], "into": "fl_thigh", "at": ["fl_clip1.post"], "note": "A clip on its post"},
|
|
5650
|
+
{"screw": "M3 cap", "through": ["fl_clip2"], "into": "fl_thigh", "at": ["fl_clip2.post"], "note": "A clip on its post"},
|
|
5651
|
+
{"screw": "M3 cap", "through": ["fl_clip3"], "into": "fl_thigh", "at": ["fl_clip3.post"], "note": "A clip on its post"},
|
|
5652
|
+
{"screw": "M3 cap", "through": ["fl_shin"], "into": "fl_eoutput", "at": ["fl_shin.b1", "fl_shin.b2", "fl_shin.b3", "fl_shin.b4"], "note": "The fl shin on the knee's output"},
|
|
5653
|
+
{"screw": "M3 cap", "through": ["fr_housing"], "into": "right", "at": ["fr_housing.f1", "fr_housing.f2", "fr_housing.f3"], "note": "The fr housing on the right side plate"},
|
|
5654
|
+
{"screw": "M3 cap", "through": ["fr_bridge"], "into": "fr_housing", "at": ["fr_bridge.s1", "fr_bridge.s2", "fr_bridge.s3"], "note": "The fr bridge on the housing's posts"},
|
|
5655
|
+
{"screw": "M3 countersunk", "through": ["fr_spindle"], "into": "fr_output", "at": ["fr_spindle.b1", "fr_spindle.b2", "fr_spindle.b3", "fr_spindle.b4"], "note": "The fr spindle on the hip's output, its heads flush under the bridge"},
|
|
5656
|
+
{"screw": "M3 cap", "through": ["fr_thigh"], "into": "fr_spindle", "at": ["fr_thigh.hub"], "note": "The fr thigh clamped down on the spindle's hexagon"},
|
|
5657
|
+
{"screw": "M3 cap", "through": ["fr_clip1"], "into": "fr_thigh", "at": ["fr_clip1.post"], "note": "A clip on its post"},
|
|
5658
|
+
{"screw": "M3 cap", "through": ["fr_clip2"], "into": "fr_thigh", "at": ["fr_clip2.post"], "note": "A clip on its post"},
|
|
5659
|
+
{"screw": "M3 cap", "through": ["fr_clip3"], "into": "fr_thigh", "at": ["fr_clip3.post"], "note": "A clip on its post"},
|
|
5660
|
+
{"screw": "M3 cap", "through": ["fr_shin"], "into": "fr_eoutput", "at": ["fr_shin.b1", "fr_shin.b2", "fr_shin.b3", "fr_shin.b4"], "note": "The fr shin on the knee's output"},
|
|
5661
|
+
{"screw": "M3 cap", "through": ["bl_housing"], "into": "left", "at": ["bl_housing.f1", "bl_housing.f2", "bl_housing.f3"], "note": "The bl housing on the left side plate"},
|
|
5662
|
+
{"screw": "M3 cap", "through": ["bl_bridge"], "into": "bl_housing", "at": ["bl_bridge.s1", "bl_bridge.s2", "bl_bridge.s3"], "note": "The bl bridge on the housing's posts"},
|
|
5663
|
+
{"screw": "M3 countersunk", "through": ["bl_spindle"], "into": "bl_output", "at": ["bl_spindle.b1", "bl_spindle.b2", "bl_spindle.b3", "bl_spindle.b4"], "note": "The bl spindle on the hip's output, its heads flush under the bridge"},
|
|
5664
|
+
{"screw": "M3 cap", "through": ["bl_thigh"], "into": "bl_spindle", "at": ["bl_thigh.hub"], "note": "The bl thigh clamped down on the spindle's hexagon"},
|
|
5665
|
+
{"screw": "M3 cap", "through": ["bl_clip1"], "into": "bl_thigh", "at": ["bl_clip1.post"], "note": "A clip on its post"},
|
|
5666
|
+
{"screw": "M3 cap", "through": ["bl_clip2"], "into": "bl_thigh", "at": ["bl_clip2.post"], "note": "A clip on its post"},
|
|
5667
|
+
{"screw": "M3 cap", "through": ["bl_clip3"], "into": "bl_thigh", "at": ["bl_clip3.post"], "note": "A clip on its post"},
|
|
5668
|
+
{"screw": "M3 cap", "through": ["bl_shin"], "into": "bl_eoutput", "at": ["bl_shin.b1", "bl_shin.b2", "bl_shin.b3", "bl_shin.b4"], "note": "The bl shin on the knee's output"},
|
|
5669
|
+
{"screw": "M3 cap", "through": ["br_housing"], "into": "right", "at": ["br_housing.f1", "br_housing.f2", "br_housing.f3"], "note": "The br housing on the right side plate"},
|
|
5670
|
+
{"screw": "M3 cap", "through": ["br_bridge"], "into": "br_housing", "at": ["br_bridge.s1", "br_bridge.s2", "br_bridge.s3"], "note": "The br bridge on the housing's posts"},
|
|
5671
|
+
{"screw": "M3 countersunk", "through": ["br_spindle"], "into": "br_output", "at": ["br_spindle.b1", "br_spindle.b2", "br_spindle.b3", "br_spindle.b4"], "note": "The br spindle on the hip's output, its heads flush under the bridge"},
|
|
5672
|
+
{"screw": "M3 cap", "through": ["br_thigh"], "into": "br_spindle", "at": ["br_thigh.hub"], "note": "The br thigh clamped down on the spindle's hexagon"},
|
|
5673
|
+
{"screw": "M3 cap", "through": ["br_clip1"], "into": "br_thigh", "at": ["br_clip1.post"], "note": "A clip on its post"},
|
|
5674
|
+
{"screw": "M3 cap", "through": ["br_clip2"], "into": "br_thigh", "at": ["br_clip2.post"], "note": "A clip on its post"},
|
|
5675
|
+
{"screw": "M3 cap", "through": ["br_clip3"], "into": "br_thigh", "at": ["br_clip3.post"], "note": "A clip on its post"},
|
|
5676
|
+
{"screw": "M3 cap", "through": ["br_shin"], "into": "br_eoutput", "at": ["br_shin.b1", "br_shin.b2", "br_shin.b3", "br_shin.b4"], "note": "The br shin on the knee's output"},
|
|
5677
|
+
{"screw": "M3 cap", "through": ["left"], "into": "beam1", "holes": "left", "note": "A beam on two screws through the left side plate"},
|
|
5678
|
+
{"screw": "M3 cap", "through": ["right"], "into": "beam1", "holes": "right", "note": "A beam on two screws through the right side plate"},
|
|
5679
|
+
{"screw": "M3 cap", "through": ["left"], "into": "beam2", "holes": "left", "note": "The other beam on two screws through the left side plate"},
|
|
5680
|
+
{"screw": "M3 cap", "through": ["right"], "into": "beam2", "holes": "right", "note": "The other beam on two screws through the right side plate"}
|
|
5681
|
+
],
|
|
5410
5682
|
"fits": [
|
|
5411
|
-
{"a": "beam1", "b": "left", "
|
|
5412
|
-
{"a": "beam1", "b": "right", "
|
|
5413
|
-
{"a": "beam2", "b": "left", "
|
|
5414
|
-
{"a": "beam2", "b": "right", "
|
|
5683
|
+
{"a": "beam1", "b": "left", "min": 0, "note": "A beam, on two screws through each side plate"},
|
|
5684
|
+
{"a": "beam1", "b": "right", "min": 0},
|
|
5685
|
+
{"a": "beam2", "b": "left", "min": 0},
|
|
5686
|
+
{"a": "beam2", "b": "right", "min": 0},
|
|
5415
5687
|
{"a": "fl_m1", "b": "fl_housing", "fastens": true, "min": -0.1},
|
|
5416
5688
|
{"a": "fl_m1", "b": "fl_sun", "shaft": true},
|
|
5417
5689
|
{"a": "fl_m2", "b": "fl_esun", "shaft": true},
|
|
5418
5690
|
{"a": "fl_m2", "b": "fl_thigh", "fastens": true, "min": -0.1},
|
|
5419
|
-
{"a": "fl_housing", "b": "left", "
|
|
5420
|
-
{"a": "fl_bridge", "b": "fl_housing", "
|
|
5691
|
+
{"a": "fl_housing", "b": "left", "min": 0},
|
|
5692
|
+
{"a": "fl_bridge", "b": "fl_housing", "min": 0},
|
|
5421
5693
|
{"a": "fl_b1", "b": "fl_bridge", "seat": "press"},
|
|
5422
5694
|
{"a": "fl_ecarrier", "b": "fl_ering", "min": -1},
|
|
5423
5695
|
{"a": "fl_pad", "b": "fl_shin", "min": -2},
|
|
@@ -5425,8 +5697,8 @@ The quadruped carries the leg's parts, every one, as items of a single assembly.
|
|
|
5425
5697
|
{"a": "fr_m1", "b": "fr_sun", "shaft": true},
|
|
5426
5698
|
{"a": "fr_m2", "b": "fr_esun", "shaft": true},
|
|
5427
5699
|
{"a": "fr_m2", "b": "fr_thigh", "fastens": true, "min": -0.1},
|
|
5428
|
-
{"a": "fr_housing", "b": "right", "
|
|
5429
|
-
{"a": "fr_bridge", "b": "fr_housing", "
|
|
5700
|
+
{"a": "fr_housing", "b": "right", "min": 0},
|
|
5701
|
+
{"a": "fr_bridge", "b": "fr_housing", "min": 0},
|
|
5430
5702
|
{"a": "fr_b1", "b": "fr_bridge", "seat": "press"},
|
|
5431
5703
|
{"a": "fr_ecarrier", "b": "fr_ering", "min": -1},
|
|
5432
5704
|
{"a": "fr_pad", "b": "fr_shin", "min": -2},
|
|
@@ -5434,8 +5706,8 @@ The quadruped carries the leg's parts, every one, as items of a single assembly.
|
|
|
5434
5706
|
{"a": "bl_m1", "b": "bl_sun", "shaft": true},
|
|
5435
5707
|
{"a": "bl_m2", "b": "bl_esun", "shaft": true},
|
|
5436
5708
|
{"a": "bl_m2", "b": "bl_thigh", "fastens": true, "min": -0.1},
|
|
5437
|
-
{"a": "bl_housing", "b": "left", "
|
|
5438
|
-
{"a": "bl_bridge", "b": "bl_housing", "
|
|
5709
|
+
{"a": "bl_housing", "b": "left", "min": 0},
|
|
5710
|
+
{"a": "bl_bridge", "b": "bl_housing", "min": 0},
|
|
5439
5711
|
{"a": "bl_b1", "b": "bl_bridge", "seat": "press"},
|
|
5440
5712
|
{"a": "bl_ecarrier", "b": "bl_ering", "min": -1},
|
|
5441
5713
|
{"a": "bl_pad", "b": "bl_shin", "min": -2},
|
|
@@ -5443,8 +5715,8 @@ The quadruped carries the leg's parts, every one, as items of a single assembly.
|
|
|
5443
5715
|
{"a": "br_m1", "b": "br_sun", "shaft": true},
|
|
5444
5716
|
{"a": "br_m2", "b": "br_esun", "shaft": true},
|
|
5445
5717
|
{"a": "br_m2", "b": "br_thigh", "fastens": true, "min": -0.1},
|
|
5446
|
-
{"a": "br_housing", "b": "right", "
|
|
5447
|
-
{"a": "br_bridge", "b": "br_housing", "
|
|
5718
|
+
{"a": "br_housing", "b": "right", "min": 0},
|
|
5719
|
+
{"a": "br_bridge", "b": "br_housing", "min": 0},
|
|
5448
5720
|
{"a": "br_b1", "b": "br_bridge", "seat": "press"},
|
|
5449
5721
|
{"a": "br_ecarrier", "b": "br_ering", "min": -1},
|
|
5450
5722
|
{"a": "br_pad", "b": "br_shin", "min": -2}
|
|
@@ -5675,17 +5947,55 @@ The quadruped carries the leg's parts, every one, as items of a single assembly.
|
|
|
5675
5947
|
{"sun": "br_sun", "carrier": "br_carrier", "ring": "br_housing", "planets": ["br_p1", "br_p2", "br_p3"], "drive": "sun", "module": 1, "teeth": [18,18,54], "output": {"ring": "br_output", "planet": 21, "teeth": 57}},
|
|
5676
5948
|
{"sun": "br_esun", "carrier": "br_ecarrier", "ring": "br_ering", "planets": ["br_ep1", "br_ep2", "br_ep3"], "drive": "sun", "module": 1, "teeth": [18,18,54], "output": {"ring": "br_eoutput", "planet": 21, "teeth": 57}}
|
|
5677
5949
|
],
|
|
5950
|
+
"fasten": [
|
|
5951
|
+
{"screw": "M3 cap", "through": ["fl_housing"], "into": "left", "at": ["fl_housing.f1", "fl_housing.f2", "fl_housing.f3"], "note": "The fl housing on the left side plate"},
|
|
5952
|
+
{"screw": "M3 cap", "through": ["fl_bridge"], "into": "fl_housing", "at": ["fl_bridge.s1", "fl_bridge.s2", "fl_bridge.s3"], "note": "The fl bridge on the housing's posts"},
|
|
5953
|
+
{"screw": "M3 countersunk", "through": ["fl_spindle"], "into": "fl_output", "at": ["fl_spindle.b1", "fl_spindle.b2", "fl_spindle.b3", "fl_spindle.b4"], "note": "The fl spindle on the hip's output, its heads flush under the bridge"},
|
|
5954
|
+
{"screw": "M3 cap", "through": ["fl_thigh"], "into": "fl_spindle", "at": ["fl_thigh.hub"], "note": "The fl thigh clamped down on the spindle's hexagon"},
|
|
5955
|
+
{"screw": "M3 cap", "through": ["fl_clip1"], "into": "fl_thigh", "at": ["fl_clip1.post"], "note": "A clip on its post"},
|
|
5956
|
+
{"screw": "M3 cap", "through": ["fl_clip2"], "into": "fl_thigh", "at": ["fl_clip2.post"], "note": "A clip on its post"},
|
|
5957
|
+
{"screw": "M3 cap", "through": ["fl_clip3"], "into": "fl_thigh", "at": ["fl_clip3.post"], "note": "A clip on its post"},
|
|
5958
|
+
{"screw": "M3 cap", "through": ["fl_shin"], "into": "fl_eoutput", "at": ["fl_shin.b1", "fl_shin.b2", "fl_shin.b3", "fl_shin.b4"], "note": "The fl shin on the knee's output"},
|
|
5959
|
+
{"screw": "M3 cap", "through": ["fr_housing"], "into": "right", "at": ["fr_housing.f1", "fr_housing.f2", "fr_housing.f3"], "note": "The fr housing on the right side plate"},
|
|
5960
|
+
{"screw": "M3 cap", "through": ["fr_bridge"], "into": "fr_housing", "at": ["fr_bridge.s1", "fr_bridge.s2", "fr_bridge.s3"], "note": "The fr bridge on the housing's posts"},
|
|
5961
|
+
{"screw": "M3 countersunk", "through": ["fr_spindle"], "into": "fr_output", "at": ["fr_spindle.b1", "fr_spindle.b2", "fr_spindle.b3", "fr_spindle.b4"], "note": "The fr spindle on the hip's output, its heads flush under the bridge"},
|
|
5962
|
+
{"screw": "M3 cap", "through": ["fr_thigh"], "into": "fr_spindle", "at": ["fr_thigh.hub"], "note": "The fr thigh clamped down on the spindle's hexagon"},
|
|
5963
|
+
{"screw": "M3 cap", "through": ["fr_clip1"], "into": "fr_thigh", "at": ["fr_clip1.post"], "note": "A clip on its post"},
|
|
5964
|
+
{"screw": "M3 cap", "through": ["fr_clip2"], "into": "fr_thigh", "at": ["fr_clip2.post"], "note": "A clip on its post"},
|
|
5965
|
+
{"screw": "M3 cap", "through": ["fr_clip3"], "into": "fr_thigh", "at": ["fr_clip3.post"], "note": "A clip on its post"},
|
|
5966
|
+
{"screw": "M3 cap", "through": ["fr_shin"], "into": "fr_eoutput", "at": ["fr_shin.b1", "fr_shin.b2", "fr_shin.b3", "fr_shin.b4"], "note": "The fr shin on the knee's output"},
|
|
5967
|
+
{"screw": "M3 cap", "through": ["bl_housing"], "into": "left", "at": ["bl_housing.f1", "bl_housing.f2", "bl_housing.f3"], "note": "The bl housing on the left side plate"},
|
|
5968
|
+
{"screw": "M3 cap", "through": ["bl_bridge"], "into": "bl_housing", "at": ["bl_bridge.s1", "bl_bridge.s2", "bl_bridge.s3"], "note": "The bl bridge on the housing's posts"},
|
|
5969
|
+
{"screw": "M3 countersunk", "through": ["bl_spindle"], "into": "bl_output", "at": ["bl_spindle.b1", "bl_spindle.b2", "bl_spindle.b3", "bl_spindle.b4"], "note": "The bl spindle on the hip's output, its heads flush under the bridge"},
|
|
5970
|
+
{"screw": "M3 cap", "through": ["bl_thigh"], "into": "bl_spindle", "at": ["bl_thigh.hub"], "note": "The bl thigh clamped down on the spindle's hexagon"},
|
|
5971
|
+
{"screw": "M3 cap", "through": ["bl_clip1"], "into": "bl_thigh", "at": ["bl_clip1.post"], "note": "A clip on its post"},
|
|
5972
|
+
{"screw": "M3 cap", "through": ["bl_clip2"], "into": "bl_thigh", "at": ["bl_clip2.post"], "note": "A clip on its post"},
|
|
5973
|
+
{"screw": "M3 cap", "through": ["bl_clip3"], "into": "bl_thigh", "at": ["bl_clip3.post"], "note": "A clip on its post"},
|
|
5974
|
+
{"screw": "M3 cap", "through": ["bl_shin"], "into": "bl_eoutput", "at": ["bl_shin.b1", "bl_shin.b2", "bl_shin.b3", "bl_shin.b4"], "note": "The bl shin on the knee's output"},
|
|
5975
|
+
{"screw": "M3 cap", "through": ["br_housing"], "into": "right", "at": ["br_housing.f1", "br_housing.f2", "br_housing.f3"], "note": "The br housing on the right side plate"},
|
|
5976
|
+
{"screw": "M3 cap", "through": ["br_bridge"], "into": "br_housing", "at": ["br_bridge.s1", "br_bridge.s2", "br_bridge.s3"], "note": "The br bridge on the housing's posts"},
|
|
5977
|
+
{"screw": "M3 countersunk", "through": ["br_spindle"], "into": "br_output", "at": ["br_spindle.b1", "br_spindle.b2", "br_spindle.b3", "br_spindle.b4"], "note": "The br spindle on the hip's output, its heads flush under the bridge"},
|
|
5978
|
+
{"screw": "M3 cap", "through": ["br_thigh"], "into": "br_spindle", "at": ["br_thigh.hub"], "note": "The br thigh clamped down on the spindle's hexagon"},
|
|
5979
|
+
{"screw": "M3 cap", "through": ["br_clip1"], "into": "br_thigh", "at": ["br_clip1.post"], "note": "A clip on its post"},
|
|
5980
|
+
{"screw": "M3 cap", "through": ["br_clip2"], "into": "br_thigh", "at": ["br_clip2.post"], "note": "A clip on its post"},
|
|
5981
|
+
{"screw": "M3 cap", "through": ["br_clip3"], "into": "br_thigh", "at": ["br_clip3.post"], "note": "A clip on its post"},
|
|
5982
|
+
{"screw": "M3 cap", "through": ["br_shin"], "into": "br_eoutput", "at": ["br_shin.b1", "br_shin.b2", "br_shin.b3", "br_shin.b4"], "note": "The br shin on the knee's output"},
|
|
5983
|
+
{"screw": "M3 cap", "through": ["left"], "into": "beam1", "holes": "left", "note": "A beam on two screws through the left side plate"},
|
|
5984
|
+
{"screw": "M3 cap", "through": ["right"], "into": "beam1", "holes": "right", "note": "A beam on two screws through the right side plate"},
|
|
5985
|
+
{"screw": "M3 cap", "through": ["left"], "into": "beam2", "holes": "left", "note": "The other beam on two screws through the left side plate"},
|
|
5986
|
+
{"screw": "M3 cap", "through": ["right"], "into": "beam2", "holes": "right", "note": "The other beam on two screws through the right side plate"}
|
|
5987
|
+
],
|
|
5678
5988
|
"fits": [
|
|
5679
|
-
{"a": "beam1", "b": "left", "
|
|
5680
|
-
{"a": "beam1", "b": "right", "
|
|
5681
|
-
{"a": "beam2", "b": "left", "
|
|
5682
|
-
{"a": "beam2", "b": "right", "
|
|
5989
|
+
{"a": "beam1", "b": "left", "min": 0, "note": "A beam, on two screws through each side plate"},
|
|
5990
|
+
{"a": "beam1", "b": "right", "min": 0},
|
|
5991
|
+
{"a": "beam2", "b": "left", "min": 0},
|
|
5992
|
+
{"a": "beam2", "b": "right", "min": 0},
|
|
5683
5993
|
{"a": "fl_m1", "b": "fl_housing", "fastens": true, "min": -0.1},
|
|
5684
5994
|
{"a": "fl_m1", "b": "fl_sun", "shaft": true},
|
|
5685
5995
|
{"a": "fl_m2", "b": "fl_esun", "shaft": true},
|
|
5686
5996
|
{"a": "fl_m2", "b": "fl_thigh", "fastens": true, "min": -0.1},
|
|
5687
|
-
{"a": "fl_housing", "b": "left", "
|
|
5688
|
-
{"a": "fl_bridge", "b": "fl_housing", "
|
|
5997
|
+
{"a": "fl_housing", "b": "left", "min": 0},
|
|
5998
|
+
{"a": "fl_bridge", "b": "fl_housing", "min": 0},
|
|
5689
5999
|
{"a": "fl_b1", "b": "fl_bridge", "seat": "press"},
|
|
5690
6000
|
{"a": "fl_ecarrier", "b": "fl_ering", "min": -1},
|
|
5691
6001
|
{"a": "fl_pad", "b": "fl_shin", "min": -2},
|
|
@@ -5693,8 +6003,8 @@ The quadruped carries the leg's parts, every one, as items of a single assembly.
|
|
|
5693
6003
|
{"a": "fr_m1", "b": "fr_sun", "shaft": true},
|
|
5694
6004
|
{"a": "fr_m2", "b": "fr_esun", "shaft": true},
|
|
5695
6005
|
{"a": "fr_m2", "b": "fr_thigh", "fastens": true, "min": -0.1},
|
|
5696
|
-
{"a": "fr_housing", "b": "right", "
|
|
5697
|
-
{"a": "fr_bridge", "b": "fr_housing", "
|
|
6006
|
+
{"a": "fr_housing", "b": "right", "min": 0},
|
|
6007
|
+
{"a": "fr_bridge", "b": "fr_housing", "min": 0},
|
|
5698
6008
|
{"a": "fr_b1", "b": "fr_bridge", "seat": "press"},
|
|
5699
6009
|
{"a": "fr_ecarrier", "b": "fr_ering", "min": -1},
|
|
5700
6010
|
{"a": "fr_pad", "b": "fr_shin", "min": -2},
|
|
@@ -5702,8 +6012,8 @@ The quadruped carries the leg's parts, every one, as items of a single assembly.
|
|
|
5702
6012
|
{"a": "bl_m1", "b": "bl_sun", "shaft": true},
|
|
5703
6013
|
{"a": "bl_m2", "b": "bl_esun", "shaft": true},
|
|
5704
6014
|
{"a": "bl_m2", "b": "bl_thigh", "fastens": true, "min": -0.1},
|
|
5705
|
-
{"a": "bl_housing", "b": "left", "
|
|
5706
|
-
{"a": "bl_bridge", "b": "bl_housing", "
|
|
6015
|
+
{"a": "bl_housing", "b": "left", "min": 0},
|
|
6016
|
+
{"a": "bl_bridge", "b": "bl_housing", "min": 0},
|
|
5707
6017
|
{"a": "bl_b1", "b": "bl_bridge", "seat": "press"},
|
|
5708
6018
|
{"a": "bl_ecarrier", "b": "bl_ering", "min": -1},
|
|
5709
6019
|
{"a": "bl_pad", "b": "bl_shin", "min": -2},
|
|
@@ -5711,8 +6021,8 @@ The quadruped carries the leg's parts, every one, as items of a single assembly.
|
|
|
5711
6021
|
{"a": "br_m1", "b": "br_sun", "shaft": true},
|
|
5712
6022
|
{"a": "br_m2", "b": "br_esun", "shaft": true},
|
|
5713
6023
|
{"a": "br_m2", "b": "br_thigh", "fastens": true, "min": -0.1},
|
|
5714
|
-
{"a": "br_housing", "b": "right", "
|
|
5715
|
-
{"a": "br_bridge", "b": "br_housing", "
|
|
6024
|
+
{"a": "br_housing", "b": "right", "min": 0},
|
|
6025
|
+
{"a": "br_bridge", "b": "br_housing", "min": 0},
|
|
5716
6026
|
{"a": "br_b1", "b": "br_bridge", "seat": "press"},
|
|
5717
6027
|
{"a": "br_ecarrier", "b": "br_ering", "min": -1},
|
|
5718
6028
|
{"a": "br_pad", "b": "br_shin", "min": -2}
|
|
@@ -5727,7 +6037,9 @@ npx cad list leg/quadruped
|
|
|
5727
6037
|
npx cad plates leg/quadruped
|
|
5728
6038
|
```
|
|
5729
6039
|
|
|
5730
|
-
The weight first, plainly: the shopping list says
|
|
6040
|
+
The weight first, plainly: the shopping list says 1470 g of printing, 1900 g of bought parts and 105 g of screws, 3474 g as a machine, before electronics. The 1.5 kg robot the leg was sized for does not exist: eight motors weigh 1880 g alone. So the robot is 3.8 kg (`leg.robot_mass`, with its electronics an `estimate` of about 0.4 kg, and the screws within that guess), and every number below is at that mass.
|
|
6041
|
+
|
|
6042
|
+
The screws are the stand's four times over, each chosen by `fasten`, with each hip's housing on its side plate (three M3x8) and the beams held by two M3x12 at each end: 24 M3x8 cap, 16 M3x8 countersunk, 12 M3x10, 40 M3x12 with the knee motors' own and 4 M3x16, and the hip motors' 16 M3x6.
|
|
5731
6043
|
|
|
5732
6044
|
Trot and crawl are run through their checks by `cad check leg/quadruped --json` and `cad check leg/crawl --json`: they take several minutes each, so the replay here leaves them out; run them yourself. What they said when this chapter was written (quasi-static, a design, nothing built):
|
|
5733
6045
|
|