Additive Manufacturing File Format
Encyclopedia
Additive Manufacturing File Format (AMF) is an open standard
Open standard
An open standard is a standard that is publicly available and has various rights to use associated with it, and may also have various properties of how it was designed . There is no single definition and interpretations vary with usage....

 for describing objects for additive manufacturing
Additive manufacturing
Additive manufacturing is defined by ASTM as the "process of joining materials to make objects from 3D model data, usually layer upon layer, as opposed to subtractive manufacturing methodologies, such as traditional machining...

 processes such as 3D printing
3D printing
3D printing is a form of additive manufacturing technology where a three dimensional object is created by laying down successive layers of material. 3D printers are generally faster, more affordable, and easier to use than other additive manufacturing technologies. However, the term 3D printing is...

. The official ASTM
ASTM International
ASTM International, known until 2001 as the American Society for Testing and Materials , is an international standards organization that develops and publishes voluntary consensus technical standards for a wide range of materials, products, systems, and services...

 F2915standard
International standard
International standards are standards developed by international standards organizations. International standards are available for consideration and use, worldwide...

 is an XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

-based format designed to allow any computer-aided design
Computer-aided design
Computer-aided design , also known as computer-aided design and drafting , is the use of computer technology for the process of design and design-documentation. Computer Aided Drafting describes the process of drafting with a computer...

 software to describe the shape and composition of any 3D
Three-dimensional space
Three-dimensional space is a geometric 3-parameters model of the physical universe in which we live. These three dimensions are commonly called length, width, and depth , although any three directions can be chosen, provided that they do not lie in the same plane.In physics and mathematics, a...

 object to be fabricated on any 3D printer. Unlike its predecessor STL
STL (file format)
STL is a file format native to the stereolithography CAD software created by 3D Systems. This file format is supported by many other software packages; it is widely used for rapid prototyping and computer-aided manufacturing. STL files describe only the surface geometry of a three dimensional...

 format, AMF has native support for color, materials, and constellations.

Structure

A detailed specification of the format is published by ASTM F2915.

An AMF can represent one object, or multiple objects arranged in a constellation. Each object is described as a set of non-overlapping volumes. Each volume is described by a triangular mesh that references a set of vertices. The vertices can be shared among volumes. An AMF file can also specify the material and the color of each volume, as well as the color of each triangle in the mesh.

Basic file structure

The AMF file begins with the XML declaration line specifying the XML version and encoding. The remainder of the file is enclosed between an opening element and a closing element. The unit system can also be specified (millimeter, inch, feet, meter or micrometer). In absence of a units specification, millimeters are assumed.

