@rulecad/rules 0.3.7 → 0.3.9
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 +19 -1
- package/a4988.json +26 -0
- package/as5600.json +22 -0
- package/bearing-51104.json +17 -0
- package/bearing-608.json +17 -0
- package/bearing-625.json +16 -0
- package/bearing-6800.json +16 -0
- package/bearing-f623.json +17 -0
- package/bearing-mr105.json +16 -0
- package/cnc-shield-v3.json +26 -0
- package/coupler-5-8.json +12 -0
- package/drawings/a4988.svg +1 -0
- package/drawings/bearing-51104.svg +1 -0
- package/drawings/bearing-608.svg +1 -0
- package/drawings/bearing-625.svg +1 -0
- package/drawings/bearing-6800.svg +1 -0
- package/drawings/bearing-f623.svg +1 -0
- package/drawings/bearing-mr105.svg +1 -0
- package/drawings/coupler-5-8.svg +1 -0
- package/drawings/drv8825.svg +1 -0
- package/drawings/gt2-belt-6.svg +1 -0
- package/drawings/idler-gt2-smooth-20.svg +1 -0
- package/drawings/idler-gt2-toothed-20.svg +1 -0
- package/drawings/lm8luu.svg +1 -0
- package/drawings/lm8uu.svg +1 -0
- package/drawings/pulley-gt2-16.svg +1 -0
- package/drawings/pulley-gt2-20.svg +1 -0
- package/drawings/rod-8.svg +1 -0
- package/drawings/t8-nut.svg +1 -0
- package/drawings/t8-screw.svg +1 -0
- package/drawings/tmc2209.svg +1 -0
- package/drv8825.json +25 -0
- package/endstop-10t85.json +19 -0
- package/gt2-belt-6.json +18 -0
- package/idler-gt2-smooth-20.json +12 -0
- package/idler-gt2-toothed-20.json +14 -0
- package/lm8luu.json +13 -0
- package/lm8uu.json +13 -0
- package/package.json +1 -1
- package/pulley-gt2-16.json +16 -0
- package/pulley-gt2-20.json +16 -0
- package/rod-8.json +14 -0
- package/supply-12v.json +15 -0
- package/supply-24v.json +16 -0
- package/t8-nut.json +20 -0
- package/t8-screw.json +18 -0
- package/tmc2209.json +26 -0
- package/vocabulary.json +98 -6
- package/wire.json +10 -0
- package/x1c.json +24 -0
package/vocabulary.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_doc": "The names rule sets share for what a part mounts by and what it does, so one piece of code can read any of them: a motor, a
|
|
3
|
-
"units": ["mm", "deg", "kg", "g", "N m", "N", "V", "A", "ohm", "mH", "rpm", "rpm/V", "Hz", "s", "degC", "g cm2", ":1", "teeth", ""],
|
|
2
|
+
"_doc": "The names rule sets share for what a part mounts by and what it does, so one piece of code can read any of them: a motor, a bearing, a driver, a screw. A set with \"part\" uses these names directly. An older set keeps its own names and says which is which in \"interface\". Read by cad rules check and cad rules draw.",
|
|
3
|
+
"units": ["mm", "deg", "kg", "g", "N m", "N", "V", "A", "ohm", "mH", "rpm", "rpm/V", "Hz", "s", "degC", "g cm2", ":1", "teeth", "A/V", "mT", "W", "bit", "N/strain", "N/strain/mm", ""],
|
|
4
4
|
"prefixes": ["body_", "boss_", "shaft_", "mount_", "cable_", "horn_", "screw_"],
|
|
5
5
|
"fields": {
|
|
6
|
-
"type": { "choice": ["stepper", "dc", "servo", "brushless"], "says": "what sort of motor" },
|
|
6
|
+
"type": { "choice": ["stepper", "dc", "servo", "brushless", "radial", "flanged", "thrust"], "says": "what sort of motor, or of bearing" },
|
|
7
7
|
"body_shape": { "choice": ["square", "round", "box"], "says": "the body's outline, seen from the mounting face" },
|
|
8
|
-
"body_width": { "unit": "mm", "says": "a square frame's side,
|
|
8
|
+
"body_width": { "unit": "mm", "says": "a square frame's side, a box's long side, or a pulley's overall width along its axis" },
|
|
9
9
|
"body_depth": { "unit": "mm", "says": "a box's short side" },
|
|
10
10
|
"body_diameter": { "unit": "mm", "says": "a round body" },
|
|
11
11
|
"body_length": { "unit": "mm", "says": "from the mounting face back" },
|
|
@@ -56,9 +56,101 @@
|
|
|
56
56
|
"kv": { "unit": "rpm/V", "says": "a brushless motor's speed per volt" },
|
|
57
57
|
"rotor_inertia": { "unit": "g cm2", "says": "the rotor's inertia" },
|
|
58
58
|
"temperature_rise": { "unit": "degC", "says": "the case above the room, at rated current" },
|
|
59
|
-
"radial_load": { "unit": "N", "says": "the most sideways load on the shaft" }
|
|
59
|
+
"radial_load": { "unit": "N", "says": "the most sideways load on the shaft" },
|
|
60
|
+
"bore": { "unit": "mm", "says": "a bearing's bore: the shaft fits here" },
|
|
61
|
+
"outer_diameter": { "unit": "mm", "says": "a bearing's outside diameter: the housing fits here" },
|
|
62
|
+
"width": { "unit": "mm", "says": "a bearing's width along its axis; a thrust bearing's height" },
|
|
63
|
+
"chamfer": { "unit": "mm", "says": "the corner radius of a bearing's rings, the most a shaft or housing fillet may be" },
|
|
64
|
+
"static_rating": { "unit": "N", "says": "a bearing's basic static load rating (radial, or axial for a thrust bearing)" },
|
|
65
|
+
"dynamic_rating": { "unit": "N", "says": "a bearing's basic dynamic load rating (radial, or axial for a thrust bearing)" },
|
|
66
|
+
"radial_play": { "says": "a radial bearing's internal clearance class: CN is normal" },
|
|
67
|
+
"flange_diameter": { "unit": "mm", "says": "a flanged bearing's flange, or a lead-screw nut's" },
|
|
68
|
+
"flange_width": { "unit": "mm", "says": "how thick a flanged bearing's or nut's flange is" },
|
|
69
|
+
"shaft_washer_diameter": { "unit": "mm", "says": "the outside of a thrust bearing's shaft washer" },
|
|
70
|
+
"housing_washer_bore": { "unit": "mm", "says": "the bore of a thrust bearing's housing washer: the shaft must clear it" },
|
|
71
|
+
"actuation_force": { "unit": "N", "says": "the force to operate a switch" },
|
|
72
|
+
"rating_mark": { "says": "the rating marked on a switch's case" },
|
|
73
|
+
"resolution": { "unit": "bit", "says": "an encoder's resolution over a turn" },
|
|
74
|
+
"air_gap_min": { "unit": "mm", "says": "the least gap between an encoder's magnet and chip" },
|
|
75
|
+
"air_gap_max": { "unit": "mm", "says": "the most gap between an encoder's magnet and chip" },
|
|
76
|
+
"magnet_field_min": { "unit": "mT", "says": "the least field across an encoder's chip" },
|
|
77
|
+
"magnet_field_max": { "unit": "mT", "says": "the most field across an encoder's chip" },
|
|
78
|
+
"magnet_diameter": { "unit": "mm", "says": "an encoder's disc magnet" },
|
|
79
|
+
"magnet_thickness": { "unit": "mm", "says": "an encoder's disc magnet, along its axis" },
|
|
80
|
+
"magnet_polarity": { "says": "how the magnet is magnetised: diametric is across the round face" },
|
|
81
|
+
"supply_voltage_min": { "unit": "V", "says": "the least supply a board works from" },
|
|
82
|
+
"supply_voltage_max": { "unit": "V", "says": "the most supply a board works from" },
|
|
83
|
+
"pin_pitch": { "unit": "mm", "says": "pin spacing along a header row" },
|
|
84
|
+
"row_spacing": { "unit": "mm", "says": "between a board's two header rows" },
|
|
85
|
+
"pin_count": { "unit": "", "says": "pins in all" },
|
|
86
|
+
"pinout": { "says": "what each pin is, in order" },
|
|
87
|
+
"motor_voltage_min": { "unit": "V", "says": "a driver's least motor supply" },
|
|
88
|
+
"motor_voltage_max": { "unit": "V", "says": "a driver's most motor supply" },
|
|
89
|
+
"logic_voltage_min": { "unit": "V", "says": "a driver's least logic level or supply" },
|
|
90
|
+
"logic_voltage_max": { "unit": "V", "says": "a driver's most logic level or supply" },
|
|
91
|
+
"current_bare": { "unit": "A", "says": "a driver's continuous current per coil with no heat sink or moving air" },
|
|
92
|
+
"current_cooled": { "unit": "A", "says": "a driver's most current per coil with cooling" },
|
|
93
|
+
"current_peak": { "unit": "A", "says": "a driver's peak current per coil" },
|
|
94
|
+
"sense_resistor": { "unit": "ohm", "says": "the resistor a driver measures coil current through" },
|
|
95
|
+
"vref_formula": { "says": "how the voltage on a driver's trimmer sets its current" },
|
|
96
|
+
"vref_gain": { "unit": "A/V", "says": "the current limit per volt of Vref: A = Vref * gain (RMS for a TMC2209, the peak limit otherwise)" },
|
|
97
|
+
"microsteps": { "says": "the step divisions a driver offers" },
|
|
98
|
+
"max_microsteps": { "unit": "", "says": "a driver's finest division of a full step" },
|
|
99
|
+
"thermal_shutdown": { "unit": "degC", "says": "the temperature a driver's chip stops at" },
|
|
100
|
+
"uart_note": { "says": "how a driver's UART is wired" },
|
|
101
|
+
"output_voltage": { "unit": "V", "says": "a supply's output" },
|
|
102
|
+
"output_current": { "unit": "A", "says": "a supply's rated output current" },
|
|
103
|
+
"output_power": { "unit": "W", "says": "a supply's rated output power" },
|
|
104
|
+
"diameter": { "unit": "mm", "says": "a lead screw's or smooth rod's outside diameter" },
|
|
105
|
+
"lead": { "unit": "mm", "says": "a lead screw's travel in one turn (or the screw a nut fits)" },
|
|
106
|
+
"pitch": { "unit": "mm", "says": "thread pitch, or a belt's or pulley's tooth pitch" },
|
|
107
|
+
"starts": { "unit": "", "says": "a lead screw's independent threads" },
|
|
108
|
+
"thread": { "says": "a lead screw's or nut's thread: Tr8x8(P2)" },
|
|
109
|
+
"pitch_diameter": { "unit": "mm", "says": "a thread's or a pulley's pitch diameter" },
|
|
110
|
+
"root_diameter": { "unit": "mm", "says": "a thread's root diameter" },
|
|
111
|
+
"helix_angle": { "unit": "deg", "says": "a lead screw's lead angle at the pitch diameter" },
|
|
112
|
+
"friction_coefficient": { "unit": "", "says": "the thread friction assumed for a lead screw's efficiency" },
|
|
113
|
+
"efficiency_note": { "says": "how a lead screw's efficiency and back-driving are worked out, and how far to trust them" },
|
|
114
|
+
"length": { "unit": "mm", "says": "a nut, linear bearing or coupler end to end" },
|
|
115
|
+
"flange_offset": { "unit": "mm", "says": "from a nut's short end to its flange" },
|
|
116
|
+
"hole_circle": { "unit": "mm", "says": "the circle a part's mounting holes sit on" },
|
|
117
|
+
"hole_count": { "unit": "", "says": "mounting holes" },
|
|
118
|
+
"material": { "says": "what the part is made of" },
|
|
119
|
+
"tolerance": { "says": "a rod's diameter tolerance, as the source gives it" },
|
|
120
|
+
"hardness": { "says": "a rod's surface hardness, as the source gives it" },
|
|
121
|
+
"straightness": { "says": "a rod's straightness, as the source gives it" },
|
|
122
|
+
"bore_a": { "unit": "mm", "says": "a coupler's first bore" },
|
|
123
|
+
"bore_b": { "unit": "mm", "says": "a coupler's second bore" },
|
|
124
|
+
"style": { "says": "what sort of coupler, and how it grips" },
|
|
125
|
+
"pitch_line_offset": { "unit": "mm", "says": "a belt's pitch line beyond the pulley's teeth, each side" },
|
|
126
|
+
"stiffness": { "unit": "N/strain", "says": "the tension that stretches a belt by unit strain, for its width: stretch = tension * length / stiffness" },
|
|
127
|
+
"stiffness_per_width": { "unit": "N/strain/mm", "says": "a belt's stiffness per mm of its width" },
|
|
128
|
+
"rated_tension": { "unit": "N", "says": "a belt's rated working tension" },
|
|
129
|
+
"breaking_strength": { "unit": "N", "says": "a belt's minimum breaking strength" },
|
|
130
|
+
"min_static_tension": { "unit": "N", "says": "a belt's least static tension per span" },
|
|
131
|
+
"min_inside_idler_grooves": { "unit": "teeth", "says": "the smallest toothed idler inside a belt" },
|
|
132
|
+
"min_backside_idler_diameter": { "unit": "mm", "says": "the smallest idler on a belt's back" },
|
|
133
|
+
"min_flat_idler_diameter": { "unit": "mm", "says": "the smallest smooth idler running on a belt's teeth" },
|
|
134
|
+
"teeth": { "unit": "teeth", "says": "a pulley's or idler's tooth count" },
|
|
135
|
+
"tooth_diameter": { "unit": "mm", "says": "a pulley's diameter across the teeth" },
|
|
136
|
+
"belt_width": { "unit": "mm", "says": "the belt a pulley or idler takes" },
|
|
137
|
+
"toothed": { "choice": ["yes", "no"], "says": "whether an idler has teeth" }
|
|
60
138
|
},
|
|
61
139
|
"parts": {
|
|
62
|
-
"motor": ["type", "body_shape", "body_length", "shaft_diameter", "shaft_length", "shaft_flats", "mount_pattern", "mount_hole_spacing", "mass"]
|
|
140
|
+
"motor": ["type", "body_shape", "body_length", "shaft_diameter", "shaft_length", "shaft_flats", "mount_pattern", "mount_hole_spacing", "mass"],
|
|
141
|
+
"bearing": ["type", "bore", "outer_diameter", "width", "chamfer", "static_rating", "dynamic_rating"],
|
|
142
|
+
"switch": ["body_width", "body_depth", "body_length", "mount_hole_spacing", "mount_hole_diameter", "actuation_force", "rated_voltage", "rated_current"],
|
|
143
|
+
"encoder": ["resolution", "air_gap_min", "air_gap_max", "magnet_diameter", "magnet_thickness", "supply_voltage_min", "supply_voltage_max", "body_width", "body_depth"],
|
|
144
|
+
"driver": ["motor_voltage_min", "motor_voltage_max", "logic_voltage_min", "logic_voltage_max", "current_bare", "current_cooled", "sense_resistor", "vref_formula", "vref_gain", "microsteps", "max_microsteps", "pin_pitch", "row_spacing", "pin_count", "body_width", "body_depth", "pinout"],
|
|
145
|
+
"board": ["body_width", "body_depth", "pinout"],
|
|
146
|
+
"supply": ["output_voltage", "output_current", "output_power", "body_width", "body_depth", "body_length"],
|
|
147
|
+
"leadscrew": ["thread", "diameter", "pitch", "lead", "starts", "efficiency_note"],
|
|
148
|
+
"nut": ["thread", "lead", "flange_diameter", "body_diameter", "length", "hole_circle", "hole_count"],
|
|
149
|
+
"rod": ["diameter"],
|
|
150
|
+
"linear_bearing": ["bore", "outer_diameter", "length", "static_rating", "dynamic_rating"],
|
|
151
|
+
"coupler": ["bore_a", "bore_b", "length", "outer_diameter"],
|
|
152
|
+
"belt": ["pitch", "pitch_line_offset", "width", "stiffness"],
|
|
153
|
+
"pulley": ["teeth", "pitch_diameter", "bore", "belt_width", "outer_diameter", "body_width"],
|
|
154
|
+
"idler": ["toothed", "bore", "belt_width", "outer_diameter", "body_width"]
|
|
63
155
|
}
|
|
64
156
|
}
|
package/wire.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_doc": "Hook-up wire by American Wire Gauge: the copper's area from the gauge's definition, and how much current a wire in a machine should be asked to carry. The current density is a working limit for short runs in free air and is an estimate: feel the wire under load.",
|
|
3
|
+
"name": "wire",
|
|
4
|
+
"rules": {
|
|
5
|
+
"current_density": { "value": 10, "unit": "A/mm²", "rule": "Current a hook-up wire in a machine may carry per square millimetre of copper, for short runs in free air: under the 17 A/mm² chassis-wiring figure, as wires in a bundle or a chain run warmer", "kind": "estimate", "source": "PowerStream's AWG chart gives 2.2 A for 26 AWG (0.128 mm², 17 A/mm²) as chassis wiring, https://www.powerstream.com/Wire_Size.htm; taken at about 0.6 of it", "checked": "2026-11-09" },
|
|
6
|
+
"service_loop": { "value": 40, "unit": "mm", "rule": "Slack added to a wire's longest run, for a strain relief and the connector", "kind": "default", "source": "A working allowance; the wire's route is otherwise taken as drawn", "checked": "2026-11-09" },
|
|
7
|
+
"signal_current": { "value": 0.02, "unit": "A", "rule": "What a signal wire (an endstop, a step line) carries", "kind": "estimate", "source": "Arduino Uno I/O pins are rated 20 mA, https://docs.arduino.cc/hardware/uno-rev3/", "checked": "2026-11-09" },
|
|
8
|
+
"awg_base": { "value": 0.127, "unit": "mm", "rule": "A wire of gauge n is 0.127 × 92^((36 − n) / 39) mm across", "kind": "spec", "source": "The AWG definition, ASTM B258", "checked": "2026-11-09" }
|
|
9
|
+
}
|
|
10
|
+
}
|
package/x1c.json
CHANGED
|
@@ -58,6 +58,30 @@
|
|
|
58
58
|
"source": "Common FDM practice; tune with a test print",
|
|
59
59
|
"checked": "2026-10-11"
|
|
60
60
|
},
|
|
61
|
+
"press": {
|
|
62
|
+
"value": 0.05,
|
|
63
|
+
"unit": "mm",
|
|
64
|
+
"rule": "How much smaller across a printed bore is than a bought part pressed into it, once printed (a ball bearing's outer race): hole_comp is added as well",
|
|
65
|
+
"kind": "estimate",
|
|
66
|
+
"source": "A reasoned guess, half a typical 0.1 mm hole error; measure it with the seats coupon (examples/bench/projects/benchmarks/objects/seats-coupon)",
|
|
67
|
+
"checked": "2026-11-09"
|
|
68
|
+
},
|
|
69
|
+
"slip": {
|
|
70
|
+
"value": 0.1,
|
|
71
|
+
"unit": "mm",
|
|
72
|
+
"rule": "How much larger across a printed bore is than a bought part that slides into it by hand, once printed: hole_comp is added as well",
|
|
73
|
+
"kind": "estimate",
|
|
74
|
+
"source": "A reasoned guess; measure it with the seats coupon (examples/bench/projects/benchmarks/objects/seats-coupon)",
|
|
75
|
+
"checked": "2026-11-09"
|
|
76
|
+
},
|
|
77
|
+
"print_flow": {
|
|
78
|
+
"value": 12,
|
|
79
|
+
"unit": "mm³/s",
|
|
80
|
+
"rule": "Average plastic laid per second over a whole print, walls, travel and all: for estimating minutes from a part's volume",
|
|
81
|
+
"kind": "estimate",
|
|
82
|
+
"source": "A rule of thumb for a 0.4 mm nozzle on default settings; check it against a real print's time",
|
|
83
|
+
"checked": "2026-11-09"
|
|
84
|
+
},
|
|
61
85
|
"print_gap": {
|
|
62
86
|
"value": 0.3,
|
|
63
87
|
"unit": "mm",
|