 		painter.drawBendRails start, start.compound(@exitTransform()), @flip
 		super painter, start
 
+	clone: (newsection) ->
+		result = new Bend(@)
+		result.setSection newsection
+		result
+
 class Split extends Piece
 	setSection: (section) ->
 		@connections.B =

		painter.drawStraight start, @.size
		painter.drawStraightRails start, @.size
		super painter, start

class Bend extends Piece
	setSection: (section) ->

		painter.drawBendRails start.compound(@connections.C.transform()).compound(new Transform(0,0,180)),
			start.compound(@connections.D.transform()), @flip
		super painter, start

	clone: (newsection) ->
		result = new Crossover(@)
		result.setSection newsection
		result

transformsMeet = (t1, t2) ->
	(Math.round(t1.translateX) == Math.round(t2.translateX)) and
