I have to try your newer version. I kept stepping on my foot with the file handling, trying to sync saved and in-memory formula revisions. Trying to keep all the formulae in one file was problematic, as I was unsuccessful revising one formula at a time. Another way I found to get in trouble was to change a formula (like add a comment) and do a Save One, without first doing an Apply - the revisions don't get saved.
I added comments to earlier formulae.
Code: Select all
{"helix": {"a": "1 #pitch", "b": "5 #height", "c": "1 #base radius", "d": ["20 #angle deg", "1 # 1= RH 0 = LH", "t*b/a", "c + b*t*sin(rad(d1))/(2*pi)", "ternary(d2, 1, -1)"], "X": "d4*cos(d3*d5)", "Y": "d4*sin(d3*d5)", "Z": "b*t/(2*pi)", "t_min": "0", "t_max": "2*pi", "interval": "0.1"}}
Code: Select all
{"ellipse": {"a": "20 #major radius", "b": "10 #minor radius (ignored if c != 0)", "c": "0.5 #eccentricity (0 to ignore and use a and b, else b^2 = a^2*(1 - c^2)", "d": ["0 #d1: x center", "0 #d2: y center", "20 #d3: angle from x-axis to major axis (deg)", "ternary(c, a*(1-c*c)^0.5, b) #d4", "a * cos(t) #d5: x -unrotated ellipse", "d4 * sin(t) #d6 y- unrotated ellipse", "radians(d3) #d7 angle in radians"], "X": "d1 + d5 * cos(d7) - d6 * sin(d7)", "Y": "d2 + d5 * sin(d7) + d6 * cos(d7)", "Z": "0", "t_min": "0.0", "t_max": "2*pi", "interval": "0.1"}}
Code: Select all
{"holesaw": {"a": "12 # radius", "b": "6 #no of teeth", "c": "5.000000 #sine amplitude", "d": [""], "X": "cos(t)*a", "Y": "sin(t)*a", "Z": "c*sin(b*t)", "t_min": "0.0", "t_max": "2*pi", "interval": "0.1"}}
Code: Select all
{"sawtooth": {"a": "40 #radius", "b": "5 #number teeth", "c": "0.8 # tooth parameter between 0 and 1", "d": ["10 #amplitude", "mod(b*t, 1)", "# best with polygon"], "X": "a*cos(2*pi*t)", "Y": "a*sin(2*pi*t)", "Z": "d1*(lt(d2,c)*d2/c + gte(d2,c)*(1-d2)/(1-c))", "t_min": "0.0", "t_max": "1.0", "interval": "0.01"}}