snappeadata |
Prev | Current Data File Format | Next |
Name
snappeadata — A SnapPea triangulation packet
Synopsis
Content Model | |
snappeadata ::= (#PCDATA, | |
Attributes | |
Name | Type |
id | CDATA |
label | CDATA |
Added in Regina 7.0
Description
This represents a SnapPea triangulation packet, one of the many types of packet that together form the packet tree that a user sees when they open a Regina data file.
A SnapPea triangulation packet stores a 3-manifold triangulation using SnapPea's own text-based file format (instead of Regina's native format). This is useful when working with a triangulation that originated from SnapPea or SnapPy, since it will preserve all of SnapPea's own internal data (e.g., peripheral curves and fillings).
The full contents of the SnapPea data file are contained in the character data that appears before the first child XML element. Whitespace and line breaks are relevant and are considered a part of the data file.
There are several child XML elements that are common to all packet types.
The tag
elements represent an arbitrary set of string
“tags” that users can attach to a packet to help organise
their data.
The remaining child elements list all of Regina's packet types
(container
, textdata
, etc.), and these represent the
immediate children of this packet in the packet tree.
Parents
The following elements can contain any packet element (including this):
angles
, anon
, anonref
, attachment
, container
, filtercomb
, filterprop
, filtertrivial
, hypersurfaces
, link
, regina
, script
, snappeadata
, surfaces
, textdata
, tri
.
This list includes all packet types, as well as the top-level element
regina
.
Children
Element snappeadata
has no children that are
specific to SnapPea triangulation packets.
The following children can occur in all packet elements:
angles
, anon
, anonref
, attachment
, container
, filtercomb
, filterprop
, filtertrivial
, hypersurfaces
, link
, script
, snappeadata
, surfaces
, tag
, textdata
, tri
.
This list includes all packet types, as well as the tag
element
for tagging individual packets.
Attributes
The following attributes are common to all packet types:
id
A unique identifier for this packet. Packets are not required to have IDs, but when they are present they must be distinct (i.e., no packets in the same file may share the same ID). IDs do not need to be human-readable, must not contain leading or trailing whitespace, and must not be empty strings. Currently, IDs are built from base 64 hashes of the underlying C++ pointers.
The purpose of these packet IDs is to allow other packets to reference this packet (for instance, so that a script packet can store references to its variables).
IDs are not required to stay the same across subsequent loads and saves of the same file. In other words, if you load a file and save it again, the packet IDs are allowed to change.
label
The name given by the user to this particular packet within the overall packet tree.
Example
The following XML snippet represents a SnapPea triangulation of the figure eight knot complement.
<snappeadata label="Figure 8 Knot Complement">% Triangulation m004 geometric_solution 2.02988321 oriented_manifold CS_unknown 1 0 torus 0.000000000000 0.000000000000 2 1 1 1 1 0132 1230 2310 2103 0 0 0 0 0 0 0 0 0 0 0 0 -1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 1 1 0 -1 0 0 1 0 -1 -1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.500000000000 0.866025403784 0 0 0 0 0132 3201 3012 2103 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 1 -1 0 1 0 1 0 0 -1 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.500000000000 0.866025403784 </snappeadata>
Prev | Contents | Next |
simplex | Up | spanstrict |