@rulecad/fixings 0.1.9 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/bolts.d.mts +26 -18
- package/bolts.mjs +201 -49
- package/draw.d.mts +4 -2
- package/draw.mjs +58 -17
- package/fixings.d.mts +9 -6
- package/fixings.mjs +185 -26
- package/hardware.d.mts +42 -20
- package/hardware.mjs +388 -80
- package/holes.d.mts +32 -25
- package/holes.mjs +243 -61
- package/magnets.d.mts +45 -30
- package/magnets.mjs +521 -122
- package/model.d.mts +47 -29
- package/model.mjs +751 -134
- package/package.json +4 -4
- package/pins.d.mts +46 -32
- package/pins.mjs +480 -113
- package/seats.d.mts +61 -30
- package/seats.mjs +770 -144
- package/snaps.d.mts +32 -24
- package/snaps.mjs +770 -180
- package/strength.d.mts +64 -38
- package/strength.mjs +849 -184
- package/threads.d.mts +59 -42
- package/threads.mjs +910 -193
package/fixings.mjs
CHANGED
|
@@ -4,34 +4,123 @@
|
|
|
4
4
|
// nutTrap, squareNutSlot, captiveNut, insertBoss), and light solids of the hardware for an assembly (screw, nut,
|
|
5
5
|
// washer, insert), a real thread to print where one is wanted (thread), and first sums for a joint: thread engaged,
|
|
6
6
|
// the load that strips it, clamp force from torque, pressure under a head, and the sold length that fits a stack
|
|
7
|
-
// (engagement, stripping, preload, seating, lengthFor), and pins that hold two parts with no thread: a printed snap
|
|
8
|
-
// steel dowel, a length of filament or a printed peg, each with its hole's fit from the printer's rules
|
|
9
|
-
// pin), and magnets pressed, glued or held by crush ribs in a pocket from the printer's rules, with
|
|
10
|
-
// magnetSeatModel, magnetSeat, magnet), printed bolts with their own strength
|
|
11
|
-
// lid that clicks on to a round box, with the forces and hoop
|
|
12
|
-
//
|
|
13
|
-
//
|
|
7
|
+
// (engagement, stripping, preload, seating, lengthFor), and pins that hold two parts with no thread: a printed snap
|
|
8
|
+
// pin, a steel dowel, a length of filament or a printed peg, each with its hole's fit from the printer's rules
|
|
9
|
+
// (pinModel, pinHole, pin), and magnets pressed, glued or held by crush ribs in a pocket from the printer's rules, with
|
|
10
|
+
// their pull (magnetModel, magnetSeatModel, magnetSeat, magnet), printed bolts with their own strength
|
|
11
|
+
// (printedBoltModel, printedBolt), and annular snaps, a lid that clicks on to a round box, with the forces and hoop
|
|
12
|
+
// strain from the Bayer snap-fit guide (annularSnapModel, annularBead, annularGroove). Where it applies each comes as a
|
|
13
|
+
// pair: one function gives the numbers with findings (holeModel), its twin the solid (hole). Every thread's figures
|
|
14
|
+
// live in @rulecad/rules as open data: this package holds no screw's numbers of its own. Units: mm, degrees, grams. The
|
|
15
|
+
// plan is https://github.com/JoniBach/rulecad/issues/212.
|
|
14
16
|
import { fixingModel } from './model.mjs';
|
|
15
17
|
import { holeModel, hole } from './holes.mjs';
|
|
16
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
counterboreModel,
|
|
20
|
+
counterbore,
|
|
21
|
+
countersinkModel,
|
|
22
|
+
countersink,
|
|
23
|
+
nutPocketModel,
|
|
24
|
+
nutPocket,
|
|
25
|
+
nutTrapModel,
|
|
26
|
+
nutTrap,
|
|
27
|
+
squareNutSlotModel,
|
|
28
|
+
squareNutSlot,
|
|
29
|
+
captiveNutModel,
|
|
30
|
+
captiveNut,
|
|
31
|
+
insertBossModel,
|
|
32
|
+
insertBoss,
|
|
33
|
+
printable,
|
|
34
|
+
} from './seats.mjs';
|
|
17
35
|
import { screwModel, screw, nutModel, nut, washerModel, washer, insertModel, insert } from './hardware.mjs';
|
|
18
36
|
import { threadModel, thread } from './threads.mjs';
|
|
19
37
|
import { engagement, stripping, preload, torqueFor, seating, lengthFor, screwGroup, screwLoad } from './strength.mjs';
|
|
20
38
|
import { pinModel, pinHole, pin, snapPin, snapSocket, snapPinModel, parsePin, isPinName } from './pins.mjs';
|
|
21
39
|
import { printedBoltModel, printedBolt } from './bolts.mjs';
|
|
22
40
|
import { magnetModel, magnetSeatModel, magnetSeat, magnet, parseMagnet, isMagnetName, fieldShare } from './magnets.mjs';
|
|
23
|
-
import {
|
|
41
|
+
import {
|
|
42
|
+
annularSnapModel,
|
|
43
|
+
annularBead,
|
|
44
|
+
annularGroove,
|
|
45
|
+
snapSlots,
|
|
46
|
+
skirtFinger,
|
|
47
|
+
hubFactor,
|
|
48
|
+
shaftFactor,
|
|
49
|
+
tubeRing,
|
|
50
|
+
} from './snaps.mjs';
|
|
24
51
|
|
|
25
52
|
export { fixingModel, parseName, threads, GRAMMAR, HEADS, NUTS, DEFAULTS } from './model.mjs';
|
|
26
53
|
export { holeModel, hole, HOLE_KINDS } from './holes.mjs';
|
|
27
|
-
export {
|
|
54
|
+
export {
|
|
55
|
+
counterboreModel,
|
|
56
|
+
counterbore,
|
|
57
|
+
countersinkModel,
|
|
58
|
+
countersink,
|
|
59
|
+
nutPocketModel,
|
|
60
|
+
nutPocket,
|
|
61
|
+
nutTrapModel,
|
|
62
|
+
nutTrap,
|
|
63
|
+
squareNutSlotModel,
|
|
64
|
+
squareNutSlot,
|
|
65
|
+
captiveNutModel,
|
|
66
|
+
captiveNut,
|
|
67
|
+
insertBossModel,
|
|
68
|
+
insertBoss,
|
|
69
|
+
printable,
|
|
70
|
+
} from './seats.mjs';
|
|
28
71
|
export { screwModel, screw, nutModel, nut, washerModel, washer, insertModel, insert } from './hardware.mjs';
|
|
29
72
|
export { threadModel, thread, THREAD_FORMS } from './threads.mjs';
|
|
30
|
-
export {
|
|
31
|
-
|
|
73
|
+
export {
|
|
74
|
+
engagement,
|
|
75
|
+
stripping,
|
|
76
|
+
preload,
|
|
77
|
+
torqueFor,
|
|
78
|
+
seating,
|
|
79
|
+
lengthFor,
|
|
80
|
+
screwGroup,
|
|
81
|
+
screwLoad,
|
|
82
|
+
MATERIALS,
|
|
83
|
+
MATERIAL_CLASSES,
|
|
84
|
+
ENDS,
|
|
85
|
+
} from './strength.mjs';
|
|
86
|
+
export {
|
|
87
|
+
pinModel,
|
|
88
|
+
pinHole,
|
|
89
|
+
pin,
|
|
90
|
+
snapPin,
|
|
91
|
+
snapSocket,
|
|
92
|
+
snapPinModel,
|
|
93
|
+
parsePin,
|
|
94
|
+
isPinName,
|
|
95
|
+
PIN_KINDS,
|
|
96
|
+
PIN_FITS,
|
|
97
|
+
PIN_GRAMMAR,
|
|
98
|
+
} from './pins.mjs';
|
|
32
99
|
export { printedBoltModel, printedBolt, BOLT_NUTS } from './bolts.mjs';
|
|
33
|
-
export {
|
|
34
|
-
|
|
100
|
+
export {
|
|
101
|
+
magnetModel,
|
|
102
|
+
magnetSeatModel,
|
|
103
|
+
magnetSeat,
|
|
104
|
+
magnet,
|
|
105
|
+
parseMagnet,
|
|
106
|
+
isMagnetName,
|
|
107
|
+
fieldShare,
|
|
108
|
+
MAGNET_GRADES,
|
|
109
|
+
MAGNET_FITS,
|
|
110
|
+
MAGNET_SIZES,
|
|
111
|
+
MAGNET_GRAMMAR,
|
|
112
|
+
} from './magnets.mjs';
|
|
113
|
+
export {
|
|
114
|
+
annularSnapModel,
|
|
115
|
+
annularBead,
|
|
116
|
+
annularGroove,
|
|
117
|
+
snapSlots,
|
|
118
|
+
skirtFinger,
|
|
119
|
+
hubFactor,
|
|
120
|
+
shaftFactor,
|
|
121
|
+
tubeRing,
|
|
122
|
+
SNAP_USES,
|
|
123
|
+
} from './snaps.mjs';
|
|
35
124
|
|
|
36
125
|
/**
|
|
37
126
|
* What this release is. `release` is `'placeholder'` until the package has functions to call (0.1.0), then `'ready'`:
|
|
@@ -40,29 +129,99 @@ export { annularSnapModel, annularBead, annularGroove, snapSlots, skirtFinger, h
|
|
|
40
129
|
*/
|
|
41
130
|
export const status = Object.freeze({ release: 'ready', plan: 'https://github.com/JoniBach/rulecad/issues/212' });
|
|
42
131
|
|
|
43
|
-
const MODELS = {
|
|
44
|
-
|
|
132
|
+
const MODELS = {
|
|
133
|
+
engagement,
|
|
134
|
+
stripping,
|
|
135
|
+
preload,
|
|
136
|
+
torqueFor,
|
|
137
|
+
seating,
|
|
138
|
+
screwLoad,
|
|
139
|
+
threadModel,
|
|
140
|
+
holeModel,
|
|
141
|
+
counterboreModel,
|
|
142
|
+
countersinkModel,
|
|
143
|
+
nutPocketModel,
|
|
144
|
+
nutTrapModel,
|
|
145
|
+
squareNutSlotModel,
|
|
146
|
+
captiveNutModel,
|
|
147
|
+
insertBossModel,
|
|
148
|
+
screwModel,
|
|
149
|
+
nutModel,
|
|
150
|
+
washerModel,
|
|
151
|
+
insertModel,
|
|
152
|
+
pinModel,
|
|
153
|
+
magnetModel,
|
|
154
|
+
magnetSeatModel,
|
|
155
|
+
printedBoltModel,
|
|
156
|
+
annularSnapModel,
|
|
157
|
+
};
|
|
158
|
+
const SOLIDS = {
|
|
159
|
+
thread,
|
|
160
|
+
hole,
|
|
161
|
+
counterbore,
|
|
162
|
+
countersink,
|
|
163
|
+
nutPocket,
|
|
164
|
+
nutTrap,
|
|
165
|
+
squareNutSlot,
|
|
166
|
+
captiveNut,
|
|
167
|
+
insertBoss,
|
|
168
|
+
nut,
|
|
169
|
+
washer,
|
|
170
|
+
insert,
|
|
171
|
+
pinHole,
|
|
172
|
+
magnetSeat,
|
|
173
|
+
magnet,
|
|
174
|
+
annularBead,
|
|
175
|
+
annularGroove,
|
|
176
|
+
},
|
|
177
|
+
JOINED = { screw, pin, printedBolt };
|
|
45
178
|
|
|
46
179
|
/**
|
|
47
180
|
* Every function of this package with a workspace's rule sets and printer already in hand, so a design writes
|
|
48
181
|
* `fixings.hole('M3', { kind: 'pilot' })` and gets its own project's figures. This is the hook a host such as
|
|
49
182
|
* @rulecad/cad calls once per design: the package itself reads no files.
|
|
50
|
-
* @param {{ sets?: object, printer?: object, ops?: { union: Function, subtract: Function },
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
183
|
+
* @param {{ sets?: object, printer?: object, ops?: { union: Function, subtract: Function },
|
|
184
|
+
* display?: 'thread' | 'plain' }} [workspace]
|
|
185
|
+
* sets: the workspace's rule sets, by name ({ m3: { name, rules } }) or as a list: one for a thread is used before
|
|
186
|
+
* the kit's; printer: the printer's rule set ({ name, rules }, so each figure keeps its kind and source) or its
|
|
187
|
+
* values; ops: the design's booleans (v.ops); display: how a printed thread is drawn where a call does not say
|
|
188
|
+
* (thread and a hole of kind 'thread'): 'plain' for a viewer or a link, where a real thread's thousands of triangles
|
|
189
|
+
* are not wanted
|
|
190
|
+
* @returns {Record<string, Function>} fixingModel(name, change, opts) and the rest, each taking (fixing, options);
|
|
191
|
+
* lengthFor takes (stack, fixing, options)
|
|
56
192
|
*/
|
|
57
193
|
export function fixingsFor({ sets, printer, ops, display } = {}) {
|
|
58
|
-
const with_ = (o) =>
|
|
59
|
-
|
|
60
|
-
|
|
194
|
+
const with_ = (o) =>
|
|
195
|
+
o && typeof o === 'object' && !Array.isArray(o)
|
|
196
|
+
? { ...(sets ? { sets } : {}), ...(printer ? { printer } : {}), ...o }
|
|
197
|
+
: o;
|
|
198
|
+
const out = {
|
|
199
|
+
fixingModel: (name, change, opts) => fixingModel(name, change, { ...(sets ? { sets } : {}), ...opts }),
|
|
200
|
+
printable,
|
|
201
|
+
status,
|
|
202
|
+
};
|
|
203
|
+
const drawn = ['threadModel', 'thread', 'holeModel', 'hole'],
|
|
204
|
+
as = (k, o) =>
|
|
205
|
+
display && drawn.includes(k) && o && typeof o === 'object' && !Array.isArray(o) ? { display, ...o } : o;
|
|
61
206
|
for (const [k, f] of Object.entries({ ...MODELS, ...SOLIDS })) out[k] = (m, o = {}) => f(m, with_(as(k, o)));
|
|
62
207
|
out.lengthFor = (stack, m, o = {}) => lengthFor(stack, m, with_(o));
|
|
63
208
|
out.screwGroup = screwGroup;
|
|
64
209
|
// (a snap pin from plain figures, as @rulecad/flexures draws it, built with the design's booleans)
|
|
65
|
-
Object.assign(out, {
|
|
210
|
+
Object.assign(out, {
|
|
211
|
+
snapPin: (p, o) => snapPin(p, o ?? ops ?? undefined),
|
|
212
|
+
snapSocket,
|
|
213
|
+
snapPinModel,
|
|
214
|
+
parsePin,
|
|
215
|
+
isPinName,
|
|
216
|
+
parseMagnet,
|
|
217
|
+
isMagnetName,
|
|
218
|
+
fieldShare,
|
|
219
|
+
hubFactor,
|
|
220
|
+
shaftFactor,
|
|
221
|
+
tubeRing,
|
|
222
|
+
skirtFinger,
|
|
223
|
+
snapSlots,
|
|
224
|
+
});
|
|
66
225
|
for (const [k, f] of Object.entries(JOINED)) out[k] = (m, o = {}) => (ops ? f(m, with_(o), ops) : f(m, with_(o)));
|
|
67
226
|
return out;
|
|
68
227
|
}
|
package/hardware.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @typedef {{ origin: number[], axis: number[] }} Anchor a point and a direction an assembly places a part by, as a
|
|
2
|
+
* @typedef {{ origin: number[], axis: number[] }} Anchor a point and a direction an assembly places a part by, as a
|
|
3
|
+
* motor's are
|
|
3
4
|
*/
|
|
4
5
|
/**
|
|
5
6
|
* A screw as numbers: its outline, the anchors an assembly places it by, and its mass.
|
|
@@ -8,16 +9,21 @@
|
|
|
8
9
|
* A printed bolt ('M8x20 hex printed') keeps the word printed in its name and is weighed in its plastic; its strength
|
|
9
10
|
* is printedBoltModel's.
|
|
10
11
|
* @param {Fixing | string} m a screw's model or name ('M3x12 cap'), or a thread with { length, head }
|
|
11
|
-
* @param {{ length?: number, head?: string, material?: string | object, anyLength?: boolean, sets?: object,
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* @param {{ length?: number, head?: string, material?: string | object, anyLength?: boolean, sets?: object,
|
|
13
|
+
* display?: 'plain' | 'thread', printer?: object,
|
|
14
|
+
* mate?: 'printed' | 'bought', gap?: number, flanks?: 'printed' | 'standard', hand?: 'right' | 'left', segments?:
|
|
15
|
+
* number }} [o] length, head: where the model has none, or to change them; material: for its mass, steel (the
|
|
16
|
+
* default) or stainless, or for a printed bolt its plastic (default PLA); display: plain
|
|
15
17
|
* (the light solid, the default) or thread (its thread drawn, to print it standing on its head: then printer, mate,
|
|
16
18
|
* gap, flanks, hand and segments are threadModel's)
|
|
17
|
-
* @returns {{ item: 'screw', name: string, printed?: boolean, thread: string, head: string, length: number,
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
19
|
+
* @returns {{ item: 'screw', name: string, printed?: boolean, thread: string, head: string, length: number,
|
|
20
|
+
* sold: boolean | null, major: number, headDiameter: number, headHeight: number, sink: number, top: number, key: number
|
|
21
|
+
* | null,
|
|
22
|
+
* mass: number, material: string, display: 'plain' | 'thread', threaded: object | null, anchors:
|
|
23
|
+
* { seat: Anchor, tip: Anchor, axis: Anchor, top: Anchor }, profile: number[][], rests: object[], findings: object[]
|
|
24
|
+
* }} sink: how deep a countersunk head's cone goes; top: the z of the head's top; mass: grams; threaded:
|
|
25
|
+
* threadModel's numbers where its thread is drawn; anchors: seat (under the head, or the flush face of a countersunk
|
|
26
|
+
* screw), tip, axis (the thread's, at the seat) and top (where a key goes in)
|
|
21
27
|
*/
|
|
22
28
|
export function screwModel(m: Fixing | string, o?: {
|
|
23
29
|
length?: number;
|
|
@@ -64,8 +70,10 @@ export function screwModel(m: Fixing | string, o?: {
|
|
|
64
70
|
* A screw as a light solid: its thread a plain cylinder at the major diameter, its head an outline with no socket.
|
|
65
71
|
* An M3x12 cap screw is 96 triangles. With display: 'thread' its thread is drawn as threadModel gives it, in one
|
|
66
72
|
* closed solid that prints standing on its head: thousands of triangles, so only where it is asked for.
|
|
67
|
-
* @param {Fixing | string} m @param {{ length?: number, head?: string, material?: 'steel' | 'stainless',
|
|
68
|
-
*
|
|
73
|
+
* @param {Fixing | string} m @param {{ length?: number, head?: string, material?: 'steel' | 'stainless',
|
|
74
|
+
* anyLength?: boolean, sets?: object, display?: 'plain' | 'thread', printer?: object,
|
|
75
|
+
* mate?: 'printed' | 'bought', gap?: number, flanks?: 'printed' | 'standard', hand?: 'right' | 'left', segments?:
|
|
76
|
+
* number }} [o] as screwModel
|
|
69
77
|
* @param {{ union: Function }} [ops] the design's v.ops (a hexagon head is joined to its thread)
|
|
70
78
|
* @returns {object} a JSCAD geom3, with .model holding screwModel's numbers (its anchors and mass)
|
|
71
79
|
*/
|
|
@@ -88,9 +96,13 @@ export function screw(m: Fixing | string, o?: {
|
|
|
88
96
|
/**
|
|
89
97
|
* A nut as numbers. It stands on the z axis, the face it bears on at z = 0 and its top at z = its height.
|
|
90
98
|
* @param {Fixing | string} m a nut's model or name ('M3 lock nut'), or a thread with { kind }
|
|
91
|
-
* @param {{ kind?: string, material?: 'steel' | 'stainless', sets?: object, display?: 'plain' | 'thread',
|
|
92
|
-
*
|
|
93
|
-
*
|
|
99
|
+
* @param {{ kind?: string, material?: 'steel' | 'stainless', sets?: object, display?: 'plain' | 'thread',
|
|
100
|
+
* printer?: object, mate?: 'printed' | 'bought', gap?: number, flanks?: 'printed' | 'standard', hand?: 'right' |
|
|
101
|
+
* 'left', segments?: number }} [o]
|
|
102
|
+
* kind: hex, square or lock (default the model's, else hex); display: plain (the light solid) or thread (its thread
|
|
103
|
+
* drawn, to print it as it stands)
|
|
104
|
+
* @returns {{ item: 'nut', name: string, thread: string, kind: string, flats: number, across: number, height: number,
|
|
105
|
+
* bore: number, mass: number, material: string, display: 'plain' | 'thread', threaded: object | null,
|
|
94
106
|
* anchors: { seat: Anchor, top: Anchor, axis: Anchor }, rests: object[], findings: object[] }}
|
|
95
107
|
*/
|
|
96
108
|
export function nutModel(m: Fixing | string, o?: {
|
|
@@ -128,7 +140,9 @@ export function nutModel(m: Fixing | string, o?: {
|
|
|
128
140
|
/**
|
|
129
141
|
* A nut as a light solid: a hexagon or a square with a plain bore just clear of the thread. With display: 'thread'
|
|
130
142
|
* its thread is drawn as threadModel gives it, in one closed solid that prints as it stands.
|
|
131
|
-
* @param {Fixing | string} m @param {{ kind?: string, material?: 'steel' | 'stainless', sets?: object,
|
|
143
|
+
* @param {Fixing | string} m @param {{ kind?: string, material?: 'steel' | 'stainless', sets?: object,
|
|
144
|
+
* display?: 'plain' | 'thread', printer?: object, mate?: 'printed' | 'bought', gap?: number, flanks?: 'printed' |
|
|
145
|
+
* 'standard', hand?: 'right' | 'left', segments?: number }} [o] as nutModel
|
|
132
146
|
* @returns {object} a JSCAD geom3, with .model
|
|
133
147
|
*/
|
|
134
148
|
export function nut(m: Fixing | string, o?: {
|
|
@@ -147,7 +161,9 @@ export function nut(m: Fixing | string, o?: {
|
|
|
147
161
|
* A plain washer as numbers. It lies on z = 0, its top at z = its thickness.
|
|
148
162
|
* @param {Fixing | string} m a washer's model or name ('M3 washer'), or a thread
|
|
149
163
|
* @param {{ material?: 'steel' | 'stainless', sets?: object }} [o]
|
|
150
|
-
* @returns {{ item: 'washer', name: string, thread: string, bore: number, diameter: number, thickness: number,
|
|
164
|
+
* @returns {{ item: 'washer', name: string, thread: string, bore: number, diameter: number, thickness: number,
|
|
165
|
+
* mass: number, material: string, anchors: { seat: Anchor, top: Anchor, axis: Anchor }, rests: object[], findings:
|
|
166
|
+
* object[] }}
|
|
151
167
|
*/
|
|
152
168
|
export function washerModel(m: Fixing | string, o?: {
|
|
153
169
|
material?: "steel" | "stainless";
|
|
@@ -169,7 +185,9 @@ export function washerModel(m: Fixing | string, o?: {
|
|
|
169
185
|
rests: object[];
|
|
170
186
|
findings: object[];
|
|
171
187
|
};
|
|
172
|
-
/** A plain washer as a light solid: a flat
|
|
188
|
+
/** A plain washer as a light solid: a flat
|
|
189
|
+
* ring. @param {Fixing | string} m @param {{ material?: 'steel' | 'stainless', sets?: object }} [o] @returns {object} a
|
|
190
|
+
* JSCAD geom3, with .model */
|
|
173
191
|
export function washer(m: Fixing | string, o?: {
|
|
174
192
|
material?: "steel" | "stainless";
|
|
175
193
|
sets?: object;
|
|
@@ -179,7 +197,9 @@ export function washer(m: Fixing | string, o?: {
|
|
|
179
197
|
* face it went in by, its far end at z = -length.
|
|
180
198
|
* @param {Fixing | string} m an insert's model or name ('M3 insert', 'M3x3 insert'), or a thread
|
|
181
199
|
* @param {{ sets?: object }} [o]
|
|
182
|
-
* @returns {{ item: 'insert', name: string, thread: string, diameter: number, length: number, bore: number,
|
|
200
|
+
* @returns {{ item: 'insert', name: string, thread: string, diameter: number, length: number, bore: number,
|
|
201
|
+
* hole: number, mass: number, material: string, anchors: { seat: Anchor, bottom: Anchor, axis: Anchor }, rests:
|
|
202
|
+
* object[], findings: object[] }}
|
|
183
203
|
* diameter: over its knurls; hole: the hole it melts into, as drawn
|
|
184
204
|
*/
|
|
185
205
|
export function insertModel(m: Fixing | string, o?: {
|
|
@@ -202,12 +222,14 @@ export function insertModel(m: Fixing | string, o?: {
|
|
|
202
222
|
rests: object[];
|
|
203
223
|
findings: object[];
|
|
204
224
|
};
|
|
205
|
-
/** A heat-set insert as a light solid: a plain
|
|
225
|
+
/** A heat-set insert as a light solid: a plain
|
|
226
|
+
* tube. @param {Fixing | string} m @param {{ sets?: object }} [o] @returns {object} a JSCAD geom3, with .model */
|
|
206
227
|
export function insert(m: Fixing | string, o?: {
|
|
207
228
|
sets?: object;
|
|
208
229
|
}): object;
|
|
209
230
|
/**
|
|
210
|
-
* a point and a direction an assembly places a part by, as a
|
|
231
|
+
* a point and a direction an assembly places a part by, as a
|
|
232
|
+
* motor's are
|
|
211
233
|
*/
|
|
212
234
|
export type Anchor = {
|
|
213
235
|
origin: number[];
|