We propose a general 3D-surface reconstruction technique for objects defined in terms of contours in a stack of serial sections. It is built around a data structure, in which the topology of the objects is represented as a set of disconnected graphs. The basic idea is to let the topological information direct the reconstruction process. There are several advantages with this approach. The alignment of the stack of sections is computed automatically. This operation does not depend on artificial reference points, such as fiduciary marks introduced by laser-beam penetration of a biological sample prior to sectioning. Furthermore, the unknown surfaces between successive sections can be created automatically, even though the sections contain a large number of arbitrarily shaped contours that are clustered or perhaps partly overlapped. If present, 3D irregularities in the surface model can be reduced in a controlled manner.