@rulecad/cad 0.7.97 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/AGENTS.md +26 -10
  2. package/CHANGELOG.md +442 -2
  3. package/EXAMPLES.md +48 -42
  4. package/README.md +226 -73
  5. package/TUTORIAL.md +2 -2
  6. package/bin/cad.mjs +2253 -514
  7. package/lib/animate.mjs +173 -49
  8. package/lib/assembly.mjs +1854 -437
  9. package/lib/beams.mjs +256 -52
  10. package/lib/belts.mjs +66 -15
  11. package/lib/board-work.mjs +12 -0
  12. package/lib/bought.mjs +309 -53
  13. package/lib/buildpage.mjs +179 -29
  14. package/lib/carried.mjs +201 -0
  15. package/lib/clone.mjs +194 -42
  16. package/lib/design.mjs +734 -113
  17. package/lib/drive.mjs +187 -63
  18. package/lib/edit.mjs +900 -191
  19. package/lib/errors.mjs +16 -3
  20. package/lib/explain.mjs +62 -13
  21. package/lib/fasten.mjs +2710 -502
  22. package/lib/fittings.mjs +715 -121
  23. package/lib/fixings.mjs +21 -9
  24. package/lib/framebuild.mjs +792 -176
  25. package/lib/framecheck.mjs +1901 -368
  26. package/lib/framegen.mjs +100 -22
  27. package/lib/frameheat.mjs +225 -42
  28. package/lib/frameprint.mjs +513 -108
  29. package/lib/frames.mjs +81 -17
  30. package/lib/framesize.mjs +792 -120
  31. package/lib/frametip.mjs +235 -0
  32. package/lib/gait.mjs +135 -23
  33. package/lib/grip.mjs +62 -13
  34. package/lib/guides.mjs +1403 -230
  35. package/lib/host.mjs +149 -18
  36. package/lib/inplace.mjs +171 -36
  37. package/lib/jigs.mjs +360 -78
  38. package/lib/joins.mjs +697 -118
  39. package/lib/jsonedit.mjs +88 -26
  40. package/lib/kept.mjs +84 -0
  41. package/lib/kit.mjs +438 -68
  42. package/lib/layout.mjs +3 -1
  43. package/lib/links.mjs +149 -42
  44. package/lib/list.mjs +326 -64
  45. package/lib/live-guard.mjs +68 -0
  46. package/lib/live-shape.mjs +96 -24
  47. package/lib/live.mjs +189 -59
  48. package/lib/loads.mjs +579 -130
  49. package/lib/machine.mjs +372 -74
  50. package/lib/magnets.mjs +162 -44
  51. package/lib/measured.mjs +417 -94
  52. package/lib/mesh.mjs +526 -119
  53. package/lib/meshcmd.mjs +215 -60
  54. package/lib/motors.mjs +1022 -212
  55. package/lib/motorsvg.mjs +114 -32
  56. package/lib/names.mjs +41 -0
  57. package/lib/optimise.mjs +979 -283
  58. package/lib/order.mjs +519 -112
  59. package/lib/panels.mjs +482 -94
  60. package/lib/parts.mjs +78 -23
  61. package/lib/pins.mjs +163 -44
  62. package/lib/plates.mjs +224 -36
  63. package/lib/player.mjs +37 -9
  64. package/lib/power.mjs +64 -13
  65. package/lib/preview.mjs +83 -16
  66. package/lib/profilemeasure.mjs +572 -129
  67. package/lib/rules.mjs +38 -4
  68. package/lib/sandbox-hooks.mjs +154 -12
  69. package/lib/sandbox-preload.mjs +2 -2
  70. package/lib/sandbox-run.mjs +127 -12
  71. package/lib/sandbox.mjs +632 -35
  72. package/lib/schema.mjs +43 -11
  73. package/lib/seats.mjs +227 -49
  74. package/lib/services.mjs +261 -52
  75. package/lib/sheet.mjs +851 -178
  76. package/lib/slotnuts.mjs +213 -34
  77. package/lib/targets/gist.mjs +4 -1
  78. package/lib/targets.mjs +42 -6
  79. package/lib/task.mjs +376 -79
  80. package/lib/versions.mjs +113 -28
  81. package/lib/wires.mjs +228 -45
  82. package/lib/workspace.mjs +216 -17
  83. package/package.json +19 -19
  84. package/schemas/assembly.schema.json +2 -2
  85. package/schemas/object.schema.json +1 -1
  86. package/schemas/project.schema.json +1 -1
package/README.md CHANGED
@@ -137,11 +137,17 @@ else the current folder:
137
137
  ```
138
138
 
139
139
  - `printer`: the rule set prints are checked against (bed, overhang, layer, bridge, support_gap); a project.json's
140
- `printer` wins.
140
+ `printer` wins. Either is a rule set's plain name (letters, digits, `-` and `_`; see Variables).
141
+ - `designTimeout` and `designMemory`: optional. How long a design may run in the sandbox, in seconds (3600, an hour, if
142
+ left out), and how much memory its JavaScript may hold, in megabytes (4096). A design past either is stopped with
143
+ `design.time` or `design.memory` (see Sandbox). `CAD_DESIGN_TIMEOUT` and `CAD_DESIGN_MEMORY` set them for one run.
144
+ A value above the default is used once you have trusted the workspace (`cad trust`), as `"sandbox": false` is;
145
+ until then the default holds, so a workspace cloned from elsewhere can't take the limits away by itself.
141
146
  - `targets`: optional. `show` puts a model on display: a module of yours, exporting `show({ title, ttl, mesh, card })`
142
147
  (lib/targets.mjs describes it): a smart mirror, a second screen, a slicer. `shorten` stores a link's data for
143
148
  short links (`gist`: a secret Gist, through the `gh` command). Leave one out and `cad show` says so, and links stay
144
- long.
149
+ long. `gist`, spelt exactly so, is the kit's own target; any other name is a module of yours, a path inside the
150
+ workspace, and is asked about once (see Trust).
145
151
  - Designs are ES modules that import JSCAD themselves, so the workspace needs `"type": "module"` and
146
152
  `@jscad/modeling`. Circuit boards need `@rulecad/pcb` as well.
147
153
  - Previews need Chrome or Chromium: `$CAD_CHROME`, else the usual install paths.
@@ -153,7 +159,8 @@ else the current folder:
153
159
  view the model in a browser, or download its STL or 3MF as soon as the link opens. The model travels in the link's
154
160
  fragment, which never reaches the web host, so the public page can open private designs. A link records exactly
155
161
  which version it holds (`keyboard/keycap@0.1.0`, or `+changes` if it isn't a release). The page is `@rulecad/viewer`: host your
156
- own copy anywhere and name it in `viewUrl`.
162
+ own copy anywhere and name it in `viewUrl`. When a workspace names a page other than the kit's own, `cad link` says
163
+ so in one line (on stderr), so that a workspace from elsewhere can't send your links to another site unseen.
157
164
 
158
165
  - **Circuit boards:** a board's link also carries its fab zip, the same one `cad export` writes (Gerbers, drill files,
159
166
  parts list, placement; plotted by KiCad where the board needs it). The page offers it as **Download for JLCPCB**. A
@@ -242,6 +249,12 @@ own copy anywhere and name it in `viewUrl`.
242
249
  share-alike) carries over to boards made from it: keep such a rule set apart from your others.
243
250
  - An object or rule set named with a hyphen (`mx-switch`) is read with an underscore in expressions (`mx_switch.housing_top`),
244
251
  since a hyphen there is a minus.
252
+ - Rule-set, project, object, layout, problem and assembly names are plain: letters, digits, `-` and `_`, starting
253
+ with a letter or digit (`x1c`, `m1_6`, `profile-2020-bosch`). Each becomes part of a file's name (`rules/x1c.json`,
254
+ `projects/keyboard/`), so a name with a space, a dot, a slash or a backslash is refused, with the file and field it
255
+ was read from (`projects/p/project.json: the "printer" field "../x" is not a plain name`): a workspace's own files
256
+ cannot make the tool read or write anywhere but where it means to. In `"uses"`, another object is
257
+ `<project>/<object>`, optionally with `:<variant>` and `@<version>`, never a path to a file.
245
258
  - Rules carry `kind`: spec (manufacturer), default (slicer), community (rule of thumb) or measured (your own test
246
259
  print, which beats the rest), plus `source` and `checked`.
247
260
 
@@ -299,7 +312,9 @@ out. `--part cap` works on one part; `cad preview --explode` moves the parts apa
299
312
  To fit something someone else made (a maker's connector, a part from a model site), measure their model rather than
300
313
  guessing, then check your design against it.
301
314
 
302
- `cad measure <model.stl|model.3mf>` finds the stretches along the model's longest axis (or `--along y`) where its
315
+ `cad measure <model.stl|model.3mf>` (and `cad match`) reads a model from anywhere as data, up to 2,000,000 triangles,
316
+ a 3MF's zip up to 512 MB unpacked and its objects placed up to 100,000 times: a file past a limit, a corner that is not
317
+ three numbers, or a 3MF triangle naming a corner its object hasn't got is refused, naming what is wrong. It finds the stretches along the model's longest axis (or `--along y`) where its
303
318
  cross-section stays the same, numbers the distinct sections (a section seen again gets the same letter), and describes
304
319
  each one: its extent and its height bands, the heights over which it has the same pieces across, split again at steps.
305
320
  It draws every distinct section in `.preview/measure/`. `--line 0.6,2.5` reports where a line along the axis is inside
@@ -380,17 +395,58 @@ other items' variables, so a keycap can sit exactly where its slot meets the swi
380
395
  - **Sandbox:** a JSCAD design runs in a separate Node process under Node's permission model. Whatever it does, it
381
396
  can't write or delete files, start programs or workers, or load addons, and it reads only the workspace and the
382
397
  packages designs use, by their real paths (a `node_modules` link spelled through another link, as macOS spells its
383
- temporary folders through `/tmp` and `/var`, is refused by name: make the link with the real path). To keep it to making shapes it may import only `@jscad/modeling`, `@rulecad/shapes`,
384
- `@rulecad/flexures`, `@rulecad/gears`, `@rulecad/motors`, `@rulecad/fixings` and files in its own project (no `node:` modules), `fetch` and its kin are gone, and it is
398
+ temporary folders through `/tmp` and `/var`, is refused by name: make the link with the real path). A link inside
399
+ the workspace that leads out of it (a design's file, a folder of its project or a rule set in `rules/` that is a
400
+ link to a file elsewhere, which a workspace cloned from someone else can hold) is refused before the design runs,
401
+ and whenever rulecad reads one of the workspace's own files, with `workspace.outside` and the link's name, so no file
402
+ of yours elsewhere is read into a build or a model link; a kept result in `.cache/` that is such a link is not read but made afresh. To share a file between workspaces, copy it into each, or
403
+ put it in a package and install that (the workspace's own `node_modules` is the packages', and may link anywhere). A target named in
404
+ cad.config.json is held to the same, by its real path. To keep it to making shapes it may import only `@jscad/modeling`, `@rulecad/shapes`,
405
+ `@rulecad/flexures`, `@rulecad/gears`, `@rulecad/motors`, `@rulecad/frames`, `@rulecad/fixings` and files in its own project (no `node:` modules).
406
+ An import of a package must lead inside that package: a file of it is named by its path there
407
+ (`@jscad/modeling/src/primitives/index.js`), never with `..`, `.`, `node_modules`, a backslash, `%` or `~`, and the file it finds must be
408
+ the package's own, as rulecad finds it, or one in the project, so no path or link climbs out of it to another file.
409
+ A file of such a package may in turn import only what that package depends on (its own tests' tools are refused).
410
+ `fetch` and its kin are gone, and it is
385
411
  started with none of your environment (no tokens). Those shut the ordinary roads to the network, not every one:
386
412
  before Node 25 the permission model doesn't cover the network, so a design written to get round them might still
387
413
  reach it. Run only designs you trust. It gets its values as data and returns its parts; what it prints
388
- (`console.log`) comes out on stderr. A workspace that trusts its designs sets `"sandbox": false` in cad.config.json
389
- (or `CAD_TRUST=1`). Board designs (engine pcb) run in the tool's process, with the board engine.
390
- - **Trust, asked once:** what a workspace's cad.config.json asks to run outside the sandbox (`"sandbox": false`, a
391
- target that is a module of its own) isn't done until you run `cad trust` in it. That records the folder and what it
392
- asked for in your own list (`~/.config/rulecad/trusted.json`, or `$CAD_TRUSTED`), so a workspace cloned from
393
- elsewhere can't turn the sandbox off on its first command; one that later asks for more is asked again.
414
+ (`console.log`) comes out on stderr. What comes back is checked before it is used, since the design could have
415
+ written it itself: a reply that is not one rulecad makes stops the build with a `design.sandbox` message, and the
416
+ only files written from a reply are the cache's slow stages, each in the design's own folder of `.cache/stages/`,
417
+ which no other design reads, under a name of the form the cache makes, and at most 40 of them, 256 MB in all, a
418
+ build (a design that makes more is built all the same, the rest made again next time; a reply that hands back more
419
+ is refused). Each design's folder holds at most 512 MB, and `.cache/stages/` 2 GB in all: past a folder's limit its own
420
+ oldest files go, past the whole cache's the oldest of any design's, so many designs, or one built again and again, can't fill the disk either
421
+ (a stage that goes is worked out again next time). A design may run for an hour (3600 s) and its JavaScript may hold 4096 MB, its process 512 MB
422
+ more in all (Node itself, typed arrays, WebAssembly memory, output not yet sent): past any limit its process is
423
+ stopped and the build fails with `design.time` or `design.memory`, naming the design, so a design that loops for
424
+ ever or fills memory without end can't hang the command or take the machine down with it. What a design sends back
425
+ is kept only up to its memory limit, and what it prints only its last megabyte, so it can't fill the tool's own
426
+ process either. A slow design that needs more raises them in cad.config.json (`"designTimeout"` in seconds,
427
+ `"designMemory"` in megabytes; above the defaults, once the workspace is trusted with `cad trust`) or with
428
+ `CAD_DESIGN_TIMEOUT` and `CAD_DESIGN_MEMORY`, which win. A workspace that trusts its designs sets
429
+ `"sandbox": false` in cad.config.json (or `CAD_TRUST=1`); its designs then run in the tool's own process, without
430
+ either limit. Board designs (`"engine": "pcb"` in the object's JSON) run in the sandbox too, with the board
431
+ engine: the sandbox may then also read `@rulecad/pcb` and the packages it loads, the design reaches the engine only
432
+ as `v.pcb`, and it hands back its board's Circuit JSON, which is checked like the rest of a reply before the tool
433
+ makes the board's solid and files from it; the solid and the board's checks are made within the design's time
434
+ and memory limits. The routes the autorouter finds come back the same way and are written
435
+ to the design's own folder of `.cache/routes/`, read back by that board alone, each under a name of the form the
436
+ route cache makes (a route cache you share between workspaces with `RULECAD_ROUTE_CACHE` is read, never written,
437
+ from the sandbox; these folders hold at most 128 MB each, 512 MB in all). A board build takes a little longer for
438
+ it (a second process starts and loads the engine).
439
+ - **Trust, asked once:** what a workspace asks to run outside the sandbox isn't done until you run `cad trust` in it:
440
+ `"sandbox": false` or a target that is a module of its own (in cad.config.json). Only the kit's own targets, by their
441
+ exact names (today only `gist`), run without asking: every other target name, with or without a slash or an
442
+ extension, is the workspace's own code, and one outside the workspace's folder is never run. `cad trust` records the
443
+ folder and what it asked for, in words such as "designs run outside the sandbox", in your own list
444
+ (`~/.config/rulecad/trusted.json`, or `$CAD_TRUSTED`), so a workspace cloned from elsewhere can't turn the sandbox
445
+ off or run its own code on its first command; one that later asks for more is asked again. A trusted workspace runs
446
+ only its own designs in the tool's process: one from another folder (a path to it, or a link out) is refused. A
447
+ workspace held in memory (`memoryHost`, for tests and later a browser or an editor's server) runs its designs in the
448
+ same sandbox, through the host's `runDesign` (a copy of the design's project in a temporary folder, removed after),
449
+ and in the tool's own process only when `build` is called with `{ trusted: true }`.
394
450
  - **Mistakes are named:** a design that reads a variable that isn't there (`v.widht`) stops with the name it
395
451
  probably meant, not a shape drawn from `undefined`; errors in a design carry its file and line.
396
452
  - **Units:** `cad check` warns where an expression mixes units (millimetres added to degrees, a sine of a length) or
@@ -466,15 +522,17 @@ starts and stops. From that the check says:
466
522
  | Finding | What it checks |
467
523
  |---|---|
468
524
  | `fasten.holes` | One axis runs from under the head through every part: a hole 0.05 mm or more off it fails, with the distance |
469
- | `fasten.slot` | Into a beam's slot: each screw over a slot's centre line within its hole's play, square to the face and along the beam (see Fastening into a slot, under Beams) |
525
+ | `fasten.stack` | The parts lie face to face along the screw: walked from under the head, the far face of each is within 0.05 mm of the near face of the next. A gap fails, naming both parts and the gap, as the screw would be lengthened across air and clamp nothing (a part placed wrong). Where a fit between the two gives a range that holds the gap, the gap is meant, and it warns, naming the fit. A spacer that fills a gap is a part in `through`; a beam whose own material fills the gap (its slot's lips, clamped between a rail and a strip of nuts under them) is no gap |
526
+ | `fasten.slot` | Into a beam's slot: each screw over a slot's centre line within its hole's play, square to the face and along the beam, its nut's whole length in the slot: a nut that runs past an end of the beam fails, naming the end (see Fastening into a slot, under Beams) |
470
527
  | `fasten.clearance` | Each part passed through has a clearance hole for the thread as drawn on this printer, between the close and the loose figure; it says what the hole measures and what it should be |
471
528
  | `fasten.end` | The far end is a pilot, a hole to tap, a thread drawn to print, an insert's hole or a nut's seat of this thread (a pocket on the far face, or a slot across the screw partway along it, as `v.fixings.nutTrap` cuts), or a clearance hole with `nut`; into a motor, one of its own threaded mounting holes |
472
529
  | `fasten.length` | The length chosen where none is given: the shortest sold length that fits the stack as measured (into a motor, the longest that stops short of the end of its thread). A given length is checked for reaching the far end, bottoming out in a blind hole (1 mm is kept at the tip) and standing more than a diameter proud |
530
+ | `fasten.wall` | The plastic round the far hole, side by side halfway along its first full-size stretch (where the thread is, not a bore it runs on into), where the screw forms its thread in a printed part or holds in an insert: the thinnest side is held to the thread set's `insert_wall` for an insert, and for a pilot, a tapped or a printed thread to the wall a boss `fixings.boss_diameter` across (twice the screw's diameter, a screw maker's guide) leaves round the hole as drawn. A thinner side warns, naming the side (`+y`) and the wall |
473
531
  | `fasten.engagement` | The thread engaged at the far end against the rule for what it is in: the thread's `pilot_depth` or the engagement rule for the project's material, an insert's length, a nut's height; into a motor, its own thread's depth, and at least one diameter (`engagement.steel`, as `motor.mount` holds it). A short one names the length or the depth that would do |
474
- | `fasten.seat` | The head (or its washer) has a flat seat as wide as itself and square to the screw, read under the head from the part; a countersunk head has a countersink of its angle. It says the force and torque the seat takes on the project's material, and with `torque` holds the pressure against the material's strength and names the washer that would bring it within |
475
- | `fasten.torque` | A printed bolt given a `torque`: the clamp it is turned to (T = K d F with steel's nut factor, an estimate for a printed thread) held against what the bolt breaks at, about twice over (`fixings.load_margin`); a turn that would break it fails, naming the most to turn it to |
532
+ | `fasten.seat` | The head (or its washer) has a flat seat as wide as itself and square to the screw, read under the head from the part; a countersunk head has a countersink of its angle. It says the force and torque the seat takes on the project's material and the most to tighten to: half that (`fixings.load_margin`, since the clamp a torque gives scatters by a quarter to a third) within a screw tightened fully, on a joint with a load or without, and for a screw in a thread in plastic the less torque that clamps with half what the thread is estimated to strip at. With `torque` it holds the pressure against the material's strength and names the washer that would bring it within |
533
+ | `fasten.torque` | A `torque` given, held against what it would break. A printed bolt: the clamp it is turned to (T = K d F with steel's nut factor, an estimate for a printed thread) against what the bolt breaks at, about twice over (`fixings.load_margin`); a turn that would break it fails, naming the most to turn it to. A steel screw into a thread made in the part itself (a pilot, a tapped or a printed thread), with a load on the joint or without: its clamp against what the thread is estimated to strip at; past half that it warns and past the whole of it it fails, naming the most to tighten to |
476
534
  | `fasten.access` | A key or driver reaches the head along its axis, in the build pose: a cylinder as wide as the key across its corners, as long as its long arm (both from the `hexkey` set, ISO 2936; a hexagon head's socket adds `hexkey.socket_wall`, an estimate), clear of every other part. A part over the head that goes on after the screw passes, with the step it goes on at: `cad order` puts it after. One that must be there first (it comes earlier in the order, it is one of the joined parts, or it is no step at all) fails by name with how far over the head it is; where a ball-end key tilted up to `hexkey.ball_end_tilt` (25°) clears it, it warns instead |
477
- | `fasten.load` | With `loads` or a motor's torque on the joint: what it holds up (the parts left with no other way to the first item, their masses, the loads hung on them, under the assembly's `gravity`, and the torque of a motor among them), shared between the screws as a group (`screwGroup` of `@rulecad/fixings`: shear by distance from the centroid, pull by a plane through it). The screw that takes the most is held against its proof load, the thread it is in against stripping, and the clamp against slipping, at its preload (`screwLoad`); the margin is how many times the load it holds, and under 2 it warns. With no `torque`, it says the torque that leaves the thread twice the load, within the seat, and `cad order` tightens to that. It names the estimates it rests on (the nut factor, a plastic's shear strength, the friction) |
535
+ | `fasten.load` | With `loads` or a motor's torque on the joint: what it holds up (the parts left with no other way to the first item, their masses, the loads hung on them, under the assembly's `gravity`, and the torque of a motor among them), shared between the screws as a group (`screwGroup` of `@rulecad/fixings`: shear by distance from the centroid, pull by a plane through it). The screw that takes the most is held against its proof load, the thread it is in against stripping, and the clamp against slipping, at the preload of the one torque all the joint's screws are tightened to (`screwLoad`); where several hold the same margin to the hundredth it says they take the most alike; the margin is how many times the load it holds (for the thread, how many times the preload and the pull together), and under 2 it warns. With no `torque`, it says the torque that leaves the thread twice the preload and the pull, within half what the seat takes, so never more than half what the thread is estimated to strip at, and `cad order` tightens to that. It names the estimates it rests on (the nut factor, a plastic's shear strength, the friction) |
478
536
 
479
537
  Every finding has `at` (under the head) and `between` (head to tip), so the viewer points at the screw. The screws,
480
538
  nuts, washers and inserts are placed as reference parts from `@rulecad/fixings`: faint in previews, lifted along
@@ -582,9 +640,14 @@ then y, then z, as `rotate` does.
582
640
  true` makes it a ring gear round its pinion. `shift` ([the driver's, this one's]), `pressureAngle` and `backlash` are
583
641
  as `@rulecad/gears` takes them. Each gear is drawn as `v.gears` draws it (axis up its z, first tooth on +x; a rack
584
642
  along its x, teeth up +y) and its joint is anchored at its centre, along its axis. The check gives the ratio, the
585
- contact ratio and the centre distance (`mesh.centre`: closer than the gears need eats their backlash, and past it they jam; further adds backlash),
643
+ contact ratio where the axes are and the centre distance (`mesh.centre`: closer than the gears need eats their backlash, and past it they jam; further adds backlash), the room under the tips (`mesh.tipClearance`, which shifted pairs lose),
586
644
  each placed between the two axes, and measures the pair from its drawn teeth (`mesh.backlash`, `mesh.interference`,
587
- kept in `.cache/gears/`); `--sweep` turns the train and looks for teeth that touch. Both gears' axes sit on
645
+ kept in `.cache/gears/`); `--sweep` turns the train and looks for teeth that touch. The centre distance is said
646
+ across the axes, so the check also finds each gear's teeth in its drawn parts (the points on its tip circle, a rack's
647
+ on its tip line) and says how much of the two faces meet along the driver's axis (`mesh.face`, "faces overlap X of
648
+ Y mm", Y the narrower face): 80 % or more passes, 50 to 80 % warns, under 50 % fails, as a gear anchored at the
649
+ wrong height or on the wrong step of a compound gear would. This overlap rule covers spur, internal and rack meshes;
650
+ worms and bevels are placed by their own checks. Both gears' axes sit on
588
651
  one part, or on parts held still; planets on a carrier are a `planetary`.
589
652
  - **Worms and bevels:** `"worm": true` (or `{ "diameter", "hand" }`) in a mesh makes the driving joint a worm and
