@rulecad/rules 0.2.0 → 0.3.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/README.md CHANGED
@@ -24,8 +24,8 @@ it comes from and when it was checked, so a design built on it can be traced and
24
24
  | `wiring` | Room for hand wiring | 1 |
25
25
 
26
26
  `kind` says how far to trust a value: **spec** (a datasheet or manufacturer), **community** (a widely used figure, such
27
- as KiCad's library or KeyV2), **default** (a setting that works), or **estimate** (nobody has published it: measure it
28
- and correct it). Use them with `@rulecad/variables` (`uses: ['x1c']`, then `x1c.line * 3` in any expression), or read
27
+ as KiCad's library or KeyV2), **default** (a setting that works), **derived** (read off someone else's model with `cad measure`: check it
28
+ against the real thing, and see its `licence`), or **estimate** (nobody has published it: measure it and correct it). Use them with `@rulecad/variables` (`uses: ['x1c']`, then `x1c.line * 3` in any expression), or read
29
29
  the JSON from anywhere.
30
30
 
31
31
  **Corrections are the most useful contribution.** If you measured something, use the "Correct a rule" issue form on
package/al6061.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "_doc": "Aluminium alloy 6061-T6, for analysis.",
3
+ "name": "al6061",
4
+ "rules": {
5
+ "modulus": {"value": 68900, "unit": "MPa", "rule": "Young's modulus", "kind": "spec", "source": "ASM Aerospace Specification Metals, Aluminum 6061-T6, https://asm.matweb.com/search/specificmaterial.asp?bassnum=ma6061t6", "checked": "2026-10-27"},
6
+ "poisson": {"value": 0.33, "rule": "Poisson's ratio", "kind": "spec", "source": "ASM, Aluminum 6061-T6", "checked": "2026-10-27"},
7
+ "strength": {"value": 276, "unit": "MPa", "rule": "Tensile yield strength", "kind": "spec", "source": "ASM, Aluminum 6061-T6", "checked": "2026-10-27"},
8
+ "fatigue": {"value": 96.5, "unit": "MPa", "rule": "Fatigue strength at 500,000,000 cycles (completely reversed, R. R. Moore test)", "kind": "spec", "source": "ASM, Aluminum 6061-T6", "checked": "2026-10-27"},
9
+ "density": {"value": 2.7, "unit": "g/cm³", "rule": "Density", "kind": "spec", "source": "ASM, Aluminum 6061-T6", "checked": "2026-10-27"}
10
+ }
11
+ }
package/al7075.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "_doc": "Aluminium alloy 7075-T6, for analysis.",
3
+ "name": "al7075",
4
+ "rules": {
5
+ "modulus": {"value": 71700, "unit": "MPa", "rule": "Young's modulus", "kind": "spec", "source": "ASM Aerospace Specification Metals, Aluminum 7075-T6, https://asm.matweb.com/search/specificmaterial.asp?bassnum=ma7075t6", "checked": "2026-10-27"},
6
+ "poisson": {"value": 0.33, "rule": "Poisson's ratio", "kind": "spec", "source": "ASM, Aluminum 7075-T6", "checked": "2026-10-27"},
7
+ "strength": {"value": 503, "unit": "MPa", "rule": "Tensile yield strength", "kind": "spec", "source": "ASM, Aluminum 7075-T6", "checked": "2026-10-27"},
8
+ "fatigue": {"value": 159, "unit": "MPa", "rule": "Fatigue strength at 500,000,000 cycles (completely reversed, R. R. Moore test)", "kind": "spec", "source": "ASM, Aluminum 7075-T6", "checked": "2026-10-27"},
9
+ "density": {"value": 2.81, "unit": "g/cm³", "rule": "Density", "kind": "spec", "source": "ASM, Aluminum 7075-T6", "checked": "2026-10-27"}
10
+ }
11
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "_doc": "A dial indicator (dial test gauge) with a plunger, for measuring small movements. kind as in x1c.json.",
3
+ "name": "dial-indicator",
4
+ "rules": {
5
+ "stem": {"value": 8, "unit": "mm", "rule": "Mounting stem diameter (8h6)", "kind": "spec", "source": "DIN 878 / ISO 463", "checked": "2026-10-27"},
6
+ "travel": {"value": 10, "unit": "mm", "rule": "Plunger travel of the common 0.01 mm, 10 mm range gauge", "kind": "community", "source": "Typical 0.01 mm / 10 mm dial indicators (Mitutoyo 2046 series and alike)", "checked": "2026-10-27"}
7
+ }
8
+ }
package/m4.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "_doc": "M4 socket head screws and hex nuts. kind as in x1c.json.",
3
+ "name": "m4",
4
+ "rules": {
5
+ "clearance": {"value": 4.5, "unit": "mm", "rule": "Clearance hole for an M4 screw, medium fit", "kind": "spec", "source": "ISO 273", "checked": "2026-10-27"},
6
+ "head": {"value": 7, "unit": "mm", "rule": "M4 socket head cap screw head diameter", "kind": "spec", "source": "ISO 4762", "checked": "2026-10-27"},
7
+ "head_height": {"value": 4, "unit": "mm", "rule": "M4 socket head cap screw head height", "kind": "spec", "source": "ISO 4762", "checked": "2026-10-27"},
8
+ "nut_flats": {"value": 7, "unit": "mm", "rule": "M4 hex nut width across flats", "kind": "spec", "source": "ISO 4032", "checked": "2026-10-27"},
9
+ "nut_height": {"value": 3.2, "unit": "mm", "rule": "M4 hex nut height", "kind": "spec", "source": "ISO 4032", "checked": "2026-10-27"}
10
+ }
11
+ }
package/m5.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "_doc": "M5 socket head screws and hex nuts. kind as in x1c.json.",
3
+ "name": "m5",
4
+ "rules": {
5
+ "clearance": {"value": 5.5, "unit": "mm", "rule": "Clearance hole for an M5 screw, medium fit", "kind": "spec", "source": "ISO 273", "checked": "2026-10-27"},
6
+ "head": {"value": 8.5, "unit": "mm", "rule": "M5 socket head cap screw head diameter", "kind": "spec", "source": "ISO 4762", "checked": "2026-10-27"},
7
+ "head_height": {"value": 5, "unit": "mm", "rule": "M5 socket head cap screw head height", "kind": "spec", "source": "ISO 4762", "checked": "2026-10-27"},
8
+ "nut_flats": {"value": 8, "unit": "mm", "rule": "M5 hex nut width across flats", "kind": "spec", "source": "ISO 4032", "checked": "2026-10-27"},
9
+ "nut_height": {"value": 4.7, "unit": "mm", "rule": "M5 hex nut height", "kind": "spec", "source": "ISO 4032", "checked": "2026-10-27"}
10
+ }
11
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rulecad/rules",
3
- "version": "0.2.0",
4
- "description": "Researched rule sets as open data: a Bambu Lab X1C, Cherry MX switches, OEM keycaps, M2 inserts, the Raspberry Pi Pico and more, each value with its source.",
3
+ "version": "0.3.0",
4
+ "description": "Researched rule sets as open data: a Bambu Lab X1C, Cherry MX switches, OEM keycaps, M2 inserts, the Raspberry Pi Pico, materials for analysis (printed PLA and PETG, aluminium, steel, titanium) and more, each value with its source.",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  "./*": "./*"
package/petg.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "_doc": "Bambu Lab PETG HF, printed, for analysis: stiffness and strength along the layers (x-y) and across them (z). Printed values vary with the printer, settings and spool: measure your own (the lever bench does) and record it as kind measured.",
3
+ "name": "petg",
4
+ "rules": {
5
+ "modulus": {"value": 1810, "unit": "MPa", "rule": "Young's modulus along the layers (x-y), ± 190", "kind": "spec", "source": "Bambu Lab PETG HF technical data sheet V1.0 (ISO 527), https://store.bblcdn.com/3a230e260a3a47c2b0db0156e07eef91.pdf", "checked": "2026-10-27"},
6
+ "modulus_z": {"value": 1540, "unit": "MPa", "rule": "Young's modulus across the layers (z), ± 130", "kind": "spec", "source": "Bambu Lab PETG HF technical data sheet V1.0 (ISO 527)", "checked": "2026-10-27"},
7
+ "strength": {"value": 34, "unit": "MPa", "rule": "Tensile strength along the layers (x-y), ± 4", "kind": "spec", "source": "Bambu Lab PETG HF technical data sheet V1.0 (ISO 527)", "checked": "2026-10-27"},
8
+ "strength_z": {"value": 23, "unit": "MPa", "rule": "Tensile strength across the layers (z), ± 4", "kind": "spec", "source": "Bambu Lab PETG HF technical data sheet V1.0 (ISO 527)", "checked": "2026-10-27"},
9
+ "poisson": {"value": 0.38, "rule": "Poisson's ratio (Bambu publish none)", "kind": "estimate", "source": "Typical for PETG; printed parts vary", "checked": "2026-10-27"},
10
+ "density": {"value": 1.27, "unit": "g/cm³", "rule": "Density of PETG", "kind": "estimate", "source": "Typical for PETG (1.23 to 1.29 g/cm³ across makers' data sheets)", "checked": "2026-10-27"}
11
+ }
12
+ }
package/pla.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "_doc": "Bambu Lab PLA Basic, printed, for analysis: stiffness and strength along the layers (x-y) and across them (z). Printed values vary with the printer, settings and spool: measure your own (the lever bench does) and record it as kind measured.",
3
+ "name": "pla",
4
+ "rules": {
5
+ "modulus": {"value": 2680, "unit": "MPa", "rule": "Young's modulus along the layers (x-y), ± 130", "kind": "spec", "source": "Bambu Lab PLA Basic technical data sheet V2.0 (ISO 527), https://www.impresoras3d.com/wp-content/uploads/2023/08/TDS-Bambu-PLA-Basic-Technical-Data-Sheet.pdf", "checked": "2026-10-27"},
6
+ "modulus_z": {"value": 2160, "unit": "MPa", "rule": "Young's modulus across the layers (z), ± 90", "kind": "spec", "source": "Bambu Lab PLA Basic technical data sheet V2.0 (ISO 527)", "checked": "2026-10-27"},
7
+ "strength": {"value": 39, "unit": "MPa", "rule": "Tensile strength along the layers (x-y), ± 2", "kind": "community", "source": "Bambu Lab PLA Basic technical data sheet V2.0 (ISO 527), as quoted by resellers: check the current sheet", "checked": "2026-10-27"},
8
+ "poisson": {"value": 0.36, "rule": "Poisson's ratio (Bambu publish none)", "kind": "estimate", "source": "Typical for PLA; Farah, Anderson, Langer (2016), Physical and mechanical properties of PLA, Advanced Drug Delivery Reviews 107", "checked": "2026-10-27"},
9
+ "density": {"value": 1.26, "unit": "g/cm³", "rule": "Density of the filament", "kind": "spec", "source": "Bambu Lab PLA Basic technical data sheet V2.0", "checked": "2026-10-27"}
10
+ }
11
+ }
package/s275.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "_doc": "Structural steel S275 (EN 10025-2), for analysis.",
3
+ "name": "s275",
4
+ "rules": {
5
+ "modulus": {"value": 210000, "unit": "MPa", "rule": "Young's modulus", "kind": "spec", "source": "EN 1993-1-1, 3.2.6", "checked": "2026-10-27"},
6
+ "poisson": {"value": 0.3, "rule": "Poisson's ratio", "kind": "spec", "source": "EN 1993-1-1, 3.2.6", "checked": "2026-10-27"},
7
+ "strength": {"value": 275, "unit": "MPa", "rule": "Yield strength, up to 16 mm thick", "kind": "spec", "source": "EN 10025-2", "checked": "2026-10-27"},
8
+ "density": {"value": 7.85, "unit": "g/cm³", "rule": "Density", "kind": "spec", "source": "EN 1991-1-1, table A.4", "checked": "2026-10-27"}
9
+ }
10
+ }
package/ss304.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "_doc": "Stainless steel 304, annealed, for analysis.",
3
+ "name": "ss304",
4
+ "rules": {
5
+ "modulus": {"value": 193000, "unit": "MPa", "rule": "Young's modulus", "kind": "spec", "source": "ASM Aerospace Specification Metals, AISI Type 304 Stainless Steel, https://asm.matweb.com/search/specificmaterial.asp?bassnum=mq304a", "checked": "2026-10-27"},
6
+ "poisson": {"value": 0.29, "rule": "Poisson's ratio", "kind": "spec", "source": "ASM, AISI Type 304", "checked": "2026-10-27"},
7
+ "strength": {"value": 215, "unit": "MPa", "rule": "Tensile yield strength, annealed", "kind": "spec", "source": "ASM, AISI Type 304", "checked": "2026-10-27"},
8
+ "density": {"value": 8.0, "unit": "g/cm³", "rule": "Density", "kind": "spec", "source": "ASM, AISI Type 304", "checked": "2026-10-27"}
9
+ }
10
+ }
package/ti64.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "_doc": "Titanium Ti-6Al-4V (grade 5), annealed, for analysis.",
3
+ "name": "ti64",
4
+ "rules": {
5
+ "modulus": {"value": 113800, "unit": "MPa", "rule": "Young's modulus", "kind": "spec", "source": "ASM Aerospace Specification Metals, Titanium Ti-6Al-4V (Grade 5), Annealed, https://asm.matweb.com/search/specificmaterial.asp?bassnum=mtp641", "checked": "2026-10-27"},
6
+ "poisson": {"value": 0.342, "rule": "Poisson's ratio", "kind": "spec", "source": "ASM, Ti-6Al-4V annealed", "checked": "2026-10-27"},
7
+ "strength": {"value": 880, "unit": "MPa", "rule": "Tensile yield strength", "kind": "spec", "source": "ASM, Ti-6Al-4V annealed", "checked": "2026-10-27"},
8
+ "fatigue": {"value": 510, "unit": "MPa", "rule": "Fatigue strength at 10,000,000 cycles, unnotched", "kind": "spec", "source": "ASM, Ti-6Al-4V annealed", "checked": "2026-10-27"},
9
+ "density": {"value": 4.43, "unit": "g/cm³", "rule": "Density", "kind": "spec", "source": "ASM, Ti-6Al-4V annealed", "checked": "2026-10-27"}
10
+ }
11
+ }