소스 검색

mount pi at the top part for less cable lengths

phschoen 1 년 전
부모
커밋
17cf5a5de4
1개의 변경된 파일59개의 추가작업 그리고 45개의 파일을 삭제
  1. 59
    45
      hardware/trackball.scad

+ 59
- 45
hardware/trackball.scad 파일 보기

@@ -38,7 +38,7 @@ use <external/pico_case.scad>
38 38
 // ######################
39 39
 
40 40
 //ball_and_roller();
41
-//pico_wrap();
41
+pico_wrap();
42 42
 //sensor();
43 43
 //mx_switch_cutout(wall);
44 44
 //mx_switch_test();
@@ -47,10 +47,10 @@ use <external/pico_case.scad>
47 47
 //roller_holder();
48 48
 //roller_mount_tri();
49 49
 
50
-//trackball_top();
51
-//trackball_bottom();
50
+trackball_top();
51
+trackball_bottom();
52 52
 
53
-assembly();
53
+//assembly();
54 54
 //print();
55 55
 
56 56
 // #######################
@@ -222,7 +222,7 @@ pico_screw_d = 1.8;
222 222
 
223 223
 usb_cutout_grow_l = 10;
224 224
 usb_cutout_grow_x = 20;
225
-usb_cutout_grow_y = 40;
225
+usb_cutout_grow_y = 10;
226 226
 usb_cutout_w_add = 1;
227 227
 usb_cutout_h_add = 0.6;
228 228
 
@@ -265,9 +265,11 @@ module mx_switch_cutout(h) {
265 265
         translate([mx_co_w_add - mx_co_b_add / 2, -mx_co_b_add / 2, -1])
266 266
         cube([mx_co_b_w, mx_co_b_h, h - mx_co_th + 1]);
267 267
         
268
+        
268 269
     }
269 270
     
270 271
     
272
+    
271 273
     translate([-mx_co_keycap_w/2,-mx_co_keycap_h/2, h])
272 274
     cube([mx_co_keycap_w, mx_co_keycap_h, 50]);
273 275
 }
@@ -308,11 +310,13 @@ module pico_own() {
308 310
 }
309 311
 
310 312
 module pico_wrap() {
311
-    //if (use_external_pico_model)
312
-    translate([-pico_w / 2, -pico_l / 2, 0])
313
-    pico();
314
-    //else
315
-    pico_own();
313
+    translate([0,0,3.9])
314
+    rotate([0,180,0])
315
+    if (use_external_pico_model)
316
+        translate([-pico_w / 2, -pico_l / 2, 0])
317
+        pico();
318
+    else
319
+        pico_own();
316 320
 }
317 321
 