590
653
  this one its wheel, `teeth` [starts, the wheel's], the axes crossed at right angles; the check says the ratio,
@@ -628,13 +691,14 @@ then y, then z, as `rotate` does.
628
691
  An item can be a motor instead of a printed object: `{ "id": "drive", "motor": { "model": "nema17", "drives": "elbow" }, "at": […], "rotate": […] }`. It comes from `@rulecad/motors`, is bought and not printed (a reference, in the assembly but never on a plate), and its anchors (`shaft`, `tip`, `face`, `horn`, `hole1` …) work in joints like any other. `set` changes a figure (`{ "holding_torque": { "value": 0.5, "kind": "measured", "source": "…" } }`), `speed` is the motor's speed (rpm), `margin` how many times over the torque must be (2 by default), `duty` the share of the time it runs.
629
692
 
630
693
  - `"drives"`: the joint it turns, a revolute. The viewer's slider moves in a stepper's steps; a servo brings its range. Whatever follows that joint through a `mesh` or a `planetary` moves with it. `motor.axis` fails if its shaft isn't on the joint's axis.
631
- - `"loads"` at the top of the assembly say what it has to do: `{ "joint": "elbow", "torque": 0.5 }` (N m), `{ "joint": "slide", "force": 12 }` (N), or `{ "mass": 0.2, "at": "forearm.tip" }` (kg, a mass carried at an anchor, whose torque at each joint comes from where the pose puts it; the check runs the motor through its range and reports the worst). `"gravity": [0, -1, 0]` says which way is down, if not `-z`.
694
+ - What a motor lifts is counted for you: the weight of every part it moves, as drawn (the printed parts by their volume and the project's material, the bought parts, a motor among them, by the mass their rules give), under gravity, which is down (`-z`) unless `"gravity": [0, -1, 0]` says otherwise, and the task's `payload` at its tool. `"loads"` at the top of the assembly add what is not drawn: `{ "mass": 0.2, "at": "forearm.tip" }` (kg, a mass carried at an anchor, whose torque at each joint comes from where the pose puts it), `{ "joint": "elbow", "torque": 0.5 }` (N m) or `{ "joint": "slide", "force": 12 }` (N), each torque or force added the way that makes it worse. Declare only what the drawing leaves out (the payload, a cable's drag): a mass declared for a part that is drawn is counted twice. A mass declared at the task's tool is taken to be its payload, so the two are counted once. The check runs the motor through its range and reports the worst, and each motor finding says what it counted (`counted: the parts' own 605 g, 10 g of payload, gravity down`, and `values.counted`).
632
695
  - A compound planetary is a `planetary` with `"output": { "ring", "planet", "teeth" }`: a second ring on the planets' second step, following them in phase.
633
- - `motor.torque`: what reaches the joint through the gears, against the load: a fail under 1 times, a warning under the margin. It says what its figures rest on. `motor.speed`: how fast it moves and how long its range takes. Stages pass on `stageEfficiency` of the power (0.95 a mesh, an estimate).
696
+ - `motor.torque`: what reaches the joint through the gears, against the load: a fail under 1 times, a warning under the margin. It says what its figures rest on. Its `values.available` and `values.needed` are in the joint's own unit, `values.unit`: N m about a revolute, N along a slide (a lead screw's or a belt's force); `values.shaft` is the torque at the motor's shaft.
697
+ - `motor.accel`: how fast the motor can speed up what it moves, from the same weight: the inertia of the parts and the payload reflected to the motor's shaft through the gears (divided by the ratio squared and the train's efficiency), plus the rotor's, against the torque left once the weight and the declared torques and forces are held. A revolute's is in °/s²; a slide's in mm/s², its mass through the lead's mm per radian (m (lead / 2π)², the usual motion-sizing figure), with gravity along the travel. It fails when the load leaves no torque at all (the joint stalls). A task's `task.time` reads it. `motor.speed`: how fast it moves and how long its range takes. Stages pass on `stageEfficiency` of the power (0.95 a mesh, an estimate).
634
698
  - A stepper's torque at speed is worked out at its driver's supply: the volts of the assembly's bought supply item (`supply-12v`, `supply-24v`), or 24 V where it has none. A stepper's torque is flat to its corner speed, 60 V / (2 L I × full steps a turn), and falls as one over the speed past it, so a 17HS4401 at 300 rpm gives 0.269 N m at full current on 12 V against 0.283 on 24 V. `motor.torque` says the volts and the rpm it read (`values.supply`, `values.rpm`).
635
699
  - `"have": true` on a motor or bought item marks it as in hand: `cad list` lists it under `Bought, in hand`, apart from what is to buy (and leaves it out of the bought cost), the kit's `buy.csv` gives it the kind `in hand`, and its build page a table of its own. A printed item is refused.
636
700
  - `motor.holds`: with the power on (holding torque, or stall torque) and off (detent torque, a built-in gearbox's friction, a worm that locks, gears under 50% efficient, or `"brake": "a ratchet and pawl"` on the joint). Dropping with the power off is a warning: it may be what you want.
637
- - `motor.mount`: the part a motor is fastened to (a `fasten` into the motor, or a fit that `fastens`), read as drawn: how thick it is at the screw holes against the screws' size, the screws' engagement in the motor's tapped holes (the screws as bought: their length past the plate, held to the motor's `mount_hole_depth`, at least one diameter, `engagement.steel`, or it fails; a motor item's `"screw"` may name a whole screw, `"M3x8 cap"`, to check that one), and the screws' bearing on the plastic under the motor's full torque. Its screws are counted in `cad list` and `cad order` (at the length sold that stays in the motor's thread, with the tool that turns them: a hex key in a cap screw, a socket or spanner on a hexagon head, `"M3x8 hex"`). Then the whole part bent, by FE on the part as drawn (cubes, two across the plate at the screws): the motor's weight at its centre, along `gravity` in the pose it's checked in, and its full torque (the larger of its working and holding torque), both carried into the plate where the screws clamp it. The part is held at the joint that carries it, if one does; else where it meets the printed parts it's fastened to that sit below it; failing both, on its lowest face. It reports how far the shaft's tip moves (against the driven joint's seat, where that is on the same part, since the two move together), against the printer's `fit` clearance (or the motor's `"deflection"` in mm), and the peak stress against the material's `strength`; under 2 times either fails, and says what fixes it: the plate thickness that would do (bending goes with its cube), ribs, or how much stiffer a material would have to be. Cells this coarse read a plate 10 to 20% stiff, and a cell's stress is read at its centre, so the peak is scaled up to the surface; it's an estimate, said as one. Kept in `.cache/mount`.
701
+ - `motor.mount`: the part a motor is fastened to (a `fasten` into the motor, or a fit that `fastens`), read as drawn: how thick it is at the screw holes against the screws' size, the screws' engagement in the motor's tapped holes (the screws as bought: their length past the plate, held to the motor's `mount_hole_depth`, at least one diameter, `engagement.steel`, or it fails; a motor item's `"screw"` may name a whole screw, `"M3x8 cap"`, to check that one), and the screws' bearing on the plastic under the motor's full torque. Its screws are counted in `cad list` and `cad order` (at the length sold that stays in the motor's thread, with the tool that turns them: a hex key in a cap screw, a socket or spanner on a hexagon head, `"M3x8 hex"`). Then the whole part bent, by FE on the part as drawn (cubes, two across the plate at the screws): the motor's weight at its centre, along `gravity` in the pose it's checked in, and its full torque (the larger of its working and holding torque), both carried into the plate where the screws clamp it. The part is held at the joint that carries it, if one does; else where it meets the printed parts it's fastened to that sit below it; failing both, on its lowest face. It reports how far the shaft's tip moves (against the driven joint's seat, where that is on the same part, since the two move together), against the printer's `fit` clearance (or the motor's `"deflection"` in mm), and the peak stress against the material's `strength`; under 2 times either fails, and says what fixes it: the plate thickness that would do (bending goes with its cube), ribs, or how much stiffer a material would have to be. Cells this coarse read a plate 10 to 20% stiff, and the stress is read at the plate's surface (`@rulecad/fea`'s surface stress), about 5% low on two cells across; it's an estimate, said as one. Kept in `.cache/mount`.
638
702
  - `motor.heat`: the motor's case against the softening point of the material the project prints in. Too hot says the current to set the driver to; the motor item's `current` set to it is read (the maker's rise at rated current, scaled by the current squared, as the heat is), so the check then passes.
639
703
  - A `"shaft": true` fit (or `"press"`) between a motor and what it drives reads the bore from the part as drawn: that it's on the shaft (`shaft.seat`), that its flat is there (`shaft.flat`; the shaft turns to meet it, so where the flat faces doesn't matter), how much of the flat it grips (`shaft.grip`), and, pressed on, the hoop stress in the hub (`shaft.hoop`). `"slide"` holds the bore to a slide fit as printed (`shaft.slide`): the drawn gap less half the printer's `hole_comp` must leave the shaft clear, as a part printed in place needs, since it can't be pressed on.
640
704
  - `cad preview --check` of an assembly with a motor writes `<assembly>-check.png`: the same six views, with a label at each joint the motor's torque passes through (what reaches it, and at the loaded joint the margin and whether it holds unpowered). The rest view never carries them.
@@ -655,7 +719,7 @@ walks one from a spec sheet to a checked box; this section is the reference. In
655
719
  | `cad new <project>/<assembly> --assembly --frame box --inside 300,300,350 --profile 2020-misumi-hfs5` | A generated frame, expanded and checked as it is made (A frame from a size, below) |
656
720
  | `cad set`, `cad move`, `cad remove` | A frame's fields, a beam moved by its ends, a beam taken out (refused, naming them, while joins use it) (Projects and assemblies, by command, above) |
657
721
  | `cad frame <project>/<assembly>` | A generated frame's beams and joins (`--expand` writes them out; `--size` chooses the lightest profiles) |
658
- | `cad check <project>/<assembly>` | The joins, screws and nuts, then the frame solved: `frame.deflection`, `frame.stress`, `frame.buckling`, `frame.rack`, `frame.frequency`, `frame.square`, `frame.heat`, `beam.printable`; `--sweep` slides each guide through its travel |
722
+ | `cad check <project>/<assembly>` | The joins, screws and nuts, then the frame solved: `frame.deflection`, `frame.stress`, `frame.buckling`, `frame.rack`, `frame.tip`, `frame.frequency`, `frame.square`, `frame.heat`, `beam.printable`; `--sweep` slides each guide through its travel |
659
723
  | `cad list`, `cad beams` (`--jigs`), `cad order`, `cad plates`, `cad kit` | The cut list and what to buy, a sheet per beam and the jigs, the build from bars to a square frame, the printed parts on plates, and all of it in one folder (Building it, below) |
660
724
  | `cad measured <project>/<assembly> frame.square.<bay>=<mm>` | A squared bay's diagonal difference, measured; the joint rig's and the beam coupon's figures the same way |
661
725
 
@@ -796,23 +860,35 @@ address stands for the faces near it, as `item@anchor` does (`"within"`, 10 mm b
796
860
  caps it), and `join.stiffness` (the spring each join puts at a's end when the frame is solved, from
797
861
  `@rulecad/frames`' `JOIN_STIFFNESS`: every figure an estimate until the joint rig measures it, and the finding says
798
862
  which, measured with its date or an estimate).
799
- - `join.drop` predicts a beam held by one join and nothing else, with a `mass` load on it (on the beam or on an item
800
- at one of its addresses), as a cantilever from that join: its drop is the beam's own bending, F L³ / 3 E I, and the
801
- join turning on its spring k, F L² / k. It is a prediction `cad measured` takes as `<beam>.drop=<mm>`: the measured
802
- drop less the beam's own bending gives the join's spring, k = F L² / (drop less F L³ / 3 E I), written as measured
803
- to the rule the spring came from. That is the kind's figure in the workspace's `rules/joins.json` (part `joins`,
804
- made from `@rulecad/frames`' estimates the first time: `blind_bending`, `end_tap_twist` and the rest, for a 20 mm
805
- profile), a printed fitting's share of its own stiffness by finite elements (`bracket_printed_share`), or a bought
806
- fitting's `bending_stiffness`. Its sentence becomes what was measured, and the drop goes in its source. A drop no
807
- more than the beam bends by itself is refused, and a refusal of any value writes nothing, not even the joins set's
808
- first copy. The joint rig in
809
- `examples/bench/projects/benchmarks` (MEASURE.md, rows 34 to 37) is built for it, and also measures a slot nut's
810
- hold along its slot, written to the nut's own set as `hold_along`.
863
+ - `join.drop` predicts the drop of a beam held by one join and nothing else, with a `mass` load on it (on the beam or
864
+ on an item at one of its addresses). A beam that something else also holds gets none: another join, a support or a
865
+ foot on it, or a fasten, a fit or a joint between it (or an item it carries) and a part it does not carry. Where the
866
+ frame is solved on supports it is given (`"frame": { "supports" }`, or its feet), the drop is the frame's own: the
867
+ load alone, with the join's spring, the same figure `frame.deflection` gives for that load alone, and the drop with
868
+ the join held rigid, so the beam the join hangs from bends and turns in it too. Every other join whose spring comes
869
+ from the same rule (another blind join, say) moves with it in that solve, as a figure written back moves them all. Where it is not (no supports said),
870
+ the beam the join hangs from is taken as held along its length, as the joint rig's base beam is clamped to the
871
+ bench, and only where it lies along the bench (its whole length at the assembly's lowest): the drop is then the
872
+ beam's own bending, F L³ / 3 E I, and the join turning on its spring k, F L² / k, and the finding says it takes the
873
+ base beam as held. On any other frame with no supports said the drop is not predicted, and the finding says to give
874
+ them. It is a prediction `cad measured` takes as `<beam>.drop=<mm>`: it finds the join's spring that gives the drop
875
+ read from the same model, solving the frame again at each step of a bisection over the spring (at most 80 solves),
876
+ or from the rig's closed form, k = F L² / (drop less F L³ / 3 E I), and writes it as measured to the rule the spring
877
+ came from. That is the kind's figure in the workspace's `rules/joins.json` (part `joins`, made from
878
+ `@rulecad/frames`' estimates the first time: `blind_bending`, `end_tap_twist` and the rest, for a 20 mm profile), a
879
+ printed fitting's share of its own stiffness by finite elements (`bracket_printed_share`), or a bought fitting's
880
+ `bending_stiffness`. Its sentence becomes what was measured, and where (the joint rig, or the frame by name), and the
881
+ drop goes in its source. A drop no more than the beam gives with the join rigid is refused, as is one more than the
882
+ join could give a million times softer, and a refusal of any value writes nothing, not even the joins set's first
883
+ copy. A spring is the same in every frame: measure it on the joint rig where you can, as a frame's own drop rests on
884
+ everything else the frame's solve assumes too. The joint rig in `examples/bench/projects/benchmarks` (MEASURE.md,
885
+ rows 34 to 37) is built for it, and also measures a slot nut's hold along its slot, written to the nut's own set as
886
+ `hold_along`.
811
887
  - `cad add join <project>/<assembly> --kind blind --a y1.a --b x1.back@120 [--screw "M5 button"] [--fitting printed]`
812
888
  adds one.
813
889
 
814
890
  **The frame solved.** `cad check` solves an assembly that has joins (or a `"frame"`) as a frame of beam elements
815
- (`@rulecad/fea/frame`) and reports six findings:
891
+ (`@rulecad/fea/frame`) and reports these findings:
816
892
 
817
893
  - `frame.solve` says what the model holds: the beams, the nodes (each beam is cut where a join, a mounted item, a
818
894
  load, a named point or a support meets it), where it is held, the poses solved, and each join's spring with what
@@ -876,7 +952,12 @@ address stands for the faces near it, as `item@anchor` does (`"within"`, 10 mm b
876
952
  `estimate` while any join's spring is one, even where the springs change no figure; `measured` when every join's
877
953
  is; `beams` with no joins); the rigid figure is the least the sag can be. The limit is a rail's own parallelism
878
954
  under a guide, else `"frame": { "limit": 0.2 }`, else the task's accuracy, else the beam's span over 360. Over it fails.
879
- A sag is given in mm to three places, or to three figures under 0.1 mm (0.00123 mm, 0.000352 mm).
955
+ A sag is given in mm to three places, or to three figures under 0.1 mm (0.00123 mm, 0.000352 mm). Where a beam of
956
+ the frame is drawn printed, each sag is given after creep too: the frame solved again with the joins' springs, each
957
+ printed beam bending as if at half its modulus (`PRINTED_DEFAULTS.creep_modulus`, an estimate), under every case but
958
+ a motor stalled against its stop. The worse of the two is held to the limit, and the finding says so, 'after creep
959
+ (estimate)' (`values.creep`, `refs.creep`). A printed 2020 cantilever 150 mm long with 4 kg at its middle sags 0.273 mm
960
+ at first, within its 0.417 mm, and about 0.546 mm after creep: it fails.
880
961
  - `frame.stress`: the largest stress in each beam (axial and bending, from the section moduli) against its alloy's
881
962
  strength, and the bending moment at each join against what its printed fitting takes (its design load at its
882
963
  screw's distance from the corner, times its margin by finite elements). Under 2 times warns, under 1 fails. A join
@@ -899,6 +980,22 @@ address stands for the faces near it, as `item@anchor` does (`"within"`, 10 mm b
899
980
  push by their joins' bending alone. A bay is four beams round a rectangle in one plane, each neighbouring pair
900
981
  joined to each other or both joined to one beam at one place (the top of a corner-post box, whose rails join the
901
982
  posts); its corners are the nodes where their axes cross.
983
+ - `frame.tip`: whether a frame standing free tips over. A foot stands on a floor, which pushes it up and never pulls it
984
+ down, but the solve holds each foot both ways, so no sag or sway says a frame would fall. This check takes what the
985
+ feet give the frame summed, forces and moments (a fixed foot's moment is the floor pulling one side of it down too),
986
+ which is its weight and what it carries whatever the joins' springs, and takes moments about each edge of the
987
+ outline round its feet seen from above, each foot at its beam end's axis (a pad standing wider only holds it more).
988
+ Under its weight alone, in any pose or case, a load that turns it over an edge fails, naming the feet it lifts and
989
+ how much more its loads turn it than its weight holds it, in N·mm (`values.beyond`).
990
+ Then each way `frame.rack` pushes it, both senses, the least push at the top that tips it: under `frame.rack`'s
991
+ push (`"rack": { "load" }`, else `frame.push`, 20 N) it fails, naming the feet it tips over (`refs.on`), the feet
992
+ that lift (`refs.lifts`), the push's turn and the weight's hold in N·mm (`values.overturning`,
993
+ `values.restoring`), the push's height above the feet (`values.arm`) and the push that tips it (`values.tips`);
994
+ else it passes with the same figures. A 2020 box 200 x 200 x 940 weighs 24.8 N and tips at
995
+ 24.8 x 90 / 930 = 2.4 N. `frame.rack` gives that push beside its sway (`values.tips`). A frame held where
996
+ `"frame": { "supports" }` says is taken as bolted or clamped down, both ways, and is not checked: `frame.tip` says
997
+ so (info); give it feet to have it checked standing free. Feet in one line (a portal) tip over the ends of the
998
+ line; across it only their pads would hold it, which the model does not have, and `frame.tip` says so (info).
902
999
  - A panel (not a door) on a bay of the frame is a shear web in the model: one diagonal bar across the bay, free to bend
903
1000
  at both corners (a ball at one, pinned at the other, so it carries no twist and nothing in it spins free when the
904
1001
  modes split it into pieces), as stiff along it as the sheet in shear in series with its clips' grip. The clips' grip
@@ -925,14 +1022,23 @@ address stands for the faces near it, as `item@anchor` does (`"within"`, 10 mm b
925
1022
  height. The frame is solved again with that beam printed and every other as it is, and the beam is held to six
926
1023
  margins, each 1 where it just holds: every sag the frame checks (each load's point, each named point, each guide)
927
1024
  and the beam along its length, against the same limits as `frame.deflection`; its stress against its strength with
928
- twice the margin; Euler's load with twice the margin; its stress against the creep limit; every sag again with the
1025
+ twice the margin; the whole frame's buckling with it printed, solved as `frame.buckling`'s second finding is (each
1026
+ beam cut in four, in the case that squeezes it most) with twice the margin, or within 2% of the frame as drawn where
1027
+ that already buckles under twice its load (Euler's load for the beam alone with both ends pinned is given in words
1028
+ only: a post fixed at its foot and free at its top buckles at a quarter of it, and the whole frame's solve takes that
1029
+ in; where that solve is not found, the beam is taken free to sway at one end, at that quarter); its stress against
1030
+ the creep limit; every sag again with the
929
1031
  beam's modulus at half (`PRINTED_DEFAULTS.creep_modulus`, an estimate), its sag as it creeps; and where the task's
930
1032
  moves shake the frame, its lowest mode at twice their rate. The least is the beam's margin. Where the frame as drawn
931
1033
  already misses a sag (`frame.deflection` fails there in the beams' own material), that is no fault of printing: there
932
1034
  the printed beam is held to the drawn frame's own sag and 2% more, so it misses only where printing it makes that
933
- sag worse, and the frame's finding names each such point (`refs.missed`). A beam that holds says
934
- so (pass), with its pose and grams; one that does not says it needs its own material and the margin it misses by,
935
- `1 / margin`, and on what (info: a design choice, not a fault). It also names the joins that would need changing: a
1035
+ sag worse, and the frame's finding names each such point (`refs.missed`), saying where `frame.deflection` fails too
1036
+ and where it does not look: it checks the load points, named points and guides, not each beam along its length. A
1037
+ beam that holds says so (pass), with its pose and grams; one that does not says it needs its own material and the
1038
+ margin it misses by, `1 / margin`, and on what (info: a design choice, not a fault). A beam drawn printed is tried as
1039
+ it is drawn, in its own plastic, and stays printed: one that misses says so, and that a deeper section, a shorter
1040
+ span or a metal beam would hold. A 2020 post 400 mm tall fixed at its foot with 30 kg on its top, tried in PLA,
1041
+ buckles at about 315 N against its 295 N, 0.53 of the twice wanted: it misses. It also names the joins that would need changing: a
936
1042
  blind, end-tap or anchor join screws into the beam's end, where a printed beam has an insert, and a join on a face
937
1043
  other than the top lands where a printed beam is closed; a bracket or a gusset on its top slot takes either. Then
938
1044
  the beams that hold alone are printed together and solved once more, any that miss together put back the worst
@@ -963,6 +1069,7 @@ address stands for the faces near it, as `item@anchor` does (`"within"`, 10 mm b
963
1069
  | Sag limit with nothing tighter | span / 360 | International Building Code, Table 1604.3, floor members under live load (as reproduced in 780 CMR 1604.3) |
964
1070
  | Beam stress | \|N\| / A + \|My\| / Wy + \|Mz\| / Wz | Beam theory; the section moduli from the profile's rule set |
965
1071
  | A beam in compression | P = π² E I / L² (both ends pinned) | Euler's column; Roark's Formulas for Stress and Strain, 7th ed., table 15.1, case 1a |
1072
+ | A post fixed at its foot, free at its top (beam.printable, where the frame's buckling is not found) | P = π² E I / (2 L)², a quarter of the pinned load | Roark's Formulas for Stress and Strain, 7th ed., table 15.1, case 1b; else the whole frame's buckling factor |
966
1073
  | A printed fitting's moment | design load × its distance from the corner × its margin | The fitting's own finite-element margin at its design load, scaled linearly |
967
1074
  | The solve | Timoshenko beam elements, end springs condensed out | `@rulecad/fea/frame` (its README lists its sources) |
968
1075
  | Sway limit with nothing tighter | height / 400 | ASCE/SEI 7-22, Commentary to Appendix C, CC.2.2: drift limits in common use are 1/600 to 1/400 of the height |
@@ -976,17 +1083,17 @@ address stands for the faces near it, as `item@anchor` does (`"within"`, 10 mm b
976
1083
  | A bay's diagonal difference to accept (frame.square) | Σ t × span / d over the beams that set the opening, plus Σ s × span / d over its joins; root-sum-square beside it | The derivative of d = √(w² + h²) with a side, ∂d/∂w = w / d; stacked as an arm's error budget stacks its joints |
977
1084
  | A join's play s (frame.square) | 0.1 to 0.3 mm by kind; end-tap 0.25 mm | `JOIN_PLAY` in `@rulecad/frames`, estimates; end-tap is half ISO 273's medium clearance for M5 (5.5 mm) |
978
1085
  | A beam's twist at the tool | twist per metre × length × π / 180 × the tool's distance from the beam's axis | The profile's `twist_per_metre` (MISUMI's JIS special grade figure for its 2020 HFS5) |
979
- | A frame's growth (frame.heat) | α L ΔT, α = 23.4e-6 /K | 6063 aluminium (Wikipedia's table; suppliers' 6063-T5 sheets 23.4 to 23.5 µm/m °C), a community figure where the alloy's set gives none |
1086
+ | A frame's growth (frame.heat) | α L ΔT, α each beam's material's `expansion` | The material's set: Hydro's EN AW-6063, 6060 and 6005A sheets (23.5, 23.4, 23.3e-6 /K), item's (23.6), EN 1993-1-1 for S275 (12), the figures quoted from ASM's pages for 6061, 7075, 304 and Ti-6Al-4V (community); the plastics' are estimates (no maker's sheet gives one: PLA 68, PETG 60, ABS and ASA 90, TPU 150, PAHT-CF 23e-6 /K). Where a set gives none, 23.4e-6 /K, 6063's (FRAME_HEAT.expansion, community) |
980
1087
  | A printed beam's creep limit | 0.15 × its strength for its pose | Waseem et al. (2020), Polymers 12, 2962: printed PLA held at 0.3 of its strength broke in 1.2 to 2.3 hours; half that share an estimate |
981
1088
  | A printed beam's sag as it creeps | the frame solved with its modulus × 0.5 | An estimate (`PRINTED_DEFAULTS.creep_modulus`), until a sustained load on the beam coupon measures it |
982
1089
  | The beam coupon's sag, between two bars L apart | F L³ / (48 E I) | Roark's Formulas for Stress and Strain, table 8.1, case 1e (simply supported, load at the middle) |
983
1090
  | The beam coupon's modulus and strength | E × sag predicted / sag measured; stress of its own weight + stress per kg × kg at break | The solve is linear in E and in the load |
984
- | A printed fitting's softening | the plastic's heat deflection temperature, ISO 75 at 0.45 MPa, warned within 10 °C | The plastic's set (`pla.softening` 57 °C, `petg.softening` 69 °C, Bambu's data sheets); the 10 °C an estimate |
1091
+ | A printed fitting's or beam's softening | the plastic's heat deflection temperature, ISO 75 at 0.45 MPa, warned within 10 °C | The plastic's set (`pla.softening` 57 °C, `petg.softening` 69 °C, Bambu's data sheets; `abs.softening` 100 °C, Polymaker's PolyLite ABS sheet); the 10 °C an estimate |
985
1092
 
986
1093
  A worked check: a 2020 shelf frame, legs 400 mm, a 600 mm front beam joined blind to the legs 390 mm up, 5 kg at its
987
1094
  middle, sags 0.215 mm by hand with the joins rigid (a beam whose ends turn with the corners the legs and the side
988
1095
  beams' twist hold) and 0.310 mm with the blind joins' estimated 1.5 N·m/mrad springs; the solve gives the same to three
989
- figures (`packages/cad/test.mjs`, "frame checks: a shelf frame").
1096
+ figures (`packages/cad/test/frame-checks.test.mjs`, "frame checks: a shelf frame").
990
1097
 
991
1098
  Two more: a 2020 gantry beam, 600 mm, fixed at both ends, with 2.01 kg carried at its middle, rings first at 74.2 Hz;
992
1099
  the formula above gives 74.2 Hz (192 E I / L³ = 461.5 N/mm, M + 0.375 m = 2.1225 kg). An open 2020 cube, 420 mm
@@ -1019,6 +1126,9 @@ a brace in both bays that way about 240 times ("frame checks: an open cube racks
1019
1126
  not only the nearest: a head between the nuts and an end closed further along closes that way as much as the end,
1020
1127
  and the finding names each, with an item placed at that end (`foot1 off until then`). Where joins close both ways,
1021
1128
  the check fails and names the nut of that thread that goes in through the opening (`give "nut": "drop-in"`).
1129
+ Each nut takes its length of the slot, half either side of its screw (the nut set's `length`): two nuts whose
1130
+ lengths overlap, or a nut that runs under the head of a blind join in that slot (the head taken at its width), fail by name with how far, and a nut
1131
+ that runs past the beam's end fails as `fasten.slot`.
1022
1132
  - `frame.preload`: nuts with a way in that a join closes and no way that stays open (the other end capped by an item
1023
1133
  placed there, such as a foot) go in before that join is made. The finding names the beam, the slot, the end, the
1024
1134
  nuts and the join, and `cad order` and the build page list them as the step before the one that makes it
@@ -1041,9 +1151,11 @@ a brace in both bays that way about 240 times ("frame checks: an open cube racks
1041
1151
  cuts and joins allow passes, more warns that the bay leans. The build page's bays carry the same figures.
1042
1152
  - `frame.heat`, where the assembly gives `"frame": { "heat": { "air": 45, "built": 20, "heaters": [{ "name": "bed",
1043
1153
  "at": [150, 150, 60], "temperature": 60, "reach": 40 }] } }`: the frame grows from the air it was built in (`built`,
1044
- 20 °C where left out) to the air it runs in by its alloy's expansion, ΔL = α L ΔT, for the longest beam and for the
1045
- span of its beams each way (α from the alloy's set where it gives `expansion`, else 23.4e-6 /K for 6063, a community
1046
- figure). A frame of one alloy grows alike every way, so it stays square. Each printed fitting is held to its plastic's
1154
+ 20 °C where left out) to the air it runs in by its material's expansion, ΔL = α L ΔT, for each beam and for the
1155
+ span of its beams each way, the span at the largest of its beams' figures (α from the alloy's or plastic's set,
1156
+ `expansion`, which every set of the kit's metals and plastics gives; else 23.4e-6 /K for 6063, a community figure).
1157
+ A frame of one material grows alike every way, so it stays square; one of several says how far its beams grow apart
1158
+ over the longest. Each printed fitting, and each printed beam, is held to its plastic's
1047
1159
  `softening` (the heat deflection temperature its set gives, ISO 75 at 0.45 MPa) at the air's temperature, or a
1048
1160
  heater's where its drawn parts come within the heater's `reach` of its middle: over it fails, within 10 °C of it
1049
1161
  warns (`FRAME_HEAT.margin`, an estimate), and the rest pass in one finding naming the nearest. Bad input is refused by
@@ -1051,8 +1163,9 @@ a brace in both bays that way about 240 times ("frame checks: an open cube racks
1051
1163
  - A blind or end-tap join's head on a slot's lips: `fasten.seat` gives what the lips take, the head's circle less the
1052
1164
  strip of the opening across it (A = π D² / 4 - 2 (c √(R² - c²) + R² asin(c / R)), R half the head, c half the opening), at the beam alloy's strength, and the torque for that force (T = K d F, the nut
1053
1165
  factor an estimate), or the screw tightened fully where that is less. An M5 button head on a MISUMI 6 mm slot:
1054
- 17.9 mm² of al6n01-t5 at 205 MPa takes 3677 N, 3.68 N m. The lips' bending is not counted: an estimate, until the
1055
- joint rig (issue 264) measures one.
1166
+ 17.9 mm² of al6n01-t5 at 205 MPa takes 3677 N, 3.68 N m, and it is tightened to half that, 1.83 N m at most
1167
+ (`fixings.load_margin`: a torque's clamp scatters by a quarter to a third). The lips' bending is not counted: an
1168
+ estimate, until the joint rig (issue 264) measures one.
1056
1169
 
1057
1170
  ### A frame from a size
1058
1171
 
@@ -1096,8 +1209,12 @@ screws, the cut list, the frame checks, the build page) sees a hand-drawn frame.
1096
1209
  does.
1097
1210
  - A gantry's outside height is its inside plus three widths: the two rings and `g`, which lies on the top side beams
1098
1211
  between the uprights' tops, its top level with theirs.
1099
- - `"feet"`: `foot`, `levelling`, `castor` or `stacking` (printed) or a bought foot's set by name, under the upright
1100
- beams' lower ends. A printed foot, levelling foot or stacking foot is screwed into its upright's end: the end is
1212
+ - `"feet"`: `foot`, `levelling` or `stacking` (printed), a bought foot's set by name, or a printed castor plate,
1213
+ `{ "kind": "castor", "holes": [100, 40], "thread": "M6" }` (the castor's bolt holes' spacing and bolts from its
1214
+ maker's drawing, and `"top"`, its top plate's thickness, 3 mm where left out, an estimate), under the upright beams'
1215
+ lower ends; `"castor"` alone is refused, naming holes and thread. A castor plate's four bolts, with their nuts and
1216
+ the washers their seat on the plastic needs, go on `cad list`, and its `fitting.seat` finding gives the torque to
1217
+ tighten them to. A printed foot, levelling foot, castor plate or stacking foot is screwed into its upright's end: the end is
1101
1218
  tapped as the foot's model says (an M5 tap 18.5 mm deep in 2020) and a `fasten` holds it (an M5x16 cap screw), so
1102
1219
  the tap is on the sheet, the screw on the list and its step in the build. Where the join drills the uprights
1103
1220
  (`blind`, `end-tap`, `hidden`, `anchor`: an access or clearance hole at the bottom ring's centre line), the bottom
@@ -1106,7 +1223,9 @@ screws, the cut list, the frame checks, the build page) sees a hand-drawn frame.
1106
1223
  beside its body (`cad plates`, `cad list`) and screwed in by hand. `"caps"`: the other open ends take printed end caps (`true`, the default), a bought end cap's
1107
1224
  set by name, or nothing (`false`, and `join.end` names them).
1108
1225
  - `"braces"`: the upright sides (`front`, `back`, `left`, `right`) whose corners are stiffened against racking: each
1109
- join in that side takes a printed corner bracket on drop-in nuts. `"panels"`: `{ "sheet", "thickness", "sides" }`,
1226
+ corner of that side keeps the join asked for and gains a printed corner bracket beside it, on drop-in nuts, so
1227
+ bracing a side only stiffens it (where the join is a printed bracket already, that bracket is drawn braced; a
1228
+ bracket join that is bought, or not chosen yet, is refused with braces). `"panels"`: `{ "sheet", "thickness", "sides" }`,
1110
1229
  one sheet over each side named (every side with a bay by default), on drop-in nuts.
1111
1230
  - Refused by name, before anything is built: no size or both, a size that leaves no room for the beams, a profile
1112
1231
  that is not square, a join no generator arranges (mitre, splice, pivot, a printed node), a blind join on a profile
@@ -1154,17 +1273,25 @@ joins' springs, the loads and mounted items):
1154
1273
  table's four legs are one group and each pair of rails another.
1155
1274
  - Joins that fit: a design is only solved where every join of a grouped beam still goes together with the profiles
1156
1275
  chosen. A blind join needs a bore in a's end and a slot in b's face whose opening passes the bore's screw and holds
1157
- its button head under the lips, the head no wider than the slot is under them; an end-tap join a bore in a's end,
1276
+ its button head under the lips, the head no wider than the slot is under them, and a straight hex key that reaches
1277
+ the head through the access hole across b (OpenBeam's slot floor, slanting down to a narrow groove, stops a 2 mm
1278
+ key short of an M3 head in its own slot); an end-tap join a bore in a's end,
1158
1279
  and a cap head wider than the opening of a slot on b's far face; a bought fitting must fit both profiles (its set's
1159
- `fitting.fit`). A printed fitting is drawn for the profiles it joins. A group whose next lighter profile breaks a
1280
+ `fitting.fit`). A printed fitting is drawn for the profiles it joins; a pair of profiles it cannot be drawn for is a
1281
+ join that does not go together. A group whose next lighter profile breaks a
1160
1282
  join says so as what set it ("set by a join": with 1515-openbeam, an M5 screw from a 2040's bore does not pass
1161
1283
  OpenBeam's 3.2 mm slot opening).
1162
1284
  - Racking: where the assembly gives `"frame": { "rack" }` or `"limits": { "rack": mm }`, each way across the side
1163
1285
  push `frame.rack` uses, alone and with no weight, is a case of its own, and the sway at each top node is held to
1164
1286
  the limit `frame.rack` uses (or `limits.rack`). A way nothing holds the frame (one plane on pinned feet) is said and
1165
- left out: a brace or fixed feet hold it, not a profile. The joins' springs are as drawn and do not grow with the
1166
- profile, so a frame that racks on its joins' bending may meet the limit with no profile in the list: the sizing then
1167
- gives the nearest and says racking is what it misses.
1287
+ left out: a brace or fixed feet hold it, not a profile. A frame that racks on its joins' bending may meet the limit
1288
+ with no profile in the list: the sizing then gives the nearest and says racking is what it misses.
1289
+ - Join springs follow the profile: each profile tried is solved on the springs its own joins would have, worked out
1290
+ as `cad check` works them out for a frame drawn in it. A blind or end-tap join's estimate grows as the cube of its
1291
+ beam's width over 20 mm (a 4040's is eight times a 2020's); a bought fitting keeps its set's own figures; a printed
1292
+ fitting is drawn again for the new profiles and its stiffness found by finite elements. Each is worked out once a
1293
+ pair of profiles. So a frame whose sag rests on its joins (a cantilever, an open frame) is not sized down onto a
1294
+ heavier profile's stiffer joins, nor refused a heavier profile on a lighter one's softer joins.
1168
1295
  - `"limits"`: in place of the checks' own. Left out, each is the check's: the sag at each load, named point and guide
1169
1296
  as `frame.deflection` holds it (a guide's rail parallelism, `frame.limit`, the task's accuracy, else the span over
1170
1297
  360; a load that moves with a joint anywhere along its beam), each beam's stress with the joins' springs and with
@@ -1175,7 +1302,12 @@ joins' springs, the loads and mounted items):
1175
1302
  - `"by"`: `mass`. No profile set in the kit gives a price per metre yet, so `cost` is refused by name.
1176
1303
 
1177
1304
  `cad check` gives `frame.size`: each group's profile, its mass, the limit that set it and how many times inside that
1178
- limit it stands. `cad frame <project>/<assembly> --size` prints the table:
1305
+ limit it stands. The stress limit cannot reach a member with no strength or no section modulus: each join's rigid
1306
+ link, each panel, a beam whose alloy gives no strength. Those it passed over are said once, as
1307
+ `frame.size.unchecked` (info): `the stress limit does not reach 12 join links (no strength and no section modulus):
1308
+ their stress is not checked by the sizing` (`frame.stress` holds each join's moment against its fitting's strength, where the kit gives one);
1309
+ `--size` prints the same under its limits, and `--json` lists them as `unchecked`. `cad frame <project>/<assembly>
1310
+ --size` prints the table:
1179
1311
 
1180
1312
  ```
1181
1313
  sized: 3.348 kg of grouped beams (drawn 2.74 kg), 14 designs solved (every design ranked by mass)
@@ -1198,12 +1330,17 @@ beam's end that butts against a face moves with that face as the other beam chan
1198
1330
  join at an end that now has two bores (a 2040) becomes a join a bore. A drawn beam whose new depth would stand past
1199
1331
  the end of the beam it meets (a rail flush with its legs' tops, now a 2060) moves along that beam by as much, so its
1200
1332
  face there stays where it was, if the move fits at its other end too; where it does not, nothing is written and the
1201
- refusal names the join and the beam. Otherwise beams keep their lines. Check the
1202
- written frame: its join checks hold every screw, nut and length, where the sizing held each join's screw and head to
1203
- its slot.
1204
-
1205
- What it rests on: the joins' springs are as drawn (an estimate until the joint rig measures them) and do not change
1206
- with the profile; the sizing solves the drawn layout, with each beam's line where it is drawn, so a figure on the
1333
+ refusal names the join and the beam. Otherwise beams keep their lines. A printed foot on a beam's end takes the new
1334
+ profile's end bore: its tap and its fasten's screw are worked out again from the foot for that profile (a 1515's M3,
1335
+ not the 2020's M5 it was drawn with). Where every beam already has the profile chosen for it, nothing is written, and a
1336
+ generated frame stays generated. Before it writes, `--write` checks the design it would write as `cad check` does (with
1337
+ `--dry-run` too), and writes nothing that would fail: it names the failing checks, the first of them in full, so fix
1338
+ what they name or leave the profile that breaks them out of the list. The sizing holds each join to its slot (the
1339
+ screw through the opening, the head under the lips, and a blind join's hex key able to reach the head through its
1340
+ access hole); the check holds every screw, nut, length and seat.
1341
+
1342
+ What it rests on: the joins' springs are estimates until the joint rig measures them, each worked out for the
1343
+ profiles tried; the sizing solves the drawn layout, with each beam's line where it is drawn, so a figure on the
1207
1344
  written frame differs a little (the table in HFS5, its 2040 rails lowered 10 mm to keep its top level, sags 0.87 mm
1208
1345
  at a long rail's middle as sized and 0.83 mm as written). With 512 designs or fewer every one is ranked by mass and the first that meets the limits is the
1209
1346
  lightest; with more, the search goes by steps and lands near the lightest. Racking (`frame.rack`) is not a sizing
@@ -1222,7 +1359,7 @@ limit: it is a bay's to brace, not a beam's to thicken.
1222
1359
 
1223
1360
  Once an assembly is checked, these say how to make it. They all read the assembly itself, so they can't disagree with it.
1224
1361
 
1225
- - `cad order <project>/<assembly>`: the order it goes together in, each step with the part and what fastens it. A `fasten` names its screws on the step where its parts are both there, with the key that turns them and how tight: its `torque`, or the most the seat under the head takes (`2. bracket goes on: bracket fastened to base (2 × M3x10 cap) with a 2.5 mm hex key, to 0.33 N m at most (what the seat takes)`); `--json` gives each as `{ fit, fastener, count, key, tighten: { torque, given } }`, and the build page shows the same. What is not a screw (pins, a clip) is named on a fit that fastens: `"fastener": "push pin", "count": 2` puts it on the shopping list and the step. `--preview` writes a picture of each step to `.preview/`: what's there, and the new part held off along the way it goes on. The order is found by taking the assembly apart, so a part goes in after what it's fastened into, a bearing before its shaft, and a nut trapped by a wall before the neighbour that traps it. A part goes on along a straight line that clears everything already there; which line comes from the part as drawn.
1362
+ - `cad order <project>/<assembly>`: the order it goes together in, each step with the part and what fastens it. A `fasten` names its screws on the step where its parts are both there, with the key that turns them and how tight: its `torque`, or half what the seat under the head takes, held for a screw in a thread in plastic to half what the thread is estimated to strip at (`2. bracket goes on: bracket fastened to base (2 × M3x10 cap) with a 2.5 mm hex key, to 0.16 N m at most (half what the seat takes)`); `--json` gives each as `{ fit, fastener, count, key, tighten: { torque, given } }` (with `thread: true` where the thread sets the torque, `load: true` where the joint's load does), and the build page shows the same. What is not a screw (pins, a clip) is named on a fit that fastens: `"fastener": "push pin", "count": 2` puts it on the shopping list and the step. `--preview` writes a picture of each step to `.preview/`: what's there, and the new part held off along the way it goes on. The order is found by taking the assembly apart, so a part goes in after what it's fastened into, a bearing before its shaft, and a nut trapped by a wall before the neighbour that traps it. A part goes on along a straight line that clears everything already there; which line comes from the part as drawn.
1226
1363
  - `cad order` on a **frame** (an assembly with `joins`) gives its build from bars to a square frame, in numbered steps:
1227
1364
  1. **Cut** the beams: each mark's count and length, the bars to buy and the cuts on each (the cut list).
1228
1365
  2. **Drill and tap** each mark as its cut-and-drill sheet shows (each mark's work and its sheet's file).
@@ -1255,7 +1392,7 @@ Once an assembly is checked, these say how to make it. They all read the assembl
1255
1392
  Every screw is reached in this order: what stands over a screw (`fasten.access`, or a fit's `access`) goes on
1256
1393
  after the step that drives it. Where a side built flat would break that, the side is built on the frame instead;
1257
1394
  where no build does, it is refused with the screw and what stands over it. It ends with the tightening of each
1258
- kind of join (`blind (16 joins, M5x12 button with a 3 mm hex key): 3.68 N m`). A slide-in nut in a stretch of slot
1395
+ kind of join (`blind (16 joins, M5x12 button with a 3 mm hex key): 1.83 N m`). A slide-in nut in a stretch of slot
1259
1396
  that joins close at both ends (`frame.nut`) is shut in by whichever of the two joins is made second, in any order:
1260
1397
  the build is refused, naming the slot, the nuts, the two joins, and the nut that goes in through the opening
1261
1398
  (`frame/box: x1's top slot: 2 slide-in nuts (...) for plate would be shut in between the blind join of x1.a to
@@ -1470,10 +1607,15 @@ the rest by addresses (`examples/bench` `axes/x-belt` is one, written by the edi
1470
1607
  - `belt.length` gives the path by the belt's pitch line, the length to cut it (whole teeth that stretch to the path at
1471
1608
  the tension) and to buy, rounded up to whole metres (`cad list` shows `gt2-belt-6 x 1000 mm`). `belt.tension` holds
1472
1609
  each span, with the push and the weight along the travel, between the belt's least static tension and its rated
1473
- tension. `belt.rub` fails a run that rubs the beam, the rail, the carriage, the clamp or anything else on the
1474
- carriage (by its box) anywhere through the travel, naming the run, the part and where; for a part on the carriage it
1475
- gives the `height` that clears it by 1 mm. Its pass says how far the return run passes over the carriage's top
1476
- (3.4 mm for an MGN12H on a 2020), the room a part on the carriage's free holes has under it.
1610
+ tension. The motor holds the pulley, so the carriage hangs between the pulley's span a and the idler's span b, each
1611
+ as stiff as one over its length, and a push F changes span a by F b / (a + b) and span b by F a / (a + b): half each
1612
+ only with the two spans equal. The check walks the travel for where the spans differ most (on the kit's layouts, the
1613
+ travel's start, near the motor, where span a is short and takes most of the push), and says where the carriage is
1614
+ then, which span it is, both lengths and its share; `values.at` is that place, mm along the beam. On the bench's X
1615
+ axis span a takes 92% of the push there. `belt.rub` fails a run that rubs the beam, the rail, the carriage, the
1616
+ clamp or anything else on the carriage (by its box) anywhere through the travel, naming the run, the part and where;
1617
+ for a part on the carriage it gives the `height` that clears it by 1 mm. Its pass says how far the return run passes
1618
+ over the carriage's top (3.4 mm for an MGN12H on a 2020), the room a part on the carriage's free holes has under it.
1477
1619
  `belt.line` fails an idler off the pulley's line past 0.25° (an estimate). `belt.tensioner` says where the block
1478
1620
  must slide along its slot to tension the belt as cut, and fails when the slot has no room left there, saying how
1479
1621
  much shorter or longer to cut it. `belt.stretch` gives the belt's stretch under the push, the term `belt stretch` in
@@ -1573,6 +1715,11 @@ dropped, and `cad check` tests the part for one piece and nothing starting in mi
1573
1715
  `cad optimise <project>/<problem> --watch [port]` runs it afresh and serves a live view at `http://127.0.0.1:8090/`:
1574
1716
  the densities as they change (a 3D part as a surface you can turn, and from three sides), a chart of its compliance and how much it still changes, with a scrubber to look back at any earlier step, its run time and time left, the machine it runs on, and a button that stops the run. It shows the end for ten minutes after the run finishes.
1575
1717
  It listens on this computer only. To watch from elsewhere, reach it through a private network such as Tailscale.
1718
+ The page answers only when it is opened by one of this computer's own names (`localhost`) or by an address written
1719
+ out in numbers (`http://100.101.102.103:8090/`, a Tailscale address), and only the page itself can stop the run: a
1720
+ web page from another site can't read the view or press its button. To open it by another name, such as a Tailscale
1721
+ name, give that name with `--allow-host` (`--watch --allow-host my-laptop`; several names may be given, or one
1722
+ `--allow-host` with names separated by commas).
1576
1723
 
1577
1724
  Every run is kept to watch again. `cad optimise` writes `.preview/<project>/<problem>-run.html`: the same page,
1578
1725
  reading its steps from the file, so it opens with no server and can be sent to someone. Drag the slider or the chart
@@ -1700,13 +1847,19 @@ they bend. To check a final shape, give the analysis a smaller `cell`:
1700
1847
 
1701
1848
  The part is then analysed on those cells and again on cells a quarter bigger. For each load case, `cad check`
1702
1849
  reports:
1703
- - **Stiffness and its change:** under 5% from the bigger cells and it has settled; more, and the cells are too big.
1850
+ - **Stiffness and its change (`fea.settled`):** under 5% from the bigger cells and it has settled; more, and the cells
1851
+ are too big. With `min_safety`, the peak stress must move under 5% too, as cells can be fine enough for the
1852
+ stiffness while the stress is still some percent out.
1704
1853
  - **Members too thin for the cells:** a warning when more than 5% of the part lies in members under four cells
1705
1854
  thick (what an opening of two cells takes away), where a cell's stiffness is a rough figure: use a smaller cell.
1706
1855
  - **Peak stress, where it is, and the safety factor:** against the material's strength (its weaker one across a
1707
1856
  print's layers, where the rule set has `strength_z`), and its fatigue strength where it has one. With
1708
- `min_safety`, a case below it fails. Peak stress at a sharp inside corner keeps rising as cells shrink, so read it
1709
- with its change.
1857
+ `min_safety`, a case below it fails. The stress is read at the part's surface (`@rulecad/fea`'s surface stress),
1858
+ where bending puts its peak: within a few percent of beam theory on members four cells thick or more. (Read at the
1859
+ cells' centres, half a cell inside, it came out 10 to 30% low, and a PLA cantilever beam theory puts at 2.6 times
1860
+ under its strength passed `min_safety` 3.) Peak stress at a sharp inside corner, or beside a support or load held
1861
+ at a few points, keeps rising as cells shrink, so read it with its change: give a corner a fillet, and a support
1862
+ or load the area it really acts on.
1710
1863
  - **The largest movement anywhere, and where.**
1711
1864
 
1712
1865
  A report goes in `.preview/` (`<object>-report-<problem>.md`, and `.json`), with what the analysis doesn't cover. A
@@ -1771,7 +1924,7 @@ about 10 s, and a re-check after an edit measures only what the edit moved. The
1771
1924
  recently used builds, keyed by what a build is made from: the design's code, its values resolved, its parts' names
1772
1925
  and roles, the rule sets and the tool's own code; a rule's words, a label or the version change nothing it builds,
1773
1926
  so they don't start one. A lamina mechanism's slow stages (its physics, a flooded frame's probe) are kept apart in
1774
- `.cache/stages/`, keyed by their own inputs, so a build that changes only what comes after them (a strap, a check)
1927
+ a folder of each design's own in `.cache/stages/`, keyed by their own inputs, so a build that changes only what comes after them (a strap, a check)
1775
1928
  takes minutes rather than the twenty a launcher's physics takes; the design's sandbox reads them and hands back what
1776
1929
  it made for the tool to write. `CAD_NO_CACHE=1` computes everything afresh (and keeps it).
1777
1930