omdl  v1.0
OpenSCAD Mechanical Design Library
Dovetail Screw

Models for constructing 3d dovetail joints with optional screw and nut fastener. More...

+ Collaboration diagram for Dovetail Screw:

Files

file  dovetail_screw.scad
 Models for constructing 3d dovetail joints with optional screw and nut fastener.
 

Functions and/or Modules

module joint3d_dovetail_screw (h=1, conf, insts, mode=0, type=0, align)
 Construct a 3d dovetail joint with optional screw and nut fastener. More...
 

Usage Details

Models for constructing 3d dovetail joints with optional screw and nut fastener.

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

Function and/or Module Documentation

◆ joint3d_dovetail_screw()

module joint3d_dovetail_screw ( = 1,
conf  ,
insts  ,
mode  = 0,
type  = 0,
align   
)

Construct a 3d dovetail joint with optional screw and nut fastener.

Parameters
h<decimal> joint height.
conf<datastruct> joint length, depth, pin configuration and screw configuration (see below).
insts<datastruct> joint instance list (see below).
mode<integer> global construction mode.
type<integer> construction type {0=male additions, 1=male removals, 2=female removals}.
align<integer-list-3> joint alignment; center, edge-1, and edge-2 for [x, y, z].

Use this module to construct 3d dovetail joints with optional screw and locking nut, as illustrated in the example below.

Set type = 0 to construct the male half, and set type = 2 to for the corresponding female half. To ensure proper alignment and fit, both components must be constructed using identical configuration parameters.

When producing interlocking joints with 3D-printed plastics, carefully control the joint clearance. Most printed plastics are relatively rigid, so insufficient gap allowance can lead to poor assembly or excessive friction.

For CNC routers and laser cutters, the interior and exterior corner radii can be adjusted to accommodate tooling limitations. This allows flat internal mating surfaces to be maintained while compensating for the minimum practical radius imposed by the cutter diameter (commonly called dogbone corner relief).

Multi-value and structured parameters

conf

e data type default value parameter description
0 decimal required l : joint length
1 decimal l/10 d : joint depth
2 datastruct | decimal d pin default configuration
3 datastruct undef screw bore default configuration

conf[2]: pin

e data type default value parameter description
0 decimal d m : male pin width
1 decimal m * 5/2 screw section width
2 decimal 0 pin tail expansion (dovetail)
3 decimal m / 25 pin gap width
4 decimal m / 20 pin exterior edge rounding
5 decimal m / 20 pin interior edge rounding

conf[3]: screw bore

Data structure schema: screw bore
name schema
screw bore [ sbo, d, l, h, n, t, s, f ]

Data structure fields: screw bore
e data type default value parameter description
0 decimal 0 sbo : screw bore offset
1 decimal d / 6 d : bore diameter
2 decimal d * 3/2 l : bore length
3 decimal-list-5 h : fastener head
4 decimal-list-5 n : fastener nut
5 decimal-list-2 t : bore tolerance
6 decimal-list-list-3 s : nut slot cutout
7 decimal-list-2 | decimal f : bore scale factor

The screw bore is defined using the data structure described above. This structure includes seven parameters, all of which are documented in screw_bore().

insts

Data structure schema: insts

name schema
insts [ inst, inst, ..., inst ]

Data structure fields: inst

e data type default value parameter description
0 decimal 0 zero reference; [-1, 0, +1]
1 decimal 0 length offset from reference
2 integer 7 form (see below).
3 integer mode override (see below).
4 datastruct | decimal pin override (see above).
5 datastruct | decimal screw bore override (see above).

insts[2]: form

Integer value is binary encoded.

b description
0 construct left pin at negative side of instance
1 construct right pin at positive side of instance
2 construct screw bore for instance

mode

Integer value is binary encoded.

b description
0 female removal; interior corner over cut placement

Box screw joint example script

include <omdl-base.scad>;
include <models/3d/fastener/screws.scad>;
include <models/3d/joint/dovetail_screw.scad>;
$fn = 36;
h = 3;
w = [50, 3];
pin = [5, 5, 2, 1, 1/3, 1/3];
bore =
[
3,
1,
5 + 3,
[2, 1/2, 1/2],
[2, 3/4, 0],
undef,
[0, [-2, +2]],
[1 + 10/100, 1]
];
conf = [ w.x, w.y, pin, bore ];
insts =
[
[-1, +3, 2+4],
[+0, +0, 1+2+4, 1, [3]],
[+1, -3, 1 +4],
];
translate([0, -w.y, 0]) union()
{
joint3d_dovetail_screw(h=h, conf=conf, insts=insts, type=0);
difference()
{
translate([0, -w.y*3/4]) cube([w.x, w.y * 3/2, h], center=true);
joint3d_dovetail_screw(h=h, conf=conf, insts=insts, type=1);
}
}
translate([0, +w.y, 0]) difference()
{
translate([0, w.y, -h/2 ]) cube([w.x, w.y*2 -eps*4, h*2 -eps*4], center=true);
joint3d_dovetail_screw(h=h, conf=conf, insts=insts, type=2);
}
// end_include
eps
<decimal> Epsilon, small distance to deal with overlapping shapes.
Definition: constants.scad:195
module joint3d_dovetail_screw(h=1, conf, insts, mode=0, type=0, align)
Construct a 3d dovetail joint with optional screw and nut fastener.

Box screw joint example diagram
topdiag
expand topexpand diag

Definition at line 444 of file dovetail_screw.scad.

+ Here is the call graph for this function: