1# The "chop" Attribute
2
3Line objects may have a single "`chop`" attribute.  When the chop
4attribute is present, and if the line starts or ends at the center
5of a block object, then that start or end is automatically moved to
6the edge of the object.  For example:
7
8~~~~ pikchr toggle
9file "A"
10cylinder "B" at 5cm heading 125 from A
11arrow <-> from A to B "from A to B" aligned above color red
12arrow <-> from A to B chop "from A to B chop" aligned below color blue
13~~~~
14
15In the example, both of the arrows use "`from A to B`"  The difference
16is that the blue line adds the "`chop`" keyword whereas the red line
17does not.
18
19The chop feature only works if one or both ends of the line land on
20the center of a block object.  If neither end of a line is on the
21center of a block object, then the "`chop`" attribute is a no-op
22
23## Different From Legacy PIC
24
25The chop attribute in Pikchr differs from the chop attribute in legacy PIC.
26In PIC, the "`chop`" keyword can be followed by a distance and can appear
27twice.  The chop keyword causes the line to be shortened by the amount
28specified, or by `circlerad` if no distance is given.  The legacy "chop"
29works ok if you are drawing lines between circles, but it mostly pointless
30for lines between all other kinds of objects.  The enhanced "chop" in
31Pikchr is intended to make the feature helpful on a wider variety of
32diagrams.
33