SMS:Material Files *.mat: Difference between revisions

From XMS Wiki
Jump to navigationJump to search
Line 5: Line 5:


== File Format ==
== File Format ==
 
The file format for material files is as follows:
 
<blockquote>
{|
{|style="background:#EEEEEE;"
|width="150"|MAT
|width="150"|MAT
|/* File type identifier */
|/* File type identifier */
Line 20: Line 20:
|/* Material stipple (fill pattern) */
|/* Material stipple (fill pattern) */
|}
|}
 
</blockquote>


== Cards ==
== Cards ==

Revision as of 15:49, 4 September 2015

Each element of a 2D mesh has an assigned material ID. Specific material properties are related to the analysis models, and are stored in the analysis files. However, general material properties, such as color, are not stored in these files. Therefore, they are stored in the material file. A material ID represents an index to a global list of materials. The material file associates general attributes such as a name, color, and pattern with each of the materials.

Material files are opened through File | Open and are saved from File | Save As... from the Mesh module.


File Format

The file format for material files is as follows:

MAT /* File type identifier */
MN id name /*Material name */
MC id red green blue /* Material color */
MS id stippleid /* Material stipple (fill pattern) */

Cards

Card Type MAT
Description File type identifier. Must be on first line of file. No fields.
Required YES


Card Type MN
Description Identifies a name to be associated with the material.
Required NO
Format MN id name
Sample MN 5 bedrock
Field Variable Value Description
1 id + The ID of the material.
2 name str The name of the material.


Card Type MC
Description Identifies a color to be associated with the material.
Required NO
Format MN id red green blue
Sample MN 5 124 67 245
Field Variable Value Description
1 id + The ID of the material.
2 red 0-255 The value of the red component of the color.
3 green 0-255 The value of the green component of the color.
4 blue 0-255 The value of the blue component of the color.


Card Type MS
Description Identifies a stipple (fill pattern) to be associated with the material. This stipple is used whenever an object is being drawn using color filled polygons.
Required NO
Format MN id stippleid
Sample MN 5 13
Field Variable Value Description
1 id + The ID of the material.
2 stippleid + The ID of the stipple.

Related Topics