As this is a text file format, there are rounding errors inherent when saving/loading one of these files, and thus, numerical stability will be sacrificed starting an experiment using one of these files. For this reason this file format is depreciated an should only be used for backwards combatability with the RUBY TUMBLE.
nodeid[int] x_coord[float] y_coord[float] data0[float] data1[float] ...
The BoundaryVertex section records each BoundaryVertex's ID and the node ID it cooresponds to:
bdry_vertID[int] nodeID[int]
Then there is a separator line with the total number of BoundaryVertexes:
--- num_bdry_verts
Following this is the record of BoundaryEdges. Each BoundaryEdge consists of a triple of lines. The first line contins the ID of the edge and ID of its vertexes, and other data. The restlength parameter at the end of the first line is optional. The second line consists of the x and y coordinates of its deboor points, and the third line consists of its knot values.
bdry_edgeID[int] vert0ID[int] vert1ID[int] closed[int] fixed[int] color[int] <restlength[float]> deboor0x[float] deboor0y[float] deboor1x[float] deboor1y[float] ... knot0[float] knot1[float] knot2[float] ...
Then there is a separator line with the total number of BoundaryEdges:
=== num_bdry_edges
Following this are the records of BoundaryFaces. Each BoundaryFace consists of a single line with the unique BoundaryFace ID, the minimum angle for this face, its color, and the IDs of the BoundaryEdges surrounding it.
bdry_faceID[int] min_angle[float] color[int] bdry_edge0ID[int] bdry_edge1ID[int] ...
edgeid[int] node0ID[int] node1ID[int] node2ID[int] bdryedgeID[int] u0[float] u1[float]
triID[int] edge0ID[int] edge1ID[int] edge2ID[int] inverted[int] bdry_faceID[int]
Thus, the binary file format was not optimized for space, but instead for the speed in loading/saving as this is the normal bottleneck for I/O in TUMBLE experiments.
Additionally, since all data is stored in binary format, the geometric and functional data at the nodes can be stored exactly, as well as the u-values of BezierVertexs and BezierEdges along the boundary. Furthermore, the implementation will take care to never require a comparison of floating point values when rebuilding a mesh from a binary file. Unfortunately, the text file format required the use of floating point comparisons in the rebuilding process.
When describing the format of the binary file, there are no linebreaks, but the description here will use new-lines in order to visually separate the information. All values are stored as binary in the file. Any string in quotes is a string of ascii charactors that is NOT null terminated. Any other value will be represented as an unsigned(32-bit) or a double(64-bit), as indicated.
"Tumble Binary Geometry File" [unsigned format_version_num]
[unsigned num_nodes]
Each entry of the Nodes section is as follows:
[unsigned nodeID][Point2D pos][unsigned data_size][double[] data]
[unsigned num_bdry_verts]
Each entry of the BoundaryVertex section is as follows:
[unsigned bdry_vertID][unsigned node_num][unsigned fixed]
[unsigned num_bdry_edges]
Each entry of the BoundaryEdge section contains the information about that edge and its spline. It is worth noting that the deboor points are stored as nodeID's and that the deboor points cooresponding to the BoundaryVertexs of the edge are not stored, so only the internal deboors are listed.
[unsigned bdry_edgeID][unsigned vertex0ID][unsigned vertex1ID] [unsigned fixed][unsigned color][double restlength] [unsigned num_internal_deboor][unsigned[] infernal_deboor_nodeIDs] [unsigned num_knots][double[] knots]
[unsigned num_bdry_faces]
Each entry of the BoundaryFace section is as follows:
[unsigned bdry_faceID][double min_angle][unsigned color][unsigned num_edges][unsigned[] bdry_edgeIDs]
[unsigned num_bez_verts]
Each entry of the BezierVertex section is as follows, where bdry_type:=(0=none, 1=vert, 2=edge), and bdry_edge_knot_idx is the index of the knot cooresponding to this vertex if this vertex is on a boundary edge.
[unsigned bez_vertID][unsigned node_num][unsigned fixed] [unsigned bdry_type][unsigned bdryID][unsigned bdry_edge_knot_idx]
[unsigned num_bez_edges]
Each entry of the BezierEdge section is as follows, where v0_knot_idx and v1_knot_idx, are the index numbers of the knots in the BoundaryEdge corresponding the vertexes of the BezierEdge, if this BezierEdge is on the boundary:
[unsigned bez_edgeID][unsigned vertex0ID][unsigned vertex1ID][unsigned center_nodeID] [unsigned bdry_edgeID][unsigned v0_knot_idx][unsigned v1_knot_idx]
[unsigned num_bez_tris]
Each entry of the BezierTriangle section is as follows:
[unsigned edge0ID][unsigned edge1ID][unsigned edge2ID][unsigned bdry_faceID]