Download or view pumpHolder.frink in plain text format
/** This designs a pump holder for my sous vide controller for 3-D
printing. */
width = 1 inch
height = .4 inch
depth = .5 inch
potInnerRadius = 23.4 cm / 2
thickness = 3.4 mm
potOuterRadius = potInnerRadius + thickness
cutDepth = .3 in
res = 254 / inch
v = newJava["frink.graphics.VoxelArray", [round[-width res/2], round[width res], round[-depth res/2], round[depth res], 0, round[height res], true]]
// The outer surface of the cut cylinder
c1 = newJava["frink.graphics.VoxelArray", [round[-width res/2], round[width res], round[-depth res/2], round[depth res], 0, round[height res], false]]
c1.drawCylinder[0, round[-potOuterRadius res], round[height res], 0, round[-potOuterRadius res], round[(height-cutDepth) res], round[potOuterRadius res]]
// Inner surface of cut cylinder
c2 = newJava["frink.graphics.VoxelArray", [round[-width res/2], round[width res], round[-depth res/2], round[depth res], 0, round[height res], false]]
c2.drawCylinder[0, round[-potOuterRadius res], round[height res], 0, round[-potOuterRadius res], round[(height-cutDepth) res], round[potInnerRadius res]]
c1.remove[c2]
c1.translate[0, round[thickness/2 res], 0]
v.remove[c1]
ringHeight = height
ringInnerDiameter = 13 mm
ringThickness = .3 in
ringOuterDiameter = ringInnerDiameter + ringThickness
ring = v.makeCylinder[0,
round[(-depth/2 - ringOuterDiameter/2 + ringThickness/2) res],
round[ringHeight res],
0,
round[(-depth/2 - ringOuterDiameter/2 + ringThickness/2) res],
0,
round[ringOuterDiameter/2 res]]
ring2 = v.makeCylinder[0,
round[(-depth/2 - ringOuterDiameter/2 + ringThickness/2) res],
0,
0,
round[(-depth/2 - ringOuterDiameter/2 + ringThickness/2) res],
round[ringHeight res],
round[ringInnerDiameter/2 res]]
ring.remove[ring2]
v = v.union[ring]
v.projectX[undef].show["X"]
v.projectY[undef].show["Y"]
v.projectZ[undef].show["Z"]
filename = "pumpHolder.obj"
print["Writing $filename..."]
w = new Writer[filename]
w.println[v.toObjFormat["pumpHolder", 1/(res mm)]]
w.close[]
println["done."]
Download or view pumpHolder.frink in plain text format
This is a program written in the programming language Frink.
For more information, view the Frink
Documentation or see More Sample Frink Programs.
Alan Eliasen was born 20217 days, 23 hours, 50 minutes ago.