CSG to USDZ Converter for OpenSCAD Files | MiConvert

CSG to USDZ Converter for OpenSCAD Models

Turn an OpenSCAD .csg export into a USDZ file you can open in AR Quick Look on an iPhone or iPad. No axis or unit conversion is done, so the result appears tipped 90 degrees and about ten times too large; the steps below show how to correct that before you export.

📁

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

What happens between an OpenSCAD .csg and a USDZ

OpenSCAD's .csg export describes a model as a tree of primitives joined by boolean operations, with the script's logic already resolved. iOS cannot preview it. AR Quick Look expects USDZ, a zipped Universal Scene Description package that holds real polygon geometry. Getting from one to the other means evaluating the booleans, meshing the result and packaging it.

Here that happens on our servers in two stages. First, FreeCAD 1.1 parses the .csg with its OpenSCAD importer, rebuilds the solids, and meshes curved surfaces into a temporary GLB at a fixed 0.1 mm chord tolerance and 0.5 radians between facets. A second script then writes that mesh into a USDZ package with a single mesh and a plain basic material. Each stage has its own 10-minute limit.

Two settings are not translated. OpenSCAD and FreeCAD put height on the Z axis, while USDZ declares Y as up, and the coordinates are copied without rotating them, so the model shows up rotated 90 degrees. The file also leaves its unit scale unset, which USD readers take to mean centimetres. Your numbers are millimetres, so a 40 mm part reads as 40 cm.

Other things stay behind as well: color() assignments, the boolean tree and any way to edit dimensions later. The conversion stops with an error naming the problem when a design needs the OpenSCAD program itself, which covers hull(), minkowski(), text(), projection(), import() and surface(). Spheres come back round, and cylinders with $fn from 3 to 16 stay prisms.

This route suits makers and designers who want to see an enclosure or printed part on a real table through an iPhone, send a quick 3D preview to a client, or check proportions in AR before printing. It works for that once size and orientation are handled in the source.

Preparing and converting a .csg for AR Quick Look

  1. Open the .scad in OpenSCAD and wrap the whole model in rotate([-90,0,0]), so its height runs along Y, the up axis USDZ declares.
  2. Decide how to handle size. Adding scale(0.1) makes the part appear at its true size. The trade-off is that curves may look more faceted, because our fixed 0.1 tolerance then applies to the smaller numbers. Otherwise, leave the scale alone and pinch to resize in AR Quick Look.
  3. Replace any hull(), minkowski(), text(), projection(), import() or surface() calls, then save with Export as CSG under File > Export.
  4. Upload the .csg. Each file can be up to 50 MB without an account, 100 MB with a free account, 200 MB on Plus and 1 GB on Pro.
  5. Download the .usdz within about 4 hours. Send it to your iPhone or iPad with AirDrop or Messages, or open it from the Files app, to view it in AR Quick Look.

What you get in the USDZ

  • A single .usdz package containing one USD mesh under a /Root prim with a plain material, with no side files to keep together.
  • Real cutouts: FreeCAD computes every difference and intersection before meshing, so holes are actually open and shared volumes are actually trimmed.
  • Curved surfaces meshed at 0.1 mm chord error and 0.5 radians between facets, the same for every model.
  • True spheres and round cylinders rebuilt from the CSG primitives, while cylinders with $fn of 3 to 16 keep their prism shape.
  • A plain-language error that names the offending call when a design depends on hull(), minkowski(), text() or import().

Video Tutorial

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

CSG to USDZ questions

Why does my model lie on its side in AR Quick Look?

The CSG data uses Z for height, but USDZ declares Y as up, and the converter copies the coordinates without rotating them. Wrap the model in rotate([-90,0,0]) in OpenSCAD before exporting the .csg, and it will stand upright.

Why is the model ten times bigger than the real part?

The USDZ does not state its unit scale, so viewers read the numbers as centimetres, while OpenSCAD models are drawn in millimetres. Either add scale(0.1) in OpenSCAD before exporting, accepting slightly more visible facets, or pinch to resize the model in AR Quick Look.

Does the USDZ keep the colors from my OpenSCAD design?

No. color() is not carried over, and the mesh gets one plain basic material. For a colored AR preview, assign materials in a 3D application that can edit and export USDZ.

Do you accept .scad files?

Only the .csg export is accepted, because the converter reads the resolved boolean tree rather than the OpenSCAD script language. Export the .csg from OpenSCAD and upload that file.

What if my design uses hull() or minkowski()?

Those calls, along with text(), projection(), import() and surface(), always fail here, because the OpenSCAD program is not part of the converter. Either rebuild the shape with plain unions and differences, or export STL, OFF, AMF or 3MF from OpenSCAD and turn that mesh into USDZ with a 3D application that exports USDZ.

I see 'Could not read this 3D file' or 'No valid 3D geometry found'. What now?

The first message usually means the .csg has a syntax error, is truncated, or is not an OpenSCAD export, so re-export it and upload the untouched file. The second means FreeCAD found only curves and no solid to mesh; in that case CSG to DXF is the alternative. Both messages are generic and mention textures, which do not apply to CSG files.

Can I edit the USDZ later or turn it back into CSG?

Not in any useful way. The USDZ holds a triangle mesh with one material, and the primitives and booleans are gone. Keep your .scad as the master copy and convert again after each change.

What happens to my file after conversion?

Processing runs on our servers, not on your device. The uploaded .csg is removed as soon as the job finishes. The USDZ stays downloadable for about 4 hours and is then deleted automatically. The link is a random, hard-to-guess address that works more than once, so share it only with people who should have the file. File names, sizes and results are logged, and signed-in users see the conversion in their history.