Updated images and readme
This commit is contained in:
parent
888199f698
commit
53e3378efe
BIN
libtest.png
BIN
libtest.png
Binary file not shown.
Before Width: | Height: | Size: 862 KiB After Width: | Height: | Size: 862 KiB |
|
@ -2658,6 +2658,8 @@ Linear rails with carriages.
|
|||
| `rail_carriage(type)` | Carriage type |
|
||||
| `rail_end(type)` | Minimum distance screw can be from the end |
|
||||
| `rail_end_screw(type)` | Screw used for ends only (Countersink used for better location) |
|
||||
| `rail_groove_offset(type)` | Offset of centre of groove from top of rail |
|
||||
| `rail_groove_width(type)` | Groove width |
|
||||
| `rail_height(type)` | Height of rail section |
|
||||
| `rail_hole(type)` | Screw hole diameter |
|
||||
| `rail_pitch(type)` | Distance between screws |
|
||||
|
@ -2678,7 +2680,7 @@ Linear rails with carriages.
|
|||
|:--- |:--- |
|
||||
| `carriage(type, rail, end_colour = grey(20)` | Draw the specified carriage |
|
||||
| `carriage_hole_positions(type)` | Position children over screw holes |
|
||||
| `rail(type, length)` | Draw the specified rail |
|
||||
| `rail(type, length, colour = grey(90)` | Draw the specified rail |
|
||||
| `rail_assembly(type, length, pos, carriage_end_colour = grey(20)` | Rail and carriage assembly |
|
||||
| `rail_hole_positions(type, length, first = 0, screws = 100, both_ends = true)` | Position children over screw holes |
|
||||
| `rail_screws(type, length, thickness, screws = 100, index_screws = undef)` | Place screws in the rail |
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 154 KiB |
|
@ -144,28 +144,32 @@ module rail(type, length, colour = grey(90), use_polycircles = false) { //! Draw
|
|||
vitamin(str("rail(", type[0], ", ", length, "): Linear rail ", type[0], " x ", length, "mm"));
|
||||
|
||||
color(colour) {
|
||||
rbr = rail_bore(type) / 2;
|
||||
w = corrected_radius(rbr) * 2 + 2 * eps; // width of core big enough for the holes
|
||||
linear_extrude(height - rail_bore_depth(type)) difference() {
|
||||
square([length, width], center = true);
|
||||
square([length, w], center = true);
|
||||
|
||||
rail_hole_positions(type, length)
|
||||
if (use_polycircles)
|
||||
poly_circle(r = rail_hole(type) / 2);
|
||||
poly_circle(rail_hole(type) / 2);
|
||||
else
|
||||
circle(r = rail_hole(type) / 2);
|
||||
circle(d = rail_hole(type));
|
||||
}
|
||||
translate_z(rail_height(type) - rail_bore_depth(type))
|
||||
linear_extrude(rail_bore_depth(type)) difference() {
|
||||
square([length, rail_bore(type) + 2 * eps], center = true);
|
||||
square([length, w], center = true);
|
||||
|
||||
rail_hole_positions(type, length)
|
||||
if (use_polycircles)
|
||||
poly_circle(r = rail_bore(type) / 2);
|
||||
poly_circle(rbr);
|
||||
else
|
||||
circle(r = rail_bore(type) / 2);
|
||||
circle(rbr);
|
||||
}
|
||||
|
||||
go = height - rail_groove_offset(type);
|
||||
gw = rail_groove_width(type);
|
||||
gd = gw / 2;
|
||||
sw = (width - rail_bore(type)) / 2;
|
||||
sw = (width - w) / 2;
|
||||
for (m = [0, 1])
|
||||
mirror([0, m, 0])
|
||||
translate([0, -width / 2])
|
||||
|
|
Loading…
Reference in New Issue