194 module box_screw( iform=7, imode=mode, ipin=pin, ibore=bore )
226 sg = (type == 2) ? +1 : -1;
237 translate( [0, depth/2, 0] )
240 if (type == 0 || type == 2)
243 translate ([(t1 + t2)/2*i, 0])
249 vr = (type == 2) ? er : 0,
260 vr = (type == 2) ? 0 : er,
265 translate([ -(s1+te)/2, depth/2])
269 translate([ +(s1+te)/2, depth/2])
278 vrm = (type == 2) ? [0,0,4,3] : [1,1,0,0]
285 if (type == 1 || type == 2)
294 let ( pe = max(te, 0) )
298 m0 ? [ j*(pe+s1-ir)/2, depth ]
299 : [ j*(pe+s1)/2, depth-ir/2 ]
306 translate ([(t1 + t2)/2*i, -depth/2] + mcr_o)
307 cylinder(d=ir, h=h, center=
true);
311 translate ([0, depth/2 + so, 0])
313 screw_bore(d=sd, l=sl, h=sh, n=sn, t=st, s=ss, f=sf, a=1);
342 translate([
length/2 * zero + offset, 0 ])
343 box_screw( iform=iform, imode=imode, ipin=ipin, ibore=ibore );
function binary_bit_is(v, b, t=1)
Test if a binary bit position of an integer value equals a test bit.
function defined_e_or(v, i, d)
Returns an element from an iterable if it exists, or a default value if not.
function defined_fle_or(v, i, d)
Return the first defined specified element in a list of lists, otherwise returns the given default va...
function select_ci(v, i, l=true)
Select specified element from list or return a default.
function polygon_round_eve_all_p(c, vr=0, vrm=1, vfn, w=true, cw=true)
Compute coordinates that round all of the vertices between each adjacent edges in 2D.
function triangle_sas2sss(v)
Compute the side lengths of a triangle given two sides and the included angle.
function triangle2d_sss2ppp(v, a=x_axis_ci, cw=true)
Compute a set of vertex coordinates for a triangle given its side lengths in 2D.
module screw_bore(d=1, l=1, h, n, t, s, f, a)
Flat and beveled-head fastener bore with nut, nut slot, and bore tolerance.
module joint3d_dovetail_screw(h=1, conf, insts, mode=0, type=0, align)
Construct a 3d dovetail joint with optional screw and nut fastener.
module pg_rectangle(size=1, o, vr, vrm=1, vfn, center=false)
A polygon rectangle with vertex rounding.
function length(v, from=length_unit_default, to=length_unit_base, d=1)
Convert a length value from one unit to another, with optional dimensional scaling.