Convert DXF to STL

The Basics

In SketchUp Pro, you can import a DXF file and export it as an STL
In SketchUp Pro, you can import a DXF file and export it as an STL (Source: i.Materialise)

The drawing interchange format, or DXF,  is a file format that was created by Autodesk in the early 1980s to enable data exchange outside of AutoCAD. Due to its maturity and well-documented specifications, it’s normal to see the DXF file format while working with CAD applications or looking for CAD models online. Although compatible with many 3D design programs, DXF competes with the OBJ, 3MF, and STL file formats, which are more commonly used by the 3D printing community.

The STL file format is one of the most frequently encountered file formats used in 3D designing software today. Commonly found on major model sharing sites, almost all slicers and modeling programs have the ability to import or export into STL file format. Developed in the late 1980s by the Albert Consulting Group for 3D Systems, STL stores information describing the external surface of a model. Similar to the DXF format, STL does not (by default) store information about scale or color.

The need to convert between the two files isn’t uncommon. Say you find a free model that’s only available in DXF, but you’d prefer to work with a file format with a larger support base. Perhaps you just want to quickly view your 3D files with software that’s built into most operating systems, but that software only supports STL (3D Viewer for Windows and Preview for Mac OS, for example).

How to Convert

If you have access to a CAD program, you may be able to open and convert DXF files with the software you already have. OpenSCADSketchUp, SolidWorks, and Fusion 360 have DXF file integration abilities, albeit sometimes at a cost. SketchUp and Fusion 360, for example, require premium plug-ins that you may not want to pay for.

In this article, we’ll show you how to quickly convert DXF files with freely-available tools. If you don’t currently have access to CAD software, we’ll also highlight a few paid methods that will get the job done with ease.

Back to Contents

Advertisement
Advertisement
Advertisement
Convert DXF to STL

Online: One-Step Method

Bear File Converter makes the conversion process quick and brainless
Bear File Converter makes the conversion process quick and painless (Source: Phillip Bruno via All3DP)

The fastest and most direct way to convert your DXF file to an STL is to use the DXF to STL converter at Bear File Converter. All you need to do is upload your file and then select “Convert”.

This one-step method should be able to convert either your two- or three-dimensional DXF files automatically, but you may need to adjust the scale of your model after the conversion. This is because DXF files do not contain unit information natively, and most conversion engines must therefore estimate dimensions.

If you don’t have AutoCAD, you can cross-reference your original file by using a free DXF viewer such as Autodesk Viewer or CADKitViewer. That way, you can spot-check your new STL model to make sure the dimensions approximately match the original source.

As an alternative to Bear File Converter, you can also try the DXF converter from AnyConv. It worked for many of the models we tested but, on occasion, would produce an STL model that couldn’t be opened in any of our STL editing or viewing software.

Back to Contents

Advertisement
Advertisement
Advertisement
Convert DXF to STL

Online: Two-Dimensional Files

SVG 2 STL is a great tool to quickly convert your images to STL
SVG 2 STL is a great tool to quickly convert your images to STL (Source: Phillip Bruno via All3DP)

In case the one-step method fails (or you want to be a bit more hands on in the conversion process), you can use the method below to convert two-dimensional DXF files. This process uses two different online converters in order to get the conversion done:

  1. First, we need to convert the DXF file into an SVG file using the DXF to SVG converter at Aconvert. Simply upload your file, then select “Convert”.
  2. Next, upload your converted SVG file to SVG 2 STL and enter in an extrusion height when prompted to do so.
  3. When you’re ready, click “Convert”, and the website will process your SVG into an STL file.

As you can see, the first converter at Aconvert converts your DXF file into a flat image file, and the second converter, SVG 2 STL, takes the flat image and converts it into a three-dimensional STL file (with the height of your choice). Similar to the one-step process, you will need to cross reference your original model to make sure that your new STL file is scaled correctly.

As an alternative to Aconvert, you can try the 2D converter at DXFConverter to get the SVG file.

Back to Contents

Advertisement
Advertisement
Advertisement
Convert DXF to STL

Offline: Two-Dimensional Files

Use a high-resolution image, otherwise you're liable to lose some detail
Use a high-resolution image, otherwise you're liable to lose some detail (Source: Phillip Bruno via All3DP)

If you have a two-dimensional DXF file with sensitive information, you can also convert your files locally on your PC with this combination of programs: CADKitViewer (version 1.0), Microsoft’s Snipping Tool, and Microsoft’s 3D Builder software.

  1. Open your DXF file in CADKitViewer by selecting “Open” from the “File” menu.
  2. With Snipping Tool, take a screenshot of your open model, being careful not to cut off any model edges.
  3. Save the screenshot in either PNG or JPG file format.
  4. In Microsoft 3D Builder, import your image by clicking on “Open”, then selecting “Load image”.
  5. Once selected, the import image menu will appear. Depending on how you took your screenshot you may need to toggle the “Inverse” option on or off.
  6. Once happy with the preview, click the “Import image” checkmark.
  7. Save your model by selecting “Save As” from the “File” menu. Then select “*.stl” in the “Save as type:” dropdown box.

As you can see, this method requires the most steps out of all three options, and it also introduces the risk that your model loses some of its details when it tries to interpolate the shape in your image. This risk can be reduced by ensuring that you take as high of a resolution screenshot as possible.

While taking the screenshot of your file, CADKitViewer’s XYZ legend may get in the way. If this happens, you can try erasing it from your image using an image editor like GIMP. Just make sure to edit the image before importing it in 3D Builder. Lastly, for those of you who aren’t familiar with 3D Builder, there’s plenty of documentation from Microsoft to help you along.

Back to Contents

Advertisement
Advertisement
Convert DXF to STL

Paid Conversion Methods

Fusion 360 can open your DXF file directly
Fusion 360 can open your DXF file directly (Source: Autodesk)

If all of the above methods are too much of a hassle for you, or you find that you have many files that you want to convert, some CAD programs allow for conversion between file formats. Here are a few options:

  • AutoCAD: For a monthly subscription (or their one-month free trial), AutoCAD directly supports opening DXF files and saving them to STL file formats.
  • Fusion 360: Autodesk also offers the Fusion 360 design suite, which has built-in DXF support and can be purchased on a monthly basis.
  • SketchUp: As a Pro subscriber to SketchUp, you also get access to their DXF import function and a bunch of other tools as well.

Back to Contents

Advertisement
Advertisement

License: The text of "How to Convert DXF to STL: 3 Simple Solutions" by All3DP is licensed under a Creative Commons Attribution 4.0 International License.

Stay informed with notifications from All3DP.

You get a notification when a new article is published.

You can’t subscribe to updates from All3DP. Learn more… Subscribe to updates

You can’t subscribe to updates from All3DP. Learn more…

Topics
Advertisement