omdl  v0.9.8
OpenSCAD Mechanical Design Library
Screws and Bolts

Screws, bolts and fastener bores. More...

+ Collaboration diagram for Screws and Bolts:

Files

file  screws.scad
 Screws, bolts and fastener bores.
 

Functions

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. More...
 
module screw_bore_tsf (d=1, l=1, t, a)
 Gapped fastener bore with engagement cylinders for self-forming threads. More...
 

Detailed Description

Screws, bolts and fastener bores.

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

Function Documentation

◆ screw_bore()

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

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

Parameters
d<decimal> bore diameter.
l<decimal> bore length.
h<decimal-list-5> fastener 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> fastener 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 [fd, fh], the bore diameter and bore height scale factors, or a single decimal to specify fd only. The default values for both are 1 (fh scales only the fastener head and nut heights).
a<integer> z-alignment index; one of eight presets.

Construct a bore for a fastener hole, fastener head, and/or fastener nut. Both the head and 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.

Fastener bore examples script

include <omdl-base.scad>;
include <models/3d/fastener/screws.scad>;
$fn = 36;
// fastener 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, a)
Flat and beveled-head fastener bore with nut, nut slot, and bore tolerance.
Definition: screws.scad:358

Fastener bore examples diagram
topfrontdiag
expand topexpand frontexpand diag

Definition at line 357 of file screws.scad.

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

◆ screw_bore_tsf()

module screw_bore_tsf ( = 1,
= 1,
,
 
)

Gapped fastener bore with engagement cylinders for self-forming threads.

Parameters
d<decimal> fastener diameter.
l<decimal> bore length.
t<datastruct> thread engagement (see below).
a<integer> z-alignment index; one of five presets.

Construct a fastener bore with a gap for chip expansion and radial cylinders that engage with the inserted fastener threads to self-form counter-threads along the cylinder lengths. The bore is enlarged by a configurable gap which facilitates thread formation with reduced stress accumulation to the bore internal dimensions.

Note
When 3D printing a bore horizontally, it is best practice to use 3 cylinders and orient one cylinder at the 6 o-clock position. This prevents the formation of cliffs which would otherwise require print support. Vertically printed bores can use increase cylinder count for increase holding strength at the cost of greater bore thread formation stress.

Multi-value and structured parameters

thread engagement

Data structure fields: t

e data type default value parameter description
0 <decimal> 5 radial engagement percentage
1 <decimal> 5 radial gap percentage
2 <decimal> 0 rotational offset
3 <decimal> 0 radial offset
4 <integer> 3 cylinder count
5 <decimal-list-2 | decimal> [8/10, 10] cylinder upper taper: [f, h%]
6 <decimal-list-2 | decimal> [ 0, 10] cylinder lower taper: [f, h%]

Data structure fields: t[5-6]: cylinder upper and lower taper

The diameter of the thread engagement cylinders can be configured to gradually change along the bore height from either the bottom, top, or both. The first element sets the cylinder diameter-scale factor and the second sets the length over which the scaling is performed. For f > 1, the cylinder diameter will increase in size, and for f < 1, the cylinder diameter will decrease in size.

Screw bore example script

include <omdl-base.scad>;
include <models/3d/fastener/screws.scad>;
$fn = 36;
translate([+15, 0, 0])
difference()
{
cube([15, 15, 20], center=true);
screw_bore_tsf( d=10, l=20+eps*4);
}
%translate([-15, 0, 0])
difference()
{
%cube([15, 15, 20], center=true);
#%screw_bore_tsf( d=10, l=20+eps*8);
}
translate([-15, 0, 0])
cylinder(d=10, h=30, center=true);
// end_include
module screw_bore_tsf(d=1, l=1, t, a)
Gapped fastener bore with engagement cylinders for self-forming threads.
Definition: screws.scad:695

Screw bore example diagram
topfrontdiag
expand topexpand frontexpand diag

Definition at line 694 of file screws.scad.

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