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()
|
module ring_terminals()
|
||||||
layout([for(t = ring_terminals) ringterm_od(t)], 5)
|
layout([for(t = ring_terminals) ringterm_od(t)], 5)
|
||||||
rotate(90)
|
rotate(180)
|
||||||
ring_terminal_assembly(ring_terminals[$i], 3);
|
ring_terminal_assembly(ring_terminals[$i], 3);
|
||||||
|
|
||||||
if($preview)
|
if($preview)
|
||||||
|
@ -26,48 +26,96 @@ use <nut.scad>
|
|||||||
use <washer.scad>
|
use <washer.scad>
|
||||||
use <../utils/tube.scad>
|
use <../utils/tube.scad>
|
||||||
|
|
||||||
function ringterm_od(type) = type[1]; //! Outside diameter
|
function ringterm_od(type) = type[1]; //! Outside diameter
|
||||||
function ringterm_id(type) = type[2]; //! Inside diameter
|
function ringterm_id(type) = type[2]; //! Inside diameter
|
||||||
function ringterm_length(type) = type[3]; //! Length of the tail including the ring
|
function ringterm_length(type) = type[3]; //! Length of the tail including the ring
|
||||||
function ringterm_width(type) = type[4]; //! Width of the tail
|
function ringterm_width(type) = type[4]; //! Width of the tail
|
||||||
function ringterm_hole(type) = type[5]; //! Wire hole diameter
|
function ringterm_hole(type) = type[5]; //! Wire hole diameter
|
||||||
function ringterm_thickness(type) = type[6]; //! Metal thickness
|
function ringterm_thickness(type) = type[6]; //! Metal thickness
|
||||||
function ringterm_screw(type) = type[7]; //! Screw type
|
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
|
function ringterm_extent(type) = ringterm_length(type) / sqrt(2); //! Space to leave
|
||||||
|
|
||||||
module ring_terminal(type) { //! Draw specifeid ring terminal
|
module ring_terminal(type) { //! Draw specifeid ring terminal
|
||||||
screw = ringterm_screw(type);
|
screw = ringterm_screw(type);
|
||||||
d = 2 * screw_radius(screw);
|
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);
|
t = ringterm_thickness(type);
|
||||||
w = ringterm_width(type);
|
w = ringterm_width(type);
|
||||||
od = ringterm_od(type);
|
od = ringterm_od(type);
|
||||||
id = ringterm_id(type);
|
id = ringterm_id(type);
|
||||||
l = ringterm_length(type);
|
l = ringterm_length(type);
|
||||||
angle = 45;
|
angle = crimp ? 0 : 45;
|
||||||
bend = washer_radius(screw_washer(screw)) + t * tan(angle / 2);
|
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() {
|
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])
|
translate([-w / 2, -bend, 0])
|
||||||
cube([w, bend - id / 2, t]);
|
square([w, bend - id / 2]);
|
||||||
|
}
|
||||||
|
circle(d = id);
|
||||||
|
}
|
||||||
|
|
||||||
translate([0, -bend])
|
if(crimp) {
|
||||||
rotate([-angle, 0, 0])
|
translate([0, -bend, w / 2])
|
||||||
linear_extrude(height = t)
|
rotate([90, 0, 0]) {
|
||||||
difference() {
|
render() difference() {
|
||||||
length = l - od / 2 - bend;
|
union() {
|
||||||
hull() {
|
translate_z(transition)
|
||||||
translate([-w / 2, -eps])
|
cylinder(d = w, h = crimp);
|
||||||
square([w, eps]);
|
|
||||||
|
|
||||||
translate([0, -length + w / 2])
|
hull() {
|
||||||
circle(d = w);
|
translate_z(transition)
|
||||||
|
cylinder(d = w, h = eps);
|
||||||
|
|
||||||
|
translate([-w / 2, -w / 2])
|
||||||
|
cube([w, t, eps]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
translate([0, -length + w / 2])
|
hull() {
|
||||||
circle(d = ringterm_hole(type));
|
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)
|
||||||
|
difference() {
|
||||||
|
length = l - od / 2 - bend;
|
||||||
|
hull() {
|
||||||
|
translate([-w / 2, -eps])
|
||||||
|
square([w, eps]);
|
||||||
|
|
||||||
|
translate([0, -length + w / 2])
|
||||||
|
circle(d = w);
|
||||||
|
}
|
||||||
|
if(hole_d)
|
||||||
|
translate([0, -length + w / 2])
|
||||||
|
circle(d = hole_d);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
translate_z(ringterm_thickness(type))
|
translate_z(ringterm_thickness(type))
|
||||||
children();
|
children();
|
||||||
|
@ -20,16 +20,17 @@
|
|||||||
//
|
//
|
||||||
// Ring terminals
|
// Ring terminals
|
||||||
//
|
//
|
||||||
// o i l w h t s
|
// o i l w h t s c
|
||||||
// d d e i o h c
|
// d d e i o h c r
|
||||||
// n d l i r
|
// n d l i r i
|
||||||
// g t e c e
|
// g t e c e m
|
||||||
// t h k w
|
// t h k w p
|
||||||
// h
|
// h
|
||||||
//
|
//
|
||||||
M3_ringterm = ["M3_ringterm", 6, 3, 12, 3, 1.5, 0.2, M3_dome_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];
|
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>
|
use <ring_terminal.scad>
|
||||||
|
Loading…
Reference in New Issue
Block a user