screwThreadsTestRing.frink

Download or view screwThreadsTestRing.frink in plain text format


/** This goes along with the screwThreadsTest....frink files and prints a
    ring for 3-D printing in TPU (a flexible material) to make it more
    grippable. 
*/


use screwThreads.frink

res = 254/inch

pitch = inch/11.5
//minorRadius = 0.9495 in / 2
threadHeight = .05648 in

// Male minor radius.  This is the average of the allowed min and max pitch
// diameter (table 2) minus half the thread height.
minorRadius = (1.0060+0.9975) in /2 / 2 - threadHeight/2
turns = 4.25
pilot = 1/8 in - pitch/2

malePipeInner = callJava["frink.graphics.VoxelArray", "makeCylinder", [0,0,0,0,0,1/4 in res, minorRadius res]]
malePipeOuter = callJava["frink.graphics.VoxelArray", "makeCylinder", [0,0,0,0,0,1/4 in res, (minorRadius+2.4 mm) res]]

malePipeOuter.remove[malePipeInner]
male = malePipeOuter

male.projectX[undef].show["X"]
male.projectY[undef].show["Y"]
male.projectZ[undef].show["Z"]

filename = "screwThreadsTestRing.obj"
print["Writing $filename..."]
w = new Writer[filename]
w.println[male.toObjFormat["male", 1/(res mm)]]
w.close[]
println["done."]


Download or view screwThreadsTestRing.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 19976 days, 3 hours, 2 minutes ago.