Itasca Geometry File Format
The following format specification uses a definition given by Itasca — which has the specific advantage over other formats in that it is capable of using/storing group names and extra variable information. The format may be specified in text or binary form. Both are shown below.
Formats
Text Format
ITASCA GEOMETRY3D
; The line above is a text mode header indicator — it is required for the
; file to be recognized as a scalar data text file.
; Comment field — any text after a semicolon is ignored. Blank lines are
; ignored.
; The following first
; All data are comma and space delimited.
GROUP s name ; All objects following are assigned group name name to the
; slot s.
; GROUP statements can be added later in the file,
; adding to or replacing previous GROUP assignments.
EXTRA i val ; All objects following are assigned extra data val in the ith
; index.
; EXTRA statements can be added later
; in the file, adding to or replacing previous EXTRA
; assignments.
NODES ; lines following are assumed to be nodes. Note that all IDs are
; LOCAL to the file, and do not (necessarily) correspond to ID
; numbers assigned in the code.
; Also note that GROUP and EXTRA statements can be inserted into
; the node list.
id x y z EXTRA i val ... GROUP s name ...
id x y z EXTRA i val ... GROUP s name ...
id x y z EXTRA i val ... GROUP s name ...
; Each line indicates a single node. ID numbers need not be sequential, but
; they must be unique for each object type in a file. The EXTRA and GROUP
; keywords are optional.
; each EXTRA and GROUP keyword (there can be more than one per line) can
; be followed by any number of index value pairs, indicating the index of
; slot the value should be made to.
; Group names are strings (" delimited for embedded spaces).
; EXTRA data can be a string, an integer, or a real.
EDGES ; lines following are assumed to be edges
id node1 node2 EXTRA i val ... GROUP s name ...
id node1 node2 EXTRA i val ... GROUP s name ...
id POINT x y z x y z EXTRA i val ... GROUP s name ...
POLYS ; lines following are assumed to be polygons. The specification
formats are available:
id edge1 edge2 edge3 ... EXTRA i val ...
GROUP s name ...
id edge1 edge2 edge3 ... EXTRA i val ...
GROUP s name ...
id NODE node1 node2 node3 ... EXTRA i val ...
GROUP s name ...
id NODE node1 node2 node3 ... EXTRA i val ...
GROUP s name ...
id POINT x y z x y z x y z ... EXTRA i val ...
GROUP s name ...
id POINT x y z x y z x y z ... EXTRA i val ...
GROUP s name ...
; Note that if the NODE format is used, it is not necessary to specify
; edges
; If the POINT format is used, it is not necessary to specify edges or
; nodes.
Binary Format
0x03714714 (unsigned 32 bit integer indicating it is binary geometry data)
; Repeat objects
quint8 code indicating type of object (0=node, 1=edge, 2=polygon).
Node: uint64 as id
x y z as double precision
uint32 as number of extra, followed by that many extra
uint32 as number of group names, followed by that many strings
Edge: uint64 as id
uint64 as node 1 id
uint64 as node 2 id
uint32 as number of extra, followed by that many extra
uint32 as number of group names, followed by that many strings
Poly: uint64 as id
series of uint64 as edge id, with a value of 0 indicating no more edges
uint32 as number of extra, followed by that many extra
uint32 as number of group names, followed by that many strings
extra: uint8 as type code (0= 64 bit signed int, 1 = 64 bit double
precision, 2 = string).
string: uint16 as string length, that many uint16 as string contents.
Was this helpful? ... | PFC 6.0 © 2019, Itasca | Updated: Nov 19, 2021 |