mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-10-02 09:56:52 +02:00
Merge branch 'martinbudden-magnet_name'
This commit is contained in:
BIN
libtest.png
BIN
libtest.png
Binary file not shown.
Before Width: | Height: | Size: 943 KiB After Width: | Height: | Size: 944 KiB |
@@ -1881,6 +1881,7 @@ Cylindrical and ring magnets.
|
|||||||
|:--- |:--- |
|
|:--- |:--- |
|
||||||
| `magnet_h(type)` | Height |
|
| `magnet_h(type)` | Height |
|
||||||
| `magnet_id(type)` | Inside diameter if a ring |
|
| `magnet_id(type)` | Inside diameter if a ring |
|
||||||
|
| `magnet_name(type)` | Name |
|
||||||
| `magnet_od(type)` | Outer diameter |
|
| `magnet_od(type)` | Outer diameter |
|
||||||
| `magnet_r(type)` | Corner radius |
|
| `magnet_r(type)` | Corner radius |
|
||||||
|
|
||||||
@@ -1894,9 +1895,10 @@ Cylindrical and ring magnets.
|
|||||||
### Vitamins
|
### Vitamins
|
||||||
| Qty | Module call | BOM entry |
|
| Qty | Module call | BOM entry |
|
||||||
| ---:|:--- |:---|
|
| ---:|:--- |:---|
|
||||||
| 1 | `magnet(MAG484)` | Magnet 6.35mm diameter, 6.35mm high, 3.175mm bore |
|
| 1 | `magnet(MAG484)` | Magnet, 6.35mm diameter, 6.35mm high, 3.175mm bore |
|
||||||
| 1 | `magnet(MAG8x4x4p2)` | Magnet 8mm diameter, 4mm high, 4.2mm bore |
|
| 1 | `magnet(MAG8x4x4p2)` | Magnet, 8mm diameter, 4mm high, 4.2mm bore |
|
||||||
| 1 | `magnet(MAG5x8)` | Magnet 8mm diameter, 5mm high |
|
| 1 | `magnet(MAG5x8)` | Magnet, 8mm diameter, 5mm high |
|
||||||
|
| 1 | `magnet(MAGRE6x2p5)` | Radial encoder magnet, 6mm diameter, 2.5mm high |
|
||||||
|
|
||||||
|
|
||||||
<a href="#top">Top</a>
|
<a href="#top">Top</a>
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 37 KiB |
@@ -22,10 +22,11 @@
|
|||||||
//
|
//
|
||||||
include <../utils/core/core.scad>
|
include <../utils/core/core.scad>
|
||||||
|
|
||||||
function magnet_od(type) = type[1]; //! Outer diameter
|
function magnet_name(type) = type[1]; //! Name
|
||||||
function magnet_id(type) = type[2]; //! Inside diameter if a ring
|
function magnet_od(type) = type[2]; //! Outer diameter
|
||||||
function magnet_h(type) = type[3]; //! Height
|
function magnet_id(type) = type[3]; //! Inside diameter if a ring
|
||||||
function magnet_r(type) = type[4]; //! Corner radius
|
function magnet_h(type) = type[4]; //! Height
|
||||||
|
function magnet_r(type) = type[5]; //! Corner radius
|
||||||
|
|
||||||
module magnet(type) { //! Draw specified magnet
|
module magnet(type) { //! Draw specified magnet
|
||||||
od = magnet_od(type);
|
od = magnet_od(type);
|
||||||
@@ -33,7 +34,7 @@ module magnet(type) { //! Draw specified magnet
|
|||||||
h = magnet_h(type);
|
h = magnet_h(type);
|
||||||
r = magnet_r(type);
|
r = magnet_r(type);
|
||||||
|
|
||||||
vitamin(str("magnet(", type[0], "): Magnet ", od, "mm diameter, ", h, "mm high", id ? str(", ", id, "mm bore") : "" ));
|
vitamin(str("magnet(", type[0], "): ", magnet_name(type), ", ", od, "mm diameter, ", h, "mm high", id ? str(", ", id, "mm bore") : "" ));
|
||||||
|
|
||||||
or = od / 2;
|
or = od / 2;
|
||||||
ir = id / 2;
|
ir = id / 2;
|
||||||
|
@@ -20,11 +20,12 @@
|
|||||||
//! Cylindrical and ring magnets.
|
//! Cylindrical and ring magnets.
|
||||||
//
|
//
|
||||||
|
|
||||||
// od, id, h, r
|
// name, od, id, h, r
|
||||||
MAG8x4x4p2 = ["MAG8x4x4p2", 8, 4.2, 4, 0.5];
|
MAG8x4x4p2 = ["MAG8x4x4p2", "Magnet", 8, 4.2, 4, 0.5];
|
||||||
MAG484 = ["MAG484", inch(1/4), inch(1/8), inch(1/4), 0.5];
|
MAG484 = ["MAG484", "Magnet", inch(1/4), inch(1/8), inch(1/4), 0.5];
|
||||||
MAG5x8 = ["MAG5x8", 8, 0, 5, 0.5];
|
MAG5x8 = ["MAG5x8", "Magnet", 8, 0, 5, 0.5];
|
||||||
|
MAGRE6x2p5 = ["MAGRE6x2p5", "Radial encoder magnet", 6, 0, 2.5, 0.5];
|
||||||
|
|
||||||
magnets = [MAG8x4x4p2, MAG484, MAG5x8];
|
magnets = [MAG8x4x4p2, MAG484, MAG5x8, MAGRE6x2p5];
|
||||||
|
|
||||||
use <magnet.scad>
|
use <magnet.scad>
|
||||||
|
Reference in New Issue
Block a user