mirror of
https://github.com/DJSundog/NopSCADlib.git
synced 2024-11-27 01:03:51 -05:00
Added PCB components to OpenGrab and functions to access PCB.
This commit is contained in:
parent
8d8df3cb8a
commit
afac5f9737
BIN
libtest.png
BIN
libtest.png
Binary file not shown.
Before Width: | Height: | Size: 817 KiB After Width: | Height: | Size: 818 KiB |
@ -2010,6 +2010,8 @@ A permanent magnet that can be magnatized and de-magnatized electronically.
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```opengrab_depth()``` | Module height |
|
||||
| ```opengrab_pcb()``` | The PCB |
|
||||
| ```opengrab_pcb_z()``` | PCB offset from the front |
|
||||
| ```opengrab_target_thickness()``` | Target sheet thickness |
|
||||
| ```opengrab_width()``` | Module width |
|
||||
|
||||
|
@ -21,9 +21,9 @@ include <../utils/core/core.scad>
|
||||
use <../vitamins/opengrab.scad>
|
||||
|
||||
module opengrab_test() {
|
||||
rotate(45)
|
||||
opengrab_target();
|
||||
|
||||
rotate(45)
|
||||
translate_z(opengrab_target_thickness())
|
||||
opengrab();
|
||||
}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 97 KiB |
@ -24,18 +24,27 @@
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
use <../utils/thread.scad>
|
||||
use <pcb.scad>
|
||||
include <smds.scad>
|
||||
|
||||
pitch = 33.8 / 2;
|
||||
width = 40;
|
||||
depth = 18;
|
||||
magnet = 4.3;
|
||||
pcb = 0.8;
|
||||
pillar = 6;
|
||||
target = 1;
|
||||
pole_w = 2;
|
||||
pole_l = 36;
|
||||
poles = 15;
|
||||
|
||||
pcb = ["", "", width, width, 0.8, 0, 3.5, 0, "darkgreen", false, [],
|
||||
[ [ 3.45, 19, 0, "button_4p5mm"],
|
||||
[ 2.75, 24.5, 0, "smd_led", LED0805, "green"],
|
||||
[ 2.75, 28.0, 0, "smd_led", LED0805, "red"],
|
||||
[ 28.5, 13, 0, "2p54header", 3, 1, false, undef, true],
|
||||
]];
|
||||
|
||||
|
||||
module opengrab_hole_positions() //! Position children at the screw positions
|
||||
let($d = 3.2)
|
||||
for($x = [-pitch, pitch], $y = [-pitch, pitch])
|
||||
@ -51,6 +60,8 @@ module opengrab_side_hole_positions() //! Position children at the two 4mm hole
|
||||
function opengrab_width() = width; //! Module width
|
||||
function opengrab_depth() = depth; //! Module height
|
||||
function opengrab_target_thickness() = target; //! Target sheet thickness
|
||||
function opengrab_pcb() = pcb; //! The PCB
|
||||
function opengrab_pcb_z() = depth - pillar - pcb_thickness(pcb); //! PCB offset from the front
|
||||
|
||||
module opengrab() { //! Draw OpenGrab module
|
||||
vitamin("opengrab(): OpenGrab V3 electro permanent magnet");
|
||||
@ -67,10 +78,9 @@ module opengrab() { //! Draw OpenGrab module
|
||||
cube([pole_w, pole_l, 1], center = true);
|
||||
}
|
||||
|
||||
color("darkgreen")
|
||||
translate_z(depth - pillar - pcb / 2)
|
||||
cube([width, width, pcb], center = true);
|
||||
|
||||
not_on_bom()
|
||||
translate_z(opengrab_pcb_z())
|
||||
pcb(pcb);
|
||||
|
||||
translate_z(1)
|
||||
opengrab_hole_positions() {
|
||||
|
Loading…
Reference in New Issue
Block a user