Add Brio turntable
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
include <train_tracks_generator.scad>
|
||||
|
||||
/* https://github.com/BelfrySCAD/BOSL2 */
|
||||
include <BOSL2/std.scad>
|
||||
|
||||
module turntable_4way(turntable_width = 144, insert_width = 86, insert_height = 8, insert_tolerance_width = 0.8, insert_tolerance_height = 0.2) { // make me
|
||||
difference() {
|
||||
// Base
|
||||
cuboid([turntable_width, turntable_width, track_height], chamfer=track_chamfer/sqrt(2), anchor=BOTTOM);
|
||||
|
||||
group() {
|
||||
// Hole for insert
|
||||
up(track_height-insert_height-insert_tolerance_height)
|
||||
cyl(h=insert_height+insert_tolerance_height, d=insert_width+insert_tolerance_width, chamfer2=-track_chamfer/sqrt(2), anchor=BOTTOM);
|
||||
|
||||
// Track grooves
|
||||
translate([-track_width/2,turntable_width/2,0])
|
||||
rotate([90,0,0])
|
||||
linear_extrude(turntable_width)
|
||||
grooves(both_sides=false);
|
||||
rotate([0,0,90])
|
||||
translate([-track_width/2,turntable_width/2,0])
|
||||
rotate([90,0,0])
|
||||
linear_extrude(turntable_width)
|
||||
grooves(both_sides=false);
|
||||
|
||||
// Nests
|
||||
left(turntable_width/2) track_nest();
|
||||
rotate([0,0,90]) left(turntable_width/2) track_nest();
|
||||
}
|
||||
}
|
||||
|
||||
// Plugs
|
||||
right(turntable_width/2-track_plug_neck_length) track_plug(neck_l=2*track_plug_neck_length);
|
||||
rotate([0,0,90]) right(turntable_width/2-track_plug_neck_length) track_plug(neck_l=2*track_plug_neck_length);
|
||||
}
|
||||
|
||||
module turntable_8way(turntable_width = 144, insert_width = 86, insert_height = 8, insert_tolerance_width = 0.8, insert_tolerance_height = 0.2) { // make me
|
||||
difference() {
|
||||
// Base
|
||||
regular_prism(8, id=turntable_width, h=track_height, chamfer=track_chamfer/sqrt(2), realign=true, anchor=BOTTOM);
|
||||
|
||||
group() {
|
||||
// Hole for insert
|
||||
up(track_height-insert_height-insert_tolerance_height)
|
||||
cyl(h=insert_height+insert_tolerance_height, d=insert_width+insert_tolerance_width, chamfer2=-track_chamfer/sqrt(2), anchor=BOTTOM);
|
||||
|
||||
// Track grooves
|
||||
translate([-track_width/2,turntable_width/2,0])
|
||||
rotate([90,0,0])
|
||||
linear_extrude(turntable_width)
|
||||
grooves(both_sides=false);
|
||||
rotate([0,0,45])
|
||||
translate([-track_width/2,turntable_width/2,0])
|
||||
rotate([90,0,0])
|
||||
linear_extrude(turntable_width)
|
||||
grooves(both_sides=false);
|
||||
rotate([0,0,90])
|
||||
translate([-track_width/2,turntable_width/2,0])
|
||||
rotate([90,0,0])
|
||||
linear_extrude(turntable_width)
|
||||
grooves(both_sides=false);
|
||||
rotate([0,0,135])
|
||||
translate([-track_width/2,turntable_width/2,0])
|
||||
rotate([90,0,0])
|
||||
linear_extrude(turntable_width)
|
||||
grooves(both_sides=false);
|
||||
|
||||
// Nests
|
||||
left(turntable_width/2) track_nest();
|
||||
rotate([0,0,45]) left(turntable_width/2) track_nest();
|
||||
rotate([0,0,90]) left(turntable_width/2) track_nest();
|
||||
rotate([0,0,135]) left(turntable_width/2) track_nest();
|
||||
}
|
||||
}
|
||||
|
||||
// Plugs
|
||||
right(turntable_width/2-track_plug_neck_length) track_plug(neck_l=2*track_plug_neck_length);
|
||||
rotate([0,0,45]) right(turntable_width/2-track_plug_neck_length) track_plug(neck_l=2*track_plug_neck_length);
|
||||
rotate([0,0,90]) right(turntable_width/2-track_plug_neck_length) track_plug(neck_l=2*track_plug_neck_length);
|
||||
rotate([0,0,135]) right(turntable_width/2-track_plug_neck_length) track_plug(neck_l=2*track_plug_neck_length);
|
||||
}
|
||||
|
||||
module turntable_insert(insert_width = 86, insert_height = 8) { // make me
|
||||
difference() {
|
||||
// Insert
|
||||
cyl(h=insert_height, d=insert_width, chamfer=track_chamfer/sqrt(2), anchor=BOTTOM);
|
||||
|
||||
// Track grooves
|
||||
translate([-track_width/2,insert_width/2,insert_height-track_height])
|
||||
rotate([90,0,0])
|
||||
linear_extrude(insert_width)
|
||||
grooves(both_sides=false);
|
||||
}
|
||||
|
||||
// Handle
|
||||
left(33)
|
||||
cyl(h=track_height+insert_height, d=8, chamfer2=track_chamfer/sqrt(2), anchor=BOTTOM);
|
||||
}
|
||||
|
||||
distribute(sizes=[160,90,160]) {
|
||||
turntable_4way();
|
||||
turntable_insert();
|
||||
turntable_8way();
|
||||
}
|
||||
Reference in New Issue
Block a user