Files
phone-case/bits.scad

68 lines
1.3 KiB
OpenSCAD

include <dimensions.scad>
use <primitives.scad>
module Volume_(Depth)
{
cube([Depth, VolumeLength, VolumeHeight], center=false);
}
module Volume(Depth)
{
translate([BodyWidth, VolumeMinY, VolumeMinZ])Volume_(Depth);
}
module Power_(Depth)
{
cube([Depth, PowerLength, PowerHeight], center=false);
}
module Power(Depth)
{
translate([BodyWidth, PowerMinY, PowerMinZ])Power_(Depth);
}
module Camera_(Depth, Box=false, Tol=0.01)
{
if (Box) {
cube([CameraWidth, CameraLength, Depth], center=false);
} else {
minkowski() {
cube([CameraWidth-CameraLength+Tol, Tol, Depth-Tol], center=false);
cylinderZ(d=CameraLength-Tol, h=Tol, center=false);
}
}
}
module Camera(Depth, Box=false)
{
translate([CameraMinX, CameraMinY, BodyHeight])Camera_(Depth, Box=Box);
}
module Usb_(Depth)
{
cube([UsbWidth, Depth, UsbHeight], center=false);
}
module Usb(Depth)
{
translate([BodyWidth/2 - UsbWidth/2, BodyLength-Depth, UsbMinZ])Usb_(Depth);
}
module Aux_(Depth)
{
cylinderY(d=3.5, h=Depth, center=false);
}
module Aux(Depth)
{
translate([AuxMinX, 0, AuxMinZ])Aux_(Depth);
}
// 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);
// }
// }