mirror of
https://github.com/DJSundog/NopSCADlib.git
synced 2024-11-23 07:13:51 -05:00
Added crimp version of ring terminal.
This commit is contained in:
parent
1c221ad612
commit
1944039f22
Binary file not shown.
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 149 KiB |
@ -24,7 +24,7 @@ include <../vitamins/ring_terminals.scad>
|
||||
|
||||
module ring_terminals()
|
||||
layout([for(t = ring_terminals) ringterm_od(t)], 5)
|
||||
rotate(90)
|
||||
rotate(180)
|
||||
ring_terminal_assembly(ring_terminals[$i], 3);
|
||||
|
||||
if($preview)
|
||||
|
@ -33,26 +33,73 @@ function ringterm_width(type) = type[4]; //! Width of the tail
|
||||
function ringterm_hole(type) = type[5]; //! Wire hole diameter
|
||||
function ringterm_thickness(type) = type[6]; //! Metal thickness
|
||||
function ringterm_screw(type) = type[7]; //! Screw type
|
||||
function ringterm_crimp_length(type) = type[8]; //! If non-zero the length of the crimp tube
|
||||
function ringterm_extent(type) = ringterm_length(type) / sqrt(2); //! Space to leave
|
||||
|
||||
module ring_terminal(type) { //! Draw specifeid ring terminal
|
||||
screw = ringterm_screw(type);
|
||||
d = 2 * screw_radius(screw);
|
||||
vitamin(str("ring_terminal(", type[0], "): Ring terminal ",d,"mm"));
|
||||
crimp = ringterm_crimp_length(type);
|
||||
vitamin(str("ring_terminal(", type[0], "): Ring terminal ", crimp ? "crimp " : "", d, "mm"));
|
||||
|
||||
t = ringterm_thickness(type);
|
||||
w = ringterm_width(type);
|
||||
od = ringterm_od(type);
|
||||
id = ringterm_id(type);
|
||||
l = ringterm_length(type);
|
||||
angle = 45;
|
||||
bend = washer_radius(screw_washer(screw)) + t * tan(angle / 2);
|
||||
angle = crimp ? 0 : 45;
|
||||
transition = 1;
|
||||
bend = crimp ? l - od / 2 - crimp - transition : washer_radius(screw_washer(screw)) + t * tan(angle / 2);
|
||||
hole_d = ringterm_hole(type);
|
||||
|
||||
module hull_if_crimp()
|
||||
if(crimp)
|
||||
hull()
|
||||
children();
|
||||
else
|
||||
children();
|
||||
|
||||
color("silver") union() {
|
||||
tube(or = od / 2, ir = id / 2, h = t, center = false);
|
||||
linear_extrude(height = t)
|
||||
difference() {
|
||||
hull_if_crimp() {
|
||||
circle(d = od);
|
||||
|
||||
translate([-w / 2, -bend, 0])
|
||||
cube([w, bend - id / 2, t]);
|
||||
square([w, bend - id / 2]);
|
||||
}
|
||||
circle(d = id);
|
||||
}
|
||||
|
||||
if(crimp) {
|
||||
translate([0, -bend, w / 2])
|
||||
rotate([90, 0, 0]) {
|
||||
render() difference() {
|
||||
union() {
|
||||
translate_z(transition)
|
||||
cylinder(d = w, h = crimp);
|
||||
|
||||
hull() {
|
||||
translate_z(transition)
|
||||
cylinder(d = w, h = eps);
|
||||
|
||||
translate([-w / 2, -w / 2])
|
||||
cube([w, t, eps]);
|
||||
}
|
||||
}
|
||||
hull() {
|
||||
translate_z(-eps)
|
||||
cylinder(d = w - 2 * t, h = crimp + transition + 2 * eps);
|
||||
|
||||
translate([-w / 2 + t, -w / 2 + t])
|
||||
cube([w - 2 * t, w / 2 - t, eps]);
|
||||
}
|
||||
translate([0, w / 2])
|
||||
cube([0.1, w, 100], center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
translate([0, -bend])
|
||||
rotate([-angle, 0, 0])
|
||||
linear_extrude(height = t)
|
||||
@ -65,8 +112,9 @@ module ring_terminal(type) { //! Draw specifeid ring terminal
|
||||
translate([0, -length + w / 2])
|
||||
circle(d = w);
|
||||
}
|
||||
if(hole_d)
|
||||
translate([0, -length + w / 2])
|
||||
circle(d = ringterm_hole(type));
|
||||
circle(d = hole_d);
|
||||
}
|
||||
}
|
||||
translate_z(ringterm_thickness(type))
|
||||
|
@ -20,16 +20,17 @@
|
||||
//
|
||||
// Ring terminals
|
||||
//
|
||||
// o i l w h t s
|
||||
// d d e i o h c
|
||||
// n d l i r
|
||||
// g t e c e
|
||||
// t h k w
|
||||
// o i l w h t s c
|
||||
// d d e i o h c r
|
||||
// n d l i r i
|
||||
// g t e c e m
|
||||
// t h k w p
|
||||
// h
|
||||
//
|
||||
M3_ringterm = ["M3_ringterm", 6, 3, 12, 3, 1.5, 0.2, M3_dome_screw];
|
||||
M3_ringterm_cs = ["M3_ringterm_cs", 6, 3, 12, 3, 1.5, 0.2, M3_cap_screw];
|
||||
M3_ringterm = ["M3_ringterm", 6, 3, 12, 3, 1.5, 0.2, M3_dome_screw, 0];
|
||||
M3_ringterm_cs = ["M3_ringterm_cs", 6, 3, 12, 3, 1.5, 0.2, M3_cap_screw, 0];
|
||||
M3_ringterm_crimp = ["M3_ringterm_crimp", 5.5, 3, 13, 4.1, 0, 0.7, M3_dome_screw, 4.5];
|
||||
|
||||
ring_terminals = [M3_ringterm, M3_ringterm_cs];
|
||||
ring_terminals = [M3_ringterm, M3_ringterm_cs, M3_ringterm_crimp];
|
||||
|
||||
use <ring_terminal.scad>
|
||||
|
Loading…
Reference in New Issue
Block a user