Updating examples to new organization of namespaces
[shapes.git] / examples / showcase / bonddemo.shape
blob87c4c4a0687f0b5b78820f785c82799a8008402c
1 /** This file is part of Shapes.
2  **
3  ** Shapes is free software: you can redistribute it and/or modify
4  ** it under the terms of the GNU General Public License as published by
5  ** the Free Software Foundation, either version 3 of the License, or
6  ** any later version.
7  **
8  ** Shapes is distributed in the hope that it will be useful,
9  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
10  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  ** GNU General Public License for more details.
12  **
13  ** You should have received a copy of the GNU General Public License
14  ** along with Shapes.  If not, see <http://www.gnu.org/licenses/>.
15  **
16  ** Copyright 2008, 2010, 2014 Henrik Tidefelt
17  **/
19 ##needs ..Applications..Blockdraw
21 ##lookin ..Shapes
22 ##lookin ..Applications..Blockdraw
24 ##unit u = 2cm
26 ##echo Processing bonddemo.shape
28 @connectionlw: 0.6bp
31   j1: [putblockOrigin •page [shift (1u,1u)] [] sjunction]
32   j2: [putblockOrigin •page [shift (2u,1u)] [] [gyjunction Layout..to_rt [TeX `$\mu$´]]]
33   j3: [putblockOrigin •page [shift (3u,1u)] [] sjunction]
34   j4: [putblockOrigin •page [shift (4u,1u)] [] [tfjunction Layout..to_rt [TeX `$r$´]]]
35   j5: [putblockOrigin •page [shift (5u,1u)] [] pjunction]
36   j6: [putblockOrigin •page [shift (5u,~0.5u)][] sjunction]
37   j7: [putblockOrigin •page [shift (5u,2u)] [] sjunction]
39   •page << tbond [] [bgconnect j1 j2]
40   •page << hbond [] [bgconnect j2 j3]
41   •page << tbond [] [bgconnect j3 j4]
42   •page << tbond [] [bgconnect j4 j5]
43   •page << hbond [] [bgconnect j5 j6]
44   •page << tbond [] [bgconnect j5 j7]
46   •page << tbond [] [terminalfrom •page j1 (1u,0u) [TeX `R: $\phi_{1}(\bullet)$´]]
47   •page << hbond [] [terminalfrom •page j1 (1u,2u) [TeX `I: $m_{1}$´]]
48   •page << hbond [] [terminalfrom •page j3 (3u,2u) [TeX `I: $m_{2}$´]]
49   •page << tbond [] [terminalfrom •page j3 ( [centerof j3]+1u*[dir ~120°] ) [TeX `R: $R_{2}$´]]
50   •page << tbond [] [terminalfrom •page j3 ( [centerof j3]+1u*[dir ~60°] ) [TeX `R: $R_{3}$´]]
51   •page << hbond [] [terminalto   •page j6 ( [centerof j6]+(~1u,0u) ) [TeX `$S_{\mathrm{e}}$´]]
52   •page << hbond [] [terminalfrom •page j6 ( [centerof j6]+(1u,0u) ) [TeX `I: $m_{3}$´]]
53   •page << tbond [] [terminalfrom •page j7 (4u,2u) [TeX `C: $C_{1}$´]]
54   •page << tbond [] [terminalfrom •page j7 (6u,2u) [TeX `R: $R_{1}$´]]
56   {
57     con: [terminalto •page j1 (0u,1u) [TeX `$S_{\mathrm{e}}$´]]
58     •page << hbond [] con
59     •page << [flowlabel con [TeX `f´]]
60     •page << [effortlabel con [TeX `e´]]
61   }