Check out our FDM vs SLA Shootout. We simply explain the differences between these 3D printing technologies, and which to use for which application.
FDM vs SLA: Explained
The Prusa i3 MK3 is one of the finest consumer 3D printers you can get. It uses FDM technology to get things printed. (Source: ALL3DP)
FDM is the abbreviation for Fused Deposition Modeling. In FDM, a strand of material (in this case: thermoplastics) is deposited in layers to create a 3D printed object. During printing, the plastic filament is fed through a hot extruder where the plastic gets soft enough that it can be precisely placed by the print head. The melted filament is then deposited layer by layer in the print area to build the workpiece.
There is a broad choice of FDM 3D printers for every budget, starting at a few hundred dollars. Filament spools are relatively inexpensive, starting from $25 per kilo. These factors made FDM printers so popular among makers and home users.
SLA is the abbreviation for Stereolithography Apparatus, or simply stereolithography. Like FDM, SLA is an additive method: Models are built layer by layer. SLA, however, uses a curable photopolymer – typically a liquid resin – that is hardened by applying focused light or UV light (this process is called curing). SLA printers usually build the models from top to bottom, the build platform lifts the model upwards, out of the resin bath.
The light source is either a laser or a digital projector (the technology is often called DLP – Digital Light Processing). Lasers „draw“ the layers; in DLP, an entire slice (a two-dimensional layer) of the model is projected at once into the resin bath.
Laser SLA printers are usually slower than DLP models because of the small surface of the laser beam. In DLP printers, each layer hardens faster as the entire image of one layer is projected onto the resin. Moreover, DLP projectors are more reliable and easier to maintain than customized laser systems as the projectors use the same technology as business and home cinema projectors. The printed models have to undergo a post-processing process, though.
Overall, there are less budget-friendy SLA machines than FDM 3D printers. Resin printers can often be found in a professional context, although the prices came down in the last years.
FDM printerstypically use PLA, PETG, or ABS filament. Most FDM printers can handle nylon, PVA, TPU and a variety of PLA blends (mixed with wood, ceramics, metals, carbon fiber, etc.) Filaments are available in various colors. Some manufacturers even offer a service to manufacture RAL colors by demand.
Most FDM printers can use standard filament rolls that are available in two standardized sizes (diameter: 1.75 or 2.85mm) from various sources. A few printers use proprietary filaments or filament boxes – these are typically more expensive than standard rolls but deliver better quality.
Owners of SLA printers have only a more limited pallet of resin materials. Quite often these are proprietary and cannot be exchanged between printers from different makers. The choice of colors is also limited. Formlabs, for example, only offers black, white, grey and clear resins. On the other hand, they offer more durable or highly specialized materials (i.e. dental, heat-resistant, or flexible resins) for industrial uses.
FDM vs SLA: Precision and Smoothness
SLA printers print with high precision – you get details you won‘t see in most FDM-printed objects (image: Sprintray, the creators of Moonray)
In FDM printers, the printer’s resolution is a factor of the nozzle size and the precision of the extruder movements (X/Y axis). The precision and smoothness of the printed models is also influenced by other factors: As the bonding force between the layers is lower than in SLA printing and as the weight of upper layers may squeeze the layers below, a number of printing problems may ensue (e.g. warping, misalignment of layers, shifting of layers, shrinking of the lower parts – for more details see this article). These compromise the precision and surface smoothness.
SLA printersconsistently produce higher resolution objects and are more accurate than FDM printers. The reason: The resolution is primarily determined by the optical spot size either of the laser or the projector – and that is really small. Moreover, during printing less force is applied to the model. This way, the surface finish is much smoother. SLA prints show details an FDM printer could never produce.
In fact, the fine details an SLA printer produces is the main reason why one would consider getting an SLA printer.
FDM vs SLA: Adhesion/removal after 3D printing
Adhesion to the print bed is a topic when using an FDM printer. Printed objects can be relatively easily removed – if the object sticks to the print bed, a palette knife will do.
In SLA printers, it can be difficult to remove the printed model from the print platform and often there is a lot of resin left on the platform that you have to remove using a palette knife – and this takes more effort than on an FDM printer. Industrial printer manufacturer Carbon3D even came up with a new idea: They use oxygen to create so-called “dead zone” around the printed model (the oxygen keeps the resin at the surface of the model from hardening).
FDM vs SLA: Postprocessing
After printing on an FDM printeryou need to remove supports (if the model has overhangs) and excess plastic either with your fingers or a cutting tool. Sanding helps to get smoother surfaces. More on supports here: 3D Printing Supports Guide – All You Need to Know
Models printed on an SLA printer such as the Form 1+ are covered in sticky resin that has to be removed in a bath of isopropyl alcohol. This is why you get rubber gloves with most SLA printers – to protect your fingers from the resin and alcohol. Depending on the model, supports may be required, too – removing them is as easy as with FDM printers.
FDM vs SLA: 3D printing costs
Consumable in FDM printersare nozzles and filament rolls. As already mentioned, most FDM printers use the same standardized filament rolls, prices for filament have been declining in the last years. 1 kg of PLA filament can be bought for $25, specialized filaments cost more.
In SLA printers, not only resin is consumed: In SLA printers, the resin tank has to be replaced after 2-3 liters of resin have been printed. The reason is that the tank gets smudged inside over time so the light source is no longer able to precisely project the image in the resin. Depending on the manufacturer and model, resin tanks will set you back around $40 to $80.
Another component that needs replacing from time to time is the build platform as it gets marred when the user removes the printed model; a platform can cost up to $100.
The resin is also costly: 1 liter of standard resin will set you back $ 80 to $150.
FDM vs SLA: Which One to Use?
In a nutshell: If high precision and smooth finish is your top priority and if cost is of no or of minor importance for a print job, use an SLA printer. If cost does play a role, use an FDM printer.
When to use FDM
When to use SLA
When intricate details and/or a very smooth surface finish is crucial
When strength and durability of the model is not crucial (models made from resin may suffer when exposed to the sun for extended periods)
For creating molds for casting to facilitate mass-production (e.g. by jewelry or toy makers)
When to use a 3D printing service
There’s a third option that can save you a lot of money. You don’t have to buy a 3D printer to get something printed, you can use a 3D printing service. You can get more information on 3D printing services in this article: 33 Best Online 3D Printing Services of 2018
What is an STL file? What is it good for? How does it work? We simply explain the STL file format for 3D printing in depth.
Here’s a primer on what they are and how they work, the advantages and disadvantages of their use, plus alternative file formats to consider. In this article, we’re talking about the 3D printing file format, not about the Standard Template Library in C++.
In a nutshell, an STL file stores information about 3D models. This format describes only the surface geometry of a three-dimensional object without any representation of color, texture or other common model attributes.
These files are usually generated by a computer-aided design (CAD) program, as an end product of the 3D modeling process. “.STL” is the file extension of the STL file format.
The STL file format is the most commonly used file format for 3D printing. When used in conjunction with a 3D slicer, it allows a computer to communicate with 3D printer hardware.
Since its humble beginnings, the STL file format has been adopted and supported by many other CAD software packages, and today is widely used for rapid prototyping, 3D printing, and computer-aided manufacturing. Hobbyists and professionals use it alike.
2. What does the file extension .STL stand for?
The true meaning of the file extension .STL has been lost to the mists of time.
It’s widely believed to be an abbreviation of the word STereoLithography, though sometimes it is also referred to as “Standard Triangle Language” or “Standard Tessellation Language”.
3. How does the STL file format store a 3D model?
The main purpose of the STL file format is to encode the surface geometry of a 3D object. It encodes this information using a simple concept called “tessellation”.
3.1 Tessellation
Tessellation is the process of tiling a surface with one or more geometric shapes such that there are no overlaps or gaps. If you have ever seen a tiled floor or wall, that is a good real life example of tessellation.
The tiled wall and floor are simple real life examples of tessellation
Tessellation can involve simple geometric shapes or very complicated (and imaginative) shapes. Here are some examples of artistic tessellations due to the famous painter M. C. Escher. In fact, if you want to see more examples of amazing tessellations, we recommend that you check out his paintings.
Two tessellation paintings by M. C. Escher
3.2 The invention of the STL file format: exploiting tessellation to encode surface geometry
Back in 1987, Chuck Hull had just invented the first stereolithographic 3D printer, and The Albert Consulting Group for 3D Systems were trying to figure out a way to transfer information about 3D CAD models to the 3D printer. They realized that they could use tessellations of the 3D model’s surface to encode this information!
The basic idea was to tessellate the 2 dimensional outer surface of 3D models using tiny triangles (also called “facets”) and store information about the facets in a file.
Let’s look at a few examples to understand how this works. For example, if you have a simple 3D cube, this can be covered by 12 triangles, as shown in the image below. As you can see, there are two triangles per face. Since the cube has six faces, it adds up to 12 triangles.
If you have a 3D model of a sphere, then it can be covered by many small triangles, also shown in the same image.
Tessellations of a cube and a sphere
Here is another example of a very complicated 3D shape which has been tessellated with triangles.
Tessellation of a 3D pig (source : i.materialize)
The Albert Consulting Group for 3D Systems realized that if they could store the information about these tiny triangles in a file, then this file could completely describe the surface of an arbitrary 3D model. This formed the basic idea behind the STL file format!
4. How does an STL file store information about facets?
The STL file format provides two different ways of storing information about the triangular facets that tile the object surface. These are called the ASCII encoding and the binary encoding. In both formats, the following information of each triangle is stored:
The coordinates of the vertices.
The components of the unit normal vector to the triangle. The normal vector should point outwards with respect to the 3D model.
An STL file stores the co-ordinates of the vertices and the components of the unit normal vector to the facets
4.1 The ASCII STL file format
The ASCII STL file starts with the mandatory line:
solid name>
where is the name of the 3D model. Name can be left blank, but there must be a space after the word solid in that case.
The file continues with information about the covering triangles. Information about the vertices and the normal vector is represented as follows:
Here, n is the normal to the triangle and v1, v2 and v3 are the vertices of the triangle. Co-ordinate values are represented as a floating point number with sign-mantissa-e-sign-exponent format, e.g., “3.245000e-002”.
The file ends with the mandatory line:
endsolid name>
4.2 The binary STL file format
If the tessellation involves many small triangles, the ASCII STL file can become huge. This is why a more compact binary version exists.
The binary STL file starts with a 80 character header. This is generally ignored by most STL file readers, with some notable exceptions that we will talk about later. After the header, the total number of triangles is indicated using a 4 byte unsigned integer.
UINT8[80] – Header
UINT32 – Number of triangles
The information about the triangles follow subsequently. The file simply ends after the last triangle.
Each triangle is represented by twelve 32-bit floating point number. Just like the ASCII STL file, 3 numbers are for the 3D Cartesian co-ordinates of the normal to the triangle. The remaining 9 numbers are for the coordinates of the vertices (three each). Here’s how this looks like:
Note that after each triangle, there is a 2 byte sequence called the “attribute byte count”. In most cases, this is set to zero and acts a spacer between two triangles. But some software also use these 2 bytes to encode additional information about the triangle. We will see such an example later, where these bytes will be used to store color information.
5. Special rules for the STL format
The STL specification has some special rules for tessellation and for storing information.
5.1 The vertex rule
The vertex rule states that each triangle must share two vertices with its neighboring triangles.
This rule is to be respected when tessellating the surface of the 3D object.
Here’s an example of a valid and invalid tessellation, according to this rule. The figure on the left violates this rule and is an invalid tessellation, while the figure on the right is conformant and a valid tessellation.
Vertex rule for STL files: The figure on the left is an invalid tessellation, while the figure on the right is acceptable.
5.2 The orientation rule
The orientation rule says that the orientation of the facet (i.e. which way is “in” the 3D object and which way is “out”) must be specified in two ways.
First, the direction of the normal should point outwards. Second, the vertices are listed in counterclockwise order when looking at the object from the outside (right-hand rule).
The orientation of each facet is specified in two ways: by the direction of the normal vector and by the ordering of the vertices
This redundancy exists for a reason. It helps ensure consistency of the data and spot corrupt data. A software can, for example, calculate the orientation from the normal and subsequently from the vertices and verify whether they match. If it doesn’t, then it can declare the STL file to be corrupt!
5.3 The all positive octant rule
The all positive octant rule says that the coordinates of the triangle vertices must all be positive.
This implies that the 3D object lives in the all-positive octant of the 3D Cartesian coordinate system (and hence the name).
The rationale behind this rule is to save space. If the 3D object was allowed to live anywhere in the coordinate space, we would have to deal with negative co-ordinates. To store negative co-ordinates, one needs to use signed floating point numbers. Signed floating point numbers require one additional bit to store the sign (+/-). By ensuring that all coordinates are positive, this rule makes sure that we are able to use unsigned numbers for the coordinates and save a bit for every coordinate value we store.
Octant I (red) is the all positive octant
5.4 The triangle sorting rule
The triangle sorting rule recommends that the triangles appear in ascending z-value order.
This helps Slicers slice the 3D models faster. However, this rule is not strictly enforced.
6. How is an STL file 3D printed?
For 3D printing, the STL file has to be opened in a dedicated slicer. What’s a slicer? It’s a piece of 3D printing software that converts digital 3D models into printing instructions for your 3D printer to create an object.
The slicer chops up your STL file into hundreds (sometimes thousands) of flat horizontal layers based on the settings you choose and calculates how much material your printer will need to extrude and how long it will take to do it.
All of this information is then bundled up into a GCode file, the native language of your 3D printer. Slicer settings do have an impact the quality of your print so it’s important to have the right software and settings to get you the best quality print possible.
Once the GCode has been uploaded to your 3D printer, the next stage is for those separate two-dimensional layers to be reassembled as a three-dimensional object on your print-bed. This is done by depositing a succession of thin layers of plastics, metals, or composite materials, and building up the model one layer at a time.
Unfortunately not. Only a 3D design that’s specifically made for 3D printing is 3D printable. The STL file is just the container for the data, not a guarantee that something is printable.
3D models suitable for 3D printing need to have a minimum wall thickness and a “watertight” surface geometry to be 3D printable. Even if it’s visible on a computer screen, it’s impossible to print something with a wall thickness of zero.
There’s also the consideration of overhanging elements on the model. Look at the ALL3DP logo in the picture above; if the model is printed upright, then overhanging elements with more than a 45-degree angle will require supports (which you can see in green).
When downloading an STL file that you haven’t created yourself, it’s worth taking the time to verify that it is indeed 3D printable. This will save you a lot of time and frustration (and wasted filament).
8. Optimizing an STL file for best 3D printing performance
The STL file format approximates the surface of a CAD model with triangles. The approximation is never perfect, and the facets introduce coarseness to the model.
The perfect spherical surface on the left is approximated by tessellations. The figure on the right uses big triangles, resulting in a coarse model. The figure on the center uses smaller triangles and achieves a smoother approximation (source: i.materialize)
The 3D printer will print the object with the same coarseness as specified by the STL file. Of course, by making the triangles smaller and smaller, the approximation can be made better and better, resulting in good quality prints. However, as you decrease the size of the triangle, the number of triangles needed to cover the surface also increases. This leads to gigantic STL file which 3D printers cannot handle. It’s also a pain to share or upload huge files like that.
It is therefore very important to find the right balance between file size and print quality. It does not make sense to reduce the size of the triangles ad infinitum because at some point your eye is not going to be able to distinguish between the print qualities.
Most CAD software offer a couple of settings when exporting STL files. These settings control the size of the facets, and hence print quality and file size. Let’s dig into the most important settings and find out their optimum values.
8.1 Chord height or tolerance
Most CAD software will let you choose a parameter called chord height or tolerance. The chord height is the maximum distance from the surface of the original design and the STL mesh. If you choose the right tolerance, your prints will look smooth and not pixelated. It’s quite obvious that the smaller the chord height, the more accurately the facets represent the actual surface of the model.
The chord height is the height between the STL mesh and the actual surface (source : www.3dhubs.com)
It is recommended to set the tolerance between 0.01 milimeters to 0.001 milimeters. This usually results in good quality prints. There is no point in reducing this any further, as 3D printers cannot print with that level of detail.
8.2 Angular deviation or angular tolerance
Angular tolerance limits the angle between the normals of adjacent triangles. The default angle is usually set at 15 degrees. Decreasing the tolerance (which can range to 0 to 1) improves print resolution.
Angular tolerance is the angle between the normals of adjacent triangles (source : www.3dhubs.com)
The recommended setting for this parameter is 0.
8.3 Binary or ASCII?
Finally, you have a choice of exporting the STL file in binary or ASCII format. The binary format is always recommended for 3D printing since it results in smaller file sizes. However, if you want to manually inspect the STL file for debugging, then ASCII is preferable because it is easier to read.
9. Are there any alternatives to the STL File Format?
The STL file format is not the only format used in 3D printing. There are over 30 file formats for 3D printing. Most important is the OBJ file format, which can store color and texture profiles. Another option the is Polygon file format (PLY), which was originally used for storing 3D scanned objects.
More recently, there have been efforts to launch a new file type by The 3MF Consortium, which is proposing a new 3D printing file format called 3MF. They claim it will streamline and improve the 3D printing process.
To implement it, Microsoft has partnered up companies like Autodesk, HP, and Shapeways to make their vision a reality. More details on the 3MF Consortium can be read on their website, together with preliminary documentation about the 3MF file type on their GitHub page. It’s far too early to say whether this will become widely adopted, however.
10. Advantages and disadvantages of using STL file format over other file formats
Since there are many 3D printing file formats, the obvious question is : which one should you use for your prints? The answer, as it turns out, depends a lot on your use case.
10.1 When not to use an STL file
As we saw earlier, the STL file format cannot store additional information such as color, material etc. of the facets or triangles. It only stores information about the vertices and the normal vector. This means that if you want to use multiple colors or multiple materials for your prints, then the STL file format is not the right choice. The OBJ format is a popular format enjoying good support which has a way to specify color, material etc. Therefore, this is the right choice for this task.
10.2 When to use an STL file
On the other hand, if you want to print with a single color or material, which is most often the case, then STL is better than OBJ since it is simpler, leading to smaller file sizes and faster processing.
10.3 Other advantages of the STL file format
Universal: Another big advantage of the STL file format is that it is universal and supported by nearly all 3D printers. This cannot be said for the OBJ format, even though it enjoys reasonable adoption and support as well. The VRML, AMF and 3MF formats are not widely supported at this point of time.
Mature ecosystem: Most 3D printable models you can find on the internet are in the STL file format. The existence of this ecosystem, combined with STL-based software investments made by 3D printer manufacturers, has given rise to a large user-base that’s heavily invested in the format. This means there’s plenty of third party software dealing with STL files, which is not the case with the other file formats.
10.4 Some disadvantages of the STL file format
There are some glaring disadvantages to using STL as well. As the fidelity of printing processes embraces micron-scale resolution, the number of triangles required to describe smooth curved surfaces can result in massive file sizes. It’s also impossible to include metadata (such as authorship and copyright information) in an STL file.
10.5 Verdict
If your 3D printing needs are simple, then perhaps there is no reason to move away from the STL file format. However, for more advanced prints using multiple material and color, it is perhaps advisable to try the OBJ or other available formats.
11. Color in STL File Format
In the last section, we said that the STL file format cannot handle multi-color models. The reason the STL file format lacks color information is simple. When rapid prototyping evolved in the 1980s, no one thought of color printing. Nowadays, 3D printing materials and processes have evolved rapidly. Some allow you to print in full-color – just think of sandstone 3D selfies, as pictured above.
However it’s not completely fair to say that STL cannot handle colors. It turns out that there are non-standard versions of the STL format that are indeed capable of carrying color information.
For example, the VisCAM and Solidview software packages use the “attribute byte count” at the end of every triangle to store a 15-bit RGB color using the following system:
bits 0 to 4 for blue (0 to 31),
bits 5 to 9 for green (0 to 31),
bits 10 to 14 for red (0 to 31),
bit 15 is 1 if the color is valid, or 0 if the color is not valid (as with normal STL files).
The Materialize Magics software, on the other hand, uses the 80-byte header in the binary format to represent the overall color of the 3D object. The color is specified by including the ASCII string “COLOR=” followed by four bytes representing red, green, blue and alpha channel (transparency) in the range 0–255. This base color can also be overridden at each facet using the “attribute byte count” bytes.
12. STL file resources
If you have read so far, congratulations! You now know quite a bit about STL and can be undoubtedly called an STL file format expert.
In this final section, we will share some awesome software and resources that you can use for downloading, viewing, editing and repairing STL files.
Fortunately, opening an STL file is not too complicated. There are several free STL file viewers for this purpose, which you can either use online or as a desktop application. Refer to our dedicated guide here: 20 Best Free STL File Viewer Tools of 2018
12.3 Editing and converting an STL file
Yes, it is entirely possible to edit an STL file and convert the STL file to another file format. Because the format is open, there is nothing to prevent you from changing the contents of a file. Actually, the process of editing is quite easy. We have a dedicated article on this topic: 7 Free STL Editors + How to Edit and Repair STL Files
12.4 Repairing an STL file
Remember the section where we discussed the rules that STL files must satisfy? For example, adjacent triangles must share two vertices and the right hand rule applied on the vertices should result in the same orientation as the normal vector. If these conditions are violated in an STL file, then it is broken or corrupt.
There are several programs which can help with repairing a broken STL file. For example, Netfabb Basic is a great tool for repairing the most common STL file problems. You find more information on these programs in our article: 24 Best Free 3D Printing Software Tools of 2018
13. Conclusion
In conclusion, we have learned about how the STL file format encodes the layout of 3D models. We discussed how to optimize STL files for the best 3D printing quality. We talked about how the STL file format compares with the other popular 3D printing file format .OBJ and when to use each of these formats. Finally, we shared some resources using which you can download, view, edit and repair STL files.
We hope that an in-depth understanding of the STL file format helps you become a more knowledgeable user of your 3D printer. If you found this article useful, share it with other 3D printing enthusiasts and spread the word. Do you have some questions or remarks? Let us know in the comments below!
G-code is the programming language of your 3D printer. In this tutorial, you’ll easily learn all G-Code commands.
Using G-code, a computer tells a printer when, where, how to move and how much to extrude throughout the entire print process.
If you have never dealt with it so far, that’s normal. Slicers like Cura and Simplify3D generate G-code “automagically” from CAD models, so most users never see or program a single line of code. However, if you want to develop a deeper understanding of 3D printing, it is essential to know about this programming language.
A knowledge of G-code commands will give you 3D printing superpowers. People who this are able to troubleshoot their printers better, control every aspect of the print process and identify and prevent print failures much before they happen.
If that sounds interesting, this post is for you. Our aim is to get you started with the basics. After reading this post, you will be able to:
Read and understand G-code commands
Write it yourself and test it online
Use the preview functionality of Slicers to troubleshoot complicated prints
Let’s get started!
What are G-code Commands?
G-code stands for “Geometric Code”. Its main function is to instruct a machine head how to move geometrically in 3 dimensions. However, it can also instruct a machine to do non-geometric things. For example, G-code commands can tell a 3D printer to extrude material at a specified extrusion rate or change its bed temperature.
In formal terms, it is a numerical control programming language. For those who know how to program, it’s an easy programming language. It is rudimentary and does not have advanced constructs like variables, conditionals, and loops.
For those who don’t know about programming languages, you can think of G-code as sequential lines of instructions. Each line tells the printer to do a specific task. The printer executes the line one by one until it reaches the end.
How to read G-code Commands
So, how does a line of code look like? Here is a typical example:
G1 X-9.2 Y-5.42 Z0.5 F3000.0 E0.0377
This particular line tells the printer to move in a straight line towards the destination coordinates X=-9.2, Y=-5.42, and Z=0.5 at a feed rate of 3000.0. It also instructs the printer to extrude material at a rate of 0.0377 while it is moving.
How did we read and interpret that? It’s quite easy. Every line starts with a command. In this case, the command is G1.
G1 X-9.2 Y-5.42 Z0.5 F3000.0 E0.0377
It means “move in a straight line in a controlled fashion”. You can look up the meaning of every G-Code command in a table that we have provided at the end of the article. We will also go through the most important G-Code commands in a later section.
The code snippets that appear after the command are called arguments.
G1 X-9.2 Y-5.42 Z0.5 F3000.0 E0.0377
Each argument tells the printer about how to execute the command. The arguments start with an English letter and then specify a value. For example, X-9.2 means a destination X coordinate of -9.2. F3000.0 means a Feed rate(F) of 3000.0. E0.0377 means an Extrusion rate(E) of 0.0377.
Try reading the following line of code now.
G1 X5 Y5 Z0 F3000.0 E0.02
If you interpreted it to mean “move towards X=5, Y=5, and Z=0 in a straight line at a feed rate of 3000.0 while extruding material at the rate 0.02”, then you have already learned how to read G-code commands!
G-code commands which start with the letter G are geometric commands. They tell the printer head how to move, but this is clearly not enough to control all aspects of a 3D printer. What if you needed to tell the printer to turn the motor off or raise the bed temperature? For these non-geometric tasks, G-code implementations also define another set of commands which start with the letter M. They are aptly called M Codes. For example, the command M140 sets the bed temperature, and the command M190 tells the printer to wait for the temperature to reach the target.
Each English letter that you encounter in the code will have a specific meaning. For example, we learned that G means a geometric command, M means a non-geometric command, X means the X coordinate, Y means the Y coordinate, F means Feed rate and so on. For your reference, here’s a table with the meaning of every letter.
Code
Information
Gnnn
Standard GCode command, such as move to a point
Mnnn
RepRap-defined command, such as turn on a cooling fan
Tnnn
Select tool nnn. In RepRap, a tool is typically associated with a nozzle, which may be fed by one or more extruders.
Snnn
Command parameter, such as time in seconds; temperatures; voltage to send to a motor
Pnnn
Command parameter, such as time in milliseconds; proportional (Kp) in PID Tuning
Xnnn
A X coordinate, usually to move to. This can be an Integer or Fractional number.
Ynnn
A Y coordinate, usually to move to. This can be an Integer or Fractional number.
Znnn
A Z coordinate, usually to move to. This can be an Integer or Fractional number.
U,V,W
Additional axis coordinates (RepRapFirmware)
Innn
Parameter – X-offset in arc move; integral (Ki) in PID Tuning
Jnnn
Parameter – Y-offset in arc move
Dnnn
Parameter – used for diameter; derivative (Kd) in PID Tuning
Hnnn
Parameter – used for heater number in PID Tuning
Fnnn
Feedrate in mm per minute. (Speed of print head movement)
Rnnn
Parameter – used for temperatures
Qnnn
Parameter – not currently used
Ennn
Length of extrudate. This is exactly like X, Y and Z, but for the length of filament to consume.
Nnnn
Line number. Used to request repeat transmission in the case of communications errors.
*nnn
Checksum. Used to check for communications errors.
Now that you know how to read a line of code, let’s look at a simple example in action. The following video shows G-code commands at work in a cutting machine (not a 3D printer). The cutting machine will cut a circular edge in a rectangular slab. The G-code commands instruct the cutter on how to move to achieve the desired result.
Do not worry that the video is about a cutting machine. The geometric aspects of G-code commands work similarly for all machines that have a machine head. In the case of the 3D printer, the nozzle is the head. For the cutting machine, the head is the cutter. That’s the only difference. All other geometric aspects of the code remain the same.
If you understand the cutter’s movements, you will also know how to move a print head.
The most important G-code Commands
In the last section, we discussed the G1 command, which means “move the nozzle in a controlled fashion in a straight line”. This is just one of the many G-code commands. In this section, we will discuss other important commands that are used frequently.
G-code commands #1: G0 or “rapid motion”
The G0 command tells the print head to move at maximum travel speed from the current position to the coordinates specified by the command. The head will move in a coordinated fashion such that both axes complete the travel simultaneously. The nozzle will not extrude any material while executing this command. This G-code command is usually used to bring the nozzle rapidly to some desired coordinates at the start of the print or during the print.
Example: G0 X7 Y18
Image: Make Magazine
G-code commands #2: G1 or “controlled motion”
The G1 command tells the print head to move at specified speed from the current position to the coordinated specified by the G-code command. The speed is specified by the Feed rate parameter F. The head will move in a coordinated fashion such that both axes complete the travel simultaneously. The printer can extrude material while executing this G-code command at an extrusion rate specified by the extrusion rate parameter E. Most of the 3D printing happens while executing this command. If you open the G-code file for an actual 3D printing process, you will see a lot of G1 commands.
Example: G1 X7 Y18 F500 E0.02
Image: Make Magazine
G-code commands #3: G17/G18/G19 or “set planes”
These G-code commands set the plane in which the nozzle should move. Typically, G17 is the default for most machines and it denotes the X-Y plane. G18 denotes the Z-X plane and G19 denotes the Y-Z plane.
G-code commands #4: G20/G21 or “set units”
These G-code commands set the units. G20 denotes inches while G21 denotes millimeters. This makes a big difference because
G20
G0 X7 Y18
means “move rapidly to X=7 inches and Y=18 inches” while
G21
G0 X7 Y18
means “move rapidly to X=7 mm and Y=18 mm”.
G-code commands #5: G28 or “homing”
A G28 command tells the machine to go to its home position. A home position can be defined by the G28.1 command as follows.
G28.1 X0 Y0 Z0
G-code commands #6: G90 or “absolute mode”
Absolute mode tells the machine to interpret coordinates as absolute coordinates. This means a G-code command
will send the machine head to the coordinate X=10.
G-code commands #7: G91 or “relative mode”
The relative mode is the opposite of the absolute mode. G91 tells the machine to interpret coordinates as relative coordinates. If the machine is currently at X=10, then the following G-code commands
G91
G0 X10
tell the machine to move 10 units in the X direction from its current position. At the end of the operation, the machine head will be located at X=20.
G-code commands #8: G2 or “clockwise motion”
G2 tells the machine to move clockwise starting from its current location. The endpoint is specified by the coordinates X and Y. The center of rotation is specified by the parameter I, which denotes the X offset of the current position from the center of rotation. J denotes the Y offset of the current position from the center of rotation.
Example:
G21 G90 G17
G0 X6 Y18
G2 X18 Y6 I0 J-12
Image: Make Magazine
G-code commands #9: G3 or “counterclockwise motion”
Just like the G2 command, the G3 command creates a circular motion but in the counterclockwise direction.
Example:
G21 G90 G17
G0 X-5 Y25
G3 X-25 Y5 I0 J-20
Image: Make Magazine
G-code commands #10: Code comments
If you look at any real world G-code file, you will find that in addition to G-code commands and arguments, it also contains things written in plain English. Here’s an example:
G0 X-25 Y5 ; rapid movement to X=-25 and Y=5
The English text will always be preceded by a semicolon, as you can see in the above line.
Programmers often need to write down explanations in plain English so that other programmers can understand the motivation behind a certain line or section of code. In fact, forget about other programmers! If you are looking at your own code after a year, chances are that you will have forgotten why you coded things in a certain way and would have a hard time figuring things out again.
To solve this problem, you can include code comments. Comments are written after adding a semicolon punctuation mark.You can write anything after adding a semicolon, but most often it is used to explain the rationale behind the code in a human-friendly way. Anything that appears after a semicolon character in a line is ignored by the printer while executing the G-code commands and is only meant for human eyes.
Here is another example of a line that has a code comment.
G1 X-25 Y5 ; I am a code comment!
G-code Commands: The Structure of a Full-fledged Program
We are now in a good position to look at actual code that is used for printing a 3D model.
Most G-code programs contain three important sections. The first section initializes the printer for the printing process. The second section instructs the printer to print the model. The third section resets the printer to its default configuration after the print finishes. Let’s take a look at these sections one by one.
1. Initialization phase
Certain tasks need to be performed before a print can begin. For example, we need to heat the print bed, heat the extruder, purge the nozzle, bring the nozzle to the start position etc. These tasks form the first section of any program.
Here are the first five lines of initialization G-code commands from an actual 3D printing task. You should be in a position to read and understand them at this point, with help from the reference table at the end.
G90
M82
M106 S0
M140 S100
M190 S100
The first line sets the coordinates to absolute positioning. The second line tells the extruder to interpret the extrusion rate as absolute values. The third line turns the fan on, but sets the speed to 0, which essentially means that the fan is off. The fourth line sets the bed temperature to 100 degrees. The fifth line tells the printer to wait till the bed temperature reaches the desired value, in this case, 100.
During the initialization phase, the printer will not extrude any material except when it is purging the nozzle. This is an easy to way to figure out when the initialization phase stops and the actual printing begins. During the actual printing, the printer will be extruding material at almost every step.
2. Printing phase
A 3D printer prints a model layer by layer. Slicers like Simplify3D or Cura typically slices a 3D model into many horizontal layers that stack on top of each other to create the final print.
Therefore, the print phase consists of many movements in the X-Y plane (printing a single layer), then one movement in the Z direction (move to next layer) followed by many movements in the X -Y plane again (print the next layer).
Finally, when the printing is over, some final lines of G-code commands bring the printer to a reasonable default state. For example, the nozzle is brought back to the origin, the heating is turned off (both for the bed and the extruder) and the motors are disabled.
G28 ; bring the nozzle to home
M104 S0 ; turn off heaters
M140 S0 ; turn off bed
M84 ; disable motors
G-code Commands: Input and Output
Till now, we have only talked about the computer sending G-code commands to the printer, so it seems like the communication is one way. But 3D printing actually involves a two-way communication between the computer and the printer. Here’s how it works.
When you hit the print button on your computer, the 3D printing software starts sending the G-code commands to the printer, one line at a time. The printer executes the line and responds back to the computer. If the response indicates no error, the computer then sends the next line of code to be executed.
The printer’s response usually follows the following format:
[] [] []
can be ok, rs or !!.
Ok means that no error has been detected. This prompts the computer to send the next line of code to the printer.
Rs means “resend the instruction”. This is usually followed by the line number to resend.
Two exclamation marks(!!) implies hardware error. The machine shuts down immediately in this case and the print job is aborted.
In addition to these 3 responses, the printer might also report printer parameters like temperature, coordinates of the nozzle etc. to the computer.
Temperature is reported in response to a M105 G-Code command. The format of the response is
T:value B:value,
where T indicates the extruder temperature and B indicates the bed temperature. If the machine does not have a temperature sensor, then -273 is returned as a value.
The coordinates are reported in response to M114 and M117 G-code commands. The format of response is
C: X:9.2 Y:125.4 Z:3.7 E:1902.5.
Here, C stands for “coordinates follow”. This is followed by current X, Y, Z coordinates and other information.
G-code Commands: Visualization Tools
Now that you know how to write G-code, it’s your turn to write some G-code commands and test your understanding. You can use an online visualization tool, where you can write some G-code commands and see the machine head move according to your instructions. It’s a lot of fun! We recommend that you try out this online visualization tool to test your skills.
Slicing software like Simplify3D or Cura also come with a G-code viewer. In the viewer, you will be able to visualize the path of the extruder for actual 3D printing tasks. Check out this must-see video for an excellent demonstration of the G-code viewer in Simplify3D.
G-code Commands: Preventing Print Failures
The G-code viewer can be the difference between a successful and failed print for tricky 3D models. In general, whenever you want to print a complicated 3D model, we advise that you run the viewer and go through the print simulation step by step.
We need to do this because the automatically generated code is often not ideal. You will often find that there are problematic areas that do not have enough support, leading to a failed print. In this case, you need to modify the code to ensure successful printing. Most of the time, this can be done by adding additional support structures using the graphical interface. Here is a video that shows how to do this for a complicated model of a 3D puppy.
G-code Commands: Conclusion
In conclusion, we learned about how a 3D printer prints a CAD model by following an instruction set written in G-code. We learned how to read the G-code commands, and saw some realistic examples. We discussed the most common G-Code commands and some ways of visualizing and testing them. Finally, we introduced G-code viewer, a common feature of Slicers, which can be used to prevent failed prints.
We hope that an understanding of G-code commands helps you become a more knowledgeable and powerful user of your 3D printer. If you found this article useful, share it with other 3D printing enthusiasts and spread the word. Do you have some questions or remarks? Let us know in the comments below!
Appendix 1: Compatibility notes
Each 3D printer comes with a firmware. There are many firmware’s, and developers of these firmware’s tend to implement different flavors of G-code commands. This leads to major compatibility issues. The G-code commands that work for one machine might not work for another.
This problem is usually solved by connecting the Slicer, which generates the code, to a machine specific post-processing driver. The post-processor detects the incoming code flavor and converts the code to the specific flavor^ that the firmware understands.
Therefore, the G-code commands that you see on the Slicer might not necessarily be the code being executed on the machine because of this subtle implementation detail.
Appendix 2: G-code commands
Code
Description
Milling (M)
Turning (T)
Corollary info
G00
Rapid positioning
M
T
On 2- or 3-axis moves, G00 (unlike G01) traditionally does not necessarily move in a single straight line between start point and end point. It moves each axis at its max speed until its vector quantity is achieved. Shorter vector usually finishes first (given similar axis speeds). This matters because it may yield a dog-leg or hockey-stick motion, which the programmer needs to consider depending on what obstacles are nearby, to avoid a crash. Some machines offer interpolated rapids as a feature for ease of programming (safe to assume a straight line).
G01
Linear interpolation
M
T
The most common workhorse code for feeding during a cut. The program specs the start and end points, and the control automatically calculates (interpolates) the intermediate points to pass through that will yield a straight line (hence „linear“). The control then calculates the angular velocities at which to turn the axis leadscrews via their servomotors or stepper motors. The computer performs thousands of calculations per second, and the motors react quickly to each input. Thus the actual toolpath of the machining takes place with the given feedrate on a path that is accurately linear to within very small limits.
G02
Circular interpolation, clockwise
M
T
Very similar in concept to G01. Again, the control interpolates intermediate points and commands the servo- or stepper motors to rotate the amount needed for the leadscrew to translate the motion to the correct tool tip positioning. This process repeated thousands of times per minute generates the desired toolpath. In the case of G02, the interpolation generates a circle rather than a line. As with G01, the actual toolpath of the machining takes place with the given feedrate on a path that accurately matches the ideal (in G02’s case, a circle) to within very small limits. In fact, the interpolation is so precise (when all conditions are correct) that milling an interpolated circle can obviate operations such as drilling, and often even fine boring. Addresses for radius or arc center: G02 and G03 take either an R address (for the radius desired on the part) or IJK addresses (for the component vectors that define the vector from the arc start point to the arc center point). Cutter comp: On most controls you cannot start G41 or G42 in G02 or G03 modes. You must already have compensated in an earlier G01 block. Often a short linear lead-in movement will be programmed, merely to allow cutter compensation before the main event, the circle-cutting, begins. Full circles: When the arc start point and the arc end point are identical, a 360° arc, a full circle, will be cut. (Some older controls cannot support this because arcs cannot cross between quadrants of the cartesian system. Instead, four quarter-circle arcs are programmed back-to-back.)
G03
Circular interpolation, counterclockwise
M
T
Same corollary info as for G02.
G04
Dwell
M
T
Takes an address for dwell period (may be X, U, or P). The dwell period is specified by a control parameter, typically set to milliseconds. Some machines can accept either X1.0 (s) or P1000 (ms), which are equivalent. Choosing dwell duration: Often the dwell needs only to last one or two full spindle rotations. This is typically much less than one second. Be aware when choosing a duration value that a long dwell is a waste of cycle time. In some situations it won’t matter, but for high-volume repetitive production (over thousands of cycles), it is worth calculating that perhaps you only need 100 ms, and you can call it 200 to be safe, but 1000 is just a waste (too long).
G05 P10000
High-precision contour control (HPCC)
M
Uses a deep look-ahead buffer and simulation processing to provide better axis movement acceleration and deceleration during contour milling
G05.1 Q1.
AI Advanced Preview Control
M
Uses a deep look-ahead buffer and simulation processing to provide better axis movement acceleration and deceleration during contour milling
G06.1
Non-uniform rational B-spline (NURBS) Machining
M
Activates Non-Uniform Rational B Spline for complex curve and waveform machining (this code is confirmed in Mazatrol 640M ISO Programming)
G07
Imaginary axis designation
M
G09
Exact stop check, non-modal
M
T
The modal version is G61.
G10
Programmable data input
M
T
Modifies the value of work coordinate and tool offsets
G11
Data write cancel
M
T
G12
Full-circle interpolation, clockwise
M
Fixed cycle for ease of programming 360° circular interpolation with blend-radius lead-in and lead-out. Not standard on Fanuc controls.
G13
Full-circle interpolation, counterclockwise
M
Fixed cycle for ease of programming 360° circular interpolation with blend-radius lead-in and lead-out. Not standard on Fanuc controls.
G17
XY plane selection
M
G18
ZX plane selection
M
T
On most CNC lathes (built 1960s to 2000s), ZX is the only available plane, so no G17 to G19 codes are used. This is now changing as the era begins in which live tooling, multitask/multifunction, and mill-turn/turn-mill gradually become the „new normal“. But the simpler, traditional form factor will probably not disappear—it will just move over to make room for the newer configurations. See also V address.
G19
YZ plane selection
M
G20
Programming in inches
M
T
Somewhat uncommon except in USA and (to lesser extent) Canada and UK. However, in the global marketplace, competence with both G20 and G21 always stands some chance of being necessary at any time. The usual minimum increment in G20 is one ten-thousandth of an inch (0.0001″), which is a larger distance than the usual minimum increment in G21 (one thousandth of a millimeter, .001 mm, that is, one micrometre). This physical difference sometimes favors G21 programming.
G21
Programming in millimeters (mm)
M
T
Prevalent worldwide. However, in the global marketplace, competence with both G20 and G21 always stands some chance of being necessary at any time.
G28
Return to home position (machine zero, aka machine reference point)
M
T
Takes X Y Z addresses which define the intermediate point that the tool tip will pass through on its way home to machine zero. They are in terms of part zero (aka program zero), NOT machine zero.
G30
Return to secondary home position (machine zero, aka machine reference point)
M
T
Takes a P address specifying which machine zero point is desired, if the machine has several secondary points (P1 to P4). Takes X Y Z addresses which define the intermediate point that the tool tip will pass through on its way home to machine zero. They are in terms of part zero (aka program zero), NOT machine zero.
G31
Skip function (used for probes and tool length measurement systems)
M
G32
Single-point threading, longhand style (if not using a cycle, e.g., G76)
T
Similar to G01 linear interpolation, except with automatic spindle synchronization for single-point threading.
G33
Constant-pitch threading
M
G33
Single-point threading, longhand style (if not using a cycle, e.g., G76)
T
Some lathe controls assign this mode to G33 rather than G32.
G34
Variable-pitch threading
M
G40
Tool radius compensation off
M
T
Turn off cutter radius compensation (CRC). Cancels G41 or G42.
G41
Tool radius compensation left
M
T
Turn on cutter radius compensation (CRC), left, for climb milling. Milling: Given righthand-helix cutter and M03 spindle direction, G41 corresponds to climb milling (down milling). Takes an address (D or H) that calls an offset register value for radius. Turning: Often needs no D or H address on lathes, because whatever tool is active automatically calls its geometry offsets with it. (Each turret station is bound to its geometry offset register.) G41 and G42 for milling has been partially automated and obviated (although not completely) since CAM programming has become more common. CAM systems allow the user to program as if with a zero-diameter cutter. The fundamental concept of cutter radius compensation is still in play (i.e., that the surface produced will be distance R away from the cutter center), but the programming mindset is different; the human does not choreograph the toolpath with conscious, painstaking attention to G41, G42, and G40, because the CAM software takes care of it. The software has various CRC mode selections, such as computer, control, wear, reverse wear, off, some of which do not use G41/G42 at all (good for roughing, or wide finish tolerances), and others which use it so that the wear offset can still be tweaked at the machine (better for tight finish tolerances).
G42
Tool radius compensation right
M
T
Turn on cutter radius compensation (CRC), right, for conventional milling. Similar corollary info as for G41. Given righthand-helix cutter and M03 spindle direction, G42 corresponds to conventional milling (up milling).
G43
Tool height offset compensation negative
M
Takes an address, usually H, to call the tool length offset register value. The value is negative because it will be added to the gauge line position. G43 is the commonly used version (vs G44).
G44
Tool height offset compensation positive
M
Takes an address, usually H, to call the tool length offset register value. The value is positive because it will be subtracted from the gauge line position. G44 is the seldom-used version (vs G43).
G45
Axis offset single increase
M
G46
Axis offset single decrease
M
G47
Axis offset double increase
M
G48
Axis offset double decrease
M
G49
Tool length offset compensation cancel
M
Cancels G43 or G44.
G50
Define the maximum spindle speed
T
Takes an S address integer which is interpreted as rpm. Without this feature, G96 mode (CSS) would rev the spindle to „wide open throttle“ when closely approaching the axis of rotation.
G50
Scaling function cancel
M
G50
Position register (programming of vector from part zero to tool tip)
T
Position register is one of the original methods to relate the part (program) coordinate system to the tool position, which indirectly relates it to the machine coordinate system, the only position the control really „knows“. Not commonly programmed anymore because G54 to G59 (WCSs) are a better, newer method. Called via G50 for turning, G92 for milling. Those G addresses also have alternate meanings (which see). Position register can still be useful for datum shift programming. The „manual absolute“ switch, which has very few useful applications in WCS contexts, was more useful in position register contexts, because it allowed the operator to move the tool to a certain distance from the part (for example, by touching off a 2.0000″ gage) and then declare to the control what the distance-to-go shall be (2.0000).
G52
Local coordinate system (LCS)
M
Temporarily shifts program zero to a new location. It is simply „an offset from an offset“, that is, an additional offset added onto the WCS offset. This simplifies programming in some cases. The typical example is moving from part to part in a multipart setup. With G54 active, G52 X140.0 Y170.0 shifts program zero 140 mm over in X and 170 mm over in Y. When the part „over there“ is done, G52 X0 Y0 returns program zero to normal G54 (by reducing G52 offset to nothing). The same result can also be achieved (1) using multiple WCS origins, G54/G55/G56/G57/G58/G59; (2) on newer controls, G54.1 P1/P2/P3/etc. (all the way up to P48); or (3) using G10 for programmable data input, in which the program can write new offset values to the offset registers. Which method to use depends on shop-specific application.
G53
Machine coordinate system
M
T
Takes absolute coordinates (X,Y,Z,A,B,C) with reference to machine zero rather than program zero. Can be helpful for tool changes. Nonmodal and absolute only. Subsequent blocks are interpreted as „back to G54“ even if it is not explicitly programmed.
G54 to G59
Work coordinate systems (WCSs)
M
T
Have largely replaced position register (G50 and G92). Each tuple of axis offsets relates program zero directly to machine zero. Standard is 6 tuples (G54 to G59), with optional extensibility to 48 more via G54.1 P1 to P48.
G54.1 P1 to P48
Extended work coordinate systems
M
T
Up to 48 more WCSs besides the 6 provided as standard by G54 to G59. Note floating-point extension of G-code data type (formerly all integers). Other examples have also evolved (e.g., G84.2). Modern controls have the hardware to handle it.
G61
Exact stop check, modal
M
T
Can be canceled with G64. The non-modal version is G09.
Rotates coordinate system in the current plane given with G17 G18 or G19. Center of rotation is given with two parameters, which vary with each vendors implementation. Rotate with angle given with argument R. This can be for instance be used to align coordinate system with misaligned part. It can also be used to repeat movement sequences around a center. Not all vendors support coordinate system rotation.
G69
Turn off coordinate system rotation.
M
Cancels G68.
G70
Fixed cycle, multiple repetitive cycle, for finishing (including contours)
T
G71
Fixed cycle, multiple repetitive cycle, for roughing (Z-axis emphasis)
T
G72
Fixed cycle, multiple repetitive cycle, for roughing (X-axis emphasis)
T
G73
Fixed cycle, multiple repetitive cycle, for roughing, with pattern repetition
T
G73
Peck drilling cycle for milling – high-speed (NO full retraction from pecks)
M
Retracts only as far as a clearance increment (system parameter). For when chipbreaking is the main concern, but chip clogging of flutes is not. Compare G83.
G74
Peck drilling cycle for turning
T
G74
Tapping cycle for milling, lefthand thread, M04 spindle direction
M
See notes at G84.
G75
Peck grooving cycle for turning
T
G76
Fine boring cycle for milling
M
Includes OSS and shift (oriented spindle stop and shift tool off centerline for retraction)
G76
Threading cycle for turning, multiple repetitive cycle
T
G80
Cancel canned cycle
M
T
Milling: Cancels all cycles such as G73, G81, G83, etc. Z-axis returns either to Z-initial level or R level, as programmed (G98 or G99, respectively). Turning: Usually not needed on lathes, because a new group-1 G address (G00 to G03) cancels whatever cycle was active.
G81
Simple drilling cycle
M
No dwell built in
G82
Drilling cycle with dwell
M
Dwells at hole bottom (Z-depth) for the number of milliseconds specified by the P address. Good for when hole bottom finish matters. Good for spot drilling because the divot will be certain to clean up evenly. Consider the „choosing dwell duration“ note at G04.
G83
Peck drilling cycle (full retraction from pecks)
M
Returns to R-level after each peck. Good for clearing flutes of chips. Compare G73.
G84
Tapping cycle, righthand thread, M03 spindle direction
M
G74 and G84 are the righthand and lefthand „pair“ for old-school tapping with a non-rigid toolholder („tapping head“ style). Compare the rigid tapping „pair“, G84.2 and G84.3.
See notes at G84. Rigid tapping synchronizes speed and feed according to the desired thread helix. That is, it synchronizes degrees of spindle rotation with microns of axial travel. Therefore, it can use a rigid toolholder to hold the tap. This feature is not available on old machines or newer low-end machines, which must use „tapping head“ motion (G74/G84).
– Good cycle for a reamer. – In some cases good for single-point boring tool, although in other cases the lack of depth of cut on the way back out is bad for surface finish, in which case, G76 (OSS/shift) can be used instead. – If need dwell at hole bottom, see G89.
G86
boring cycle, feed in/spindle stop/rapid out
M
Boring tool will leave a slight score mark on the way back out. Appropriate cycle for some applications; for others, G76 (OSS/shift) can be used instead.
G87
boring cycle, backboring
M
For backboring. Returns to initial level only (G98); this cycle cannot use G99 because its R level is on the far side of the part, away from the spindle headstock.
G89 is like G85 but with dwell added at bottom of hole.
G90
Absolute programming
M
T (B)
Positioning defined with reference to part zero. Milling: Always as above. Turning: Sometimes as above (Fanuc group type B and similarly designed), but on most lathes (Fanuc group type A and similarly designed), G90/G91 are not used for absolute/incremental modes. Instead, U and W are the incremental addresses and X and Z are the absolute addresses. On these lathes, G90 is instead a fixed cycle address for roughing.
G90
Fixed cycle, simple cycle, for roughing (Z-axis emphasis)
T (A)
When not serving for absolute programming (above)
G91
Incremental programming
M
T (B)
Positioning defined with reference to previous position. Milling: Always as above. Turning: Sometimes as above (Fanuc group type B and similarly designed), but on most lathes (Fanuc group type A and similarly designed), G90/G91 are not used for absolute/incremental modes. Instead, U and W are the incremental addresses and X and Z are the absolute addresses. On these lathes, G90 is a fixed cycle address for roughing.
G92
Position register (programming of vector from part zero to tool tip)
M
T (B)
Same corollary info as at G50 position register. Milling: Always as above. Turning: Sometimes as above (Fanuc group type B and similarly designed), but on most lathes (Fanuc group type A and similarly designed), position register is G50.
G92
Threading cycle, simple cycle
T (A)
G94
Feedrate per minute
M
T (B)
On group type A lathes, feedrate per minute is G98.
G94
Fixed cycle, simple cycle, for roughing (X-axis emphasis)
T (A)
When not serving for feedrate per minute (above)
G95
Feedrate per revolution
M
T (B)
On group type A lathes, feedrate per revolution is G99.
G96
Constant surface speed (CSS)
T
Varies spindle speed automatically to achieve a constant surface speed. See speeds and feeds. Takes an S address integer, which is interpreted as sfm in G20 mode or as m/min in G21 mode.
G97
Constant spindle speed
M
T
Takes an S address integer, which is interpreted as rev/min (rpm). The default speed mode per system parameter if no mode is programmed.
Non-optional—machine will always stop upon reaching M00 in the program execution.
M01
Optional stop
M
T
Machine will only stop at M01 if operator has pushed the optional stop button.
M02
End of program
M
T
Program ends; execution may or may not return to program top (depending on the control); may or may not reset register values. M02 was the original program-end code, now considered obsolete, but still supported for backward compatibility.[7] Many modern controls treat M02 as equivalent to M30.[7] See M30 for additional discussion of control status upon executing M02 or M30.
M03
Spindle on (clockwise rotation)
M
T
The speed of the spindle is determined by the address S, in either revolutions per minute (G97 mode; default) or surface feet per minute or meters per minute (G96 mode under either G20 or G21). The right-hand rule can be used to determine which direction is clockwise and which direction is counter-clockwise. Right-hand-helix screws moving in the tightening direction (and right-hand-helix flutes spinning in the cutting direction) are defined as moving in the M03 direction, and are labeled „clockwise“ by convention. The M03 direction is always M03 regardless of local vantage point and local CW/CCW distinction.
M04
Spindle on (counterclockwise rotation)
M
T
See comment above at M03.
M05
Spindle stop
M
T
M06
Automatic tool change (ATC)
M
T (sometimes)
Many lathes do not use M06 because the T address itself indexes the turret. Programming on any particular machine tool requires knowing which method that machine uses. To understand how the T address works and how it interacts (or not) with M06, one must study the various methods, such as lathe turret programming, ATC fixed tool selection, ATC random memory tool selection, the concept of „next tool waiting“, and empty tools.
M07
Coolant on (mist)
M
T
M08
Coolant on (flood)
M
T
M09
Coolant off
M
T
M10
Pallet clamp on
M
For machining centers with pallet changers
M11
Pallet clamp off
M
For machining centers with pallet changers
M13
Spindle on (clockwise rotation) and coolant on (flood)
M
This one M-code does the work of both M03 and M08. It is not unusual for specific machine models to have such combined commands, which make for shorter, more quickly written programs.
M19
Spindle orientation
M
T
Spindle orientation is more often called within cycles (automatically) or during setup (manually), but it is also available under program control via M19. The abbreviation OSS (oriented spindle stop) may be seen in reference to an oriented stop within cycles.
M21
Mirror, X-axis
M
M21
Tailstock forward
T
M22
Mirror, Y-axis
M
M22
Tailstock backward
T
M23
Mirror OFF
M
M23
Thread gradual pullout ON
T
M24
Thread gradual pullout OFF
T
M30
End of program, with return to program top
M
T
Today M30 is considered the standard program-end code, and will return execution to the top of the program. Today most controls also still support the original program-end code, M02, usually by treating it as equivalent to M30. Additional info: Compare M02 with M30. First, M02 was created, in the days when the punched tape was expected to be short enough to be spliced into a continuous loop (which is why on old controls, M02 triggered no tape rewinding).[7] The other program-end code, M30, was added later to accommodate longer punched tapes, which were wound on a reel and thus needed rewinding before another cycle could start.[7] On many newer controls, there is no longer a difference in how the codes are executed—both act like M30.
M41
Gear select – gear 1
T
M42
Gear select – gear 2
T
M43
Gear select – gear 3
T
M44
Gear select – gear 4
T
M48
Feedrate override allowed
M
T
M49
Feedrate override NOT allowed
M
T
Prevent MFO. This rule is also usually called (automatically) within tapping cycles or single-point threading cycles, where feed is precisely correlated to speed. Same with spindle speed override (SSO) and feed hold button. Some controls are capable of providing SSO and MFO during threading.
M52
Unload Last tool from spindle
M
T
Also empty spindle.
M60
Automatic pallet change (APC)
M
For machining centers with pallet changers
M98
Subprogram call
M
T
Takes an address P to specify which subprogram to call, for example, „M98 P8979“ calls subprogram O8979.
M99
Subprogram end
M
T
Usually placed at end of subprogram, where it returns execution control to the main program. The default is that control returns to the block following the M98 call in the main program. Return to a different block number can be specified by a P address. M99 can also be used in main program with block skip for endless loop of main program on bar work on lathes (until operator toggles block skip).
Which 3D file formats are there? How do they compare? What should you use? We simply explain the 8 most common 3D file formats used today: STL, OBJ, FBX, COLLADA, 3DS, IGES; STEP, and VRML/X3D.
A 3D file format is used for storing information about 3D models. You may have heard of the most popular formats STL, OBJ, FBX, COLLADA etc. They are widely used in 3D printing, video games, movies, architecture, academia, medicine, engineering, and earth sciences. Each industry has its own popular 3D file formats for historical and practical reasons. We will learn about 3D file formats and take a deep dive into the 8 most common 3D file formats in this article.
A 3D model of a pigeon which contains color information, light sources (notice the shadow) and animations
The basic purpose of a 3D file format is to store information about 3D models as plain text or binary data. In particular, they encode the 3D model’s geometry, appearance, scene, and animations.
The geometry of a model describes its shape. By appearance, we mean colors, textures, material type etc. The scene of a 3D model includes the position of light sources, cameras, and peripheral objects. Finally, animation defines how a 3D model moves.
However, not all 3D file formats store all of this data. 3D file formats such as STL store only the 3D model’s geometry and ignores all other attributes. On the other hand, the format COLLADA stores everything.
STL and COLLADA are just two of the many 3D file formats that people use. We estimate that there are hundreds of 3D file formats currently being used in the wild!
How Many 3D File Formats are there?
There are hundreds of 3D file formats
The problem with 3D file formats is that there are literally hundreds of them. Every CAD software manufacturer such as AutoDesk and Blender has their own proprietary format which is optimized for their software. So if you use AutoCAD, you get a DWG file. If you use Blender, you get a BLEND file.
Proprietary 3D File Formats Hinder Interoperability
However, the presence of so many proprietary file formats is a big problem. Suppose you use AutoCAD (which is an AutoDesk product) and your friend uses Blender. Suppose that you also want to share your 3D model with your friend.
This is not so easy. Your AutoCAD software gives you a DWG file because it is the native AutoCAD format. But your friend’s software, Blender, can only work with a BLEND file. This means that the two of you cannot work on the same 3D model.
Neutral 3D File Formats Solve this Problem
You often need to share your 3D models with your clients, collaborators and machines. Neutral formats are perfect for this task.
To solve the problem of interoperability, neutral or open source formats were invented as intermediate formats for converting between two proprietary formats. Naturally, these formats have become hugely popular now.
Two famous examples of neutral formats are STL (with a .STL extension) and COLLADA (with a .DAE extension). They are widely used to share models across CAD software. If you want to share your 3D model, you convert the DWG file to a COLLADA file in a process called exporting and give your friend the COLLADA file. Your friend takes the COLLADA file and imports it into Blender, where the COLLADA file is converted to the native BLEND format. This way, you can continue to use different software and collaborate with others.
Proprietary vs. neutral is one of the most important dichotomies in the world of 3D file formats. Nowadays, most 3D modeling software supports reading and writing popular neutral formats. In addition, most software also support reading and writing to a subset of proprietary formats that are so popular that they cannot be ignored. We will discuss 8 such 3D file formats in this article. Here is the list, where the 3D file formats are marked with their type.
But before we discuss each these formats in detail, we will first take a look at the general features of a 3D file format and discuss the important things you should keep in mind when selecting a format for your project.
General Features of 3D File Formats
As we discussed earlier, the general features of a 3D file format are:
1. 3D File Formats: Encoding Geometry of the 3D Model
Every 3D model has a unique geometry and the capability of encoding this geometry can be considered to be the most basic feature of a 3D file format. Every 3D file format supports this — otherwise, they wouldn’t be considered 3D file formats.
There are three distinct ways of encoding surface geometry, each with their corresponding strengths and weaknesses. They are called approximate mesh, precise mesh and constructive solid geometry (CSG).
1.1 3D File Format Geometry: The Approximate Mesh
The fine triangular mesh is approximately encoding the surface geometry of this 3D model (source: i.materialize)
In this encoding, the surface of a 3D model is first covered with a mesh of tiny imaginary polygons. Triangles are most commonly used shape. The vertices of the covering triangles and the outward normal vector to the triangles are stored in the file. This represents the surface geometry of the target model.
The vertices and the normal to each triangular facet making up the mesh is stored in the file.
The process of covering a surface with non-overlapping geometric shapes is also known as “tessellation”. Hence these file formats are also called tessellated formats.
The triangles approximate the smooth geometry of the surface. Hence this is an approximate format. The approximation gets better as the triangles get smaller. However, the smaller the triangles, the larger the number of triangles you need to tile the surface. This implies that the file needs to store a larger number of vertices and normal vectors. Thus better approximations come at the cost of increasing file size.
The perfect spherical surface on the left is approximated by tessellations. The figure on the right uses big triangles, resulting in a coarse model. The figure on the center uses smaller triangles and achieves a smoother approximation (source: i.materialize)
Approximate or tessellated formats are best used in situations where you don’t need ultrafine resolutions of the 3D model. A good example is 3D printing. 3D printers cannot print beyond a certain resolution and therefore, this type of 3D printing file formats are perfect for the job. In fact, the most popular 3D printing file format STL indeed belongs to this class of file formats.
1.2 3D File Format Geometry 2: The Precise Mesh
An example of NURBS patches encoding a curved surface geometry precisely. The red dots are the control points of the NURBS.
There are, of course, situations where an approximate encoding of the 3D model is not enough and one needs precise encoding of the surface geometry. For example, when constructing the body of an airplane, in particular the round hull, a discrete polygonal mesh won’t work. Although the model might look good at small resolutions, the flat faces and sharp corners will become apparent up close.
Precise file formats get around this problem by using Non-Uniform Rational B-Spline patches (or NURBS) instead of polygons. These parametric surfaces are made up of a small number of weighted control points and a set of parameters called knots. From knots, a surface can be computed mathematically by smoothly interpolating over the control points.
These surfaces look smooth in any scale and can replicate the surface geometry of a small part of a 3D model in exact detail. However, there’s always a trade off. While the precise mesh is exact at any resolution, they render slower and should be avoided in applications where speedy rendering is important.
1.3 3D File Format Geometry 3: Constructive Solid Geometry aka CSG
Finally, there’s yet another type of file format that does not involve meshes at all. In this format, 3D shapes are built by performing boolean operations (addition or subtraction) of primitive shapes like cubes, spheres etc. For example, to make a dumbbell, one can simply take two spheres and add a connecting cylindrical rod between. If you have ever used a CAD software, then you have seen this in action, because most of them use this principle.
Constructive solid geometry in action during the construction of a dumbbell in Tinkercad
Constructive solid geometry is great for designing 3D models and is very user-friendly. Another big advantage is that each individual editing step (addition, subtraction, transformations of primitive shapes) is stored in this 3D file format. Therefore, one can undo and redo any step at any time.
Clearly, if you convert this format to a mesh-based format, you will lose the information about the individual editing steps.
2. 3D File Formats: Appearance
The second important feature of 3D file formats is the ability to store appearance related information. In many applications, the appearance of the 3D model is of prime importance. For example, no one wants to play Need For Speed with dull, colorless cars. The cars better be colorful and shiny! The color and shine of a car are examples of appearance related properties. In simple terms, appearance describes surface properties such as material type, texture, color etc. This decides how the model looks like when it is rendered.
Information about appearance can be encoded in two different ways.
2.1 3D File Format Appearance: Texture mapping
Illustration of how texture mapping is used to encode color and texture information of one side of a cube
In texture mapping, every point in the 3D model’s surface (or the polygonal mesh) is mapped to a 2-dimensional image. The coordinates of the 2D image have attributes like color and texture. When rendering the 3D model, every surface point is assigned a coordinate in this 2-dimensional image. The vertices of the mesh are mapped first. The other points are then assigned coordinates by interpolating between the coordinates of the vertices.
Most 3D file formats support texture mapping. In this case, the 2D image containing texture information needs to be stored within the same file or separately in a different file.
2.2 3D File Format Appearance: Face attributes
Another common way of storing texture information is to assign each face of the mesh a set of attributes. Common attributes include color, texture and material type.
In addition, a surface can have a specular component indicating the color and intensity of true mirror reflections of light sources and other nearby surfaces. Surfaces can be transparent or semi transparent. This is encoded by a transmissive component describing the color and intensity of light that passes through the surface. Transparent surfaces usually distort light passing through them. This distortion is represented by an index of refraction property, associated with the model’s material type.
A transparent 3D model of a chair. The transparency is encoded as a property of each individual facet.
3.3D File Formats: Scene information
The capability of encoding information about the scene is another important feature of some 3D file formats. The scene describes the layout of the 3D model in terms of cameras, light sources, and other nearby 3D models.
The camera is defined by four parameters: magnification and principal point, location, the direction the camera is facing and an arrow indicating which direction is “up”.
The encoding of the light source depends on the nature of the light source. In the simplest case of a point source, we simply need to store the source’s location, its color, and its intensity.
Some 3D file formats have the capability to encode information about lights, as shown in this image.
The spatial relationship between the 3D model and other nearby models is also sometimes stored. This is particularly important if the model is made of several parts, which needs to be laid out in a certain way to make up the scene.
It is worth noting that most 3D file formats often do not support scene information. This stems from practical reasons. When it comes to layout, one can always ensure that the parts of the model are placed in the correct location before saving the model. In this case, the file format does not need to explicitly define the relationships between the parts. The camera and light attributes can also be ignored since it is expected that the end users will change the camera position anyway as they navigate around a scene.
4. 3D File Formats: Animation
Some 3D file formats have the capability to store animations of a 3D model. This is very useful in game designing or movie making where animations are used heavily.
4.1 3D File Format Animation: Skeletal animation
The most popular way of animating a 3D model is called “skeletal animation”. In skeletal animation, each model is associated with an underlying skeleton. The skeleton is made out of a hierarchy of virtual “bones”. The movement of bones higher in the hierarchy (parent bones) affect the bones lower in the hierarchy (child bones). This is similar to the human body, where a movement of the shin bone affects the position of the toes.
It is important to understand that these bones are not real bones, but merely mathematical constructs that help an animator define movements in a model. The bones are typically represented by a 4×3 matrix where the first three columns represent rotation, scale, and shear of the bone. The last column is the translation relative to the parent’s world space.
In addition to the transformation, each bone is given a unique ID and is associated with a subset of the mesh encoding the surface geometry. This subset moves along with the virtual bone.
Bones are connected by “joints”. Joints introduce constraints in the possible transformations associated with a bone, thereby restricting how a bone can move in relation to its parent. This is again similar to the human body – the elbow may only rotate around a specified axis while the ball joint between the thigh and pelvis allow rotation around all axis.
Here is a cool and short video explaining how bones and joints can be used to create basic animations in Cinema4D.
4.2 3D File Format Animation: Techniques of animation
There are many different techniques of storing animations of skeletal structures. The most important techniques are forward kinematics, inverse kinematics, and keyframes. You can read much more about animation techniques and encodings in this Bachelor thesis by Marcus Lundgren.
Which 3D File Format Should you use for Exporting and Sharing your Model?
We are now in good position to answer this question.
Every 3D modeling software allows exporting into many different 3D file formats. However, which one you choose for your application depends a lot on which features you need for your work and the software you are going to use. Since we are now familiar with the different features of 3D file formats, we are ready to take an abstract look at the different considerations that goes behind the choice of a particular file format. There are three major considerations.
1. 3D File Formats: Which Features do you Need?
3D file formats are used in many different sectors and industries and each has their own specific needs and requirements. Depending on which industry you are in, you might want different sets of features in your ideal 3D file format. To explain what we mean, let’s discuss three major industries using 3D file formats.
1.1 3D File Formats for 3D Printing
The 3D printing industry uses approximate file formats. Capability for storing appearance is required in some cases.
In 3D printing, high precision is not a requirement because the current printers cannot print beyond a certain resolution. Therefore, file formats using the approximate encoding of the surface geometry are ideal for the job. STL is such a file format and is the most popular 3D printing format to date.
STL, however, cannot store information related to appearance. So if you want to print a multicolor model, then you can’t use STL anymore because it cannot store color or material related information. There are other file formats such as OBJ or AMF which can store appearance related information. Thus these formats (OBJ being the most popular) are the best choice for multi-color models.
1.2 3D File Formats for Graphics Based Applications (Games and Movies)
Games require fast rendering, support for rich color and textures, and animation.
In graphics based applications, the requirements are different from 3D printing. Since we are way past the black and white era, 3D models used in games and movies require rich colors and texturing. Games and movies also need to support animation. In addition, all graphics based applications usually demand high rendering speeds. Therefore, the best formats for this kind of job would be something that uses approximate geometry to achieve fast rendering, can encode appearance and support animation. The FBX and COLLADA formats check all these boxes and hence are ideal for graphics applications.
1.3 3D File Formats for High-Precision Engineering
3D modeling in the area of aeronautics engineering requires precise encoding of surface geometry
The name says it all. In the discipline of high precision engineering such as aerospace engineering, the 3D models need to be smooth and precise at any scale. Therefore, formats using precise geometry such as IGES or STEP are going to be the best fit for this task.
Since the features of a 3D file format is a crucial consideration in identifying the ideal format, we have provided a table of features supported by the top 8 3D file formats in the appendix to this article. You can take a look at it when you need to make a decision.
2. Which Software Pipeline are you Going to Use?
The next important consideration is the software pipeline that you will use for your task. Not all software support importing and exporting of all 3D file formats. You should choose a file format that is supported by your software of choice.
For your reference, we have included a table of file formats supported by the commonly used 3D modeling software and engines in the second appendix to the article. This is another resource you can consult when deciding on a file format.
Market share of the most popular 3D modeling software
3. Which Software does your collaborator use?
The file format that you choose not only needs to fit into your pipeline, but also into your collaborator’s pipeline. If you know your collaborators, ask them what they use and discuss which file formats fits well into both your and your collaborator’s workflow.
If you don’t know your collaborators, then it’s best to play it safe. Just choose the most popular format that satisfies the previous requirements. It’s best if the format is neutral and not proprietary.
Top 8 3D File Formats in Detail
So far, we have discussed 3D file formats at an abstract and high level. We have discussed the different features that 3D file formats implement and how you can pick the ideal 3D file format based on this knowledge. Now, let’s take a look at the 8 most important 3D file formats and find out which of these features they support, how popular they are and which industries use them the most.
If you are looking for information about a certain 3D file format, you can skip the others and jump right to that 3D file format.
STL (STereoLithography) is one of the most important neutral 3D file formats in the domain of 3D printing, rapid prototyping, and computer aided manufacturing. It is native to the stereolithography CAD software made by 3D Systems. The corresponding file extension is .STL.
STL is one of the oldest 3D file formats and was created in 1987 by Chuck Hull, who is currently the CTO at 3D Systems. He also invented the world’s first stereolithographic 3D printer. The STL file format was created subsequently as a simple way of transferring information about 3D CAD models to this 3D printer.
Main characteristics
STL encodes the surface geometry of a 3D model approximately using a triangular mesh. Since it was one of the first 3D file formats to exploit tessellations as a way of encoding surface geometry, it has several backronyms such as “Standard Tessellation Language” and “Standard Triangle Language”.
STL ignores appearance, scene, and animations. It is one of the simplest and leanest 3D file formats available today. The STL format specifies both ASCII and binary representations. Binary files are more common since they are more compact.
Popularity and future prospects
Ever since its invention, the STL file format has been rapidly adopted by the rapid prototyping, 3D printing, and computer-aided manufacturing industries. It is still the most widely used file format in 3D printing.
The reign of STL over 3D printing might end soon, however. In recent years, 3D printing technology has advanced rapidly. The fidelity of printing processes are now reaching micron level accuracy. Since STL is an approximate format, it needs very small triangular facets to reach this resolution, producing huge and unwieldy files in the process. Secondly, many 3D printers now allow printing in full color, a technology that’s expected to become more widespread in the near future. STL can’t encode color information and is useless for this purpose. For these reasons, the reign of STL over the 3D printing world may not last long and formats like OBJ, 3MF, or AMF might replace it.
The OBJ file format is another neutral heavyweight in the field of 3D printing. It is also widely used in 3D graphics. It was first developed by Wavefront Technologies for its Advanced Visualization animation package. The 3D file format has the extension .OBJ.
Main characteristics
The OBJ file format supports both approximate and precise encoding of surface geometry. When using the approximate encoding, it doesn’t restrict the surface mesh to triangular facets. If the user wants, he can use polygons like quadrilaterals. When using precise encoding, it uses smooth curves and surfaces such as NURBS.
The OBJ format can encode color and texture information. This information is stored in a separate file with the extension .MTL (Material Template Library). It does not support any kind of animation. The format specifies both ASCII and binary encodings, but only the ASCII encoding is open source.
Popularity and future prospects
The OBJ file format, by virtue of being neutral or open, is one of the most popular interchange formats for 3D graphics. It is also gaining traction in the 3D printing industry as the industry moves towards full color printing.
FBX is a proprietary file format which is widely used in the film industry and video games. It was originally developed by Kaydara but was bought by Autodesk in 2006. Ever since the acquisition, AutoDesk has used FBX as an interchange format for its own portfolio which includes AutoCAD, Fusion 360, Maya, 3DS Max and other software packages.
Main characteristics
The FBX file format supports geometry and appearance related properties like color and textures. It also supports skeletal animations and morphs. Both binary and ASCII files are supported.
Popularity and future prospects
FBX is one of the most popular choices for animation. In addition, it is also used as an exchange format which facilitates high fidelity exchange between 3DS Max, Maya, MotionBuilder, Mudbox and other proprietary software.
Collada is a neutral file format used heavily in the video game and film industry. It is managed by the non-profit technology consortium, the Khronos Group. The file extension for the COLLADA format is .DAE.
Main characteristics
The COLLADA format supports geometry, appearance related properties like color, material, textures, and animation. In addition, it is one of the rare formats supporting kinematics and physics. The COLLADA format stores data using the XML markup language.
Popularity and future prospects
The original intention behind the COLLADA format was to become a standard among 3D file formats. Indeed, in 2013, it was adopted by ISO as a publicly available specification, ISO/PAS 17506. As a result of this history, lots of 3D modeling software support the COLLADA format.
However, the consensus is that the COLLADA format hasn’t kept up with the times. The COLLADA format was once used heavily as an interchange format for Autodesk Max/Maya in the film industry, but the industry has now shifted more towards OBJ, FBX, and Alembic.
Which industries use it?
Film industry, video game industry. For more information about the COLLADA file format, see the official docs from the Khronos Group.
3D Files Format #5: 3DS
3DS is a proprietary file format used in architecture, engineering, education, and manufacturing. It is native to the old Autodesk 3D Studio DOS, a popular modeling software which was later replaced by its successor 3D Studio MAX in 1996. Developed in the 90s, it is one of the oldest 3D file formats. It has become one of the de facto industry standards for storing 3D models or for interchanging between two other proprietary formats.
Main characteristics
The 3DS file format retains only the most basic information about geometry, appearance, scene, and animation. It uses a triangular mesh to encode the surface geometry approximately, the total number of triangles being limited to 65536. It stores appearance related properties like color, texture, material, transmissivity etc. Scene information such camera position, lights can also be stored, but the format does not support directional light sources.
The 3DS format specifies a binary encoding and stores information in chunks. This allows parsers to skip chunks they don’t recognize and allows for extensions to the format.
Popularity and future prospects
Being one of the oldest file formats, 3DS has become a standard for storing 3D models and interchanging between other 3D file formats. Virtually all 3D software packages support it. However, since this format retains only the most basic information about the 3D model, it cannot be used in situations where one does not want to lose information. In this case, this format needs to supplemented by the MAX format (now superseded by the PRJ format), which contains extra information specific to Autodesk 3DS Max, to allow a scene to be completely saved/loaded.
IGES (pronounced eye-jess) is a neutral old timer used primarily in the defense industry and in the field of engineering. It was developed in the mid-seventies by the US Air Force.
Back in those days, the Air Force used to waste a lot of time in the tedious process of sharing and converting data between proprietary systems used by its suppliers. The situation was especially bad with larger projects like aircraft carriers or missile delivery systems involving hundreds of suppliers. The IGES format was developed by the Air Force in partnership with Boeing and others in order to serve as an interchange format that can be shared across all CAD systems. Since the 80s, the US Department of Defense has required that all defense and weapons contracts use IGES as the standard file format. The file extension corresponding to the IGES format is .IGS or .IGES.
Main characteristics
The IGES format is an ASCII encoding that is extremely flexible when it comes to representing surface geometry. It has the ability to use circuit diagrams, wireframes, precise free-form surfaces or CSG for storing geometry related information. The format can also store colors but does not support material properties like textures, material type etc. Animation is also not supported.
Popularity and future prospects
IGES has enjoyed widespread popularity ever since it was invented in the 70s. It has been adopted as a national standard in many countries such as UK and Australia. Virtually all CAD software supports it.
The IGES file format is no longer developed, and yet it is still widely used to transfer data between CAD, CAM, and CAE software programs. It is a popular choice for 3D modeling, creation of technical drawings, and product design. It has the reputation of being a good choice for amateurs in 3D; professional 3D artists now prefer its successor STEP.
Which industries use it?
Defense, engineering
3D Files Format #7: STEP
STEP (The Standard for the Exchange for Product Data) or ISO 10303 was developed as a successor of the IGES file format. It is widely used in engineering related fields like automotive and aeronautic engineering, building construction etc. The corresponding file format is .STP.
The officially stated objective of developing STEP was to create a mechanism that is capable of describing product data throughout the life cycle of a product, independent from any particular system. However, due to the complexity and size of the original standard, it has been later broken down into smaller, modular specifications in four major releases.
Main characteristics
The STEP format supports all the features supported by the IGES format. In addition, it can also encode topology, geometrical tolerances, material properties like textures, material types, and other complex product data.
Popularity and future prospects
STEP, like IGES, is a popular format for interchange of data between CAD, CAM and CAE software programs. For compatibility, it is still advisable to use IGES as it is the more common format and more likely to work with the receiving party’s software. However, for use cases where one needs to transfer information related to the model’s appearance, tolerances of the parts etc., STEP is the right format.
Which industries use it?
Engineering e.g. automotive, aerospace, building construction etc.
The last 3D file format we will discuss is VRML and X3D. VRML (pronounced vermal and having the file extension .WRL) stands for Virtual Reality Modeling Language. It is a 3D file format that was developed for the World Wide Web. It has been succeeded by X3D.
The term VRML was first coined in a paper by Dave Raggett titled “Extending WWW to support Platform Independent Virtual Reality” submitted to the first First World Wide Web conference in 1994. It took three more years till a mature version of the format VRML97 was created and became an ISO standard.
VRML97 was used in some personal homepages and 3D chatting sites such as “CyberTown”. However, the format failed to gain any significant adoption. In addition, VRML’s capabilities remained stagnant while realtime 3D graphics improved fast. Eventually, the VRML consortium changed its name to the Web3D Consortium and started developing the successor of the VRML format X3D, which was released in 2001.
Main characteristics
X3D is an XML based 3D file format. It supports all features of the VRML format along with some additions.
The VRML format uses a polygonal mesh to encode surface geometry and can store appearance related information such as color, texture, transparency etc. The X3D format adds NURBS encoding of the surface geometry, the capability of storing scene related information and support for animation.
Popularity and future prospects
The goal of X3D is to become the standard 3D file format for the web. In particular, X3D applets can run within a browser and display content in 3D using the OpenGL 3D graphics technology. X3D was also designed to integrate seamlessly with HTML5 pages much like the SVG format for images. However, till date, the format has not received wide acceptance.
We have learned quite a bit about 3D file formats in this article. We discussed how and why there are hundreds of formats and how they can be classified into two broad categories: proprietary and neutral. Next, we explored the most important features of a 3D file format and provided tips on how you can choose the ideal format for your application. We wrapped up with a discussion of the 8 most important 3D file formats, focusing on their features, popularity and use cases. The appendix has a wealth of information about the compatibility of these 3D file formats with the most popular 3D modeling software and engines. It also has a table for comparative analysis of the feature sets of these 3D file formats.
We hope you enjoyed this article. Share it with your friends who are interested in the world of 3D modeling, game development, special effects, engineering, architecture and 3D printing. If you have any question, opinion or feedback, please share it with us in the comment section.
Appendix
1. Feature matrix of the 8 most popular 3D file formats
Green indicates supported, red indicated not supported
File format
Geometry
Appearance
Scene
Animation
Approximate mesh
Precise mesh
CSG
Color
Material
Texture
Camera
Lights
Relative positioning
STL
OBJ
FBX
COLLADA
3DS
IGES
STEP
X3D
2. Import/Export support in popular 3D modeling software and engines
Blow Molding (also: Blow moulding) and the molding process of polymers is one of the pillars of industrial manufacturing. Without this technology, we wouldn’t have access to cheap glass or plastic bottles or mass-manufactured hollow containers.
Blow molding allows industry players to produce parts and containers fast and cheap in high quantities. But how does this process work and what has 3D printing to do with it? This article will give you all the answers in a nutshell.
What is Blow Molding?
Blow molding started in the glass blowing industry where a liquid glass pulp is enclosed in a two-piece mold and then expanded by blowing into to the pulp. This causes the glass retains the contour of the mold and form a hollow area on the inside.
With the invention of polymeric thermoplastics, this technology started to rev up in the plastic bottle industry. Starting in 1977, the number of plastic containers rose from zero to 10 billion plastic bottles in 1999 due to the soft drink companies in the USA. The outcome isn’t exactly good for the environment, but if you use biodegradable materials or recycle thermoplastic bottles made from PET, things look a bit better.
Blow Molding versus Injection Molding
So, what’s the difference between parts made by injection molding and parts made by a blow molding machine? Injection molding creates solid parts, while blow molding creates hollow parts. If you are looking for something that needs only one rigid wall, injection molding is the right process. Think of bottle caps, cases, combs, and housings for computers and televisions. If you need a flexible, structural piece that even can hold fluid, you’re best off with blow molding. No wonder that billions of water bottles stand for the blow molding technology.
How Plastic Bottles are Made
Producing plastic bottles does not greatly differ from the glass blowing process. The technology used by the bottle forming process is called Injection Blow Molding (IBM). This requires a so-called preform which is much smaller than the actual bottle. The preform can be transported easily and if variants do not differ in weight it can be used uniformly. Like in the glass manufacturing process, the preform is heated up, put into the mold and inflated. Due to the preform, the material expands equally, resulting in a better flow control, surface quality and transparency. After the blow molding process, the bottle heads have to be threaded and the excess material cut off.
What are the Advantages of Blow Molding?
Blow molding scores especially at mass producing at a low price. Depending on the quality of the mold, it can produce more than over 1 million pieces before it has to be replaced. The production is also very fast compared to other molding processes, ejecting a finished product every few seconds. Thin walls and water-cooled molds also reduce cycle time. In addition, once the machine parameters are calibrated, the outputs quality is constant. This is achieved because factoring parameters are stable and controllable. The process of blow molding is also perfect for automation, reducing the need for workers working in a monotone environment.
What are the Limitations of Blow Molding?
Purchasing a molding machine may seem like the biggest investment of a company to start producing. However, before you start producing, you will need a mold. The biggest disadvantage of blow molding lies with the problem of all molding processes. For each type of product you want to produce, you need a new type of mold and this comes with a very steep price. The molds have to be machine milled and produced with a very high surface quality. The molds also have cannulas running through the walls to transport cooling fluids. In addition, the mold often has to be hardened to increase its lifespan. This high cost of molds often reduces a company’s incentive of producing prototypes, especially for low piece numbers.
How does 3D Printing Affect the Blow Molding Process?
This is where 3D printing comes in. With additive factoring, prototypes of molds can be produced faster and at a much lower cost. Unfortunately, 3D printed molds are way behind in durability than their machined counterparts. Still, it is not the goal to create a finished mold, but a prototype or a mold used only for small batches. In addition, it is less difficult and in extreme cases finally possible to create complex internal cooling pipes with 3D printing. The molds are made of metal with laser sintering or durable plastic with the Polyjet technology. The 3D printers of EOS or Stratasys are already helping to enhance the development of molds in all applications.
Which Businesses offer Blow Molding Technology?
If you are interested in acquiring a blow moulding machine or use a blow molding service, you have a choice of over 300 companies. Here are the most successful ones (according to Plastic News)
1. Amcor Rigid Plastics
Company profile: Amcor Rigid Plastics is one of the leading manufacturing companies, developing and producing high-quality packaging for food, beverage, pharmaceutical, medical devices, personal care and other products. Blow molding is an integral part of the company. Amcor is currently offering its service in 200 production sites in 43 countries. 68 percent of the production are flexibles, 32 percent rigid products.
Company profile: What started in 1970 with a simple motor oil container, has become one of the most important companies in blow moulding business. The company offers bottles and containers for food, beverage, household, auto/chem, personal and healthcare businesses. Graham Packaging was early in PET technology and still innovating it today. Also, Graham is one of the world’s largest suppliers of bottle-grade recycled plastics.
Company profile: With total annual sales of $2.7 billion, and more than 40.1 billion containers manufactured per year, Plastipak is one of the big players in blow molding. Founded in 1967, Plastipak started out providing plastic packaging to deliver water for the Young family’s water delivery company. Today, Plastipak now operates more than 60 production sites located in North America, South America, Europe, Africa, and Asia.
Company profile: The Auto Inergy Division is a subdivision of Plastic Omnium. They are manufacturing plastic fuel tank systems. The materials offer a combination of safety, cost, and weight performance (a 30% to 40% weight improvement compared with steel technologies), which are also usable in hybrid vehicles. Plastic Omnium offers solutions adapted for all kinds of engines.
Company profile: Austria-based ALPLA Werke had a turnover of €3.4 billion in 2017 with 176 production facilities and 45 countries.. They are offering plastic packaging of all sorts, including packaging systems, bottles, closures, injection-molded parts, pre-forms, and tubes. Founded in 1955, Alpla claims to be “a family company steeped in tradition, always looking towards the future”.
Um dir ein optimales Erlebnis zu bieten, verwenden wir Technologien wie Cookies, um Geräteinformationen zu speichern und/oder darauf zuzugreifen. Wenn du diesen Technologien zustimmst, können wir Daten wie das Surfverhalten oder eindeutige IDs auf dieser Website verarbeiten. Wenn du deine Einwillligung nicht erteilst oder zurückziehst, können bestimmte Merkmale und Funktionen beeinträchtigt werden.
Funktional
Immer aktiv
Die technische Speicherung oder der Zugang ist unbedingt erforderlich für den rechtmäßigen Zweck, die Nutzung eines bestimmten Dienstes zu ermöglichen, der vom Teilnehmer oder Nutzer ausdrücklich gewünscht wird, oder für den alleinigen Zweck, die Übertragung einer Nachricht über ein elektronisches Kommunikationsnetz durchzuführen.
Vorlieben
Die technische Speicherung oder der Zugriff ist für den rechtmäßigen Zweck der Speicherung von Präferenzen erforderlich, die nicht vom Abonnenten oder Benutzer angefordert wurden.
Statistiken
Die technische Speicherung oder der Zugriff, der ausschließlich zu statistischen Zwecken erfolgt.Die technische Speicherung oder der Zugriff, der ausschließlich zu anonymen statistischen Zwecken verwendet wird. Ohne eine Vorladung, die freiwillige Zustimmung deines Internetdienstanbieters oder zusätzliche Aufzeichnungen von Dritten können die zu diesem Zweck gespeicherten oder abgerufenen Informationen allein in der Regel nicht dazu verwendet werden, dich zu identifizieren.
Marketing
Die technische Speicherung oder der Zugriff ist erforderlich, um Nutzerprofile zu erstellen, um Werbung zu versenden oder um den Nutzer auf einer Website oder über mehrere Websites hinweg zu ähnlichen Marketingzwecken zu verfolgen.