// Should only build once!
    public RenderGeometry Build()
    {
        RenderGeometry g = new RenderGeometry();

        foreach (Face f in faces)
        {
            g.CombineGeometry(surfaceComponents[f]);
        }
        foreach (Halfedge e in halfedges)
        {
            if (connections.ContainsKey(e) && connections.ContainsKey(e.opposite))
            {
                List <Halfedge> list1 = connections[e];
                List <Halfedge> list2 = connections[e.opposite];
                if (list1.Count != list2.Count)
                {
                    throw new Exception("Cannot connect two surface blocks, segment count doesn't match.");
                }
                for (int i = 0; i < list1.Count; i++)
                {
                    g.ConnectEdges(list1[i], list2[list1.Count - 1 - i]);
                }
                connections.Remove(e);
                connections.Remove(e.opposite);
            }
        }
        return(g);
    }