mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-08-06 15:36:30 +02:00
Added smd_coax
This commit is contained in:
10
readme.md
10
readme.md
@@ -2534,6 +2534,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 1 | `smd_capacitor(CAP0603)` | SMD capacitor 0603 10nF |
|
||||
| 1 | `smd_capacitor(CAP0805)` | SMD capacitor 0805 100nF |
|
||||
| 1 | `smd_capacitor(CAP1206)` | SMD capacitor 1206 1uF |
|
||||
| 1 | `smd_coax(U_FL_R_SMT_1)` | SMD coax type: U_FL_R_SMT_1 |
|
||||
| 1 | `smd_resistor(RES0402, 1)` | SMD resistor 0402 1 0.0625W |
|
||||
| 1 | `smd_resistor(RES0502, 10)` | SMD resistor 0502 10 0.05W |
|
||||
| 1 | `smd_resistor(RES0603, 100)` | SMD resistor 0603 100 0.1W |
|
||||
@@ -3848,6 +3849,13 @@ E.g. 475A is 4.7uF 10V on the parts list.
|
||||
|:--- |:--- |
|
||||
| `smd_cap_end_cap(type)` | End cap width |
|
||||
| `smd_cap_size(type)` | Body length, width |
|
||||
| `smd_coax_base_r(type)` | Corner radius of the base |
|
||||
| `smd_coax_base_size(type)` | Size of the insulating base |
|
||||
| `smd_coax_groove(type)` | Groove id, width and z |
|
||||
| `smd_coax_lug_size(type)` | lug size |
|
||||
| `smd_coax_pin_d(type)` | Central pin diameter |
|
||||
| `smd_coax_tube(type)` | OD, ID, height |
|
||||
| `smd_contact_size(type)` | contact size |
|
||||
| `smd_diode_colour(type)` | Body colour |
|
||||
| `smd_diode_lead_z(type)` | Top of lead frame from top |
|
||||
| `smd_diode_leads(type)` | Lead extent in x, width, thickness and gap |
|
||||
@@ -3898,6 +3906,7 @@ E.g. 475A is 4.7uF 10V on the parts list.
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `smd_capacitor(type, height, value = undef)` | Draw an SMD capacitor with specified height |
|
||||
| `smd_coax(type)` | Draw an SMD coaxial connector |
|
||||
| `smd_diode(type, value)` | Draw an SMD diode |
|
||||
| `smd_inductor(type, value)` | Draw an SMD inductor |
|
||||
| `smd_led(type, colour, cutout)` | Draw an SMD LED with specified `colour` |
|
||||
@@ -3925,6 +3934,7 @@ E.g. 475A is 4.7uF 10V on the parts list.
|
||||
| 1 | `smd_capacitor(CAP0603)` | SMD capacitor 0603 |
|
||||
| 1 | `smd_capacitor(CAP0805)` | SMD capacitor 0805 |
|
||||
| 1 | `smd_capacitor(CAP1206)` | SMD capacitor 1206 |
|
||||
| 1 | `smd_coax(U_FL_R_SMT_1)` | SMD coax connector type: U_FL_R_SMT_1 |
|
||||
| 1 | `smd_resistor(RES0402, 1R0)` | SMD resistor 0402 1R0 0.0625W |
|
||||
| 1 | `smd_resistor(RES0502, 10)` | SMD resistor 0502 10 0.05W |
|
||||
| 1 | `smd_resistor(RES0603, 100)` | SMD resistor 0603 100 0.1W |
|
||||
|
@@ -80,8 +80,10 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
[ 7, 16, -90, "smd_tant", TANT_A, "105e"],
|
||||
[ 32, 3, -90, "smd_diode",DO241AC, "SS34"],
|
||||
[ 26, 2, -90, "smd_pot", TC33X1, "10K"],
|
||||
[ 28, 6, -90, "smd_sot", SOT23, "2N7000"],
|
||||
[ 28, 12, -90, "smd_sot", SOT223, "LM117"],
|
||||
[ 26, 6, -90, "smd_coax",U_FL_R_SMT_1],
|
||||
|
||||
[ 26, 10, -90, "smd_sot", SOT23, "2N7000"],
|
||||
[ 28, 16, -90, "smd_sot", SOT223, "LM117"],
|
||||
|
||||
[ 45, 35, 0, "2p54header", 4, 1],
|
||||
[ 60, 35, 0, "2p54header", 5, 1, false, "blue" ],
|
||||
|
@@ -54,6 +54,11 @@ module smds() {
|
||||
let(p = smd_pots[$i])
|
||||
smd_pot(p, "10K");
|
||||
|
||||
translate([6, 18])
|
||||
layout([for(c = smd_coaxs) smd_coax_base_size(c).x], 1)
|
||||
let(c = smd_coaxs[$i])
|
||||
smd_coax(c);
|
||||
|
||||
translate([0, 31])
|
||||
layout([for(s = smd_soics) smd_soic_size(s).x], 1)
|
||||
let(s = smd_soics[$i])
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 190 KiB After Width: | Height: | Size: 190 KiB |
Binary file not shown.
Before Width: | Height: | Size: 180 KiB After Width: | Height: | Size: 185 KiB |
@@ -1152,6 +1152,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
|
||||
if(show(comp, "smd_diode")) smd_diode(comp[4], comp[5]);
|
||||
if(show(comp, "smd_inductor")) smd_inductor(comp[4], comp[5]);
|
||||
if(show(comp, "smd_pot")) smd_pot(comp[4], comp[5]);
|
||||
if(show(comp, "smd_coax")) smd_coax(comp[4]);
|
||||
if(show(comp, "vero_pin")) vero_pin(param(4, false));
|
||||
if(show(comp, "terminal")) terminal_block(comp[5], comp[4]);
|
||||
if(show(comp, "text")) color("white") linear_extrude(eps) resize([comp[4], comp[5]]) text(comp[6], font = param(7, "Liberation Mono"), valign = "center", halign = "center");
|
||||
|
@@ -516,3 +516,65 @@ module smd_pot(type, value) { //! Draw an SMD pot
|
||||
square([track_w, track_l], center = true);
|
||||
}
|
||||
}
|
||||
|
||||
function smd_coax_base_size(type) = type[1]; //! Size of the insulating base
|
||||
function smd_coax_base_r(type) = type[2]; //! Corner radius of the base
|
||||
function smd_coax_tube(type) = type[3]; //! OD, ID, height
|
||||
function smd_coax_groove(type) = type[4]; //! Groove id, width and z
|
||||
function smd_coax_pin_d(type) = type[5]; //! Central pin diameter
|
||||
function smd_coax_lug_size(type) = type[6]; //! lug size
|
||||
function smd_contact_size(type) = type[7]; //! contact size
|
||||
|
||||
module smd_coax(type) { //! Draw an SMD coaxial connector
|
||||
vitamin(str("smd_coax(", type[0], "): SMD coax connector type: ", type[0]));
|
||||
|
||||
size = smd_coax_base_size(type);
|
||||
t = smd_coax_tube(type);
|
||||
g = smd_coax_groove(type);
|
||||
chamfer = (t.x - g.x) / 2;
|
||||
pin_r = smd_coax_pin_d(type) / 2;
|
||||
lug = smd_coax_lug_size(type);
|
||||
contact = smd_contact_size(type);
|
||||
$fn = 64;
|
||||
|
||||
color(grey(90))
|
||||
translate_z(eps)
|
||||
rounded_rectangle(size, smd_coax_base_r(type));
|
||||
|
||||
color(gold) {
|
||||
rotate_extrude() {
|
||||
polygon([
|
||||
[t.y / 2, 0.1],
|
||||
[t.y / 2, t.z],
|
||||
[g.x / 2, t.z],
|
||||
[t.x / 2, t.z - chamfer],
|
||||
[t.x / 2, g.z + g.y / 2 + chamfer],
|
||||
[g.x / 2, g.z + g.y / 2],
|
||||
[g.x / 2, g.z - g.y / 2],
|
||||
[t.x / 2, g.z - g.y / 2 - chamfer],
|
||||
[t.x / 2, 0.1],
|
||||
]);
|
||||
}
|
||||
hull() {
|
||||
translate_z(t.z - pin_r)
|
||||
sphere(pin_r);
|
||||
|
||||
translate_z(0.1)
|
||||
cylinder(r = pin_r, h = eps);
|
||||
}
|
||||
|
||||
for(side = [-1, 1])
|
||||
translate([side * size.x / 2, 0, lug.z / 2])
|
||||
cube(lug, center = true);
|
||||
|
||||
rotate(180)
|
||||
translate([-contact.x / 2, 0])
|
||||
cube([contact.x, contact.y / 2, contact.z]);
|
||||
|
||||
cylinder(r = pin_r * 9 / 5, h = 0.1);
|
||||
|
||||
tube_wall = (t.x - t.y) / 2;
|
||||
translate([-contact.x / 2, 0, (size.z - tube_wall) / 2])
|
||||
cube([contact.x, contact.y / 2, tube_wall]);
|
||||
}
|
||||
}
|
||||
|
@@ -73,4 +73,9 @@ TC33X1 = ["TC33X1", [3.0, 3.8, 0.5], [0.95, 0.9, 0.88, 1.5, 0.2, 0.75],[3.0, 0.1
|
||||
|
||||
smd_pots = [TC33X1];
|
||||
|
||||
|
||||
U_FL_R_SMT_1 = ["U_FL_R_SMT_1", [2.6, 2.6, 0.35], 0.2, [2, 1.7, 1.25], [1.86, 0.09, 0.6], 0.5, [0.4, 1.8, 0.2], [0.6, 3.1, 0.2]];
|
||||
|
||||
smd_coaxs = [U_FL_R_SMT_1];
|
||||
|
||||
use <smd.scad>
|
||||
|
Reference in New Issue
Block a user