CSG to OFF Converter for OpenSCAD .csg Files | MiConvert

CSG to OFF Converter for OpenSCAD Exports

Upload the .csg file that OpenSCAD exports and download an ASCII OFF mesh built from its solids. Files that use hull(), minkowski(), projection(), text() or import() cannot be converted here, so export OFF straight from OpenSCAD for those.

📁

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 → OFF

From an OpenSCAD CSG tree to an OFF mesh

The CSG on this page is OpenSCAD's exported .csg file, written by File > Export > Export as CSG. It is your model after OpenSCAD has evaluated the script: variables, loops and modules are resolved into plain primitives such as cube, sphere and cylinder, combined with union, difference and intersection. That tree says how to build the solid, not where its surface is, so MeshLab, Geomview, CGAL-based programs and research pipelines cannot use it. They expect OFF, which is simply a vertex list followed by a face list.

We read the file with FreeCAD 1.1's OpenSCAD importer, which rebuilds each primitive and boolean as a FreeCAD solid on our servers without running OpenSCAD. The finished solids are tessellated with a fixed tolerance of 0.1 mm and 0.5 radians and written as OFF. Only the top-level solids are output; the intermediate shapes that fed a difference or union do not appear separately.

Working without OpenSCAD has a cost. Operations only OpenSCAD can compute, namely hull(), minkowski(), projection(), glide() and subdiv(), plus text() and external data through import() or surface(), are refused with a message naming the call. Nothing is approximated, so a model that depends on them must be exported to OFF, STL, AMF or 3MF from OpenSCAD itself.

Round shapes follow different rules from OpenSCAD's render. A cylinder with $fn between 3 and 16 stays a prism with that many sides, so deliberate hexagons and octagons survive. Higher $fn values and the default $fa/$fs settings produce a true cylinder, and spheres are always exact, so their facet count comes from our tessellation rather than from your script. The OFF file is ASCII with shared vertices and triangle faces only, without normals or color, so color() calls are dropped. Coordinates keep your model's numbers, which OpenSCAD users normally treat as millimetres.

This route fits when you hold a .csg but have no OpenSCAD installation, for example a file from a colleague, a model archive or an automated generator. If you have OpenSCAD and the .scad source, its own OFF export is more direct and handles every function.

How to convert an OpenSCAD model to OFF here

  1. In OpenSCAD, open the .scad file and choose File > Export > Export as CSG. The .scad source itself is not accepted.
  2. Search the .csg text for hull, minkowski, projection, glide, subdiv, text, import or surface. If any appear, export OFF from OpenSCAD instead, because this converter will refuse the file.
  3. Make sure the model has volume. A design built only from square, circle or polygon without linear_extrude or rotate_extrude has no solid to mesh; extrude it in OpenSCAD, or export flat outlines as DXF from OpenSCAD itself.
  4. Where you want visible polygon sides, keep $fn between 3 and 16; leave it higher on parts that should be smooth.
  5. Upload the .csg (up to 50 MB per file as a guest, more with an account or paid plan) and download the OFF within about 4 hours.
  6. Open the result in MeshLab or your script and check the triangle count before running heavier processing.

What the CSG converter handles

  • Parses OpenSCAD CSG exports without needing OpenSCAD on our side or yours.
  • Rebuilds primitives and booleans as solids before meshing, so the OFF describes the final shape rather than overlapping pieces.
  • Keeps low-$fn cylinders as prisms and turns other cylinders and all spheres into exact round surfaces before tessellation.
  • Writes ASCII OFF with merged vertices and triangle faces, easy to read in a text editor or parse in a few lines of code.
  • Names the unsupported function when a file uses hull(), minkowski(), text() or similar calls.
  • Allows each file up to 10 minutes of engine time before stopping it as a timeout.

Video Tutorial

An A-Z video guide on how to use MiConvert to change CSG format to OFF. This is the safest method to convert data without needing to download any applications to your device. 🔗 Format conversion too

CSG to OFF questions

Can I upload a .scad file?

No, only OpenSCAD's .csg export. In OpenSCAD, use File > Export > Export as CSG. The same Export menu also offers OFF, which is the simplest option if you already have OpenSCAD open.

Why do I get a FATAL error about hull(), minkowski() or text()?

Those operations need OpenSCAD's own geometry engine, which this converter does not run. The message starts with FreeCAD conversion failed: [CAD] FATAL: This CSG file uses, followed by the function. Export the model as OFF, STL, AMF or 3MF from OpenSCAD.

What does "Could not read this 3D file" mean for a CSG?

The parser hit a syntax error. This usually follows hand-editing the .csg, a file cut short during transfer, or a .scad renamed to .csg. Re-export the CSG from OpenSCAD without editing it. The wording is generic and mentions textures, which do not apply to CSG.

Why does it say "No valid 3D geometry found"?

The file contains no solids, typically because it is a 2D design made of squares, circles or polygons that were never extruded. Add linear_extrude or rotate_extrude in OpenSCAD and export again, or export the flat shapes as DXF from OpenSCAD.

Why don't my round faces match OpenSCAD's facets?

Spheres, whatever their $fn, and cylinders with $fn outside 3 to 16 (including the default $fa/$fs) are rebuilt as exact surfaces and then meshed at our fixed 0.1 mm and 0.5 radian tolerance. Their facet count therefore depends on the part's size, not on $fn, $fa or $fs, and cannot be adjusted. Only cylinders with $fn between 3 and 16 keep that number of sides.

Does the OFF file keep colors from color()?

No. The output carries geometry only, with no color, normals or object names. Several top-level objects end up together in the same OFF file.

Is my model stored after conversion?

Processing happens on our servers. The .csg you upload is deleted once the job ends, and the OFF result stays downloadable for about 4 hours before it is removed automatically. The link is a long random token that is not tied to an account, so anyone you send it to can use it until it expires. File names and basic job details are logged; nothing is published or kept in a gallery.