// Title: BagClip // Author: http://www.thingiverse.com/Jinja // Date: 17/9/2012 /////////// START OF PARAMETERS ///////////////// clip_height = 10; clip_length = 120; hinge_thickness = 1; /////////// END OF PARAMETERS ///////////////// union() { male_clip(); translate([14,0,0]) female_clip(); translate([10,-3,0]) hinge(10,hinge_thickness,7.5); } clip_width = 4; module hinge(radius,thickness,gap) { difference() { hull() { translate([-radius*0.5,0,0]) cylinder(clip_height, radius, radius); translate([radius*0.5,0,0]) cylinder(clip_height, radius, radius); } hull() { translate([-radius*0.5,0,0]) cylinder(clip_height, radius-thickness, radius-thickness); translate([radius*0.5,0,0]) cylinder(clip_height, radius-thickness, radius-thickness); } translate([-gap,0,0]) cube([2*gap,radius*2,clip_height]); } } module male_clip() { union() { translate([1,1,1]) minkowski() { male_clip_part(); diamond(); } translate([clip_width+2, 0, clip_height*0.5]) rotate([0,-135,0]) cube( [3, clip_length, 3] ); } } module female_clip() { rotate([0,0,-10]) difference() { translate([1,1,1]) minkowski() { female_clip_part(); diamond(); } translate([2, 0, clip_height*0.5]) rotate([0,-135,0]) cube( [3, clip_length, 3] ); } } module male_clip_part() { tooth_angle = 40; translate([0,-2,0]) cube( [clip_width-1, clip_length+2, clip_height-2] ); translate([0,-clip_width,0]) cube( [clip_width*3+1, clip_width-2, clip_height-2] ); translate([0,clip_length,0]) cube( [clip_width*3+1, clip_width-2, clip_height-2] ); translate([clip_width*3+1,-2,0]) rotate([0,0,180-tooth_angle]) cube( [clip_width-1.5, clip_width-2, clip_height-2] ); translate([clip_width*3+1-((clip_width-1.5)*cos(tooth_angle)),(-2+((clip_width-1.5)*sin(tooth_angle))),0]) rotate([0,0,180]) cube( [(clip_width-1)-((clip_width-1.5)*cos(tooth_angle)), (clip_width-2)*cos(tooth_angle), clip_height-2] ); translate([clip_width*3+1,clip_length,0]) rotate([0,0,180+tooth_angle]) translate([0,-(clip_width-2),0]) cube( [clip_width-1.5, clip_width-2, clip_height-2] ); translate([clip_width*3+1-((clip_width-1.5)*cos(tooth_angle)),clip_length+0.3+(-2+((clip_width-1.5)*sin(tooth_angle))),0]) rotate([0,0,180]) cube( [(clip_width-1)-((clip_width-1.5)*cos(tooth_angle)), (clip_width-2)*cos(tooth_angle), clip_height-2] ); } module female_clip_part() { buffer = 0.5; translate([0.5,buffer*0.5,0]) cube( [clip_width-1, clip_length-2-buffer, clip_height-2] ); } module cutter(dist) { size = 2; translate([dist,0,dist]) rotate([0,45,0]) cube([size,size,size], true); translate([-dist,0,dist]) rotate([0,45,0]) cube([size,size,size], true); translate([-dist,0,-dist]) rotate([0,45,0]) cube([size,size,size], true); translate([dist,0,-dist]) rotate([0,45,0]) cube([size,size,size], true); } module diamond() { dist = 0.5+sin(45); difference() { cube([2,2,2], true); cutter(dist); rotate([0,0,60]) cutter(dist); rotate([0,0,120]) cutter(dist); } } }