Within the AMF brackets, there are five top level elements. Only a single object element is required for a fully functional AMF file.
  1. The object element defines a volume or volumes of material, each of which are associated with a material ID for printing. At least one object element must be present in the file. Additional objects are optional.
  2. The optional material element defines one or more materials for printing with an associated material ID. If no material element is included, a single default material is assumed.
  3. The optional texture element defines one or more images or textures for color or texture mapping, each with an associated texture ID.
  4. The optional constellation element hierarchically combines objects and other constellations into a relative pattern for printing.
  5. The optional metadata element specifies additional information about the object(s) and elements contained in the file.

  6. Geometry specification

    The AMF format maintains the triangle-mesh geometry representation used in the STL format in order to take advantage of existing optimized slicing algorithm and code infrastructure already in existence. The top level element specifies a unique id, and contains two child elements: and . The element can optionally specify a material. The required element lists all vertices that are used in this object. Each vertex is implicitly assigned a number in the order in which it was declared, starting at zero. The required child element gives the position of the point in 3D space using the , and elements.
    After the vertex information, at least one element must be included. Each volume encapsulates a closed volume of the object, Multiple volumes can be specified in a single object. Volumes may share vertices at interfaces but may not have any overlapping volume.
    Within each volume, the child element is used to define triangles that tessellate the surface of the volume. Each element will list three vertices from the set of indices of the previously defined vertices. The indices of the three vertices of the triangles are specified using the , and elements. The order of the vertices must be according to the right-hand rule, such that vertices are listed in counter-clockwise order as viewed from the outside. Each triangle is implicitly assigned a number in the order in which it was declared, starting at zero.








    0
    1.32
    3.715


    ...



    0
    1
    3

    ...




    Curved triangles

    In order to improve geometric fidelity, the format allows curving the triangle patches. By default, all triangles are assumed to be flat and all triangle edges are assumed to be straight lines connecting their two vertices. However, curved triangles and curved edges can optionally be specified in order to reduce the number of mesh elements required to describe a curved surface. The curvature information has been shown to reduce the error of a spherical surface by a factor of 1000 as compared to a surface described by the same number of planar triangles. Curvature should not create a deviation of from the plane of the flat triangle that exceeds 50% of the largest dimension of the triangle.

    To specify curvature, a vertex can optionally contain a child element to specify desired surface normal at the location of the vertex. The normal should be unit length and pointing outwards. If this normal is specified, all triangle edges meeting at that vertex are curved so that they are perpendicular to that normal and in the plane defined by the normal and the original straight edge. When the curvature of a surface at a vertex is undefined (for example at a cusp, corner or edge), an element can be used to specify the curvature of a single non-linear edge joining two vertices. The curvature is specified using the tangent direction vectors at the beginning and end of that edge. The element will take precedence in case of a conflict with the curvature implied by a element.

    When curvature is specified, the triangle is decomposed recursively into four sub-triangles. The recursion is executed four levels deep, so that the original curved triangle is ultimately replaced by 256 flat triangles. These 256 triangles are generated "on the fly" and stored temporarily only while layers intersecting that triangle are being processed for manufacturing.




    ...


    0
    0.707
    0.707


    ...

    0
    0.577
    0.577
    0.577
    1
    0.707
    0
    0.707

    ...

    Color specification

    Colors are introduced using the element by specifying the red, green, blue and alpha ( transparency
    RGBA color space
    RGBA stands for Red Green Blue Alpha. While it is sometimes described as a color space, it is actually simply a use of the RGB color model, with extra information. The color is RGB, and may belong to any RGB color space, but an integral alpha value as invented by Catmull and Smith between 1971 and...

    ) channels in the sRGB color space
    Color space
    A color model is an abstract mathematical model describing the way colors can be represented as tuples of numbers, typically as three or four values or color components...

     as numbers in the range of 0 to 1. The element can be inserted at the material, object, volume, vertex, or triangle levels, and takes priority in reverse order (triangle color is highest priority). The transparency channel specifies to what degree the color from the lower level is blended in. By default, all values are set to zero.



    0.9
    0.9
    0.2
    0.8

    ...

    A color can also be specified by referring to a formula that can use a variety of coordinate-dependent functions. The formula below will specify a color that transitions vertically from blue to red.


    z/10
    1-z/10

    Texture maps

    Texture maps allow assigning color or material to a surface or a volume, borrowing from the idea of Texture mapping
    Texture mapping
    Texture mapping is a method for adding detail, surface texture , or color to a computer-generated graphic or 3D model. Its application to 3D graphics was pioneered by Dr Edwin Catmull in his Ph.D. thesis of 1974.-Texture mapping:...

     in graphics. The element is first used to associate a texture-id with particular texture data. The data can be represented as either a 2D or a 3D array, depending on whether the color or material need to be mapped to a surface or a volume. The data is represented as a string of bytes in Base64
    Base64
    Base64 is a group of similar encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation...

     encoding, one byte per pixel specifying the grayscale level in the 0-255 range.


    TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCB
    vbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieS
    B0aGlzIHNpbmd1bGFyIHBhc3Npb24gZnJvb
    SBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBh
    ...


    Once the texture-id is assigned, the texture data can be referenced in a color formula, such as in the example below.


    0
    1
    3

    tex(1,x,y,z)
    tex(2,x,y,z)
    tex(3,x,y,z)
    0.1



    Usually, however, the coordinated will not be used directly as shown above, but transformed first to bring them from object coordinates to texture coordinates. For example tex(1,f1(x,y,z),f2(x,y,z),f3(x,y,z)) where f1, f2, f3 are some functions, typically linear.

    Material specification

    Materials are introduced using the element. Each material is assigned a unique id.


    StiffMaterial


    FlexibleMaterial


    Geometric volumes are associated with materials by specifying a material-id within the element.




    ...


    ...


    ...



    Mixed, graded, lattice, and random materials

    New materials can be defined as compositions of other materials. The element is used to specify the proportions of the composition, as a constant or as a formula dependent of the x, y, and z coordinates. A constant mixing proportion will lead to a homogenous material. A coordinate-dependent composition can lead to a graded material. More complex coordinate-dependent proportions can lead to nonlinear material gradients as well as periodic and non-periodic substructure. The proportion formula can also refer to a texture map using the tex(textureid,x,y,z) function. Reference to material-id "0" (void) can be used to specify porous structures. Reference to the rand(x,y,z) function can be used to specify pseudo-random materials. The rand(x,y,z) function returns a random number between 0 and 1 that is persistent for that coordinate.


    MixedMaterial
    0.4
    0.6


    VerticallyGraded
    z
    10-z


    Checkerboard
    floor(x+y+z%1)+0.5)
    1-floor(x+y+z%1)+0.5)


    RandomSpeckledMaterial
    rand(x,y,z)
    1-rand(x,y,z)

    Print constellations

    Multiple objects can be arranged together using the element. A constellation can specify the position and orientation of objects to increase packing efficiency and to describe large arrays of identical objects. The element specifies the displacement and rotation an existing object needs to undergo to arrive into its position in the constellation. The displacement and rotation are always defined relatively to the original position and orientation in which the object was defined. A constellation can refer to another constellation as long as cyclic references are avoided.



    5
    90


    -10
    10
    180

    ...


    If multiple top-level constellations are specified, or if multplie objects without constellations are specified, each of them will be imported with no relative position data. The importing program can then freely determine the relative positioning.

    Meta-data

    The element can optionally be used to specify additional information about the objects, geometries and materials being defined. For example, this information can specify a name, textual description, authorship, copyright information and special instructions. The element can be included at the top level to specify attributes of the entire file, or within objects, volumes and materials to specify attributes local to that entity.



    Product 123
    John Smith
    Smith & Co. 2011
    SolidX 2.2
    Part 1
    1.3A
    ...

    Component 1
    ...


    Formulas

    In both the and elements, coordinate-dependent formulas can be used instead of constants. These formulas can use any of the algebraic mathematical operators and expressions, as well as the functions listed below.
    Operator Description Operator Description Operator Description
    Parentheses block ^ Power * Multiply
    / Divide % Modulus, including fractional + Add
    - Subtract = Equal* <, <= Less than (or equal to)*
    >, >= Greater than (or equal to) & Intersection (Logical AND) > Union (Logical OR)*
    \ Difference (Logical XOR)* ! Negation (Logical NOT)* sin(x) Sine, radians
    cos(x) Cosine, radians tan(x) Tangent, radians asin(x) Arc sine, radians
    acos(x) Arc cosine, radians atan(x) Arc tangent, radians floor(x) Round down to nearest integer
    ceil(x) Round up to nearest integer sqrt(x) Square root log(x) Natural logarithm
    exp(x) Natural exponent abs(x) Absolute value max(x,y) Maximum value
    min(x,y) Minimum value rand(x,y), rand(x,y,z), rand(x,y,z,k) Maps the 2D or 3D coordinate onto a real (fractional) pseudo-random number uniformly distributed in the range [0-1) (exclusive of 1). The number returned will be persistent across multiple calls. If k=1, a second (probably different) number will be returned for that coordinate. tex(textureid,x,y,z), tex(textureid,x,y) Returns a scalar value in the range [0-1] that interpolates the texture at the coordinate (x,y,z). Whole coordinate values refer to the center of the texture map pixels. If the values are fractional, linear interpolation shall be used. If the coordinates fall outside the texture, a zero value shall be returned.

    • Logical operators returns a Boolean value of either 1 or 0, representing TRUE and FALSE, respectively. When processing non Boolean numbers as Boolean values, a zero value represents FALSE, and a nonzero value represents TRUE.

    Compression

    An AMF can be stored either as plain text or as compressed text. A compressed AMF file is typically about half the size of an equivalent compressed binary STL file. If compressed, the compression is in ZIP archive
    ZIP (file format)
    Zip is a file format used for data compression and archiving. A zip file contains one or more files that have been compressed, to reduce file size, or stored as is...

     format. The compression can be done manually using compression software, or automatically by the exporting software during write time. Both the compressed and uncompressed files have the AMF extension and it is the responsibility of the parsing program to determine whether or not the file is compressed, and if so to perform decompression during import.

    Design considerations

    When the ASTM Design subcommittee began developing the AMF specifications, a survey of stakeholders revealed that the key priority for the new standard was the requirement a for non-proprietary
    Proprietary software
    Proprietary software is computer software licensed under exclusive legal right of the copyright holder. The licensee is given the right to use the software under certain conditions, while restricted from other uses, such as modification, further distribution, or reverse engineering.Complementary...

     format. Units and buildability issues were a concern lingering from problems with the STL format. Other key requirements were the ability to specify geometry with high fidelity and small file sizes, multiple materials, color, and microstructures. In order to be successful across the field of additive manufacturing, this file format was designed to address the following concerns
    1. Technology independence: The file format must describe an object in a general way such that any machine can build it to the best of its ability. It is resolution and layer-thickness independent, and does not contain information specific to any one manufacturing process or technique. This does not negate the inclusion of properties that only certain advanced machines support (for example, color, multiple materials, etc.), but these are defined in such a way as to avoid exclusivity.
    2. Simplicity: The file format must be easy to implement and understand. The format should be readable and editable in a simple text viewer, in order to encourage understanding and adoption. No identical information should be stored in multiple places.
    3. Scalability: The file format should scale well with increase in part complexity and size, and with the improving resolution and accuracy of manufacturing equipment. This includes being able to handle large arrays of identical objects, complex repeated internal features (e.g. meshes), smooth curved surfaces with fine printing resolution, and multiple components arranged in an optimal packing for printing.
    4. Performance: The file format must enable reasonable duration (interactive time) for read and write operations and reasonable file sizes for a typical large object.
    5. Backwards compatibility: Any existing STL file should be convertible directly into a valid AMF file without any loss of information and without requiring any additional information. AMF files are also easily convertible back to STL for use on legacy systems, although advanced features will be lost.
    6. Future compatibility: In order to remain useful in a rapidly changing industry, this file format must be easily extensible while remaining compatible with earlier versions and technologies. This allows new features to be added as advances in technology warrant, while still working flawlessly for simple homogenous geometries on the oldest hardware.

    History

    Since the mid-1980s, the STL
    STL (file format)
    STL is a file format native to the stereolithography CAD software created by 3D Systems. This file format is supported by many other software packages; it is widely used for rapid prototyping and computer-aided manufacturing. STL files describe only the surface geometry of a three dimensional...

     file format has been the de-facto industry standard for transferring information between design programs and additive manufacturing equipment. The STL format only contained information about a surface mesh, and had no provisions for representing color, texture, material, substructure, and other properties of the fabricated target object. As additive manufacturing technology evolved from producing primarily single-material, homogenous shapes to producing multi-material geometries in full color with functionally graded materials and microstructures, there was a growing need for a standard interchange file format that could support these features. A second factor that ushered the development of the standard was the improving resolution of additive manufacturing technologies. As the fidelity of printing processes approached micron scale resolution, the number of triangles required to describe smooth curved surfaces resulted in unacceptably large file sizes.

    During the 1990s and 2000s, a number of proprietary file formats have been in use by various companies to support specific features of their manufacturing equipment, but the lack of an industry-wide agreement prevented widespread adoption of any single format. In January 2009, a new ASTM
    ASTM International
    ASTM International, known until 2001 as the American Society for Testing and Materials , is an international standards organization that develops and publishes voluntary consensus technical standards for a wide range of materials, products, systems, and services...

    Committee F42 on Additive Manufacturing Technologies was established, and a design subcommittee was formed to develop a new standard. The resulting first revision of the AMF standard became official on May 2, 2011.
    The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
     
    x
    OK