@rulecad/frames 0.1.7 → 0.1.8
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 +23 -0
- package/README.md +640 -13
- package/beam.d.mts +5 -2
- package/beam.mjs +22 -3
- package/bought.d.mts +60 -0
- package/bought.mjs +195 -0
- package/catalogue.mjs +32 -3
- package/door.d.mts +127 -0
- package/door.mjs +254 -0
- package/ends.d.mts +130 -0
- package/ends.mjs +290 -0
- package/fitting.d.mts +262 -0
- package/fitting.mjs +535 -0
- package/frames.d.mts +13 -1
- package/frames.mjs +31 -4
- package/guide.d.mts +140 -0
- package/guide.mjs +269 -0
- package/jig.d.mts +146 -0
- package/jig.mjs +332 -0
- package/join.d.mts +244 -0
- package/join.mjs +257 -0
- package/ops.mjs +12 -7
- package/package.json +40 -6
- package/panel.d.mts +225 -0
- package/panel.mjs +374 -0
- package/rods.d.mts +195 -0
- package/rods.mjs +475 -0
- package/services.d.mts +335 -0
- package/services.mjs +486 -0
- package/slotnut.d.mts +4 -1
- package/slotnut.mjs +9 -4
- package/square.d.mts +23 -0
- package/square.mjs +42 -0
- package/wheels.d.mts +141 -0
- package/wheels.mjs +337 -0
package/services.d.mts
ADDED
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A printed plate that holds a bought device on a beam's slotted face, its holes read from the device's rule set
|
|
3
|
+
* (mount_holes, x then y for each, with mount_hole_thread and mount_hole_reach for tapped holes, as a supply's; mount_hole_diameter and
|
|
4
|
+
* board_thickness for plain ones, as a board's). A supply is screwed up from under the plate into its own thread, no
|
|
5
|
+
* further than its maker allows; a board is screwed down through its holes into pilots in bosses that stand it off.
|
|
6
|
+
* The plate is screwed into slot nuts past the device's body. Sized from a named load at the farthest hole by beam
|
|
7
|
+
* formulas to about twice the margin, then made thick enough for a sold screw into the slot nut.
|
|
8
|
+
* @param {string | object} profile
|
|
9
|
+
* @param {{ device: object, variant?: string, turn?: 0 | 90 | 180 | 270, offset?: number, standoff?: number, screw?: string, deviceHead?: 'cap' | 'button', load?: number, face?: string, thread?: string, head?: 'cap' | 'button', nut?: string, printer?: object, material?: string | object, given?: object }} o
|
|
10
|
+
* device: its rule set; turn: the device's x from the slot's line, in degrees; offset: its middle across the slot (y), mm; screw: a board's screws, where not the largest its holes pass
|
|
11
|
+
* @returns {object} its model: anchors.device (where the device's own frame goes), screws (into the slot), deviceScrews, findings
|
|
12
|
+
*/
|
|
13
|
+
export function deviceMountModel(profile: string | object, o?: {
|
|
14
|
+
device: object;
|
|
15
|
+
variant?: string;
|
|
16
|
+
turn?: 0 | 90 | 180 | 270;
|
|
17
|
+
offset?: number;
|
|
18
|
+
standoff?: number;
|
|
19
|
+
screw?: string;
|
|
20
|
+
deviceHead?: "cap" | "button";
|
|
21
|
+
load?: number;
|
|
22
|
+
face?: string;
|
|
23
|
+
thread?: string;
|
|
24
|
+
head?: "cap" | "button";
|
|
25
|
+
nut?: string;
|
|
26
|
+
printer?: object;
|
|
27
|
+
material?: string | object;
|
|
28
|
+
given?: object;
|
|
29
|
+
}): object;
|
|
30
|
+
/** A device mount's solid: fitted (pose 'fit'), or laid to print. @param {object} m @param {{ pose?: 'print' | 'fit', printer?: object, ops?: object }} [o] @returns {object} */
|
|
31
|
+
export function deviceMount(m: object, o?: {
|
|
32
|
+
pose?: "print" | "fit";
|
|
33
|
+
printer?: object;
|
|
34
|
+
ops?: object;
|
|
35
|
+
}): object;
|
|
36
|
+
/**
|
|
37
|
+
* A printed plate that holds a fan beside a beam, blowing out of its face: the fan's four holes by its size (FANS),
|
|
38
|
+
* screws through the fan's corners into pilots in the plate, a round opening for the air, screwed into the slot.
|
|
39
|
+
* @param {string | object} profile @param {{ size: 40 | 60 | 80 | 92 | 120, depth?: number, side?: 1 | -1, load?: number, face?: string, thread?: string, head?: 'cap' | 'button', nut?: string, printer?: object, material?: string | object, given?: object }} o
|
|
40
|
+
* depth: the fan's frame depth (default the usual, FANS); side: which side of the slot it stands (+y or -y)
|
|
41
|
+
* @returns {object} its model
|
|
42
|
+
*/
|
|
43
|
+
export function fanMountModel(profile: string | object, o?: {
|
|
44
|
+
size: 40 | 60 | 80 | 92 | 120;
|
|
45
|
+
depth?: number;
|
|
46
|
+
side?: 1 | -1;
|
|
47
|
+
load?: number;
|
|
48
|
+
face?: string;
|
|
49
|
+
thread?: string;
|
|
50
|
+
head?: "cap" | "button";
|
|
51
|
+
nut?: string;
|
|
52
|
+
printer?: object;
|
|
53
|
+
material?: string | object;
|
|
54
|
+
given?: object;
|
|
55
|
+
}): object;
|
|
56
|
+
/** A fan mount's solid. @param {object} m @param {{ pose?: 'print' | 'fit', printer?: object, ops?: object }} [o] @returns {object} */
|
|
57
|
+
export function fanMount(m: object, o?: {
|
|
58
|
+
pose?: "print" | "fit";
|
|
59
|
+
printer?: object;
|
|
60
|
+
ops?: object;
|
|
61
|
+
}): object;
|
|
62
|
+
/**
|
|
63
|
+
* A printed plate for a drag chain's end bracket on a beam's slot: the bracket's holes from its maker's drawing, its
|
|
64
|
+
* screws through the bracket into pilots in the plate, the plate screwed into the slot past it.
|
|
65
|
+
* @param {string | object} profile @param {{ holes: number[][], screw: string, flange?: number, load?: number, face?: string, thread?: string, nut?: string, head?: 'cap' | 'button', printer?: object, material?: string | object, given?: object }} o
|
|
66
|
+
* holes: [[x, y], ...] the end bracket's holes from its middle, x along the slot; screw: their thread; flange: the bracket's thickness at its holes; thread: the screws into the slot's
|
|
67
|
+
* @returns {object} its model
|
|
68
|
+
*/
|
|
69
|
+
export function dragChainEndModel(profile: string | object, o?: {
|
|
70
|
+
holes: number[][];
|
|
71
|
+
screw: string;
|
|
72
|
+
flange?: number;
|
|
73
|
+
load?: number;
|
|
74
|
+
face?: string;
|
|
75
|
+
thread?: string;
|
|
76
|
+
nut?: string;
|
|
77
|
+
head?: "cap" | "button";
|
|
78
|
+
printer?: object;
|
|
79
|
+
material?: string | object;
|
|
80
|
+
given?: object;
|
|
81
|
+
}): object;
|
|
82
|
+
/** A drag chain end plate's solid. @param {object} m @param {{ pose?: 'print' | 'fit', printer?: object, ops?: object }} [o] @returns {object} */
|
|
83
|
+
export function dragChainEnd(m: object, o?: {
|
|
84
|
+
pose?: "print" | "fit";
|
|
85
|
+
printer?: object;
|
|
86
|
+
ops?: object;
|
|
87
|
+
}): object;
|
|
88
|
+
/**
|
|
89
|
+
* A printed block that carries a length of TS35 top-hat rail across a beam: the rail screwed through its middle into a
|
|
90
|
+
* pilot in the block, the block screwed into the slot each side of the rail, clear of its flanges.
|
|
91
|
+
* @param {string | object} profile @param {{ length?: number, load?: number, face?: string, thread?: string, head?: 'cap' | 'button', nut?: string, printer?: object, material?: string | object, given?: object }} [o]
|
|
92
|
+
* length: how far the block reaches along the rail, across the beam (default the beam's cell)
|
|
93
|
+
* @returns {object} its model, with the rail in its hardware
|
|
94
|
+
*/
|
|
95
|
+
export function dinRailAdapterModel(profile: string | object, o?: {
|
|
96
|
+
length?: number;
|
|
97
|
+
load?: number;
|
|
98
|
+
face?: string;
|
|
99
|
+
thread?: string;
|
|
100
|
+
head?: "cap" | "button";
|
|
101
|
+
nut?: string;
|
|
102
|
+
printer?: object;
|
|
103
|
+
material?: string | object;
|
|
104
|
+
given?: object;
|
|
105
|
+
}): object;
|
|
106
|
+
/** A DIN rail adapter's solid. @param {object} m @param {{ pose?: 'print' | 'fit', printer?: object, ops?: object }} [o] @returns {object} */
|
|
107
|
+
export function dinRailAdapter(m: object, o?: {
|
|
108
|
+
pose?: "print" | "fit";
|
|
109
|
+
printer?: object;
|
|
110
|
+
ops?: object;
|
|
111
|
+
}): object;
|
|
112
|
+
/**
|
|
113
|
+
* A printed clip that snaps into a slot and holds a cable bundle along it: a stem through the slot's opening with
|
|
114
|
+
* barbs under its lips (as a slot cover's), a flange on the face, and a ring over it that opens to let the bundle in.
|
|
115
|
+
* It prints on its side, its section the first layer. No screw: it goes in anywhere along the slot.
|
|
116
|
+
* @param {string | object} profile @param {{ cable?: number, width?: number, load?: number, face?: string, printer?: object, material?: string | object, given?: object }} [o]
|
|
117
|
+
* cable: the bundle's diameter; width: the clip along the slot
|
|
118
|
+
* @returns {object} its model: anchors.cable (the bundle's centre line), findings
|
|
119
|
+
*/
|
|
120
|
+
export function cableClipModel(profile: string | object, o?: {
|
|
121
|
+
cable?: number;
|
|
122
|
+
width?: number;
|
|
123
|
+
load?: number;
|
|
124
|
+
face?: string;
|
|
125
|
+
printer?: object;
|
|
126
|
+
material?: string | object;
|
|
127
|
+
given?: object;
|
|
128
|
+
}): object;
|
|
129
|
+
/** A cable clip's solid: on its side to print, or fitted. @param {object} m @param {{ pose?: 'print' | 'fit', tongues?: boolean, printer?: object, ops?: object }} [o] @returns {object} */
|
|
130
|
+
export function cableClip(m: object, o?: {
|
|
131
|
+
pose?: "print" | "fit";
|
|
132
|
+
tongues?: boolean;
|
|
133
|
+
printer?: object;
|
|
134
|
+
ops?: object;
|
|
135
|
+
}): object;
|
|
136
|
+
/**
|
|
137
|
+
* Where cable clips go along a run of slot: one at each end and as many between as keep them no further apart than the
|
|
138
|
+
* pitch, evenly spaced. @param {number} length the run, mm @param {{ pitch?: number }} [o] @returns {{ count: number, pitch: number, at: number[] }}
|
|
139
|
+
*/
|
|
140
|
+
export function runClips(length: number, o?: {
|
|
141
|
+
pitch?: number;
|
|
142
|
+
}): {
|
|
143
|
+
count: number;
|
|
144
|
+
pitch: number;
|
|
145
|
+
at: number[];
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* A printed block screwed into a slot nut, with a tunnel across it beside the screw for a cable tie, so a bundle along
|
|
149
|
+
* the slot is tied down. It prints on its side; the tunnel's roof is pointed, so it needs no bridge.
|
|
150
|
+
* @param {string | object} profile @param {{ tie?: number[], load?: number, face?: string, thread?: string, head?: 'cap' | 'button', nut?: string, printer?: object, material?: string | object, given?: object }} [o]
|
|
151
|
+
* tie: the tie's band [width, thickness]
|
|
152
|
+
* @returns {object} its model
|
|
153
|
+
*/
|
|
154
|
+
export function tieAnchorModel(profile: string | object, o?: {
|
|
155
|
+
tie?: number[];
|
|
156
|
+
load?: number;
|
|
157
|
+
face?: string;
|
|
158
|
+
thread?: string;
|
|
159
|
+
head?: "cap" | "button";
|
|
160
|
+
nut?: string;
|
|
161
|
+
printer?: object;
|
|
162
|
+
material?: string | object;
|
|
163
|
+
given?: object;
|
|
164
|
+
}): object;
|
|
165
|
+
/** A tie anchor's solid: on its side to print, or fitted. @param {object} m @param {{ pose?: 'print' | 'fit', tongues?: boolean, printer?: object, ops?: object }} [o] @returns {object} */
|
|
166
|
+
export function tieAnchor(m: object, o?: {
|
|
167
|
+
pose?: "print" | "fit";
|
|
168
|
+
tongues?: boolean;
|
|
169
|
+
printer?: object;
|
|
170
|
+
ops?: object;
|
|
171
|
+
}): object;
|
|
172
|
+
/**
|
|
173
|
+
* A printed arm that carries a spool of filament off a beam's side: a pad screwed into the slot, an arm out from the
|
|
174
|
+
* face that the spool's bore hangs on, a lip at its tip. The beam lies level with the face looking sideways, so the
|
|
175
|
+
* spool's weight bends the arm in the section's plane. Sized from the full spool's weight times SERVICE_DEFAULTS.pull.
|
|
176
|
+
* It prints on its side, its section the first layer.
|
|
177
|
+
* @param {string | object} profile @param {{ spool?: { bore: number, width: number, mass: number }, width?: number, load?: number, face?: string, thread?: string, head?: 'cap' | 'button', nut?: string, printer?: object, material?: string | object, given?: object }} [o]
|
|
178
|
+
* spool: its bore and width (mm) and mass full (kg); width: the arm along the slot (default the cell)
|
|
179
|
+
* @returns {object} its model
|
|
180
|
+
*/
|
|
181
|
+
export function spoolHolderModel(profile: string | object, o?: {
|
|
182
|
+
spool?: {
|
|
183
|
+
bore: number;
|
|
184
|
+
width: number;
|
|
185
|
+
mass: number;
|
|
186
|
+
};
|
|
187
|
+
width?: number;
|
|
188
|
+
load?: number;
|
|
189
|
+
face?: string;
|
|
190
|
+
thread?: string;
|
|
191
|
+
head?: "cap" | "button";
|
|
192
|
+
nut?: string;
|
|
193
|
+
printer?: object;
|
|
194
|
+
material?: string | object;
|
|
195
|
+
given?: object;
|
|
196
|
+
}): object;
|
|
197
|
+
/** A spool holder's solid: on its side to print, or fitted. @param {object} m @param {{ pose?: 'print' | 'fit', tongues?: boolean, printer?: object, ops?: object }} [o] @returns {object} */
|
|
198
|
+
export function spoolHolder(m: object, o?: {
|
|
199
|
+
pose?: "print" | "fit";
|
|
200
|
+
tongues?: boolean;
|
|
201
|
+
printer?: object;
|
|
202
|
+
ops?: object;
|
|
203
|
+
}): object;
|
|
204
|
+
export namespace SERVICE_DEFAULTS {
|
|
205
|
+
namespace load {
|
|
206
|
+
export { text as rule };
|
|
207
|
+
export { kind };
|
|
208
|
+
export { source };
|
|
209
|
+
export { CHECKED as checked };
|
|
210
|
+
export { unit };
|
|
211
|
+
export { value };
|
|
212
|
+
}
|
|
213
|
+
namespace gap { }
|
|
214
|
+
namespace standoff { }
|
|
215
|
+
namespace walls { }
|
|
216
|
+
namespace head { }
|
|
217
|
+
namespace cable { }
|
|
218
|
+
namespace clipWidth { }
|
|
219
|
+
namespace snap { }
|
|
220
|
+
namespace clipLoad { }
|
|
221
|
+
namespace pitch { }
|
|
222
|
+
namespace barb { }
|
|
223
|
+
namespace tie { }
|
|
224
|
+
namespace tieLoad { }
|
|
225
|
+
namespace spool { }
|
|
226
|
+
namespace pull { }
|
|
227
|
+
namespace chainFlange { }
|
|
228
|
+
}
|
|
229
|
+
/** Fans by size: their hole spacing, the screw that goes through their corners into the mount, and a usual frame depth. */
|
|
230
|
+
export const FANS: {
|
|
231
|
+
40: {
|
|
232
|
+
spacing: {
|
|
233
|
+
rule: any;
|
|
234
|
+
kind: any;
|
|
235
|
+
source: any;
|
|
236
|
+
checked: string;
|
|
237
|
+
unit?: any;
|
|
238
|
+
value: any;
|
|
239
|
+
};
|
|
240
|
+
thread: string;
|
|
241
|
+
depth: {
|
|
242
|
+
rule: any;
|
|
243
|
+
kind: any;
|
|
244
|
+
source: any;
|
|
245
|
+
checked: string;
|
|
246
|
+
unit?: any;
|
|
247
|
+
value: any;
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
60: {
|
|
251
|
+
spacing: {
|
|
252
|
+
rule: any;
|
|
253
|
+
kind: any;
|
|
254
|
+
source: any;
|
|
255
|
+
checked: string;
|
|
256
|
+
unit?: any;
|
|
257
|
+
value: any;
|
|
258
|
+
};
|
|
259
|
+
thread: string;
|
|
260
|
+
depth: {
|
|
261
|
+
rule: any;
|
|
262
|
+
kind: any;
|
|
263
|
+
source: any;
|
|
264
|
+
checked: string;
|
|
265
|
+
unit?: any;
|
|
266
|
+
value: any;
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
80: {
|
|
270
|
+
spacing: {
|
|
271
|
+
rule: any;
|
|
272
|
+
kind: any;
|
|
273
|
+
source: any;
|
|
274
|
+
checked: string;
|
|
275
|
+
unit?: any;
|
|
276
|
+
value: any;
|
|
277
|
+
};
|
|
278
|
+
thread: string;
|
|
279
|
+
depth: {
|
|
280
|
+
rule: any;
|
|
281
|
+
kind: any;
|
|
282
|
+
source: any;
|
|
283
|
+
checked: string;
|
|
284
|
+
unit?: any;
|
|
285
|
+
value: any;
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
92: {
|
|
289
|
+
spacing: {
|
|
290
|
+
rule: any;
|
|
291
|
+
kind: any;
|
|
292
|
+
source: any;
|
|
293
|
+
checked: string;
|
|
294
|
+
unit?: any;
|
|
295
|
+
value: any;
|
|
296
|
+
};
|
|
297
|
+
thread: string;
|
|
298
|
+
depth: {
|
|
299
|
+
rule: any;
|
|
300
|
+
kind: any;
|
|
301
|
+
source: any;
|
|
302
|
+
checked: string;
|
|
303
|
+
unit?: any;
|
|
304
|
+
value: any;
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
120: {
|
|
308
|
+
spacing: {
|
|
309
|
+
rule: any;
|
|
310
|
+
kind: any;
|
|
311
|
+
source: any;
|
|
312
|
+
checked: string;
|
|
313
|
+
unit?: any;
|
|
314
|
+
value: any;
|
|
315
|
+
};
|
|
316
|
+
thread: string;
|
|
317
|
+
depth: {
|
|
318
|
+
rule: any;
|
|
319
|
+
kind: any;
|
|
320
|
+
source: any;
|
|
321
|
+
checked: string;
|
|
322
|
+
unit?: any;
|
|
323
|
+
value: any;
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
export namespace DIN_RAIL {
|
|
328
|
+
namespace width { }
|
|
329
|
+
namespace depth { }
|
|
330
|
+
namespace thickness { }
|
|
331
|
+
namespace hole { }
|
|
332
|
+
namespace thread { }
|
|
333
|
+
}
|
|
334
|
+
declare const CHECKED: "2026-11-17";
|
|
335
|
+
export {};
|