CSG to DXF Converter: OpenSCAD Solid to 2D View | MiConvert

CSG to DXF Converter for OpenSCAD Models

Upload the .csg file that OpenSCAD exports and get a DXF with one flat view of the solid's visible edges, in millimeters. Export CSG first, because .scad scripts are not accepted, and designs that use hull(), minkowski() or text() are refused.

📁

Drop your file here

or click to browse

Select File

Max 10 files, 50MB each

SSL Encrypted Auto-deleted No Sign Up 100% Free
CSG → DXF

Why turn an OpenSCAD CSG export into DXF

OpenSCAD writes a .csg file when you choose Export as CSG. The file lists your primitives, transformations and union, difference and intersection operations as a plain tree, with variables, loops and modules already expanded. It describes how to build the solid, not its surfaces, so AutoCAD, LibreCAD, Inkscape and laser or CNC software cannot open it. OpenSCAD's own DXF export does not solve this for a 3D model, because it only accepts a flat 2D result.

MiConvert processes the file on its servers with FreeCAD 1.1. FreeCAD's OpenSCAD importer reads the tree and rebuilds each top-level solid without running OpenSCAD. A hidden-line projection then draws one orthographic view of the edges you would see from outside. The direction is chosen automatically. It looks straight at the largest total area of flat faces and takes the top view when directions tie. When flat faces make up less than a fifth of the surface, it looks along the model's thinnest dimension.

The result is exact for that one view. You get lines, arcs, circles and splines in an AutoCAD 2000 DXF, all on a single layer named none. OpenSCAD's unitless numbers are taken as millimeters, and the header says so. A cylinder whose $fn is above 16 or left unset becomes true circles. With $fn between 3 and 16, FreeCAD builds a prism instead, so a $fn=6 peg is drawn as a hexagon. You do not get hidden edges, extra views, sections, dimensions or a title block. Separate bodies are all projected into the same view and overlap where they line up.

This suits makers who model laser-cut plates, CNC brackets or gaskets parametrically and need the outline in a CAD or CAM program. Flat parts work best, because the view lands face-on. A part with pockets, steps or chamfers also shows those inner edges, so tidy the drawing before sending it to a cutter.

How to convert CSG to DXF

  1. Open your script in OpenSCAD and use File, Export, Export as CSG. Upload that .csg file, not the .scad source.
  2. Search the design for hull(), minkowski(), text(), import(), surface() and projection(). Any of these makes the file fail, so remove or replace them before you export.
  3. Keep only the part you want drawn. Every top-level solid goes into the same view, so leftover test pieces will overlap the outline.
  4. Drop the .csg on this page. Without an account each file can be up to 50 MB, with up to 10 files at once. A free account raises the size cap to 100 MB.
  5. Download the DXF within 4 hours and open it in your CAD or CAM program. Keep millimeters when the program asks for a unit.
  6. Delete any inner edges you do not want cut, such as pocket floors or chamfer lines, then assign layers or colors for your machine.

What the CSG to DXF converter does

  • Reads OpenSCAD's CSG export with FreeCAD's OpenSCAD importer and rebuilds union, difference and intersection trees as real solids. No OpenSCAD install is involved.
  • Chooses the view direction from the part's own geometry: the largest area of flat faces, with the top view winning ties.
  • Removes hidden lines, so only the edges visible from that direction remain.
  • Writes true arcs and circles for smooth round features and turns straight splines into plain LINE entities.
  • Drops coincident duplicate edges and identical shapes stacked in one spot, so a cutter does not trace the same line twice.
  • Stops with a message that names the function when the file uses hull(), minkowski(), text(), import() or another operation it cannot evaluate.

Video Tutorial

Detailed guide on how to convert CSG files to DXF quickly, for free, and without losing original quality. Perfect if you need to process file formats, reduce size, or upload files to systems that only

CSG to DXF questions

Can I upload a .scad file instead of a .csg?

No. Only the .csg file that OpenSCAD exports is accepted. Open the script in OpenSCAD, let it preview, then choose File, Export, Export as CSG.

My file fails with "This CSG file uses hull()/minkowski()/text()/import()". What now?

Those operations, along with surface(), projection() and a few others, need OpenSCAD itself to evaluate them, and OpenSCAD is not part of this converter. To get a flat profile, let OpenSCAD do the work: wrap the part in projection() or projection(cut = true), render with F6, and export DXF directly from OpenSCAD. Exporting STL and converting that is not a good substitute, because our mesh-to-DXF output is one 3D mesh entity, not a 2D outline.

Can I choose the front or side view, or get several views?

Not here. The view depends on the part's shape rather than its rotation, so rotating the model in the script rarely changes the result. If you need a specific side, rotate the part, wrap it in projection() in OpenSCAD, and export that DXF from OpenSCAD.

Why are my round holes drawn as polygons?

Check $fn. When $fn is between 3 and 16, FreeCAD builds a prism with that many sides, so the DXF shows straight segments. Set $fn above 16, or leave it unset, and the same holes come through as true circles.

What units does the DXF use?

Millimeters, and the file header declares them. OpenSCAD has no units of its own, so a model drawn with 1 unit meaning 1 inch arrives with inch-sized numbers labeled as millimeters. In that case, scale the drawing by 25.4 in your CAD program or change its units to inches.

What do "Could not read this 3D file" and "No valid 3D geometry found" mean?

Both are general messages that hide the specific reason, which is why one of them mentions textures even though a CSG file has none. "Could not read" usually means the CSG has a syntax error, for example after hand editing or a cut-off upload, so export it again from OpenSCAD. "No valid 3D geometry" means no solid was found. Only top-level solids are imported, so a design built from 2D shapes alone has nothing to project. For 2D designs, OpenSCAD's own DXF export is the direct route.

Is my CSG file kept on your servers?

The conversion runs on MiConvert's servers, not in your browser, and the transfer uses HTTPS. Your upload is deleted as soon as the conversion finishes. The DXF can be downloaded for about 4 hours, then it is deleted automatically. The download link is a random token that is not tied to an account, so anyone you share it with can use it until it expires. We log file names, sizes and outcomes, and signed-in users keep a history entry until they delete their account.