![]() |
omdl
v1.0
OpenSCAD Mechanical Design Library
|
Finger joint (box joint) box generator. More...
Collaboration diagram for Finger Joint Box Generator:Files | |
| file | box_finger_joint.scad |
| A finger joint (box joint) box generator for CNC cut-based fabrication. | |
Functions and/or Modules | |
| module | box2d_finger_joint (mth=1, size, joint_pin, joint_screw, joint_nut, joint_form=7, joint_mode=0, joint_spacing, joints_max, side_holes, side_add, vr, vrm, side_spacing, layout=0, mode=0, part=63, verb=0) |
| Generate a 2D box design using screw-based finger joint (box-joint). More... | |
Finger joint (box joint) box generator.
| Requires: |
|---|
| include <omdl-base.scad>; |
| include <shapes/select_common_2d.scad>; |
| include <transforms/base_cs.scad>; |
| include <transforms/layout.scad>; |
| include <models/2d/joint/box_screw.scad>; |
| include <parts/2d/enclosure/box_finger_joint.scad>; |
| module box2d_finger_joint | ( | mth | = 1, |
| size | , | ||
| joint_pin | , | ||
| joint_screw | , | ||
| joint_nut | , | ||
| joint_form | = 7, |
||
| joint_mode | = 0, |
||
| joint_spacing | , | ||
| joints_max | , | ||
| side_holes | , | ||
| side_add | , | ||
| vr | , | ||
| vrm | , | ||
| side_spacing | , | ||
| layout | = 0, |
||
| mode | = 0, |
||
| part | = 63, |
||
| verb | = 0 |
||
| ) |
Generate a 2D box design using screw-based finger joint (box-joint).
| mth | <decimal> material thickness. |
| size | <decimal-list-3 | decimal> box size; a list [x, y, z] or a single decimal for (x=y=z). |
| joint_pin | <decimal-list-5 | decimal> joint pin configuration. |
| joint_screw | <decimal-list-2 | decimal> joint screw configuration. |
| joint_nut | <decimal-list-4 | decimal> joint nut configuration. |
| joint_form | <integer> joint form. |
| joint_mode | <integer> joint mode. |
| joint_spacing | <decimal-list-3 | decimal> minimum separation between joint pins; a list [x, y, z] or a single decimal for (x=y=z). |
| joints_max | <integer-list-3 | integer> maximum pin sets for sides [x, y, z] or a single integer for (x=y=z). |
| side_holes | <datastruct> box side hole instances (see below). |
| side_add | <point-2d-list-4-list> coordinate points to merge into the box xz and yz sides. |
| vr | <decimal-list-6-list-n | decimal> box rounding; where n = 4 for rectangular sides. (see below). |
| vrm | <integer-list-6-list-n | integer> box rounding mode where n = 4 for rectangular sides. (see below). |
| side_spacing | <decimal> separation between box sides. |
| layout | <integer> layout selection {0 | 1 | 2}. |
| mode | <integer> construction mode (see below). |
| part | <integer> side output selection (see below). |
| verb | <integer> output console verbosity. |
Creates a 2D box layout with straight finger joints and optional screw fasteners. The resulting geometry can be rendered to SVG or DXF for CNC cutting, or extruded to a specified material thickness for fabrication using a 3D printer.
The joints are constructed using the module joint2d_box_screw(). For clarity, all related parameters in this context are prefixed with joint_. The joint module supports configurable interior and exterior corner rounding to compensate for cutting tool diameter, a technique commonly referred to as dogbone corner relief. Refer to the joint2d_box_screw() module documentation for detailed information on the expected data types and configuration scheme.
| name | schema |
|---|---|
| side_holes | [instances] |
| instances | [instance, instance, ..., instance] |
| e | data type | default value | parameter description |
|---|---|---|---|
| 0 | integer-list | integer | required | box side index or index list (see below) |
| 1 | datastruct | integer | 1 | 2d shape selections (see: select_common_2d_shape()) |
| 2 | datastruct | [0] | shape layout (see: layout_grid_rp() |
The box side are assigned the following indices:
| v | side | description |
|---|---|---|
| 0 | back | side xz negative |
| 1 | front | side xz positive |
| 2 | left | side yz negative |
| 3 | right | side yz positive |
| 4 | bottom | side xy negative |
| 5 | top | side xy positive |
When the box is open (no top side) individual box sides can be customized by merging an additional list of coordinate points into the side geometry. Each side may be customized independently using the scheme in the following table:
| e | data type | default value | parameter description |
|---|---|---|---|
| 0 | point-2d-list | ap_xz_1 : side xz-1 | |
| 1 | point-2d-list | ap_yz_1 : side yz-1 | |
| 2 | point-2d-list | ap_xz_1 | ap_xz_2 : side xz-2 |
| 3 | point-2d-list | ap_yz_1 | ap_yz_2 : side yz-2 |
The parameter p is ignored for closed boxes.
The box sides can be rounded together or independently using the parameters vr and vrm as show in the table below:
| e | data type | default value | parameter description |
|---|---|---|---|
| 0 | decimal-list-n | decimal | required | vr_xy_1 : side xy-1 rounding |
| 1 | decimal-list-n | decimal | vr_xy_1 | vr_xz_1 : side xz-1 rounding |
| 2 | decimal-list-n | decimal | vr_xz_1 | vr_yz_1 : side yz-1 rounding |
| 3 | decimal-list-n | decimal | vr_xy_1 | vr_xy_2 : side xy-2 rounding |
| 4 | decimal-list-n | decimal | vr_xz_1 | vr_xz_2 : side xz-2 rounding |
| 5 | decimal-list-n | decimal | vr_yz_1 | vr_yz_2 : side yz-2 rounding |
The vertices of each side can be rounded independently by assigning values using a four-element list, or they can all be assigned the same value by setting the side rounding to a single value.
The rounding mode follows the same scheme described above. For more information on rounding options, see polygon_round_eve_all_p().
For rectangular sides n = 4. However, when customized side points are specified using the side_add option, the corresponding rounding lists size n must be extended to match the number of added points for each customized side, if individual vertex treatment is desired.
Integer value is binary encoded.
| b | description |
|---|---|
| 0 | size is specified for box interior |
| 1 | add top side to close box |
| 2 | trim each joint to within its width |
| 3 | extrude 2d layout for 3d printing |
Construction of each side of the box is controlled using the binary-encoded integer parameter part. Each side corresponds to a specific bit position according to the side index described above. To enable or disable a side, adjust the part value by setting or clearing the binary value associated with that side’s index.
For example, to output only the bottom of the front and the bottom of the box, set: part = (pow(2, 1) + pow(2, 5));
2d box example script
| top |
|---|
![]() |
| top | front | right | diag |
|---|---|---|---|
![]() | ![]() | ![]() | ![]() |
Definition at line 646 of file box_finger_joint.scad.
Here is the call graph for this function: