Added printed press_fit.scad.

This commit is contained in:
Chris Palmer 2020-11-27 18:13:01 +00:00
parent ceac5cdb27
commit 07766d8cf0
6 changed files with 157 additions and 9 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 848 KiB

After

Width:  |  Height:  |  Size: 851 KiB

View File

@ -78,6 +78,7 @@ use <tests/opengrab.scad>
use <tests/panel_meters.scad> use <tests/panel_meters.scad>
use <tests/PCBs.scad> use <tests/PCBs.scad>
use <tests/pillars.scad> use <tests/pillars.scad>
use <tests/press_fit.scad>
use <tests/PSUs.scad> use <tests/PSUs.scad>
use <tests/pulleys.scad> use <tests/pulleys.scad>
use <tests/rails.scad> use <tests/rails.scad>
@ -137,9 +138,12 @@ cable_grommets_y = 0;
translate([x5, cable_grommets_y]) translate([x5, cable_grommets_y])
cable_grommets(); cable_grommets();
translate([x5 + 80, cable_grommets_y]) translate([x5 + 50, cable_grommets_y])
ribbon_clamps(); ribbon_clamps();
translate([x5 + 95, cable_grommets_y])
press_fits();
translate([x5, cable_grommets_y + 60]) translate([x5, cable_grommets_y + 60])
fixing_blocks(); fixing_blocks();
@ -427,7 +431,7 @@ translate([x4 + 175, belts_y, -20])
translate([x4, rails_y + 130]) translate([x4, rails_y + 130])
rails(); rails();
translate([800, fans_y + 50]) translate([770, fans_y + 50])
cable_strips(); cable_strips();
translate([x4, kp_pillow_blocks_y]) translate([x4, kp_pillow_blocks_y])

50
printed/press_fit.scad Normal file
View File

@ -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 <https://www.gnu.org/licenses/>.
//
//
//! 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);
}

View File

@ -36,13 +36,13 @@ See [usage](docs/usage.md) for requirements, installation instructions and a usa
<tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#Nuts">Nuts</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Handle">Handle</a> </td><td> <a href = "#Rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr> <tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#Nuts">Nuts</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Handle">Handle</a> </td><td> <a href = "#Rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr>
<tr><td> <a href = "#Extrusion_brackets">Extrusion_brackets</a> </td><td> <a href = "#O_ring">O_ring</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#PCB_mount">PCB_mount</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr> <tr><td> <a href = "#Extrusion_brackets">Extrusion_brackets</a> </td><td> <a href = "#O_ring">O_ring</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#PCB_mount">PCB_mount</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
<tr><td> <a href = "#Extrusions">Extrusions</a> </td><td> <a href = "#Opengrab">Opengrab</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td> <a href = "#PSU_shroud">PSU_shroud</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr> <tr><td> <a href = "#Extrusions">Extrusions</a> </td><td> <a href = "#Opengrab">Opengrab</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td> <a href = "#PSU_shroud">PSU_shroud</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
<tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#PCB">PCB</a> </td><td> <a href = "#Swiss_clips">Swiss_clips</a> </td><td> <a href = "#Printed_box">Printed_box</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr> <tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#PCB">PCB</a> </td><td> <a href = "#Swiss_clips">Swiss_clips</a> </td><td> <a href = "#Press_fit">Press_fit</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#PCBs">PCBs</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td> <a href = "#Thread">Thread</a> </td><td></td></tr> <tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#PCBs">PCBs</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td> <a href = "#Printed_box">Printed_box</a> </td><td> <a href = "#Thread">Thread</a> </td><td></td></tr>
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#PSUs">PSUs</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td> <a href = "#SSR_shroud">SSR_shroud</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr> <tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#PSUs">PSUs</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Panel_meters">Panel_meters</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td></td><td></td></tr> <tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Panel_meters">Panel_meters</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td> <a href = "#SSR_shroud">SSR_shroud</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr> <tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr> <tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#IECs">IECs</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td> <a href = "#Washers">Washers</a> </td><td></td><td></td><td></td></tr> <tr><td> <a href = "#IECs">IECs</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td> <a href = "#Washers">Washers</a> </td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Inserts">Inserts</a> </td><td></td><td> <a href = "#Wire">Wire</a> </td><td></td><td></td><td></td></tr> <tr><td> <a href = "#Inserts">Inserts</a> </td><td></td><td> <a href = "#Wire">Wire</a> </td><td></td><td></td><td></td></tr>
<tr><td></td><td></td><td> <a href = "#Zipties">Zipties</a> </td><td></td><td></td><td></td></tr> <tr><td></td><td></td><td> <a href = "#Zipties">Zipties</a> </td><td></td><td></td><td></td></tr>
</table> </table>
@ -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 | | 1 | pcb_mount_PI_IO_5.stl |
<a href="#top">Top</a>
---
<a name="Press_fit"></a>
## 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)
<a href="#top">Top</a> <a href="#top">Top</a>
--- ---

BIN
tests/png/press_fit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

71
tests/press_fit.scad Normal file
View File

@ -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 <https://www.gnu.org/licenses/>.
//
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();