ZigZag#
- class ZigZag#
Bases:
object
Class to draw a zig-zag line. A zig-zag line is a collection of lines, which are sequences of points.
- __init__()#
Methods
__init__
()add_line
(line)bounding_box
(compass)join
()If there are zig-zag lines that share an endpoint point, join them together into one zig-zag,
mirror
()Mirror through y-axis
move
(dz)reflect
()rotate
()Rotate once CCW
set_compass
(NW, SW, SE, NE)smoothen
()remove points that continue in the same direction
split
()if zig-zag lines are too long, split them
Attributes
E
N
S
W
height
width
- join()#
If there are zig-zag lines that share an endpoint point, join them together into one zig-zag,
- mirror()#
Mirror through y-axis
- rotate()#
Rotate once CCW
- smoothen()#
remove points that continue in the same direction
- split()#
if zig-zag lines are too long, split them