Sin descripción
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

config.scad 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. * Copyright (c) 2022 - 2023 Thomas Buck (thomas@xythobuz.de)
  3. * Philipp Schönberger (mail@phschoen.de)
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * See <http://www.gnu.org/licenses/>.
  16. */
  17. // https://www.thingiverse.com/thing:421524
  18. use <external/cherry_mx.scad>;
  19. include <mx_switch.scad>;
  20. // #######################
  21. // #### Configuration ####
  22. // #######################
  23. $fn = 100;//42;
  24. $c = 0.1; // clearence of 3d printer
  25. $e = 0.01; // smales neglegtable distance
  26. pico_angle = 55;
  27. pico_off = -60;
  28. angle_sensor=[0,0,145]; // angle of the ball sensor
  29. sensor_type = "mini"; // one of normal or mini
  30. trackball_dia = 40.0; // diameter of the trackball itself
  31. bearing_type="dynamic_m6_vcn320"; // one off:
  32. // dynamic_3d_vcn410
  33. // dynamic_m6_vcn320
  34. // static
  35. bearing_static_dia = 3.0; // diameter of the roller holder ball if type is "static"
  36. bearing_h = 12; // total higth of the bearing holder
  37. roller_ball_h = trackball_dia / 2 - 5;
  38. bearing_count = 3;
  39. wall = 3.0;
  40. left_hand_version = false;
  41. cut_bearing_holder = false;
  42. draw_supports = false;
  43. draw_ball_bearing_holder = true;
  44. draw_trackball = true;
  45. draw_switches = true;
  46. draw_sensor = true;
  47. draw_led= true;
  48. draw_pico = true;
  49. use_external_pico_model = true;
  50. draw_keycap = true;
  51. draw_panel = true;
  52. draw_usb_c = true;
  53. // ######################
  54. // ### Implementation ###
  55. // ######################
  56. base_dia = 62;
  57. grub_screw_dia = 2.8;
  58. grub_channel_dia = 4.0;
  59. bearing_ball_h_off = 0.4;
  60. bearing_ball_hold_off = 0.5;
  61. bearing_mount_grub_screw_l = 5;
  62. bearing_mount_angle_off = 25;//90-5;
  63. bearing_mount_dia = 10;
  64. bearing_mount_flange = 1;
  65. ball_h = 15; // todo
  66. switch_test_w = 25;
  67. sensor_pcb_mount_gap = 2.0;
  68. // rotate translate
  69. sw = [ // x z_pre_T z_post_T
  70. [ [-25, 0, -33 * (left_hand_version ? -1 : 1)], [0,-base_dia / 2 - 3,-14.5]],// thumb
  71. [ [-25, -19, 3 * (left_hand_version ? -1 : 1)], [0,-base_dia / 2 - 3,-14.5]],// thumb
  72. [ [-25, 0, 146 * (left_hand_version ? -1 : 1)], [0,-base_dia / 2 - 3,-14.5]],// middle
  73. [ [-25, 19, 106 * (left_hand_version ? -1 : 1)], [0,-base_dia / 2 - 3,-14.5]],// ring
  74. // [ [-25, -15, 146 * (left_hand_version ? -1 : 1)], [0,-base_dia / 2 - 3,-14.5]],// middle
  75. // [ [-25, 0, 106 * (left_hand_version ? -1 : 1)], [0,-base_dia / 2 - 3,-14.5]],// ring
  76. ];
  77. sw_mount_w = mx_co_w + 7;
  78. sw_mount_r=4;
  79. assembly_dist = 20;