Last active
September 14, 2018 21:11
-
-
Save acamilo/ac5ffdbfe6a12ea5b1dbe51b8b908f55 to your computer and use it in GitHub Desktop.
Model of a TFT LCD disokay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// test | |
float display_screenwidth = 48.96; | |
float display_screenheight = 73.44; | |
float display_thickness = 5; | |
float display_bodywidth = 54.56; | |
float display_bodyheight = 84.70; | |
float display_screen_to_body_h_offset = 2.96 | |
display_viewable_cutout = 3; | |
display_area = new Cube( | |
display_screenwidth, | |
display_screenheight, | |
display_thickness).toCSG(); | |
display_area = display_area.movez(display_viewable_cutout); | |
display_area = display_area.movey(((display_bodyheight-display_screenheight)/2)- | |
display_screen_to_body_h_offset); | |
display_body = new Cube( | |
display_bodywidth, | |
display_bodyheight, | |
display_thickness).toCSG(); | |
CSG display = display_body.union(display_area); | |
display = display.movez(-(display_thickness/2)+0.5) | |
panel_width = 200; | |
panel_height = 100; | |
panel_depth = 3; | |
m2hole_dia = 2 | |
m2hole_height = 10; | |
m2hole_cut = new Cylinder(m2hole_dia,m2hole_height).toCSG() | |
encoder_hole_w_spaceing = 10; | |
encoder_hole_h_spaceing = 10; | |
def encoder_holes_cut = CSG.unionAll([ | |
m2hole_cut | |
.movex(-encoder_hole_w_spaceing/2) | |
.movey(-encoder_hole_h_spaceing/2), | |
m2hole_cut | |
.movex(-encoder_hole_w_spaceing/2) | |
.movey(encoder_hole_h_spaceing/2), | |
m2hole_cut | |
.movex(encoder_hole_w_spaceing/2) | |
.movey(-encoder_hole_h_spaceing/2), | |
m2hole_cut | |
.movex(encoder_hole_w_spaceing/2) | |
.movey(encoder_hole_h_spaceing/2) | |
]) | |
encoder_pogo_cutout_w = 10; | |
encoder_pogo_cutout_h = 10; | |
encoder_pogo_cutout_d = 10; | |
encoder_pogo_offset = new Transform() | |
.movex(0) | |
.movey(20) | |
.movez(encoder_pogo_cutout_d/2); | |
encoder_pogo_cutout = new Cube( | |
encoder_pogo_cutout_w, | |
encoder_pogo_cutout_h, | |
encoder_pogo_cutout_d).toCSG(); | |
encoder_pogo_cutout = encoder_pogo_cutout | |
.transformed(encoder_pogo_offset); | |
encoder_fixture_cutout = CSG.unionAll([ | |
encoder_pogo_cutout, | |
encoder_holes_cut | |
]); | |
panel_base = new Cube(panel_width, | |
panel_height, | |
panel_depth).toCSG() | |
.movex(panel_width/2) | |
.movey(panel_height/2) | |
def display_on_panel_offset = new Transform() | |
.movex((display_bodywidth/2)+15) | |
.movey(panel_height/2) | |
.movez(0); | |
display = display.transformed(display_on_panel_offset) | |
display_cutout = display.toolOffset(0.3); | |
display.setColor(javafx.scene.paint.Color.CYAN); | |
def panel = panel_base.difference(display_cutout); | |
return [panel,display.movez(-15)]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment