-
Notifications
You must be signed in to change notification settings - Fork 0
/
layout.exs
60 lines (54 loc) · 1.47 KB
/
layout.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
defmodule Layout do
use OpenSCAD
require Logger
alias PlantWall.Part.{HexPod, HoseConnectorHorizontal, HoseConnectorTee, HoseConnectorVertical}
def main do
[
up_column() |> translate(v: {0, 152, 0}),
down_column() |> translate(v: {0, 114, 0}),
up_column() |> translate(v: {0, 76, 0}),
down_column() |> translate(v: {0, 38, 0}),
up_column(),
down_column() |> translate(v: {0, -38, 0}),
up_column() |> translate(v: {0, -76, 0}),
down_column() |> translate(v: {0, -114, 0}),
up_column() |> translate(v: {0, -152, 0})
]
|> write("./output/layout.scad")
end
def up_column do
[
HoseConnectorHorizontal.draw()
|> translate(v: {0, 0, -6})
] ++ column()
end
def down_column do
([
HoseConnectorTee.draw()
|> rotate(a: {0, 0, 90})
|> translate(v: {0, 0, 18}),
HoseConnectorVertical.draw()
|> translate(v: {0, 0, -6})
] ++ column())
|> translate(v: {0, 0, -22})
end
def column do
[
HexPod.draw()
|> rotate(a: {90, 180, 90})
|> translate(v: {0, 0, -36}),
HexPod.draw()
|> rotate(a: {90, 180, 90})
|> translate(v: {0, 0, -79}),
HexPod.draw()
|> rotate(a: {90, 180, 90})
|> translate(v: {0, 0, -122}),
HexPod.draw()
|> rotate(a: {90, 180, 90})
|> translate(v: {0, 0, -158}),
HexPod.draw()
|> rotate(a: {90, 180, 90})
|> translate(v: {0, 0, -194})
]
end
end