 		
 		private function reorderEdges():void
 		{
+			//trace("_edges:", _edges);
 			var reorderer:EdgeReorderer = new EdgeReorderer(_edges, Vertex);
 			_edges = reorderer.edges;
+			//trace("reordered:", _edges);
 			_edgeOrientations = reorderer.edgeOrientations;
 			reorderer.dispose();
 		}

					// (NOTE this will not be correct if the region should take up more than
					// half of the bounds rect, for then we will have gone the wrong way
					// around the bounds and included the smaller part rather than the larger)
					var rightCheck:int = BoundsCheck.check(rightPoint, bounds);
					var newCheck:int = BoundsCheck.check(newPoint, bounds);
					var px:Number, py:Number;

				}
				connect(points, j, bounds);
			}
			// close up the polygon by adding another corner point of the bounds if needed:
			connect(points, i, bounds, true);
			return points;
		}
		
		private function connect(points:Vector.<Point>, j:int, bounds:Rectangle, closingUp:Boolean = false):void
		{
			var rightPoint:Point = points[points.length - 1];
			var newEdge:Edge = _edges[j] as Edge;
			var newOrientation:LR = _edgeOrientations[j];
			// the point that  must be connected to rightPoint:
