/* * Copyright (c) 2022 - 2023 Thomas Buck (thomas@xythobuz.de) * Philipp Schönberger (mail@phschoen.de) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * See . */ include; use; use; //ball_and_bearing_holder(); bearing_mount_for_hull(); module ball_and_bearing_holder() { // trackball itself if(draw_trackball) color("red") sphere(d = trackball_dia, $fn = $fn); bearing_rot_trans() bearing_holder(); } module bearing_rot_trans() { for (r = [0 : bearing_count - 1]) rotate([0, 0, bearing_mount_angle_off + 360 / bearing_count * r]) { rotate([0, sphere_angle_at_rh(trackball_dia *0.10, trackball_dia / 2) , 0]) translate([0, 0, -trackball_dia / 2]) rotate([0,0,90]) // move flange to bottom children(); } }