omdl  v0.9.6
OpenSCAD Mechanical Design Library

Screws and screw bores. More...

+ Collaboration diagram for Screws:

Files

file  screws.scad
 Screws and screw bores.
 

Functions

module screw_bore (d=1, l=1, h, n, t, s, f=1, a=0)
 Flat and beveled-head screw bore with nut, nut slot, and bore tolerance. More...
 

Detailed Description

Screws and screw bores.

Requires:
include <omdl-base.scad>;
include <models/3d/fastener/screws.scad>;

Function Documentation

◆ screw_bore()

module screw_bore ( = 1,
= 1,
,
,
,
,
= 1,
= 0 
)

Flat and beveled-head screw bore with nut, nut slot, and bore tolerance.

Parameters
d<decimal> bore diameter.
l<decimal> bore length.
h<decimal-list-5> screw head; a list [hs, hf, hb, hg, hr], the head size, flat-height, bevel-height, side geometry (flat side count), and rotation. The head size is measured flat-to-flat when hg is specified.
n<decimal-list-5> screw nut; a list [ns, nf, nb, ng, nr, no], the nut size, flat-height, bevel-height, side geometry (flat side count), rotation, and bottom offset. The nut size is measured flat-to-flat.
t<decimal-list-2> bore tolerance; a list [tx, ty], the tolerance along the x and/or y axis.
s<decimal-list-list-3> nut slot cutout; a list of lists [sx, sy, sz], the list of slot sizes along the x, y, and/or z axis. Each of sx, sy, or sz can be a decimal list, such as [lower, upper], or a single decimal value, to cover [0, value].
f<decimal-list-2 | decimal> bore scale factor; a list [bf, hf], the bore diameter and bore height scale factors, or a single decimal to specify bf only. The default value for hf = 1 and it scales only the screw head and nut heights.
a<integer> z-alignment index; one of eight preset alignments.

Construct a bore for a screw hole, screw head, and/or screw nut. Both the screw head and screw nut are optional. A tolerance can be specified along the bore x and y axis. A nut slot cutout can be specified along the x, y, or z axis. The following example uses both tolerance and a nut slot along the y axis. For convenience, exact fastener dimensions can be specified along with the an appropriately selected scale factor f to slightly increase the bore for acceptable fastener fit.

Screw bore example script

include <omdl-base.scad>;
include <models/3d/fastener/screws.scad>;
$fn = 36;
// screw bore with tolerance and nut-slot from front to back
%difference()
{
cube([10, 15, 18], center=true);
screw_bore(2.75, 18+eps*8, h=[6,1,3], n=[6,2,0,6,30,3], t=[0,5], s=[0,[-6,6],0], f=1.15);
}
// show actual minimal space required
screw_bore(2.75, 18, h=[6,1,3], n=[6,2,0,6,30,3]);
// end_include
eps
<decimal> Epsilon, small distance to deal with overlapping shapes.
Definition: constants.scad:195
module screw_bore(d=1, l=1, h, n, t, s, f=1, a=0)
Flat and beveled-head screw bore with nut, nut slot, and bore tolerance.
Definition: screws.scad:359

Screw bore example diagram
topfrontdiag
expand topexpand frontexpand diag

Definition at line 358 of file screws.scad.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: