The next digital anatomy lesson focuses on 3D mesh export files especially, STL, OBJ, 3MF and AMF files. These files delivered the 3D topological structure of the forms you wish to fabricate from your 3D design and CAD tools with your 3D printer control software. A 3D mesh export file is an intermediate stage file, created downstream from your CAD software and upstream from the job file itself. It fills this role by taking in the critical topological information from the design software export into a structured file, that can be efficiently processed within the 3D Control software but the slicer. We will go into greater detail during the lecture itself regarding what opportunities you get out of which file format type. But the essential similarity from form to form, is that these files described the outside of a digital object in clear enough terms that the slicing tools with a 3D printer control software can run tools and processes on them, to prepare the job instruction files. These types of mesh export files are only a tiny subset of a wide array of 3D export files that you might use to deliver your designs. There are other formats better for delivery to say a VR project created in Unity 3D or a high-end 3D rendering packaged like V-Ray or volumetric files used in certain medical scans. In others formats that you will end up using, you won't need every type of setting in data for sitting to a desktop 3D printer, just that mesh itself. Additional features such as surface map, images, color, and material might not entered into the 3D printing process at all depending on the technology you're using. For those new to 3D printing, this step is a bit odd and seems unnecessary. This is compounded by plugins and macros that eliminate the mesh export stage to go directly from the design packaged into 3D printing control software or skip further and go right into generating the job file. But in most digital pipelines for 3D printing, your design object is being meshed, even if this takes place offstage. So knowing a bit more about how 3D mesh formats and files work, will stand you in good stead especially if you should notice something strange in a preview or a 3D printed part, something that looks nothing like what you intended in your design software. How mesh files are used. The use of a mesh model typically an STL file as the interchange file STL between the original design documents and a fixed sequence of machine instructions in the job file has been around since the beginning of the technology. Roughly speaking, these files represent the three-dimensional forms of solid objects in terms of a series of simple polygons, usually triangles that transform even a very complex in organic surface into a series of very tiny flat services joined together at angles. The way that the mesh file works in the digital pipeline for the purpose of slicer utilities preparing jobs for 3D printers is that the empty shell of the solid object defined by the file format is turned into a boundary to establish for the slicer what is inside and what is outside of the form. Triangles unlike other polygons are not ambiguous, as far as placement and work. You can always sketch a flat plane from three vertices, compare this to a collection of four more points. You can imagine these points in a certain arrangement creating warped and skewed forms. The reason that 3D geometry must be a manifold object i.e a watertight solid object with front and back and fitness is because of the importance of delivering mesh files to the slicer, where there is no question which side of a surface is the outside of the part, which is the inside of the part and if you remove even a single triangle from the surface of an object. Then you have a hollow vessel of zero thickness instead of a solid part. Note that slicers do their best to be helpful and ignore tiny tears and rips in a surface that are too small to be detected by AI to make the process of policing your files for wholes a lot easier. Notice that the original design intentions of the part containing the part design file do not make it to the slicer. The mesh file tosses out all of that history and any relationships and constraints, and instead provides just the topology of the outer shell the object, which is preferred by slicers because they need to work systematically through the 2D files produced from the mesh file. Any information that cannot be unambiguously divided into flat layers is computationally difficult to run slicer script on. Notice also that if you zoom in close to the mesh file, that any sensuous organic curves and arcs that were defined by angle rotation or other parametric processes are no longer truly curved. Gone is the infinite resolution of a vector file defined by mathematical relationships. This boundary then governs what areas are part and what is emptiness, when the three-dimensional form is translated into a tall stack of flat horizontal XY 2D slices with a thickness indicated by the layer height. The 2D horizontal slices are the areas that are then analyzed to determine path placement and order. The slicer will then run a series of scripts each element in value established by the slicer profiles and settings in the 3D Control software, on each horizontal layer to produce the final instructions, one layer at a time. Remember how the mesh translation of organic surfaces in the original design replace those curves surfaces into surfaces made up of tiny flat triangles. So now in the resulting 2D slices, those triangles have become a series of flat lines. The process of printing them at a high resolution, these straight lines can be as short as tiny dots, tricks the AI into reading them as naturally curved surfaces, that effect along with the way that the polymer material cools and relaxes, helps to round out those features to more closely approximate, the rounded features intended in the original design. Like the path through maze, discussed in another lecture, the past determined for each horizontal layer are merged together in sequence into a long series of instructions that in turn will produce the part layer by layer from the very bottom of the object, that first maze it was solved, to the very top of the object, for the very last design elements executed. The slicer essentially solves each maze, each layer and then makes a z-axis adjustment to move from layer to layer, to start the next maze. As a slicer interprets these elements, various other scripts in a slicer identify certain patterns in the horizontal layers, that trigger adjustments to pass, that should be implemented to produce better results. For example, identifying types of special features in the X, Y and features in the Z, by comparing details from layer to layer. These scripts then inject adjustments to movement, feature order, speed, temperature, active cooling, retraction and more in order to produce more pleasing results, then continuing on with the default paths uninterrupted. So why the heck do slicers do this? Why not use more complex arc and curve solvers from CNC and other automation systems to move the tool head along path, more similar to the way these elements are mathematically derived in vector images and that kind of thing. Also, more similar to how we move our hands, physically, when doing something like working in a machine shop. The first reason for this is that it is computationally difficult to solve path for printing and travel with all these types of path features in the same place. Simply solving the sort order of which elements of the part should be printed in which order, is a problem that to define elegantly and to the limit of what mathematics is capable of would generate math problems that would take longer than the heat death of the universe to completely solve. Many of the scripts and tools that help the slicer solve challenges quickly and efficiently are intentional but pleasing imprecisions, that take NP complete problems like the traveling salesman problem involved in determining which order for the tool had to hit in all of the elements of layers, the most efficiently possible, and executes algorithms that can be completed quickly by the slicer solver to approximate the more elegant results in a pleasing way, and within our lifetime. Well, much more complex topology could be converted into instructions. Consider the additional computational challenges of finding ways to move in and out of each type of movement command. So it's not to reflect a change between the modes on the surface of the part. The second reason is the implementation of the instructions themselves by the machines. 3D printers are pretty dumb by automation system standards and instructions that are too computationally challenging will create data bottlenecks with the process of unspooling and following those thousands and thousands and thousands of instructions effectively. In fact, it is possible to throw too many points of data at the definition of a curve and constant 3D printer to stutter, hesitate, and produce poorer results than a curve defined with fewer longer lengths of lines, counterintuitive, but true. Thankfully, slicers themselves help to round off and reduce complexity that cannot be reflected in a positive way on the final part itself. While we will likely see some more complex command types slipping into machine control instructions, as more of this class of machines shifts to beef your MCU's capable of larger data throughput. But the challenge of creating slicers capable of handling any darn geometry you throw at it, plus the limits to the type of details that can be included in the file formats, means that this progress is slow and requires industry wide buy-in from both the 3D printing manufacturing side and 3D design software developers. That is the route to truly replace how G-code and mesh files are used today. So what is an STL file? So let's talk about mesh file formats themselves. What is an STL file? The STL file format has been in use for 3D printing since the very beginning of the commercialized form in the late 1980s. This is the stereo lithography file format created by 3D systems at first used with their SLA Machines. The acronym is also often assigned to standard tessellation language which gives you a hint of how it works. Thousands and thousands of triangular planes identified by the coordinates of its vertices, tessellate across the surface of complex solid volumes. Only the outer surface of the objects are defined. The normal, i.e., outward directed surface of the triangle indicates which is the outside face and which is an inside of that face. Calculated by either an additional value or file standards for order of vertices in the way that they're listed. This format has been around since 1987 with multiple participants involved with creating the standard and evolving it and remains relatively unchanged to now. Units are not specifically indicated in the format, so be mindful whether you pick imperial or metric output. There is an ASCII and a binary version of the format. The format is popular enough these days that most 3D computer graphics packages can export to it, regardless of whether they are typically used for solid CAD design, digital modeling, surface modeling, or even animation. The STL mesh format has been the preferred 3D model file for the AM field for decades. Largely, as a matter of convenience, supported by the feedback loop of so many utilities created to repair and modify meshes created to serve job preparation tools that frequently require them. It is not, sadly, the hardiest file format of all time. The process of producing them, especially using incredibly complex and messy topology such as the results of a volumetric medical scan, can often lead to issues such as flipped triangles, self-intersecting geometry, patches that overlap each other, tiny tears, rips, and omissions that if not repaired, can confuse the slicer and produce results that are vastly different than what was intended. Mesh files can be so problematic than an entire class of software exist to repair and improve them. These tools identify patterns and surfaces that allows them to repair minor issues and even re-mesh the entire surface in a more elegant and simple topology that is easier for the 3D slicer to interpret after the mesh file is handed off to the process of slicing 3D forms into 2D layers. So is STL really the perfect file format for 3D printing? The short-term answer is that the format has been fine because tools dividing a 3D mesh into horizontal layers can make short work of these triangles. There are so many highly functional 2D image analysis and path-solving tools that can be applied to those slices. A large part of the computational side of 3D slicing has benefited from the large number of 2D imaging tools that have been created for such wide uses as recognizing characters from optical scans and identifying details for massive collections of photos and images online, also optimizing PDFs. So it works for now, but there are a number of attractive alternatives that could replace this format forever, if there is enough adoption. Well, let's take a quick side trip though. What is an OBJ file? The OBJ file format was initially created by Wavefront as a similar format to STL that is more useful to computer graphics and animation. There are a few other features with some deficiencies such as making it possible to declare vertices locations without relying on normals to indicate outside and inside. Also, the ability to include color information which isn't used in FFF stuff printing but can be very handy. It isn't used as frequently in 3D printing, but many of the 3D control software and slicer packages can open it and unpack them to use them for preparing print jobs, typically, by translating them into STLs first. So you can use these files and might obtain files in this format from mesh manipulation tools such as MeshMixer or animation destination models and forms. But this is not much of an improvement over the problems of STL, so not a great replacement candidate. I guess a good way to save your color information. So what is the 3MF file format? 3MF and AMF files are more recently created mesh interchange file formats. They were created by the additive manufacturing industry for the additive manufacturing industry. In addition to including the mesh topology itself, there are better ways to identify features and protect against some of the errors that STLs and OBJs are prone to. What's more? Both these file formats have XML-based structures for including other information about that model including ways to indicate color, materials, lattices, and few other types of features that cannot be properly represented in the STL format. Because a 3MF file is a container file, additional resources can be injected into them. Ultimaker Cura uses them as a project file format for parts you have sliced, allowing you to capture all of the profile settings you use to produce your job files. In addition to defining all the topology of the mesh, you can use them to go and see what decisions you've made when last you prepared this file. Well, not all users and CAD packages have shifted to full adoption of these manufacturing file formats. The opportunities represented for carrying these files through multiple stages of fabrication technology suggests that their usage over time will continue to rise. At least until the next manufacturing format standard is pushed through with better adoption, which may or may not happen. Each of these file formats discussed in this lecture are standards, supported to various degrees by various software developers and hardware developers. The fact that they are standards also means that if you're curious to learn more about how they behave, there are a number of excellent resources online shared to all to help you better understand how each functions and how they can be implemented, and in fact, how they are implemented in specific packages. While none of them yet offered the solution to best represent every possible topological form, may inspire you not only with how you can capture and store information about your current projects, but also how the machines of the future may work with these file formats to automatically fabricate features intended in the design. They are difficult to represent mathematically by a typical operator.