1 /** This file is part of Shapes.
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
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.
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/>.
16 ** Copyright 2008, 2010, 2014 Henrik Tidefelt
19 ##needs ..Applications..Blockdraw
22 ##lookin ..Applications..Blockdraw
25 ** This block just serve as something to select connection point on.
26 ** A connection point is a point on the boundary of the object where connection paths should attach.
28 F: [putblockOrigin IO..•page [longblock [Graphics..TeX `$F_{\mathrm{y}}(s)$´]]]
31 ** In the first two examples, the connection point is bound to a variable called "z" before we use it,
32 ** just to make clear what is the important part of this example; how this point is indicated in the
33 ** figure is non-standard in this example as we usually would connect the point with a point on another block.
37 IO..•page << [@connectpainter [Geometry..reverse z--(+(~1cm,0))]]
41 IO..•page << [@connectpainter z--(+(1cm,0))]
45 ** The number of points on a side defaults to 1, as does the index of the point on that side.
47 IO..•page << [@connectpainter [Geometry..reverse [bottompoint F]--(+(0,~1cm))]]
50 ** OK, we've seen the pattern now, binding the connection point to a variable before using it seems unncessary.
52 IO..•page << [@connectpainter [toppoint F 3 1]--(+(0,5mm))]
53 << [@connectpainter [toppoint F 3 2]--(+(0,7mm))]
54 << [@connectpainter [toppoint F 3 3]--(+(0,9mm))]