318 322
 module sensor_lens_cutout_intern() {
@@ -386,7 +390,7 @@ module sensor() {
386 390
 }
387 391
 module ball_and_roller() {
388 392
     color("red")
389
-    sphere(d = ball_dia, $fn = $fn * 2);
393
+    sphere(d = ball_dia, $fn = $fn);
390 394
     
391 395
     for (r = [0 : roller_count - 1])
392 396
     rotate([0, 0, roller_mount_angle_off + 360 / roller_count * r])
@@ -414,7 +418,7 @@ module roller_holder() {
414 418
         cylinder(d = roller_thread_hole, h = $e+ roller_h - roller_dia / 2 + roller_ball_h_off + roller_ball_hold_off);
415 419
     
416 420
         translate([0, 0, roller_h - roller_dia / 2 + roller_holder_h_compensation])
417
-        sphere(d = roller_dia, $fn = $fn * 2);
421
+        sphere(d = roller_dia, $fn = $fn);
418 422
 
419 423
         if (cut_roller_holder)
420 424
         translate([-roller_thread_dia / 2 - 1, -roller_thread_dia, -1])
@@ -422,7 +426,7 @@ module roller_holder() {
422 426
     }
423 427
     
424 428
     %color("blue")
425
-    sphere(d = roller_dia, $fn = $fn * 2);
429
+    sphere(d = roller_dia, $fn = $fn);
426 430
 }
427 431
 
428 432
 module roller_mount() {
@@ -601,6 +605,11 @@ module trackball_top() {
601 605
                     translate([0, 0, 2])
602 606
                     rotate([90, 0, 0])
603 607
                     cylinder(d = 4, h = 20);
608
+                    
609
+                    rotate([0,-sw[i][0][1],0])
610
+                    translate([0,-15,3])
611
+                    rotate([0,180,0])
612
+                    cylinder(d=3,h=40);
604 613
                 }
605 614
             }
606 615
             
@@ -611,10 +620,21 @@ module trackball_top() {
611 620
                 cylinder(d = screw_insert_dia, h = screw_insert_h + 1);
612 621
             }
613 622
             
623
+            for (x = [0, pico_hole_d_x])
624
+            for (y = [0, pico_hole_d_y])
625
+                rotate([0,0,0])
626
+            translate([-pico_w / 2, -pico_l / 2, -25])
627
+            translate([pico_hole_x + x, pico_hole_y + y, -pico_d - pico_screw_depth])
628
+            cylinder(d = pico_screw_d, h = pico_d + pico_screw_depth + 1);
614 629
             
630
+            rotate([0, 180, 0])
631
+            translate([-pico_w / 2, -pico_l / 2, 0])
632
+            translate([(pico_w - pico_usb_w) / 2, pico_l - 1 + pico_usb_off, 30])
633
+            usb_cutout();
615 634
             
616 635
         }
617 636
         
637
+         
618 638
         roller_mount_sensor_pcb_support();
619 639
     
620 640
         if (draw_switches)
@@ -637,70 +657,64 @@ module trackball_top() {
637 657
 }
638 658
 
639 659
 module trackball_bottom_wrap() {
640
-    %rotate([0, 180, 0])
641
-    pico_wrap();
642 660
     
643 661
     color("magenta")
644
-    translate([0, 0, -bottom_base_below_zero])
662
+    translate([0, 0, -3.0])
645 663
     difference() {
646
-        cylinder(d = base_dia, h = bottom_base_below_zero + ball_h - 11);
664
+        cylinder(d = base_dia, h = bottom_base_below_zero + ball_h - 16);
647 665
         
648 666
         translate([0, 0, bottom_base_wall])
649
-        cylinder(d = base_dia - bottom_base_wall * 2 - bottom_add_wall, h = bottom_base_below_zero + ball_h - 11);
667
+        cylinder(d = base_dia - bottom_base_wall * 2 - bottom_add_wall, h = bottom_base_below_zero + ball_h - 15);
650 668
         
651
-        translate([-pico_co_w / 2, -pico_co_l / 2, bottom_base_wall])
669
+        translate([-pico_co_w / 2, -pico_co_l / 2, 2.5])
652 670
         cube([pico_co_w, pico_co_l, bottom_base_below_zero + ball_h - 11]);
653 671
         
654 672
         translate([pico_w / 2 - reset_button_off_x, pico_l / 2 - reset_button_off_y, -1])
655 673
         cylinder(d = reset_button_dia, h = bottom_base_wall + 2);
656
-        
657
-        if (cut_roller_holder)
658
-        translate([-base_dia / 2 - 1, -base_dia / 2 - 1, -10])
659
-        cube([base_dia / 2 + 1, base_dia + 2, 40]);
660 674
     }
661 675
     
662 676
     color("cyan")
663
-    for (x = [-1, 1])
664
-    for (y = [-1, 1])
665
-    translate([x * (pico_co_w - pico_support_w) / 2, y * (pico_co_l - pico_support_l) / 2, 0])
666
-    translate([-pico_support_w / 2, -pico_support_l / 2, -bottom_base_below_zero + bottom_base_wall])
667
-    cube([pico_support_w, pico_support_l, bottom_base_below_zero - bottom_base_wall - pico_d]);
668
-        
669
-    color("cyan")
670 677
     for (r = screw_angles)
671 678
     rotate([0, 0, r])
672
-    translate([screw_off, 0, -bottom_base_below_zero + bottom_base_wall])
673
-    cylinder(d = screw_head_d + 4, h = bottom_base_below_zero + ball_h - 11 - bottom_base_wall);
679
+    translate([screw_off, 0, -3])
680
+    cylinder(d = screw_head_d + 4, h = bottom_base_below_zero + ball_h - 16 );
674 681
 }
675 682
 
676 683
 module usb_cutout() {
677
-    hull() {
678
-        translate([-usb_cutout_w_add / 2, 0, -usb_cutout_h_add / 2])
679
-        cube([pico_usb_w + usb_cutout_w_add, 1, pico_usb_h + usb_cutout_h_add]);
680
-        
681
-        translate([-usb_cutout_grow_x / 2, usb_cutout_grow_l, -usb_cutout_grow_y / 2])
682
-        cube([pico_usb_w + usb_cutout_grow_x, 1, pico_usb_h + usb_cutout_grow_y]);
684
+    translate([8,1,4.5])
685
+    rotate([0,180,0]) {
686
+        translate([-usb_cutout_w_add / 2, -2, -usb_cutout_h_add / 2])
687
+        cube([pico_usb_w + usb_cutout_w_add, 5, pico_usb_h + usb_cutout_h_add]);
688
+    
689
+        hull() {
690
+            translate([-usb_cutout_w_add / 2, 1, -usb_cutout_h_add / 2])
691
+            cube([pico_usb_w + usb_cutout_w_add, $e, pico_usb_h + usb_cutout_h_add]);
692
+            
693
+            translate([-usb_cutout_grow_x / 2, 1+usb_cutout_grow_l, -usb_cutout_grow_y / 2])
694
+            cube([pico_usb_w + usb_cutout_grow_x, $e, pico_usb_h + usb_cutout_grow_y]);
695
+            
696
+            translate([-usb_cutout_grow_x / 2, 1+usb_cutout_grow_l*10, -usb_cutout_grow_y / 2])
697
+            cube([pico_usb_w + usb_cutout_grow_x, $e, pico_usb_h + usb_cutout_grow_y]);
698
+        }
683 699
     }
684 700
 }
685 701
 
702
+
703
+
686 704
 module trackball_bottom() {
687 705
     difference() {
688 706
         trackball_bottom_wrap();
689 707
         
690
-        for (x = [0, pico_hole_d_x])
691
-        for (y = [0, pico_hole_d_y])
692
-        translate([-pico_w / 2, -pico_l / 2, 0])
693
-        translate([pico_hole_x + x, pico_hole_y + y, -pico_d - pico_screw_depth])
694
-        cylinder(d = pico_screw_d, h = pico_d + pico_screw_depth + 1);
695 708
         
709
+        translate([0, 0, ball_dia / 2 + ball_h]) 
696 710
         rotate([0, 180, 0])
697 711
         translate([-pico_w / 2, -pico_l / 2, 0])
698
-        translate([(pico_w - pico_usb_w) / 2, pico_l - 1 + pico_usb_off, pico_d])
712
+        translate([(pico_w - pico_usb_w) / 2, pico_l - 1 + pico_usb_off, 30])
699 713
         usb_cutout();
700 714
         
701 715
         for (r = screw_angles)
702 716
         rotate([0, 0, r])
703
-        translate([screw_off, 0, -bottom_base_below_zero - 1]) {
717
+        translate([screw_off, 0, -$e-3]) {
704 718
             cylinder(d = screw_dia, h = bottom_base_below_zero + 30);
705 719
             cylinder(d = screw_head_d, h = screw_head_h + 1);
706 720
         }

Loading…
취소
저장