create-rulecad 0.3.19 → 0.3.20
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/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/template/AGENTS.md +22 -5
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,14 @@ print (a hole's diameter, a seat's depth, a part's outline). Each release lists
|
|
|
5
5
|
it makes, with its reason. A **fasten** is an entry in an assembly's `"fasten"` list: one screwed joint, naming the
|
|
6
6
|
screw by thread and head, the parts it passes through and the part it ends in.
|
|
7
7
|
|
|
8
|
+
## 0.3.20: the edit commands and belt guides in the agent notes (Frames 4)
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- The template's `AGENTS.md`, copied from `@rulecad/cad`, tells an agent to make and change projects and assemblies
|
|
13
|
+
with `cad new`, `cad set`, `cad add`, `cad move` and `cad remove` rather than writing their JSON by hand, and how to
|
|
14
|
+
put a belt drive on a beam.
|
|
15
|
+
|
|
8
16
|
## 0.3.19: pins, magnets and printed bolts in the agent notes (Fixings 4)
|
|
9
17
|
|
|
10
18
|
### Changed
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-rulecad",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.20",
|
|
4
4
|
"description": "Start a rulecad project: npm create rulecad my-designs. A workspace with a soap tray to start from, ready to check, preview, export and share.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/template/AGENTS.md
CHANGED
|
@@ -40,8 +40,14 @@ variable says which rule it comes from. Follow these steps; they're what makes a
|
|
|
40
40
|
1. `npx cad history <project>/<object>` first: read the print log. A failed print is the reason for most changes:
|
|
41
41
|
fix the rule or variable it points at (a measured fit beats a community rule).
|
|
42
42
|
2. Change, then check, preview and look, as for a new part. Change values with `npx cad set <project>/<object>
|
|
43
|
-
name=value` and assemblies with `npx cad add fit|joint|item|pose|fasten
|
|
44
|
-
|
|
43
|
+
name=value` and assemblies with `npx cad add fit|joint|item|beam|pose|fasten|join|guide|load …`, `npx cad set
|
|
44
|
+
<project>/<assembly> x1.at=… joins.0.kind=…`, `npx cad move` and `npx cad remove`: they keep the file's layout and
|
|
45
|
+
refuse an edit that breaks it, naming why and writing nothing. Make a project with `npx cad new <project>` and an
|
|
46
|
+
assembly with `npx cad new <project>/<assembly> --assembly` (`--frame box --inside … --profile …` for a frame), and
|
|
47
|
+
change a project's own fields with `npx cad set <project> material=PETG`. Write project and assembly files with
|
|
48
|
+
these commands, not by hand: each checks its edit first, `--dry-run` shows it, and `--json` gives what changed and
|
|
49
|
+
the checks. `cad remove` refuses to take out what other entries name and lists them; add `--with-refs` only once
|
|
50
|
+
the person agrees those go too. `npx cad values` lists an object's numbers; `npx cad why <project>/<object>.<name>` shows what a
|
|
45
51
|
value depends on, down to the rules (estimates marked). `--json` on check, values and why gives data to act on:
|
|
46
52
|
each finding has a code, its numbers and where it is.
|
|
47
53
|
3. `npx cad release <project>/<object> -m "what changed, for the person" --dry-run` shows the bump and why. If it's
|
|
@@ -142,8 +148,10 @@ variable says which rule it comes from. Follow these steps; they're what makes a
|
|
|
142
148
|
- **A frame for a size starts from a generator**: `"frame": { "kind": "box", "inside": [w, d, h], "profile",
|
|
143
149
|
"join": "blind" }` (also portal, table, gantry, shelf) expands into beams, joins, feet and caps before anything is
|
|
144
150
|
checked. Ask by `inside` for what it must enclose, `outside` for what it must fit in; never work the lengths out by
|
|
145
|
-
hand.
|
|
146
|
-
|
|
151
|
+
hand. Make it with `npx cad new <project>/<assembly> --assembly --frame box --inside 300,300,350 --profile …
|
|
152
|
+
--join blind`, which says what it expands into before it writes. Read `frame.generated` for what it made, and
|
|
153
|
+
`npx cad frame <project>/<assembly> --expand` to write it out when it needs changes a generator cannot make, then
|
|
154
|
+
change the beams and joins with `cad set`, `cad move`, `cad add` and `cad remove` as a hand-drawn frame's.
|
|
147
155
|
- **Beams are cut and drilled by hand from their sheets and jigs**: `npx cad beams <project>/<assembly>` writes a
|
|
148
156
|
cut-and-drill sheet per mark, and `--jigs` writes the jigs as a plate in `exports/` (a drill guide per distinct
|
|
149
157
|
hole across a beam, a tap guide per tapped end, a cut-length stop per length, a squaring corner of the hand each square join takes),
|
|
@@ -161,7 +169,8 @@ variable says which rule it comes from. Follow these steps; they're what makes a
|
|
|
161
169
|
wire along a beam is a run in its `via`, `{ "along": "rail.front", "from": 300, "to": 60 }`: report its length and
|
|
162
170
|
its clips from `wire.length` and `wire.run`.
|
|
163
171
|
- **Linear motion on a beam is a guide**: `"guides": [{ "kind": "rail", "rail": "rail-mgn12", "carriage": "MGN12H",
|
|
164
|
-
"on": "x1.top", "from": 50, "length": 300 }]
|
|
172
|
+
"on": "x1.top", "from": 50, "length": 300 }]`, written by `npx cad add guide <project>/<assembly> --kind rail
|
|
173
|
+
rail=rail-mgn12 carriage=MGN12H on=x1.top from=50 length=300`. Never draw a rail or carriage yourself, nor type its screws: the
|
|
165
174
|
guide places the rail, its screws into the slot at its pitch and each carriage on a sliding joint with its true
|
|
166
175
|
travel. Fix a table on a carriage with a fixed joint at `g1-carriage-1.top`. Run `cad check --sweep`, and report
|
|
167
176
|
`guide.fit`, the travel and each carriage's `joint.moment` margin; a fail there means a longer carriage
|
|
@@ -175,6 +184,14 @@ variable says which rule it comes from. Follow these steps; they're what makes a
|
|
|
175
184
|
Never draw the holders, motor plate, coupler or carriage yourself: the guides place them by addresses and give the
|
|
176
185
|
motor its lead screw. Report the travel, `motor.torque`'s margin, `guide.coupler`, the bearings' `joint.moment`, the
|
|
177
186
|
endstop's home, and each printed part's grams and margin; if the endstop is refused, use the address it names.
|
|
187
|
+
A belt drives a rail's carriage: `{ "kind": "belt", "guide": "g1", "motor": { "model": "nema17" }, "accel": 3000 }`
|
|
188
|
+
(`npx cad add guide <project>/<assembly> --kind belt guide=g1 motor.model=nema17 accel=3000`). Never draw the
|
|
189
|
+
pulley, idler, belt, plate or clamp yourself: the guide places them by addresses. Report `belt.length` (cut and
|
|
190
|
+
buy), `belt.tension`, `motor.torque`'s margin and the travel a turn, `belt.tensioner`'s room, and each printed part's
|
|
191
|
+
grams and margin; say the tension and the belt's thickness are estimates. A `belt.rub` or `belt.line` fail means the
|
|
192
|
+
idler or the part it names moves, never the belt's figures; where the part is on the carriage, raise the belt with
|
|
193
|
+
the `"height"` it names instead or move the part; a `belt.tensioner` fail means cutting the belt to the length it
|
|
194
|
+
names.
|
|
178
195
|
- **A part screwed onto a beam is a `fasten` into a slot**: `"into": "x1.top"` (or `x1.top.2`, or `x1.top@120`, the
|
|
179
196
|
middle of its screws), the
|
|
180
197
|
part's holes drawn with `v.fixings` at the slot's spacing, `"nut"` the slot nut's kind. `fasten.slot` fails a hole off
|