mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-08-07 07:56:30 +02:00
Added vero_grid_pos() function.
This commit is contained in:
@@ -4424,6 +4424,7 @@ Veroboard with mounting holes, track breaks, removed tracks, solder points and c
|
|||||||
| Function | Description |
|
| Function | Description |
|
||||||
|:--- |:--- |
|
|:--- |:--- |
|
||||||
| `vero(name, assembly, holes, strips, pitch = 2.54, fr4 = false, screw = M3_cap_screw, mounting_holes = [], breaks = [], no_tracks = [], components = [], joints = [])` | Constructor |
|
| `vero(name, assembly, holes, strips, pitch = 2.54, fr4 = false, screw = M3_cap_screw, mounting_holes = [], breaks = [], no_tracks = [], components = [], joints = [])` | Constructor |
|
||||||
|
| `vero_grid_pos(type, x, y)` | Convert grid position to offset from the centre |
|
||||||
| `vero_length(type)` | Length of the board |
|
| `vero_length(type)` | Length of the board |
|
||||||
| `vero_size(type)` | Board size |
|
| `vero_size(type)` | Board size |
|
||||||
| `vero_thickness(type)` | Thickness of the substrate |
|
| `vero_thickness(type)` | Thickness of the substrate |
|
||||||
|
@@ -60,13 +60,14 @@ module solder_meniscus(type, ir = 0.3, r = undef) { //! Draw a solder meniscus
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module vero_grid_pos(type, x, y) { //! Convert grid position to offset from the centre
|
function vero_grid_pos(type, x, y) = //! Convert grid position to offset from the centre
|
||||||
holes = vero_holes(type);
|
let(holes = vero_holes(type), strips = vero_strips(type))
|
||||||
strips = vero_strips(type);
|
[((x + holes) % holes) - holes / 2 + 0.5,
|
||||||
translate([((x + holes) % holes) - holes / 2 + 0.5,
|
((y + strips) % strips) - strips / 2 + 0.5] * vero_pitch(type);
|
||||||
((y + strips) % strips) - strips / 2 + 0.5] * vero_pitch(type))
|
|
||||||
|
module vero_grid_pos(type, x, y) //! Convert grid position to offset from the centre
|
||||||
|
translate(vero_grid_pos(type, x, y))
|
||||||
children();
|
children();
|
||||||
}
|
|
||||||
|
|
||||||
module vero_mounting_hole_positions(type) //! Positions children at the mounting holes
|
module vero_mounting_hole_positions(type) //! Positions children at the mounting holes
|
||||||
for(p = vero_mounting_holes(type))
|
for(p = vero_mounting_holes(type))
|
||||||
|
Reference in New Issue
Block a user