1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-08-06 15:36:30 +02:00

Added veroboard constructor.

Documented solder_meniscus and made it parametric.
This commit is contained in:
Chris Palmer
2022-02-09 21:42:20 +00:00
parent 985b6c08d2
commit 00d6efc315
3 changed files with 10 additions and 5 deletions

View File

@@ -4227,6 +4227,7 @@ Veroboard with mounting holes, track breaks, removed tracks, solder points and c
### Functions
| Function | Description |
|:--- |:--- |
| `vero(name, assembly, holes, strips, pitch = inch(0.1)` | Constructor |
| `vero_length(type)` | Length of the board |
| `vero_size(type)` | Board size |
| `vero_thickness(type)` | Thickness of the substrate |
@@ -4237,6 +4238,7 @@ Veroboard with mounting holes, track breaks, removed tracks, solder points and c
### Modules
| Module | Description |
|:--- |:--- |
| `solder_meniscus(type, ir = 0.3, r = undef)` | Draw a solder meniscus |
| `vero_cutouts(type, angle = undef)` | Make cutouts to clear components |
| `vero_grid_pos(type, x, y)` | Convert grid position to offset from the centre |
| `vero_mounting_hole_positions(type)` | Positions children at the mounting holes |

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 KiB

After

Width:  |  Height:  |  Size: 150 KiB

View File

@@ -41,19 +41,22 @@ function vero_track_width(type) = vero_pitch(type) * 0.8; //! The width of th
function vero_length(type) = vero_holes(type) * vero_pitch(type); //! Length of the board
function vero_width(type) = vero_strips(type) * vero_pitch(type); //! Width of the board
function vero(name, assembly, holes, strips, pitch = inch(0.1), fr4 = false, screw = M3_cap_screw, mounting_holes = [], breaks = [], no_tracks = [], components = [], joints = []) = //! Constructor
[ name, assembly, holes, strips, pitch, fr4, screw, mounting_holes, breaks, no_tracks, components, joints ];
function vero_size(type) = [vero_length(type), vero_width(type), vero_thickness(type)]; //! Board size
module solder_meniscus(type) {
h = 1;
r = vero_track_width(type) / 2;
module solder_meniscus(type, ir = 0.3, r = undef) { //! Draw a solder meniscus
h = 0.7;
r = is_undef(r) ? vero_track_width(type) / 2 : r;
translate_z(vero_track_thickness(type))
color("silver") rotate_extrude()
difference() {
square([r, h]);
translate([r - eps, h + eps])
ellipse(r , h);
translate([r + eps, h + eps])
ellipse(r - ir , h, $fn = 64);
}
}