/** This designs a thermocouple holder for my sous vide controller for 3-D printing. */ width = 1.1 inch height = 1.2 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] // This is a tool that will carve out the channels for the thermocouple brush = v.makeCappedCylinder[0, 0, 0, 0, 0, round[.8 in res], 4.3 mm res/2] // The "straight through" channel //v.removeAlongLine[brush, 0, round[depth/2 res], 0, 0, round[-depth/2 res], round[.1 in res], 0, 0, round[4.3 mm res/2]] v.removeAlongLine[brush, 0, round[depth/2 res], 0, round[.7 * -width/2 res], round[-depth/2 res], round[.1 in res], 0, 0, round[4.3 mm res/2]] v.removeAlongLine[brush, 0, round[depth/2 res], 0, round[.7 * width/2 res], round[-depth/2 res], round[.1 in res], 0, 0, round[4.3 mm res/2]] v.projectX[undef].show["X"] v.projectY[undef].show["Y"] v.projectZ[undef].show["Z"] w = new Writer["thermocouple2sides.obj"] w.println[v.toObjFormat["test", 1/(res mm)]] w.close[]