Name

spatiallink — A spatial link packet

Synopsis

Content Model
spatiallink ::= (component*,
                 tag*,
                 (container|textdata|script|attachment|
                  tri|link|spatiallink|snappeadata|
                  angles|surfaces|hypersurfaces|
                  filtercomb|filterprop|filtertrivial|
                  anon|anonref)*)
Attributes
NameType
radiusNUMBER (required)
idCDATA
labelCDATA

Added in Regina 7.4

Description

This represents a spatial link 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 spatial link packet stores a specific embedding of an oriented link in 3-dimensional space. Whereas link stores purely combinatorial data (encoding the combinatorics of a link diagram), this spatial link packet stores purely geometric data (encoding specific paths through 3-space).

Each link component is stored as a closed path through 3-dimensional space, encoded in its own child component element.

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, spatiallink, surfaces, textdata, tri. This list includes all packet types, as well as the top-level element regina.

Children

The following elements occur in spatiallink, and are specific to the spatial link packet type: component.

The following children can occur in all packet elements: angles, anon, anonref, attachment, container, filtercomb, filterprop, filtertrivial, hypersurfaces, link, script, snappeadata, spatiallink, 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 specific to spatial link packets:

radius

Indicates the preferred radius to use when rendering the link. This is a floating point number, and must be strictly positive.

Regina writes the radius using hexadecimal floating point format to ensure no loss of precision; however, any standard floating point format may be used.

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 shows part of a trefoil that was imported from KnotPlot:

<spatiallink label="Trefoil">
  <component>
  <node> -0x1.404e48p+2 -0x1.19fb74p+1 0x1.57163p-1 </node>
  <node> -0x1.387c38p+2 -0x1.8d0064p+1 -0x1.7c7952p-4 </node>
  <node> -0x1.18f84cp+2 -0x1.eb60c2p+1 -0x1.c253fcp-1 </node>
  ...
  <node> -0x1.2f779cp+2 -0x1.3d036p+0 0x1.4ee7eap+0 </node>
  </component>
</spatiallink>