Skip to content

Instantly share code, notes, and snippets.

@patmandenver
Last active April 3, 2018 21:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patmandenver/d8dde756fee6600a5f47e2caba08103b to your computer and use it in GitHub Desktop.
Save patmandenver/d8dde756fee6600a5f47e2caba08103b to your computer and use it in GitHub Desktop.
/* GNU AGPLv3 (or later at your option)
see bottom for more license info.
please do not remove this notice. */
/* measurements from misumi's 3030 aluminum extrusion data sheet
https://us.misumi-ec.com/pdf/fa/2012/p2_0545.pdf */
foot_height = 15;
//foot_length = 30;
foot_length = 5;
wall_width = 2;
x = 30;
y = 30;
3030_diagonal = sqrt(pow(x/2, 2) + pow(y/2, 2));
opening_width = 8;
inner_block = 12;
outer_block = (30 - 16.5) / 2;
wall = 2;
$fn = 100;
module 3030_arm_half(){
// inner block
square(inner_block / 2);
// diagonal arms connecting inner block to outer blocks
rotate(45) {
square([3030_diagonal - wall, wall / 2]); }
// outer block, without the wall part since wall has rounded corner
translate([x / 2 - outer_block, y / 2 - outer_block]) {
square(outer_block - wall); }
// outer arms covering the opening
translate([(opening_width + wall) / 2, y / 2 - wall]) {
square([(x - opening_width - wall) / 2 - wall, wall]); }
// rounded part at entrace to inside
translate([(opening_width + wall) / 2, (y - wall) / 2]){
circle(d = wall); }
// rounded part around outside of extrusion
corner_squish = 0.1;
translate([x / 2 - wall + corner_squish, y / 2 - wall + corner_squish]) {
circle(wall - corner_squish); } }
module 3030_profile(){
arms = 4;
for(arm = [0:arms - 1]) {
rotate(arm * 360 / arms) {
3030_arm_half();
mirror(){ 3030_arm_half(); } } } }
module 3030_sleeve_profile(){
difference() {
minkowski() {
square(30, true);
circle(5); }
minkowski() {
3030_profile();
circle(0.2);} } }
module ring(outer_radius, wall_width) {
difference() {
circle(outer_radius);
circle(outer_radius - wall_width); } }
module fillet(r) {
offset(-r) {
offset(r) {
children(); } } }
module round_corners(r) {
fillet(r) { fillet(-r) { children(); } } }
module half_foot_2d() {
// outer ring
difference() {
ring(foot_height + wall_width, wall_width);
square(foot_height + wall_width);
rotate(-45) {
square(foot_height + wall_width); } }
// upper connecter, horizontal 3030 holder
translate([-wall_width, -wall_width]) {
square([wall_width, x / 2 + wall_width]); }
// upper connector, vertical 3030 holder
translate([-wall_width, -wall_width]) {
square([wall_width + x / 2, wall_width]); }
// bottom connector
translate([cos(45) * foot_height,
-(sin(45) * foot_height + wall_width)]) {
square([x / 2 - cos(45) * foot_height, wall_width]); }
// bottom nub, goes into bottom 3030 opening
translate([(x - opening_width) / 2, 0]) {
square([opening_width / 2, wall_width*1.5]); }
// side nub, goes into side 3030 openings
translate([0, (y - opening_width) / 2]) {
//square([wall_width / 2, opening_width / 2 + wall_width]);
square([2*wall_width, opening_width / 2 + wall_width]);
}
}
module foot_2d() {
round_corners(wall_width / 2.1) {
translate([-x / 2, 0, 0]) {
half_foot_2d(); }
translate([x / 2, 0, 0]) {
mirror() {
half_foot_2d(); } } } }
module foot() {
linear_extrude(height = foot_length) {
foot_2d(); } }
//foot_2d();
foot();
/*
This file is part of 3d-printables.
3d-printables is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
3d-printables 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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with challenge-bot. If not, see <http://www.gnu.org/licenses/>.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment