function [Edgs] = orderEdgs(Edgs)
N = (size(Edgs,2)-2)/2;
for i=1:N
   Neig = Edgs(:,i);
   ind = find(Neig==1);
   pts = Edgs(ind,end-1:end);
   pts = [pts, ones(size(pts,1),1)*i];
   [pts, order] = order_pts(pts);
   Edgs(ind(order{i}), 2*N+1:2*N+2) = pts(:,1:2);
end
return;