Designing a New Mounting Set to be 3D Printed

I was on Instagram when one of those annoying ads popped up for something outrageously expensive but actually useful.

It is a two piece clip, one half fixes to a wall or furniture the other to, say, a power board. It allows you to mount them together out of the way but still allows them to be separated and used for something else or attached elsewhere.

Anyway I got stuck into designing it today. It was frustrating I haven’t used OpenScad since my visitors arrived last October so I was VERY rusty. This is what I have knocked up today.

Image1

No stops, no mounting holes, very much a work in progress but I am quite pleased so far - it is scalable so it could be made 2cm wide or 10cm wide for example. some of the maths is a bit sus too and needs refining.

You have to imagine the top part flipped over and sliding into the bottom part.

The code (so far)

//Mounting Clip

//Base Variables
len=100;
wid=50;
thk=3;
rad=5; //corners

//Clip Variables
clplen=len*2/3;
clpwid=thk*2;
clpheyt=(thk*2)+1; //+1 embedded in base

$fn=100;

//Base
union() {
hull(){base(
l=(len/2)-rad/2,
w=(wid/2)-rad,
t=thk,
r=rad
);
}    

//Clip

translate([0,wid/4,thk-.5]) {
    Clip(clplen,clpwid,clpheyt);
}

    translate([0,-wid/4,thk-.5]) {
    rotate([180,180,0]){    
    Clip(clplen,clpwid,clpheyt);
}
}
}

//Top

translate([0,0,20]){
union() {
hull(){base(
l=(len/2)-rad/2,
w=(wid/2)-rad,
t=thk,
r=rad
);
}    

//Top Clip

translate([0,-wid/4-clpwid/2-1,thk-.5]) {
    Clip(clplen,clpwid,clpheyt);
}


translate([0,wid/4+clpwid/2+1,thk-.5]) {
    rotate([180,180,0]){    
    Clip(clplen,clpwid,clpheyt);
}
}
}
}


module base(l,w,t,r){
 translate([l,w,0]) {
  cylinder(h=t,r=r);
 }   
translate([-l,w,0]) {
  cylinder(h=t,r=r);
 }   
translate([-l,-w,0]) {
  cylinder(h=t,r=r);
 }   
translate([l,-w,0]) {
  cylinder(h=t,r=r);
 }    
    
}

module Clip (d,w,h) {
difference(){
    translate([0,0,thk])
    cube ([d,w,h],center=true);
    
    translate([0,thk,thk-1])
        cube([d+1,w+1,h/2+.5
   ],center=true);
    }
}

There will be many changes before I print one out, for example I might use bevelled edges, proportions are a bit out of kilter but, as I say, for something I haven’t touched for months I was quite pleased with a couple of hours work.

That is going to be useful, interesting. Hope you post the finished one