Download or view mugCap.frink in plain text format
/** This makes a 3-D model for a mug cap LOL */
r = 254/in
innerRadius = (85.0 mm/2) + 0.15 mm
outerRadius = innerRadius + 1.6 mm
h = .5 in
lidThickness = 0.8 mm
// Outer main cylinder
c1 = callJava["frink.graphics.VoxelArray", "makeCylinder", [0, 0, 0, 0, 0, h r, outerRadius r]]
// Inner main cylinder
cin = callJava["frink.graphics.VoxelArray", "makeCylinder", [0, 0, lidThickness r, 0, 0, h r, innerRadius r]]
c1.remove[cin]
c1.projectX[undef].show["X"]
c1.projectY[undef].show["Y"]
c1.projectZ[undef].show["Z"]
filename = "mug.obj"
print["Writing $filename..."]
w = new Writer[filename]
w.println[c1.toObjFormat["test", 1/(r mm)]]
w.close[]
println["done."]
Download or view mugCap.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 20145 days, 7 hours, 40 minutes ago.