commit 6cdf0fafc385e8426998954ebd47613ddc8a69d2 Author: Matthew Baggett Date: Wed Jul 31 11:07:06 2024 +0200 Initial commit mirroring the upstream project that isn't on github, plus a submodule for BOSL2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a09c56d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/.idea diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..95520a5 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "BOSL2"] + path = BOSL2 + url = https://code.techinc.nl/grey/BOSL2.git diff --git a/648172-universal-parametric-rugged-box-bd1d07ac-ffea-462e-8433-48ceeac1f1de.pdf b/648172-universal-parametric-rugged-box-bd1d07ac-ffea-462e-8433-48ceeac1f1de.pdf new file mode 100644 index 0000000..df74a83 Binary files /dev/null and b/648172-universal-parametric-rugged-box-bd1d07ac-ffea-462e-8433-48ceeac1f1de.pdf differ diff --git a/BOSL2 b/BOSL2 new file mode 160000 index 0000000..736fad3 --- /dev/null +++ b/BOSL2 @@ -0,0 +1 @@ +Subproject commit 736fad321bcfd7c9fc96fb98c71d1b9fc6706865 diff --git a/README.md b/README.md new file mode 100644 index 0000000..2628cd5 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +OpenSCAD Parametric Rugged Boxes +================================ + +This wasn't on github so I mirrored it here + +From: https://www.printables.com/de/model/648172-universal-parametric-rugged-box./files \ No newline at end of file diff --git a/defaultbox-parts.stl b/defaultbox-parts.stl new file mode 100644 index 0000000..55cb015 Binary files /dev/null and b/defaultbox-parts.stl differ diff --git a/defaultbox.scad b/defaultbox.scad new file mode 100644 index 0000000..0598645 --- /dev/null +++ b/defaultbox.scad @@ -0,0 +1,157 @@ +//******************************************************************************************************* +// +// Universal parametic rugged Box +// +// 2023 by Rainer Backes +// +// based on ideas of yanew and Whity +// +//******************************************************************************************************* + + +/* [View] */ +// Select View +View="Complete Open"; // [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 = 70; +// Width of Inner Box (available space) +InnerBoxWidth= 120; +// Hight of bottom part of Inner Box (available space) >= 16 +InnerBoxBottomHeight = 30; +// Hight of top part of Inner Box (available space) +InnerBoxLidHeight=20; +// 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=1; +// Number of Latches (1-3) +NumLatch=1; +// Additional Height for TPU-Seal +TSealHeight = 0; +// Apply Interior to Lid +InteriorToLid=true; + + + + +/* [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; + + + + +// Interior definition, everything here get masked an added to the interior of bottom and optional lid +module Interior (){ +// wwall(40,0,100,50); +// dwall(0,30,100,90); + +} + +// 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 \ No newline at end of file diff --git a/rugbox.scad b/rugbox.scad new file mode 100644 index 0000000..dc718bb --- /dev/null +++ b/rugbox.scad @@ -0,0 +1,554 @@ +//******************************************************************************************************* +// +// Universal parametic rugged Box +// +// 2023 by Rainer Backes +// +// based on ideas of yanew and Whity +// +//******************************************************************************************************* + +RDist = (NumLatch>1) ? ScrewLength : RibDist ; + +include +include + + + +/* [Hidden] */ +eps = 0.001; // small number, to keep scad happy + + +res= $preview ? 32 : 128; +$fn=res; + + +OBoxDepth=InnerBoxDepth+2*WallThickness; +OBoxWidth=InnerBoxWidth+2*WallThickness; +OCornerRadius=InnerCornerRadius+WallThickness; +OChamferSize=InnerChamferSize+WallThickness; +OBoxHeight=InnerBoxBottomHeight+WallThickness; +OLidHeight=InnerBoxLidHeight+WallThickness; + + +ldist=InnerBoxWidth/2-HingeLatchOffset-ScrewLength/2; // Offset of middle of Latch and Ribs from 0 +ldepth=2*WallThickness+HingeOuterDiameter; + + + +module rechteck(xx=20,yy=40) { + translate([xx/2,yy/2,0]) children(); + translate([-xx/2,yy/2,0]) children(); + translate([xx/2,-yy/2,0]) children(); + translate([-xx/2,-yy/2,0]) children(); +} + + +module Box(Depth=20,Width=30,Heigth=10,CornerRadius=1,ChamferSize=1,CAngle=45) { + +hull(){ +rechteck(Depth-2*CornerRadius,Width-2*CornerRadius) + cyl(r=CornerRadius,h=Heigth,chamfer1=ChamferSize,chamfang=CAngle,anchor=BOTTOM); +} +} +module BottomHinge( ofs = 0, diaB = 2, diaS = 1.75 ) { + + translate([OBoxDepth/2,ofs-ScrewLength/2+HingeBottomLength,OBoxHeight]) + knuckle_hinge( length=HingeBottomLength*2, + segs=2, + offset=SealThick+HingeOuterDiameter/2, + arm_height=1.5, + arm_angle=50, + gap=0, + pin_diam=(ofs > 0 ) ? diaB : diaS, + knuckle_diam=HingeOuterDiameter, + round_bot=1.5, + orient=RIGHT, + spin=90); + translate([OBoxDepth/2,ofs+ScrewLength/2,OBoxHeight]) + knuckle_hinge( length=HingeBottomLength*2, + segs=2, + offset=SealThick+HingeOuterDiameter/2, + arm_height=1.5, + arm_angle=50, + gap=0, + pin_diam=(ofs > 0 ) ? diaS : diaB, + knuckle_diam=HingeOuterDiameter, + round_bot=1.5, + orient=RIGHT, + spin=90); +} + +module LidHinge ( ofs= 0 ) { + if (InnerBoxLidHeight >= 18 ) { + translate([OBoxDepth/2, ofs + HingeLidLength/2,OLidHeight]) + knuckle_hinge( length=HingeLidLength*2, + segs=2, + offset=SealThick+HingeOuterDiameter/2, + arm_height=ScrewDiameter/2, + arm_angle=50, + gap=0, + pin_diam=ScrewDiameter+ScrewTol, + knuckle_diam=HingeOuterDiameter, + round_bot=1.4, + orient=RIGHT, + spin=90); + } + else if (InnerBoxLidHeight >= 12) { + translate([OBoxDepth/2, ofs + HingeLidLength/2,OLidHeight]) + knuckle_hinge( length=HingeLidLength*2, + segs=2, + offset=SealThick+HingeOuterDiameter/2, + arm_height=ScrewDiameter/2, + arm_angle=50, + gap=0, + pin_diam=ScrewDiameter+ScrewTol, + knuckle_diam=HingeOuterDiameter, + orient=RIGHT, + spin=90); + + } + else + { + translate([OBoxDepth/2, ofs + HingeLidLength/2,OLidHeight]) + knuckle_hinge( length=HingeLidLength*2, + segs=2, + offset=SealThick+HingeOuterDiameter/2, + arm_height=ScrewDiameter/2, + arm_angle=60, + gap=0, + pin_diam=ScrewDiameter+ScrewTol, + knuckle_diam=HingeOuterDiameter, + orient=RIGHT, + spin=90); + } + + +} + +module LatchHold ( ofs = 0, dia = 3, cham = 10, h = 20, displace = 0, isLid = false ) { + ledges = [[0,0,0,0], + [1,0,1,0], + [0,0,0,0]]; + bedges = [[0,0,0,0], + [1,0,0,0], + [0,0,0,0]]; + bc = (cham TSealTol ) { + difference() { + cuboid([OBoxDepth+2*SealThick+e,OBoxWidth+2*SealThick+e,h1], rounding=OCornerRadius+SealThick, edges="Z", anchor=BOTTOM ); + translate([0,0,-1]) cuboid ([InnerBoxDepth,InnerBoxWidth,h1+3] , rounding= InnerCornerRadius, edges="Z", anchor=BOTTOM ); + } + } + seal( h1+h2, tol ); +} + +module Bottom() { + difference() { + union() { +// Main Body + Box(OBoxDepth,OBoxWidth,OBoxHeight,OCornerRadius,OChamferSize); + translate([0,0,OBoxHeight-SealBHeigh]) + Box(OBoxDepth+2*SealThick,OBoxWidth+2*SealThick,SealBHeigh,OCornerRadius+SealThick,SealThick,SealCAng); + +// large Ribs + if (NumRibs == 1 ) { + SideRib (0,OBoxHeight); + } else if (NumRibs == 2 ) { + SideRib(OBoxDepth/4,OBoxHeight); + SideRib(-OBoxDepth/4,OBoxHeight); + } else { + SideRib (0,OBoxHeight); + SideRib(OBoxDepth/3,OBoxHeight); + SideRib(-OBoxDepth/3,OBoxHeight); + + } + +// small Ribs for Hinges and Latch + if (NumHinge % 2 == 1) { + FBRib ( 0, OBoxHeight ); + } + if (NumHinge >= 2) { + FBRib ( ldist, OBoxHeight ); + FBRib ( -ldist, OBoxHeight ); + } + +// Hinge + if (NumHinge % 2 == 1) { + BottomHinge( ofs = 0, diaB = ScrewDiameter, diaS= ScrewThreadDiameter ); + } + if (NumHinge >= 2) { + + BottomHinge( ofs = ldist, diaB = ScrewDiameter, diaS= ScrewThreadDiameter ); + BottomHinge( ofs = -ldist, diaB = ScrewDiameter, diaS= ScrewThreadDiameter ); + } + +// Latch + if (NumLatch %2 == 1) { + LatchHold ( ofs = 0, dia = ScrewDiameter, cham = BoxLatchRibChamfer, h = OBoxHeight, displace=-LatchDisplacement ); + } + if (NumLatch >= 2) { + LatchHold ( ofs = ldist, dia = ScrewDiameter, cham = BoxLatchRibChamfer, h = OBoxHeight,displace=-LatchDisplacement ); + LatchHold ( ofs = -ldist, dia = ScrewDiameter, cham = BoxLatchRibChamfer, h = OBoxHeight,displace=-LatchDisplacement ); + } + } + +// subtract interior + + translate([0,0,WallThickness]) Box(InnerBoxDepth,InnerBoxWidth,InnerBoxBottomHeight+1,InnerCornerRadius,InnerChamferSize); + + if (TSealHeight > 0) { + translate([0,0,OBoxHeight+1]) rotate([180,0,0]) tpuseal ( h1=TSealHeight+1, h2=SealHeight+TSealLid+SealTol, tol=SealTol,e=eps ); + } + else { + + translate([0,0,OBoxHeight-SealHeight]) seal ( h= SealHeight+1, tol=0 ); //SealTol); + } + bottomdiff() ; + + } + // Interior + translate([0,0,WallThickness]) + intersection() { + Box(InnerBoxDepth,InnerBoxWidth,InnerBoxBottomHeight+1,InnerCornerRadius,InnerChamferSize); + translate([-InnerBoxDepth/2,-InnerBoxWidth/2,0]) children(); + } + + bottomadd(); +} + + +module Lid() { + difference() { + union() { + Box(OBoxDepth,OBoxWidth,OLidHeight,OCornerRadius,OChamferSize); + translate([0,0,OLidHeight-SealBHeigh]) + Box(OBoxDepth+2*SealThick,OBoxWidth+2*SealThick,SealBHeigh,OCornerRadius+SealThick,SealThick,SealCAng); + + // large Ribs (Side) + if (NumRibs == 1 ) { + SideRib (0,OLidHeight); + } else if (NumRibs == 2 ) { + SideRib(OBoxDepth/4,OLidHeight); + SideRib(-OBoxDepth/4,OLidHeight); + } else { + SideRib (0,OLidHeight); + SideRib(OBoxDepth/3,OLidHeight); + SideRib(-OBoxDepth/3,OLidHeight); + + } + + // small Ribs for Hinges and Latch + if (NumHinge % 2 == 1) { + FBRib ( 0, OLidHeight ); + } + if (NumHinge >= 2) { + FBRib ( ldist, OLidHeight ); + FBRib ( -ldist, OLidHeight ); + } + // Hinge + if (NumHinge %2 == 1 ) { + LidHinge(0); + } + if (NumHinge >= 2 ) { + LidHinge(ldist); + LidHinge(-ldist); + } + + // Latch + if (NumLatch %2 == 1) { + LatchHold ( ofs = 0, dia = ScrewDiameter, cham = LidLatchRibChamfer, h = OLidHeight, displace=LatchDisplacement, isLid = true ); + } + if (NumLatch >= 2) { + LatchHold ( ofs = ldist, dia = ScrewDiameter, cham = LidLatchRibChamfer, h = OLidHeight, displace=LatchDisplacement, isLid = true ); + LatchHold ( ofs = -ldist, dia = ScrewDiameter, cham = LidLatchRibChamfer, h = OLidHeight, displace=LatchDisplacement, isLid = true ); + } + + + } // union + translate([0,0,WallThickness]) Box(InnerBoxDepth,InnerBoxWidth,InnerBoxLidHeight+1,InnerCornerRadius,InnerChamferSize); + translate([0,0,OLidHeight]) cuboid ([OBoxDepth+2*SealThick,OBoxWidth+2*SealThick,10],rounding=OCornerRadius, edges="Z", anchor=BOTTOM); + if (NumLatch %2 == 1) { + LatchMask ( ofs = 0, dia = ScrewDiameter, cham = LidLatchRibChamfer, h = OLidHeight, displace=LatchDisplacement, isLid = true ); + } + if (NumLatch >= 2) { + LatchMask ( ofs = ldist, dia = ScrewDiameter, cham = LidLatchRibChamfer, h = OLidHeight, displace=LatchDisplacement, isLid = true ); + LatchMask ( ofs = -ldist, dia = ScrewDiameter, cham = LidLatchRibChamfer, h = OLidHeight, displace=LatchDisplacement, isLid = true ); + } + liddiff(); + + } + // Seal + + if (TSealHeight > 0) { + translate([0,0,OLidHeight-SealTol]) seal ( h= TSealLid+SealTol, tol=-4*SealTol); + } + else { + translate([0,0,OLidHeight-SealTol]) seal ( h= SealHeight, tol=-SealTol); + } + + if (InteriorToLid) { + translate([0,0,WallThickness]) + intersection() { + Box(InnerBoxDepth,InnerBoxWidth,InnerBoxLidHeight,InnerCornerRadius,InnerChamferSize); + scale([1,1,InnerBoxLidHeight/InnerBoxBottomHeight]) + translate([-InnerBoxDepth/2,-InnerBoxWidth/2,0]) + translate([0,InnerBoxWidth,0]) mirror([0,1,0]) children(); + } + } + lidadd(); + +} + +module Latch () { + lh = ScrewLength - 2 * HingeLatchRibWidth - LatchWidthTolerance; + + difference() { + union() { + zcyl(d=HingeOuterDiameter, h = lh, anchor=BOTTOM); + translate([LatchDistance,0,0] ) zcyl(d=HingeOuterDiameter, h= lh, anchor=BOTTOM ); + + pang=asin((LatchDistance/2) / (LatchRoundRad + LatchWall) )*2; + translate([LatchDistance/2,LatchRoundRad-ScrewDiameter/4,0]) + difference() { + rotate([0,0,-90-pang/2]) pie_slice (ang=pang, l=lh, r=LatchRoundRad+LatchWall); + rotate([0,0,-90-pang/2 - 2]) translate([0,0,-1]) pie_slice (ang=pang+10, l=lh+2, r=LatchRoundRad); + } + hull() { + translate([LatchDistance,0,0] ) zcyl(d=LatchWall, h= lh, anchor=BOTTOM ); + translate([LatchDistance+LatchHandleLen,-LatchHandleOfs,0] ) zcyl(d=LatchWall, h= lh, anchor=BOTTOM ); + } + } + translate([0,0,-1]) { + zcyl(d=ScrewDiameter+ScrewTol, h = lh+2, anchor=BOTTOM); + translate([LatchDistance,0,0] ) zcyl(d=ScrewDiameter, h= lh+2, anchor=BOTTOM ); + translate([LatchDistance+ScrewDiameter/3,0,0] ) cuboid([HingeOuterDiameter,HingeOuterDiameter,lh+2],anchor=BOTTOM+RIGHT+FRONT ); + + } + } + + +} + +// Wall in Wide (Y) direction +module wwall (startx=0, starty=0, len=100, hi=100, thick=iWall ) { + translate([startx/100*InnerBoxDepth,starty/100*InnerBoxWidth,0]) + cuboid([thick,len/100*InnerBoxWidth,hi/100*InnerBoxBottomHeight],anchor=BOTTOM+FRONT); + + +} + +// Wall in Depth (X) direction +module dwall (startx=0, starty=0, len=100, hi=100, thick=iWall ) { + translate([startx/100*InnerBoxDepth,starty/100*InnerBoxWidth,0]) + cuboid([len/100*InnerBoxDepth,thick,hi/100*InnerBoxBottomHeight],anchor=BOTTOM+LEFT); + + +} + + + +module complete() { +Bottom() Interior(); +if (TSealHeight > 0) { + translate([0,0,OBoxHeight]) color("Black") rotate([180,0,0]) tpuseal ( h1=TSealHeight+TSealTol, h2=SealHeight+TSealLid+TSealTol, tol=0, e= 0 ); +} + +translate([0,0,OLidHeight+OBoxHeight]) rotate([180,0,0]) { + Lid() Interior(); + if (NumLatch %2 == 1) { + translate([-OBoxDepth/2-2*SealThick-ScrewDiameter/2, -(ScrewLength - 2 * HingeLatchRibWidth - LatchWidthTolerance)/2,OLidHeight-LatchDistance/2+LatchDisplacement ]) + color("Grey") rotate([-90,-90,0]) Latch(); + } + if (NumLatch >= 2) { + translate([-OBoxDepth/2-2*SealThick-ScrewDiameter/2, ldist-(ScrewLength - 2 * HingeLatchRibWidth - LatchWidthTolerance)/2,OLidHeight-LatchDistance/2+LatchDisplacement ]) + color("Grey") rotate([-90,-90,0]) Latch(); + translate([-OBoxDepth/2-2*SealThick-ScrewDiameter/2, -ldist-(ScrewLength - 2 * HingeLatchRibWidth - LatchWidthTolerance)/2,OLidHeight-LatchDistance/2+LatchDisplacement ]) + color("Grey") rotate([-90,-90,0]) Latch(); + + } + + + + + + } +} +module completeOpen() { + Bottom() Interior(); + if (TSealHeight > 0) { + translate([0,0,OBoxHeight]) color("Black") rotate([180,0,0]) tpuseal ( h1=TSealHeight+TSealTol, h2=SealHeight+TSealLid+TSealTol, tol=0, e= 0 ); + } + +translate([OBoxDepth/2+SealHeight+HingeOuterDiameter/2,0,OBoxHeight]) + rotate([0,ViewAngle,0]) + translate([-OBoxDepth/2-SealThick-HingeOuterDiameter/2,0,OLidHeight]) + rotate([180,0,0]) { + Lid() Interior(); + if (NumLatch %2 == 1) { + translate([-OBoxDepth/2-2*SealThick-ScrewDiameter/2, -(ScrewLength - 2 * HingeLatchRibWidth - LatchWidthTolerance)/2,OLidHeight-LatchDistance/2+LatchDisplacement ]) + color("Grey") rotate([-90,-90,0]) Latch(); + } + if (NumLatch >= 2) { + translate([-OBoxDepth/2-2*SealThick-ScrewDiameter/2, ldist-(ScrewLength - 2 * HingeLatchRibWidth - LatchWidthTolerance)/2,OLidHeight-LatchDistance/2+LatchDisplacement ]) + color("Grey") rotate([-90,-90,0]) Latch(); + translate([-OBoxDepth/2-2*SealThick-ScrewDiameter/2, -ldist-(ScrewLength - 2 * HingeLatchRibWidth - LatchWidthTolerance)/2,OLidHeight-LatchDistance/2+LatchDisplacement ]) + color("Grey") rotate([-90,-90,0]) Latch(); + + } + + + + + + } +} + +module parts () { + Bottom() Interior(); + translate ([OBoxDepth+30, 0, 0]) Lid() Interior(); + translate ([OBoxDepth+30, OBoxWidth+30, 0]) tpuseal ( h1=TSealHeight+TSealTol, h2=SealHeight+TSealLid+TSealTol, tol=0, e= 0 ); + translate ([0,OBoxWidth+30, 0]){ + if (NumLatch %2 == 1) Latch(); + if (NumLatch >= 2) { + translate([0,-20,0]) Latch(); + translate([0,20,0]) Latch(); + } + } + + +} + + + + +if ( View=="Complete Open") { +completeOpen(); +} +else if ( View=="Complete"){ +complete(); +} +else if ( View=="Parts"){ +parts(); +} +else if ( View=="Lid"){ +Lid() { Interior(); } +} +else if ( View=="Bottom") { +Bottom() { Interior(); } +} +else if ( View=="Latch") { +Latch(); +} +else if ( View=="Seal") { +tpuseal ( h1=TSealHeight+TSealTol, h2=SealHeight+TSealLid+TSealTol, tol=0, e= 0 ); +} diff --git a/wagobox-parts.stl b/wagobox-parts.stl new file mode 100644 index 0000000..e708749 Binary files /dev/null and b/wagobox-parts.stl differ diff --git a/wagobox.scad b/wagobox.scad new file mode 100644 index 0000000..db9f7e8 --- /dev/null +++ b/wagobox.scad @@ -0,0 +1,164 @@ +//******************************************************************************************************* +// +// Universal parametic rugged Box +// +// 2023 by Rainer Backes +// +// based on ideas of yanew and Whity +// +//******************************************************************************************************* + + +/* [View] */ +// Select View +View="Complete Open"; // [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 = 100; +// Width of Inner Box (available space) +InnerBoxWidth= 180; +// Hight of bottom part of Inner Box (available space) >= 16 +InnerBoxBottomHeight = 35; +// Hight of top part of Inner Box (available space) +InnerBoxLidHeight=10; +// Cornet Radius of Inner Box (vertical) +InnerCornerRadius=3; +// Chamfer of inner Box (horizontal) +InnerChamferSize=1.5; + +// Length of Screw +ScrewLength=25; +// 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=true; + + + + +/* [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 = 4; + +LatchWidthTolerance=0.4; +BoxLatchRibChamfer=17; +LidLatchRibChamfer=10; + + +// 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; + + +/* +// Wall in Wide (Y) direction +module wwall (startx=0, starty=0, len=100, hi=100, thick=iWall ) + +// Wall in Depth (X) direction +module dwall (startx=0, starty=0, len=100, hi=100, thick=iWall ) { + + +*/ + + +// Interior definition, everything here get masked an added to the interior of bottom and optional lid +module Interior (){ + dwall(0,33,100,100); + dwall(0,67,100,100); + + wwall(50,33,34,100); + +} + +// 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 \ No newline at end of file diff --git a/zbox-parts.stl b/zbox-parts.stl new file mode 100644 index 0000000..776d239 Binary files /dev/null and b/zbox-parts.stl differ diff --git a/zbox.scad b/zbox.scad new file mode 100644 index 0000000..6f08da9 --- /dev/null +++ b/zbox.scad @@ -0,0 +1,151 @@ +//******************************************************************************************************* +// +// Universal parametic rugged Box +// +// 2023 by Rainer Backes +// +// based on ideas of yanew and Whity +// +//******************************************************************************************************* + + +/* [View] */ +// Select View +View="Complete Open"; // [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 = 25; +// Width of Inner Box (available space) +InnerBoxWidth= 57; +// Hight of bottom part of Inner Box (available space) >= 16 +InnerBoxBottomHeight = 80; +// Hight of top part of Inner Box (available space) +InnerBoxLidHeight=10; +// Cornet Radius of Inner Box (vertical) +InnerCornerRadius=3; +// Chamfer of inner Box (horizontal) +InnerChamferSize=1.5; + +// Length of Screw +ScrewLength=20; +// 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=1; +// Number of Latches (1-3) +NumLatch=1; +// Additional Height for TPU-Seal +TSealHeight = 1; +// Apply Interior to Lid +InteriorToLid=true; + + + + +/* [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=2; +HingeBottomLength=HingeLatchRibWidth+HingeOuterExtend; +HingeLidLength=ScrewLength-2*HingeBottomLength-HingeWidthTolerance; + +/* [Side Ribs] */ +// Number of Side rib Pairs +NumRibs=2; +// if more than 1 Side Rib Pair, distance of Ribs to the inner corner +RibOffset=18; +// Width of Ribs +RibWidth=3; +// Distance between Ribs +RibDist=20; + + +/* [Latches] */ +// Distance of the screws making the Latch +LatchDistance=16; +// Latch Displacement downwards +LatchDisplacement = 4; + +LatchWidthTolerance=0.4; +BoxLatchRibChamfer=17; +LidLatchRibChamfer=10; + + +// 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; + + +// Interior definition, everything here get masked an added to the interior of bottom and optional lid +module Interior (){ +// wwall(40,0,100,50); +// dwall(0,30,100,90); + +} + +// 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 \ No newline at end of file