Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Written in 2018 by Kevin Fowlks <[email protected]>
- // Replacement faceplate for stamina row machine
- // Global Varibles
- font = "Liberation Sans";
- module roundedRect(size, radius)
- {
- x = size[0];
- y = size[1];
- z = size[2];
- linear_extrude(height=z)
- hull()
- {
- // place 4 circles in the corners, with the given radius
- translate([(-x/2)+(radius/2), (-y/2)+(radius/2)])
- circle(r=radius);
- translate([(x/2)-(radius/2), (-y/2)+(radius/2)])
- circle(r=radius);
- translate([(-x/2)+(radius/2), (y/2)-(radius/2)])
- circle(r=radius);
- translate([(x/2)-(radius/2), (y/2)-(radius/2)])
- circle(r=radius);
- }
- }
- module faceplate() {
- thickness=3.1;
- height = 105.8;
- length = 13.9;
- width= 72.3;
- lcd_screen_offset_height = 15;
- fitrow_text_offset_height = 1;
- difference() {
- union() {
- difference() {
- color("blue")
- translate([(89.9/2)-(width/2),0,(114.9/2)-(height/2)])
- cube([width,length,height]);
- color("orange")
- translate([(89.9/2)-((width-thickness)/2),4,(114.9/2)-((height-thickness)/2)])
- cube([width-thickness,length,height-thickness]);
- }
- outerfaceplate();
- }
- translate([(89.9/2)-(49.5/2),5,((114.9/2)-(86.1/2))+lcd_screen_offset_height])
- tft_lcd_screen_cutout();
- }
- //TODO: Create post holes for LCD screen
- translate([(89.9/2)-(32/2),2,((114.9/2)-(86.1/2))+fitrow_text_offset_height])
- fitrow_text();
- }
- module notch() {
- height = 3.9;
- length = 3.0;
- width= 11.0;
- translate([-2,-2,-3])
- wedge(60, width, length, height);
- }
- module outerfaceplate() {
- outerface_height = 114.9;
- outerface_thickness = .4;
- outerface_width= 86.9; // Size reduced due to rounded corners.
- radius = 1;
- color("red")
- // Lets round the excess
- minkowski()
- {
- cube([outerface_width,outerface_thickness,outerface_height]);
- sphere(r=radius);
- }
- }
- module fitrow_text() {
- content = "Fit Row";
- color("green")
- translate ([0,0,0]) {
- rotate ([90,0,0]) {
- linear_extrude(height = 3.9) {
- text(content, font = font, size = 7, direction = "ltr", spacing = 1 );
- }
- }
- }
- }
- module tft_lcd() {
- translate([0,-40,10.6])
- tft_lcd_screen();
- height = 86.1; // mm
- length = 2.1;
- width= 49.9;
- translate([0,-50,0])
- color("green")
- difference() {
- //rotate([0,90,90])
- //cylinder(r=5,h=10)
- cube([width,length,height]);
- //rotate([0,90,90])
- //color("black")
- //translate([0,0,0])
- //cylinder(r=length,h=10);
- }
- }
- module tft_lcd_screen_cutout() {
- lcd_screen_height = 69.2; // mm
- lcd_screen_thickness = 14;
- lcd_screen_width= 49.9;
- translate([0,-6,0])
- color("yellow")
- cube([lcd_screen_width,lcd_screen_thickness,lcd_screen_height]);
- }
- module tft_lcd_screen() {
- lcd_screen_height = 69.2; // mm
- lcd_screen_thickness = 2.4;
- lcd_screen_width= 49.9;
- translate([0,-12,0])
- color("purple")
- cube([lcd_screen_width,lcd_screen_thickness,lcd_screen_height]);
- }
- echo(version=version());
- // Display faceplate
- faceplate();
- // This is for LCD platement and reference
- // tft_lcd();
Advertisement
Add Comment
Please, Sign In to add comment