This repository has been archived by the owner on Jun 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 50
Smesh file format
MikeXuPku edited this page Jun 11, 2019
·
2 revisions
.smesh is a file format which describes the mesh topology. It is similar to the .hm file generated by hypermesh software in engineering. Smesh is constructed by two components, vertices and elements.
*VERTICES
7000 3
1 -2.55419445038 1.81299638748 0.377781808376
2 -2.55419445038 1.81299638748 0.529374539852
3 -2.55419445038 1.81299638748 0.680967271328
...
7000 -2.4026017189 1.20662546158 0.377781808376
- first line is
*VERTICES
. - second line has two numbers, amount of vertices N and dimension of vertex D.
- then followed by N lines, each line contains the information of a vertex which are
vertex-index, x1, x2, ..., xD
.x1, x2, ..., xD
are the position of the vertex.
*ELEMENTS
HEX
550 8
1 1 62 73 6 2 63 74 7
2 2 63 74 7 3 64 75 8
3 3 64 75 8 4 65 76 9
...
550 64 202 214 75 65 203 215 76
LINE
4 2
1 5 8
2 3 4
...
4 99 34
- first line is
*ELEMENTS
- then followed by several blocks of different element types. Now we only support LINE,TRIANGLE,QUAD,TET,HEX. Each block has following format
- first line is element type, like
LINE
. - second line is amount of elements M and amount of vertices in an element E, like
4 2
. - then followed by M lines, each line contains the information of an element which are
element-index, v1, v2, ..., vE
.v1, v2, ..., vE
are vertex indexes in the element.
- first line is element type, like
For elements like QUAD,HEX, there are some convention about the topology of vertices in an element.
/* QUAD
3-----2
| |
| |
0-----1
*/
/* HEX
7-----6
/| /|
4-----5 |
| 3---|-2
|/ |/
0-----1
*/