chiark
/
gitweb
/
~ianmdlvl
/
reprap-play.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3934333
)
knifeblock: Holes refactor: move holeoffx/y into HexGrid (nfc)
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Thu, 1 Jan 2015 23:54:22 +0000
(23:54 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Thu, 1 Jan 2015 23:54:22 +0000
(23:54 +0000)
knifeblock.scad
patch
|
blob
|
history
diff --git
a/knifeblock.scad
b/knifeblock.scad
index 4742458f08b5bfd4776b33b6d11c0d0239241626..603336a9ff432d196aca79156c14a7286bc43713 100644
(file)
--- a/
knifeblock.scad
+++ b/
knifeblock.scad
@@
-227,8
+227,8
@@
module HolesScope(){
module HexGrid(imin,imax,jmin,jmax) {
for (i=[imin:imax]) {
for (j=[jmin:jmax]) {
module HexGrid(imin,imax,jmin,jmax) {
for (i=[imin:imax]) {
for (j=[jmin:jmax]) {
- translate([
j * sqrt(3
) * holepitch,
- (i
+0.5)*
holepitch,
+ translate([
(j * sqrt(3) + holeoffx
) * holepitch,
+ (i
+ 0.5 + holeoffy) *
holepitch,
0]) {
child();
translate([sqrt(3)/2 * holepitch, -0.5 * holepitch, 0])
0]) {
child();
translate([sqrt(3)/2 * holepitch, -0.5 * holepitch, 0])
@@
-248,7
+248,7
@@
module Holes(){
jmin = ceil((maxx-minx)/(sqrt(3)*holepitch));
echo("Holes X count 2 x", jmin);
intersection(){
jmin = ceil((maxx-minx)/(sqrt(3)*holepitch));
echo("Holes X count 2 x", jmin);
intersection(){
- translate([
holeoffx * holepitch, holeoffy * holepitch
, -20])
+ translate([
0, 0
, -20])
HexGrid(0,imax,-jmin,2)
Hole();
HolesScope();
HexGrid(0,imax,-jmin,2)
Hole();
HolesScope();