mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-10-03 02:11:53 +02:00
Merge branch 'martinbudden-core_xy_improvements'
This commit is contained in:
@@ -3,6 +3,15 @@
|
|||||||
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
|
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
|
||||||
|
|
||||||
|
|
||||||
|
## [v18.0.0](https://github.com/nophead/NopSCADlib/releases/tag/v18.0.0 "show release") Breaking Changes [...](https://github.com/nophead/NopSCADlib/compare/v17.10.0...v18.0.0 "diff with v17.10.0")
|
||||||
|
* 2021-12-12 [`970c538`](https://github.com/nophead/NopSCADlib/commit/970c5384960bb4c436cb789a1c5869c0a4adfaa5 "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
||||||
|
|
||||||
|
* 2021-12-12 [`cec790e`](https://github.com/nophead/NopSCADlib/commit/cec790ec09befd2631734cda88f3254043955638 "show commit") [M.B.](# "Martin Budden") Fixed y-carriage plain pulley and test.
|
||||||
|
|
||||||
|
* 2021-11-27 [`e71db80`](https://github.com/nophead/NopSCADlib/commit/e71db80093e5131908dff4a6ecba02e5c213a7d8 "show commit") [M.B.](# "Martin Budden") Improvements to `core_xy`
|
||||||
|
1. Better default parameters
|
||||||
|
2. Changed `plain_idler_offset` to work in x and y, to facilitate larger idler pulleys
|
||||||
|
|
||||||
### [v17.10.0](https://github.com/nophead/NopSCADlib/releases/tag/v17.10.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v17.9.0...v17.10.0 "diff with v17.9.0")
|
### [v17.10.0](https://github.com/nophead/NopSCADlib/releases/tag/v17.10.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v17.9.0...v17.10.0 "diff with v17.9.0")
|
||||||
* 2021-12-12 [`c31f58a`](https://github.com/nophead/NopSCADlib/commit/c31f58a4fdf5163dc56b98e89f1a98d08cdfded2 "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
* 2021-12-12 [`c31f58a`](https://github.com/nophead/NopSCADlib/commit/c31f58a4fdf5163dc56b98e89f1a98d08cdfded2 "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
||||||
|
|
||||||
|
BIN
libtest.png
BIN
libtest.png
Binary file not shown.
Before Width: | Height: | Size: 944 KiB After Width: | Height: | Size: 944 KiB |
@@ -6068,9 +6068,9 @@ allows flexible positioning of the motors.
|
|||||||
### Modules
|
### Modules
|
||||||
| Module | Description |
|
| Module | Description |
|
||||||
|:--- |:--- |
|
|:--- |:--- |
|
||||||
| `coreXY(type, size, pos, separation, x_gap, plain_idler_offset = 0, upper_drive_pulley_offset, lower_drive_pulley_offset, show_pulleys = false, left_lower = false)` | Wrapper module to draw both belts of a coreXY setup |
|
| `coreXY(type, size, pos, separation, x_gap = 0, plain_idler_offset = [0, 0], upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = false, left_lower = false)` | Wrapper module to draw both belts of a coreXY setup |
|
||||||
| `coreXY_belts(type, carriagePosition, coreXYPosBL, coreXYPosTR, separation, x_gap = 20, upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = false, left_lower = false)` | Draw the coreXY belts |
|
| `coreXY_belts(type, carriagePosition, coreXYPosBL, coreXYPosTR, separation, x_gap = 0, plain_idler_offset = [0, 0], upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = false, left_lower = false)` | Draw the coreXY belts |
|
||||||
| `coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_offset = 0, drive_pulley_offset = [0, 0], show_pulleys = false, lower_belt = false, hflip = false)` | Draw one belt of a coreXY setup |
|
| `coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_offset = [0, 0], drive_pulley_offset = [0, 0], show_pulleys = false, lower_belt = false, hflip = false)` | Draw one belt of a coreXY setup |
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -6078,7 +6078,7 @@ allows flexible positioning of the motors.
|
|||||||
| Qty | Module call | BOM entry |
|
| Qty | Module call | BOM entry |
|
||||||
| ---:|:--- |:---|
|
| ---:|:--- |:---|
|
||||||
| 1 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 728mm |
|
| 1 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 728mm |
|
||||||
| 1 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 824mm |
|
| 1 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 790mm |
|
||||||
| 7 | `pulley(GT2x16_toothed_idler)` | Pulley GT2 idler 16 teeth |
|
| 7 | `pulley(GT2x16_toothed_idler)` | Pulley GT2 idler 16 teeth |
|
||||||
| 3 | `pulley(GT2x16_plain_idler)` | Pulley GT2 idler smooth 9.63mm |
|
| 3 | `pulley(GT2x16_plain_idler)` | Pulley GT2 idler smooth 9.63mm |
|
||||||
| 2 | `pulley(GT2x20ob_pulley)` | Pulley GT2OB 20 teeth |
|
| 2 | `pulley(GT2x20ob_pulley)` | Pulley GT2OB 20 teeth |
|
||||||
|
@@ -30,22 +30,25 @@ module coreXY_belts_test() {
|
|||||||
plain_idler = coreXY_plain_idler(coreXY_type);
|
plain_idler = coreXY_plain_idler(coreXY_type);
|
||||||
toothed_idler = coreXY_toothed_idler(coreXY_type);
|
toothed_idler = coreXY_toothed_idler(coreXY_type);
|
||||||
|
|
||||||
|
pos = [100, 50];
|
||||||
coreXYPosBL = [0, 0, 0];
|
coreXYPosBL = [0, 0, 0];
|
||||||
coreXYPosTR = [200, 150, 0];
|
coreXYPosTR = [200, 150, 0];
|
||||||
separation = [0, coreXY_coincident_separation(coreXY_type).y, pulley_height(plain_idler) + washer_thickness(M3_washer)];
|
separation = [0, coreXY_coincident_separation(coreXY_type).y, pulley_height(plain_idler) + washer_thickness(M3_washer)];
|
||||||
pos = [100, 50];
|
x_gap = 10;
|
||||||
|
|
||||||
upper_drive_pulley_offset = [40, 10];
|
plain_idler_offset = [10, 5];
|
||||||
|
upper_drive_pulley_offset = [40, 0];
|
||||||
lower_drive_pulley_offset = [0, 0];
|
lower_drive_pulley_offset = [0, 0];
|
||||||
|
|
||||||
coreXY_belts(coreXY_type,
|
coreXY_belts(coreXY_type,
|
||||||
carriagePosition = pos,
|
pos,
|
||||||
coreXYPosBL = coreXYPosBL,
|
coreXYPosBL,
|
||||||
coreXYPosTR = coreXYPosTR,
|
coreXYPosTR,
|
||||||
separation = separation,
|
separation,
|
||||||
x_gap = 10,
|
x_gap,
|
||||||
upper_drive_pulley_offset = upper_drive_pulley_offset,
|
plain_idler_offset,
|
||||||
lower_drive_pulley_offset = lower_drive_pulley_offset,
|
upper_drive_pulley_offset,
|
||||||
|
lower_drive_pulley_offset,
|
||||||
show_pulleys = true);
|
show_pulleys = true);
|
||||||
|
|
||||||
|
|
||||||
@@ -56,18 +59,18 @@ module coreXY_belts_test() {
|
|||||||
|
|
||||||
// add the screws for the upper drive offset idler pulleys if required
|
// add the screws for the upper drive offset idler pulleys if required
|
||||||
if (upper_drive_pulley_offset.x > 0) {
|
if (upper_drive_pulley_offset.x > 0) {
|
||||||
translate(coreXY_drive_plain_idler_offset(coreXY_type))
|
translate(coreXY_drive_plain_idler_offset(coreXY_type) + plain_idler_offset)
|
||||||
translate_z(-pulley_offset(plain_idler))
|
translate([0, -upper_drive_pulley_offset.y, -pulley_offset(plain_idler)])
|
||||||
screw(M3_cap_screw, 20);
|
screw(M3_cap_screw, 20);
|
||||||
translate(coreXY_drive_toothed_idler_offset(coreXY_type))
|
translate(coreXY_drive_toothed_idler_offset(coreXY_type))
|
||||||
translate_z(-pulley_offset(toothed_idler))
|
translate([0, -upper_drive_pulley_offset.y, -pulley_offset(toothed_idler)])
|
||||||
screw(M3_cap_screw, 20);
|
screw(M3_cap_screw, 20);
|
||||||
} else if (upper_drive_pulley_offset.x < 0) {
|
} else if (upper_drive_pulley_offset.x < 0) {
|
||||||
translate([-pulley_od(plain_idler), coreXY_drive_plain_idler_offset(coreXY_type).y])
|
translate([-pulley_od(plain_idler), coreXY_drive_plain_idler_offset(coreXY_type).y + plain_idler_offset.y])
|
||||||
translate_z(-pulley_offset(plain_idler))
|
translate([0, -upper_drive_pulley_offset.y, -pulley_offset(plain_idler)])
|
||||||
screw(M3_cap_screw, 20);
|
screw(M3_cap_screw, 20);
|
||||||
translate([2*coreXY_drive_pulley_x_alignment(coreXY_type), coreXY_drive_toothed_idler_offset(coreXY_type).y])
|
translate([2*coreXY_drive_pulley_x_alignment(coreXY_type) + plain_idler_offset.x, coreXY_drive_toothed_idler_offset(coreXY_type).y])
|
||||||
translate_z(-pulley_offset(toothed_idler))
|
translate([0, -upper_drive_pulley_offset.y, -pulley_offset(toothed_idler)])
|
||||||
screw(M3_cap_screw, 20);
|
screw(M3_cap_screw, 20);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -79,18 +82,18 @@ module coreXY_belts_test() {
|
|||||||
|
|
||||||
// add the screws for the lower drive offset idler pulleys if required
|
// add the screws for the lower drive offset idler pulleys if required
|
||||||
if (lower_drive_pulley_offset.x < 0) {
|
if (lower_drive_pulley_offset.x < 0) {
|
||||||
translate([-coreXY_drive_plain_idler_offset(coreXY_type).x, coreXY_drive_plain_idler_offset(coreXY_type).y])
|
translate([-coreXY_drive_plain_idler_offset(coreXY_type).x - plain_idler_offset.x, coreXY_drive_plain_idler_offset(coreXY_type).y + plain_idler_offset.y])
|
||||||
translate_z(-pulley_offset(plain_idler))
|
translate([0, -lower_drive_pulley_offset.y, -pulley_offset(plain_idler)])
|
||||||
screw(M3_cap_screw, 20);
|
screw(M3_cap_screw, 20);
|
||||||
translate(coreXY_drive_toothed_idler_offset(coreXY_type))
|
translate(coreXY_drive_toothed_idler_offset(coreXY_type))
|
||||||
translate_z(-pulley_offset(toothed_idler))
|
translate([0, -lower_drive_pulley_offset.y, -pulley_offset(toothed_idler)])
|
||||||
screw(M3_cap_screw, 20);
|
screw(M3_cap_screw, 20);
|
||||||
} else if (lower_drive_pulley_offset.x > 0) {
|
} else if (lower_drive_pulley_offset.x > 0) {
|
||||||
translate([pulley_od(plain_idler), coreXY_drive_plain_idler_offset(coreXY_type).y])
|
translate([pulley_od(plain_idler), coreXY_drive_plain_idler_offset(coreXY_type).y + plain_idler_offset.y])
|
||||||
translate_z(-pulley_offset(plain_idler))
|
translate([0, -lower_drive_pulley_offset.y, -pulley_offset(plain_idler)])
|
||||||
screw(M3_cap_screw, 20);
|
screw(M3_cap_screw, 20);
|
||||||
translate([-2*coreXY_drive_pulley_x_alignment(coreXY_type), coreXY_drive_toothed_idler_offset(coreXY_type).y])
|
translate([-2*coreXY_drive_pulley_x_alignment(coreXY_type) - plain_idler_offset.x, coreXY_drive_toothed_idler_offset(coreXY_type).y])
|
||||||
translate_z(-pulley_offset(toothed_idler))
|
translate([0, -lower_drive_pulley_offset.y, -pulley_offset(toothed_idler)])
|
||||||
screw(M3_cap_screw, 20);
|
screw(M3_cap_screw, 20);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -118,13 +121,13 @@ module coreXY_belts_test() {
|
|||||||
translate([coreXYPosBL.x, coreXY_toothed_idler_offset(coreXY_type).y, 0])
|
translate([coreXYPosBL.x, coreXY_toothed_idler_offset(coreXY_type).y, 0])
|
||||||
screw(M3_cap_screw, 20);
|
screw(M3_cap_screw, 20);
|
||||||
// add the screw for the left Y carriage plain idler
|
// add the screw for the left Y carriage plain idler
|
||||||
translate([coreXYPosBL.x + separation.x + coreXY_plain_idler_offset(coreXY_type).x, separation.y + coreXY_plain_idler_offset(coreXY_type).y, separation.z])
|
translate([coreXYPosBL.x + separation.x + coreXY_plain_idler_offset(coreXY_type).x + (upper_drive_pulley_offset.x == 0 ? 0 : plain_idler_offset.x), separation.y + coreXY_plain_idler_offset(coreXY_type).y, separation.z])
|
||||||
screw(M3_cap_screw, 20);
|
screw(M3_cap_screw, 20);
|
||||||
// add the screw for the right Y carriage toothed idler
|
// add the screw for the right Y carriage toothed idler
|
||||||
translate([coreXYPosTR.x + separation.x, coreXY_toothed_idler_offset(coreXY_type).y, separation.z])
|
translate([coreXYPosTR.x + separation.x, coreXY_toothed_idler_offset(coreXY_type).y, separation.z])
|
||||||
screw(M3_cap_screw, 20);
|
screw(M3_cap_screw, 20);
|
||||||
// add the screw for the right Y carriage plain idler
|
// add the screw for the right Y carriage plain idler
|
||||||
translate([coreXYPosTR.x - coreXY_plain_idler_offset(coreXY_type).x, separation.y + coreXY_plain_idler_offset(coreXY_type).y, 0])
|
translate([coreXYPosTR.x - coreXY_plain_idler_offset(coreXY_type).x - (lower_drive_pulley_offset.x == 0 ? 0 : plain_idler_offset.x), separation.y + coreXY_plain_idler_offset(coreXY_type).y, 0])
|
||||||
screw(M3_cap_screw, 20);
|
screw(M3_cap_screw, 20);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 133 KiB |
@@ -30,7 +30,6 @@
|
|||||||
//! allows flexible positioning of the motors.
|
//! allows flexible positioning of the motors.
|
||||||
//
|
//
|
||||||
include <../utils/core/core.scad>
|
include <../utils/core/core.scad>
|
||||||
include <../vitamins/belts.scad>
|
|
||||||
include <../vitamins/pulleys.scad>
|
include <../vitamins/pulleys.scad>
|
||||||
|
|
||||||
|
|
||||||
@@ -69,7 +68,7 @@ function coreXY_drive_plain_idler_offset(type) = //! Offset of plain drive idler
|
|||||||
[ coreXY_plain_idler_offset(type).x, -(pulley_od(coreXY_plain_idler(type)) + pulley_od(coreXY_drive_pulley(type))) / 2, 0 ];
|
[ coreXY_plain_idler_offset(type).x, -(pulley_od(coreXY_plain_idler(type)) + pulley_od(coreXY_drive_pulley(type))) / 2, 0 ];
|
||||||
|
|
||||||
|
|
||||||
module coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_offset = 0, drive_pulley_offset = [0, 0], show_pulleys = false, lower_belt = false, hflip = false) { //! Draw one belt of a coreXY setup
|
module coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_offset = [0, 0], drive_pulley_offset = [0, 0], show_pulleys = false, lower_belt = false, hflip = false) { //! Draw one belt of a coreXY setup
|
||||||
|
|
||||||
// y-carriage toothed pulley
|
// y-carriage toothed pulley
|
||||||
p0_type = coreXY_toothed_idler(type);
|
p0_type = coreXY_toothed_idler(type);
|
||||||
@@ -91,20 +90,20 @@ module coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_off
|
|||||||
|
|
||||||
// toothed idler for offset stepper motor drive pulley
|
// toothed idler for offset stepper motor drive pulley
|
||||||
p3t_type = coreXY_toothed_idler(type);
|
p3t_type = coreXY_toothed_idler(type);
|
||||||
p3t = [ -size.x / 2 + (drive_pulley_offset.x > 0 ? 0 : 2 * coreXY_drive_pulley_x_alignment(type)),
|
p3t = [ -size.x / 2 + (drive_pulley_offset.x > 0 ? 0 : plain_idler_offset.x + 2 * coreXY_drive_pulley_x_alignment(type)),
|
||||||
size.y / 2 + coreXY_drive_pulley_x_alignment(type) + drive_pulley_offset.y
|
size.y / 2 + coreXY_drive_pulley_x_alignment(type)
|
||||||
];
|
];
|
||||||
|
|
||||||
// y-carriage plain pulley
|
// y-carriage plain pulley
|
||||||
p4_type = coreXY_plain_idler(type);
|
p4_type = coreXY_plain_idler(type);
|
||||||
p4 = [ -size.x / 2 + pulley_od(p4_type) / 2 + pulley_od(p3d_type) / 2 + coreXY_drive_pulley_x_alignment(type) + plain_idler_offset,
|
p4 = [ -size.x / 2 + pulley_od(p4_type) / 2 + pulley_od(p3d_type) / 2 + coreXY_drive_pulley_x_alignment(type) + (drive_pulley_offset.x == 0 ? 0 : plain_idler_offset.x),
|
||||||
-size.y / 2 + pulley_od(p4_type) / 2 + pos.y + separation_y / 2
|
-size.y / 2 + pulley_od(p4_type) / 2 + pos.y + separation_y / 2
|
||||||
];
|
];
|
||||||
|
|
||||||
// plain idler for offset stepper motor drive pulley
|
// plain idler for offset stepper motor drive pulley
|
||||||
p3p_type = p4_type;
|
p3p_type = p4_type;
|
||||||
p3p = [ drive_pulley_offset.x > 0 ? p4.x : -p0.x - pulley_od(p0_type),
|
p3p = [ drive_pulley_offset.x > 0 ? p4.x : -p0.x - pulley_od(p0_type),
|
||||||
size.y / 2 - pulley_od(p3p_type) / 2 - pulley_od(p3d_type) / 2 + drive_pulley_offset.y
|
size.y / 2 - pulley_od(p3p_type) / 2 - pulley_od(p3d_type) / 2 + plain_idler_offset.y
|
||||||
];
|
];
|
||||||
|
|
||||||
// Start and end points
|
// Start and end points
|
||||||
@@ -180,7 +179,7 @@ module coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_off
|
|||||||
tooth_colour = lower_belt ? coreXY_lower_tooth_colour(type) : coreXY_upper_tooth_colour(type));
|
tooth_colour = lower_belt ? coreXY_lower_tooth_colour(type) : coreXY_upper_tooth_colour(type));
|
||||||
}
|
}
|
||||||
|
|
||||||
module coreXY(type, size, pos, separation, x_gap, plain_idler_offset = 0, upper_drive_pulley_offset, lower_drive_pulley_offset, show_pulleys = false, left_lower = false) { //! Wrapper module to draw both belts of a coreXY setup
|
module coreXY(type, size, pos, separation, x_gap = 0, plain_idler_offset = [0, 0], upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = false, left_lower = false) { //! Wrapper module to draw both belts of a coreXY setup
|
||||||
translate([size.x / 2 - separation.x / 2, size.y / 2, -separation.z / 2]) {
|
translate([size.x / 2 - separation.x / 2, size.y / 2, -separation.z / 2]) {
|
||||||
// lower belt
|
// lower belt
|
||||||
hflip(!left_lower)
|
hflip(!left_lower)
|
||||||
@@ -195,10 +194,10 @@ module coreXY(type, size, pos, separation, x_gap, plain_idler_offset = 0, upper_
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module coreXY_belts(type, carriagePosition, coreXYPosBL, coreXYPosTR, separation, x_gap = 20, upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = false, left_lower = false) { //! Draw the coreXY belts
|
module coreXY_belts(type, carriagePosition, coreXYPosBL, coreXYPosTR, separation, x_gap = 0, plain_idler_offset = [0, 0], upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = false, left_lower = false) { //! Draw the coreXY belts
|
||||||
assert(coreXYPosBL.z == coreXYPosTR.z);
|
assert(coreXYPosBL.z == coreXYPosTR.z);
|
||||||
|
|
||||||
coreXYSize = coreXYPosTR - coreXYPosBL;
|
coreXYSize = coreXYPosTR - coreXYPosBL;
|
||||||
translate(coreXYPosBL)
|
translate(coreXYPosBL)
|
||||||
coreXY(type, coreXYSize, [carriagePosition.x - coreXYPosBL.x, carriagePosition.y - coreXYPosBL.y], separation = separation, x_gap = x_gap, plain_idler_offset = 0, upper_drive_pulley_offset = upper_drive_pulley_offset, lower_drive_pulley_offset = lower_drive_pulley_offset, show_pulleys = show_pulleys, left_lower = left_lower);
|
coreXY(type, coreXYSize, [carriagePosition.x - coreXYPosBL.x, carriagePosition.y - coreXYPosBL.y], separation, x_gap, plain_idler_offset, upper_drive_pulley_offset, lower_drive_pulley_offset, show_pulleys, left_lower);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user