Add files via upload
This commit is contained in:
48
bits.scad
Normal file
48
bits.scad
Normal file
@@ -0,0 +1,48 @@
|
||||
module Volume()
|
||||
{
|
||||
hull() {
|
||||
translate([10,0,0])cylinder(d=5, h=5);
|
||||
translate([-10,0,0])cylinder(d=5, h=5);
|
||||
}
|
||||
}
|
||||
|
||||
module Power()
|
||||
{
|
||||
hull() {
|
||||
translate([5,0,0])cylinder(d=5, h=5);
|
||||
translate([-5,0,0])cylinder(d=5, h=5);
|
||||
}
|
||||
}
|
||||
|
||||
module Camera()
|
||||
{
|
||||
hull() {
|
||||
translate([0,10,0])cylinder(d=10, h=5);
|
||||
translate([0,-10,0])cylinder(d=10, h=5);
|
||||
}
|
||||
}
|
||||
|
||||
module Speaker()
|
||||
{
|
||||
hull() {
|
||||
translate([0,5,0])cylinder(d=5, h=5);
|
||||
translate([0,25,0])cylinder(d=5, h=5);
|
||||
}
|
||||
hull() {
|
||||
translate([0,-5,0])cylinder(d=5, h=5);
|
||||
translate([0,-25,0])cylinder(d=5, h=5);
|
||||
}
|
||||
}
|
||||
|
||||
module Usb()
|
||||
{
|
||||
hull() {
|
||||
translate([0,5,0])cylinder(d=5, h=5);
|
||||
translate([0,-5,0])cylinder(d=5, h=5);
|
||||
}
|
||||
}
|
||||
|
||||
module Microphone()
|
||||
{
|
||||
cylinder(d=3, h=5);
|
||||
}
|
54
case.scad
Normal file
54
case.scad
Normal file
@@ -0,0 +1,54 @@
|
||||
include <dimensions.scad>
|
||||
use <phone.scad>
|
||||
|
||||
$fn=50;
|
||||
|
||||
module plate(Margin, Thick=Height)
|
||||
{
|
||||
translate([0,0,2]) hull() {
|
||||
translate([(Length-Height-Margin)/2,(Width-Height-Margin)/2,0]) cylinder(d=Height, h=Thick);
|
||||
translate([-(Length-Height-Margin)/2,(Width-Height-Margin)/2,0]) cylinder(d=Height, h=Thick);
|
||||
translate([(Length-Height-Margin)/2,-(Width-Height-Margin)/2,0]) cylinder(d=Height, h=Thick);
|
||||
translate([-(Length-Height-Margin)/2,-(Width-Height-Margin)/2,0]) cylinder(d=Height, h=Thick);
|
||||
}
|
||||
}
|
||||
|
||||
difference() {
|
||||
union() {
|
||||
difference() {
|
||||
phone(4);
|
||||
plate(2);
|
||||
}
|
||||
translate([0,0,Height/2-4]) {
|
||||
minkowski() {
|
||||
difference() {
|
||||
plate(3,1);
|
||||
translate([0,0,-1])plate(3.1,4);
|
||||
}
|
||||
sphere(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
phone(Bits=1);
|
||||
//translate([0,-50,-50])cube([100,100,100]);
|
||||
}
|
||||
|
||||
/*
|
||||
translate([0,0,Height/2-4]) {
|
||||
minkowski() {
|
||||
difference() {
|
||||
plate(3,1);
|
||||
translate([0,0,-1])plate(3.1,4);
|
||||
}
|
||||
sphere(2);
|
||||
}
|
||||
}
|
||||
|
||||
minkowski() {
|
||||
difference() {
|
||||
cube([Length+0.2, Width+0.2, 0.2], true);
|
||||
cube([Length, Width, 4], true);
|
||||
}
|
||||
sphere(d=3);
|
||||
}
|
||||
*/
|
5
dimensions.scad
Normal file
5
dimensions.scad
Normal file
@@ -0,0 +1,5 @@
|
||||
Length=160.5;
|
||||
Width=76.6;
|
||||
Height=9.2;
|
||||
|
||||
|
11
fillet.scad
Normal file
11
fillet.scad
Normal file
@@ -0,0 +1,11 @@
|
||||
include <dimensions.scad>
|
||||
|
||||
$fn=50;
|
||||
|
||||
minkowski() {
|
||||
difference() {
|
||||
cube([Length+0.2, Width+0.2, 0.2], true);
|
||||
cube([Length, Width, 4], true);
|
||||
}
|
||||
sphere(d=3);
|
||||
}
|
26
phone.scad
Normal file
26
phone.scad
Normal file
@@ -0,0 +1,26 @@
|
||||
include <dimensions.scad>
|
||||
use <bits.scad>
|
||||
|
||||
$fn=50;
|
||||
|
||||
module phone (Pad=0, Bits=0)
|
||||
{
|
||||
minkowski() {
|
||||
cube([Length-Height+0.2, Width-Height+0.2, 0.2], true);
|
||||
sphere(d=(Height-0.2)+Pad);
|
||||
}
|
||||
if(Bits != 0) {
|
||||
// add holes for buttons and other things
|
||||
translate([-50,Width/2+4,0]) rotate([90,0,0]) Volume();
|
||||
translate([-25,Width/2+4,0]) rotate([90,0,0]) Power();
|
||||
translate([-70,-17,-Height/2-4]) Camera();
|
||||
translate([70,0,-Height/2-4]) Speaker();
|
||||
translate([Length/2,0,0]) rotate([0,90,0]) Usb();
|
||||
translate([Length/2,20,0]) rotate([0,90,0]) Microphone();
|
||||
}
|
||||
}
|
||||
|
||||
//%cube([Length, Width, Height], true);
|
||||
phone(Bits=1);
|
||||
%phone(4);
|
||||
|
Reference in New Issue
Block a user