You can see all the elements I want for my Mobile Phone flip-case in here; it has hinges, a closure, inserts and I also experimented with cutting, cleaning and stitching techniques while making it. I’m also getting a feel for the different leathers I have.
cardflip.scad
// Leather CardCase
$fn=90;
// all following in mm
card=[53.98,85.6]; // standard ccard size
crad=3.18; // standard ccard corner radius
pad=10; // top padding
stitch=3.5; // stitch padding from outside & inside
pitch=5; // stitch pitch
pin=0.7; // stitch hole diameter
loop=[10,card[1]+2]; // loop size (base)
hinge=4; // reduce loop width on inner hinge
closure=[36,card[1]]; // closure flap (base)
magnet=5; // closure magnet diameter
// Compute these here for convenience
centerO=card[0]+(2*pad)+(4*stitch)+loop[0]; // outer
centerI=centerO-hinge; // inner
centerF=-(card[0]/2+closure[0]/2+2*stitch); // flap
topF=(closure[1]/2)-(closure[0]*0.75); // flap loop centers
// Inner Leather
color("green")
difference() {
// basic outer shape
union() {
panel();
translate([centerI,0])
mirror([1,0])
panel();
translate([centerI/2,0])
square([loop[0],card[1]],center=true);
}
// strap cutouts
translate([centerI/2,0])
for (y=[1,-1]) {
translate([0,y*card[1]/2])
scale([(loop[0]-hinge)/2,(card[1]-loop[1])/2])
circle(r=1);
}
// Cutouts on either side (mirrored)
for (a=[0,1]) {
translate([a*centerI,0])
mirror([a,0,0]) {
// holes for stitching
stitching();
// Slit
translate([card[0]/2+(pad*0.33),0]) {
for (y=[-1,1]) {
translate([0,y*(card[1]/2)])
circle(pin*2.4);
}
square([pin/2,card[1]],center=true);
}
// Thumbslide
hull() {
translate([6,0]) scale([12,16]) circle(1);
translate([-10,0]) scale([12,30]) circle(1);
}
}
}
}
// Outer Leather
translate([0,card[1]*-1.5])
color("slategrey")
difference() {
// basic outer shape
union() {
panel();
translate([centerO,0])
mirror([1,0])
panel();
translate([centerO/2,0])
square([loop[0],card[1]],center=true);
// Closure flap
translate([centerF,0])
flap();
}
// strap cutouts
translate([centerO/2,0])
for (y=[1,-1]) {
translate([0,y*card[1]/2])
scale([loop[0]/2,(card[1]-loop[1])/2])
circle(r=1);
}
// Stitching
for (a=[0,1]) {
translate([a*centerO,0])
mirror([a,0,0]) {
stitching();
}
}
// Flap Stitching
translate([centerF,0])
flapstitch();
}
// Flap inner
difference() {
hull() {
translate([centerF-closure[0]/4,topF])
circle(d=closure[0]/2, $fn=45);
translate([centerF-closure[0]/4,-topF])
circle(d=closure[0]/2, $fn=45);
}
translate([centerF,0])
flapstitch();
//translate([centerF-closure[0]/4,topF])
//circle(d=magnet);
}
// Internal Stiffner
translate([0,card[1]*1.5])
stiffner();
// dummy card
if (!true) {
color("gold",0.5)
minkowski() {
square(card-[2*crad,2*crad],center=true);
circle(crad);
}
}
module panel() {
minkowski(){
union() {
square(card,center=true);
translate([pad,0]) square(card,center=true);
}
circle(stitch*2);
}
}
module stitching() {
for (x=[-(card[0]/2):pitch:(card[0]/2)+pad+pitch]) {
translate([x,stitch+(card[1]/2)]) circle(r=pin,$fn=18);
translate([x,-stitch-(card[1]/2)]) circle(r=pin,$fn=18);
}
for (x=[-(stitch+(card[0]/2)),(stitch+(card[0]/2)+pad)],
y=[pitch*0.5:pitch:(card[1]/2)+1]) {
translate([x,y]) circle(r=pin,$fn=18);
translate([x,-y]) circle(r=pin,$fn=18);
}
}
module stiffner() {
minkowski(){
union() {
square(card-[crad,crad],center=true);
translate([pad,0]) square(card-[crad,crad],center=true);
}
circle(crad);
}
}
module flap() {
difference() {
translate([closure[0]/4,0])
square([closure[0]/2,closure[1]],center=true);
translate([0,closure[1]/2])
circle(d=closure[0]);
translate([0,-closure[1]/2])
circle(d=closure[0]);
}
hull() {
translate([-closure[0]/4,(closure[1]/2)-(closure[0]*0.75)])
circle(d=closure[0]/2);
translate([-closure[0]/4,-(closure[1]/2)+(closure[0]*0.75)])
circle(d=closure[0]/2);
}
square([closure[0]/2,closure[1]-closure[0]],center=true);
}
module flapstitch() {
for (y=[pitch/2:pitch:topF]) {
translate([-stitch,y])
circle(r=pin,$fn=18);
translate([-stitch,-y])
circle(r=pin,$fn=18);
translate([(-closure[0]/2)+stitch,y])
circle(r=pin,$fn=18);
translate([(-closure[0]/2)+stitch,-y])
circle(r=pin,$fn=18);
}
for (r=[-70:70/1.5:70]) {
translate([-closure[0]/4,topF])
rotate([0,0,r])
translate([0,(closure[0]/4)-stitch])
circle(r=pin,$fn=18);
translate([-closure[0]/4,-topF])
rotate([0,0,r])
translate([0,-(closure[0]/4)+stitch])
circle(r=pin,$fn=18);
}
}
If I make more of these I’d probably extend the hinge piece on the outer shell by 1mm (on X) to make the hinge apply a stronger closing effect. And extend the neck of the closure by 2 or 3mm to allow the magnets more overlap, and use stronger magnets.