@rulecad/cad 0.8.0 → 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.
- package/AGENTS.md +24 -10
- package/CHANGELOG.md +404 -0
- package/EXAMPLES.md +40 -38
- package/README.md +193 -67
- package/TUTORIAL.md +2 -2
- package/bin/cad.mjs +2250 -512
- package/lib/animate.mjs +173 -49
- package/lib/assembly.mjs +1847 -434
- 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/carried.mjs +201 -0
- package/lib/clone.mjs +194 -42
- package/lib/design.mjs +649 -121
- package/lib/drive.mjs +187 -63
- package/lib/edit.mjs +899 -191
- package/lib/errors.mjs +16 -3
- package/lib/explain.mjs +62 -13
- package/lib/fasten.mjs +2702 -507
- package/lib/fittings.mjs +715 -121
- package/lib/fixings.mjs +21 -9
- package/lib/framebuild.mjs +790 -175
- package/lib/framecheck.mjs +1901 -368
- package/lib/framegen.mjs +100 -22
- package/lib/frameheat.mjs +225 -42
- package/lib/frameprint.mjs +513 -108
- package/lib/frames.mjs +81 -17
- package/lib/framesize.mjs +792 -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 +123 -21
- 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 +438 -68
- package/lib/layout.mjs +2 -1
- package/lib/links.mjs +149 -42
- package/lib/list.mjs +326 -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 +579 -130
- package/lib/machine.mjs +372 -74
- package/lib/magnets.mjs +162 -44
- package/lib/measured.mjs +417 -94
- package/lib/mesh.mjs +526 -119
- package/lib/meshcmd.mjs +215 -60
- package/lib/motors.mjs +1021 -213
- package/lib/motorsvg.mjs +114 -32
- package/lib/names.mjs +3 -1
- package/lib/optimise.mjs +978 -283
- package/lib/order.mjs +519 -112
- package/lib/panels.mjs +482 -94
- package/lib/parts.mjs +78 -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 +15 -5
- package/lib/sandbox-hooks.mjs +77 -19
- package/lib/sandbox-run.mjs +117 -18
- package/lib/sandbox.mjs +509 -60
- package/lib/schema.mjs +42 -11
- package/lib/seats.mjs +227 -49
- package/lib/services.mjs +261 -52
- package/lib/sheet.mjs +851 -178
- 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 +111 -28
- package/lib/wires.mjs +228 -45
- package/lib/workspace.mjs +197 -12
- package/package.json +19 -19
- package/schemas/assembly.schema.json +2 -2
package/AGENTS.md
CHANGED
|
@@ -77,6 +77,10 @@ variable says which rule it comes from. Follow these steps; they're what makes a
|
|
|
77
77
|
`@rulecad/gears`, `@rulecad/motors`, `@rulecad/fixings` and files in their project, and can't write files or start
|
|
78
78
|
programs. To see a value while designing, `console.log` it: it comes
|
|
79
79
|
out with the command's output. A misspelt `v.name` stops the build and says which name was meant.
|
|
80
|
+
A design may run for an hour (3600 s) and hold 4096 MB: `design.time` or `design.memory` means it was stopped
|
|
81
|
+
there, most often by a loop that never ends. Fix the loop; raise `designTimeout` or `designMemory` in
|
|
82
|
+
cad.config.json only for a design that is truly that slow (a raise above the defaults counts once the user has
|
|
83
|
+
run `cad trust`).
|
|
80
84
|
- Something printed under the part and removed afterwards is a named `support` part (`return { cap, pillar }`, both
|
|
81
85
|
described in the .json's `parts`), not part of the shape. Look at `cad preview --explode` too.
|
|
82
86
|
|
|
@@ -104,7 +108,9 @@ variable says which rule it comes from. Follow these steps; they're what makes a
|
|
|
104
108
|
and name the screw by thread and head with no length: the check chooses one. It reads the holes from the parts as
|
|
105
109
|
drawn: one axis through the stack, a clearance hole in each part passed, a pilot, insert or nut at the far end, the
|
|
106
110
|
length chosen from what is sold, thread engaged, the seat under the head and the key's way to it, and `cad list`
|
|
107
|
-
counts the screws.
|
|
111
|
+
counts the screws. `fasten.stack` fails where the parts do not meet along the screw (a part placed wrong: move it,
|
|
112
|
+
never lengthen the screw), and `fasten.wall` warns where too little plastic is left round the far hole (move the
|
|
113
|
+
hole in or thicken the part). Report what it finds with its numbers, and fix the part, never the relation, to make it pass.
|
|
108
114
|
- **A frame is beams and joins, never loose boxes.** Each beam is a `"beam"` item of a profile from a rule set (the
|
|
109
115
|
kit's or one in `rules/`, never sizes typed into an object), placed by its ends; each meeting of two beams is a
|
|
110
116
|
declared join, and its drilling, tapping, screws and nuts follow from it: never draw a join's holes or type its
|
|
@@ -123,29 +129,36 @@ variable says which rule it comes from. Follow these steps; they're what makes a
|
|
|
123
129
|
or slot: choose another set, never edit the set to pass. The other kinds are checked where they meet and say their
|
|
124
130
|
fitting comes later (`join.fitting`). Move the beam to fix `join.geometry`, never the address, unless the
|
|
125
131
|
address is what was wrong; `join.stiffness` says whether it rests on an estimate or on the joint rig's
|
|
126
|
-
measurement (and its date): report it as it says. A `join.drop` is a prediction for a beam held by one join
|
|
127
|
-
|
|
132
|
+
measurement (and its date): report it as it says. A `join.drop` is a prediction for a beam held by one join and nothing
|
|
133
|
+
else, from the frame's solve on the supports it is given (or, on the joint rig, its base beam held along its
|
|
134
|
+
length), to measure and write back with `cad measured`, never a figure to tune. `frame.deflection` gives each sag twice, on
|
|
128
135
|
the joins' springs and with the joins rigid: report the first with what it rests on (`refs.restsOn`), never the
|
|
129
136
|
rigid one alone. Say where the frame stands with `"frame": { "supports" }` or fitted feet, not by moving beams. A `frame.solve` warning that its supports are guessed means neither is given.
|
|
130
137
|
`frame.rack` gives the racking stiffness each way and the gain each change (gussets, a brace, a panel) solves to:
|
|
131
138
|
report the stiffness, the gain and the change it advises, and say the push and the joins' springs are estimates.
|
|
139
|
+
`frame.tip` fails a frame standing free on its feet that its load, or that push at its top, tips over: report the
|
|
140
|
+
push that tips it (`values.tips`) and the feet it lifts (`refs.lifts`), then widen its base or carry the load nearer
|
|
141
|
+
the middle or lower. Say it is bolted down with `"frame": { "supports" }` only where it really is; never lower the
|
|
142
|
+
push to make it pass.
|
|
132
143
|
`frame.frequency` gives the lowest mode against what the machine excites: report it with its pose, and look at
|
|
133
144
|
`<assembly>.frame-mode.svg` from `cad beams` to see what moves. To choose profiles, give `"frame": { "size": {
|
|
134
145
|
"profiles": [...] } }` and read `frame.size` (or `npx cad frame <project>/<assembly> --size`): report each group's
|
|
135
146
|
profile with the limit that set it (or the join a lighter profile could not make) and its margin, never pick a
|
|
136
147
|
profile by hand where the sizing can; give `"rack"` to hold racking too; write it with
|
|
137
|
-
`--size --write
|
|
148
|
+
`--size --write`, which checks the design it would write and writes nothing that fails (it names the checks: fix
|
|
149
|
+
what they say, or leave out the profile that breaks them), then check again. A task on a guide counts the beam's sag (the
|
|
138
150
|
frame's own figure where the frame is solved), straightness and twist in `task.accuracy`: report the biggest term
|
|
139
151
|
as it is named. `frame.heat` (given `"frame": { "heat": { "air": 45 } }`) says how much the frame grows and holds
|
|
140
|
-
each printed fitting to its plastic's softening point: move a failing
|
|
141
|
-
that softens higher, never raise the softening figure. `beam.printable` (given `"frame": { "printed": "petg" }`)
|
|
152
|
+
each printed fitting and printed beam to its plastic's softening point: move a failing part from the heat or print it
|
|
153
|
+
in a plastic that softens higher (a beam can be metal), never raise the softening figure. `beam.printable` (given `"frame": { "printed": "petg" }`)
|
|
142
154
|
says which beams could be printed and the margin each misses by: report the margin and what governs it, say it
|
|
143
155
|
rests on estimates (the printed section, creep) until the beam coupon is measured, and name the joins it says need
|
|
144
156
|
changing. A `beam.coupon` sag or break is a prediction to measure on the bench and write back with `cad measured`,
|
|
145
157
|
never a figure to tune; `beam.creep` fails a printed beam held too hard for months: a deeper section or aluminium.
|
|
146
158
|
A beam that needs slots in more than its top face prints standing up from the metal's profile
|
|
147
159
|
(`"printed": { "pose": "standing", "end": "nut" }`): its tapped end takes the thread `beam.end` names, and a foot
|
|
148
|
-
under it takes that `"thread"`. Report each printed beam's pose, grams and the sag `frame.deflection` gives
|
|
160
|
+
under it takes that `"thread"`. Report each printed beam's pose, grams and the sag `frame.deflection` gives, after creep too where it says so (an
|
|
161
|
+
estimate).
|
|
149
162
|
- **A frame for a size starts from a generator**: `"frame": { "kind": "box", "inside": [w, d, h], "profile",
|
|
150
163
|
"join": "blind" }` (also portal, table, gantry, shelf) expands into beams, joins, feet and caps before anything is
|
|
151
164
|
checked. Ask by `inside` for what it must enclose, `outside` for what it must fit in; never work the lengths out by
|
|
@@ -196,7 +209,8 @@ variable says which rule it comes from. Follow these steps; they're what makes a
|
|
|
196
209
|
- **A part screwed onto a beam is a `fasten` into a slot**: `"into": "x1.top"` (or `x1.top.2`, or `x1.top@120`, the
|
|
197
210
|
middle of its screws), the
|
|
198
211
|
part's holes drawn with `v.fixings` at the slot's spacing, `"nut"` the slot nut's kind. `fasten.slot` fails a hole off
|
|
199
|
-
a slot's centre line, with the distance: move the hole.
|
|
212
|
+
a slot's centre line, with the distance: move the hole. It fails a nut that runs past the beam's end, and
|
|
213
|
+
`frame.nut` two nuts that crowd one stretch of slot: move the part along the beam. `frame.nut` fails slide-in nuts in a slot that joins close
|
|
200
214
|
at both ends: use the kind it names (`"nut": "drop-in"`). `frame.preload` lists nuts to load before a join; tell
|
|
201
215
|
the user, and `cad order` shows them on the step.
|
|
202
216
|
- **A frame's build is `cad order`**: from bars to a square frame in numbered steps (cut, drill and tap, sides built
|
|
@@ -254,8 +268,8 @@ variable says which rule it comes from. Follow these steps; they're what makes a
|
|
|
254
268
|
region is never emptied: if `cad optimise` says part of one has nothing holding it up, give the part more material
|
|
255
269
|
to stand it on, or keep less. `cad check` tests the part for one piece and nothing starting in mid-air.
|
|
256
270
|
- Before reporting numbers for a final shape, verify them: give the `analysis` a smaller `cell` (solids: about a
|
|
257
|
-
third of the problem's) and check
|
|
258
|
-
factor, and where the peak stress is.
|
|
271
|
+
third of the problem's) and check it has settled (`fea.settled`: the stiffness, and with `min_safety` the peak
|
|
272
|
+
stress too). Report the verified numbers, the safety factor, and where the peak stress is.
|
|
259
273
|
- For a part that must not break (a lever, a pedal), give its problem a `"stress"` limit (the material's strength
|
|
260
274
|
over a safety factor) instead of a `"volume"`: the lightest layout under it. Then verify it on finer cells.
|
|
261
275
|
Add `"robust": true` so it holds made a little thin and a little thick too (`cad optimise` prints both copies'
|
package/CHANGELOG.md
CHANGED
|
@@ -5,8 +5,412 @@ print (a hole's diameter, a seat's depth, a part's outline). Each release lists
|
|
|
5
5
|
its reason. A **fasten** is an entry in an assembly's `"fasten"` list: one screwed joint, naming the screw by thread
|
|
6
6
|
and head, the parts it passes through and the part it ends in.
|
|
7
7
|
|
|
8
|
+
## 0.9.0: belt spans shared by their lengths; two joins at one end add their springs; generated frames on castors build, with the castors' bolts on the list; unused names and silent error handling tidied, with no change in behaviour; a design that runs for ever or fills memory is stopped, with design.time or design.memory; a fasten fails across air between its parts, warns on thin walls round its far hole, and holds a slot nut's whole length in its slot; feet are checked at the load the frame puts on them; a flat part's analysis reads box, polygon and part supports and loads as cad optimise does; the kit's code is laid out by a formatter, so cached builds are made again once; frame sizing solves each profile it tries on that profile's own join springs; frame.size says which members its stress limit could not check; cad frame --size --write checks the design it would write, and writes nothing that fails; frame.tip, a frame that would tip over; a gear mesh fails when the two gears' teeth sit at different heights along their axes; gear meshes in an assembly are judged where their axes are, with the room under their tips; meshes, zips and board models from elsewhere are limited, and malformed ones refused in plain words; join.drop predicts from the real frame, and skips beams held elsewhere; cad link refuses a model the page would turn away, using model-link's own checks; live views answer only to this computer's own names, and only their own page can stop a run; the motor checks count the weight of the parts a motor moves, and work for slides; needs Node 22.13 or later, the version the kit is tested on; cad check shows printcheck's overhang and hole findings; printed beams are checked for real buckling, sag after creep and softening; what a sandboxed design hands back for the caches is capped, and kept apart from other designs' results; a screw's tightening limit follows one rule with a load and without, a torque given is held against a plastic thread, and screws sharing a load are reckoned at the torque they are all tightened to; strength checks read the stress at a part's surface; links out of the workspace are refused, for designs, rule sets, project files and targets
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- `belt.tension` shared the carriage's push half and half between the belt's two spans, which holds only with the
|
|
13
|
+
carriage in the middle. The motor holds the pulley, so each span is as stiff as one over its length and the short
|
|
14
|
+
one takes the most: near the travel's start, by the motor, span a takes about 90% of the push. The check now walks
|
|
15
|
+
the travel for the worst place and fails a belt whose slack span falls below its least static tension there,
|
|
16
|
+
saying where the carriage is, which span it is, both lengths and its share. Its findings carry `values.at` (the
|
|
17
|
+
carriage's middle, mm along the beam), `span`, `a`, `b` and `share` beside `slack` and `tight`.
|
|
18
|
+
- What changes when you upgrade: every belt's slack and tight figures move apart (the bench's X axis from 24.2 to
|
|
19
|
+
25.8 N to 23.46 to 26.54 N), and a fast or heavy belt axis near its limit now fails and asks for more tension or
|
|
20
|
+
less acceleration. No printed size moves.
|
|
21
|
+
|
|
22
|
+
- Where two joins hold one beam end at the same place (a printed brace bracket beside the blind join asked for), the
|
|
23
|
+
frame model put two rigid links between the same points, which left the solve with a freedom nothing held, and
|
|
24
|
+
kept only one of the two springs. It now puts one link and holds that end by both springs side by side, their
|
|
25
|
+
stiffnesses added, in frame checks and in frame sizing alike.
|
|
26
|
+
- A generated frame's `frame.generated` says how many corners are braced: "16 joins (blind), 8 braced with printed
|
|
27
|
+
brackets", or, on printed bracket joins, how many of them are drawn braced.
|
|
28
|
+
|
|
29
|
+
For someone upgrading: a generated frame with `braces` now keeps its asked joins (see @rulecad/frames), so its
|
|
30
|
+
frame.rack figure for a braced side rises instead of falling (the default box braced on all four sides: 68 N/mm, where
|
|
31
|
+
it was 5.34 N/mm and warned); its order, shopping list and cut sheet carry both joins' screws, nuts and holes. No
|
|
32
|
+
printed size moves.
|
|
33
|
+
|
|
34
|
+
- A generated frame with `"feet": "castor"` stopped every build with "holes is the castor's hole spacing ... (got
|
|
35
|
+
nothing)". `"feet"` now takes `{ "kind": "castor", "holes": [100, 40], "thread": "M6" }` (and `"top"`, the castor's
|
|
36
|
+
top plate's thickness), which the castor plates are drawn from; `"castor"` alone is refused, naming holes and thread.
|
|
37
|
+
|
|
38
|
+
- `cad check` judged every printed foot, levelling foot, castor plate and stacking foot at a fixed 250 N, a quarter
|
|
39
|
+
of a 100 kg machine, whatever the frame carried: a box carrying 400 kg passed feet that bend 1.56 times under their
|
|
40
|
+
plastic's strength at their real load, short of the 2 times asked. Each foot under a frame the check solves is now
|
|
41
|
+
judged at the largest downward reaction at its beam's end over the frame's load cases, and its `fitting.margin`
|
|
42
|
+
names it ("the frame's largest reaction at z1.a"); its `refs` carry `support` and `reaction`. A load given in the
|
|
43
|
+
item's fitting is kept where it is the larger. A castor plate drawn for less than its reaction says to give its
|
|
44
|
+
fitting that load, so its thickness is sized for it. Where no frame is solved, the margin says its load is "the
|
|
45
|
+
default 250 N for one foot, not the frame's load".
|
|
46
|
+
|
|
47
|
+
For someone upgrading: feet under heavy frames now fail where they are short of the margin asked; feet under light
|
|
48
|
+
frames are judged at their own, smaller load, and their margins rise. The feet's bearing stresses roughly treble (the
|
|
49
|
+
change to @rulecad/frames). No printed size moves unless you give a foot a larger load.
|
|
50
|
+
|
|
51
|
+
- `cad check`'s analysis of a flat part (an `analysis` entry on a 2D problem) now holds and pushes the part over the
|
|
52
|
+
whole of each support and load region, as `cad optimise` does: a box (`size`), a polygon (`points`) or another
|
|
53
|
+
design's part, each found the same way the optimiser finds it. It used to read every region as a single point and a
|
|
54
|
+
radius, so a box clamping a plate along an edge held it at one point, and the plate came out about nine times too
|
|
55
|
+
soft, with its stress and safety factor wrong too; a polygon or part stopped the check with "Cannot read properties
|
|
56
|
+
of undefined". A support or load given as a point and a radius is read as before.
|
|
57
|
+
- If you upgrade: deflection, stiffness, peak stress and safety factors reported for flat parts held by a box, polygon
|
|
58
|
+
or part region change, by up to ten times, and a part that failed its `max_deflection` or `min_safety` may now pass.
|
|
59
|
+
Point-and-radius supports and loads give the same numbers as before. No printed size moves.
|
|
60
|
+
|
|
61
|
+
- `cad frame --size` (and the `frame.size` finding of `cad check`) solved every profile it tried on the springs of
|
|
62
|
+
the joins as drawn. A join's stiffness grows as the cube of its beam's width, so a cantilever drawn in 4040 sized
|
|
63
|
+
down to 2020 on the 4040's join, eight times too stiff: sizing promised it 1.48 times inside its sag limit, and once
|
|
64
|
+
written in, `cad check` failed its sag. The other way round, a frame drawn in 2020 was refused every heavier
|
|
65
|
+
profile, each solved on the 2020's soft join. Now each join's spring is worked out for each pair of profiles
|
|
66
|
+
tried, as the check works it out: the kind's estimate scaled to the profile, a bought fitting's own figures, or a
|
|
67
|
+
printed fitting drawn again for the new profiles and its stiffness by finite elements. A printed fitting that
|
|
68
|
+
cannot be drawn for a pair of profiles is a join that does not go together, and is said as what set the group.
|
|
69
|
+
|
|
70
|
+
Upgrading: sizing now picks heavier profiles for frames whose sag rests on their joins (most open frames, every
|
|
71
|
+
cantilever), and the margins it prints change; racking, where it is a limit, now also counts the stiffer joins of
|
|
72
|
+
a deeper profile. Size again and write it in with `--size --write` to take up the new choice. A printed size moves
|
|
73
|
+
only where you write a new sizing in.
|
|
74
|
+
|
|
75
|
+
- `frame.size` held the frame's members to the stress limit, but passed over, without a word, those with no strength
|
|
76
|
+
or no section modulus: each join's rigid link, each panel, a beam whose alloy gives no strength. Its finding read as
|
|
77
|
+
if every member's stress had been checked. `cad check` now says them once, as `frame.size.unchecked` (info): "the
|
|
78
|
+
stress limit does not reach 12 join links (no strength and no section modulus): their stress is not checked by the
|
|
79
|
+
sizing". `cad frame --size` prints the same under its limits, and `--json` lists them as `unchecked`, each
|
|
80
|
+
`{ member, why }`.
|
|
81
|
+
|
|
82
|
+
Upgrading: a check of a frame with `frame.size` gives one more information finding; nothing fails or warns that did
|
|
83
|
+
not before, and no printed size moves.
|
|
84
|
+
|
|
85
|
+
- Frame sizing no longer chooses a profile whose blind joins cannot be tightened. A blind join's hex key comes in
|
|
86
|
+
through the access hole across the beam it meets, and the sizing now holds it to reach the head, as
|
|
87
|
+
`fasten.access` does. In OpenBeam's 1515 the slot's floor slants down to a narrow groove past the access hole, so a
|
|
88
|
+
2 mm key cannot reach an M3 button head there; MakerBeam's 1010 stops it the same way. So an M3 blind join into
|
|
89
|
+
either is no longer chosen. The frames guide's box was sized to 1515 everywhere and then failed
|
|
90
|
+
`fasten.access` and `assembly.order`; it now stays in 2020, each group set by a join.
|
|
91
|
+
- A printed foot written in by `--size --write` takes the new profile's screw and tapped end. Before, a box drawn in
|
|
92
|
+
2020 and written in 1515 kept its feet's M5 cap screws and M5 taps in the 1515's M3 bore, and `cad check` failed
|
|
93
|
+
`fasten.clearance` and `overlap` at every foot.
|
|
94
|
+
- `--size --write` now checks the design it would write, as `cad check` does, before writing it. Where any check
|
|
95
|
+
would fail, it writes nothing and names the failing checks, the first of them in full (`--dry-run` says the same).
|
|
96
|
+
Where every beam already has the profile chosen for it, it writes nothing and says so, so a generated frame stays
|
|
97
|
+
generated.
|
|
98
|
+
|
|
99
|
+
Upgrading: `cad frame --size --write` refuses some writes it made before, each a design `cad check` would have failed.
|
|
100
|
+
`cad frame --size` may choose a heavier profile than before where a lighter one's blind joins cannot be tightened. No
|
|
101
|
+
printed size moves.
|
|
102
|
+
|
|
103
|
+
- `cad check` measured a spur, internal or rack mesh only across the axes, so a gear anchored at the wrong height (the
|
|
104
|
+
wrong face, a missing spacer, the wrong step of a compound gear) still got a full contact ratio and a clean sweep
|
|
105
|
+
although its teeth never touched the other gear's. It now finds each gear's teeth in its drawn parts (the points on
|
|
106
|
+
its tip circle, or a rack's tip line) and says how much of the faces meet, as `mesh.face`: "faces overlap X of Y mm",
|
|
107
|
+
Y the narrower face. 80 % of the narrower face or more passes, 50 to 80 % warns, less fails. A gear whose teeth are
|
|
108
|
+
not found where its mesh says (drawn with another module, tooth count or shift) gets a warning that the overlap is
|
|
109
|
+
unchecked. Worm, bevel and planetary meshes are unchanged.
|
|
110
|
+
|
|
111
|
+
Upgrading: a drawn gear train whose faces only partly overlap now warns or fails where it passed before: move the gear
|
|
112
|
+
along its axis until the faces line up. No printed size moves.
|
|
113
|
+
|
|
114
|
+
- `cad measure` and `cad match` read STL and 3MF files from anywhere as data, with limits: up to 2,000,000 triangles,
|
|
115
|
+
a 3MF's zip unpacked to at most 512 MB, and its objects placed at most 100,000 times. Past a limit the file is
|
|
116
|
+
refused with the limit named ("the 3MF places 10,000,000 triangles, more than the 2,000,000 cad reads"), before it
|
|
117
|
+
is unpacked or placed. Before, a 3MF of under half a kilobyte whose objects held each other ten times over could
|
|
118
|
+
place millions of triangles and run the command out of memory, and a zip entry could unpack to any size. Build
|
|
119
|
+
items, components and corners are counted as they are read too (corners up to three for each triangle cad reads),
|
|
120
|
+
so a small file naming millions of them is refused before it fills memory, and objects never closed no longer hold
|
|
121
|
+
the reading for minutes.
|
|
122
|
+
- A corner that is not three numbers (a word in an ASCII STL, a binary STL's NaN, a 3MF vertex with a missing or
|
|
123
|
+
non-numeric coordinate), a 3MF triangle that names a corner its object hasn't got, and a 3MF transform that is not
|
|
124
|
+
twelve numbers are refused, naming the corner, as is an object placed so far out (transforms of 1e200 inside one
|
|
125
|
+
another) that its corners are past what a number holds. Before, they gave sizes that were not numbers.
|
|
126
|
+
- `bounds` and `volume` refuse an empty mesh ("no triangles") instead of giving Infinity and NaN. `cad list` counts a
|
|
127
|
+
part drawn empty as no plastic, and `cad match` on a design that draws nothing says so.
|
|
128
|
+
- `cad clone` on a board read from a file no longer follows a `${KIPRJMOD}` model path that leaves the board's folder
|
|
129
|
+
(`../`, a path from the top of the disc, or a link in the folder that leads out of it): it notes "its path leaves
|
|
130
|
+
the board's folder" and copies nothing. Before, a board from elsewhere could have any `.wrl` or `.step` file on
|
|
131
|
+
the computer copied into the workspace. A board from GitHub keeps its paths inside its repository, and a KiCad
|
|
132
|
+
library path inside KiCad's library, however the path is spelt (`%2e%2e` and backslashes are read as a web
|
|
133
|
+
address reads them), so no other repository's file is copied in under the board's or KiCad's licence.
|
|
134
|
+
|
|
135
|
+
Upgrading: a model past the limits, or one with a broken corner, that used to be read is now refused, and names
|
|
136
|
+
what to fix. No printed size moves.
|
|
137
|
+
|
|
138
|
+
- `join.drop` (#365) took the beam a join hangs from as rigid on every frame, so on a real one its drop was out by
|
|
139
|
+
a factor of two or more (an arm on a 400 mm post: 1.517 mm said, 2.933 mm in the frame's own solve), and writing the
|
|
140
|
+
measured drop back stored a wrong join spring, marked measured, that then changed every join of that kind. Where
|
|
141
|
+
the frame is solved on supports it is given, the drop is now the frame's own (the same figure `frame.deflection`
|
|
142
|
+
gives for that load alone), and `cad measured` finds the spring from the same solve, by a bounded search that
|
|
143
|
+
solves the frame again at each step, moving every join whose spring is the same rule (as the figure written back
|
|
144
|
+
moves them all, so the next prediction is the drop read); a reading no spring can give is refused, saying why.
|
|
145
|
+
Where no supports are said, the closed form is kept only where the beam the join hangs from lies along the bench, as on the joint rig,
|
|
146
|
+
and the finding says it takes that beam as held along its length; elsewhere the drop is not predicted, and the
|
|
147
|
+
finding says to give the frame's supports.
|
|
148
|
+
- A beam that something else also holds (a support or a foot on it, or a fasten, a fit or a joint between it and a
|
|
149
|
+
part it does not carry) gets no `join.drop`: it is no cantilever from the join.
|
|
150
|
+
|
|
151
|
+
Upgrading: `join.drop` figures change on frames with supports, and disappear on propped beams and on frames with no
|
|
152
|
+
supports said other than the joint rig. A join spring stored as measured from an earlier write-back on a frame (not
|
|
153
|
+
the joint rig) stays as it was: measure it again. No printed size moves.
|
|
154
|
+
|
|
155
|
+
- The live views (`cad optimise --watch` and `cad preview <project>/problems/<problem> --watch`, and the view of a
|
|
156
|
+
flexure being shaped, `lib/live-shape.mjs`, which the launcher example's shaping scripts open with `--watch`) now
|
|
157
|
+
answer only when they are opened as `localhost`, `127.0.0.1`, `[::1]`, the address they listen on, or any other
|
|
158
|
+
address written out in numbers (a Tailscale address such as `100.101.102.103` included). A web page from another site
|
|
159
|
+
could stop a shaping run, and a page that pointed its own name at this computer could read either view; both are now
|
|
160
|
+
refused. Neither view can be shown inside another page's frame any more, so a page that hid the view under a button
|
|
161
|
+
of its own can't turn the person's click into a stop. No printed size moves.
|
|
162
|
+
|
|
163
|
+
- `motor.torque` and `motor.holds` added up only the loads an assembly declared, so the weight of the arm, lid or leg
|
|
164
|
+
a motor turns was left out: a NEMA 17 turning a 605 g arm passed 14 times over while `motor.accel` in the same report
|
|
165
|
+
said it stalled, and with no `"loads"` nothing was checked at all. They now count the parts as drawn (the printed
|
|
166
|
+
parts by their volume and the project's material, the bought parts, a motor among them, by their rules' mass), the
|
|
167
|
+
declared masses and the task's `payload`, under gravity: down (`-z`) unless the assembly gives `"gravity"`. Both read
|
|
168
|
+
one sum with `motor.accel` (`lib/carried.mjs`), so the three cannot disagree again.
|
|
169
|
+
- `motor.accel` now runs for every driven joint, with or without a `task` or a `"gravity"` key.
|
|
170
|
+
- `motor.accel` read only the motor's own joint, so through gears (a planetary to an arm, a pinion to a reel) it left
|
|
171
|
+
out what the gears turn: the arm's weight, a declared torque and the arm's inertia. It now reads the motor's whole
|
|
172
|
+
train, as `motor.torque` does: each mass's inertia once, at the nearest joint of the train, and its weight at every
|
|
173
|
+
joint of the train it rides beyond, as `motor.torque` counts it. With no task it gives one finding a motor, named for
|
|
174
|
+
the joint at the far end of its gears.
|
|
175
|
+
- `motor.accel` treated a slide (a lead screw or a belt) as a turn: its inertia came out thousands of times too big,
|
|
176
|
+
its weight along the travel counted as nothing, and the result read in °/s². It now reflects the slide's mass
|
|
177
|
+
through the lead's mm per radian (m (lead / 2π)², divided by the drive's efficiency, plus the rotor), holds the
|
|
178
|
+
weight along the travel against the same lever, and gives the acceleration in mm/s². A 1.26 kg block on an 8 mm lead
|
|
179
|
+
vertical screw read 757 °/s² on 31,561 kg mm²; it now reads 42,235 mm/s² on 11.8 kg mm² (2.0 of it the block).
|
|
180
|
+
`task.accel` and `task.time` follow from it.
|
|
181
|
+
- A machine's link (`cad link`) carries the masses the motor checks count in its `task.loads` (the parts, the bought
|
|
182
|
+
parts, the declared masses and the payload, each as a point on its item), not only the declared ones, so the torque
|
|
183
|
+
chip on the machine's page agrees with `motor.torque`.
|
|
184
|
+
- For a slide, `motor.torque`'s `values.available` was the torque at the screw (N m) while `values.needed` was the force
|
|
185
|
+
(N). Both are now in the joint's own unit, given as `values.unit` (`N m` or `N`); `values.shaft` is the torque at the
|
|
186
|
+
motor's shaft.
|
|
187
|
+
|
|
188
|
+
- `beam.printable` (#367) judged a printed beam's buckling by Euler's load with both ends pinned, so a post fixed at
|
|
189
|
+
its foot and free at its top was told it had four times the margin it has (a 2020 post 400 mm tall with 30 kg on
|
|
190
|
+
it, in PLA: 2.13 said, 0.53 true). It now uses the whole frame's buckling solve with the beam printed, as
|
|
191
|
+
`frame.buckling` does, in the case that squeezes the beam most, wanting twice its load (or the frame as drawn, 2%
|
|
192
|
+
less, where that already buckles sooner). Euler's pinned load is still given, in words only. Where the frame's
|
|
193
|
+
buckling cannot be found, the beam is taken free to sway at one end: a quarter of Euler's load.
|
|
194
|
+
- `frame.deflection` held a beam drawn printed only to its sag under a short load. Where any beam is drawn printed,
|
|
195
|
+
the frame is now solved again with each printed beam at its creep share of its modulus
|
|
196
|
+
(`PRINTED_DEFAULTS.creep_modulus`, 0.5, an estimate), and each sag is held to the limit at the worse of the two,
|
|
197
|
+
said as 'after creep (estimate)' (`values.creep`, `refs.creep`). A printed 2020 cantilever 150 mm long with 4 kg at
|
|
198
|
+
its middle: 0.273 mm at first, about 0.546 mm after creep, against 0.417 mm: it now fails.
|
|
199
|
+
- `frame.heat` held printed fittings to their plastic's softening point but not printed beams, and grew every beam by
|
|
200
|
+
aluminium's expansion. Printed beams are now held to their plastic's softening point too, and every beam grows by
|
|
201
|
+
its own material's `expansion` (PLA's is about three times aluminium's); a frame of several materials says how far
|
|
202
|
+
its beams grow apart.
|
|
203
|
+
- `beam.printable`'s words: a sag missed along a beam is no longer said to be `frame.deflection`'s (it checks load
|
|
204
|
+
points, named points and guides, not each beam along its length), and a beam already drawn printed is said to stay
|
|
205
|
+
printed, never told it 'needs pla'.
|
|
206
|
+
|
|
207
|
+
Upgrading: printed posts and shelves that passed may now fail on buckling (`beam.printable`) or on their sag after
|
|
208
|
+
creep (`frame.deflection`); printed beams in warm air may fail `frame.heat`; growth figures for printed beams are about
|
|
209
|
+
three times larger, and those for metal beams move slightly to their alloy's own figure (MISUMI's 6N01 23.3 rather than
|
|
210
|
+
23.4 x 10⁻⁶ /K). No printed size moves.
|
|
211
|
+
|
|
212
|
+
- A lamina's slow stages (its physics, its flood's probe) are now kept in a folder of each design's own, `.cache/stages/<design>/`, and a design reads only its own. The name of a kept stage is worked out from the stage's inputs and the library's code, so before, a design in a workspace cloned from someone else could hand back a false result under the name another design of the workspace (your own, added to the clone) would read, and that design's next `cad check` could pass a mechanism that would fail.
|
|
213
|
+
- A design in the sandbox may hand back at most 40 stages, 256 MB in all, a build (and a board at most 40 routes, 64 MB in all). The kit's largest launcher makes a handful, its physics about 5 MB and its probe about 9. A design that makes more is built as before, and what is past the cap is not kept (it is made again at its next build); a reply that hands back more (one the design wrote itself) is refused with code `design.sandbox`, and nothing of it is written: before, any number of any size was written, enough to fill the disk or to push every honest result out of the cache.
|
|
214
|
+
- The stages and sandboxed routes kept on disk are capped as a whole too: each design's folder holds at most 512 MB of stages (128 MB of routes), and `.cache/stages/` at most 2 GB in all (`.cache/routes/`'s design folders 512 MB). Past a folder's limit its own least lately used files are removed; past the whole cache's limit, the least lately used of any design's. Without it, the cap on one reply still let many designs, or one design built again and again with other inputs, fill the disk 256 MB at a time. A stage that is removed is only worked out again at its next build.
|
|
215
|
+
- The routes the autorouter finds for a board built in the sandbox are written to the design's own folder, `.cache/routes/<design>/`, and read back by that board alone. Before, they were written to the route cache every board reads, and to `RULECAD_ROUTE_CACHE` when you point it at a folder several workspaces share, so one workspace's board could plant routes for another's. Such a shared folder is still read in the sandbox; only boards built in the tool's own process (trusted) write to it.
|
|
216
|
+
- Upgrading: the first build of each lamina after the upgrade works out its stages again, once, and stages kept the old way, directly in `.cache/stages/`, are removed. A board built in the sandbox routes again once, and no longer adds to a shared `RULECAD_ROUTE_CACHE`. No printed size changes. If you point `RULECAD_ROUTE_CACHE` at a folder several workspaces share and have built boards there from workspaces you did not write, empty that folder once: routes a sandboxed board wrote there before this change are still read.
|
|
217
|
+
|
|
218
|
+
- With no load on a joint, the most torque a screw was said to be tightened to was the whole of what the seat under its
|
|
219
|
+
head takes; as soon as the joint carried any load, however small, it was half that (`fixings.load_margin`). So a 6 g
|
|
220
|
+
load halved the torque `cad order` gave: an M3 cap screw on PLA into a nut was 0.33 N m with no load and 0.16 N m with
|
|
221
|
+
6 g. It is now half what the seat takes on every joint, within a screw tightened fully (three quarters of its proof
|
|
222
|
+
load), since the clamp a torque gives scatters by a quarter to a third; the same goes for a head on a beam slot's
|
|
223
|
+
lips. `fasten.seat` says the half, and `cad order`, the build page and a frame's tightening by kind of join say "half
|
|
224
|
+
what the seat takes". Where a washer would let the screw be tightened further, `fasten.seat` names the torque it
|
|
225
|
+
would allow.
|
|
226
|
+
- A `torque` given for a steel screw into a thread made in the part itself (a pilot, a tapped or a printed thread) was checked only
|
|
227
|
+
against the pressure under the head, so on a joint with no load 0.5 N m on a washer into a PLA pilot, 69% of what
|
|
228
|
+
the thread is estimated to strip at, passed. `fasten.torque` now holds its clamp against the thread: past half the
|
|
229
|
+
stripping load it warns, past the whole of it it fails, naming the most to tighten to.
|
|
230
|
+
- Where several screws share a load, each was reckoned at the preload of its own best torque, though all are tightened
|
|
231
|
+
to the least of them; by rounding alone an unloaded screw could be named as the one that takes the most. Each is now
|
|
232
|
+
reckoned at the torque they are all tightened to, and where the top margins are the same to the hundredth,
|
|
233
|
+
`fasten.load` says those screws take the most alike (`refs.alike`), naming the one pulled harder.
|
|
234
|
+
|
|
235
|
+
Upgrading: with no `torque` given and no load, the torques `cad check`, `cad order` and the build page give fall by
|
|
236
|
+
about half where the seat sets them (an M3 cap on PLA: 0.16 N m where it was 0.33; an M5 button on a 2020 beam's
|
|
237
|
+
lips: 1.83 N m where it was 3.68); where half what a printed thread strips at was already the less, they do not move.
|
|
238
|
+
A `torque` given past half what a plastic thread strips at now warns, and past the whole of it fails. Under a load,
|
|
239
|
+
a screw that could have taken more than its neighbours now shows the lower preload it really has, so a slip margin can
|
|
240
|
+
fall. No printed size moves.
|
|
241
|
+
|
|
242
|
+
- `analysis` read a part's peak stress at its cells' centres, half a cell inside the surface, so in bending it came out
|
|
243
|
+
10 to 30% low and `min_safety` passed parts that beam theory fails: a PLA cantilever 100 × 10 × 4 mm with 10 N at
|
|
244
|
+
its tip, 2.6 times under PLA's strength by beam theory, read 12.7 MPa on 2 mm cells and passed `min_safety` 3. The
|
|
245
|
+
analysis now reads `@rulecad/fea`'s surface stress (`fea.strength` and the report), and that cantilever fails.
|
|
246
|
+
- `fea.settled` judged the stiffness alone, so it said settled while the stress was still 15% out. With `min_safety`
|
|
247
|
+
given, the peak stress must now move 5% or less from the cells a quarter bigger too; its text and `values` give
|
|
248
|
+
both changes.
|
|
249
|
+
- A joint's printed clips (`joint.moment`), a link's peak stress where it bends (the rows of `link.deflection`) and the motor mount
|
|
250
|
+
(`motor.mount`) read the surface stress too. The motor mount's hand lift of the centre stress, k / (k − 1) for k
|
|
251
|
+
cells across the plate, is gone, as fea's reading does that properly.
|
|
252
|
+
|
|
253
|
+
Upgrading: reported peak stresses rise, most by 10 to 30% in bending, and more beside a support or load held at a
|
|
254
|
+
few points, where the stress concentrates (give it the face it acts on). Some analyses with `min_safety` that passed
|
|
255
|
+
now fail, and `fea.settled` can now warn where the stress has not settled. The clips' and the mount's margins move the
|
|
256
|
+
same way. No printed size moves: these checks size nothing. The kept results in `.cache/clip`, `.cache/link` and
|
|
257
|
+
`.cache/mount` are worked out again.
|
|
258
|
+
|
|
259
|
+
- A symbolic link inside a workspace that leads to a file or folder outside it is no longer followed. A workspace cloned from someone else could hold `rules/x.json`, a design's `.json` or `.js`, or a folder of a project, the whole project or the whole `rules/` folder that is a link to a private file of yours elsewhere, and a design or the tool read it as the workspace's own, so what was read could end up in a model link or an exported file. Before a design runs in the sandbox, its project and the workspace's `rules/` are looked through once a run; every JSON file of the workspace that rulecad reads (rule sets, projects, designs, assemblies, layouts; `cad rules draw` and `cad rules check`, and the lists of bought parts and plastics, too, which leave such a set out) is read only where it really is inside the workspace; the project's other files (`project.json`, `prints.jsonl`, the ledger, a design's code as `cad check` lints it) are read, and edited by `cad set` and the other edits, only where they really are inside it, and `cad printed` and `cad measured` never append through a link; a kept build or a lamina's kept stage in the workspace's `.cache/` that is a link to a file elsewhere is not read, by the tool or by a design in its sandbox, but made afresh; and a target named in cad.config.json is checked by its real path, after `cad trust` too. Each refusal has the code `workspace.outside` and names the link.
|
|
260
|
+
- Upgrading: a workspace that links a rule set or a project's file in from elsewhere now stops with `workspace.outside`, `CAD_TRUST=1` or not: copy the file into the workspace, or put it in a package and install it (links in the workspace's own `node_modules` are left alone; a project named `node_modules` is held to the rule like any other). A link that stays inside the workspace works as before. No printed size changes.
|
|
261
|
+
|
|
262
|
+
### Added
|
|
263
|
+
|
|
264
|
+
- A castor plate's four bolts, their nuts and the washers their seat on the plastic needs go on `cad list`, and its
|
|
265
|
+
`fitting.seat` finding gives the torque to tighten them to. Every printed end part's screw into its beam has a
|
|
266
|
+
`fitting.torque` finding too.
|
|
267
|
+
- A castor plate item's `fitting` takes `"top"`, the castor's top plate's thickness, as the generated frame writes it
|
|
268
|
+
out (`cad frame --expand`), so `cad set` and `cad add` accept the expanded assembly.
|
|
269
|
+
|
|
270
|
+
For someone upgrading: no printed size moves on a frame without castors; a generated frame on castors now builds,
|
|
271
|
+
with thicker plates for a rectangular castor than a hand-placed castor plate had before.
|
|
272
|
+
|
|
273
|
+
- A design run in the sandbox now has a time limit (3600 s, an hour) and a memory limit (4096 MB for its
|
|
274
|
+
JavaScript). Past either, its process is stopped and the build fails with a `design.time` or `design.memory` finding that names the
|
|
275
|
+
design and the limit. Before, a design with an endless loop made `cad check`, `cad preview`, `cad link` and
|
|
276
|
+
`cad export` wait for ever with nothing said, and one that filled memory grew until the system stopped it, or
|
|
277
|
+
ended with a few lines of Node's own crash report.
|
|
278
|
+
- `"designTimeout"` (seconds) and `"designMemory"` (megabytes) in cad.config.json change the limits for a workspace;
|
|
279
|
+
`CAD_DESIGN_TIMEOUT` and `CAD_DESIGN_MEMORY` change them for one run, and win. A value that is not a number is
|
|
280
|
+
refused with a `design.limit` message saying where it was, never taken as no limit. A value in cad.config.json
|
|
281
|
+
above the default is used once the workspace is trusted (`cad trust` lists it); until then the default holds.
|
|
282
|
+
- The memory limit covers the design's whole process too: 512 MB more than its JavaScript's limit, for Node itself
|
|
283
|
+
and what lies outside the JavaScript (typed arrays, WebAssembly memory, output not yet sent), looked at four times
|
|
284
|
+
a second. What a design sends back is kept only up to its memory limit and what it prints only its last
|
|
285
|
+
megabyte, so it can't fill the tool's own process instead.
|
|
286
|
+
- A board design's solid, which the tool drills from the holes the design gives back, and the board's checks
|
|
287
|
+
(`cad check`, `cad release`), which the tool makes on the circuit the design gives back, are made within the same
|
|
288
|
+
time and memory limits: both take far longer the more the circuit holds (1000 holes, nearly two minutes to drill;
|
|
289
|
+
1000 tracks laid over each other, more than a minute to check), so a board of thousands kept the tool busy for
|
|
290
|
+
hours after the design itself had ended.
|
|
291
|
+
|
|
292
|
+
- `fasten.stack`: `cad check` walks the parts a screw holds along its axis and fails where one does not meet the next
|
|
293
|
+
(more than 0.05 mm of air), naming both parts and the gap (a beam's slot lips clamped between them, as under a rail on a strip of nuts, fill it). Before, the screw was lengthened across the gap and every
|
|
294
|
+
check passed, so a part placed wrong was hidden and `cad list` bought too long a screw. A fit between the two parts
|
|
295
|
+
whose range holds the gap declares it: then the finding is a warning that names the fit.
|
|
296
|
+
- `fasten.wall`: the plastic round the far hole is measured side by side halfway along its first full-size stretch, where the thread is. A heat-set insert's
|
|
297
|
+
hole with less wall than its thread set's `insert_wall`, or a pilot, tapped or printed thread with less than a boss
|
|
298
|
+
twice the screw's diameter leaves (`fixings.boss_diameter`, from `@rulecad/fixings`), warns, naming the thin side.
|
|
299
|
+
- `frame.nut` fails two slot nuts whose lengths overlap in one slot, and a nut that runs under the head of a blind join
|
|
300
|
+
in that slot, the head taken at its width across.
|
|
301
|
+
|
|
302
|
+
- `cad check` gives `frame.tip`: whether a frame standing free on its feet (or its lowest ends) tips over, under its
|
|
303
|
+
own weight and under the side push `frame.rack` uses (`"frame": { "rack": { "load" } }`, else 20 N). The solve holds
|
|
304
|
+
every foot down as well as up, so no figure said a frame would fall: a 2020 box 200 x 200 x 940 passed `frame.rack`
|
|
305
|
+
and tips at 2.4 N. It now fails `frame.tip`, naming the feet it tips over and the feet that lift, with the push's
|
|
306
|
+
turn and the weight's hold and the push that tips it (`values.tips`). `frame.rack` gives that push beside its sway.
|
|
307
|
+
- What changes for a design: a tall or narrow frame, or one carrying its load beyond or right over its feet, that
|
|
308
|
+
checked clean now fails `frame.tip`. Widen its base, carry the load nearer the middle or lower, or, where it is
|
|
309
|
+
bolted down, say so with `"frame": { "supports" }`: a frame held there is taken as fixed down both ways and is not
|
|
310
|
+
checked for tipping (`frame.tip` says so). No printed size moves.
|
|
311
|
+
- `frameTip(s, helpers)` in `lib/framecheck.mjs`: `frame.tip` alone, without the other checks.
|
|
312
|
+
|
|
313
|
+
- `cad optimise --watch --allow-host <name>` (and `--allow-host` on the launcher example's `shape-*.mjs` scripts), and
|
|
314
|
+
an `allowHosts` option for `lib/live.mjs`'s `liveView` and `lib/live-shape.mjs`'s `liveShape`: more names to
|
|
315
|
+
open the live view by. If you watch a run from another device by a Tailscale name (`http://my-laptop:8090/`)
|
|
316
|
+
rather than its address, add that name with `--allow-host`; opening it by its Tailscale address needs nothing new.
|
|
317
|
+
|
|
318
|
+
### Changed
|
|
319
|
+
|
|
320
|
+
- Names the code set and never read are gone, and every place that deliberately ignores a failure (a cache that can't
|
|
321
|
+
be written, a rule set that isn't there) now says in a comment why that is safe. No printed size moves, and nothing
|
|
322
|
+
a design or a check does changes. cad keys its caches on its own code, so the first build after upgrading makes
|
|
323
|
+
cached results once again; they come out the same.
|
|
324
|
+
|
|
325
|
+
- A trusted workspace (`"sandbox": false`, after `cad trust`) runs its designs in the tool's own process as before,
|
|
326
|
+
without either limit.
|
|
327
|
+
|
|
328
|
+
Upgrading: a design that really does take more than an hour to build from nothing, or needs more than 4 GB,
|
|
329
|
+
now stops with `design.time` or `design.memory`: raise `designTimeout` or `designMemory` in cad.config.json. The kit's
|
|
330
|
+
slowest example, the launcher's in-line action, built from nothing in about 37 minutes on a busy small machine. No printed size moves.
|
|
331
|
+
|
|
332
|
+
- `fasten.slot` takes a slot nut's length along the slot, half either side of its screw, and fails a nut that runs past
|
|
333
|
+
either end of the beam, naming the end. Before, each nut was a point.
|
|
334
|
+
|
|
335
|
+
Upgrading: an assembly with a part that floats above the one it is screwed to, a nut hanging off a beam's end or two
|
|
336
|
+
nuts in one place now fails `cad check`; one with thin bosses now warns. Close the gap (move the part), and `cad list`
|
|
337
|
+
may then choose a shorter screw. No printed size moves.
|
|
338
|
+
|
|
339
|
+
- Every module of the kit is now laid out by a formatter (Prettier): long lines are broken up and quotes made the
|
|
340
|
+
same, and nothing the code does has changed. cad keys its caches on the code of the packages it runs, so the first
|
|
341
|
+
build after upgrading makes every cached result once again: each object's build, a lamina's slow stages, an
|
|
342
|
+
optimisation's densities and its analysis, gear meshes and boards. The results are the same as before.
|
|
343
|
+
|
|
344
|
+
Upgrading: the first `cad build`, `cad check` or `cad optimise` in a workspace takes as long as a build from nothing.
|
|
345
|
+
A board released before this version is recorded with the board engine's old code, so `cad versions` may say its
|
|
346
|
+
engine changed. No printed size moves.
|
|
347
|
+
|
|
348
|
+
- `cad check` gives each gear mesh's contact ratio at the axes' real distance, a `mesh.tipClearance` line (the room
|
|
349
|
+
under the tips, which shifted pairs lose), and fails a pair set so far apart that the teeth never touch, or a pinion
|
|
350
|
+
that fouls its ring away from the pitch point (from `@rulecad/gears`). A ring 8 or 9 teeth bigger than its pinion
|
|
351
|
+
that clears is no longer failed by a count of teeth.
|
|
352
|
+
|
|
353
|
+
Upgrading: an assembly whose gear axes are off their nominal distance, or whose shifted gears or close rings were
|
|
354
|
+
passing, may now warn or fail. No printed size moves.
|
|
355
|
+
|
|
356
|
+
- `cad link` and `cad show` print one more line, on stderr, when the workspace names a model page of its own
|
|
357
|
+
(`viewUrl` in cad.config.json, or `CAD_VIEW_URL`): where the links lead. `--md` still prints its one line.
|
|
358
|
+
|
|
359
|
+
- `cad link` and `cad show` check a model once, through `encode()` from `@rulecad/model-link`, which now makes every check the model page makes (the rules card's lines, the build page's form, the length of every piece of text). A design whose link the page would refuse stops with "no link: " and the reason, as before.
|
|
360
|
+
- Upgrading: nothing to do; every design in the kit's examples and templates still makes a link. No printed size changes.
|
|
361
|
+
|
|
362
|
+
- A declared joint `torque` or `force` is added the way that makes the load worse, as a belt's push already was:
|
|
363
|
+
a declared 12 N no longer cancels the weight of what a vertical slide lifts.
|
|
364
|
+
- `motor.accel` holds a joint's declared `torque` or `force` against its motor as well as the weight, as `motor.torque`
|
|
365
|
+
does, so the acceleration it gives falls where loads are declared: the kit's `arm/arm` pen from 5898 to 5088 mm/s²
|
|
366
|
+
on 12 V (`task.time` is unchanged, as the speed sets it).
|
|
367
|
+
- A mass declared at the task's tool is taken to be the task's `payload`, so the two are counted once (the larger).
|
|
368
|
+
- Where one motor drives more than one loaded joint (a gear on its own shaft, then the joint it turns), `motor.torque`
|
|
369
|
+
names the joint that asks most of it, not the first in the train.
|
|
370
|
+
- Each motor finding says what it counted, as `counted: the parts' own 605 g, 10 g of payload, gravity down`, and in
|
|
371
|
+
`values.counted` (`parts`, `payload` in kg, `declared`, `gravity`, `gravityGiven`).
|
|
372
|
+
|
|
373
|
+
The kit's own designs: `examples/bench` `arm/arm-upright` declared its links' masses by hand in `"loads"`; those are
|
|
374
|
+
taken out, as the parts now count themselves (the shoulder 2.58 times over, the elbow 8.18, from 2.22 and 6.88).
|
|
375
|
+
`arm/arm-z` passes 4.85 times over 3.2 N (from 6.32 over 2.45 N: the carriage's own 76 g now counts), and
|
|
376
|
+
`arm/arm-z-belt` now warns at 1.6 times (from 2.08). EXAMPLES.md chapter 13 gives the new figures.
|
|
377
|
+
|
|
378
|
+
Upgrading: motor margins fall for every arm, lid and leg whose parts weigh something, and some designs that passed now
|
|
379
|
+
warn or fail: give the joint more ratio, a stronger motor or a lighter link. Where a design declared the masses of its
|
|
380
|
+
own drawn links in `"loads"` (as the motor checks needed before), they are now counted twice: keep only what the
|
|
381
|
+
drawing leaves out. Slide accelerations change by orders of magnitude and now read in mm/s². A reader of `--json`
|
|
382
|
+
that converted a slide's `values.available` from N m reads it in N now. No printed size moves.
|
|
383
|
+
|
|
384
|
+
- @rulecad/cad now states Node 22.13 or later in its `engines`, the same lowest Node as every rulecad package, and the
|
|
385
|
+
tests run on exactly Node 22.13.0 as well as the newest Node 24. Node 20 reached the end of its support on 30 April
|
|
386
|
+
2026, and the kit's packages stated five different lowest versions, some of them too low: on Node 20.6 to 20.9 `cad`
|
|
387
|
+
stopped at start-up with "Unexpected token 'with'", and on Node 22.0 to 22.12 every `cad` command that runs a design
|
|
388
|
+
stops, because the sandbox designs run in cannot start there. npm gave no warning at install for either. Boards
|
|
389
|
+
(`"engine": "pcb"`) need `@rulecad/pcb`, which needs Node 24.
|
|
390
|
+
|
|
391
|
+
Upgrading: on a Node older than 22.13, npm now warns at install that this package needs Node 22.13; install Node 22.13
|
|
392
|
+
or later (24 recommended). Nothing else changes, and no printed size moves.
|
|
393
|
+
|
|
394
|
+
- `cad check` and the viewer show printcheck's new findings (#382): a sloped overhang is reported however many bridges
|
|
395
|
+
the part has elsewhere, a counterbore or stepped hole opening on the bed warns as a ledge as wide as its ring, and
|
|
396
|
+
the overhang ticks read "no sloped overhangs past 45°; flat undersides are checked on their own", or become a note
|
|
397
|
+
(`·`) when a ledge, a bridge too wide or an underside in mid-air is found. The tutorial shows the new wording.
|
|
398
|
+
Designs like these that passed may now warn; no printed size moves.
|
|
399
|
+
|
|
400
|
+
### Already published
|
|
401
|
+
|
|
402
|
+
- The gear-mesh changes listed here (`cad check` judging each gear mesh where its axes are, with a
|
|
403
|
+
`mesh.tipClearance` line) are already in @rulecad/cad 0.8.0 as it went out on npm on 2026-11-29, though that
|
|
404
|
+
version's CHANGELOG did not say so (a line there now does): its publish run took the commit merged just after the
|
|
405
|
+
release (#573) in place of the release itself. A workspace already on 0.8.0 has them; this release only records them.
|
|
406
|
+
|
|
8
407
|
## 0.8.0: board designs run in the design sandbox, and a workspace with boards asks for no trust; a design in a workspace held in memory runs in the tool's own process only when the caller trusts it; dot-files are not a package's sources; 'no parts overlap' catches parts that overlap on a shared plane, without manifold-3d; the torque to tighten a screw in a printed thread to is half what strips it, at most; names read from a workspace's files can no longer reach outside it; a sandboxed design can no longer import its way out of an allowed package; a sandboxed design can no longer write files through its reply; every target but the kit's own is asked about
|
|
9
408
|
|
|
409
|
+
Also in 0.8.0 as published (added after the release, to put the record straight): the publish run took the commit
|
|
410
|
+
merged just after the release, so 0.8.0 holds #573 too. `cad check` judges each gear mesh where its axes are, with a
|
|
411
|
+
`mesh.tipClearance` line (from @rulecad/gears 0.3.5): an assembly with gears off their nominal distance, or close
|
|
412
|
+
rings, that passed can now warn or fail. No printed size moves. The next release's notes describe it in full.
|
|
413
|
+
|
|
10
414
|
### Changed
|
|
11
415
|
|
|
12
416
|
- A board design (an object whose JSON says `"engine": "pcb"`) now runs in the design sandbox, as every other design does: another process that can't write files, start programs or import Node's modules, and that reads only the workspace and the packages designs use, with the board engine (`@rulecad/pcb` and the tscircuit packages it loads) allowed there. The design still reaches the engine as `v.pcb`; `v.pcb.mount` still reads the workspace's own thread sets. It hands back its board's Circuit JSON, which is checked like the rest of a sandbox's reply before the tool makes the board's solid and files from it, and the routes the autorouter found, which the tool keeps in `.cache/routes/` (or the folder `RULECAD_ROUTE_CACHE` names, which the sandbox may then read) under the route cache's own names only. A part's 3D model named in a board is read only from a plain path inside the workspace (`models/…`), and only when the file really is there: a link in `models/` to a file elsewhere is not followed. The board engine's packages the sandbox may read are found from the tool's own copy of `@rulecad/pcb`, never from one in the workspace's `node_modules`, so a workspace can't widen what a design reads by the package files it ships.
|