AMF File Format Element reference

The Additive Manufacturing File Format (AMF) is an XML based file format for describing printable objects using a 3D printer.
The AMF may be stored as a simple XML file or it may be zipped. In both cases the file extension used is '.amf'. It is up to the application parser to determine if the file is zipped or a simple xml file.
When zipped the zip file MUST store one or more amf files in the root directory of the zip file.
The remainder of this actile describes each of the XML elements used in an amf file.
Note: all element names must be lower case.
The amf file must commence with an XML declaration of the form:
<?xml version="1.0" encoding="UTF-8">
Elements
amf
<big>Description</big>
Top level element that encloses all other elements in the AMF file. There MUST be one and only one amf element in each file.
<big>Valid Parents</big>
None, this is the XML root element.
<big>Attributes</big>
version
The amf element MAY have a single 'version' attribute. For the current standard this MUST be 1.0.
units
The amf element MUST have a single 'units' attribute.
The unit of measure used to describe all measurements in this amf file. The supported units of measure are:
* inch
* millimeter
* meter
* feet
* micron
Example
<pre><amf version="1.0" units="millimeter">
<object>
....
</object>
</amf></pre>
object
<big>Description</big>
Describes an object which may be manufactured.
An amf file MUST have one or more 'object' elements that describe an object using a set of triangles and edges.
<big>Valid Parents</big>
amf
<big>Attributes</big>
id
Each object MUST have an id which is unique within the amf file. The id is used by other elements (such as the constellation element) to refer to the object.
type
string
Example
<pre><object id="someid">
<mesh>
....
</mesh>
</object>
</pre>
color
<big>Description</big>
The color with which to print an item.
Any and each of the valid parent elements MAY have one and only one color element.
As the color element can be applied to a number of elements in an object. This can lead to conflicts. For instance an 'object' may be tagged as red whereas an individual triangle within the object may be tagged as green. To resolve these conflicts a color precedence is defined where elements with a higher (implicit) precedence takes precedence over other elements.
The precedence is as follows:
# material
# object
# volume
# vertex
# triangle
In the above list a 'triangle' has the highest precedence and material has the lowest.
e.g. if the material is green and the triangle is red then red will be printed.
<big>Valid Parents</big>
material
object
volume
vertex
triangle
<big>Attributes</big>
profile
The ICC color space used when interpreting the rgba values of the color.
Zero or one profile attribute may be specified. If the profile attribute is not present than 'sRGB' is implied.
The set of valid profiles is:
* sRGB
* AdobeRGB
* Wide-Gamut-RGB
* CIERGB
* CIELAB
* CIEXYZ
Example
<pre><object id="1">
<color profile="sRGB">
<r>1</r>
<g>0.5</g>
<b>0</b>
<a>1</a>
</color>
<mesh>
....
</pre>
r
<big>Description</big>
The red component of a color in the color's selected ICC color space.
A color element MUST have one and only one 'r' element.
The 'r' element represents the amount of red as a decimal value in the range 0 to 1.
The value of the 'r' element can also be represented as a formula which allows the quantity of red to change based on the current print head coordinates.
See the rules of color component formulas for more details.
<big>Valid Parents</big>
color
<big>Attributes</big>
None.
Example
<pre><object id="1">
<color profile="sRGB">
<r>1</r>
<g>0.5</g>
<b>0</b>
<a>1</a>
</color>
<mesh>
....
<triangle>
....
<color>
<r>sin(x)</r>
<g>cos(y)</g>
<b>tan(z)</b>
<a>1</a>
</color>

