Shape Data Format

Shape Data Format


Overview

Shape data here denotes 3D geometry data. The geometrical shape is defined in terms of the connectivity of vertices and surfaces. In MicroAVS, polygons, lines, spheres and meshes are the primitives available for creating geometrical shapes.

File Extension

The data file extension is ".mgf".

Format

The format of shape data is composed of a header, basic primitive type, primitive name, and data. All the data is in ASCII and is separated using spaces, tabs or the code for blank lines. Empty lines can be inserted as and when required. Further, the lines need not be left-justified.

# Micro AVS Geom:1.00
Basic Primitive Type
Primitive Name
Data
Data
.
.
.
Basic Primitive Type
Primitive Name
Data
Data
.
.
.

# Micro AVS Geom:1.00
This is the header that identifies a shape data file and must be present in the first line of the file. Indicates a space character. Further, capitals, small letters and spaces must be defined precisely.

Basic Primitive Type Name
This name is defined uniquely for each primitive type. The types available are mesh, polygon, sphere and line.

The names that identify these primitives are as given below:

Meshmesh
Polygondisjoint polygon or polyhedron
Spheresphere
Linedisjoint line or polyline
Circlecircle
Columncolumn
Polytrianglepolytri
Labellabel

Primitive name
This refers to the name of the part. Define any name you want. However, the name should be within 30 characters and should not contain any spaces, tabs or return characters. Further, the primitive names cannot be duplicated.

Data
The format of this portion is different depending on the basic primitive name.


Addendum

By repeating sets of Basic primitive type name, primitive name and data, it is possible to describe data made up of multiple primitive types.

UP © 1997-2008 KGT Inc. All rights reserved.