Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $fn=64;
- _off = 0.05;
- cl = 0.1;
- // Platform dimensions
- platform_width = 14.00;
- platform_height = 14.00;
- platform_thickness = 3.3;
- // Hole positions and dimensions
- hole1_diameter = 4.0;
- hole1_position = [0, 0];
- hole2_diameter = 1.7;
- hole2_position = [1.27*4, 0];
- hole3_diameter = 1.7;
- hole3_position = [-1.27*4, 0];
- hole4_diameter = 1.5;
- hole4_position = [1.27*3, -1.27*2];
- hole5_diameter = 1.5;
- hole5_position = [-1.27*2, -1.27*4];
- bearing_d = 8;
- bearing_h = 3;
- thin_h = 5;
- thin_d = 4;
- groove_h = 1.5;
- platform_h = 18;
- piston_h = platform_h - platform_thickness;
- straight_h = piston_h - thin_h - groove_h;
- platform_y = platform_h + 1 - groove_h;
- // Translate positions relative to platform center
- module hole(position, diameter) {
- translate(position)
- cylinder(d = diameter, h = platform_thickness * 2 + _off, center = true);
- }
- module platform() {
- translate([0, 0, -bearing_h/2])
- cylinder(d1 = hub_diameter, d2 = bearing_d, h = bearing_h, center = true);
- translate([0, 0, -straight_h/2 - bearing_h])
- cylinder(h = straight_h, d = hub_diameter, center = true);
- difference() {
- union() {
- translate([0, 0, - bearing_h -straight_h - thin_h])
- for (i = [0:0.5: thin_h/2 - 0.5]) {
- translate([0, 0, i* 2 + 0.25])
- cylinder(h = 0.5, d2 = thin_d - _off, d1 = thin_d - _off - 0.5, center = true);
- translate([0, 0, i * 2 + 0.5 + 0.25])
- cylinder(h = 0.5, d1 = thin_d - _off, d2 = thin_d - _off - 0.5, center = true);
- }
- translate([0, 0, - bearing_h -straight_h - thin_h - groove_h/2])
- cylinder(h = groove_h, d1 = thin_d - _off - 0.3, d2 = hub_diameter - _off -0.3, center = true);
- }
- translate([0, 0, - bearing_h -straight_h - thin_h - groove_h/2])
- cube([1, 10, 10], center = true);
- translate([0, thin_d/2 + 0.3, - bearing_h -straight_h - thin_h - groove_h/2])
- rotate([0, 0, 90])
- cube([1, 10, 10], center = true);
- translate([0, -thin_d/2 - 0.3, - bearing_h -straight_h - thin_h - groove_h/2])
- rotate([0, 0, 90])
- cube([1, 10, 10], center = true);
- }
- difference() {
- // Platform
- translate([-platform_width/2, -platform_height/2, 0])
- cube([platform_width, platform_height, platform_thickness]);
- // Holes
- hole(hole1_position, hole1_diameter);
- hole(hole2_position, hole2_diameter);
- hole(hole3_position, hole3_diameter);
- hole(hole4_position, hole4_diameter);
- hole(hole5_position, hole5_diameter);
- }
- }
- // Parameters for the base
- radius = 20;
- arm_length = radius; // Length of each arm, adjusted for the central hub
- arm_thickness = 2.5;
- arm_height = 5;
- hub_diameter = 5;
- hub_inner = 4;
- hub_height = 15;
- wheel_d = 4;
- wheel_thickness = 3;
- cover_d = 5;
- cover_height = arm_thickness;
- module arm()
- {
- difference() {
- rotate([0, -80, 0]) {
- translate([arm_height/2, 0, -arm_length/2]) {
- translate([arm_height/2, 0, ])
- cylinder(d = arm_thickness, h = arm_length, center = true);
- cube([arm_height, arm_thickness, arm_length], center = true);
- }
- }
- }
- }
- // Function to create a wheel
- module wheel(i) {
- translate([radius, 0, - cover_d / 3])
- rotate([90, 0, i])
- cylinder(d = wheel_d, h = wheel_thickness, center = true);
- translate([radius, 0, -cover_d/3])
- rotate([90, 0, i])
- cylinder(d = cover_d, h = cover_height, center = true);
- }
- // Create the base
- module wheels() {
- // Create and position the wheels
- difference() {
- for (i = [0:72:360])
- rotate([0, 0, i])
- wheel(-i) // or wheel(-90)
- translate([0, 0, -wheel_radius/2])
- cylinder(d = radius*3, h = wheel_radius, center = true);
- }
- }
- module base() {
- difference() {
- union () {
- // hub
- translate([0, 0, 5.5])
- cylinder(d1 = bearing_d, d2 = hub_diameter, h = 2, center = true);
- translate([0, 0, 3])
- cylinder(d = bearing_d, h = 3, center = true);
- // Create and position the arms
- difference() {
- for (i = [0:72:360])
- rotate([0, 0, i])
- arm();
- }
- }
- // central hole
- translate([0, 0, 3])
- cylinder(d = thin_d + cl, h = 10, center = true);
- // form the shape of the arms and hub
- translate([0, 0, -5+2])
- cylinder(d1 = 160, d2 = 0, h = 10, center = true);
- }
- }
- // main render
- difference() {
- union() {
- translate([0, 0, platform_y + 0.3])
- platform();
- base();
- wheels();
- }
- // section
- // translate([0, 8, 0])
- // cube([100, 16, 100], center = true);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement