Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pin_count = 4;
- pin_length = 17;
- module header(pin_count=4, pin_length=17) {
- body_width = 2.5;
- pin_pitch = 2.54;
- pin_diameter = 0.64;
- for (i = [0 : pin_count - 1]) {
- translate([body_width / 2, i * pin_pitch, 0])
- // color("silver")
- cylinder(h = pin_length, d = pin_diameter, $fn = 6);
- }
- }
- module con(){
- // conector interface
- difference(){
- // front face connector groove interior
- translate([17,0,0])
- cube([5.5,1.23,4.8]);
- // front face connector groove
- translate([17.1,0,0])
- cube([5.3,1.1,4.8]);
- }
- }
- //con();
- color([0.96, 0.96, 0.86]); // RGB values for beige
- width = 12.5;
- depth = 6.4;
- height = 17;
- module body(){
- difference(){
- difference(){
- difference(){
- difference(){
- difference(){
- difference(){
- difference(){
- cube([width, depth, height]);
- // front slice:
- cube([width,1,9]);
- }
- // inner front slice n rear slice
- translate([1.6,1,0])
- cube([9,1,9.75]);
- }
- // rear slice
- translate([1.6,4.4,0])
- cube([9,2,9.75]);
- }
- // hole1: connector cavity
- xc=10.75;
- yc=5.4;
- zc=7.2;
- elv=height-zc;
- translate([0.8,0.5,elv])
- cube([xc,yc,zc]);
- }
- // hole 2 central cut
- translate([0,0,14.75])
- cube([width,3.1,2.25]);
- }
- // rear grove
- xx=7.5;
- yy=1.0;
- zz=1.6;
- translate([2.57,5.5,15.5])
- cube([xx,yy,zz]);
- }
- // front face connector groove
- translate([3.53,0,10])
- cube([5.3,1.1,4.8]);
- }
- translate([-13.5,0,10])
- con();
- }
- color([0.96, 0.96, 0.86]) // wont flippin render colors in modules
- body();
- rotate([0,0,-90])
- translate([-4.5,2.4,-3.5])
- color("silver")
- header();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement