mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-08-01 21:20:11 +02:00
Added pcb_grid_components() module for placing parts on a perfboard.
This commit is contained in:
@@ -2355,6 +2355,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
|||||||
| `pcb_components(type, cutouts = false, angle = undef)` | Draw list of PCB components on the PCB |
|
| `pcb_components(type, cutouts = false, angle = undef)` | Draw list of PCB components on the PCB |
|
||||||
| `pcb_cutouts(type, angle = undef)` | Make cut outs to clear components on a PCB |
|
| `pcb_cutouts(type, angle = undef)` | Make cut outs to clear components on a PCB |
|
||||||
| `pcb_grid(type, x, y, z = 0)` | Positions children at specified grid position |
|
| `pcb_grid(type, x, y, z = 0)` | Positions children at specified grid position |
|
||||||
|
| `pcb_grid_components(type, components, cutouts = false, angle = undef)` | Draw list of components on the PCB grid for perf board |
|
||||||
| `pcb_screw_positions(type)` | Positions children at the mounting hole positions |
|
| `pcb_screw_positions(type)` | Positions children at the mounting hole positions |
|
||||||
| `pcb_spacer(screw, height, wall = 1.8, taper = 0)` | Generate STL for PCB spacer |
|
| `pcb_spacer(screw, height, wall = 1.8, taper = 0)` | Generate STL for PCB spacer |
|
||||||
| `rj45(cutout = false)` | Draw RJ45 Ethernet connector |
|
| `rj45(cutout = false)` | Draw RJ45 Ethernet connector |
|
||||||
@@ -2498,6 +2499,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
|||||||
| `pcb_components(type, cutouts = false, angle = undef)` | Draw list of PCB components on the PCB |
|
| `pcb_components(type, cutouts = false, angle = undef)` | Draw list of PCB components on the PCB |
|
||||||
| `pcb_cutouts(type, angle = undef)` | Make cut outs to clear components on a PCB |
|
| `pcb_cutouts(type, angle = undef)` | Make cut outs to clear components on a PCB |
|
||||||
| `pcb_grid(type, x, y, z = 0)` | Positions children at specified grid position |
|
| `pcb_grid(type, x, y, z = 0)` | Positions children at specified grid position |
|
||||||
|
| `pcb_grid_components(type, components, cutouts = false, angle = undef)` | Draw list of components on the PCB grid for perf board |
|
||||||
| `pcb_screw_positions(type)` | Positions children at the mounting hole positions |
|
| `pcb_screw_positions(type)` | Positions children at the mounting hole positions |
|
||||||
| `pcb_spacer(screw, height, wall = 1.8, taper = 0)` | Generate STL for PCB spacer |
|
| `pcb_spacer(screw, height, wall = 1.8, taper = 0)` | Generate STL for PCB spacer |
|
||||||
| `rj45(cutout = false)` | Draw RJ45 Ethernet connector |
|
| `rj45(cutout = false)` | Draw RJ45 Ethernet connector |
|
||||||
|
@@ -1093,6 +1093,19 @@ module pcb_components(type, cutouts = false, angle = undef) { //! Draw list of P
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module pcb_grid_components(type, components, cutouts = false, angle = undef) //! Draw list of components on the PCB grid for perf board
|
||||||
|
for(comp = components) {
|
||||||
|
p = pcb_grid_pos(type, comp.x, comp.y);
|
||||||
|
if(comp[3][0] == "-")
|
||||||
|
translate([p.x, p.y])
|
||||||
|
vflip()
|
||||||
|
pcb_component(comp, cutouts, angle);
|
||||||
|
else
|
||||||
|
translate([p.x, p.y, pcb_thickness(type)])
|
||||||
|
pcb_component(comp, cutouts, angle);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
module pcb_cutouts(type, angle = undef) pcb_components(type, true, angle); //! Make cut outs to clear components on a PCB
|
module pcb_cutouts(type, angle = undef) pcb_components(type, true, angle); //! Make cut outs to clear components on a PCB
|
||||||
|
|
||||||
module pcb_grid_positions(type) {
|
module pcb_grid_positions(type) {
|
||||||
|
Reference in New Issue
Block a user