-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfluidmix3.shape
79 lines (68 loc) · 2.62 KB
/
fluidmix3.shape
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
##preamble \usepackage{mlsstyle}
##needs ..Shapes..Layout / centering-X
##needs ..Applications..Blockdraw
##needs fluidmix-common.shext
##lookin ..Shapes..Graphics
##lookin ..Shapes..Geometry
##lookin ..Shapes..Layout
##lookin ..Shapes..Traits
##lookin ..Shapes..Data
##lookin ..Shapes..IO
##lookin ..Shapes..Numeric..Math
##lookin ..Applications..Blockdraw
box_ry: 7mm
box_len: 38mm
boxPth: [rectangle (0mm,~box_ry) (box_len,box_ry)] >> [shift (box_ry * [tan 30°], 0)]
leftBox: \ lbl →
{
[[shift (2mm, 0)] [center_y lbl]]
} >> [shift (box_ry * [tan 30°], 0)]
rightBox: \ lbl →
{
[[shift (2mm - box_len, 0)] [center_y lbl]]
} >> [shift (~box_ry * [tan 30°], 0)]
openBox: [boxPth 0]--[boxPth 2]
border:
[[range '0 '2].foldl \ p e → p--(openBox >> [rotate e * 120°]) emptypath]--cycle
permeablePth:
[[range '0 '2].foldl \ p e → p--[[rotate e * 120°] [boxPth 0].p] emptypath]--cycle
•page << @fill:fluid_blue & @width:0.3bp | [fillstroke border]
•page << permeableDash & @width:0.3bp | [stroke permeablePth]
•page << [rightBox [TeX `\begin{minipage}{34mm}\begin{flushright}$m_{\mathrm{flow},1}$, $h_{\mathrm{outflow},1}$\\\lstinline!inStream($h_{\mathrm{outflow},1}$)!\end{flushright}\end{minipage}´]] >> [rotate 60°]
•page << [rightBox [TeX `\begin{minipage}{34mm}\begin{flushright}$m_{\mathrm{flow},2}$, $h_{\mathrm{outflow},2}$\\\lstinline!inStream($h_{\mathrm{outflow},2}$)!\end{flushright}\end{minipage}´]] >> [rotate ~60°]
•page << [leftBox [TeX `\begin{minipage}{34mm}\lstinline!inStream($h_{\mathrm{outflow},3}$)!\\$m_{\mathrm{flow},3}$, $h_{\mathrm{outflow},3}$\end{minipage}´]]
@width: 0.8bp
|
{
lbl_x: box_ry * [tan 30°] + 1.8mm
@stroke: flow_red
& @fill: flow_red
|
{
c: 0.4 * box_ry * [dir 60°]
•page << [stroke c--[[rotate 0°] (lbl_x,~1.8mm)]]
•page << [stroke c--[[rotate 120°] (lbl_x,~2.2mm)]]
•page << [stroke c--[[rotate 240°] (lbl_x,2mm)] head:flow_head]
•page << [fill flowJointPth >> [shift c]]
}
@stroke: flow_green
& @fill: flow_green
|
{
c: 0.4 * box_ry * [dir 180°]
•page << [stroke c--[[rotate 0°] (lbl_x,2mm)] head:flow_head]
•page << [stroke c--[[rotate 120°] (lbl_x,~1.8mm)]]
•page << [stroke c--[[rotate 240°] (lbl_x,~2.2mm)]]
•page << [fill flowJointPth >> [shift c]]
}
@stroke: flow_purple
& @fill: flow_purple
|
{
c: 0.4 * box_ry * [dir ~60°]
•page << [stroke c--[[rotate 0°] (lbl_x,~2.2mm)]]
•page << [stroke c--[[rotate 120°] (lbl_x,2mm)] head:flow_head]
•page << [stroke c--[[rotate 240°] (lbl_x,~1.8mm)]]
•page << [fill flowJointPth >> [shift c]]
}
}