mirror of
https://github.com/DJSundog/NopSCADlib.git
synced 2024-11-23 15:23: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 |
|
| Function | Description |
|
||||||
|:--- |:--- |
|
|:--- |:--- |
|
||||||
| ```opengrab_depth()``` | Module height |
|
| ```opengrab_depth()``` | Module height |
|
||||||
|
| ```opengrab_pcb()``` | The PCB |
|
||||||
|
| ```opengrab_pcb_z()``` | PCB offset from the front |
|
||||||
| ```opengrab_target_thickness()``` | Target sheet thickness |
|
| ```opengrab_target_thickness()``` | Target sheet thickness |
|
||||||
| ```opengrab_width()``` | Module width |
|
| ```opengrab_width()``` | Module width |
|
||||||
|
|
||||||
|
@ -21,11 +21,11 @@ include <../utils/core/core.scad>
|
|||||||
use <../vitamins/opengrab.scad>
|
use <../vitamins/opengrab.scad>
|
||||||
|
|
||||||
module opengrab_test() {
|
module opengrab_test() {
|
||||||
opengrab_target();
|
|
||||||
|
|
||||||
rotate(45)
|
rotate(45)
|
||||||
translate_z(opengrab_target_thickness())
|
opengrab_target();
|
||||||
opengrab();
|
|
||||||
|
translate_z(opengrab_target_thickness())
|
||||||
|
opengrab();
|
||||||
}
|
}
|
||||||
|
|
||||||
if($preview)
|
if($preview)
|
||||||
|
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>
|
include <../utils/core/core.scad>
|
||||||
use <../utils/thread.scad>
|
use <../utils/thread.scad>
|
||||||
|
use <pcb.scad>
|
||||||
|
include <smds.scad>
|
||||||
|
|
||||||
pitch = 33.8 / 2;
|
pitch = 33.8 / 2;
|
||||||
width = 40;
|
width = 40;
|
||||||
depth = 18;
|
depth = 18;
|
||||||
magnet = 4.3;
|
magnet = 4.3;
|
||||||
pcb = 0.8;
|
|
||||||
pillar = 6;
|
pillar = 6;
|
||||||
target = 1;
|
target = 1;
|
||||||
pole_w = 2;
|
pole_w = 2;
|
||||||
pole_l = 36;
|
pole_l = 36;
|
||||||
poles = 15;
|
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
|
module opengrab_hole_positions() //! Position children at the screw positions
|
||||||
let($d = 3.2)
|
let($d = 3.2)
|
||||||
for($x = [-pitch, pitch], $y = [-pitch, pitch])
|
for($x = [-pitch, pitch], $y = [-pitch, pitch])
|
||||||
@ -48,9 +57,11 @@ module opengrab_side_hole_positions() //! Position children at the two 4mm hole
|
|||||||
translate([$x, 0])
|
translate([$x, 0])
|
||||||
children();
|
children();
|
||||||
|
|
||||||
function opengrab_width() = width; //! Module width
|
function opengrab_width() = width; //! Module width
|
||||||
function opengrab_depth() = depth; //! Module height
|
function opengrab_depth() = depth; //! Module height
|
||||||
function opengrab_target_thickness() = target; //! Target sheet thickness
|
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
|
module opengrab() { //! Draw OpenGrab module
|
||||||
vitamin("opengrab(): OpenGrab V3 electro permanent magnet");
|
vitamin("opengrab(): OpenGrab V3 electro permanent magnet");
|
||||||
@ -67,10 +78,9 @@ module opengrab() { //! Draw OpenGrab module
|
|||||||
cube([pole_w, pole_l, 1], center = true);
|
cube([pole_w, pole_l, 1], center = true);
|
||||||
}
|
}
|
||||||
|
|
||||||
color("darkgreen")
|
not_on_bom()
|
||||||
translate_z(depth - pillar - pcb / 2)
|
translate_z(opengrab_pcb_z())
|
||||||
cube([width, width, pcb], center = true);
|
pcb(pcb);
|
||||||
|
|
||||||
|
|
||||||
translate_z(1)
|
translate_z(1)
|
||||||
opengrab_hole_positions() {
|
opengrab_hole_positions() {
|
||||||
|
Loading…
Reference in New Issue
Block a user