@rulecad/frames 0.0.0-stage → 0.1.7

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 JoniBach and contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,574 @@
1
- # Temporary Holding Version
1
+ # @rulecad/frames
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Structures built from beams. A beam is a length of a profile: an aluminium extrusion from any maker's spec sheet, a
4
+ plain tube or angle, or a beam printed in plastic. Part of [rulecad](https://github.com/JoniBach/rulecad), a kit for
5
+ designing physical things where every measurement says which rule it comes from.
6
+
7
+ It reads a profile, which is everything the rest is built on, makes beams of it, works them, lists what to buy and
8
+ cut, and fastens to them:
9
+
10
+ - **`profileModel`**: a profile as a model from its rule set and its slot family's, every figure with how far to
11
+ trust it and where it comes from, its slots, bores and hollows each in their place.
12
+ - **`outline`**: its section as closed loops, drawn from a handful of dimensions, or a measured outline where you
13
+ have one.
14
+ - **`section`**: what that outline is worth as a beam (area, centroid, second moments, torsion constant, mass per
15
+ metre), each beside the figure on the maker's sheet.
16
+ - **`profileFindings`**: what a check of a profile finds, as `cad rules check` reports it.
17
+ - **`beamModel`** and **`beam`**: a length of a profile, with its mass and centre of mass, the anchors an assembly
18
+ places it and its fittings by, and its solid as a light box or the true section.
19
+ - **Beams in assemblies**: every place on a beam has an address (`top@120`, `top.2@50%`, `a.1`) that a cad
20
+ assembly places a beam's ends and its fittings by, its face names turning with it.
21
+ - **Operations on a beam**: cut, mitre, tap, access, drill, counterbore, pocket, notch and deburr, each placed by an
22
+ address on the beam, dimensioned from end a, checked, and cut into its solid.
23
+ - **The cut list and sheets**: beams marked by what makes them alike, packed into the lengths a supplier sells with
24
+ each cut's kerf (`cutList`, `packBars`), and a cut-and-drill sheet for each beam (`beamSheet`).
25
+ - **Slot nuts**: the bought nuts a slot takes (`slotNutModel`, `nutFit`, `slotNut`), the nut for a face and a thread
26
+ (`nutFor`), and a printed carrier for a hex nut or an insert that slides in the slot (`carrierModel`, `carrier`).
27
+
28
+ Joins that do their own drilling, fittings and linear guides follow in later
29
+ releases. The plan is [issue 240](https://github.com/JoniBach/rulecad/issues/240).
30
+
31
+ ```sh
32
+ npm install @rulecad/frames @jscad/modeling
33
+ ```
34
+
35
+ It depends on `@rulecad/rules`, where the profiles live as open data, and `@rulecad/fixings`, which sizes anything an
36
+ operation names by a thread. It takes JSCAD (`@jscad/modeling`, which a
37
+ rulecad design already has) as a peer for a beam's solid.
38
+
39
+ ## A profile
40
+
41
+ ```js
42
+ import { profileModel, outline, section, profiles } from '@rulecad/frames'
43
+
44
+ profiles() // ['profile-2020-bosch', 'profile-2020-generic', 'profile-2020-misumi-hfs5', …]
45
+ const p = profileModel('2020-misumi-hfs5') // MISUMI's HFS5-2020, by its set's name with or without 'profile-'
46
+
47
+ p.width, p.height, p.cornerRadius // 20, 20, 1
48
+ p.faces.top // [{ face: 'top', index: 1, slot: 'slot-6-misumi', at: [0, 10], normal: [0, 1], along: [1, 0] }]
49
+ p.slots['slot-6-misumi'].opening // 6
50
+ p.bores[0] // { at: [0, 0], diameter: 4.2, thread: 'M5', threadSet: 'm5', tapDrill: 4.2, … }
51
+ p.sheet.area // 183: the catalogue's figure, mm²
52
+ p.figures.area // { value: 183, unit: 'mm²', kind: 'spec', source: 'MISUMI … page 2-529, https://…', … }
53
+ p.material.modulus // 69972 MPa, from the al6n01-t5 rule set the profile names
54
+
55
+ const s = section(p)
56
+ s.area, s.inertiaX, s.torsion // 182.5 mm², 7425 mm⁴, 809 mm⁴: from the drawn outline
57
+ s.sheet.area // { sheet: 183, computed: 182.5, difference: -0.003 }
58
+ outline(p).loops // [[[x, y], …] the outside, counter-clockwise, then each hole clockwise]
59
+ ```
60
+
61
+ A section is drawn in x (across, its width) and y (up, its height) with the middle of its envelope at the origin.
62
+ The beam runs along z. Its faces are `top` (+y), `bottom` (-y), `front` (-x) and `back` (+x), and the slots of a face
63
+ count from 1 along +x or +y. Lengths are in mm, areas mm², second moments and the torsion constant mm⁴, mass kg/m.
64
+
65
+ ### The model
66
+
67
+ | Field | What |
68
+ |---|---|
69
+ | `kind`, `name`, `family` | `'profile'`, the set's name, and what sort of section: `t-slot`, `v-slot`, `tube`, `round-tube`, `angle`, `channel`, `bar`, `round-bar`, `custom`, `printed` |
70
+ | `series`, `cells`, `pitch` | The base size, the cells as `[across, up]`, and the size of one cell as `[x, y]` |
71
+ | `width`, `height`, `cornerRadius`, `wall` | The envelope, and a tube's, angle's or channel's wall |
72
+ | `faces` | `top`, `bottom`, `front`, `back`: each a list with one entry per cell along it, `{ face, index, slot, at, normal, along }`. `slot` is a slot family's name, or `null` where the face is closed there |
73
+ | `slots` | The slot families it uses, by name: `{ opening, mouth, lip, lipAngle, cavityWidth, cavityDepth, floorWidth, flankAngle, straight, trackWidth, trackAngle, nutFamily, figures }` |
74
+ | `bores` | Each bore: `{ at, diameter, thread, threadSet, tapDrill, major, threadPitch, where }`, `where` being `cell`, `corner` or `given` |
75
+ | `title` | A line for a list: `'25 x 25 x 2 tube, al6063-t5'`, `'20 x 20 t-slot (profile-2020-misumi-hfs5)'` |
76
+ | `chambers`, `hollows` | The closed hollow where two cells meet (`{ at, axis, width, length, depth, ends, slot }`: `ends` are its half widths toward each end, narrower toward a place where four cells meet), and square hollows in the corners of a lighter section |
77
+ | `sheet` | What the sheet says: `{ area, inertiaX, inertiaY, modulusX, modulusY, torsion, massPerMetre }`, `null` where it gives none |
78
+ | `material` | The material set it names: `{ name, alloy, density, modulus, poisson, strength, figures }`, or `null` |
79
+ | `supply` | `{ lengths, cutMin, cutMax, cutTolerance, straightness, twist }` |
80
+ | `figures` | Every rule of the set by name, each `{ value, unit, kind, source, rule, checked }` |
81
+ | `measured` | A measured outline, when one was handed in |
82
+ | `rests` | The kinds its figures and its slots' rest on: `['spec', 'estimate']` |
83
+
84
+ `profileModel(which, change, given)` takes a second argument to change a figure (`{ bore_diameter: 5 }`, or
85
+ `{ area: { value: 180, kind: 'measured', source: 'weighed a metre' } }`), and a third for what is not in the
86
+ catalogue: `{ sets: { 'my-slot': {…} } }` or `{ load: (name) => set }` for a slot family, thread or material of your
87
+ own, and `{ outline: {…} }` for a measured outline. A profile of your own is a rule set handed in place of the name.
88
+
89
+ ### Cells and faces
90
+
91
+ A larger section is cells of its series. A 40 x 20 has `cells_across` 2 and `cells_up` 1 in its rule set, and the
92
+ model expands them: two slots on each wide face, one on each end, a bore in the middle of each cell and one closed
93
+ hollow where the two cells' slots would have met. Each sold profile is its own rule set with its own sheet's figures.
94
+ A face is overridden in the rule set: `"slot_bottom": "closed"` for a smooth face, `"slot_top": "slot-6, closed"` for
95
+ one slot of two, another family's name to mix two slots in one section.
96
+
97
+ A grid need not be full. `cells_absent` names the cells that are not there, as across,up pairs from 1 at the lower
98
+ left: OpenBuilds' C-Beam is 4 cells by 2 with `"2,2; 3,2"` absent. `faces` then holds a place for every side of a cell
99
+ with no cell beyond it, by the way it looks: `faces.top` of a C-beam has four places, two on top of the arms and two on
100
+ the floor of the C lower down, and `faces.back` has the inside of the left arm beside the right-hand outside. `index`
101
+ is the place's column (top and bottom) or row (front and back). Where four cells meet, or a cell stands at a corner of
102
+ a missing one, the hollows between cells keep to the cavity's own width (`ends`), so they stand clear of each other.
103
+
104
+ ### Outlines
105
+
106
+ `outline(model)` returns `{ loops, measured, source }`. Each loop is a closed list of `[x, y]` points: the outside of
107
+ the metal first, counter-clockwise, with every open slot cut into it, then each hole clockwise (bores, hollows, a
108
+ tube's inside). It is drawn from the interface dimensions alone: the envelope and its corner radius, each slot from
109
+ its opening, lip, cavity width and depth, floor width and flank angle, and each bore as a circle of the same area. It
110
+ leaves out what those dimensions do not say: fillets, the notches round some makers' bores, grooves and ribs.
111
+
112
+ A measured outline takes its place when you have one: `readOutline(json)` holds a file to its format (a `source`, a
113
+ `licence`, and `loops` in mm) and turns every loop the right way round. In a workspace it is the file
114
+ `rules/outlines/<set name>.json`. The kit publishes no maker's outline. It draws its own, and a maker's model is
115
+ measured in your own workspace.
116
+
117
+ ### Plain sections: a family and a size
118
+
119
+ Tube, round tube, angle, channel, flat bar and round bar have no maker's sheet. Each is a family with a base set
120
+ (`profile-tube`, `profile-round-tube`, `profile-angle`, `profile-channel`, `profile-bar`, `profile-round-bar`) that
121
+ holds a starting size, and any other size is the family's name with the figures you have:
122
+
123
+ ```js
124
+ const tube = profileModel('tube', { width: 25, height: 25, wall: 2, material: 'al6063-t5' });
125
+ tube.title; // '25 x 25 x 2 tube, al6063-t5'
126
+ section(tube).area; // 184 mm²: 25² less 21²
127
+ beamFigures(tube).torsion; // { value: 25410, unit: 'mm⁴', kind: 'derived', from: 'outline', source }
128
+ profileModel('angle', { width: 40, height: 25, wall: 3, material: 's275' }); // unequal legs, in steel
129
+ profileModel('round-bar', { width: 12, height: 12 }); // a round section's width and height are its diameter
130
+ ```
131
+
132
+ | Family | `width` | `height` | `wall` | Also |
133
+ |---|---|---|---|---|
134
+ | `tube` | Outside, across | Outside, up | The wall, all round | `corner_radius` outside (cold-formed steel tube is rounded by about twice its wall) |
135
+ | `round-tube` | Outside diameter | The same | The wall | |
136
+ | `angle` | The leg along the bottom | The leg up the side | Both legs' thickness | The legs meet at the lower left |
137
+ | `channel` | Across the web | The flanges' height | Web and flanges | The web is along the bottom |
138
+ | `bar` | Across | Thickness | none | |
139
+ | `round-bar` | Diameter | The same | none | |
140
+
141
+ `material` is a material set's name (`al6063-t5`, `s275`, or one of your own through `given`), and gives the mass per
142
+ metre. A few common sizes are ready sets, named for what they are (`profile-tube-al-25x25x2`,
143
+ `profile-angle-steel-30x30x3`): each is its family at that size, for a workspace that wants a name to point at.
144
+
145
+ `beamFigures(model)` gives the figures to design a beam with, whatever the profile: the sheet's own where the maker
146
+ prints one (`from: 'sheet'`, with the sheet's kind and source), and the outline's where it does not (`kind:
147
+ 'derived'`, `from: 'outline'`). A plain section's are all worked out; MISUMI prints no torsion constant, so that one
148
+ figure of an HFS profile is worked out and the rest are the page's.
149
+
150
+ ### A custom section
151
+
152
+ Family `custom` is any closed outline. A custom profile is its outline: the set gives the family, the envelope and
153
+ the material, and the outline comes with it, as `rules/outlines/<set name>.json` in a workspace or handed in:
154
+
155
+ ```js
156
+ const hat = { source: 'traced from my own bar', licence: 'my own measurement',
157
+ loops: [[[-20, -10], [-10, -10], [-10, 8], [10, 8], [10, -10], [20, -10], [20, -8], [12, -8], [12, 10], [-12, 10], [-12, -8], [-20, -8]]] };
158
+ const mine = profileModel('custom', { width: 40, height: 20, material: 's275' }, { outline: hat });
159
+ section(mine).area; // 152 mm²
160
+ ```
161
+
162
+ `profileModel('custom')` alone is the kit's own example, a 30 x 30 x 3 mm T section drawn for the kit. A custom set
163
+ with no outline is refused by name, and a check says where an outline's envelope is not the set's width and height
164
+ (`profile.outline.size`) or is not drawn about its own middle (`profile.outline.middle`).
165
+ `cad measure <model> --profile <name>` writes the set and the outline from a model or a DXF.
166
+
167
+ ### What a check finds
168
+
169
+ `profileFindings(model)` returns findings in rulecad's one shape, `{ level, code, text, rule, at, values }`:
170
+
171
+ | Code | Level | When |
172
+ |---|---|---|
173
+ | `profile.slot.fit` | fail | A slot or hollow reaches outside the section, or runs into another: no metal is left between them |
174
+ | `profile.bore.clear` | fail | A bore breaks into a slot, a hollow or another bore |
175
+ | `profile.bore.tap` | fail | The bore is as wide as the thread it is tapped to |
176
+ | | warn | The bore is under the thread's root, or leaves under a quarter of its height: probably the wrong thread |
177
+ | | info | The bore leaves under half a thread's height, as some makers' bores do |
178
+ | `profile.bore.thread` | warn | The thread named is no thread set, so nothing was compared |
179
+ | `profile.section.area` and `.mass_per_metre` | warn | The sheet's figure and the outline's differ by more than 5% |
180
+ | `profile.section.inertia_x` and `.inertia_y` | warn | By more than 10% |
181
+ | `profile.section.torsion_constant` | warn | By more than 15% |
182
+ | `profile.outline.size` | warn | A measured outline's envelope is more than 0.2 mm from the set's width or height |
183
+ | `profile.outline.middle` | warn | A measured outline is not drawn about the middle of its envelope |
184
+
185
+ The allowances are in `DEFAULTS`, each with the sentence it rests on. They are estimates: a section drawn from a
186
+ fully dimensioned slot comes within them (MISUMI's eight profiles are within 4% on area and 6% on second moments),
187
+ and one outside them has a dimension wrong or a shape the dimensions do not describe, such as the L-shaped hollows of
188
+ a light 40 mm section. A warning is a reason to look, and the sheet's figure stays the one to design with.
189
+
190
+ ## A beam
191
+
192
+ A beam is a length of a profile. It lies along z: end `a` at z = 0, end `b` at z = its length, its section in x and y
193
+ as the profile draws it.
194
+
195
+ ```js
196
+ import { beamModel, beam, beamAnchor, printable } from '@rulecad/frames'
197
+
198
+ const b = beamModel('2040-misumi-hfs5', { length: 300 })
199
+ b.mass // 264.3 g: the drawn section's 326.2 mm² x 300 mm x 2.7 g/cm³
200
+ b.weight // { computed: 264.3, sheet: 264, difference: 0.001 }: the sheet's 0.88 kg/m
201
+ b.centreOfMass // [0, 0, 150]
202
+ b.figures.inertiaX // { value: 13580, unit: 'mm⁴', kind: 'spec', from: 'sheet', source: 'MISUMI …' }
203
+ b.anchors['top.2'] // { origin: [10, 10, 150], axis: [0, 1, 0], ref: [0, 0, 1] }
204
+ beamAnchor(b, 'top.2@-20') // the same place 20 mm from end b: origin [10, 10, 280]
205
+
206
+ beam(b, { display: 'link' }) // a plain 40 x 20 x 300 box: 12 triangles
207
+ beam(b) // the true section run 300 mm (display: 'preview', the default)
208
+ printable(b) // [{ level: 'fail', code: 'beam.printable', text: '… is a bought beam …' }]
209
+ ```
210
+
211
+ `beamModel(profile, { length, ends, material, given, cells })` takes a profile's model or anything `profileModel`
212
+ takes, and:
213
+
214
+ | Option | What |
215
+ |---|---|
216
+ | `length` | mm from end `a` to end `b`. Required |
217
+ | `ends` | Each end `cut` square (the default) or `tapped`, its bores carrying the profile's `bore_thread`: one word for both, `[a, b]`, or `{ a, b }`. Mitres and drilling are operations on a beam, in a later release |
218
+ | `material` | A material set's name in place of the profile's alloy, to weigh the same frame in another metal or a plastic. The sheet's mass is then not compared |
219
+ | `given` | `profileModel`'s third argument: slot families, threads and materials of your own |
220
+ | `cells` | Raster cells for the torsion constant, where the sheet gives none |
221
+
222
+ The model:
223
+
224
+ | Field | What |
225
+ |---|---|
226
+ | `kind`, `name`, `title` | `'beam'`, `'profile-2040-misumi-hfs5 x 300'`, and a line for a list |
227
+ | `profile`, `length`, `ends` | The profile's model, the length, and each end's `{ kind, thread }` |
228
+ | `material` | `{ name, density, modulus, given }`, `given` true where the option changed it |
229
+ | `area`, `centroid` | The section's, from its outline |
230
+ | `mass`, `centreOfMass` | Grams from the section's area, the length and the material's density; the section's centroid at half the length |
231
+ | `weight` | `{ computed, sheet, difference }`: the mass beside the sheet's mass per metre times the length |
232
+ | `figures` | `beamFigures(profile)`: the figures to design with, the sheet's where it gives one |
233
+ | `places` | Every place a face offers, `{ name, face, index, slot, at, normal, along, depth }`: `slot` is `null` on a closed face, `depth` the slot's cavity depth |
234
+ | `bores` | Each bore in each end, `{ name, end, at, diameter, thread, tapped }` |
235
+ | `anchors` | By name, each `{ origin, axis, ref }` (below) |
236
+ | `bought`, `printed` | `true` and `false`: a beam of a profile is cut from stock |
237
+ | `findings` | `beam.mass` (info: the mass and how it was worked out; warn: more than 5% from the sheet's), `beam.length` (warn: longer than the profile is sold or cut in, or shorter than the maker cuts) |
238
+
239
+ ### Anchors and addresses
240
+
241
+ Each anchor is a point (`origin`), the direction out of the beam there (`axis`), and a direction square to it that
242
+ fixes the turn about it (`ref`): at an end the beam's up (+y), on a face along the beam toward end `b` (+z).
243
+
244
+ | Address | Where |
245
+ |---|---|
246
+ | `a`, `b` | The middle of each end, `axis` out of the end |
247
+ | `a.1`, `b.2` | The bores in each end, numbered as `profile.bores` lists them |
248
+ | `top`, `top.1`, `top.2` | The places on a face, counted along it (+x for top and bottom, +y for front and back). `top` is the first. A face with one place has `top` and `top.1`. A place's anchor is where it meets the face, at half the length, `axis` out of the face |
249
+ | `top@120`, `top@-20`, `top@50%` | With `beamAnchor`: 120 mm from end `a`, 20 mm from end `b`, the middle. A distance past an end is refused with the beam's length |
250
+
251
+ A section with cells missing (OpenBuilds' C-Beam) has places inside its C on the same faces: they are numbered after
252
+ the outside places of the same column or row, and `index` says which column or row each is in. Place by `origin` and
253
+ `axis`, never by the number alone.
254
+
255
+ ### Face names in an assembly
256
+
257
+ ![A 2040's section seen from end b with every place named, and the beam from its front with top@120, top@50% and top@-20 marked](https://raw.githubusercontent.com/JoniBach/rulecad/main/packages/frames/faces.svg)
258
+
259
+ The face names belong to the beam, so they turn with it. In a cad assembly a beam placed by its ends (`"from"`,
260
+ `"to"`) has end `a` at `from` and end `b` at `to`. At roll 0 its top faces up (+z), or +y when the beam stands upright
261
+ (within 0.1° of z). Looking along the beam from `a` to `b` with its top up, its front is on the right and its back on
262
+ the left: a beam run along +x has its front toward -y, facing a viewer in front of it. `"roll"` turns the beam about
263
+ the line from `a` to `b` by that many degrees, right-handed, and the faces turn with it: at roll 90 the top of a beam
264
+ run along +x faces -y.
265
+
266
+ In an assembly an address names the item first: `x1.a`, `x1.a.1`, `x1.top@120`, `x1.top.2@-20`, `x1.top@50%`. A place's
267
+ anchor has its z out of the face and its x along the beam toward `b`, so a part placed at an address sits on the face
268
+ with its own x along the beam. The cad README says where addresses are taken.
269
+
270
+ ### Operations
271
+
272
+ A beam carries a list of operations, `ops`, each a line on its cut-and-drill sheet and a cut in its solid. Each is
273
+ placed by an address on the beam: an end (`a`, `b`), an end's bore (`a.1`), or a face's place with a distance from
274
+ end a (`top@120`, `top@-20` from end b, `top@50%`).
275
+
276
+ ```js
277
+ const b = beamModel('2020-misumi-hfs5', { length: 300, ops: [
278
+ { op: 'tap', at: 'a', thread: 'M5' }, // M5 in end a's bore, 10 mm deep: 2 diameters for aluminium
279
+ { op: 'access', at: 'top@-10', thread: 'M5' }, // a Ø5.3 mm hole 10 mm from end b, for an M5 cap screw's 4 mm key
280
+ ] });
281
+ b.ops.map((o) => o.line); // 'tap M5 in bore a.1, 10 mm deep (tap drill Ø4.2 mm; the bore is Ø4.2)', 'cut end a square', ...
282
+ ```
283
+
284
+ | Operation | What it is | Where | Takes |
285
+ |---|---|---|---|
286
+ | `cut` | A square cut to length. Each end with no cut or mitre of its own gets one (`implied: true`) | `a`, `b` | |
287
+ | `mitre` | An end cut at an angle from square, seen on a named face | `a`, `b` | `angle` (above 0, under 90), `about` (the face), `long` (the side the length is on) |
288
+ | `tap` | A thread cut in an end bore. `ends: 'tapped'` is the same | `a`, `b`, `a.1` | `thread` (default the profile's `bore_thread`), `depth` |
289
+ | `access` | A hole across the beam, in line with a slot, through its floor, for a key | a face | `thread` (sizes it for that screw's key) or `diameter`, `depth` |
290
+ | `drill` | A hole through one wall or right through, plain or tapped | a face | `thread` and `kind` (clearance, close, loose, tap) or `diameter`; `through` (`wall`, the default, or `beam`); `depth` |
291
+ | `counterbore` | A seat for a head in a face, with the screw's hole through the wall | a face | `thread`, `head`, `diameter`, `depth` |
292
+ | `pocket` | A milled pocket | a face | `size` (`[along, across]`) or `outline` (points about the address), `radius`, `depth` |
293
+ | `notch` | Part of a slot's lips cut away, to load a nut mid-span | a face with a slot | `length` |
294
+ | `deburr` | Named so the sheet asks for it | `a`, `b` | |
295
+
296
+ Sizes named by a thread come from `@rulecad/fixings` as a machine cuts them: the thread's figure as drawn, with no
297
+ printer's hole compensation and no teardrop roof. An access hole is the smallest of the thread's clearance holes
298
+ wider than its hex key across the corners. A counterbore leaves `OP_DEFAULTS.seat` round the head. A hole through one
299
+ wall goes as deep as the first run of metal along its line through the section, worked out from the outline.
300
+
301
+ Each worked-out operation in `model.ops` keeps its `distance` from end a (0 and the length for the ends), its `face`
302
+ and `place` (`top.1`), its frame (`anchor`), its sizes, and `line`, its line on the sheet. They are in order along the
303
+ beam. In the solid, a tapped length is drawn over the thread's roots (its major diameter), so a screw drawn whole fits
304
+ it; the holes, pockets and notches are cut from the preview, and a mitre from the link as well, since it changes the
305
+ envelope an overlap check measures.
306
+
307
+ **A mitre** is measured on its long side: the beam's `length` is the long side's, and the mitre says so, with the
308
+ short side's length (`shortLength`). `{ op: 'mitre', at: 'a', angle: 45, about: 'top' }` on a 2040 cuts end a so that,
309
+ seen from the top, the back is the long side (the default; `long: 'front'` for the other way) and the front is 40 mm
310
+ shorter.
311
+
312
+ **What a check finds** (`beam.op`): a hole wider than a slot's opening, which breaks into its lips (and the far slot's,
313
+ right through); a hole that cuts into the side of a bore; a tap deeper than the bore runs, or taps from both ends that
314
+ meet; a hole that crosses a tapped thread; a hole whose edge leaves less than half its diameter of metal to an end
315
+ (`OP_DEFAULTS.edge`, warn), or runs off it (fail). Thread engagement is `@rulecad/fixings`' `engagement` in the beam's
316
+ alloy: a thread tapped in a 1.9 mm slot floor gets a warning that aluminium wants 2 diameters. Refused by name: an
317
+ operation the kit does not have, a key it does not take, an address of the wrong kind, a tap in a profile with no end
318
+ bore, a thread too small for the bore, two cuts at one end, a mitre that leaves no short side, and any operation on a
319
+ printed profile (they become features of the print in a later release).
320
+
321
+ ### The solid
322
+
323
+ `beam(m, { display })` takes a beam's model, or a profile with the options `beamModel` takes. `display: 'link'` is a
324
+ plain box of the section's envelope (a round section is a twelve-sided prism), 12 triangles, for a link and an
325
+ overlap check. `'preview'` is the true section, every slot, bore and hollow, run the whole length: 872 triangles for a
326
+ 2040. The solid carries `.model` (the beam's model) and `.display`.
327
+
328
+ ### Mass beside the sheet
329
+
330
+ The mass is worked out from the section and the alloy, so it says what the drawn or measured outline weighs. For a
331
+ section whose slots are fully dimensioned it comes within 2% of the sheet. A 300 mm 40 x 20, by maker:
332
+
333
+ | Profile | Mass, g | Sheet, g | Difference | Ix against the sheet | Iy against the sheet |
334
+ |---|---|---|---|---|---|
335
+ | MISUMI HFS5-2040 | 264.3 | 264 | +0.1% | +0.9% | 0.0% |
336
+ | item Profile 8 40x20 Line 5 | 264.6 | 267 | -0.9% | +0.2% | -0.3% |
337
+ | Bosch Rexroth 20x40 | 243.8 | 240 | +1.6% | +1.7% | +4.2% |
338
+
339
+ Light 40 mm sections (Bosch Rexroth 40x40L, item's light Line 8, Motedis I-type light, generic I-type 4040) have
340
+ hollows and hooked lips the dimensions do not describe, and come out 8 to 21% heavy. Their beams say so
341
+ (`beam.mass`, warn) and name the sheet's mass to use instead; their `figures` are the sheet's.
342
+
343
+ `printable(x)` takes a beam's model, its solid or a profile's model, and fails it: a beam of a profile is bought and
344
+ cut, and what prints is the parts that fasten to it. Printed beams come in a later release.
345
+
346
+ ## The cut list
347
+
348
+ A frame's beams, listed for the saw: `cutList(beams, { kerf?, trim?, tolerance?, stock? })` takes beams' models, or
349
+ `{ id, beam }` with each item's name.
350
+
351
+ ```js
352
+ import { beamModel, cutList, cutListText, beamSheet } from '@rulecad/frames';
353
+
354
+ const beams = [300, 300, 260, 260].map((length, i) => ({ id: `x${i + 1}`, beam: beamModel('2020-misumi-hfs5', { length }) }));
355
+ const c = cutList(beams);
356
+ cutListText(c); // the marks, then each profile's lengths, bars to buy and the cuts on each
357
+ beamSheet(c.marks[0].beam, { mark: 'A', items: c.marks[0].items }).svg; // its cut-and-drill sheet
358
+ ```
359
+
360
+ Beams that are the same (one profile, one material, one length, and the same operations at the same places) share a
361
+ **mark**, A, B, C and on, by profile and then the longest first. Each mark in `c.marks` has `mark`, `profile`,
362
+ `material`, `length` (the long side where an end is mitred) and `shortLength`, `count`, `items`, `grams` each and
363
+ `weighedBy` (`sheet` where the maker gives a mass per metre, else `section`: a light 40 mm section is heavy when
364
+ weighed from its drawn outline), `ops` (each operation in a few words) and `beam` (the model).
365
+
366
+ Each profile's beams are packed into the lengths it is sold in (`lengths` in its set). Every cut takes the saw's
367
+ **kerf**, the last one on a bar too, as it parts the beam from the offcut. The first end of every bar is **trimmed**
368
+ square before the first beam is measured. Where a set gives no lengths but a cut-to-length range, the maker cuts each
369
+ beam and no bar is packed (`supply: 'cut'`). Where it gives neither, a 6 m bar is assumed (`supply: 'assumed'`, an
370
+ estimate). Each entry in `c.stock` has `cuts` (each length and how many), `buy` (each bar length and how many),
371
+ `bars` (each with its `cuts` in order, each cut's `at` measured from the bar's first end, and its `offcut`),
372
+ `unpacked`, `bought` and `offcut` in mm.
373
+
374
+ The packing is **first-fit decreasing**, a simple rule that does not always find the fewest bars: the longest beam
375
+ first, each onto the first bar with room for it, else onto a new bar. It runs once with each sold length as the new
376
+ bar's length (and once with the shortest that holds the beam), then cuts each bar down to the shortest sold length
377
+ that holds what is on it, and keeps the plan that buys the least metal, then the fewest bars. `packBars(pieces,
378
+ lengths, { kerf, trim })` is the packing alone. A box of twelve 2020 beams (four each of 300, 260 and 220 mm) buys
379
+ one 4000 mm MISUMI bar with an 834 mm offcut: four 1000 mm bars are also 4000 mm of metal, so the one bar wins.
380
+
381
+ | Rule (`CUT_DEFAULTS`) | Value | Kind | Source |
382
+ |---|---|---|---|
383
+ | `kerf` | 3 mm | default | A 250 mm, 80-tooth carbide blade for non-ferrous metals (Popular Tools NF2503080) cuts 3.0 mm |
384
+ | `trim` | 10 mm | estimate | A working allowance for a bruised or out-of-square mill end; no supplier's figure was found |
385
+ | `tolerance` | ±0.5 mm | estimate | MISUMI's for its cut lengths, used where a profile's set gives no `cut_tolerance` |
386
+ | `stock` | 6000 mm | estimate | The length Bosch Rexroth and item sell their profiles in, used where a set gives no lengths |
387
+
388
+ Give your own saw's figures as options (`cutList(beams, { kerf: 2.4 })`); `c.rules` holds the rules used, each with
389
+ `value`, `unit`, `rule`, `kind`, `source` and `checked`.
390
+
391
+ The checks (`c.findings`, code `frame.cut`):
392
+
393
+ | Level | When |
394
+ |---|---|
395
+ | fail | A beam longer than any length its profile is sold in, after the trim and one kerf, or than the maker cuts to |
396
+ | warn | Two marks of one profile whose lengths differ by less than two cuts' tolerance: they should match, or the saw cannot hold them apart |
397
+ | info | Two or more beams of one mark: each is cut to the tolerance, so they can differ by twice it; cut them against one stop where they must match |
398
+
399
+ ### A cut-and-drill sheet
400
+
401
+ `beamSheet(beam, { mark, items, grams })` draws one SVG sheet for a beam, in mm, so it prints to scale at 100%. The
402
+ beam is drawn 1:1, 1:2, 1:5, 1:10 and on, the smallest that keeps it within 200 mm, and its section at end a at 4:1,
403
+ 2:1 or 1:1. On it: the section seen from end a with top up and each face named, and each tapped bore with its thread
404
+ and depth; a view of each face that has work on it, or a mitre seen from it, with that face up and end a on the left,
405
+ every slot's centre line, and each operation numbered and dimensioned from end a to 0.1 mm; and the operations in
406
+ order from end a, each with its full line. A face only a few mm wide at a small scale is drawn wider across, and the
407
+ view says by how much. It returns `{ svg, scale, faces, dimensions }`, `dimensions` being each operation's figure as
408
+ the sheet prints it.
409
+
410
+ ## Slot nuts
411
+
412
+ A slot nut is a rule set in `@rulecad/rules` (`"part": "slot_nut"`), one for each maker, slot, thread and kind:
413
+ `slot-nut-6-misumi-m5-slide-in`, `slot-nut-8-bosch-m6-drop-in`, `slot-nut-6-openbuilds-m5-drop-in`. The kinds are
414
+ `slide-in` (a block slid in from an open end), `drop-in` (put in through the opening and turned), `roll-in` (tipped in
415
+ and rolled flat, often on a spring or a sprung ball), `hammer` (turns itself as the screw is tightened), `square` (a
416
+ plain plate) and `t-bolt` (a bolt with a T head). Published so far, for the 6 mm slot of the 20 mm series and the 8 mm
417
+ slot of the 30 and 40 mm series, M3 to M8 where they are made: MISUMI's, Bosch Rexroth's, Motedis' and OpenBuilds'.
418
+
419
+ A nut's frame is its slot's: x along the slot, y across it, z out of the face, the face at z = 0. It is drawn pulled up
420
+ under the lips, as it sits once its screw is tight.
421
+
422
+ | Export | What |
423
+ |---|---|
424
+ | `slotNutModel(name, change?, given?)` | A nut's model: `slot`, `thread`, `nutKind`, `entry`, `length` (along the slot), `width` (across), `height` (the body under the lips), `tongueWidth` and `tongueHeight` (the step up into the opening), `boltLength`, `hold` (the figure, newtons), `torque`, `material`, `volume`, `mass` (grams), `figures`, `findings` |
425
+ | `nutFit(nut, slot)` | How it sits: `slot_nut.fit` fail where it is wider than the cavity (a turned nut may be as wide: it turns until it jams), no wider than the opening, taller than the room under the lips, or its tongue wider than the opening; warn where its tongue stands proud of the face. `slot_nut.entry` warn where a turned nut is longer than the opening is wide |
426
+ | `slotNut(nut, { at?, display? })` | Its reference solid: body, tongue, the thread's hole; a T-bolt's shank. `display: 'link'` is the body alone |
427
+ | `nutFor(profile, face, thread, { kind?, given? })` | The nut for that face: one made for the slot's nut family (a slot's `nut_family`), of that thread and kind (any kind where none is asked), that fits; the strongest first. Its `others` name the rest that would do. Refused by name where there is none, naming the nuts made for that slot, and other families' nuts that fit it by their sizes |
428
+
429
+ ```js
430
+ nutFor('profile-2020-openbuilds', 'top', 'M5', { kind: 'drop-in' }).name; // 'slot-nut-6-openbuilds-m5-drop-in'
431
+ nutFor('profile-2020-openbuilds', 'top', 'M8');
432
+ // throws: nutFor: no M8 nut is made for profile-2020-openbuilds's top face (slot-6-openbuilds, nut family
433
+ // slot-6-openbuilds). Made for it: M5 drop-in (slot-nut-6-openbuilds-m5-drop-in). ...
434
+ ```
435
+
436
+ **What a nut holds.** `hold` is the pull straight out of the slot. Bosch Rexroth rates its nuts (Fmax: 1700 N for the
437
+ 6 mm T-nut, 3000 N for the 6 mm sliding block with M5, 4000 N for the 8 mm T-nut and T-bolt, 6000 N for the 8 mm
438
+ sliding block with M8, 2200 N for the 8 mm swivel-in block): those are `spec`. MISUMI gives a tightening torque, and
439
+ Motedis and OpenBuilds give nothing, so their nuts carry an `estimate`: Rexroth's figure for the same kind in the same
440
+ slot (a hammer nut as a T-nut, whose shape it has; a roll-in as Rexroth's share of a roll-in to a sliding block; a thin
441
+ plate as half a sliding block), and never more than the screw's proof load. Each says so in its rule, until Frames
442
+ 2.13 tests them.
443
+
444
+ **Mass.** A nut's mass is its drawn block (body, tongue, less the thread's hole) at steel's density, or stainless
445
+ steel's: a list's grams. A nut with a shaped underside (a sprung or rolled nut) weighs less than its block.
446
+
447
+ ### A printed carrier
448
+
449
+ `carrierModel(where, { thread, holds?, face?, length?, count?, pitch?, load?, printer?, material? })` is a block that
450
+ slides along a slot like a slide-in nut, printed, holding a hex nut or a heat-set insert. `where` is a slot, or a profile
451
+ with its `face`. It is drawn from the slot's own rules: the cavity offset in by the printer's `slot_fit` where it has one (measured on
452
+ the slot coupon, below) or else its `fit` (0.2 mm on the X1C), the corners met where the cavity's corner is convex and rounded about the corner where it is re-entrant, so it
453
+ stands that far clear of every point of the slot and its inside corners at the tongue are round. It lies floor down to
454
+ print: its flanks face down at the slot's flank angle (45° in every published slot), within the printer's overhang, and
455
+ its first layer is one solid piece.
456
+
457
+ - **A nut** (`holds: 'nut'`, the default) slides into a slot across the screw from the side, cut by
458
+ `@rulecad/fixings`' `nutTrap` (its slip and the printer's bridge, its roof rising at 45° where it spans more), its
459
+ corners across the slot, as low as it goes with 3 layers of floor under it, one line of plastic beside it and two
460
+ over it. Where the carrier is too narrow for that, one carrier takes its nut from its end, flats across. The screw's
461
+ clearance hole runs right through.
462
+ - **An insert** (`holds: 'insert'`) is pressed in from below, into `fixings`' insert hole, so the screw's pull drives it
463
+ further in; refused where the plastic round it is thinner than the insert's `insert_wall`.
464
+ - **A strip**: `count` carriers in one piece, `pitch` mm apart.
465
+ - **Sized from the load**: with `load` (N, on each nut) the length grows until it holds twice the load
466
+ (`CARRIER_DEFAULTS.margin`), and `carrier.hold` fails where no length does (the plastic over the nut decides).
467
+
468
+ Its model has `section` (in the slot's frame), `cavity`, `clearance`, `least` (its nearest approach to the slot),
469
+ `levels` (depths below the face: top, bottom, shoulder, the nut's or insert's), `length`, `total`, `at`, `hold`
470
+ (`{ value, punch, shoulders, shear }`), `margin`, `volume`, `grams`, `overhang` and its findings: `carrier.fit`,
471
+ `carrier.printable`, `carrier.first-layer`, `carrier.hold`, `carrier.mass`, and the nut trap's `nutTrap.printable`.
472
+ `carrier(m, { pose })` is its solid in the slot's frame, or laid on the bed with `pose: 'print'`.
473
+
474
+ | Carrier | Length | Clear of the slot | Holds (estimate) | Grams (PLA) |
475
+ |---|---|---|---|---|
476
+ | M5 nut in MISUMI's 8 mm slot (HFS6-3030) | 13 mm | 0.2 mm | 624 N (the 1 mm over the nut) | 0.94 |
477
+ | M4 nut in Rexroth's 8 mm slot (30x30) | 12 mm | 0.2 mm | 1802 N | 1.05 |
478
+ | M3 nut in MISUMI's 6 mm slot (HFS5-2020), from its end | 11 mm | 0.2 mm | 794 N | 0.39 |
479
+ | M3 insert in MISUMI's 8 mm slot | 12 mm | 0.2 mm | 618 N | 1.51 |
480
+ | Four M5 nuts at 20 mm in MISUMI's 8 mm slot | 73 mm | 0.2 mm | 624 N each | 6.63 |
481
+
482
+ An M5 nut does not fit a carrier in a 6 mm slot (8 mm across its flats in a slot 5.6 mm deep once clear of it): it is
483
+ refused, naming a smaller thread, an insert or a larger slot.
484
+
485
+ ### Your own slot, measured
486
+
487
+ Slots of the same name differ between makers by tenths of a millimetre, and an unbranded beam's figures are only
488
+ `community` ones. The [slot coupon](https://github.com/JoniBach/rulecad/tree/main/examples/bench/projects/benchmarks) (`slot-coupon`,
489
+ with its steps in that folder's `MEASURE.md`, rows 29 to 33) is one print of loose pieces for slot 6 and slot 8: five
490
+ tongues and five carriers at 0.1 to 0.3 mm a side, and three short printed slots. Slide each into your own beam, measure
491
+ the slot by caliper, and `cad measured` writes the results back: the fit to the printer's rule set as `slot_fit` (and
492
+ `printed_slot_fit` for a slot printed in a part), the slot's figures to your workspace's copy of its set, each marked
493
+ `measured`. A carrier is then drawn from them: hand the printer in (`{ printer: v.x1c }` in a design), and
494
+ `carrierModel` takes its `slot_fit` before its `fit`; a design's `v.frames` reads the workspace's slot sets before the
495
+ kit's.
496
+
497
+ ## Formulas
498
+
499
+ | What | Formula | Source |
500
+ |---|---|---|
501
+ | Area of a loop | A = ½ Σ (xᵢ yᵢ₊₁ − xᵢ₊₁ yᵢ), summed over loops with holes running the other way | Green's theorem; the "shoelace" formula |
502
+ | Centroid | x̄ = Σ (xᵢ + xᵢ₊₁) cᵢ / 6A, with cᵢ = xᵢ yᵢ₊₁ − xᵢ₊₁ yᵢ, and the same in y | Bourke, "Calculating the area and centroid of a polygon" (1988) |
503
+ | Second moments about the origin's axes | Iₓ = Σ (yᵢ² + yᵢ yᵢ₊₁ + yᵢ₊₁²) cᵢ / 12, I_y the same in x, I_xy = Σ (xᵢ yᵢ₊₁ + 2 xᵢ yᵢ + 2 xᵢ₊₁ yᵢ₊₁ + xᵢ₊₁ yᵢ) cᵢ / 24 | Steger, "On the calculation of arbitrary moments of polygons" (1996) |
504
+ | Moved to the centroid | I about the centroid = I about the origin − A d² | The parallel axis theorem |
505
+ | Section modulus | W = I / the distance from the centroid to the furthest fibre | Beam theory |
506
+ | Torsion constant | Solve ∇²φ = −2 in the metal with φ = 0 on the outside and φ constant over each hole, the constant fixed by ∮ ∂φ/∂n ds = −2 A_hole round it. Then J = 2 ∫φ dA over metal and holes | Prandtl's stress function: Timoshenko and Goodier, *Theory of Elasticity*, the chapter on torsion |
507
+ | The solve | Square cells over the section (about 40 000), the five-point Laplacian with the wall half a cell from a cell's centre, one unknown for each hole, conjugate gradients | A finite-difference scheme; checked against the closed forms below |
508
+ | Solid circle, for checking | J = π d⁴ / 32 | The polar moment of a circle, which is its torsion constant |
509
+ | Solid rectangle a × b, for checking | J = a b³ (1/3 − (64 b / π⁵ a) Σ tanh(n π a / 2b) / n⁵), n odd | Timoshenko and Goodier, the chapter on torsion |
510
+ | Thin closed tube, for checking | J = 4 A_m² t / s (A_m inside the wall's mid-line, s its length), plus s t³ / 3 for the wall itself | Bredt's formula |
511
+ | Mass per metre | area × density (mm² × g/cm³ is grams a metre) | |
512
+ | A beam's mass | m = A × L × ρ / 1000, in grams from mm², mm and g/cm³ | A prism's volume is its section's area times its length |
513
+ | Room a bar gives | bar length − trim − Σ (each beam's length + kerf) ≥ 0, the offcut being what is left | Each cut takes a kerf; the trim squares the bar's first end |
514
+ | A mitre's short side | L − w tan θ for each mitred end, w the section's side across the cut and θ the angle from square | Trigonometry |
515
+ | Tap depth, by default | 2 × the major diameter in aluminium (1 in steel, 2.5 in plastic) | The engagement rule set in `@rulecad/rules`, through `@rulecad/fixings` |
516
+ | A beam's centre of mass | (x̄, ȳ, L / 2): the section's centroid, half way along | A prism of constant section and one material |
517
+ | A screw's proof load | F = S_p × A_s, A_s = π/4 (d − 0.9382 P)² | ISO 898-1: proof stress S_p (580 MPa for class 8.8) on the stress area of the thread |
518
+ | Plastic's shear strength | τ = σ / √3 | The von Mises estimate, `@rulecad/fixings`' `shear_ratio` |
519
+ | A carrier's hold, through its top | F = τ × 2√3 s × t, s the nut's flats, t the plastic over its slot (π D t for an insert of knurl diameter D) | Punching shear round the hexagon's perimeter |
520
+ | A carrier's hold, at its shoulders | F = τ × 2 (L h − w g), h the carrier's depth below the lips at the opening's edge, w × g the nut's slot | Two shear planes up the sides of the opening |
521
+ | A nut's mass | m = V ρ / 1000, V its drawn block's volume in mm³ | |
522
+ | Share of a full thread a bore leaves | (major diameter − bore) / (1.299 × pitch) | The 60° thread's height is H = 0.866 pitch, and "percent of thread" counts 3/4 H a side: 1.299 pitch on the diameter |
523
+
524
+ Why the torsion constant is solved for and not taken from the polar moment: a slotted section is open. MISUMI's
525
+ HFS5-2020 has a polar moment of 14 850 mm⁴ and a torsion constant of 809 mm⁴ by this solve, eighteen times less,
526
+ and Bosch Rexroth prints 800 mm⁴ for its own 20 mm section. A closed hollow carries the stress function across
527
+ itself and an open slot does not, which is the whole difference between a tube and a channel.
528
+
529
+ The tests hold the solve to within 1% of the solid circle, 2% of the rectangle and 3% of the tube, and a slit tube
530
+ to within 10% of the open-section figure s t³ / 3.
531
+
532
+ ## What it rests on
533
+
534
+ Every profile, slot family and material is a rule set in `@rulecad/rules`, each value with its source and the date
535
+ it was read. A dimension the maker prints is `spec`. One scaled off the maker's drawing because no figure is printed
536
+ (the width of a slot's floor) is an `estimate`. A figure taken from the section a profile is made to match, or from
537
+ a seller of unbranded stock, is `community`. `model.rests` and each figure's `kind` say which you are standing on.
538
+
539
+ Published so far: MISUMI's HFS series in 20, 30, 40 and 45 mm, Bosch Rexroth, item (Lines 5, 6 and 8, standard and
540
+ light), Motedis (B-type and I-type), OpenBuilds' V-Slot and C-Beam, MakerBeam, MakerBeamXL and OpenBeam, 80/20's
541
+ inch series, generic stock in 20, 30 and 40 mm, and plain tube, angle, channel and bar in any size. `profiles()`
542
+ lists them.
543
+
544
+ ## Exports
545
+
546
+ | Export | What |
547
+ |---|---|
548
+ | `profileModel(which, change?, given?)` | A profile's model |
549
+ | `slotModel(which, change?, given?)`, `slotPath(slot)` | A slot family's model, and its outline as it cuts into a face |
550
+ | `outline(model)`, `readOutline(json)` | The section as loops; a measured outline held to its format |
551
+ | `section(model, { torsion?, cells? })` | Section figures from the outline, beside the sheet's |
552
+ | `beamFigures(model, { cells? })` | The figures to design a beam with: the sheet's where it gives one, the outline's where it does not |
553
+ | `profileFindings(model, { torsion?, cells? })` | What a check finds |
554
+ | `polygonSection(loops)`, `torsionConstant(loops, { cells?, tolerance? })`, `signedArea(loop)` | The formulas on plain loops |
555
+ | `profiles()`, `slots()`, `slotNuts()` | The names in the catalogue |
556
+ | `slotNutModel`, `nutFit`, `slotNut`, `nutFor` | A bought slot nut, how it sits in a slot, its solid, and the one for a face (above) |
557
+ | `carrierModel(where, options)`, `carrier(m, { pose?, ...options })`, `CARRIER_DEFAULTS` | A printed carrier for a nut or an insert, its solid, and the margins it is drawn with |
558
+ | `beamModel(profile, { length, ends?, ops?, material?, given?, cells? })` | A beam's model: mass, centre of mass, figures, places, anchors, operations |
559
+ | `OPS`, `OP_DEFAULTS` | The operations and what each takes; the allowances they are checked and sized by |
560
+ | `beam(m, { display?, ...beamModel's })` | A beam's solid, `link` or `preview` |
561
+ | `beamAnchor(beam, address)` | An anchor by its address, with a distance along a face |
562
+ | `cutList(beams, { kerf?, trim?, tolerance?, stock? })`, `cutListText(c)` | The cut list: marks, the bars to buy, the cut order and offcut on each, `frame.cut` findings |
563
+ | `packBars(pieces, lengths, { kerf?, trim? })`, `beamMarks(beams)` | The packing alone; the beams by mark |
564
+ | `CUT_DEFAULTS` | The kerf, trim, cut tolerance and assumed stock length, each with what it rests on |
565
+ | `beamSheet(beam, { mark?, items?, grams? })` | A beam's cut-and-drill sheet, SVG to scale |
566
+ | `printable(x)` | A beam or profile is bought: one `beam.printable` failure |
567
+ | `DEFAULTS` | The allowances a check uses, each with what it rests on |
568
+ | `status` | `{ release: 'ready', plan }` |
569
+
570
+ It is called frames because "extrusion" also means filament leaving a nozzle.
571
+
572
+ ## Licence
573
+
574
+ MIT.