</pre>
g
<big>Description</big>
The green component of a color in the color's selected ICC color space. A color element MUST have one and only one 'g' element. The 'g' element represents the amount of green in the range 0 to 1.
In all other respects this element is identical to the 'r' element.
b
<big>Description</big>
The blue component of a color in the color's selected ICC color space. A color element MUST have one and only one 'b' element. The 'b' element represents the amount of blue in the range 0 to 1.
In all other respects this element is identical to the 'r' element.
a
<big>Description</big>
The alpha (transparency) component of a color in the color's selected ICC color space. A color element MUST have one and only one 'a' element. The 'a' element represents the level of transparency in the range 0 to 1.
In all other respects this element is identical to the 'r' element.
mesh
<big>Description</big>
Describes a mesh which forms the volumetric shape of an object through the use of a set of connected triangles and edges.
Each 'object' MUST have one or more 'mesh' elements.
<big>Valid Parents</big>
object
<big>Attributes</big>
None.
Example
<pre><object id="rubber ducky">
<mesh>
....
</mesh>
</pre>
vertices
<big>Description</big>
Used as a container for a list of 'vertex' elements which are essentially a coordinate in 3D space (x,y,z). The set of vertices (vertex elements) are then referenced by triangle elements. Each vertex has an implicit ordinal (unique number starting from 1) which triangle elements use to reference the vertex. As such the ordering of the vertex in the amf file is critical to the correct rendering of the object.
<big>Valid Parents</big>
mesh
<big>Attributes</big>
None.
Example
<pre>
<object id="rubber ducky">
<mesh>
<vertices>
<vertex>
....
</vertex>
<vertex>
....
....
</mesh>
</pre>
vertex
<big>Description</big>
Describes a coordinate in 3D space which is used by triangle elements to describe their position in space. Vertex elements are essentially used to save space as each vertex is generally referenced by 6 triangles.
A vertices element MUST have 3 or more vertex elements.
<big>Valid Parents</big>
vertices
<big>Attributes</big>
None.
Example
<pre><object id="rubber ducky">
<mesh>
<vertices>
<vertex>
<coordinate>
....
<coordinate>
</vertex>
<vertex>
....
....
</mesh></pre>
'coordinates'
<big>Description</big>
Describes a coordinate in 3D space using an x, y and z sub-element.
The coordinates are describes in terms of the amf elements 'units' of measure.
Each vertex element MUST have one and only one coordinates element.
<big>Valid Parents</big>
vertex
<big>Attributes</big>
None
Example
<pre><coordinates>
<x>10.1</x>
<y>25</y>
<z>-15<z>
</coordinates>
</pre>
x
<big>Description</big>
The x coordinate in a 3D space of a vertex.
Each coordinate MUST have one and only one x coordinate represented as a decimal value.
<big>Valid Parents</big>
coordinate
<big>Attributes</big>
None.
Example
See coordinate.
y
<big>Description</big>
The y coordinate in a 3D space of a vertex.
Each coordinate MUST have one and only one y coordinate represented as a decimal value..
<big>Valid Parents</big>
coordinate
<big>Attributes</big>
None.
Example
See coordinate.
z
<big>Description</big>
The z coordinate in a 3D space of a vertex.
Each coordinate MUST have one and only one z coordinate represented as a decimal value..
<big>Valid Parents</big>
coordinate
<big>Attributes</big>
None.
Example
See coordinate.
normal
<big>Description</big>
Defines the 'normal' of a vertex in 3D space.
<big>Valid Parents</big>
vertex
<big>Attributes</big>
None.
Example
<pre>
<vertex>
<coordinates>
....
</coordinates>
<normal>
<nx>0</nx>
<ny>0.31</ny>
<nz>0.85</nz>
</normal>
</pre>
edge
<big>Description</big>
Defines the 'tangent' of a edge between two vertices in 3D space.
<big>Valid Parents</big>
vertices
<big>Attributes</big>
None.
Example
<pre><vertex>
<coordinates>
....
</coordinates>
<edge>
<v1>0</v1>
<dx1>0</dx1>
<dy1>0.31</dy1>
<dz1>0.85</dz1>
<v2>3</v2>
<dx2>0</dx2>
<dy2>0.31</dy2>
<dz2>0.85</dz2>
</edge></pre>
dx1
<big>Description</big>
The normalised X component of the first vertex of an edge.
An edge MUST have one and only one dx1.
dx1 must be a decimal.
<big>Valid Parents</big>
edge
<big>Attributes</big>
None
dy1
<big>Description</big>
The normalised y component of the first vertex of an edge.
An edge MUST have one and only one dy1.
dy1 must be a decimal.
<big>Valid Parents</big>
edge
dz1
<big>Description</big>
The normalised z component of the first vertex of an edge.
An edge MUST have one and only one dz1.
dz1 must be a decimal.
<big>Valid Parents</big>
edge
dx2
<big>Description</big>
The normalised x component of the second vertex of an edge.
An edge MUST have one and only one dx2.
dx2 must be a decimal.
<big>Valid Parents</big>
edge
dy2
<big>Description</big>
The normalised Y component of the second vertex of an edge.
An edge MUST have one and only one dY2.
dY2 must be a decimal.
<big>Valid Parents</big>
edge
<big>Attributes</big>
None.
dz2
<big>Description</big>
The normalised z component of the second vertex of an edge.
An edge MUST have one and only one dz2.
dz2 must be a decimal.
<big>Valid Parents</big>
edge.
<big>Attributes</big>
None
nx
<big>Description</big>
The normalised x component of a surface normal at the associated vertex.
A normal MUST have one and only one nx.
nx must be a decimal.
<big>Valid Parents</big>
normal
<big>Attributes</big>
None
ny
The normalised y component of a surface normal at the associated vertex.
A normal MUST have one and only one ny.
ny must be a decimal.
<big>Valid Parents</big>
normal
<big>Attributes</big>
None
nz
<big>Description</big>
The normalised z component of a surface normal at the associated vertex.
A normal MUST have one and only one nz.
nz must be a decimal.
<big>Valid Parents</big>
normal
<big>Attributes</big>
None
volume
<big>Description</big>
<big>Valid Parents</big>
<big>Attributes</big>
attr
Example
<pre></pre>
triangle
<big>Description</big>
<big>Valid Parents</big>
<big>Attributes</big>
attr
Example
<pre></pre>
v1
<big>Description</big>
<big>Valid Parents</big>
<big>Attributes</big>
attr
Example
<pre></pre>
v2
<big>Description</big>
<big>Valid Parents</big>
<big>Attributes</big>
attr
Example
<pre></pre>
v3
<big>Description</big>
<big>Valid Parents</big>
<big>Attributes</big>
attr
Example
<pre></pre>
texture
<big>Description</big>
<big>Valid Parents</big>
<big>Attributes</big>
attr
Example
<pre></pre>
materials
<big>Description</big>
<big>Valid Parents</big>
<big>Attributes</big>
attr
Example
<pre></pre>
composite
<big>Description</big>
<big>Valid Parents</big>
<big>Attributes</big>
attr
Example
<pre></pre>
constellation
<big>Description</big>
<big>Valid Parents</big>
<big>Attributes</big>
attr
Example
<pre></pre>
instance
<big>Description</big>
<big>Valid Parents</big>
<big>Attributes</big>
attr
Example
<pre></pre>
deltax
<big>Description</big>
<big>Valid Parents</big>
<big>Attributes</big>
attr
Example
<pre></pre>
deltay
<big>Description</big>
<big>Valid Parents</big>
<big>Attributes</big>
attr
Example
<pre></pre>
deltaz
<big>Description</big>
<big>Valid Parents</big>
<big>Attributes</big>
attr
Example
<pre></pre>
rx
<big>Description</big>
<big>Valid Parents</big>
<big>Attributes</big>
attr
Example
<pre></pre>
ry
<big>Description</big>
<big>Valid Parents</big>
<big>Attributes</big>
attr
Example
<pre></pre>
rz
<big>Description</big>
<big>Valid Parents</big>
<big>Attributes</big>
attr
Example
<pre></pre>
metadata
<big>Description</big>
<big>Valid Parents</big>
<big>Attributes</big>
type
Example
<pre></pre>
 
< Prev   Next >