mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-09-04 12:45:30 +02:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
fbe8533a42 | ||
|
a9c2f854c6 |
@@ -24,6 +24,8 @@ $extrusion_width = 0.5;
|
||||
|
||||
include <../utils/core/core.scad>
|
||||
|
||||
function carrier_height() = 3; //! Height of PCB carrier
|
||||
|
||||
module ESP12F_carrier_stl() { //! Generate the STL for an ESP12 carrier
|
||||
stl("ESP12F_carrier");
|
||||
pins = 8;
|
||||
@@ -33,7 +35,7 @@ module ESP12F_carrier_stl() { //! Generate the STL for an ESP12 carrier
|
||||
hole2 = pitch2 - 3 * extrusion_width;
|
||||
length1 = (pins - 1) * pitch1 + hole + squeezed_wall * 2;
|
||||
length2 = (pins - 1) * pitch2 + hole + squeezed_wall * 2;
|
||||
height = 3;
|
||||
height = carrier_height();
|
||||
|
||||
wpitch1 = (pins - 1) * pitch1;
|
||||
wpitch2 = ceil(wpitch1 / 2.54) * 2.54;
|
||||
@@ -71,7 +73,7 @@ module TP4056_carrier_stl() { //! Generate the STL for an TP4056 carrier, two re
|
||||
pins = 6;
|
||||
length1 = outer_pitch + hole + squeezed_wall * 2;
|
||||
length2 = (pins - 1) * pitch + hole + squeezed_wall * 2;
|
||||
height = 3;
|
||||
height = carrier_height();
|
||||
|
||||
width = hole + squeezed_wall * 2;
|
||||
spacing = inch(0.9);
|
||||
@@ -106,7 +108,7 @@ module MT3608_carrier_stl() { //! Generate the STL for an MT3608 carrier, two re
|
||||
l_pitch_top = 30.855;
|
||||
l_pitch_bot = inch(1.2);
|
||||
hole = 1;
|
||||
height = 3;
|
||||
height = carrier_height();
|
||||
wall = 2 * extrusion_width;
|
||||
width = hole + 2 * wall;
|
||||
offset = (l_pitch_top - l_pitch_bot) / 2;
|
||||
|
@@ -3800,6 +3800,11 @@ Adapts ESP12 modules and various small PCBs to 0.1" grid. See <https://hydrarapt
|
||||
|
||||
[tests/carriers.scad](tests/carriers.scad) Code for this example.
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```carrier_height()``` | Height of PCB carrier |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
|
@@ -887,10 +887,20 @@ module pcb(type) { //! Draw specified PCB
|
||||
circle(d = 1 + eps);
|
||||
}
|
||||
|
||||
land = pcb_land_d(type);
|
||||
hole = pcb_hole_d(type);
|
||||
color("silver")
|
||||
translate_z(t / 2)
|
||||
pcb_hole_positions(type)
|
||||
tube(or = max(pcb_land_d(type), 1) / 2, ir = pcb_hole_d(type) / 2, h = t + 2 * eps);
|
||||
if(is_list(land))
|
||||
linear_extrude(height = t + 2 * eps, center = true)
|
||||
difference() {
|
||||
square(land, center = true);
|
||||
|
||||
circle(d = hole);
|
||||
}
|
||||
else
|
||||
tube(or = max(land, 1) / 2, ir = hole / 2, h = t + 2 * eps);
|
||||
|
||||
fr4 = pcb_colour(type) != "sienna";
|
||||
plating = 0.15;
|
||||
|
Reference in New Issue
Block a user