@rulecad/rules 0.3.8 → 0.3.11
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 +60 -6
- package/coupler-5-8.json +12 -0
- package/drawings/coupler-5-8.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/m3.svg +1 -0
- package/drawings/pt_k30.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/unc_6_32.svg +1 -0
- package/engagement.json +9 -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/m10.json +51 -0
- package/m12.json +44 -0
- package/m1_6.json +30 -4
- package/m2.json +41 -7
- package/m2_5.json +46 -0
- package/m3.json +46 -4
- package/m4.json +47 -7
- package/m5.json +46 -7
- package/m6.json +50 -0
- package/m8.json +51 -0
- package/package.json +1 -1
- package/pt_k22.json +19 -0
- package/pt_k25.json +19 -0
- package/pt_k30.json +19 -0
- package/pt_k35.json +19 -0
- package/pt_k40.json +19 -0
- package/pt_k50.json +19 -0
- package/pulley-gt2-16.json +16 -0
- package/pulley-gt2-20.json +16 -0
- package/rod-8.json +14 -0
- package/t8-nut.json +20 -0
- package/t8-screw.json +18 -0
- package/unc_10_24.json +47 -0
- package/unc_1_4_20.json +50 -0
- package/unc_3_8_16.json +44 -0
- package/unc_4_40.json +48 -0
- package/unc_5_16_18.json +44 -0
- package/unc_6_32.json +48 -0
- package/unc_8_32.json +48 -0
- package/unf_10_32.json +46 -0
- package/vocabulary.json +126 -8
- package/x1c.json +16 -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 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", ""],
|
|
4
|
-
"prefixes": ["body_", "boss_", "shaft_", "mount_", "cable_", "horn_", "screw_"],
|
|
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\". \"checks\" says what must hold between a part's figures (a head wider than its clearance hole). A field marked \"list\" holds a list. A thread's older names are its vocabulary: clearance is the normal clearance hole, head and head_height the socket cap head, nut_flats and nut_height the hexagon nut. 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", "MPa", ""],
|
|
4
|
+
"prefixes": ["body_", "boss_", "shaft_", "mount_", "cable_", "horn_", "screw_", "clearance_", "head_", "button_", "countersunk_", "hex_head_", "pan_head_", "nut_", "square_nut_", "lock_nut_", "washer_", "set_screw_", "insert_", "pilot_", "tap_"],
|
|
5
5
|
"fields": {
|
|
6
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" },
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"static_rating": { "unit": "N", "says": "a bearing's basic static load rating (radial, or axial for a thrust bearing)" },
|
|
65
65
|
"dynamic_rating": { "unit": "N", "says": "a bearing's basic dynamic load rating (radial, or axial for a thrust bearing)" },
|
|
66
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" },
|
|
68
|
-
"flange_width": { "unit": "mm", "says": "how thick a flanged bearing's flange is" },
|
|
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
69
|
"shaft_washer_diameter": { "unit": "mm", "says": "the outside of a thrust bearing's shaft washer" },
|
|
70
70
|
"housing_washer_bore": { "unit": "mm", "says": "the bore of a thrust bearing's housing washer: the shaft must clear it" },
|
|
71
71
|
"actuation_force": { "unit": "N", "says": "the force to operate a switch" },
|
|
@@ -100,7 +100,88 @@
|
|
|
100
100
|
"uart_note": { "says": "how a driver's UART is wired" },
|
|
101
101
|
"output_voltage": { "unit": "V", "says": "a supply's output" },
|
|
102
102
|
"output_current": { "unit": "A", "says": "a supply's rated output current" },
|
|
103
|
-
"output_power": { "unit": "W", "says": "a supply's rated output power" }
|
|
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 thread as it is written: M3, 6-32 UNC, 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" },
|
|
138
|
+
"thread_form": { "choice": ["metric", "unified", "plastic"], "says": "a fixing thread's family: ISO metric, unified inch, or a thread-forming screw for plastic" },
|
|
139
|
+
"major_diameter": { "unit": "mm", "says": "a screw thread's major (nominal) diameter" },
|
|
140
|
+
"pitch_fine": { "unit": "mm", "says": "the pitch of the thread's common fine partner, where one is common" },
|
|
141
|
+
"tap_drill": { "unit": "mm", "says": "the drill for tapping the coarse thread in metal" },
|
|
142
|
+
"clearance_close": { "unit": "mm", "says": "a clearance hole for the screw, close fit" },
|
|
143
|
+
"clearance": { "unit": "mm", "says": "a clearance hole for the screw, normal (medium) fit: the one to use unless there is a reason" },
|
|
144
|
+
"clearance_loose": { "unit": "mm", "says": "a clearance hole for the screw, loose fit" },
|
|
145
|
+
"head": { "unit": "mm", "says": "a socket head cap screw's head diameter, at most" },
|
|
146
|
+
"head_height": { "unit": "mm", "says": "a socket head cap screw's head height, at most" },
|
|
147
|
+
"head_key": { "unit": "mm", "says": "the hex key a socket head cap screw takes" },
|
|
148
|
+
"button_head": { "unit": "mm", "says": "a button head socket screw's head diameter, at most" },
|
|
149
|
+
"button_head_height": { "unit": "mm", "says": "a button head socket screw's head height, at most" },
|
|
150
|
+
"button_key": { "unit": "mm", "says": "the hex key a button head socket screw takes" },
|
|
151
|
+
"countersunk_head": { "unit": "mm", "says": "a countersunk socket screw's head diameter where the cone meets a sharp edge: a seat this wide at the surface takes the head flush" },
|
|
152
|
+
"countersunk_head_height": { "unit": "mm", "says": "a countersunk socket screw's head height, at most" },
|
|
153
|
+
"countersunk_angle": { "unit": "deg", "says": "the cone of a countersunk head, across the whole of it" },
|
|
154
|
+
"countersunk_key": { "unit": "mm", "says": "the hex key a countersunk socket screw takes" },
|
|
155
|
+
"hex_head_flats": { "unit": "mm", "says": "a hexagon head screw's width across flats: its spanner" },
|
|
156
|
+
"hex_head_height": { "unit": "mm", "says": "a hexagon head screw's head height" },
|
|
157
|
+
"pan_head": { "unit": "mm", "says": "a pan head screw's head diameter, at most" },
|
|
158
|
+
"pan_head_height": { "unit": "mm", "says": "a pan head screw's head height, at most" },
|
|
159
|
+
"pan_head_drive": { "says": "the driver a pan head screw takes: T10, PZ1" },
|
|
160
|
+
"nut_flats": { "unit": "mm", "says": "a hexagon nut's width across flats" },
|
|
161
|
+
"nut_height": { "unit": "mm", "says": "a hexagon nut's height, at most" },
|
|
162
|
+
"square_nut_flats": { "unit": "mm", "says": "a thin square nut's width across flats" },
|
|
163
|
+
"square_nut_height": { "unit": "mm", "says": "a thin square nut's height, at most" },
|
|
164
|
+
"lock_nut_flats": { "unit": "mm", "says": "a nylon-insert lock nut's width across flats" },
|
|
165
|
+
"lock_nut_height": { "unit": "mm", "says": "a nylon-insert lock nut's height, at most" },
|
|
166
|
+
"washer_bore": { "unit": "mm", "says": "a plain washer's hole" },
|
|
167
|
+
"washer_diameter": { "unit": "mm", "says": "a plain washer's outside diameter" },
|
|
168
|
+
"washer_thickness": { "unit": "mm", "says": "a plain washer's thickness" },
|
|
169
|
+
"set_screw_key": { "unit": "mm", "says": "the hex key a socket set screw takes" },
|
|
170
|
+
"set_screw_point": { "unit": "mm", "says": "the diameter of a flat point set screw's end, at most" },
|
|
171
|
+
"lengths": { "unit": "mm", "list": true, "says": "the lengths the socket head cap screw is sold in, shortest first (a countersunk screw's length includes its head)" },
|
|
172
|
+
"property_class": { "unit": "", "says": "the steel property class its strength figure is for: 8.8" },
|
|
173
|
+
"proof_stress": { "unit": "MPa", "says": "the stress a steel screw of that class holds with no permanent set" },
|
|
174
|
+
"stainless_class": { "says": "the stainless grade and class its second strength figure is for: A2-70" },
|
|
175
|
+
"stainless_proof_stress": { "unit": "MPa", "says": "the 0.2 % proof stress of a stainless screw of that grade" },
|
|
176
|
+
"insert_diameter": { "unit": "mm", "says": "a heat-set insert's outside diameter, over its knurls" },
|
|
177
|
+
"insert_length": { "unit": "mm", "says": "a heat-set insert's length" },
|
|
178
|
+
"insert_hole": { "unit": "mm", "says": "the printed hole a heat-set insert melts into, as drawn: no hole compensation" },
|
|
179
|
+
"insert_depth": { "unit": "mm", "says": "the least depth of a blind hole for a heat-set insert" },
|
|
180
|
+
"insert_taper": { "unit": "deg", "says": "the taper of a heat-set insert's hole, across the whole of it, where its maker asks for one" },
|
|
181
|
+
"insert_wall": { "unit": "mm", "says": "the least plastic round a heat-set insert's hole" },
|
|
182
|
+
"pilot": { "unit": "mm", "says": "a starting hole for the screw to form its own thread in printed plastic, as drawn, before a printer's measured figure (x1c.pilot_m3) replaces it" },
|
|
183
|
+
"pilot_depth": { "unit": "mm", "says": "the least depth of thread a screw needs in plastic" },
|
|
184
|
+
"pilot_boss": { "unit": "mm", "says": "the least outside diameter of a boss round a pilot hole" }
|
|
104
185
|
},
|
|
105
186
|
"parts": {
|
|
106
187
|
"motor": ["type", "body_shape", "body_length", "shaft_diameter", "shaft_length", "shaft_flats", "mount_pattern", "mount_hole_spacing", "mass"],
|
|
@@ -109,6 +190,43 @@
|
|
|
109
190
|
"encoder": ["resolution", "air_gap_min", "air_gap_max", "magnet_diameter", "magnet_thickness", "supply_voltage_min", "supply_voltage_max", "body_width", "body_depth"],
|
|
110
191
|
"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"],
|
|
111
192
|
"board": ["body_width", "body_depth", "pinout"],
|
|
112
|
-
"supply": ["output_voltage", "output_current", "output_power", "body_width", "body_depth", "body_length"]
|
|
193
|
+
"supply": ["output_voltage", "output_current", "output_power", "body_width", "body_depth", "body_length"],
|
|
194
|
+
"leadscrew": ["thread", "diameter", "pitch", "lead", "starts", "efficiency_note"],
|
|
195
|
+
"nut": ["thread", "lead", "flange_diameter", "body_diameter", "length", "hole_circle", "hole_count"],
|
|
196
|
+
"rod": ["diameter"],
|
|
197
|
+
"linear_bearing": ["bore", "outer_diameter", "length", "static_rating", "dynamic_rating"],
|
|
198
|
+
"coupler": ["bore_a", "bore_b", "length", "outer_diameter"],
|
|
199
|
+
"belt": ["pitch", "pitch_line_offset", "width", "stiffness"],
|
|
200
|
+
"pulley": ["teeth", "pitch_diameter", "bore", "belt_width", "outer_diameter", "body_width"],
|
|
201
|
+
"idler": ["toothed", "bore", "belt_width", "outer_diameter", "body_width"],
|
|
202
|
+
"thread": ["thread_form", "thread", "major_diameter", "pitch"]
|
|
203
|
+
},
|
|
204
|
+
"checks": {
|
|
205
|
+
"thread": [
|
|
206
|
+
{ "ascending": ["tap_drill", "major_diameter", "clearance_close", "clearance", "clearance_loose"], "says": "a tap drill is under the thread, and the clearance holes over it in order: close, normal, loose" },
|
|
207
|
+
{ "near": "tap_drill", "to": "major_diameter - pitch", "within": "0.2 * pitch", "says": "a tap drill is about the major diameter less the pitch" },
|
|
208
|
+
{ "ascending": ["pitch_fine", "pitch"], "says": "a fine pitch is finer than the coarse one" },
|
|
209
|
+
{ "ascending": ["tap_drill", "pilot", "clearance_close"], "says": "a pilot in plastic is wider than a tap drill and tighter than the closest clearance hole" },
|
|
210
|
+
{ "near": "pilot", "to": "major_diameter", "within": "0.25 * major_diameter", "says": "a pilot is close to the thread it is formed by (drawn for printing, it can pass a small thread's own diameter)" },
|
|
211
|
+
{ "ascending": ["root_diameter", "pilot"], "says": "a pilot is wider than the root of the thread formed in it" },
|
|
212
|
+
{ "ascending": ["root_diameter", "major_diameter"], "says": "a thread's root is inside its crest" },
|
|
213
|
+
{ "ascending": ["head_key", "head"], "says": "a key fits inside its head" },
|
|
214
|
+
{ "ascending": ["clearance_loose", "head"], "says": "a cap head is wider than the loosest clearance hole, or it pulls through" },
|
|
215
|
+
{ "ascending": ["button_key", "button_head"], "says": "a key fits inside its head" },
|
|
216
|
+
{ "ascending": ["clearance_loose", "button_head"], "says": "a button head is wider than the loosest clearance hole" },
|
|
217
|
+
{ "ascending": ["countersunk_key", "countersunk_head"], "says": "a key fits inside its head" },
|
|
218
|
+
{ "ascending": ["clearance_loose", "countersunk_head"], "says": "a countersunk head is wider than the loosest clearance hole" },
|
|
219
|
+
{ "ascending": ["clearance_loose", "hex_head_flats"], "says": "a hexagon head is wider than the loosest clearance hole" },
|
|
220
|
+
{ "ascending": ["clearance_loose", "pan_head"], "says": "a pan head is wider than the loosest clearance hole" },
|
|
221
|
+
{ "ascending": ["major_diameter", "nut_flats"], "says": "a nut is wider than its thread" },
|
|
222
|
+
{ "ascending": ["major_diameter", "square_nut_flats"], "says": "a nut is wider than its thread" },
|
|
223
|
+
{ "ascending": ["nut_height", "lock_nut_height"], "says": "a lock nut is taller than a plain one, by its nylon ring" },
|
|
224
|
+
{ "ascending": ["major_diameter", "washer_bore", "washer_diameter"], "says": "a washer's hole passes the thread, and its rim stands outside it" },
|
|
225
|
+
{ "ascending": ["clearance_loose", "washer_diameter"], "says": "a washer covers the loosest clearance hole" },
|
|
226
|
+
{ "ascending": ["set_screw_key", "major_diameter"], "says": "a set screw's key fits inside its thread" },
|
|
227
|
+
{ "ascending": ["major_diameter", "insert_hole", "insert_diameter"], "says": "an insert's hole is wider than its thread and narrower than its knurls, which the plastic flows round" },
|
|
228
|
+
{ "ascending": ["insert_length", "insert_depth"], "says": "a blind hole is deeper than its insert" },
|
|
229
|
+
{ "ascending": ["stainless_proof_stress", "proof_stress"], "says": "the stainless figure is the lower of the two" }
|
|
230
|
+
]
|
|
113
231
|
}
|
|
114
232
|
}
|
package/x1c.json
CHANGED
|
@@ -129,6 +129,22 @@
|
|
|
129
129
|
"kind": "community",
|
|
130
130
|
"source": "Bambu Studio's default elephant foot compensation, 0.15 mm, the amount it shrinks the first layer by to undo the spread",
|
|
131
131
|
"checked": "2026-11-07"
|
|
132
|
+
},
|
|
133
|
+
"thread_gap": {
|
|
134
|
+
"value": 0.2,
|
|
135
|
+
"unit": "mm",
|
|
136
|
+
"rule": "Gap between the flanks of a printed screw thread and the thread it screws into, measured on the radius (twice this across the diameter). A printed pair is drawn half of it each; a printed thread for a bought screw or nut takes all of it. An internal thread gets hole_comp as well, as any printed hole does",
|
|
137
|
+
"kind": "estimate",
|
|
138
|
+
"source": "A reasoned guess, the same as fit, the gap between parts that slide together; the fixings coupon prints M6 to M12 threads at three clearances to measure it (docs/fixings-and-frames.md, section 2.5)",
|
|
139
|
+
"checked": "2026-11-15"
|
|
140
|
+
},
|
|
141
|
+
"pilot_m3": {
|
|
142
|
+
"value": 2.9,
|
|
143
|
+
"unit": "mm",
|
|
144
|
+
"rule": "Hole to draw for an M3 screw to form its own thread in PLA: 2.9 mm and 3.0 mm drawn both hold the screw straight, and smaller holes send it in at an angle. Drawn as it is: no hole compensation",
|
|
145
|
+
"kind": "measured",
|
|
146
|
+
"source": "fit bar, examples/bench/projects/benchmarks/MEASURE.md row 5, PLA",
|
|
147
|
+
"checked": "2026-11-10"
|
|
132
148
|
}
|
|
133
149
|
}
|
|
134
150
|
}
|