瀏覽代碼

added VCN320 ball bearing option

phschoen 1 年之前
父節點
當前提交
3e3fad005e
共有 3 個文件被更改,包括 64 次插入23 次删除
  1. 3
    0
      .gitmodules
  2. 1
    0
      hardware/BOSL2
  3. 60
    23
      hardware/trackball.scad

+ 3
- 0
.gitmodules 查看文件

@@ -4,3 +4,6 @@
4 4
 [submodule "firmware/fatfs"]
5 5
 	path = firmware/fatfs
6 6
 	url = https://github.com/abbrev/fatfs
7
+[submodule "hardware/BOSL2"]
8
+	path = hardware/BOSL2
9
+	url = https://github.com/revarbat/BOSL2.git

+ 1
- 0
hardware/BOSL2

@@ -0,0 +1 @@
1
+Subproject commit d700884482dd0eab5aafa17984481b7622522214

+ 60
- 23
hardware/trackball.scad 查看文件

@@ -27,6 +27,8 @@
27 27
  *
28 28
  * See <http://www.gnu.org/licenses/>.
29 29
  */
30
+include <BOSL2/std.scad>;
31
+include <BOSL2/threading.scad>;
30 32
 
31 33
 // https://www.thingiverse.com/thing:421524
32 34
 use <external/cherry_mx.scad>
@@ -80,6 +82,8 @@ draw_sensor = true;
80 82
 use_external_pico_model = true;
81 83
 draw_keycap = false;
82 84
 
85
+holdertype="ball_rollen";
86
+//holdertype="static";
83 87
 // #######################
84 88
 // ## Raspberry Pi Pico ##
85 89
 // #######################
@@ -176,7 +180,7 @@ grub_screw_dia = 2.8;
176 180
 grub_channel_dia = 4.0;
177 181
 
178 182
 roller_thread_dia = roller_dia + 5.0;
179
-roller_h = roller_dia + 7.0;
183
+roller_h = roller_dia + 7.0+2;
180 184
 roller_ball_h_off = 0.4;
181 185
 roller_ball_hold_off = 0.5;
182 186
 roller_thread_hole = roller_dia - 1;
@@ -404,32 +408,65 @@ module ball_and_roller() {
404 408
 }
405 409
 
406 410
 module roller_holder() {
407
-    translate([0, 0, -roller_h + roller_dia / 2])
408
-    difference() {
409
-        color("magenta")
410
-        union() {
411
-            translate([0, 0,  roller_h-roller_dia/2 + roller_ball_h_off-3])
412
-            cylinder(d1 = roller_mount_dia, d2=roller_dia+1,  h = 3);
411
+    if(holdertype=="static") {
412
+        translate([0, 0, -roller_h + roller_dia / 2])
413
+        difference() {
414
+            color("magenta")
415
+            union() {
416
+                translate([0, 0,  roller_h-roller_dia/2 + roller_ball_h_off-3])
417
+                cylinder(d1 = roller_mount_dia, d2=roller_dia+1,  h = 3);
418
+                
419
+                cylinder(d = roller_mount_dia, h = roller_h-roller_dia/2 + roller_ball_h_off-3);
420
+            }
413 421
             
414
-            cylinder(d = roller_mount_dia, h = roller_h-roller_dia/2 + roller_ball_h_off-3);
415
-        }
422
+            translate([-roller_mount_dia / 2 - 1, roller_mount_dia / 2 - roller_holder_sider_cut, -1])
423
+            cube([roller_mount_dia + 2, roller_mount_dia / 2 + 1, roller_h + 2]);
424
+            
425
+            translate([0, 0, -$e])
426
+            cylinder(d = roller_thread_hole, h = $e+ roller_h - roller_dia / 2 + roller_ball_h_off + roller_ball_hold_off);
416 427
         
417
-        translate([-roller_mount_dia / 2 - 1, roller_mount_dia / 2 - roller_holder_sider_cut, -1])
418
-        cube([roller_mount_dia + 2, roller_mount_dia / 2 + 1, roller_h + 2]);
428
+            translate([0, 0, roller_h - roller_dia / 2 + roller_holder_h_compensation])
429
+            sphere(d = roller_dia, $fn = $fn);
430
+
431
+            if (cut_roller_holder)
432
+            translate([-roller_thread_dia / 2 - 1, -roller_thread_dia, -$e])
433
+            cube([roller_thread_dia + 2, roller_thread_dia, roller_h + 2]);
434
+        }
419 435
         
420
-        translate([0, 0, -$e])
421
-        cylinder(d = roller_thread_hole, h = $e+ roller_h - roller_dia / 2 + roller_ball_h_off + roller_ball_hold_off);
422
-    
423
-        translate([0, 0, roller_h - roller_dia / 2 + roller_holder_h_compensation])
436
+        %color("blue")
424 437
         sphere(d = roller_dia, $fn = $fn);
438
+    }
439
+    if(holdertype=="ball_rollen") {
425 440
 
426
-        if (cut_roller_holder)
427
-        translate([-roller_thread_dia / 2 - 1, -roller_thread_dia, -1])
428
-        cube([roller_thread_dia + 2, roller_thread_dia, roller_h + 2]);
441
+        l=10;
442
+        
443
+        difference() {
444
+            union() {
445
+                translate([0,0,$e -l +roller_dia/2 -2])
446
+                cylinder(d=roller_mount_dia,h=l-1);
447
+                
448
+                %union(){
449
+                color("red")
450
+                translate([0,0,(roller_dia-3.18)/2])
451
+                sphere(d = 3.18, $fn = $fn);
452
+                
453
+                color("silver")
454
+                translate([0,0,-1.2+(3.18)/2-0.9])
455
+                cylinder(d2 = 3.5,d1 = 6,h=1);
456
+                
457
+                translate([0,0,-l/2 +roller_dia/2 -2])
458
+                threaded_rod(d=6, l=l, pitch=1.0);
459
+                }
460
+            }
461
+            
462
+            translate([0,0,$e -l/2 +roller_dia/2 -2])
463
+            threaded_rod(d=6.1, l=l, pitch=1.0);
464
+            
465
+            if (cut_roller_holder)
466
+            translate([-roller_thread_dia / 2 - 1, -roller_thread_dia, -l*2])
467
+            cube([roller_thread_dia + 2, roller_thread_dia, l*4]);
468
+        }
429 469
     }
430
-    
431
-    %color("blue")
432
-    sphere(d = roller_dia, $fn = $fn);
433 470
 }
434 471
 
435 472
 module roller_mount() {
@@ -594,8 +631,8 @@ module trackball_top() {
594 631
             roller_mount_tri_body();
595 632
         
596 633
             if (cut_roller_holder)
597
-            translate([0, -base_dia / 2 - 1, -40])
598
-            cube([base_dia / 2 + 1, base_dia + 2, 40]);
634
+            translate([0, -base_dia, -base_dia])
635
+            cube([base_dia *2 , base_dia * 2, base_dia*2]);
599 636
             
600 637
             
601 638
             for ( i = [0:len(sw)-1] ){

Loading…
取消
儲存