OpenSCAD source code: Calibration boxes for extruder tuning and platform alignment
// Simple calibration boxes | |
// Thin wall open box - verify Extrusion Multiplier | |
// Solid box - verify infill settings | |
// Ed Nisley - KE4ZNU | |
// http://softsolder.com/ | |
Layout = "Open"; // Open Solid | |
Texting = ""; // text message on solid box or empty string to suppress | |
//------- | |
//- Extrusion parameters must match reality! | |
ThreadThick = 0.25; | |
ThreadWidth = 0.40; | |
Protrusion = 0.1; // make holes end cleanly | |
function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit); | |
//------- | |
// Dimensions | |
WallThick = 3.0 * ThreadWidth; | |
echo(str("Wall thickness: ",WallThick)); | |
BoxSize = 40.0; | |
echo(str("Overall size: ",BoxSize)); | |
NominalHeight = 3.0; | |
echo(str("Nominal height: ",NominalHeight)); | |
Height = IntegerMultiple(NominalHeight,ThreadThick); | |
echo(str("Actual height: ",Height)); | |
Rotation = 0; // 45 to exercise X and Y axis motors at same time | |
CornerRadius = max(2.0, 2.0 + WallThick); | |
CornerSides = 8*4; | |
//-------- | |
module Solid() { | |
difference() { | |
hull() | |
for (i=[-1,1], j=[-1,1]) | |
translate([i*(BoxSize - 2*CornerRadius)/2,j*(BoxSize - 2*CornerRadius)/2,0]) | |
cylinder(r=CornerRadius,h=Height,$fn=CornerSides); | |
if (len(Texting)) | |
translate([0,0,-Protrusion/2]) | |
linear_extrude(height=3*ThreadThick + Protrusion) | |
mirror([1,0,0]) | |
text(text=Texting,size=6,spacing=1.05,font="ITC Zapf Chancery:style=Italic",halign="center",valign="center"); | |
} | |
} | |
module Thinwall() { | |
difference() { | |
Solid(); | |
hull() | |
for (i=[-1,1], j=[-1,1]) | |
translate([i*(BoxSize - 2*CornerRadius)/2,j*(BoxSize - 2*CornerRadius)/2,-Protrusion]) | |
cylinder(r=(CornerRadius - WallThick),h=(Height + 2*Protrusion),$fn=CornerSides); | |
} | |
} | |
//------- | |
rotate(Rotation) | |
if (Layout == "Open") | |
Thinwall(); | |
else | |
Solid(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
More detail on my blog at https://wp.me/poZKh-7le