@rulecad/cad 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +45 -16
- package/CHANGELOG.md +724 -0
- package/EXAMPLES.md +61 -54
- package/README.md +376 -98
- package/TUTORIAL.md +2 -2
- package/bin/cad.mjs +2664 -541
- package/lib/animate.mjs +173 -49
- package/lib/assembly.mjs +1883 -435
- package/lib/beams.mjs +256 -52
- package/lib/belts.mjs +66 -15
- package/lib/board-work.mjs +12 -0
- package/lib/bought.mjs +309 -53
- package/lib/buildpage.mjs +179 -29
- package/lib/cache-file.mjs +105 -0
- package/lib/carried.mjs +201 -0
- package/lib/clone.mjs +194 -42
- package/lib/code-text.mjs +28 -0
- package/lib/design-imports.mjs +127 -0
- package/lib/design.mjs +871 -147
- package/lib/designshapes.mjs +142 -0
- package/lib/drive.mjs +187 -63
- package/lib/edit.mjs +922 -192
- package/lib/errors.mjs +16 -3
- package/lib/estimates.mjs +51 -0
- package/lib/explain.mjs +62 -13
- package/lib/fasten.mjs +2708 -507
- package/lib/fe-key.mjs +29 -0
- package/lib/fittings.mjs +721 -122
- package/lib/fixings.mjs +38 -13
- package/lib/framebuild.mjs +790 -175
- package/lib/framecheck.mjs +1901 -368
- package/lib/framegen.mjs +108 -22
- package/lib/frameheat.mjs +225 -42
- package/lib/frameprint.mjs +513 -108
- package/lib/frames.mjs +86 -18
- package/lib/framesize.mjs +719 -120
- package/lib/frametip.mjs +235 -0
- package/lib/gait.mjs +135 -23
- package/lib/grip.mjs +62 -13
- package/lib/guides.mjs +1403 -230
- package/lib/host.mjs +129 -23
- package/lib/inplace.mjs +171 -36
- package/lib/jigs.mjs +360 -78
- package/lib/joins.mjs +697 -118
- package/lib/jsonedit.mjs +88 -26
- package/lib/kept.mjs +84 -0
- package/lib/kit.mjs +439 -69
- package/lib/layout.mjs +2 -1
- package/lib/links.mjs +149 -42
- package/lib/list.mjs +334 -64
- package/lib/live-guard.mjs +68 -0
- package/lib/live-shape.mjs +96 -24
- package/lib/live.mjs +189 -59
- package/lib/loads.mjs +597 -136
- package/lib/machine.mjs +372 -74
- package/lib/magnets.mjs +162 -44
- package/lib/measured.mjs +1080 -117
- package/lib/mesh.mjs +526 -119
- package/lib/meshcmd.mjs +215 -60
- package/lib/motors.mjs +1002 -214
- package/lib/motorsvg.mjs +114 -32
- package/lib/names.mjs +18 -1
- package/lib/optimise.mjs +991 -287
- package/lib/order.mjs +515 -114
- package/lib/panels.mjs +482 -94
- package/lib/parts.mjs +81 -23
- package/lib/pins.mjs +163 -44
- package/lib/plates.mjs +223 -35
- package/lib/player.mjs +37 -9
- package/lib/power.mjs +64 -13
- package/lib/preview.mjs +83 -16
- package/lib/profilemeasure.mjs +572 -129
- package/lib/rules.mjs +17 -6
- package/lib/sandbox-hooks.mjs +179 -27
- package/lib/sandbox-lock.mjs +225 -0
- package/lib/sandbox-preload.mjs +2 -2
- package/lib/sandbox-run.mjs +122 -25
- package/lib/sandbox.mjs +667 -75
- package/lib/schema.mjs +42 -11
- package/lib/seats.mjs +227 -49
- package/lib/services.mjs +261 -52
- package/lib/sheet.mjs +963 -179
- package/lib/slotnuts.mjs +213 -34
- package/lib/targets/gist.mjs +4 -1
- package/lib/targets.mjs +22 -4
- package/lib/task.mjs +376 -79
- package/lib/versions.mjs +285 -39
- package/lib/wires.mjs +228 -45
- package/lib/workspace.mjs +200 -14
- package/package.json +19 -19
- package/schemas/assembly.schema.json +2 -2
- package/schemas/project.schema.json +6 -0
- package/templates/coupons/MEASURE.md +109 -0
- package/templates/coupons/assemblies/fixings-test.json +20 -0
- package/templates/coupons/assemblies/slot-test.json +11 -0
- package/templates/coupons/objects/fixings-coupon.js +88 -0
- package/templates/coupons/objects/fixings-coupon.json +26 -0
- package/templates/coupons/objects/holds-coupon.js +130 -0
- package/templates/coupons/objects/holds-coupon.json +42 -0
- package/templates/coupons/objects/slot-coupon.js +89 -0
- package/templates/coupons/objects/slot-coupon.json +29 -0
- package/templates/coupons/project.json +10 -0
package/EXAMPLES.md
CHANGED
|
@@ -284,7 +284,7 @@ npx cad check home/arm
|
|
|
284
284
|
|
|
285
285
|
`optimise` draws the layout in `.preview/` and reports how far the load moves; the result is kept until the problem
|
|
286
286
|
or the solver changes. `check` analyses the part as drawn, on cells half the size and again a quarter bigger, and says
|
|
287
|
-
whether the stiffness has settled.
|
|
287
|
+
whether the stiffness has settled (and, with `min_safety`, the peak stress).
|
|
288
288
|
|
|
289
289
|
## 6. A board, and a case that reads it
|
|
290
290
|
|
|
@@ -481,10 +481,14 @@ export function main (v) {
|
|
|
481
481
|
```
|
|
482
482
|
|
|
483
483
|
```sh
|
|
484
|
-
npx cad check home/flick
|
|
484
|
+
npx cad check home/flick # warns: the gap rests on x1c.print_gap, an estimate
|
|
485
485
|
npx cad animate home/flick
|
|
486
486
|
```
|
|
487
487
|
|
|
488
|
+
The check warns that the design rests on an estimate: `x1c.print_gap`, the gap that prints apart, is the printer's
|
|
489
|
+
best guess until a test print measures it. A warning never fails the check; `cad measured` settles the figure once you
|
|
490
|
+
have printed the part and measured it.
|
|
491
|
+
|
|
488
492
|
`animate` writes the sequence as an animated SVG in `.preview/`, the leaf drawn bent, and a page that plays it with
|
|
489
493
|
the force on each step. The launcher in `examples/bench/projects/launcher` is the same idea at full size: a flooded
|
|
490
494
|
frame, catches, a trigger, and a shot.
|
|
@@ -2789,8 +2793,9 @@ it without `--json` and read them. What it says:
|
|
|
2789
2793
|
- `m1 into out` gives 7.3 times the 0.22 N m the task asks at the shoulder, at the 0.5 A chosen, and `m2 into elbow` 20
|
|
2790
2794
|
times its 0.08 N m, both at 300 rpm on the supply's 12 V. (On 24 V, with a NEMA 14 at the elbow and 0.2 N m asked at
|
|
2791
2795
|
the shoulder, they were 8.4 and 17.7 times.) Both joints hold with the power off: 38:1 at 47% can't be driven backwards.
|
|
2792
|
-
- `motor.accel` and `task.time`: the 12 V torque
|
|
2793
|
-
times the 500 the task plans, so a move across the sheet takes 5.24 s
|
|
2796
|
+
- `motor.accel` and `task.time`: what the 12 V torque leaves once the declared shoulder and elbow torques are held still
|
|
2797
|
+
accelerates the pen at up to 5088 mm/s², ten times the 500 the task plans, so a move across the sheet takes 5.24 s:
|
|
2798
|
+
the speed sets it, not the torque.
|
|
2794
2799
|
- 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`,
|
|
2795
2800
|
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
|
|
2796
2801
|
(M3x8 into the base's columns, M3x10 into the posts, M3x8 countersunk into the output's flange, M3x12 into the elbow's,
|
|
@@ -2828,22 +2833,18 @@ The task is a box of points in front of the arm, 80 mm deep and 120 mm tall, wit
|
|
|
2828
2833
|
|
|
2829
2834
|
| | Drawing (chapter 12) | Lifting (this chapter) |
|
|
2830
2835
|
|---|---|---|
|
|
2831
|
-
| Load on the shoulder | 0.22 N m of pen drag, inertia and bias, no gravity |
|
|
2832
|
-
| Shoulder motor at 0.5 A, 12 V | 7.3 times over | 1.
|
|
2833
|
-
| Current | 0.5 A a coil | 0.8 A a coil for the shoulder, 2.
|
|
2836
|
+
| Load on the shoulder | 0.22 N m of pen drag, inertia and bias, no gravity | 0.99 N m, the arm's own weight and 100 g, at the worst of its range |
|
|
2837
|
+
| Shoulder motor at 0.5 A, 12 V | 7.3 times over | 1.6 times over: under the 2 times the check asks for |
|
|
2838
|
+
| Current | 0.5 A a coil | 0.8 A a coil for the shoulder, 2.6 times over; the elbow stays at 0.5 A |
|
|
2834
2839
|
| What the links do | 0.3 N of drag sideways, about 0.02 mm | 6.6 N of weight in their plane: the tool drops 2.1 mm, the biggest term in the budget |
|
|
2835
2840
|
| What the 6800 sees | The pen's drag | 0.189 N m of tipping and 6.6 N across it: 33 N equivalent, against 925 N |
|
|
2836
2841
|
| The budget | 0.3 mm | 2.5 mm: a gripper, not a pen |
|
|
2837
2842
|
|
|
2838
|
-
The shoulder has to hold the arm up, and the way to read that is the worst pose: the arm stretched forward with its elbow up, the tool at the box's far side, the masses all as far out as they get. `motor.torque` looks at each loaded joint with its motor run through its range, and at each pose of the assembly. The assembly is drawn in that far pose (named `reach`), so that sweep passes through it. The shoulder needs
|
|
2839
|
-
|
|
2840
|
-
Why 0.8 A and not more. Chapter 12 set the current from what the arm has to do, and the same reasoning sets it here: the shoulder gives 3.2 N m an amp at 300 rpm on 12 V, so 0.72 A is the least that keeps it over the check's 2 times, and 0.8 A rounds that up. It also sets what the arm can do to itself when it stalls: at 0.8 A the shoulder can give about 3.8 N m stalled, and that is 19 MPa of shear in the spindle's printed 10 mm shaft, against PLA's 22. At 1 A the torque would be 2.8 times over, but stalled it would put about 4.8 N m on the output, 24 MPa, past PLA's 22: the shaft would break before the motor slipped. Set the shoulder's trimmer to 0.4 V (0.8 A) and the elbow's to 0.25 V, the way chapter 12 says. The machine draws 0.64 A from the 12 V supply, so the same 1.5 A limit covers it. A person running this arm at 0.8 A should print the spindle in PETG or put a steel shaft through it. That is the first thing that changes in the parts, and it's the sort of number a check can't fix for you.
|
|
2843
|
+
The shoulder has to hold the arm up, and the way to read that is the worst pose: the arm stretched forward with its elbow up, the tool at the box's far side, the masses all as far out as they get. `motor.torque` looks at each loaded joint with its motor run through its range, and at each pose of the assembly. The assembly is drawn in that far pose (named `reach`), so that sweep passes through it. The shoulder needs 0.993 N m and has 2.56 N m at 0.8 A on 12 V through the 38:1 gearbox: 2.58 times over. The kit's other torque figure, `motor.accel`, is worked out across all the box's sampled points: at the worst of them there is still 0.089 N m left at the motor to accelerate with.
|
|
2841
2844
|
|
|
2842
|
-
|
|
2845
|
+
Why 0.8 A and not more. Chapter 12 set the current from what the arm has to do, and the same reasoning sets it here: the shoulder gives 3.2 N m an amp at 300 rpm on 12 V, so 0.62 A is the least that keeps it over the check's 2 times, and 0.8 A leaves room over that for the gearbox parts the check cannot weigh (below). It also sets what the arm can do to itself when it stalls: at 0.8 A the shoulder can give about 3.8 N m stalled, and that is 19 MPa of shear in the spindle's printed 10 mm shaft, against PLA's 22. At 1 A the torque would be 3.2 times over, but stalled it would put about 4.8 N m on the output, 24 MPa, past PLA's 22: the shaft would break before the motor slipped. Set the shoulder's trimmer to 0.4 V (0.8 A) and the elbow's to 0.25 V, the way chapter 12 says. The machine draws 0.64 A from the 12 V supply, so the same 1.5 A limit covers it. A person running this arm at 0.8 A should print the spindle in PETG or put a steel shaft through it. That is the first thing that changes in the parts, and it's the sort of number a check can't fix for you.
|
|
2843
2846
|
|
|
2844
|
-
|
|
2845
|
-
- `lift.fore_mass` 0.07 kg at `forearm.cable`, about halfway along the forearm: the forearm and the elbow's output gear.
|
|
2846
|
-
- `lift.tool_mass` 0.148 kg at `gripper.tool`: the gripper, its servo and the 100 g payload.
|
|
2847
|
+
The motor checks weigh the arm as it is drawn, so the assembly declares no masses of its own: the printed parts by their volume and PLA's density, and the bought parts (the elbow's 17HS4401 among them) by the mass their rule sets give, 574 g beyond the shoulder and 107 g beyond the elbow, with the task's 100 g payload at the tool. Each motor finding says what it counted (`counted: the parts' own 574 g, 100 g of payload, gravity along [0, 0, -1]`). The gearbox parts whose rule sets give no mass (`joint.moment.mass` names them) weigh nothing there, so the figures are a little under the real arm's: that is what the margin over 2 times is for. The masses in `rules/lift.json` (`lift.upper_mass`, `lift.fore_mass`, `lift.tool_mass`) are the same weights worked out by hand, kept to compare against; declaring them in `"loads"` as well would count the arm twice.
|
|
2847
2848
|
|
|
2848
2849
|
### Holding it with the power off
|
|
2849
2850
|
|
|
@@ -2852,11 +2853,11 @@ The loads are written in the assembly as three masses at anchors, from the mass
|
|
|
2852
2853
|
| Real efficiency | Backward efficiency | Back at the motor | Against the 0.025 N m detent |
|
|
2853
2854
|
|---|---|---|---|
|
|
2854
2855
|
| 47% (the estimate) | under 0 | 0, it can't turn backwards | holds |
|
|
2855
|
-
| 60% | 33% | 0.
|
|
2856
|
-
| 75% | 67% | 0.
|
|
2857
|
-
| 85% | 82% | 0.
|
|
2856
|
+
| 60% | 33% | 0.009 N m | holds, 2.9 times over |
|
|
2857
|
+
| 75% | 67% | 0.017 N m | holds, 1.4 times over |
|
|
2858
|
+
| 85% | 82% | 0.022 N m | holds, 1.2 times over: near the edge |
|
|
2858
2859
|
|
|
2859
|
-
The back torque there is the shoulder's
|
|
2860
|
+
The back torque there is the shoulder's 0.993 N m worst load through 38:1, times the backward efficiency: the motor's own detent torque, 0.025 N m (the catalogue's figure, an `estimate`), carries it even if the gears run much freer than anything printed is likely to. The elbow, 0.196 N m through the same box against the 17HS4401's 0.025 N m detent, holds by the same arithmetic nearly six times over at 85%: the bigger motor's detent leaves more in hand there than the NEMA 14's 0.008 N m did.
|
|
2860
2861
|
|
|
2861
2862
|
Three things could hold the arm with the power off: the gears' friction, a counter-spring, or a brake. A counter-spring from `@rulecad/flexures` is the usual way to take gravity off a shoulder, and it earns its place when a joint is back-drivable; it would cost a leaf spring strong enough for a newton metre across 90° of swing, a large part, for a joint that already holds. A brake is a bought part and a coil to wire for a problem the gears already solve. So the chapter chooses friction, marks it `estimate`, and bench test 14 in `examples/bench/projects/benchmarks/MEASURE.md` (the gearbox's play, measured at both directions) is where a person learns whether the efficiency is what the figures assume.
|
|
2862
2863
|
|
|
@@ -3544,11 +3545,6 @@ The project lists the new objects:
|
|
|
3544
3545
|
{ "id": "home2", "from": "es2.left", "to": "shield.Y", "via": ["upper.cable", "base.cable"], "gauge": "awg26", "colour": "white, black", "conductors": 2, "connectors": ["Crimped spade", "Y limit and GND"] },
|
|
3545
3546
|
{ "id": "power", "from": "psu.terminals", "to": "shield.top", "gauge": "awg22", "colour": "red, black", "conductors": 2, "current": 2, "connectors": ["Ring terminal", "Screw terminal"], "note": "12 V from the bench supply, its current limit at 1.5 A, into the shield's motor terminals" }
|
|
3546
3547
|
],
|
|
3547
|
-
"loads": [
|
|
3548
|
-
{ "mass": "lift.upper_mass", "at": "upper.elbow", "note": "The upper arm, the elbow's gears and its motor, worst placed at the elbow" },
|
|
3549
|
-
{ "mass": "lift.fore_mass", "at": "forearm.cable", "note": "The forearm and the elbow's output gear, about half along" },
|
|
3550
|
-
{ "mass": "lift.tool_mass", "at": "gripper.tool", "note": "The gripper, its servo and the payload" }
|
|
3551
|
-
],
|
|
3552
3548
|
"task": { "tool": "gripper.tool", "volume": { "x": [170, 250], "y": [-56.6, -56.6], "z": [-60, 60] }, "accuracy": 2.5, "accel": 300, "elbow": "left", "payload": "lift.payload", "grip": { "material": "petg", "servo": "gservo", "horn": "lift.grip_horn", "leaf": { "length": "lift.leaf_l", "thickness": "lift.leaf_t", "width": "lift.leaf_w" }, "travel": "lift.grip_travel", "friction": "lift.friction", "lever": "lift.grip_lever" } },
|
|
3553
3549
|
"poses": { "reach": { "drive": -1269.4, "edrive": -2679.6, "squeeze": 0 } }
|
|
3554
3550
|
}
|
|
@@ -3750,7 +3746,7 @@ Lifting wants a Z, the tool up and down, and on a flat arm a Z is the only way t
|
|
|
3750
3746
|
| What it leaves unchanged | The arm's links and joints, calibrated as they are | Nothing |
|
|
3751
3747
|
| The choice | Wrist: it lifts a fifth of the mass and needs no new structure | |
|
|
3752
3748
|
|
|
3753
|
-
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
|
|
3749
|
+
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 3.2 N, the carriage's own 76 g with it. 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), 4.85 times over.
|
|
3754
3750
|
|
|
3755
3751
|
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.
|
|
3756
3752
|
|
|
@@ -4304,9 +4300,9 @@ The commands. The checks that print what they find are written with `--json` whe
|
|
|
4304
4300
|
|
|
4305
4301
|
```sh
|
|
4306
4302
|
npx cad check arm/gripper
|
|
4307
|
-
npx cad check arm/ghorn
|
|
4303
|
+
npx cad check arm/ghorn # warns: the horn's reach is an estimate
|
|
4308
4304
|
npx cad check arm/zframe
|
|
4309
|
-
npx cad check arm/zcar
|
|
4305
|
+
npx cad check arm/zcar # warns: it reads x1c.press, an estimate
|
|
4310
4306
|
npx cad check arm/arm-upright --json
|
|
4311
4307
|
npx cad check arm/gripper-check --json
|
|
4312
4308
|
npx cad check arm/arm-z --json
|
|
@@ -4317,13 +4313,13 @@ npx cad list arm/arm-upright
|
|
|
4317
4313
|
|
|
4318
4314
|
What it says:
|
|
4319
4315
|
|
|
4320
|
-
- `motor.torque` passes at 2.
|
|
4316
|
+
- `motor.torque` passes at 2.58 and 8.18 times over at the worst of each joint's range, on 12 V, counting the arm's parts as drawn and the 100 g payload; the shoulder needs 0.8 A here, not chapter 12's 0.5, and both figures rest on the catalogue's community motor figures, an estimate until measured.
|
|
4321
4317
|
- `motor.holds` passes both joints with the power off, on the gears' 47% (an estimate): the table above says how much that figure can rise before it stops being true, and the detent torque carries it by a wide margin.
|
|
4322
4318
|
- `joint.moment` gives the shoulder's 6800 28 times over (38 with the lighter NEMA 14), the elbow's clips 35. They aren't the limits; the arm's sag is.
|
|
4323
4319
|
- `link.deflection` gives 2.1 mm at full stretch from coarse FE on the whole link, an `estimate` (see above), 1.8 mm with the NEMA 14: the elbow motor's 90 g more bends the upper arm. It's the largest error in the stack, and `task.accuracy` warns at 2.36 mm worst case against the 2.5 mm budget (2.08 before).
|
|
4324
4320
|
- `task.reach` passes with 48.9 mm in hand.
|
|
4325
4321
|
- `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`).
|
|
4326
|
-
- The Z axis gives 512 steps a mm, 15.5 N of force at
|
|
4322
|
+
- The Z axis gives 512 steps a mm, 15.5 N of force at 4.85 times over the 3.2 N it lifts (the 250 g load and the carriage's own 76 g), and holds with the power off because of the motor's gearbox. The belt gives 102.4 steps a mm and 5.1 N against the same 3.2 N, 1.6 times over: under the 2 times the check asks for, so `motor.torque` warns, and the screw is the axis to build. Its 0.07 mm of stretch is in the budget.
|
|
4327
4323
|
- `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.
|
|
4328
4324
|
- `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. To buy: the 6800, the two switches, the screws and the wire; in hand: the two 17HS4401s, the drivers, the shield, the bench supply and the one SG90. The whole machine weighs about 1.05 kg before the wires and the wall (the supply, the drivers and the shield have no mass in their sets).
|
|
4329
4325
|
|
|
@@ -6384,13 +6380,13 @@ What the check says, screw by screw:
|
|
|
6384
6380
|
bottoming out), M3x8 cap for the insert, M3x16 countersunk for the nuts.
|
|
6385
6381
|
- `fasten.engagement`: 6.6 mm of thread in PLA where `m3.pilot_depth` asks 5 mm; 4.6 mm in the insert, where
|
|
6386
6382
|
`fixings.insert_engagement` asks a diameter or the whole insert; the nut's whole 2.4 mm.
|
|
6387
|
-
- `fasten.seat`: the cap heads sit flat, 3 mm down their counterbores, and PLA under them
|
|
6388
|
-
of 0.
|
|
6383
|
+
- `fasten.seat`: the cap heads sit flat, 3 mm down their counterbores, and PLA under them, out to the head's 5.07 mm
|
|
6384
|
+
bearing face, takes 414 N, a tightening of 0.25 N m, so they are tightened to 0.12 N m at most, half that; the countersunk heads sit in an 89.8° countersink, flush with the back.
|
|
6389
6385
|
- `fasten.access`: a 2.5 mm hex key reaches each cap head along its axis, and a 2 mm key each countersunk head, with
|
|
6390
6386
|
nothing within the key's corners for its long arm's 58.5 mm or 52 mm (`hexkey`, ISO 2936).
|
|
6391
|
-
- `fasten.load`: with the shelf's 2 kg, the front screws are tightened to 0.
|
|
6392
|
-
takes, and the pilot's thread in PLA holds that preload and the pull
|
|
6393
|
-
the load, the screw first (the nut's thread is steel and not checked). Each holds its shear by friction
|
|
6387
|
+
- `fasten.load`: with the shelf's 2 kg, the front screws are tightened to 0.12 N m, half what the seat under the head
|
|
6388
|
+
takes, and the pilot's thread in PLA holds that preload and the pull 5.7 times over; the back screws hold 32.6 times
|
|
6389
|
+
the load, the screw first (the nut's thread is steel and not checked). Each holds its shear by friction 3.5 and 3.6
|
|
6394
6390
|
times over. The torque on the back screws is given (0.3 N m), because the check holds the
|
|
6395
6391
|
pressure under a flat seat and not yet on a countersink's cone.
|
|
6396
6392
|
|
|
@@ -6519,11 +6515,11 @@ tighten to. The screws, the insert and the nuts are drawn faint in place.
|
|
|
6519
6515
|
### What is measured, and what waits on the bench
|
|
6520
6516
|
|
|
6521
6517
|
The pilot is the X1C's own measured figure. The insert's hole, the nut's slot, the counterbore's room for a head and
|
|
6522
|
-
the strength figures under `fasten.load` are not, and their findings say so.
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
built.
|
|
6518
|
+
the strength figures under `fasten.load` are not, and their findings say so. The fixings coupon settles them:
|
|
6519
|
+
pilots at five sizes, insert holes, nut pockets and slots at three fits, a counterbore and printed threads.
|
|
6520
|
+
`npx cad coupons` adds it to your workspace, in `projects/coupons` with its `MEASURE.md`; its results go back with
|
|
6521
|
+
`cad measured <rule>=<figure>` (`x1c.pilot_m4=3.3`), and every design drawn from `v.fixings` follows them the next
|
|
6522
|
+
time it is built.
|
|
6527
6523
|
|
|
6528
6524
|
## 16. A frame: beams, joins and an axis
|
|
6529
6525
|
|
|
@@ -6614,6 +6610,10 @@ An address names a place on a beam: `p1.back@30` is the face of `p1` that looks
|
|
|
6614
6610
|
check chooses the shortest sold that fits.
|
|
6615
6611
|
- **Loads.** The carriage carries 0.5 kg, and the axis pushes 20 N along the rods (a cable chain's drag, or a tool
|
|
6616
6612
|
pressed along the way: a figure to replace with the task's own).
|
|
6613
|
+
- **Held on the bench.** The box weighs about 2.5 kg, and the axis's 20 N push, 170 mm up, would tip it over two of
|
|
6614
|
+
its feet standing free (`frame.tip` fails it, lifting the other two). A machine that pushes like this is screwed or
|
|
6615
|
+
clamped to its bench, so `"frame": { "supports" }` says its four feet are held there, pinned, as the feet alone
|
|
6616
|
+
would hold them: every other figure is the same, and `frame.tip` says it is not checked for tipping.
|
|
6617
6617
|
|
|
6618
6618
|
```json projects/frame/assemblies/box.json
|
|
6619
6619
|
{
|
|
@@ -6676,7 +6676,8 @@ An address names a place on a beam: `p1.back@30` is the face of `p1` that looks
|
|
|
6676
6676
|
"loads": [
|
|
6677
6677
|
{ "mass": 0.5, "at": "g1-carriage-1.top", "note": "What the carriage carries" },
|
|
6678
6678
|
{ "joint": "g1-1", "force": 20, "note": "A push along the rods: a cable chain's drag, or a tool pressed along the way" }
|
|
6679
|
-
]
|
|
6679
|
+
],
|
|
6680
|
+
"frame": { "supports": { "p1.a": "pinned", "p2.a": "pinned", "p3.a": "pinned", "p4.a": "pinned" } }
|
|
6680
6681
|
}
|
|
6681
6682
|
```
|
|
6682
6683
|
|
|
@@ -6691,8 +6692,9 @@ What the check says, piece by piece:
|
|
|
6691
6692
|
`join.end`: all 24 beam ends are joined or capped.
|
|
6692
6693
|
- A blind join's screw, followed as any `fasten` is: an M5x12 button, 10 mm into the rail's own tapped thread (two
|
|
6693
6694
|
diameters in aluminium, `engagement.aluminium`), its head bearing on the post's lips from inside: 17.9 mm² of
|
|
6694
|
-
aluminium either side of the opening takes 3677 N, so it is tightened to
|
|
6695
|
-
|
|
6695
|
+
aluminium either side of the opening takes 3677 N (3.68 N m), so it is tightened to half that, 1.83 N m at most: the
|
|
6696
|
+
clamp a torque gives scatters by a quarter to a third.
|
|
6697
|
+
- A bracket: 4.8 mm thick and 4.07 g, 3.06 times under PLA's strength at its 100 N by finite elements, two M4x10 cap
|
|
6696
6698
|
screws, each into a drop-in nut with 4 mm of thread.
|
|
6697
6699
|
- The feet: an M5x16 cap through each foot's 5 mm floor and 11 mm into the post's tapped end.
|
|
6698
6700
|
- The board plate: each screw over the centre line of `x1`'s top slot (`fasten.slot`), at 105 and 155 mm from its end
|
|
@@ -6709,7 +6711,7 @@ What the check says, piece by piece:
|
|
|
6709
6711
|
estimate), stacked worst case; 0.65 mm root-sum-square. Once it is squared, the difference measured goes back with
|
|
6710
6712
|
`cad measured frame/box frame.square.p1-p2-x1-x3=<mm>`.
|
|
6711
6713
|
- `join.stiffness`: what each join puts at the rail's end when the frame is solved. A blind join is 1.5 N·m/mrad in
|
|
6712
|
-
bending and 0.3 in twist, an estimate; a bracket's bending, 0.
|
|
6714
|
+
bending and 0.3 in twist, an estimate; a bracket's bending, 0.099 N·m/mrad, is its own by finite elements, and the
|
|
6713
6715
|
slot nuts and lips are in neither. Both stay estimates until the joint rig (issue 264) measures one.
|
|
6714
6716
|
|
|
6715
6717
|
The sweep moves the carriage from one end of its travel to the other, 0 to 99.5 mm in 12 steps: nothing collides.
|
|
@@ -6720,18 +6722,18 @@ Each printed part is sized from a named load to about twice the margin, where it
|
|
|
6720
6722
|
|
|
6721
6723
|
| Part | Grams | Load it is sized for | Margin |
|
|
6722
6724
|
|---|---|---|---|
|
|
6723
|
-
| Corner bracket (× 4) | 4.1 | 100 N across the rail at its screw |
|
|
6725
|
+
| Corner bracket (× 4) | 4.1 | 100 N across the rail at its screw | 3.06, by finite elements |
|
|
6724
6726
|
| Carriage | 23.6 | 50 N on its middle, between its bearings | 6.04 |
|
|
6725
6727
|
| Motor plate | 10.5 | 50 N along the beam at the shaft's height | 4.95 |
|
|
6726
6728
|
| Rod holder (× 2) | 17.6 | 50 N along the beam at the rods' height | 24.3 |
|
|
6727
|
-
| Foot (× 4) | 7.0 | 250 N down the post |
|
|
6729
|
+
| Foot (× 4) | 7.0 | 250 N down the post, on the beam's 182.5 mm² section | 28.5 |
|
|
6728
6730
|
| End cap (× 4) | 1.3 | none: pushed on | |
|
|
6729
6731
|
| Board plate | 5.1 | its screws' seat: 1124 N under each head | |
|
|
6730
6732
|
|
|
6731
6733
|
The bracket is the part its load sizes: thinner, it would bend past its margin. The others are sized by what they hold
|
|
6732
6734
|
rather than what they carry: the carriage by its two bearings' pockets and the nut's bore, the holder by the 608
|
|
6733
6735
|
bearing pressed into it, the plate by the motor's boss and its four screws, the foot by the counterbore its screw's
|
|
6734
|
-
head sinks into. Each is as small as those allow. The margins under
|
|
6736
|
+
head sinks into. Each is as small as those allow. The margins under 3.06 come from beam formulas or coarse finite
|
|
6735
6737
|
elements on PLA's 39 MPa (`pla.strength`, a community figure), so each is an estimate, and the finding says so.
|
|
6736
6738
|
|
|
6737
6739
|
### Cut, drilled and tapped
|
|
@@ -6745,10 +6747,11 @@ npx cad beams frame/box --jigs
|
|
|
6745
6747
|
`cad list` gives the cut list. The beams come in seven marks, beams cut and drilled alike sharing one: `A`, the four
|
|
6746
6748
|
rails along x at 260 mm, each tapped M5 18.5 mm deep at both ends; `B`, the two bracket-held rails at 220 mm, cut
|
|
6747
6749
|
square and nothing more; `C`, the two top rails along y, tapped; and `D` to `G`, the four posts at 200 mm, each tapped
|
|
6748
|
-
at its foot, with three access holes on the faces its rails meet. All twelve come out of
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6750
|
+
at its foot, with three access holes on the faces its rails meet. All twelve come out of three 1000 mm bars, 3000 mm
|
|
6751
|
+
of metal where one 4000 mm bar would hold them too, with a 3 mm kerf and 10 mm trimmed off each bar's first end,
|
|
6752
|
+
leaving 216 mm of offcuts. The first bar is filled: three rails and a post take 999 mm of it, and the last cut takes
|
|
6753
|
+
the millimetre left. Then the bought parts (the rods, bearings, coupler, screw, nut and motor), the fasteners by size
|
|
6754
|
+
with the packs to buy, and 124 g printed in 17 parts, about 134 minutes of printing. The fasteners, as `cad list` gives them:
|
|
6752
6755
|
|
|
6753
6756
|
- 12 × M5x12 button, for the blind joins.
|
|
6754
6757
|
- 16 × M4x10 cap, with 16 of the 18 drop-in nuts, for the brackets, the rod holders and the motor plate.
|
|
@@ -6802,8 +6805,7 @@ slide-in nut or a head has no such way as its beam goes on, the build loads it a
|
|
|
6802
6805
|
... through its end b, before cap1 goes on`, or `Slide an M5x12 button screw into x3's back slot head first ...`),
|
|
6803
6806
|
and where no step has one, it is refused with the slot and what is in the way.
|
|
6804
6807
|
|
|
6805
|
-
It ends with each kind of join's tightening: the twelve blind joins to
|
|
6806
|
-
joins to 0.68 N m (what the PLA under each head takes).
|
|
6808
|
+
It ends with each kind of join's tightening: the twelve blind joins to 1.83 N m (half what the lips take).
|
|
6807
6809
|
|
|
6808
6810
|
### Two mistakes, caught
|
|
6809
6811
|
|
|
@@ -6940,6 +6942,11 @@ the cross beam's far end lies on top, as the near one does.
|
|
|
6940
6942
|
printed `end-cap` on each post's top.
|
|
6941
6943
|
- **The sag.** `"frame": { "points": ["m1.top@50%"] }` asks for the sag under the board. Nothing is hung there by
|
|
6942
6944
|
hand: the board and its mount are items on `m1`, so their mass is where they are.
|
|
6945
|
+
- **Held down.** The case weighs about 1.3 kg on feet 160 and 150 mm apart, so standing free a push of about 9 N at
|
|
6946
|
+
its top would tip it over two of its feet (printed, at 0.8 kg, about 5 N: `frame.tip`, against the 20 N
|
|
6947
|
+
`frame.rack` pushes with). It is screwed
|
|
6948
|
+
to the shelf it stands on, so `"supports"` says its four feet are held there, pinned, as the feet alone would hold
|
|
6949
|
+
them: every other figure is the same, and `frame.tip` says it is not checked for tipping.
|
|
6943
6950
|
- **Printed instead.** `"printed": "petg"` asks, for each beam, whether it could be printed in PETG.
|
|
6944
6951
|
|
|
6945
6952
|
```json projects/case/assemblies/aluminium.json
|
|
@@ -7004,7 +7011,7 @@ the cross beam's far end lies on top, as the near one does.
|
|
|
7004
7011
|
{ "screw": "M5 cap", "through": ["foot4"], "into": "p4", "at": ["foot4.b1"], "note": "Foot 4" },
|
|
7005
7012
|
{ "screw": "M5 button", "through": ["fan"], "into": "x4.back", "at": ["fan.b1", "fan.b2"], "nut": "roll-in", "note": "The fan mount" }
|
|
7006
7013
|
],
|
|
7007
|
-
"frame": { "points": ["m1.top@50%"], "printed": "petg" }
|
|
7014
|
+
"frame": { "points": ["m1.top@50%"], "printed": "petg", "supports": { "p1.a": "pinned", "p2.a": "pinned", "p3.a": "pinned", "p4.a": "pinned" } }
|
|
7008
7015
|
}
|
|
7009
7016
|
```
|
|
7010
7017
|
|
|
@@ -7108,7 +7115,7 @@ X1C's 256 mm. The cross beam needs its top slot alone, for the gussets and the b
|
|
|
7108
7115
|
{ "screw": "M3 cap", "through": ["foot4"], "into": "p4", "at": ["foot4.b1"], "note": "Foot 4" },
|
|
7109
7116
|
{ "screw": "M5 button", "through": ["fan"], "into": "x4.back", "at": ["fan.b1", "fan.b2"], "nut": "roll-in", "note": "The fan mount" }
|
|
7110
7117
|
],
|
|
7111
|
-
"frame": { "points": ["m1.top@50%"] }
|
|
7118
|
+
"frame": { "points": ["m1.top@50%"], "supports": { "p1.a": "pinned", "p2.a": "pinned", "p3.a": "pinned", "p4.a": "pinned" } }
|
|
7112
7119
|
}
|
|
7113
7120
|
```
|
|
7114
7121
|
|
|
@@ -7163,7 +7170,7 @@ Each printed part is sized from a named load to about twice the margin, where it
|
|
|
7163
7170
|
| Board mount | 27.1 | 50 N on the board at its farthest hole | 4.62 |
|
|
7164
7171
|
| Fan mount | 17.5 | 50 N on the fan at its farthest hole | 5.65 |
|
|
7165
7172
|
| Panel clip (× 32) | 1.6 | 30 N pushing the panel out | 2.12 |
|
|
7166
|
-
| Foot (× 4) | 4.6 | 250 N down the post |
|
|
7173
|
+
| Foot (× 4) | 4.6 | 250 N down the post, on the beam's 182.5 mm² section | 24.8 |
|
|
7167
7174
|
| End cap (× 4) | 1.3 | none: pushed on | |
|
|
7168
7175
|
|
|
7169
7176
|
The beams are sized by their slots, not their bending: the frame's highest stress is 0.04 MPa, in `x1`, 633 times
|