207 lines
No EOL
4.6 KiB
OpenSCAD
207 lines
No EOL
4.6 KiB
OpenSCAD
//*******************************************************************************************************
|
|
//
|
|
// Universal parametic rugged Box
|
|
//
|
|
// 2023 by Rainer Backes
|
|
//
|
|
// based on ideas of yanew and Whity
|
|
//
|
|
//*******************************************************************************************************
|
|
|
|
|
|
/* [View] */
|
|
// Select View
|
|
View="Bottom"; // [Complete, Complete Open, Parts, Lid, Bottom, Latch, Seal ]
|
|
// Open Angle for complete Open
|
|
ViewAngle = 120; //[0:180]
|
|
|
|
/* [General] */
|
|
|
|
// Depth of Inner Box (available space)
|
|
InnerBoxDepth = 80;
|
|
// Width of Inner Box (available space)
|
|
InnerBoxWidth= 200;
|
|
// Hight of bottom part of Inner Box (available space) >= 16
|
|
InnerBoxBottomHeight = 33.5;
|
|
// Hight of top part of Inner Box (available space)
|
|
InnerBoxLidHeight=8;
|
|
// Cornet Radius of Inner Box (vertical)
|
|
InnerCornerRadius=3;
|
|
// Chamfer of inner Box (horizontal)
|
|
InnerChamferSize=1.5;
|
|
|
|
// Length of Screw
|
|
ScrewLength=30;
|
|
// Diameter of Screw
|
|
ScrewDiameter=3;
|
|
// Tolerance for Latch holes
|
|
ScrewTol = 0.4;
|
|
|
|
ScrewThreadDiameter=ScrewDiameter-0.15;
|
|
// Wall Thickness
|
|
WallThickness=2.4;
|
|
// Number of Hinges(1-3)
|
|
NumHinge=2;
|
|
// Number of Latches (1-3)
|
|
NumLatch=2;
|
|
// Additional Height for TPU-Seal
|
|
TSealHeight = 0;
|
|
// Apply Interior to Lid
|
|
InteriorToLid=false;
|
|
|
|
|
|
|
|
|
|
/* [Hinges] */
|
|
// Offset of Hinge and Latchs to inner side corner
|
|
HingeLatchOffset = 12;
|
|
|
|
HingeWidthTolerance=0.25;
|
|
|
|
// With of Front and Back Ribs
|
|
HingeLatchRibWidth=3.2;
|
|
|
|
HingeOuterDiameter=6.8;
|
|
HingeOuterExtend=3;
|
|
HingeBottomLength=HingeLatchRibWidth+HingeOuterExtend;
|
|
HingeLidLength=ScrewLength-2*HingeBottomLength-HingeWidthTolerance;
|
|
|
|
/* [Side Ribs] */
|
|
// Number of Side rib Pairs
|
|
NumRibs=1;
|
|
// if more than 1 Side Rib Pair, distance of Ribs to the inner corner
|
|
RibOffset=18;
|
|
// Width of Ribs
|
|
RibWidth=5;
|
|
// Distance between Ribs
|
|
RibDist=20;
|
|
|
|
|
|
/* [Latches] */
|
|
// Distance of the screws making the Latch
|
|
LatchDistance=16;
|
|
// Latch Displacement downwards
|
|
LatchDisplacement = 2;
|
|
|
|
LatchWidthTolerance=0.4;
|
|
BoxLatchRibChamfer=17;
|
|
LidLatchRibChamfer=13;
|
|
|
|
|
|
// Latch: Radius of the rounding
|
|
LatchRoundRad= 15;
|
|
// Latch Wall thickness
|
|
LatchWall=3;
|
|
// Length of the Latch Handle
|
|
LatchHandleLen= 11;
|
|
// Ofset of Handle from vertical
|
|
LatchHandleOfs=4;
|
|
|
|
|
|
/* [Seal] */
|
|
// Height of Seal
|
|
SealHeight=1.4;
|
|
// Height of Lid protion, if TPUSeal > 0
|
|
TSealLid = 0.5;
|
|
// Tolerance for the TPU-Seal ( 1 layer )
|
|
TSealTol = 0.2;
|
|
|
|
SealWall=WallThickness/2;
|
|
// Additional wall tickness of box for seal
|
|
SealThick=1.9;
|
|
// Toleance
|
|
SealTol=0.2;
|
|
// Chanfer Angle for Seal-Support
|
|
SealCAng=70;
|
|
// Heigth of Seal support
|
|
SealBHeigh=8;
|
|
|
|
/* [Interior] */
|
|
// default Width of interior Walls
|
|
iWall = 1;
|
|
|
|
lighterLength = 181;
|
|
lighterDia = 24;
|
|
|
|
fingerIndentSize = 18;
|
|
|
|
grinderHeight = 36.5+2;
|
|
grinderDia = 49.5+1;
|
|
|
|
module fingerIndent(){
|
|
color("red"){
|
|
hull()translate([0,0,-8]){
|
|
sphere(d=fingerIndentSize);
|
|
translate([0,0,fingerIndentSize/2])
|
|
cylinder(d=fingerIndentSize, center=true);
|
|
}
|
|
}
|
|
}
|
|
module cutout(){
|
|
translate([0,20,-12.5])
|
|
hull(){
|
|
rotate([0,90,0])
|
|
cylinder(h=lighterLength,d=lighterDia,center=true);
|
|
translate([0,0,12])
|
|
cube([lighterLength,lighterDia,1],center=true);
|
|
}
|
|
|
|
translate([65,-20,grinderHeight/-2+5])
|
|
cylinder(h=grinderHeight,d=grinderDia,center=true);
|
|
|
|
hull(){
|
|
translate([30,0,38/-2+2.5])
|
|
cylinder(h=38-5,d=10,center=true);
|
|
translate([30,-38,38/-2+2.5])
|
|
cylinder(h=38-5,d=10,center=true);
|
|
translate([-86,0,38/-2+2.5])
|
|
cylinder(h=38-5,d=10,center=true);
|
|
translate([-86,-38,38/-2+2.5])
|
|
cylinder(h=38-5,d=10,center=true);
|
|
}
|
|
|
|
|
|
translate([lighterLength/2,20,0])fingerIndent();
|
|
translate([lighterLength/-2,20,0])fingerIndent();
|
|
hull(){
|
|
translate([lighterLength/2-52+5,-19,0])fingerIndent();
|
|
translate([lighterLength/2-52-5,-19,0])fingerIndent();
|
|
}
|
|
}
|
|
|
|
// Interior definition, everything here get masked an added to the interior of bottom and optional lid
|
|
module Interior (){
|
|
difference(){
|
|
cube([InnerBoxDepth,InnerBoxWidth,InnerBoxBottomHeight-3]);
|
|
translate([40,200/2,0])
|
|
rotate([0,0,180+90])
|
|
translate([0,5,33+2])
|
|
cutout();
|
|
}
|
|
|
|
}
|
|
|
|
// evertything here gets substracted (difference() ) from the lid
|
|
module liddiff () {
|
|
|
|
}
|
|
|
|
// evertything here gets added to the lid
|
|
module lidadd () {
|
|
|
|
}
|
|
|
|
// evertything here gets substracted (difference() ) from the bottom
|
|
module bottomdiff () {
|
|
|
|
|
|
}
|
|
|
|
// evertything here gets added to the bottom
|
|
|
|
module bottomadd () {
|
|
|
|
}
|
|
|
|
|
|
include <lib/openscad-parametric-boxes/rugbox.scad> |