create-rulecad 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/template/AGENTS.md +11 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rulecad",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
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": {
@@ -17,6 +17,15 @@ variable says which rule it comes from. Follow these steps; they're what makes a
17
17
  on `interface` (versions follow them). Give sensible `tweak` ranges to the ones they may want to change.
18
18
  5. `npx cad export` for printing; `npx cad link --md` for a link to share.
19
19
 
20
+ ## Fitting something from elsewhere
21
+ - When a part must fit something whose model exists (a maker's CAD, a model site), measure that model:
22
+ `npx cad measure <file> --rules <name> --source <url> --licence "…"`. Look at the drawing in `.preview/measure/`,
23
+ then rename the draft rules for what they are and say in each `rule` what the feature does.
24
+ - Model it from those rules, then `npx cad match <project>/<object> <file>`: report the worst places with their numbers,
25
+ and look at the sections picture. A deliberate clearance shows as an even offset; anything else is a finding.
26
+ - Don't copy the shape of a model whose licence is non-commercial, no-derivatives or share-alike into a design under
27
+ another licence: take measurements only, and say so.
28
+
20
29
  ## Changing a design
21
30
  1. `npx cad history <project>/<object>` first: read the print log. A failed print is the reason for most changes:
22
31
  fix the rule or variable it points at (a measured fit beats a community rule).
@@ -50,8 +59,8 @@ variable says which rule it comes from. Follow these steps; they're what makes a
50
59
  - A part is named in fits as `<item>.<part>`; an object that returns one unnamed shape has one part, `body`.
51
60
  - A gap fit can't tell whether holes line up. Where a board screws into a part, add a holes fit
52
61
  (`{ "holes": "pcb.board", "into": "case.body", "depth": "m2.insert_length" }`).
53
- - A part built around another (a case around its board) reads it: `"uses": ["node/carrier"]`, then
54
- `carrier.board_w` and `v.carrier.board_holes`. Never copy another object's numbers by hand.
62
+ - A part built around another (a case around its board) reads it: `"uses": ["macropad/pcb"]`, then
63
+ `pcb.board_w` and `v.pcb.board_holes`. Never copy another object's numbers by hand.
55
64
 
56
65
  ## Circuit boards
57
66
  - `"engine": "pcb"` in the .json; `main(v)` returns a board built with `v.pcb` (see @rulecad/pcb's README).