A GtsSurface is defined as a collection of GtsFace. No topological constraint is imposed: the surface may or may not be manifold, closed or orientable.
When destroying a GtsSurface, all the faces not used by another surface are also destroyed. This default behaviour can be changed punctually by setting the global variable gts_allow_floating_faces to TRUE. You must not forget to set this variable back to FALSE as all the algorithms of GTS assume the default behaviour.
0 if successful or the line number at which the parsing
stopped in case of error (in which case the error field of f is
set to a description of the error which occured).
TRUE if all the faces of s have compatible orientation
as checked by gts_faces_are_compatible(), FALSE otherwise. Note that
an orientable surface is also a manifold.
Writes in the file fptr an ASCII representation of s. The file
format is as follows.
All the lines beginning with GTS_COMMENTS are ignored. The first line
contains three unsigned integers separated by spaces. The first
integer is the number of vertices, nv, the second is the number of
edges, ne and the third is the number of faces, nf.
Follows nv lines containing the x, y and z coordinates of the
vertices. Follows ne lines containing the two indices (starting
from one) of the vertices of each edge. Follows nf lines containing
the three ordered indices (also starting from one) of the edges of
each face.
The format described above is the least common denominator to all
GTS files. Consistent with an object-oriented approach, the GTS
file format is extensible. Each of the lines of the file can be
extended with user-specific attributes accessible through the
read() and write() virtual methods of each of the objects written
(surface, vertices, edges or faces). When read with different
object classes, these extra attributes are just ignored.
Calls func once for each face of s. If func returns TRUE the
corresponding face is removed from s (and destroyed if it does not
belong to any other surface and gts_allow_floating_faces is set to
FALSE).
the next face of the traversal in breadth-first order or
NULL if no faces are left. If level if not NULL, it is filled
with the level of the returned face (0 for the initial face, 1 for
its neighbors and so on).
Using the gts_bb_tree_surface_distance() and
gts_bb_tree_surface_boundary_distance() functions fills face_range
and boundary_range with the min, max and average Euclidean
(minimum) distances between the faces of s1 and the faces of s2
and between the boundary edges of s1 and s2.