![]() |
omdl
v1.0
OpenSCAD Mechanical Design Library
|
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... | |
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>; |
| module joint2d_box_screw | ( | conf | , |
| insts | , | ||
| mode | = 0, |
||
| type | = 0, |
||
| trim | = false, |
||
| align | |||
| ) |
Create 2d edge profiles for screw and nut box joint construction.
| 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).
| 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 |
| 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 |
| e | data type | default value | parameter description |
|---|---|---|---|
| 0 | decimal | d/6 | sd : screw diameter |
| 1 | decimal | d | sl : screw length |
| 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 |
| 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). |
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 |
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
| 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: