|
|
(One intermediate revision by the same user not shown) |
Line 1: |
Line 1: |
| {{TIN links}} | | {{TIN links}} |
| '''TIN files''' are used for storing triangulated irregular networks. The TIN file format is shown below and a sample file is shown after. The TIN file format can be used to import a simple set of xyz coordinates since the triangle information (beginning with the TRI card) does not need to be present. If you have a file of xyz coordinates you only need to add the TIN, BEGT, and VERT nv cards to the top of the file and the ENDT card at the end. | | '''TIN files''' are used for storing Triangulated Irregular Networks. The TIN file format is shown below and a sample file is shown after. The TIN file format can be used to import a simple set of xyz coordinates since the triangle information (beginning with the TRI card) does not need to be present. If you have a file of xyz coordinates you only need to add the TIN, BEGT, and VERT nv cards to the top of the file and the ENDT card at the end. |
|
| |
|
| <pre> | | <pre> |
Line 52: |
Line 52: |
| !Card Type | | !Card Type |
| |'''TIN''' | | |'''TIN''' |
| | |- |
| | !Card ID |
| | |3000 |
| |- | | |- |
| !Description | | !Description |
Line 63: |
Line 66: |
| !Card Type | | !Card Type |
| |'''BEGT''' | | |'''BEGT''' |
| | |- |
| | !Card ID |
| | |3000 |
| |- | | |- |
| !Description | | !Description |
Line 134: |
Line 140: |
| |0–255 | | |0–255 |
| |The blue color component of TIN triangles. | | |The blue color component of TIN triangles. |
| | |} |
| | |
| | {|class="wikitable" |
| | !Card Type |
| | |colspan="3"|'''MAT''' |
| | |- |
| | !Description |
| | |colspan="3"|Associates a material id with the TIN. This is typically the id of the material which is below the TIN. |
| | |- |
| | !Required |
| | |colspan="3"|NO |
| | |- |
| | !Format |
| | |colspan="3"|MAT id |
| | |- |
| | !Sample |
| | |colspan="3"|MAT 3 |
| | |- |
| | !Field |
| | !Variable |
| | !Value |
| | !Description |
| | |- |
| | |align="center"|1 |
| | |align="center"|id |
| | |align="center"| + |
| | |The material ID. |
| | |- |
| |} | | |} |
| | | |
Line 208: |
Line 242: |
| !Card Type | | !Card Type |
| |'''ENDT''' | | |'''ENDT''' |
| | |- |
| | !Card ID |
| | |3000 |
| |- | | |- |
| !Description | | !Description |
Line 216: |
Line 253: |
| |} | | |} |
|
| |
|
| {{Navbox GMS}}[[Category:File format]]
| |
| [[Category:TINs]] | | [[Category:TINs]] |
TIN files are used for storing Triangulated Irregular Networks. The TIN file format is shown below and a sample file is shown after. The TIN file format can be used to import a simple set of xyz coordinates since the triangle information (beginning with the TRI card) does not need to be present. If you have a file of xyz coordinates you only need to add the TIN, BEGT, and VERT nv cards to the top of the file and the ENDT card at the end.
TIN /* File type identifier */
BEGT /* Beginning of TIN group */
TNAM name /* Name of TIN */
TCOL id /* TIN material id */
VERT nv /* Beg. of vertices */
x1 y1 z1 lf1 /* Vertex coords. */
x2 y2 z2 lf2
.
.
.
xnv ynv znv lfnv
TRI nt /* Beg. of triangles */
v11 v12 v13 /* Triangle vertices */
v21 v22 v23
.
.
.
vnt1 vnt2 vnt3
ENDT /* End of TIN group */
Sample TIN File:
TIN
BEGT
TNAM Aspen
TCOL 255 255 255
VERT 408
0.0 3.1 7.8 0
5.3 8.7 4.0 1
.
.
2.4 4.4 9.0 1
TRI 408
5 1 4
4 1 2
.
.
4 2 3
ENDT
Cards used in the TIN file
Card Type
|
TIN
|
Card ID
|
3000
|
Description
|
File type identifier. Must be on first line of file. No fields.
|
Required
|
YES
|
Card Type
|
BEGT
|
Card ID
|
3000
|
Description
|
Marks the beginning of a group of cards describing a TIN. There should be a corresponding ENDT card at a latter point in the file. No fields.
|
Required
|
YES
|
Card Type
|
TNAM
|
Description
|
Provides a name to be associated with the TIN.
|
Required
|
NO
|
Format
|
TNAM name
|
Sample
|
TNAM aspen
|
Field
|
Variable
|
Value
|
Description
|
1
|
name
|
str
|
The name of the TIN.
|
Card Type
|
TCOL
|
Description
|
Defines a default color for the triangles of the TIN
|
Required
|
NO
|
Format
|
TCOL color_red color_green color_blue
|
Sample
|
TCOL 255 255 255
|
Field
|
Variable
|
Value
|
Description
|
1
|
color_red
|
0–255
|
The red color component of TIN triangles.
|
2
|
color_green
|
0–255
|
The green color component of TIN triangles.
|
3
|
color_blue
|
0–255
|
The blue color component of TIN triangles.
|
Card Type
|
MAT
|
Description
|
Associates a material id with the TIN. This is typically the id of the material which is below the TIN.
|
Required
|
NO
|
Format
|
MAT id
|
Sample
|
MAT 3
|
Field
|
Variable
|
Value
|
Description
|
1
|
id
|
+
|
The material ID.
|
Card Type
|
VERT
|
Description
|
Lists the vertices in the TIN
|
Required
|
YES
|
Format
|
VERT nv x1 y1 z1 lf1 x2 y2 z2 lf2 . . xnv ynv znv lfnv
|
Sample
|
VERT 4 0.0 3.1 7.8 0 5.3 8.7 4.0 1 2.4 4.4 9.0 1 3.9 1.2 3.6 0
|
Field
|
Variable
|
Value
|
Description
|
1
|
nv
|
+
|
The number of vertices in the TIN
|
2–4
|
x,y,z
|
±
|
Coords. of vertex
|
5
|
lf
|
0,1
|
Locked / unlocked flag for vertex (optional). 0=unlocked, 1=locked. Repeat fields 2-5 nv times.
|
Card Type
|
TRI
|
Description
|
Lists the triangles in the TIN
|
Required
|
NO ( a set of triangles can be generated from the vertices)
|
Format
|
TRI nt v11 v12 v13 v21 v23 v23 . . vnt1 vnt2 vnt3
|
Sample
|
TRI 4 5 1 4 4 1 2 4 2 3 5 4 3
|
Field
|
Variable
|
Value
|
Description
|
1
|
nt
|
+
|
The number of triangles in the TIN.
|
2–4
|
v1,v2,v3
|
+
|
Vertices of triangle listed in a counter-clockwise order. Repeat nt times.
|
Card Type
|
ENDT
|
Card ID
|
3000
|
Description
|
Marks the end of a group of cards describing a TIN. There should be a corresponding BEGT card at a previous point in the file. No fields.
|
Required
|
YES
|