@rulecad/cad 0.10.0 → 0.11.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 +8 -4
- package/CHANGELOG.md +285 -1
- package/EXAMPLES.md +101 -89
- package/README.md +104 -27
- package/bin/cad.mjs +41 -13
- package/lib/assembly.mjs +418 -101
- package/lib/bays.mjs +124 -0
- package/lib/cache-file.mjs +66 -23
- package/lib/clone.mjs +93 -11
- package/lib/design.mjs +40 -4
- package/lib/edit.mjs +5 -3
- package/lib/framebuild.mjs +72 -91
- package/lib/framecheck.mjs +154 -77
- package/lib/framesize.mjs +37 -1
- package/lib/gait.mjs +17 -7
- package/lib/guides.mjs +84 -50
- package/lib/live-guard.mjs +18 -8
- package/lib/measured.mjs +2 -1
- package/lib/mesh.mjs +156 -56
- package/lib/motors.mjs +17 -4
- package/lib/node-version.mjs +52 -0
- package/lib/order.mjs +1 -2
- package/lib/picture-servers.mjs +66 -0
- package/lib/power.mjs +14 -7
- package/lib/preview.mjs +12 -25
- package/lib/programs.mjs +113 -0
- package/lib/sandbox-guard.mjs +43 -0
- package/lib/sandbox.mjs +172 -12
- package/lib/targets/gist.mjs +9 -6
- package/lib/versions.mjs +106 -10
- package/lib/workspace.mjs +3 -1
- package/package.json +13 -13
- package/schemas/assembly.schema.json +5 -4
- package/schemas/object.schema.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -84,8 +84,12 @@ variable says which rule it comes from. Follow these steps; they're what makes a
|
|
|
84
84
|
bends within its layers; give its thickness in whole lines (`x1c.line`), and check its strain at the travel against
|
|
85
85
|
the material's limit with `v.flexures.printable`. PLA creeps held bent and fatigues; PETG or nylon for springs.
|
|
86
86
|
- Use the print-aware features in `v.shapes` before drawing your own: `teardropHole`, `crushRibs`, `wallOpening`
|
|
87
|
-
print without supports as drawn (and `countersink` and `nutPocket` for a size that is no screw's). Use `v.ops.union/subtract/intersect` for booleans:
|
|
88
|
-
|
|
87
|
+
print without supports as drawn (and `countersink` and `nutPocket` for a size that is no screw's). Use `v.ops.union/subtract/intersect` for booleans: they
|
|
88
|
+
run in Manifold (faster, watertight) where the workspace has `manifold-3d` installed and `"engine": "manifold"` in
|
|
89
|
+
cad.config.json, as a new workspace has, and in JSCAD otherwise, with no change to the design. JSCAD can leave seams
|
|
90
|
+
that read as overlaps: an overlap finding that names Manifold (parts that "may overlap" or "may hit", or overlap by
|
|
91
|
+
"about" a figure) is settled by doing what it says (`npm install manifold-3d`, or building the part it names with
|
|
92
|
+
Manifold), never by widening a bore or a gap.
|
|
89
93
|
- Designs run sandboxed: they may import only <!-- ALLOWED -->`@jscad/modeling`, `@rulecad/shapes`,
|
|
90
94
|
`@rulecad/flexures`, `@rulecad/gears`, `@rulecad/motors`, `@rulecad/frames`, `@rulecad/fixings`<!-- /ALLOWED --> and
|
|
91
95
|
files in their project, and can't write files or start programs. To see a value while designing, `console.log` it: it comes
|
|
@@ -240,7 +244,7 @@ variable says which rule it comes from. Follow these steps; they're what makes a
|
|
|
240
244
|
`exports/<project>/<assembly>-kit/` (the build page as README.md, buy.csv, each plate's 3MF and the jigs', each
|
|
241
245
|
mark's sheet; `--pictures` adds the steps' pictures). It refuses a design whose check fails: fix the failures, never
|
|
242
246
|
hand on a kit of one. `npx cad plates` lays out every printed part by material, with a frame's jigs beside them.
|
|
243
|
-
A new frame project can start from `npm create rulecad my-frame --machine frame --size 300x300x350 --profile
|
|
247
|
+
A new frame project can start from `npm create rulecad my-frame -- --machine frame --size 300x300x350 --profile
|
|
244
248
|
2020-misumi-hfs5`.
|
|
245
249
|
- What holds parts with no steel screw is named in the fit's `fastener`, never typed in a note:
|
|
246
250
|
`{ "pin": "snap pin 4x6", "count": 2 }`, `{ "pin": "dowel 3x12", "fit": "press" }`, or
|
|
@@ -316,7 +320,7 @@ EXAMPLES chapter 12 builds one from start to finish.
|
|
|
316
320
|
- Before moving anything: `cad plot` the drawing and watch the preview. It refuses a stroke that leaves the sheet.
|
|
317
321
|
- **A gait is the same idea for a body.** Give an assembly a `gait` (`legs`, `pattern`, `stride`, `lift`, `period`, `height`, `mass`): the body at the world origin, the hips at z = 0, the feet as anchors. One leg on a stand is a gait of one leg (`"pattern": { "duty": 0.6, "phase": [0] }`). Anchor a round foot at its centre, so the contact rolls with the shin and the height stays true. Report a gait's numbers as they are: quasi-static, the torque from the weight alone, no dynamics.
|
|
318
322
|
- **Say what the machine weighs.** A robot built from these parts is heavier than the first sizing said it was: list `cad list`'s grams and set the gait's `mass` to that, and report the torque margin at the real mass.
|
|
319
|
-
- Start a machine from a template rather than from an empty assembly: `npm create rulecad my-arm --machine arm --sheet a5 --accuracy 0.3`, or `--machine leg`.
|
|
323
|
+
- Start a machine from a template rather than from an empty assembly: `npm create rulecad my-arm -- --machine arm --sheet a5 --accuracy 0.3`, or `--machine leg`.
|
|
320
324
|
|
|
321
325
|
## Talking to the person
|
|
322
326
|
- Give links as one labelled line (`npx cad link <project>/<object> --md`), never a raw URL. If it says
|
package/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,274 @@ 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.
|
|
8
|
+
## 0.11.0: One bay finder squares a corner-post box's rings; every beam's own sag is checked; the guide budget quotes the solved sag; a belt guide's line and tensioner checks come from @rulecad/frames; AGENTS.md and EXAMPLES give npm create rulecad's options after --; A damaged zip, a 3MF nested too deep and a board or part model over 64 MB are refused in plain words, naming the file and the limit; a stepper's current is set on its driver as the peak per coil; A fit is held to its range by depth, and fails outside it; The overlap check no longer reads a JSCAD seam as an overlap, and a workspace can set its boolean engine; PLA's analysis and fastenings use its strength across its layers; The pages cad serves to take a picture answer only to this computer, as the live views do; a worm's mesh takes the flanks its object draws, and cad check says which flank drives; A design's sandbox stops when cad does; a sandbox or Node too old to run it is said in one sentence; cad never writes, reads or removes a released version through a link in the workspace's .versions folder (security); nothing of a cad command is left running in the workspace once it returns; cad never runs a program found in the workspace when it starts git, gh or the file browser (security)
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- `cad order`, the build page, `cad kit` and `frame.square` found a bay only where its four beams joined each other, so
|
|
13
|
+
on a corner-post box (the generated `box`, whose rails meet the posts, never each other) they squared the four
|
|
14
|
+
upright sides and never the top and bottom rings: a box built to the page could lean in plan. One finder
|
|
15
|
+
(`lib/bays.mjs`) now serves `cad check`'s solve, `frame.rack`, `frame.square`, `cad order` and the build page, and it
|
|
16
|
+
follows joins through a post. A ring is never a side built flat (its rails do not meet); it is squared with the rest
|
|
17
|
+
once every join is made, its diagonals set by its four rails' cuts.
|
|
18
|
+
- `frame.deflection` held a beam's sag only at a load, a named point or a guide, so a long rail carrying nothing but
|
|
19
|
+
itself was never held to its span: a 3 m rail of 2020 held at its ends sags about 9.96 mm, against 8.33 mm, with no
|
|
20
|
+
finding. Every beam's worst sag along its length is now held to its span over 360 (or the
|
|
21
|
+
assembly's `frame.limit`): each beam over it fails, and where none is, the beam nearest its limit is said as the one
|
|
22
|
+
pass. The sag is the beam's own bending, measured from the line through where it is held (its supports, and its
|
|
23
|
+
joins to beams that reach a support without passing through it), so a short beam hanging from a long rail is not
|
|
24
|
+
failed for the rail's sag; a beam held at one end keeps its tip's whole drop, whatever hangs from it. `cad frame --size` holds every beam to the same (with `@rulecad/fea`'s new `held`).
|
|
25
|
+
- The sag picture (`<assembly>.frame-sag.svg`, `cad beams`) read its 'at most' figure from the frame's nodes, the beams'
|
|
26
|
+
ends and joins, so it said 0.039 mm for a frame whose rails sag 5 mm in their middles. It now reads every element's
|
|
27
|
+
stations, the worst along any beam.
|
|
28
|
+
- `guide.budget` gave the beam's sag under a rail as the rail's own estimate (0.003 mm on the frames guide's box) while
|
|
29
|
+
`frame.deflection` in the same report gave 0.0494 mm. It is now said after the frame is solved and quotes the
|
|
30
|
+
frame's own figure; the estimate only where the frame is not solved.
|
|
31
|
+
|
|
32
|
+
For someone upgrading: `cad order` on a corner-post box lists two more bays to square in its last squaring step (the
|
|
33
|
+
count of steps does not change); `cad check` gives a `frame.deflection` line for every frame, and fails a long rail
|
|
34
|
+
that sags past its span over 360 on its own weight; `frame.square` gives two more bays, with their own
|
|
35
|
+
`cad measured ... frame.square.<beams>` names; the sag picture's figure grows. No printed size moves.
|
|
36
|
+
|
|
37
|
+
- A belt guide with a tension past the belt's breaking strength (556 N for `gt2-belt-6`) is now refused by name, where
|
|
38
|
+
`cad check` used to run until it ran out of memory.
|
|
39
|
+
|
|
40
|
+
For someone upgrading: nothing changes for a belt guide within the belt's range. No printed size moves.
|
|
41
|
+
|
|
42
|
+
- The `npm create rulecad` commands in AGENTS.md and EXAMPLES.md put `--` before their options (as
|
|
43
|
+
`npm create rulecad my-arm -- --machine arm`); copied as written before, npm kept the options for itself and the
|
|
44
|
+
command made the plain soap-tray workspace.
|
|
45
|
+
|
|
46
|
+
For someone upgrading: nothing to do. No printed size moves.
|
|
47
|
+
|
|
48
|
+
- `cad measure` and `cad match` on a 3MF whose zip is damaged (a size or place in it that points past the file's end)
|
|
49
|
+
gave Node's own `RangeError ... out of range`. Every place and size the zip gives is now held against the file's
|
|
50
|
+
length before it is read, and a wrong one is refused as `part.3mf: a damaged zip file: entry 2 (3D/3dmodel.model)
|
|
51
|
+
runs past the end of the file`: the file, the entry and what is wrong with it. So is an entry that is not where the
|
|
52
|
+
zip's list of files says, a list of files that is not one, and packed data that does not unpack. An entry whose
|
|
53
|
+
packed size ran past the end used to be read with what there was; it is refused too.
|
|
54
|
+
- A 3MF with objects held more than 16 levels deep inside each other was read with the deeper ones silently left out,
|
|
55
|
+
so the model measured smaller than it is. It is now refused, naming the object and the limit (`the 3MF holds object
|
|
56
|
+
1 (3D/3dmodel.model) more than 16 levels deep inside others, the most cad follows`). A 3MF object that holds itself
|
|
57
|
+
was read as 16 copies of what it holds; it is refused as one that has no end.
|
|
58
|
+
- What `cad measure` and `cad match` say of a file they refuse now starts with the file's name, since both take more
|
|
59
|
+
than one file.
|
|
60
|
+
- `cad clone` read a board and each of its parts' 3D models (VRML, STEP) whole, whatever their size, from the board's
|
|
61
|
+
folder or downloaded from its repository or KiCad's library. It now reads up to 64 MB of each: a download is stopped
|
|
62
|
+
there (at once, when the server says its size), a larger board is refused (`the board hw/big.kicad_pcb is more than
|
|
63
|
+
the 64 MB cad clone reads`), and a larger model is left out with a note.
|
|
64
|
+
- `cad clone`'s notes named a model that was left out by the last part of its path, so two of one name in different
|
|
65
|
+
folders read the same. A board's own model is now named by its path in the board's folder (a board read from a file)
|
|
66
|
+
or in its repository (a board from GitHub), and any other by the whole path the board gives (`note: no 3D model for
|
|
67
|
+
hw/lib/usb.wrl: its .wrl file is more than the 64 MB cad clone reads`). A character in that name that doesn't print
|
|
68
|
+
(a bell, an escape code, a mark that turns the writing round) is written as its code, `\u{7}`: two names that
|
|
69
|
+
differed only in one read the same, and one could wipe its own note off the screen.
|
|
70
|
+
- `cad clone` held its 64 MB limit only for a plain file. A board or a model that was a link to a device was read
|
|
71
|
+
until the memory was full, one that was a pipe held `cad clone` for ever, and a folder gave Node's `EISDIR: illegal
|
|
72
|
+
operation on a directory`. Only a file is read now: such a board is refused (`the board b.kicad_pcb is not a file
|
|
73
|
+
(it is a folder, a device or a pipe), so cad clone doesn't read it`) and such a model is left out with a note.
|
|
74
|
+
- A part's model of a few MB can be written to unfold into millions of triangles and fill the memory. `cad clone`
|
|
75
|
+
leaves out a model of more than 2 million triangles with a note that says so (the limit is `@rulecad/pcb`'s, as is
|
|
76
|
+
one of 4 million bracketed lists for a board).
|
|
77
|
+
- `cad measure` and `cad match` gave Node's own words for three files too big or of the wrong kind: a text STL, or a
|
|
78
|
+
3MF's model file, of more text than Node holds (`Cannot create a string longer than 0x1fffffe8 characters`), a file
|
|
79
|
+
of more than 2 GB (`File size (3221225472) is greater than 2 GiB`) and a folder (`EISDIR`). Each is now one plain
|
|
80
|
+
line that names the file: `part.3mf: the 3MF's model file 3D/3dmodel.model is more than 511 MB of text, the most cad
|
|
81
|
+
reads`, `big.stl: more than 2 GB, the most cad reads of a file`, `parts: a folder, not an STL or 3MF file`.
|
|
82
|
+
|
|
83
|
+
For someone upgrading: a 3MF that nests its objects more than 16 deep, holds an object inside itself, or has a zip
|
|
84
|
+
entry cut short used to be read (with parts missing) and is now refused: open it in a slicer and export it again. A
|
|
85
|
+
script that reads `cad measure`'s refusals finds the file's name in front of them, and one that reads `cad clone`'s
|
|
86
|
+
notes finds a longer name for the model. `cad clone` no longer reads a board from a pipe (`<(...)` in a shell):
|
|
87
|
+
write it to a file first. The limits are in `MESH_LIMITS` (`depth: 16`, `download: 64 MB`, `text`: the longest text
|
|
88
|
+
Node holds) beside the others, and `readStl` and `read3mf` take `text` with their other limits. No printed size
|
|
89
|
+
moves.
|
|
90
|
+
|
|
91
|
+
- The driver check passes a stepper's current (its own `current`, else the motor's rated current per phase) to
|
|
92
|
+
`@rulecad/motors` as the peak per coil, as Pololu advises. A TMC2209's trimmer used to be set for that figure as
|
|
93
|
+
RMS, 41% more coil current than an A4988 or a DRV8825 given the same motor; its trimmer voltage now falls by a
|
|
94
|
+
factor of about 1.41, and the check says the RMS beside the peak. A setting past the 2.5 V a TMC2209's trimmer pin
|
|
95
|
+
takes now fails.
|
|
96
|
+
- A geared stepper given no speed (the 28BYJ-48) works at the 120 steps a second its pull-in torque is measured at,
|
|
97
|
+
1.76 rpm, where it used to work at the 600 a second it only starts at unloaded; `@rulecad/motors` now lets its torque
|
|
98
|
+
fall past the measured rate, so the torque margins stay as they were and the speeds and times it reports are a fifth
|
|
99
|
+
of what they were (EXAMPLES.md's wrist Z: 0.23 mm/s, where it said 1.17).
|
|
100
|
+
- EXAMPLES.md's leg (chapter 14) gives the 17HS4401's torque from its maker's 1.7 A: 1.484 N m through 38:1 at 0.5 A,
|
|
101
|
+
2.4 times at the knee and 7.5 at the hip (it said 1.682 N m, 2.8 and 8.5).
|
|
102
|
+
|
|
103
|
+
For someone upgrading: the trimmer voltage `cad check` gives for a TMC2209 changes; a brushless motor's margins fall at
|
|
104
|
+
speed (from `@rulecad/motors`). No printed size moves.
|
|
105
|
+
|
|
106
|
+
- A fit with a negative `min` let two parts overlap by any amount: a 10 mm cube pressed 8 mm into a block passed a
|
|
107
|
+
fit of `min: -0.05`, and the overlap check let it through as well. An overlap is now measured as a depth in mm (the
|
|
108
|
+
volume the two share over the area where they meet) and held to `min`: a press fit may go no deeper than `-min`,
|
|
109
|
+
and the overlap check fails the pair beyond that depth. A negative `max` holds it to at least that depth. A fit's message says "press fit, 0.04 mm deep" only within
|
|
110
|
+
that depth, and "overlap 1 mm deep" beyond it; the finding's `values` keep `overlap` (mm³) with `depth` (mm) beside
|
|
111
|
+
it.
|
|
112
|
+
- A fit whose gap is outside its range now fails (`cad check` exits 1); it was only a warning.
|
|
113
|
+
One put out of range only by an overlap under 0.5 mm³ that JSCAD measured (where Manifold is not installed) stays a
|
|
114
|
+
warning, "may overlap", as the overlap check has it: JSCAD can read the seams its unions and cuts leave as that much.
|
|
115
|
+
- A fit with no `min` lets its two parts touch but not overlap, in the fit's own finding as in the overlap check.
|
|
116
|
+
- A fit whose `min` is above its `max` is refused by name (`fit.range`), and a gap within 1 µm of a bound passes, so a
|
|
117
|
+
gap a design sets exactly is not lost to rounding.
|
|
118
|
+
|
|
119
|
+
- Without Manifold, `cad check` measured an overlap with JSCAD, which counts a volume from the world's origin even for
|
|
120
|
+
faces that enclose nothing. A JSCAD union can leave a flat face of no thickness across a bore where two of its
|
|
121
|
+
solids meet (a gear's top and the drum unioned on), so a gear on the shaft in its bore failed with "overlap by
|
|
122
|
+
39.018 mm³", more the higher it sat, though no material was in the bore. JSCAD's answer is now measured as what its
|
|
123
|
+
faces enclose, with such flat faces left out: one by itself measures nothing, and one beside a real overlap changes
|
|
124
|
+
nothing, so the same gear on a shaft too wide for its bore fails by the true volume.
|
|
125
|
+
- An overlap under 0.5 mm³ that only JSCAD measured is a warning that the parts "may overlap", saying how to measure it
|
|
126
|
+
with Manifold, not a failure. `cad check --sweep` and a gait's sweep say such parts "may hit", and warn where
|
|
127
|
+
nothing else collides. Where JSCAD finds faces that close into no solid and are no flat film, the overlap still
|
|
128
|
+
fails, its volume given as "about", with the same advice. Measured by Manifold, every overlap fails as before.
|
|
129
|
+
|
|
130
|
+
- To make a picture (`cad preview`, and the drawings `cad measure`, `cad match` and others make as PNG), cad serves a
|
|
131
|
+
page from a small web server on this computer for the few seconds Chrome takes to open it. That server answered
|
|
132
|
+
whatever name a request gave it, so a web page open in your browser could in principle have read the part while its
|
|
133
|
+
picture was taken, by pointing a name of its own at this computer (the same fault the live views had). Both picture
|
|
134
|
+
servers now answer only to this computer's own names and addresses (`127.0.0.1`, `localhost`), refuse another site's
|
|
135
|
+
page that posts to them, and may not be shown in another page's frame. A request by any other name is told so
|
|
136
|
+
(status 421) and gets none of the part.
|
|
137
|
+
- A request to the part's picture server for an address that cannot be read (`//`) ended the command with Node's own
|
|
138
|
+
`TypeError: Invalid URL`, so a page that reached the server could stop a picture being made. It is answered "not
|
|
139
|
+
found" now.
|
|
140
|
+
- Once a picture was made, the command waited for every connection still open on that server, and one that had asked
|
|
141
|
+
nothing (a web page can open one without asking for anything, under any name) or had stopped half-way through
|
|
142
|
+
asking was never closed. The command could print its picture and then not end, for as long as the other side kept
|
|
143
|
+
the connection. Every connection is now closed when the picture is made, as the live views do when they stop.
|
|
144
|
+
|
|
145
|
+
For someone upgrading: nothing to change. Pictures come out as before, and no printed size moves.
|
|
146
|
+
|
|
147
|
+
- A cad command killed from outside (a closed terminal, a stopped test or CI job) no longer leaves the design it was
|
|
148
|
+
running going on in its sandbox: a small guard process, started with the first sandboxed design of a command, ends
|
|
149
|
+
every sandboxed process still running once the command has gone, however it went. Before, a design that looped for
|
|
150
|
+
ever kept a processor core busy, and held its memory, until someone stopped it by hand.
|
|
151
|
+
- A sandbox that ends before it has read its work (as it does on Node 22.0 to 22.12) is the `design.sandbox` refusal,
|
|
152
|
+
with its exit code and what it printed, where cad used to stop with Node's own `EPIPE` stack trace. Every refusal of a
|
|
153
|
+
sandbox that stopped without a reply now gives its exit code too.
|
|
154
|
+
- On a Node older than 22.13, cad prints one line, `cad needs Node 22.13 or later; this is Node <version>`, with what
|
|
155
|
+
to do, and exits 1, before anything else loads. Before, only npm's warning on install said so.
|
|
156
|
+
|
|
157
|
+
Upgrading: nothing to change. A command now starts one more small Node process (the guard) when it first runs a design
|
|
158
|
+
sandboxed; it ends with the command. No printed size moves.
|
|
159
|
+
|
|
160
|
+
- cad unpacks a released version of a design (`home/tray@1.2.3`) into the workspace's `.versions` folder to build it,
|
|
161
|
+
on `cad status`, `link`, `show`, `history` and `diff` of a released design, and on `check`, `build`, `values` or
|
|
162
|
+
`export` of a named version. A workspace that came from someone else may hold a `.versions` folder of its own, and a
|
|
163
|
+
link in it (`.versions` itself, a version's folder, a folder in it or one of its files) had cad write files of that
|
|
164
|
+
person's choosing outside the workspace, remove a folder outside named like `tray@1.2.3`, or read a file from
|
|
165
|
+
elsewhere as the release's design. cad now uses nothing under `.versions` that is a link, or a file with a second
|
|
166
|
+
name elsewhere: it stops, names the link, and writes and removes nothing. It is the same guard the `.cache` folder
|
|
167
|
+
has. To go on, look at where the link leads, then remove the `.versions` folder: cad makes it again as it needs it.
|
|
168
|
+
- Each file of a released version is now written whole or not at all, so a run stopped part way through no longer
|
|
169
|
+
leaves a file cut short there that later runs would use as it was.
|
|
170
|
+
- `cad agents` no longer writes `AGENTS.md`, or adds its line to `CLAUDE.md`, when either is a link: it stops and names
|
|
171
|
+
the link.
|
|
172
|
+
|
|
173
|
+
Upgrading: nothing to do. A workspace whose `.versions` holds a link now stops with a message naming it. No printed
|
|
174
|
+
size moves.
|
|
175
|
+
|
|
176
|
+
- On Windows, a workspace's folder can be moved or removed as soon as a cad command returns. A command that built a
|
|
177
|
+
design in the sandbox now waits, before it returns, until the design's process and the small guard process started
|
|
178
|
+
with it have gone, whether it passes, fails or stops on a refusal; and the guard, and each look at a design's
|
|
179
|
+
memory, no longer sit in the workspace's folder at all. Before, the guard ended a moment after its command, and
|
|
180
|
+
Windows refuses to move or remove a folder while a process sits in it: a script that ran `cad check` and removed the
|
|
181
|
+
folder straight after was refused now and then (`EPERM`). A script of your own that builds a design through the
|
|
182
|
+
library waits the same way when it comes to its end.
|
|
183
|
+
|
|
184
|
+
Upgrading: nothing to change. A command that ran a design in the sandbox returns about 7 ms later (measured on a Mac):
|
|
185
|
+
the time its guard takes to go. A command killed from outside is as it was: its guard ends the design's process. No
|
|
186
|
+
printed size moves.
|
|
187
|
+
|
|
188
|
+
- cad started git, `gh` and the file browser (`open`, `explorer`, `xdg-open`) by their names alone, with the workspace
|
|
189
|
+
as their folder. On Windows a program named that way is looked for in that folder before PATH, and on every system a
|
|
190
|
+
PATH with `.` or an empty entry in it looks there too, so a `git.exe` (or `git`) in a workspace that came from someone
|
|
191
|
+
else ran with your full rights, outside the design sandbox, on `cad status`, `link`, `show`, `history`, `diff`,
|
|
192
|
+
`compare`, `release`, or `check` and `build` of a release (`home/tray@1.2.3`). cad now finds each program itself in
|
|
193
|
+
PATH's folders, passing over entries that are not full paths and any folder inside the workspace (npm puts the
|
|
194
|
+
workspace's `node_modules/.bin` on PATH), and starts it by the full path found, never through a shell. When git is
|
|
195
|
+
not found, cad says so in plain words, rather than `spawnSync git ENOENT`.
|
|
196
|
+
- A workspace that comes with its `.git` folder brings git's settings and hooks with it. The `git status` and
|
|
197
|
+
`git write-tree` cad runs before a release (`cad release <project> --all --dry-run` too) started the file system
|
|
198
|
+
monitor, the clean filter and the post-index-change hook that the workspace's `.git/config` and `.git/hooks` named.
|
|
199
|
+
Every git command cad runs to read a workspace now has those switched off (the monitor, hooks, the pager, and each
|
|
200
|
+
filter and diff program git's settings name), and git no longer looks inside a submodule, whose own settings are
|
|
201
|
+
not switched off: edits not committed inside a submodule no longer stop a release, one moved to another commit still
|
|
202
|
+
does. cad refuses to run git, saying why, when it cannot read git's settings in full, or when a filter or diff
|
|
203
|
+
program is named under a name that is not plain UTF-8 text (it could not switch that one off). A release's own commit, tag and push still run as they do by hand,
|
|
204
|
+
with the repository's hooks, filters and signing: the cad README (Programs cad starts) and SECURITY.md say so, and
|
|
205
|
+
what to look at before releasing in a workspace that came from someone else.
|
|
206
|
+
|
|
207
|
+
For someone upgrading: nothing to change, unless git, `gh` or your file browser is only in a folder inside your
|
|
208
|
+
workspace or reached by a relative PATH entry: put it in a folder on PATH outside the workspace. A repository's own
|
|
209
|
+
filters no longer run when cad looks for uncommitted shared code before a release. No printed size moves.
|
|
210
|
+
|
|
211
|
+
### Changed
|
|
212
|
+
|
|
213
|
+
- `belt.line` and `belt.tensioner` are now the checks `@rulecad/frames`'s `beltLayout` makes itself, reported as
|
|
214
|
+
they were, with the same words and verdicts; `belt.tension` stays cad's own, with the carriage's push and weight on
|
|
215
|
+
the belt.
|
|
216
|
+
|
|
217
|
+
- A fit's `min` below -1 mm is refused (`fit.range`), saying to write `"overlap": "allowed"` in its place: a large
|
|
218
|
+
negative `min` was the old way to let two parts overlap. This holds on a fit of any kind (one that measures a gap,
|
|
219
|
+
an `engage`, a `seat` or a `shaft`), since on each a `min` says how deep the two may overlap.
|
|
220
|
+
|
|
221
|
+
For someone upgrading: a fit that only warned now fails `cad check`; replace a `min` below -1 (-2, -30, -100, -1000)
|
|
222
|
+
with `"overlap": "allowed"`; a press fit deeper than its `min` now fails. Fit messages change wording. No printed size
|
|
223
|
+
moves. Round a pin pressed into its hole, the depth reads a little more than the interference (0.33 mm for 0.3 mm round
|
|
224
|
+
a 3 mm pin): a fit drawn exactly at its bound there may need its `min` a little lower. The kit's examples moved with it:
|
|
225
|
+
the arm's servo fits allow its overlap (its model runs about 1.5 mm into the gripper's palm, to be checked), the
|
|
226
|
+
gripper check's horn tips allow theirs and are held to touch, and the launcher's barrel pins are held to their lip.
|
|
227
|
+
|
|
228
|
+
- With the kit's `pla` set now giving its strength across the layers (35 MPa, @rulecad/rules), `cad analyse` and a
|
|
229
|
+
design's analysis read a PLA part against it, the weaker of its two strengths: a safety factor that read 2.6 now reads
|
|
230
|
+
2.33. `fasten` checks and `cad order` torques for screws in PLA fall by about 10% (an M3 cap on a PLA seat: 0.11 N m,
|
|
231
|
+
was 0.12), and a printed M8 bolt in a printed PLA thread breaks at 1014 N, was 1130 N. `cad measured`'s pull bolt
|
|
232
|
+
is predicted at 35 MPa. Printed PLA parts weigh about 1.6% less.
|
|
233
|
+
|
|
234
|
+
Upgrading: a workspace keeps its own copy of `pla.json` until `cad rules update pla` takes the kit's; a PLA part near
|
|
235
|
+
its margin may now warn. No printed size moves.
|
|
236
|
+
|
|
237
|
+
### Added
|
|
238
|
+
|
|
239
|
+
- `"overlap": "allowed"` on a fit: the two parts may overlap by any amount (a rod through a part, an end cap's pegs in
|
|
240
|
+
a beam, a reference part drawn into another). The kit's own generators (guides, motor shafts, seats) use it.
|
|
241
|
+
`cad add fasten --from-fits` keeps it on the fit that fastens, as it keeps a range.
|
|
242
|
+
|
|
243
|
+
- `"engine"` in cad.config.json: `"manifold"` builds every design whose object names no engine with Manifold
|
|
244
|
+
(`"jscad"`, the default, with JSCAD). Without `manifold-3d` installed, designs are built with JSCAD and cad says once
|
|
245
|
+
how to install it. An object's `"engine": "jscad"` keeps it on JSCAD; `CAD_ENGINE` still sets every design for one run.
|
|
246
|
+
Any other value is refused (`engine.unknown`). AGENTS.md says so, in place of "the workspace can switch them to
|
|
247
|
+
Manifold without touching the design".
|
|
248
|
+
|
|
249
|
+
For someone upgrading: in a workspace without Manifold, an overlap under 0.5 mm³ is now a warning in place of a
|
|
250
|
+
failure (in the check and in a sweep), and an overlap measured through a part with a seam face in it reports its true
|
|
251
|
+
volume; the overlap cache is measured again once. Nothing changes where Manifold measures. No printed size moves.
|
|
252
|
+
|
|
253
|
+
- A mesh's `"worm"` takes `"flanks"` (`"printed"` or `"standard"`) and `"overhang"` beside `"diameter"` and `"hand"`:
|
|
254
|
+
the thread as the worm's object gives it to `v.gears.worm`. `@rulecad/gears` now draws a worm to print standing,
|
|
255
|
+
the flank of its thread that faces down laid back to 45°, and `cad check` says which flank then drives and its
|
|
256
|
+
contact ratio (`worm.flanks`, a note; a warning under 1.2). A worm drawn with `flanks: 'standard'` or its own
|
|
257
|
+
`overhang` needs the same in its mesh, or the check speaks of the default thread.
|
|
258
|
+
|
|
259
|
+
For someone upgrading: `cad check` on an assembly with a worm gains the `worm.flanks` line. Nothing is said in an
|
|
260
|
+
assembly of the pose a motor's mount prints in (`mount.printable` in `@rulecad/motors`): that is about the solid
|
|
261
|
+
`v.motors.mount` cuts, and the part's own shape is what the print checks read. No printed size moves through `cad`
|
|
262
|
+
itself; the worm, helical gear and motor mount shapes move with `@rulecad/gears` and `@rulecad/motors`.
|
|
263
|
+
|
|
264
|
+
The worked examples' shoulder (EXAMPLES.md, chapter 11) has stouter posts: each is 2 mm longer outward than it's wide
|
|
265
|
+
(`post_back` in `joint-housing`), over the foot it stands on, 1 g more. With the mount's cone open through its 5 mm
|
|
266
|
+
plate, the round posts left `cad check home/shoulder` reading the motor on its housing 1.9 times inside the fit, under
|
|
267
|
+
the 2 it asks; it reads 2.7 now. If you built that housing from the chapter, take its new listing with the new mount.
|
|
268
|
+
|
|
269
|
+
### Already published
|
|
270
|
+
|
|
271
|
+
- `cad new --frame` refusing frames the kit cannot build, `--estimate`, and `cad frame`'s line with the whole
|
|
272
|
+
frame's size (Hardening 2.43) went out in 0.10.0, but their note was filed late, after that release was made, so
|
|
273
|
+
they are listed under 0.10.0 below. A workspace already on 0.10.0 has them; nothing changes in this release.
|
|
274
|
+
|
|
275
|
+
## 0.10.0: a build follows the files its design imports; slow caches follow their code and libraries, not their comments; the cache is written whole, and only inside the workspace; cad coupons puts the kit's coupons in your workspace, cad measured takes a coupon's figure with no assembly, and --export sends what you measured to the kit; cut lists name each bar's material where a profile comes in more than one, and short ones may buy less; cad fasten's seat check reads the head's bearing face; clip and link stresses follow every edit; the README says snap_clearance is measured; cad measured lists what truly moved, refuses slips, strikes a ledger row, and tables every unsettled figure; releases work below the git root, recover from a failed commit, and keep cad set working; releases record and rebuild from everything a design reads; a corrected kit rule is offered to workspaces holding an older copy; the sandbox's documents say what a design can do on each Node, and cad warns where the network is open; a design can no longer reach Node's own modules through the CommonJS loader (security); object checks report every estimate, shaft seats included, and a reference's holes get no hole compensation; cad applies --set to assemblies, reads the project's printer for minutes, and keeps text as typed; cad new --frame refuses frames the kit cannot build, takes --estimate, and cad frame says the whole frame's size
|
|
9
276
|
|
|
10
277
|
### Fixed
|
|
11
278
|
|
|
@@ -195,6 +462,15 @@ rulecad` makes does). Nothing else changes; no printed size moves.
|
|
|
195
462
|
For someone upgrading: print-time minutes change for projects on a printer other than the X1C (and the kit's README
|
|
196
463
|
with them); `--set` on an assembly now changes what is built, or is refused. No printed size moves.
|
|
197
464
|
|
|
465
|
+
- `cad new --frame ... --inside abc` was refused as "needs at least 2 entries"; a size that is not numbers is now
|
|
466
|
+
refused saying it is numbers in mm, as 300,300,350.
|
|
467
|
+
- A generated frame (`"frame": { "kind": ... }`) follows `@rulecad/frames`' generators: an `outside` is the whole
|
|
468
|
+
frame's, its feet and end caps with it, so the beams come out smaller; a cube join, or a bracket, gusset, hidden or
|
|
469
|
+
anchor join with no fitting, a slot join on a profile with no slot, and an inside too narrow for a blind or end-tap
|
|
470
|
+
join's taps are refused by name before anything is written, as is a blind join whose hex key cannot reach its head
|
|
471
|
+
(OpenBeam's 1515, which cad check failed at a corner). Frame sizing asks that last question through
|
|
472
|
+
`@rulecad/frames`' `blindKeyBlocked`, the same as before.
|
|
473
|
+
|
|
198
474
|
### Added
|
|
199
475
|
|
|
200
476
|
- `cad coupons` adds `projects/coupons` to a workspace: the fixings coupon, the holds coupon and the slot coupon, two
|
|
@@ -264,6 +540,14 @@ again, is made afresh.
|
|
|
264
540
|
names those seats too: a seat drawn to an estimated printer rule (a bearing pocket on `x1c.press`) is named as that
|
|
265
541
|
rule, to settle with `cad measured`, and one drawn to `SHAFT_FITS.press` by giving the fit that works.
|
|
266
542
|
|
|
543
|
+
- `cad new --frame ... --join cube --estimate` (and `"join": { "kind": "cube", "estimate": true }` in an assembly):
|
|
544
|
+
a frame whose join the kit cannot build yet, made all the same and checked by its estimate.
|
|
545
|
+
- `cad frame` adds a line with the whole frame's size, its feet and end caps fitted, where it is more than the beams'.
|
|
546
|
+
|
|
547
|
+
For someone upgrading: a generated frame asked for by `outside` has shorter uprights (by its feet's and caps' height)
|
|
548
|
+
and, on levelling feet, beams 4 mm shorter across; an assembly whose frame joins cube, or bracket, gusset, hidden or
|
|
549
|
+
anchor with no fitting, is refused until its join says `"estimate": true`. Frames asked for by `inside` keep every size.
|
|
550
|
+
|
|
267
551
|
### Changed
|
|
268
552
|
|
|
269
553
|
- The source a coupon's figure is written with names the coupon's `MEASURE.md` in your workspace
|