Added Swiss clip.

This commit is contained in:
Chris Palmer 2020-04-16 00:59:27 +01:00
parent 6cecb4d466
commit 71af8f98ed
8 changed files with 296 additions and 12 deletions

View File

@ -55,6 +55,7 @@ include <vitamins/sk_brackets.scad>
include <vitamins/spools.scad>
include <vitamins/ssrs.scad>
include <vitamins/stepper_motors.scad>
include <vitamins/swiss_clips.scad>
include <vitamins/toggles.scad>
include <vitamins/transformers.scad>
include <vitamins/tubings.scad>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 785 KiB

After

Width:  |  Height:  |  Size: 787 KiB

View File

@ -71,6 +71,7 @@ use <tests/spades.scad>
use <tests/springs.scad>
use <tests/SSRs.scad>
use <tests/stepper_motors.scad>
use <tests/swiss_clips.scad>
use <tests/toggles.scad>
use <tests/transformers.scad>
use <tests/tubings.scad>
@ -101,7 +102,7 @@ use <tests/SSR_shroud.scad>
use <tests/PSU_shroud.scad>
x0 = 0;
x1 = x0 + 100;
x1 = x0 + 110;
x2 = x1 + 90;
x3 = x2 + 130;
x4 = x3 + 200;
@ -176,7 +177,7 @@ fans_y = displays_y + 80;
transformers_y = fans_y + 120;
psus_y = transformers_y + 190;
translate([x0 + 30, inserts_y])
translate([x0 + 35, inserts_y])
inserts();
translate([x0, inserts_y])
@ -250,7 +251,8 @@ translate([x0, psus_y]) {
zipties_y = 0;
bulldogs_y = zipties_y + 30;
leadnuts_y = bulldogs_y + 50;
swiss_clips_y = bulldogs_y + 35;
leadnuts_y = swiss_clips_y + 50;
translate([x1, zipties_y])
zipties();
@ -258,6 +260,9 @@ translate([x1, zipties_y])
translate([x1, bulldogs_y])
bulldogs();
translate([x1, swiss_clips_y])
swiss_clips();
translate([x1, leadnuts_y])
leadnuts();

View File

@ -32,15 +32,15 @@ See [usage](docs/usage.md) for requirements, installation instructions and a usa
<tr><td> <a href = "#D_connectors">D_connectors</a> </td><td> <a href = "#Modules">Modules</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Handle">Handle</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
<tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#Nuts">Nuts</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#PCB_mount">PCB_mount</a> </td><td> <a href = "#Sector">Sector</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 = "#Stepper_motors">Stepper_motors</a> </td><td> <a href = "#PSU_shroud">PSU_shroud</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
<tr><td> <a href = "#Extrusions">Extrusions</a> </td><td> <a href = "#Opengrab">Opengrab</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 = "#Fans">Fans</a> </td><td> <a href = "#PCB">PCB</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 = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#PCBs">PCBs</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 = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#PSUs">PSUs</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 = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Pillars">Pillars</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 = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Pin_headers">Pin_headers</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 = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td> <a href = "#Wire">Wire</a> </td><td></td><td></td><td></td></tr>
<tr><td> <a href = "#IECs">IECs</a> </td><td></td><td> <a href = "#Zipties">Zipties</a> </td><td></td><td></td><td></td></tr>
<tr><td> <a href = "#Inserts">Inserts</a> </td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td> <a href = "#Extrusions">Extrusions</a> </td><td> <a href = "#Opengrab">Opengrab</a> </td><td> <a href = "#Swiss_clips">Swiss_clips</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 = "#Fans">Fans</a> </td><td> <a href = "#PCB">PCB</a> </td><td> <a href = "#Toggles">Toggles</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 = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#PCBs">PCBs</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td> <a href = "#SSR_shroud">SSR_shroud</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#PSUs">PSUs</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 = "#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 = "#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 = "#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></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 = "#Zipties">Zipties</a> </td><td></td><td></td><td></td></tr>
</table>
---
@ -3215,6 +3215,55 @@ NEMA stepper motor model.
| 15 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm |
<a href="#top">Top</a>
---
<a name="Swiss_clips"></a>
## Swiss_clips
Swiss picture clip.
Used for holding glass on 3D printer beds.
The bending model is an approximation because in real life the arms bend.
Should be reasonably accurate if not close to fully open.
[vitamins/swiss_clips.scad](vitamins/swiss_clips.scad) Object definitions.
[vitamins/swiss_clip.scad](vitamins/swiss_clip.scad) Implementation.
[tests/Swiss_clips.scad](tests/Swiss_clips.scad) Code for this example.
### Properties
| Function | Description |
|:--- |:--- |
| ```sclip_arm_length(type)``` | Length of arms |
| ```sclip_arm_width(type)``` | Width of spring arms |
| ```sclip_height(type)``` | External height |
| ```sclip_hinge_offset(type)``` | Offset of hinge |
| ```sclip_hook(type)``` | hook, length, width |
| ```sclip_length(type)``` | Total external length |
| ```sclip_max_gap(type)``` | Maximum opening |
| ```sclip_radius(type)``` | Bend radius |
| ```sclip_spigot(type)``` | Spigot length, width, height |
| ```sclip_thickness(type)``` | Thickness of the metal |
| ```sclip_width(type)``` | Width |
### Modules
| Module | Description |
|:--- |:--- |
| ```swiss_clip(type, open = 0.9)``` | Draw a Swiss clip open by specified amount |
| ```swiss_clip_hole(type, open, h = 0)``` | Drill hole for spigot |
![swiss_clips](tests/png/swiss_clips.png)
### Vitamins
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 1 | ```sheet(AL6, 40, 20, 1)``` | Aluminium tooling plate 40mm x 20mm x 6mm |
| 1 | ```sheet(glass2, 40, 20, 1)``` | Sheet glass 40mm x 20mm x 2mm |
| 2 | ```swiss_clip(UKPFS1008_10)``` | Swiss picture clip UKPFS1008_10 11mm |
<a href="#top">Top</a>
---

52
tests/Swiss_clips.scad Normal file
View File

@ -0,0 +1,52 @@
//
// 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 <../utils/core/core.scad>
use <../utils/layout.scad>
include <../vitamins/swiss_clips.scad>
include <../vitamins/sheets.scad>
glass = glass2;
bed = AL6;
gap = sheet_thickness(bed) + sheet_thickness(glass);
module swiss_clips()
layout([for(s = swiss_clips) sclip_length(s)], 5, true)
let(s = swiss_clips[$i]) {
swiss_clip(s);
translate([0, 20]) {
swiss_clip(s, gap);
translate([20, 0, -5])
render_2D_sheet(bed)
difference() {
sheet_2D(bed, 40, 20, 1);
translate([-20, 0])
swiss_clip_hole(s, gap);
}
translate([20, 0, -1 + eps])
render_sheet(glass) sheet(glass, 40, 20, 1);
}
}
if($preview)
swiss_clips();

BIN
tests/png/swiss_clips.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

148
vitamins/swiss_clip.scad Normal file
View File

@ -0,0 +1,148 @@
//
// 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/>.
//
//
//! Swiss picture clip.
//! Used for holding glass on 3D printer beds.
//!
//! The bending model is an approximation because in real life the arms bend.
//! Should be reasonably accurate if not close to fully open.
//
include <../utils/core/core.scad>
function sclip_length(type) = type[1]; //! Total external length
function sclip_height(type) = type[2]; //! External height
function sclip_width(type) = type[3]; //! Width
function sclip_thickness(type) = type[4]; //! Thickness of the metal
function sclip_radius(type) = type[5]; //! Bend radius
function sclip_arm_width(type) = type[6]; //! Width of spring arms
function sclip_spigot(type) = type[7]; //! Spigot length, width, height
function sclip_hook(type) = type[8]; //! hook, length, width
function sclip_hinge_offset(type) = type[9]; //! Offset of hinge
function sclip_arm_length(type) = type[10]; //! Length of arms
function sclip_max_gap(type) = type[11]; //! Maximum opening
function arm_angle(type, open) = asin((sclip_height(type) - 2 * sclip_thickness(type) - open) / sclip_arm_length(type));
function spigot_angle(type, open) =
let(arm_w = sclip_arm_width(type), w = sclip_width(type) - 2 * arm_w)
(arm_angle(type, 0) - arm_angle(type, open)) * 2 * arm_w / w;
module swiss_clip_hole(type, open, h = 0) { //! Drill hole for spigot
spigot = sclip_spigot(type);
angle = spigot_angle(type, open);
t = sclip_thickness(type);
or = sclip_radius(type);
ir = or - t;
shadow = (spigot.z - or) * sin(angle) - or * cos(angle) + or + t * cos(angle);
r = sqrt(sqr(shadow) + sqr(spigot.y)) / 2;
offset = sclip_hinge_offset(type);
hpot = offset - t;
translate([sclip_length(type) - t - ir - offset + hpot * cos(angle) - (spigot.z - t) * sin(angle) + shadow / 2, 0])
drill(r + 0.1, h);
}
module swiss_clip(type, open = 0.9) { //! Draw a Swiss clip open by specified amount
vitamin(str("swiss_clip(", type[0], "): Swiss picture clip ", type[0], " ", sclip_max_gap(type),"mm"));
length = sclip_length(type);
width = sclip_width(type);
height = sclip_height(type);
spigot = sclip_spigot(type);
hook = sclip_hook(type);
offset = sclip_hinge_offset(type);
t = sclip_thickness(type);
arm_l = sclip_arm_length(type);
arm_w = sclip_arm_width(type);
w = width - 2 * arm_w;
or = sclip_radius(type);
ir = or - t;
angle = arm_angle(type, open);
angle2 = spigot_angle(type, open);
$fn = 360;
color("silver") translate([-t - ir, 0, -height + t]) {
translate([length - offset - arm_l, -w / 2]) // Narrow part of base
cube([arm_l, w, t]);
translate([length - offset, 0, t])
rotate([0, -angle2, 0])
translate([offset - length, 0, -t]) {
translate([length - offset, -width / 2]) // Wide part of base
cube([offset - spigot.x, width, t]);
translate([length - spigot.x, -spigot.y / 2]) // Spigot base
cube([spigot.x - or, spigot.y, t]);
translate([length - t, -spigot.y / 2, or]) // Spigot stem
cube([t, spigot.y, spigot.z - or]);
translate([length - or, -spigot.y / 2, or]) // Spigot bend
rotate([-90, 0, 0])
rotate_extrude(angle = 90)
translate([ir, 0])
square([t, spigot.y]);
}
translate([or, -hook.y / 2]) // Hook base
cube([hook.x, hook.y, t]);
translate([0, -hook.y / 2, or]) // Hook stem
cube([t, hook.y, height - 2 * or]);
translate([or, -hook.y / 2, or]) // Hook lower bend
rotate([0, 90, 90])
rotate_extrude(angle = 90)
translate([ir, 0])
square([t, hook.y]);
translate([or, -hook.y / 2, height - t]) // Hook top
cube([hook.x - or, hook.y, t]);
translate([or, hook.y / 2, height - or]) // Hook top bend
rotate([0, -90, 90])
rotate_extrude(angle = 90)
translate([ir, 0])
square([t, hook.y]);
translate([length - offset, 0, t]) // Arms
rotate([0, angle, 0])
for(side = [-1, 1])
translate([-arm_l, side * (arm_w + w) / 2 - arm_w / 2, -t])
cube([arm_l, arm_w, t]);
translate([length - offset, -w / 2, t]) // Central gusset
rotate([-90, 0, 0])
rotate(90 - angle2)
rotate_extrude(angle = angle2)
translate([0, 0])
square([t, w]);
for(side = [-1, 1]) // Arm gussets
translate([length - offset, side * (arm_w + w) / 2 - arm_w / 2, t])
rotate([-90, 0, 0])
rotate(90 - angle2)
rotate_extrude(angle = angle + angle2)
translate([0, 0])
square([t, arm_w]);
}
}

29
vitamins/swiss_clips.scad Normal file
View File

@ -0,0 +1,29 @@
//
// 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/>.
//
//
//! Swiss picture clip.
//! Used for holding glass on 3D printer beds.
//
UKPFS1008_10 = ["UKPFS1008_10", 39, 13, 13, 0.75, 1.5, 4, [3.5, 2.2, 4.4], [5.25, 4.12], 9, 37 - 9, 11];
swiss_clips = [ UKPFS1008_10 ];
use <swiss_clip.scad>