Benutzer:Tristram/Additive manufacturing file format
Vorlage:Short description Vorlage:For Vorlage:Multiple issues
Additive manufacturing file format (AMF) is ein offener Standard zur Beschreibung von Objekten für Prozesse der additiven Fertigung bzw. des 3D-Drucks. Der offizielle ISO/ASTM 52915:2020[1][2] Standard ist ein XML-basiertes Format, das es einer CAD-Software – die dieses Format beherrscht – ermöglicht, die Form und Zusammensetzung beliebiger 3D-Objekte zu beschreiben, die auf jedem 3D-Drucker mithilfe von CAD-Software hergestellt werden können.
Im Gegensatz zum Vorgängerformat STL bringt AMF bereits von Haus aus die Unterstützung für Farben, Materialien, Gitter und Konstellationen mit. Dadurch können Maschinen angesteuert werden, die Materialmix, Textur und Farbe direkt im Prozess erzeugen. Das AMF-Format ist zu STL kompatibel; wenn nur die STL-spezifischen Informationen ausgelesen werden, reduziert sich die Funktion von AMF allerdings auf die Geometrieddaten.[3]
Struktur
[Bearbeiten | Quelltext bearbeiten]Eine AMF-Datei kann ein Objekt oder mehrere in einer Konstellation angeordnete Objekte darstellen. Jedes Objekt wird als eine Menge nicht überlappender Volumina beschrieben. Jedes Volumen wird durch ein Netz aus Dreiecken beschrieben, das auf eine Reihe von Punkten (Scheitelpunkten) verweist. Diese Scheitelpunkte können von Volumen desselben Objekts gemeinsam genutzt werden. Eine AMF-Datei kann außerdem Material und Farbe jedes Volumens sowie die Farbe jedes Dreiecks in der Netzstruktur angeben. Die AMF-Datei wird im ZIP-Format komprimiert, die Dateierweiterung „.amf“ bleibt jedoch erhalten. Eine minimale AMF-Reader-Implementierung – das heißt, ein Programm bzw. eine Software zum Auslesen von AMF-Informationen – muss mindestens in der Lage sein, eine AMF-Datei zu dekomprimieren und zumindest die Geometrieinformationen (ohne Berücksichtigung der Krümmung) zu importieren.
Basic file structure
[Bearbeiten | Quelltext bearbeiten]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 Vorlage:Tag element and a closing Vorlage:Tag 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.
- Vorlage:Tag 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.
- Vorlage:Tag 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.
- Vorlage:Tag The optional texture element defines one or more images or textures for color or texture mapping, each with an associated texture ID.
- Vorlage:Tag The optional constellation element hierarchically combines objects and other constellations into a relative pattern for printing.
- Vorlage:Tag The optional metadata element specifies additional information about the object(s) and elements contained in the file.
DEUTSCH:
AMF-Dateistruktur
[Bearbeiten | Quelltext bearbeiten]Die AMF-Datei beginnt mit der XML-Deklarationszeile, die die XML-Version und -Kodierung angibt. Ferner enthält die Datei fünf Elemente oder Befehle zur Bestimmung der Eigenschaften:
- <object> Objekt- oder Geometrie-Spezifikation zur Definition von einem oder mehreren Materialvolumen
- <material> Material-Spezifikation: Jedem Material wird eine eindeutige ID zugewiesen und geometrische Volumina werden Materialien zugeordnet, indem im Element <volume> eine Material-ID angegeben wird.
- <texture> Textur-Spezifikation: Bestimmten Oberflächen oder Volumen werden Farben und Materialien zugeordnet, analog zur Texturierung im Grafikbereich.
<
wird zwischen einem öffnenden und einem schließenden Vorlage:Tag-Element eingeschlossen. Das Einheitensystem kann ebenfalls angegeben werden (Millimeter, Zoll, Fuß, Meter oder Mikrometer). Fehlt eine Einheitenangabe, wird von Millimetern ausgegangen.
übersetzt Textur: Texture Maps ermöglichen die Zuordnung von Farbe oder Material zu einer Oberfläche oder einem Volumen und orientieren sich dabei an der Idee des Texture Mappings in der Grafik. Das Vorlage:Tag-Element wird zunächst verwendet, um eine Vorlage:Code bestimmten Texturdaten zuzuordnen. Die Daten können als 2D- oder 3D-Array dargestellt werden, je nachdem, ob Farbe oder Material einer Oberfläche oder einem Volumen zugeordnet werden sollen. Die Daten werden als Byte-String in Base64-Kodierung dargestellt, wobei ein Byte pro Pixel den Graustufenwert im Bereich von 0 bis 255 angibt.
Nach der Zuordnung der Texture-id können die Texturdaten in einer Farbformel referenziert werden, wie im folgenden Beispiel.
In der Regel werden die Koordinaten jedoch nicht direkt wie oben gezeigt verwendet, sondern zunächst von Objektkoordinaten in Texturkoordinaten umgewandelt. Zum Beispiel Vorlage:Code, wobei Vorlage:Code einige Funktionen sind, normalerweise linear.
Gebhardt 2013 3. <texture> Auch der texture-Befehl ist optional und erlaubt die Zuordnung von Farben und Texturen a)Texture maps: Texture maps ordnen bestimmten Oberflächen oder Volumen Farben und Materialien zu. Dies funktioniert ähnlich wie die Texturierung im Grafikbereich. b) Farben: Farben werden über den rot, grün, blau und alpha-Kanal definiert. Jedem Kanal wird dabei ein Wert zwischen null und eins zugewiesen, welcher die Stärke der Farbe angibt. Diese Werte können als Konstanten vorliegen, oder als Formel von der geometrischen Lage abhängig gemacht werden. Der alpha-Kanal steuert die Transparenz und erlaubt das Durchscheinen von untergeordneten Farben. Das <color>-Element kann auf Materialien, Objekte, Volumen, Scheitelpunkte oder Dreiecke angewendet werden. Die Rangfolge der Farben ist genau umgekehrt, sodass beispielsweise die Farbe eines Dreiecks die höchste Priorität besitzt. 4. <constellation> Falls innerhalb der AMF-Datei mehrere Bauteile vorhanden sind, gibt der constellation-Befehl an, in welcher Reihenfolge die Bauteile gedruckt werden sollen.
5. <metadata> Innerhalb des metadata-Bereichs können zusätzliche Informationen, wie bspw. Autor, Projektname, Copyright, verwendetes CAD-System, etc. 6. Neben den einfachen geradlinigen Kanten der STL-Dreiecke, besitzt das AMF- Format die Möglichkeit von gebogenen Dreieckskanten, welche eine bessere Approximation der Geometrie ermöglichen. Dadurch wird eine Reduktion der Datenmenge, bei gleichbleibender Geometrieauflösung möglich. AMF ist frei verfügbar und trägt dazu bei, die Anzahl von proprietären Lösungen nicht weiter ansteigen zu lassen und einen der größten Vorteile der STL-Formatierung zu bewahren: den maschinenunabhängigen Einsatz. Weitere Vorteile liegen in zusätzlichen Funktionen, wie beispielsweise der Definition von Längeneinheiten, Kompatibilität mit FE-Anwendungen, Begrenzung der Anzahl der möglichen Drucke, Informationen über die Bauraumorientierung, Passwortver- schlüsselung, etc. Mit der Entwicklung des AMF-Formates wurden die größten Nachteile des STL- Formates eliminiert. Es basiert aber weiterhin auf Dreiecken. Durch neue Kompres- sionsalgorithmen wurde die Datenmenge reduziert, die grundlegenden Nachteile der STL-Formulierung bleiben aber. Das AMF-Format kämpft allerdings immer noch um eine breite Akzeptanz, die ihm vor allem die großen Hersteller bisher noch versagen.
Geometry specification
[Bearbeiten | Quelltext bearbeiten]The format uses a Face-vertex polygon mesh layout. Each top-level Vorlage:Tag element specifies a unique Vorlage:Code. The Vorlage:Tag element can also optionally specify a material. The entire mesh geometry is contained in a single Vorlage:Tag element. The mesh is defined using one Vorlage:Tag element and one or more Vorlage:Tag elements. The required Vorlage:Tag 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 Vorlage:Tag gives the position of the point in 3D space using the Vorlage:Tag, Vorlage:Tag and Vorlage:Tag elements. After the vertex information, at least one Vorlage:Tag 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 Vorlage:Tag is used to define triangles that tessellate the surface of the volume. Each Vorlage:Tag element will list three vertices from the set of indices of the previously defined vertices given in the Vorlage:Tag element. The indices of the three vertices of the triangles are specified using the Vorlage:Tag, Vorlage:Tag and Vorlage:Tag 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.
Color specification
[Bearbeiten | Quelltext bearbeiten]Colors are introduced using the Vorlage:Tag element by specifying the red, green, blue and alpha (transparency) channels in the sRGB color space as numbers in the range of 0 to 1. The Vorlage:Tag 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.
A color can also be specified by referring to a formula that can use a variety of coordinate-dependent functions.
Texture maps
[Bearbeiten | Quelltext bearbeiten]Texture maps allow assigning color or material to a surface or a volume, borrowing from the idea of Texture mapping in graphics. The Vorlage:Tag element is first used to associate a Vorlage:Code 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 encoding, one byte per pixel specifying the grayscale level in the 0-255 range.
Once the texture-id is assigned, the texture data can be referenced in a color formula, such as in the example below.
Usually, however, the coordinates will not be used directly as shown above, but transformed first to bring them from object coordinates to texture coordinates. For example, Vorlage:Code where Vorlage:Code are some functions, typically linear.
Material specification
[Bearbeiten | Quelltext bearbeiten]Materials are introduced using the <material> element. Each material is assigned a unique id. Geometric volumes are associated with materials by specifying a material-id within the <volume> element.
Mixed, graded, lattice, and random materials
[Bearbeiten | Quelltext bearbeiten]New materials can be defined as compositions of other materials. The element Vorlage:Tag 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 Vorlage:Code function. Reference to material-id "0" (void) is reserved and may be used to specify porous structures. Reference to the Vorlage:Code function can be used to specify pseudo-random materials. The Vorlage:Code function returns a random number between 0 and 1 that is persistent for that coordinate.
Print constellations
[Bearbeiten | Quelltext bearbeiten]Multiple objects can be arranged together using the Vorlage:Tag element. A constellation can specify the position and orientation of objects to increase packing efficiency and to describe large arrays of identical objects. The Vorlage:Tag 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.
If multiple top-level constellations are specified, or if multiple 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
[Bearbeiten | Quelltext bearbeiten]The Vorlage:Tag 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 Vorlage:Tag 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.
Optional curved triangles
[Bearbeiten | Quelltext bearbeiten]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.[1] Curvature should not create a deviation 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 Vorlage:Tag 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 Vorlage:Tag 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 Vorlage:Tag element will take precedence in case of a conflict with the curvature implied by a Vorlage:Tag element.
When curvature is specified, the triangle is decomposed recursively into four sub-triangles. The recursion must be executed five levels deep, so that the original curved triangle is ultimately replaced by 1024 flat triangles. These 1024 triangles are generated "on the fly" and stored temporarily only while layers intersecting that triangle are being processed for manufacturing.
Formulas
[Bearbeiten | Quelltext bearbeiten]In both the Vorlage:Tag and Vorlage:Tag elements, coordinate-dependent formulas can be used instead of constants. These formulas can use various standard algebraic and mathematical operators and expressions.
Compression
[Bearbeiten | Quelltext bearbeiten]An AMF can be stored either as plain text or as compressed text. If compressed, the compression is in ZIP archive format. A compressed AMF file is typically about half the size of an equivalent compressed binary STL file.[4]:275 The compression can be done manually using compression software, or automatically by the exporting software during write. Both the compressed and uncompressed files have the Vorlage:Code 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
[Bearbeiten | Quelltext bearbeiten]When the ASTM Design subcommittee began developing the AMF specificationsVorlage:When, a survey of stakeholders[5] revealed that the key priority for the new standard was the requirement for a non-proprietary 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
- 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.
- 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.
- 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.
- Performance: The file format must enable reasonable duration (interactive time) for read and write operations and reasonable file sizes for a typical large object.
- 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.
- 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
[Bearbeiten | Quelltext bearbeiten]Since the mid-1980s, the STL 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.[5]
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 2006, Jonathan D. Hiller and Hod Lipson presented an initial version of AMF dubbed "STL 2.0".[4] In January 2009, a new ASTM Committee F42 on Additive Manufacturing Technologies was established, and a design subcommittee was formed to develop a new standard. A survey was conducted in late 2009[5] leading to over a year of deliberations on the new standard. The resulting first revision of the AMF standard became official on May 2, 2011.[6]
During the July 2013 meetings of ASTM's F42 and ISO's TC261 in Nottingham (UK), the Joint Plan for Additive Manufacturing Standards Development was approved. Since then, the AMF standard is managed jointly by ISO and ASTM.
Sample file
[Bearbeiten | Quelltext bearbeiten]
Below is a simple AMF file describing a pyramid made of two materials, adapted from the AMF tutorial[7] (548 bytes compressed). To create this AMF file, copy and paste the text below into a text editor or an xml editor, and save the file as "pyramid.amf". Then compress the file with ZIP, and rename the file extension from ".zip" to ".zip.amf".
<?xml version="1.0" encoding="utf-8"?>
<amf unit="inch" version="1.1">
<metadata type="name">Split Pyramid</metadata>
<metadata type="author">John Smith</metadata>
<object id="1">
<mesh>
<vertices>
<vertex><coordinates><x>0</x><y>0</y><z>0</z></coordinates></vertex>
<vertex><coordinates><x>1</x><y>0</y><z>0</z></coordinates></vertex>
<vertex><coordinates><x>0</x><y>1</y><z>0</z></coordinates></vertex>
<vertex><coordinates><x>1</x><y>1</y><z>0</z></coordinates></vertex>
<vertex><coordinates><x>0.5</x><y>0.5</y><z>1</z></coordinates></vertex>
</vertices>
<volume materialid="2">
<metadata type="name">Hard side</metadata>
<triangle><v1>2</v1><v2>1</v2><v3>0</v3></triangle>
<triangle><v1>0</v1><v2>1</v2><v3>4</v3></triangle>
<triangle><v1>4</v1><v2>1</v2><v3>2</v3></triangle>
<triangle><v1>0</v1><v2>4</v2><v3>2</v3></triangle>
</volume>
<volume materialid="3">
<metadata type="name">Soft side</metadata>
<triangle><v1>2</v1><v2>3</v2><v3>1</v3></triangle>
<triangle><v1>1</v1><v2>3</v2><v3>4</v3></triangle>
<triangle><v1>4</v1><v2>3</v2><v3>2</v3></triangle>
<triangle><v1>4</v1><v2>2</v2><v3>1</v3></triangle>
</volume>
</mesh>
</object>
<material id="2">
<metadata type="name">Hard material</metadata>
<color><r>0.1</r><g>0.1</g><b>0.1</b></color>
</material>
<material id="3">
<metadata type="name">Soft material</metadata>
<color><r>0</r><g>0.9</g><b>0.9</b><a>0.5</a></color>
</material>
</amf>
See also
[Bearbeiten | Quelltext bearbeiten]- X3D
- 3D Printing Marketplace
- 3D Manufacturing Format
- glTF - a Khronos Group file format for 3D Scenes and models.
Notes
[Bearbeiten | Quelltext bearbeiten]- ↑ a b Referenzfehler: Ungültiges
<ref>
-Tag; kein Text angegeben für Einzelnachweis mit dem Namen ASTM F2915. - ↑ Referenzfehler: Ungültiges
<ref>
-Tag; kein Text angegeben für Einzelnachweis mit dem Namen ISO 52915. - ↑ Andreas Gebhardt: Generative Fertigungsverfahren. Additive Manufacturing und 3D Drucken für Prototyping – Tooling – Produktion. 4., neu bearbeitete und erweiterte Auflage. Carl Hanser Verlag, München 2013, ISBN 978-3-446-43652-7, S. 44–45.
- ↑ a b Jonathan D. Hiller, Hod Lipson: STL 2.0: A Proposal for a Universal Multi-Material Additive Manufacturing File Format. Solid Freeform Fabrication Symposium (SFF'09). Cornell University, Austin, TX, USA 2009 (sffsymposium.engr.utexas.edu ( des vom 11. Juni 2020 im Internet Archive) [abgerufen am 5. Mai 2017]).
- ↑ a b c Referenzfehler: Ungültiges
<ref>
-Tag; kein Text angegeben für Einzelnachweis mit dem Namen Rapid Today. - ↑ Referenzfehler: Ungültiges
<ref>
-Tag; kein Text angegeben für Einzelnachweis mit dem Namen ASTM Release. - ↑ Referenzfehler: Ungültiges
<ref>
-Tag; kein Text angegeben für Einzelnachweis mit dem Namen AMF Tutorial.
Weblinks
[Bearbeiten | Quelltext bearbeiten]- AMF Wiki: A repository of AMF resources, sample files, and source code
- Jon Hiller's AMF page
Vorlage:CAD software [[Category:Open standards]] [[Category:XML-based standards]] [[Category:3D graphics file formats]] [[Category:CAD file formats]]
- ↑ Specification for Data Exchange Format for Additive Manufacturing
- ↑ Specification of AMF on ISO web page
- ↑ New ASTM Additive Manufacturing Specification Answers Need for Standard Interchange File Format ASTM, July 20, 2011
- ↑ STL 2.0 May Replace Old, Limited File Format Rapid Today, Oct 2009
- ↑ AMF Tutorial: The Basics (Part 1)