diff --git a/libtest.png b/libtest.png index 409bf47..0bd8905 100644 Binary files a/libtest.png and b/libtest.png differ diff --git a/libtest.scad b/libtest.scad index 939bbc7..1b134aa 100644 --- a/libtest.scad +++ b/libtest.scad @@ -78,6 +78,7 @@ use use use use +use use use use @@ -137,9 +138,12 @@ cable_grommets_y = 0; translate([x5, cable_grommets_y]) cable_grommets(); -translate([x5 + 80, cable_grommets_y]) +translate([x5 + 50, cable_grommets_y]) ribbon_clamps(); +translate([x5 + 95, cable_grommets_y]) + press_fits(); + translate([x5, cable_grommets_y + 60]) fixing_blocks(); @@ -427,7 +431,7 @@ translate([x4 + 175, belts_y, -20]) translate([x4, rails_y + 130]) rails(); -translate([800, fans_y + 50]) +translate([770, fans_y + 50]) cable_strips(); translate([x4, kp_pillow_blocks_y]) diff --git a/printed/press_fit.scad b/printed/press_fit.scad new file mode 100644 index 0000000..4898552 --- /dev/null +++ b/printed/press_fit.scad @@ -0,0 +1,50 @@ +// +// NopSCADlib Copyright Chris Palmer 2020 +// nop.head@gmail.com +// hydraraptor.blogspot.com +// +// This file is part of NopSCADlib. +// +// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the +// GNU General Public License as published by the Free Software Foundation, either version 3 of +// the License, or (at your option) any later version. +// +// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with NopSCADlib. +// If not, see . +// + +// +//! Utility for making printed press fit connectors to join printed parts. +//! +//! Add solvent or glue to make a permanent fixture. +// +include <../core.scad> + +interference = 0.0; + +bridge_droop = layer_height; //sqrt(4 * layer_height * filament_width / PI) - layer_height; + +module press_fit_socket(w = 5, h = 50, horizontal = false) { //! Make a square hole to accept a peg + h = horizontal ? h : h + bridge_droop; + + cube([w, w, 2 * h], center = true); +} + +module press_fit_peg(h, w = 5, horizontal = false) { //! Make a rounded chamfered peg for easy insertion + module chamfered_square(w, horizontal) { + h = horizontal ? w - bridge_droop : w; + rounded_square([w, h], 1); + } + + translate_z(-eps) + linear_extrude(height = h + eps - layer_height) + chamfered_square(w + interference, horizontal); + + translate_z(h - layer_height - eps) + linear_extrude(height = layer_height + eps) + chamfered_square(w - layer_height, horizontal); +} diff --git a/readme.md b/readme.md index 6f6c7e0..e98d6e8 100644 --- a/readme.md +++ b/readme.md @@ -36,13 +36,13 @@ See [usage](docs/usage.md) for requirements, installation instructions and a usa Displays Nuts Spools Handle Rounded_cylinder Extrusion_brackets O_ring Springs PCB_mount Rounded_polygon Extrusions Opengrab Stepper_motors PSU_shroud Sector - Fans PCB Swiss_clips Printed_box Sweep - Fuseholder PCBs Toggles Ribbon_clamp Thread - Geared_steppers PSUs Transformers SSR_shroud Tube - Green_terminals Panel_meters Tubings Screw_knob - Hot_ends Pillars Variacs Socket_box - Hygrometer Pin_headers Veroboard Strap_handle - IECs Pulleys Washers + Fans PCB Swiss_clips Press_fit Sweep + Fuseholder PCBs Toggles Printed_box Thread + Geared_steppers PSUs Transformers Ribbon_clamp Tube + Green_terminals Panel_meters Tubings SSR_shroud + Hot_ends Pillars Variacs Screw_knob + Hygrometer Pin_headers Veroboard Socket_box + IECs Pulleys Washers Strap_handle Inserts Wire Zipties @@ -4978,6 +4978,29 @@ The stl must be given a parameterless wrapper in the project that uses it. | 1 | pcb_mount_PI_IO_5.stl | +Top + +--- + +## Press_fit +Utility for making printed press fit connectors to join printed parts. + +Add solvent or glue to make a permanent fixture. + + +[printed/press_fit.scad](printed/press_fit.scad) Implementation. + +[tests/press_fit.scad](tests/press_fit.scad) Code for this example. + +### Modules +| Module | Description | +|:--- |:--- | +| ```press_fit_peg(h, w = 5, horizontal = false)``` | Make a rounded chamfered peg for easy insertion | +| ```press_fit_socket(w = 5, h = 50, horizontal = false)``` | Make a square hole to accept a peg | + +![press_fit](tests/png/press_fit.png) + + Top --- diff --git a/tests/png/press_fit.png b/tests/png/press_fit.png new file mode 100644 index 0000000..e0a1066 Binary files /dev/null and b/tests/png/press_fit.png differ diff --git a/tests/press_fit.scad b/tests/press_fit.scad new file mode 100644 index 0000000..02f445a --- /dev/null +++ b/tests/press_fit.scad @@ -0,0 +1,71 @@ +// +// NopSCADlib Copyright Chris Palmer 2020 +// nop.head@gmail.com +// hydraraptor.blogspot.com +// +// This file is part of NopSCADlib. +// +// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the +// GNU General Public License as published by the Free Software Foundation, either version 3 of +// the License, or (at your option) any later version. +// +// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with NopSCADlib. +// If not, see . +// + +include <../printed/press_fit.scad> + +module press_fits() +{ + thickness = 2; + width = 20; + vthickness = 4; + + translate([0, width + 2]) + difference() { + cube([width, width, thickness]); + + for(x = [0.25, 0.75]) + for(y = [0.25, 0.75]) + translate([x * width, y * width]) + press_fit_socket(); + } + + union() { + cube([width, width, thickness]); + + for(x = [0.25, 0.75]) + for(y = [0.25, 0.75]) + translate([x * width, y * width, thickness]) + press_fit_peg(h = thickness); + } + + translate([width + 2, width + 2]) + difference() { + cube([width, vthickness, width]); + + for(x = [0.25, 0.75]) + for(y = [0.25, 0.75]) + translate([x, 0, y] * width) + rotate([90, 0, 0]) + press_fit_socket(); + } + + translate([width + 2, 0]) + union() { + cube([width, width, thickness]); + + for(x = [0.25, 0.75]) + for(y = [0.25, 0.75]) + translate([x * width, y * width, thickness]) + press_fit_peg(h = vthickness, horizontal = true); + } + +} + + +press_fits();