omdl  v1.0
OpenSCAD Mechanical Design Library
Box Screw

Models for generating 2d box joints fastened with screw and nut. More...

+ Collaboration diagram for Box Screw:

Files

file  box_screw.scad
 Models for generating 2d box joints fastened with screw and nut.
 

Functions and/or Modules

module joint2d_box_screw (conf, insts, mode=0, type=0, trim=false, align)
 Create 2d edge profiles for screw and nut box joint construction. More...
 

Usage Details

Models for generating 2d box joints fastened with screw and nut.

Requires:
include <omdl-base.scad>;
include <transforms/base_cs.scad>;
include <models/2d/joint/box_screw.scad>;

Function and/or Module Documentation

◆ joint2d_box_screw()

module joint2d_box_screw ( conf  ,
insts  ,
mode  = 0,
type  = 0,
trim  = false,
align   
)

Create 2d edge profiles for screw and nut box joint construction.

Parameters
conf<datastruct> box joint length, depth, pin configuration and screw configuration (see below).
insts<datastruct> box joint instance list (see below).
mode<integer> global construction mode.
type<integer> construction type {0=male additions, 1=male removals, 2=female removals}.
trim<boolean> limit construction to within the total joint width.
align<integer-list-2> joint alignment; edge-1, center, and edge-2 for both [x, y].

Use this module to generate a 2d profile for constructing box-joint pairs with a central screw and locking nut, as illustrated in the example below.

Set type = 0 to create the male finger profile, and set type = 2 to generate the corresponding female slot profile. To ensure proper alignment and fit, both components must be created 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 decimal-list-5 | decimal d pin default configuration
3 decimal-list-2 | decimal d/6 screw default configuration
4 decimal-list-4 | decimal d/3 nut 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 m / 25 pin gap width
3 decimal m / 20 pin exterior edge rounding
4 decimal m / 20 pin interior edge rounding

conf[3]: screw

e data type default value parameter description
0 decimal d/6 sd : screw diameter
1 decimal d sl : screw length

conf[4]: nut

e data type default value parameter description
0 decimal d/3 nut size; flat-to-flat
1 decimal sd nut height
2 decimal sl / 10 nut end offset
3 decimal m / 20 nut interior edge rounding

insts

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 decimal-list-5 | decimal pin override (see above).
5 decimal-list-2 | decimal screw override (see above).
6 decimal-list-4 | decimal nut 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 and nut section of instance

mode

Integer value is binary encoded.

b description
0 female removal; interior vs exterior rounding
1 female removal; interior corner over cut placement
2 male removal; screw bore vs skip screw bore
3 male removal; screw nut vs skip screw nut
4 male removal; add screw bore drill punch mark

Box screw joint profile example script

include <omdl-base.scad>;
include <transforms/base_cs.scad>;
include <models/2d/joint/box_screw.scad>;
w = [50, 3];
conf =
[
w.x,
w.y,
[3, 6, 1/8, 1/3, 1/3],
[1/2, w.y, 1, 1/2]
];
insts =
[
[-1, +3, 2+4],
[+0, +0, 1+2+4, 1+4+16],
[+1, -3, 1 +4],
];
mode = 1 + 2;
translate([0,-w.y])
{
joint2d_box_screw(conf=conf, insts=insts, mode=mode, type=0);
difference()
{
translate([0, -w.y*3/4]) square([w.x, w.y * 3/2], center=true);
joint2d_box_screw(conf=conf, insts=insts, mode=mode, type=1);
}
}
translate([0,w.y/2])
difference()
{
translate([0, w.y/2]) square([w.x, w.y*3/2], center=true);
joint2d_box_screw(conf=conf, insts=insts, mode=mode, type=2);
}
// end_include
module joint2d_box_screw(conf, insts, mode=0, type=0, trim=false, align)
Create 2d edge profiles for screw and nut box joint construction.
Definition: box_screw.scad:433

Box screw joint profile example diagram
top
expand top

Definition at line 432 of file box_screw.scad.

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