From 77d73b075d6271c561bc9735b1a3e03e31694b58 Mon Sep 17 00:00:00 2001 From: Chris Palmer Date: Thu, 13 Aug 2020 11:55:31 +0100 Subject: [PATCH] Added opengrab_side_hole_positions() --- readme.md | 3 ++- vitamins/opengrab.scad | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/readme.md b/readme.md index eb0f915..0a97c83 100644 --- a/readme.md +++ b/readme.md @@ -1984,6 +1984,7 @@ A permanent magnet that can be magnatized and de-magnatized electronically. |:--- |:--- | | ```opengrab()``` | Draw OpenGrab module | | ```opengrab_hole_positions()``` | Position children at the screw positions | +| ```opengrab_side_hole_positions()``` | Position children at the two 4mm hole | | ```opengrab_target()``` | Draw OpenGrab target | ![opengrab](tests/png/opengrab.png) @@ -1991,8 +1992,8 @@ A permanent magnet that can be magnatized and de-magnatized electronically. ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| -| 1 | ```opengrab_target()``` | OpenGrab silicon steel target plate | | 1 | ```opengrab()``` | OpenGrab V3 electro permanent magnet | +| 1 | ```opengrab_target()``` | OpenGrab silicon steel target plate | Top diff --git a/vitamins/opengrab.scad b/vitamins/opengrab.scad index c75b643..f5d2fdf 100644 --- a/vitamins/opengrab.scad +++ b/vitamins/opengrab.scad @@ -41,6 +41,10 @@ module opengrab_hole_positions() //! Position children at the screw positions translate([x * pitch / 2, y * pitch / 2, 0]) children(); +module opengrab_side_hole_positions() //! Position children at the two 4mm hole + for(side = [-1, 1]) + translate([side * (width / 2 - 3.5), 0]) + children(); function opengrab_width() = width; //! Module width function opengrab_depth() = depth; //! Module height @@ -82,7 +86,7 @@ module opengrab() { //! Draw OpenGrab module } module opengrab_target() { //! Draw OpenGrab target - vitamin("opengrab_target(): OpenGrab silicon steel target plate"); + vitamin("opengrab_target(): OpenGrab silicon steel target plate"); color(grey(80)) linear_extrude(target) @@ -92,8 +96,7 @@ module opengrab_target() { //! Draw OpenGrab target opengrab_hole_positions() circle(d = 3.2); - for(side = [-1, 1]) - translate([side * (width / 2 - 3.5), 0]) - circle(d = 4); + opengrab_side_hole_positions() + circle(d = 4); } }