@rulecad/cad 0.7.62 → 0.7.64
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 +8 -0
- package/lib/assembly.mjs +2 -4
- package/lib/list.mjs +1 -1
- package/lib/wires.mjs +8 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,14 @@ print (a hole's diameter, a seat's depth, a part's outline). Each release lists
|
|
|
5
5
|
its reason. A **fasten** is an entry in an assembly's `"fasten"` list: one screwed joint, naming the screw by thread
|
|
6
6
|
and head, the parts it passes through and the part it ends in.
|
|
7
7
|
|
|
8
|
+
## 0.7.64: no import loops (#278)
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- `wiresFor`, `wireTubesOf` and `wireRoutesOf` moved from `lib/assembly.mjs` to `lib/wires.mjs`, so `lib/list.mjs` no
|
|
13
|
+
longer imports `lib/assembly.mjs` back (a loop of imports, issue #278). `lib/assembly.mjs` re-exports all three
|
|
14
|
+
under the same names. No printed size moved.
|
|
15
|
+
|
|
8
16
|
## 0.7.62: commands that write projects and assemblies, and belt guides (Frames 4)
|
|
9
17
|
|
|
10
18
|
### Added
|
package/lib/assembly.mjs
CHANGED
|
@@ -39,7 +39,7 @@ import { ops as booleans } from '@rulecad/shapes';
|
|
|
39
39
|
import { motorBuilt, motorDrives, shaftFits, loadsOf, motorChecks, shaftFit, axisOf } from './motors.mjs';
|
|
40
40
|
import { runningChecks, seatFit } from './seats.mjs';
|
|
41
41
|
import { seatSize } from '@rulecad/shapes';
|
|
42
|
-
import { wiresOf, wireChecks
|
|
42
|
+
import { wiresOf, wireChecks } from './wires.mjs';
|
|
43
43
|
import { printedParts } from './list.mjs';
|
|
44
44
|
import { taskOf, taskChecks } from './task.mjs';
|
|
45
45
|
import { powerChecks } from './power.mjs';
|
|
@@ -741,9 +741,7 @@ export function anchorsAt(s, values = s.jointValues) {
|
|
|
741
741
|
|
|
742
742
|
// keyCentres(layout): each key's centre, from lib/layout.mjs (kept under this name for older callers)
|
|
743
743
|
export { keyCentres };
|
|
744
|
-
export
|
|
745
|
-
export const wireTubesOf = (s) => wireTubes(s, { placeItems, mul });
|
|
746
|
-
export const wireRoutesOf = (s) => wireRoutes(s, { placeItems, mul });
|
|
744
|
+
export { wiresFor, wireTubesOf, wireRoutesOf } from './wires.mjs'; // (there, so list.mjs needn't import this module back: #278)
|
|
747
745
|
|
|
748
746
|
// ---------- checks ----------
|
|
749
747
|
export { closest };
|
package/lib/list.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import { paths } from './workspace.mjs';
|
|
|
11
11
|
import { readJson } from './host.mjs';
|
|
12
12
|
import path from 'node:path';
|
|
13
13
|
import { volume } from './mesh.mjs';
|
|
14
|
-
import { wiresFor } from './
|
|
14
|
+
import { wiresFor } from './wires.mjs';
|
|
15
15
|
import { companions } from './fittings.mjs';
|
|
16
16
|
import { cutListOf, cutListData } from './beams.mjs';
|
|
17
17
|
import { cutListText, printedCost } from '@rulecad/frames';
|
package/lib/wires.mjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// poses. A wire that won't reach the elbow at full stretch, or is too thin for what it carries, is found here rather than
|
|
3
3
|
// on the bench. "wires": [{ "from": "elbow.connector", "to": "board.Y", "via": ["upper.cable"], "gauge": "awg22" }]
|
|
4
4
|
import { peekRuleSet as loadRuleSet } from './rules.mjs';
|
|
5
|
+
import { placeItems, jointValues, mul } from '@rulecad/model-link';
|
|
5
6
|
|
|
6
7
|
const n3 = (x, d = 1) => String(Number(x.toFixed(d)));
|
|
7
8
|
const GAUGE = /^awg(\d{1,2})$/i;
|
|
@@ -130,3 +131,10 @@ export function wiringSheet(rows) {
|
|
|
130
131
|
return [line(['Wire', 'From', 'To', 'Length (mm)', 'Gauge', 'Conductors', 'Colour', 'Connectors', 'Board pins', 'Carries']), line(['---', '---', '---', '---:', '---', '---:', '---', '---', '---', '---']),
|
|
131
132
|
...rows.map((w) => line([w.id, w.from, w.to, w.length, w.gauge ?? '', w.conductors, w.colour ?? '', Array.isArray(w.connectors) ? w.connectors.join(' to ') : w.connectors ?? '', w.pins ?? '', `${n3(w.current, 2)} A, ${w.why}`]))].join('\n');
|
|
132
133
|
}
|
|
134
|
+
|
|
135
|
+
// An assembly's wires with model-link's placing: their rows (lengths, gauges, pins), tubes to draw and routes. Here
|
|
136
|
+
// rather than in assembly.mjs, which re-exports them, so list.mjs can use them without importing assembly.mjs back
|
|
137
|
+
// (a loop of imports, issue #278).
|
|
138
|
+
export const wiresFor = (s) => wireRows(s, { placeItems, jointValues, mul });
|
|
139
|
+
export const wireTubesOf = (s) => wireTubes(s, { placeItems, mul });
|
|
140
|
+
export const wireRoutesOf = (s) => wireRoutes(s, { placeItems, mul });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rulecad/cad",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.64",
|
|
4
4
|
"description": "The cad command: JSCAD designs from traceable rules, checked for printing and fit, versioned by what fits, shared as links and exported as Bambu 3MF.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
"three": "^0.186.1",
|
|
71
71
|
"@rulecad/fea": "^0.2.11",
|
|
72
72
|
"@rulecad/topopt": "^0.3.0",
|
|
73
|
-
"@rulecad/flexures": "^0.5.
|
|
74
|
-
"@rulecad/gears": "^0.3.
|
|
73
|
+
"@rulecad/flexures": "^0.5.4",
|
|
74
|
+
"@rulecad/gears": "^0.3.3",
|
|
75
75
|
"@rulecad/motors": "^0.1.6",
|
|
76
76
|
"@rulecad/fixings": "^0.1.5",
|
|
77
77
|
"@rulecad/robots": "^0.1.2",
|