@rulecad/motors 0.1.2 → 0.1.3
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/motors.mjs +1 -1
- package/package.json +2 -2
package/motors.mjs
CHANGED
|
@@ -123,7 +123,7 @@ export function motorModel(which, change = {}) {
|
|
|
123
123
|
};
|
|
124
124
|
if (type === 'stepper') m.stepAngle = v('step_angle') / m.ratio;
|
|
125
125
|
// Anchors an assembly places a motor by: the shaft where it leaves the motor, its tip, and the mounting face
|
|
126
|
-
m.anchors = { face: { origin: [0, 0, 0], axis: [0, 0, 1] }, shaft: { origin: [0, 0, base], axis: [0, 0, 1] }, tip: { origin: [0, 0, tip], axis: [0, 0, 1] }, ...(type === 'servo' ? { horn: { origin: [0, 0, tip], axis: [0, 0, 1] } } : {}), ...Object.fromEntries(holes.map((h, i) => [`hole${i + 1}`, { origin: [h[0], h[1], 0], axis: [0, 0, 1] }])) };
|
|
126
|
+
m.anchors = { face: { origin: [0, 0, 0], axis: [0, 0, 1] }, connector: { origin: [centre[0], centre[1] + depth / 2, -m.body.length / 2], axis: [0, 1, 0] }, shaft: { origin: [0, 0, base], axis: [0, 0, 1] }, tip: { origin: [0, 0, tip], axis: [0, 0, 1] }, ...(type === 'servo' ? { horn: { origin: [0, 0, tip], axis: [0, 0, 1] } } : {}), ...Object.fromEntries(holes.map((h, i) => [`hole${i + 1}`, { origin: [h[0], h[1], 0], axis: [0, 0, 1] }])) };
|
|
127
127
|
return m;
|
|
128
128
|
}
|
|
129
129
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rulecad/motors",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Motors for printed machines: steppers, DC gear motors, servos and brushless motors from their datasheets, as models with sourced figures, solids to place in an assembly, the mounts and D-bores a part takes for them, and what torque and speed reach the output.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"bugs": { "url": "https://github.com/JoniBach/rulecad/issues" },
|
|
32
32
|
"scripts": { "test": "node --test" },
|
|
33
33
|
"peerDependencies": { "@jscad/modeling": "^2.12.0" },
|
|
34
|
-
"dependencies": { "@rulecad/rules": "^0.3.
|
|
34
|
+
"dependencies": { "@rulecad/rules": "^0.3.8" }
|
|
35
35
|
}
|