File formats & mesh repair
Every 3D print starts with a file, and many failed prints start with a bad one. Learn which formats to use, what a healthy mesh looks like, how to find and fix problems, and how to find, license and archive models responsibly.
- How STL, OBJ, 3MF, STEP, AMF, PLY, glTF, SVG/DXF and G-code differ, and which one to use when.
- What a mesh is made of, and what "manifold", "watertight" and "inverted normals" mean in practice.
- How to repair, simplify, hollow and split models with free tools, and what Boolean operations can break.
- How to read repository licenses carefully, check printability, and archive models with Git LFS and sensible names.
File formats compared
Formats fall into four families. Mesh formats (STL, OBJ, PLY, AMF, 3MF) store triangles. Solid (B-rep) formats (STEP, IGES, Parasolid) store exact surfaces, ideal for editing in CAD. Scene formats (glTF, OBJ with materials) store meshes plus textures for display. Instruction formats (G-code and its variants) store printer commands and are the output of the slicer, not the input. See Slicers compared for how a mesh becomes G-code.
| Format | Stores | Units | Color / multi-material | Best for | Watch out for |
|---|---|---|---|---|---|
| STL (.stl) | Triangles only (binary or ASCII) | None; assumed mm | No | Universal single-material exchange | No units, no metadata, large files for fine curves |
| OBJ (.obj + .mtl) | Triangles/polygons, normals, UVs, material names | None | Via textures or material groups | Sculpts, textured and colored models | Polygons can be quads or n-gons; separate .mtl and texture files |
| 3MF (.3mf) | Mesh, units, build plate, colors, materials, thumbnails, slicer settings | Yes (default mm) | Yes | Modern default for slicers; sharing projects | Slicer-specific extensions; settings may not transfer between brands |
| AMF (.amf) | XML mesh with curved patches, colors, materials | Yes | Yes | Legacy; largely superseded by 3MF | Poor software support today |
| STEP (.step/.stp) | Exact B-rep geometry, assemblies | Yes | Limited | CAD exchange and archiving | Not directly printable in all slicers; tessellation settings matter |
| IGES (.igs) | Older surface/curve exchange | Yes | No | Legacy CAD exchange | Often surfaces without a closed solid |
| Parasolid (.x_t/.x_b) | Exact B-rep kernel format | Yes | No | SolidWorks, NX, Shapr3D exchange | Proprietary kernel; fewer free tools |
| PLY (.ply) | Points/triangles with vertex colors | None | Per-vertex color | 3D scans and photogrammetry | Usually needs conversion and cleanup |
| glTF/GLB | Meshes, materials, textures, animation | Meters by convention | Textures | Web, AR and game assets | Meters, not mm; can be non-manifold and non-solid |
| SVG / DXF | 2D vector paths | Yes (DXF), varies (SVG) | No | Logos, laser cutters, extrusions | Needs closed, clean paths and correct scaling |
| G-code (.gcode) | Printer commands | mm | Via tool changes | Direct printing | Printer-specific; not a model |
For each project keep: (1) the native CAD or script file, (2) a STEP export for portability, and (3) the 3MF project you actually sliced. STL is an acceptable throw-away export, not an archive.
G-code flavors and containers
Plain .gcode files are text and can be read in any editor. .bgcode is a compact binary G-code format designed to cut file size and speed uploads on printers that support it (introduced by Prusa for its firmware). Bambu Lab printers use .gcode.3mf: a 3MF package containing the plate's G-code, thumbnails and metadata, which is what Bambu Studio sends to the printer. These containers are described in G-code, firmware & ecosystem. Never edit a file you do not understand and never run G-code from an untrusted source on a printer you care about.
Mesh anatomy
A mesh is a surface described by three things: vertices (points in space), edges (lines between two vertices) and faces (usually triangles bounded by three edges). Each face has an outward-pointing normal, a direction perpendicular to the face that tells the software which side is "outside". A printable mesh must enclose a volume unambiguously.
Manifold and watertight, explained
A mesh is manifold when every edge is shared by exactly two faces, and the faces around each vertex form a single connected fan. It is watertight when it has no holes, so water poured inside could not leak. Slicers compute the interior by counting how many surfaces a ray crosses; if the surface has holes, overlaps or flipped faces, the count goes wrong, and the slicer may print nothing, fill the wrong region or produce odd gaps.
| Symptom in the slicer | Likely mesh cause | First thing to try |
|---|---|---|
| "Object has errors" or auto-repair warning | Holes, non-manifold edges, inverted normals | Accept the slicer's repair, then check the preview |
| Part missing in preview or layers empty | Flipped normals or open shell | Recalculate outside normals; close holes |
| Random gaps or lines inside walls | Self-intersections or overlapping shells | Boolean union in a mesh tool or CAD; remove duplicates |
| Thin walls vanish | Walls under line width | Thicken in CAD or enable thin-wall detection |
| Specks and blobs outside the part | Tiny stray shells | Delete tiny components in a mesh editor |
| Huge slicing time or stutter | Millions of triangles | Decimate (see below) |
Resolution, tessellation and faceted curves
A mesh made of flat triangles can only approximate a curve. When CAD exports a cylinder to STL, it chooses how many segments to use, controlled by two numbers: the chord (linear) deviation, the largest distance between the true curve and the triangle edge, and the angular deviation, the maximum angle between neighboring normals. Coarse settings produce visible facets, even if your printer could do much better.
Layer height controls detail in Z; tessellation controls detail in X and Y. A beautifully smooth stack of layers still shows polygon corners if the STL was exported with a 0.1 mm chord deviation on a large cylinder. If the slicer is set to arc fitting, it can sometimes smooth small jaggedness, but it cannot recover detail missing from the mesh. Re-export with finer tolerance, or export 3MF/STEP.
Repair tools and workflow
Start with the least invasive option. Most everyday errors disappear in the first step.
| Tool | What it does well | Notes (verify current status) |
|---|---|---|
| Slicer auto-repair (Bambu Studio, OrcaSlicer, PrusaSlicer, Cura) | Fixes holes and flipped normals on import; warns about errors | Convenient; cannot fix serious self-intersections |
| Windows 3D Builder | Simple one-click repair for beginners | Microsoft no longer actively develops it; may not be available on newer installs |
| Meshmixer | Inspector, hollowing, plane cuts, support editing | Autodesk stopped development; still used where installed, but use alternatives for new work |
| MeshLab | Free, powerful cleaning, decimation and filter scripting; reads scan formats | Technical interface; steep learning curve |
| Blender + 3D-Print Toolbox | Checks for non-manifold, thin walls, overhangs and intersections; full sculpting and remeshing | The add-on ships with Blender or is available as an extension, depending on version |
| Autodesk Netfabb | Professional repair and analysis | Commercial; some repair features also exist in other Autodesk products |
| Online repair services | Upload, repair, download; no install | Privacy: you upload your model to a third party; availability changes |
🔧 A manual repair recipe in Blender
- Import the model and set the scene unit scale to millimeters (see scaling and units).
- Enable the 3D-Print Toolbox. Run Check All: it reports non-manifold edges, intersections, thin walls and overhangs.
- In Edit Mode, select non-manifold geometry (Select → Select All by Trait → Non Manifold). Delete loose geometry, merge by distance (a tiny threshold such as 0.0001 m), and fill holes (F or Fill Holes).
- Recalculate normals outside (Shift+N).
- If overlapping shells remain, use a Boolean modifier (Union, Exact) to merge them, then apply it.
- Re-run the check, export as 3MF or STL, and load the result into the slicer for a final preview.
Boolean pitfalls
Boolean operations (union, difference, intersection) on meshes rely on clean surfaces. Common failure causes: coplanar faces (two faces lying exactly on the same plane), tiny gaps or overlaps between parts, non-manifold input and extremely thin slivers. The results are often missing faces or flickering "z-fighting" surfaces.
Decimation, remeshing and hollowing
Decimation
Decimation reduces the number of triangles while trying to keep the shape. Scans and sculpts routinely have millions of triangles, which makes slicing slow and files huge. Target a deviation of 0.01–0.05 mm from the original, and keep flat areas flat; most tools allow you to preserve boundaries and sharp edges. Remeshing goes further: it rebuilds the surface with evenly sized triangles, often required before Boolean operations or smoothing. Both operations can blur sharp edges and small text, so compare the result to the original.
Hollowing
Hollowing removes the interior of a solid model to save material, mostly for resin printing; FDM printers already print the interior as sparse infill, so hollowing is rarely useful for FDM unless you want an empty cavity (for example a lightweight shell or to insert weights or electronics). If you hollow, leave a wall of at least 2 mm, add drain or escape holes for resin, and verify the inner surface is also watertight.
Splitting and cutting with connectors
A model too large for the plate, or one with difficult overhangs, can be cut into parts that print flat and are joined afterwards. Good cuts follow natural seams (a collar, a sleeve edge), put flat faces on the plate and keep joints away from highly loaded areas. Slicers such as Bambu Studio and OrcaSlicer include a cut tool with connectors (pegs, dovetails) that create matching pins and sockets with adjustable clearance, so the parts self-align when glued.
Scaling and units mistakes
STL files carry no units. Slicers assume millimeters, while some CAD or game programs export inches, centimeters or meters. The result is a model that is the wrong size by a predictable factor.
| You see | Likely factor | Cause | Fix |
|---|---|---|---|
| Model is tiny (≈ 4 % of expected) | ÷ 25.4 | Exported in inches | Scale 2540 % |
| Model is 10× too small | ÷ 10 | Exported in centimeters | Scale 1000 % |
| Model is 1000× too small | ÷ 1000 | Exported in meters (Blender, glTF) | Scale 100000 %, or re-export with the correct unit setting |
| Model is huge | × 25.4 or × 1000 | Source in mm read as inches/meters | Scale down; fix the source export unit |
| Non-uniform stretch | One axis differs | Lock aspect ratio off or applied non-uniform scale in the source | Re-export; apply scale before exporting |
After import, check the object's dimensions in the slicer's object panel against a feature you know (a bolt hole, the overall height). Scaling the whole object also scales hole diameters and tolerances, so for functional parts correct the source file instead of enlarging in the slicer.
Model repositories and licensing
You rarely need to start from a blank screen. The main sources, each with its own audience and terms:
Printables
Run by Prusa Research; strong community, many functional designs, with contests and a clear license badge on each model.
MakerWorld
Run by Bambu Lab; integrated with Bambu Studio and Handy, with printer-specific profiles uploaded by authors and a points/rewards system.
Thingiverse
One of the oldest repositories (UltiMaker); huge archive, uneven quality and sometimes dated files.
Thangs
Geometric search across many sources plus its own hosting and a community.
Cults
Marketplace oriented toward designers, with a mix of free and paid models.
GrabCAD
Engineering-oriented library of CAD files, often in native or STEP format.
Site features, ownership and terms change; read the current terms of the site you use.
Licensing basics
| License | Meaning (summary) | Can you sell prints? | Can you remix and share? |
|---|---|---|---|
| CC0 / public domain | No rights reserved | Generally yes | Yes |
| CC BY | Credit the author | Usually yes, with credit | Yes, with credit |
| CC BY-SA | Credit + share derivatives under the same license | Usually yes, with credit | Yes, same license |
| CC BY-NC | Credit, non-commercial only | No (unless the author grants permission) | Yes, non-commercially |
| CC BY-ND | Credit, no modified versions shared | Depends on the commercial clause | Not for publication |
| Standard digital file / custom license | Site-specific terms; often personal use only | Check the terms | Check the terms |
Creative Commons licenses apply to the design file; they do not clear trademarks, characters or patents embedded in it. A "free" model of a copyrighted character may be an infringing upload. Whether a physical print counts as a derivative or a commercial use can depend on the exact license text and jurisdiction. If you intend to sell, read the license, the site's terms and, where it matters, ask the author in writing. See Economics, licensing & sustainability.
Checking printability
Analysis tools color-code the model so problems are visible before you print. Use them as a second set of eyes in addition to the slicer's layer preview.
Archiving and version control
Models are binary files that grow quickly, and plain Git stores every version in full. Git LFS (Large File Storage) keeps lightweight pointers in the repository and the large files on a separate server, which keeps cloning fast. Use Git for text sources (OpenSCAD, CadQuery, notes) and LFS for .3mf, .stl, .step.
# one-time setup in a repository
git lfs install
git lfs track "*.3mf" "*.stl" "*.step" "*.blend"
git add .gitattributes
git commit -m "Track model files with Git LFS"
Naming conventions
- Use lowercase, hyphens or underscores, and no spaces:
phone-stand_v3.3mf. - Put the part, revision and variant in the name:
bracket_40x30_t4_r2.step. - Add the printer or material only to sliced projects:
bracket_r2_x2d_petg.3mf. - Never overwrite a printed version; bump the revision so you can reproduce what you printed.
- Keep the date format ISO (
2025-03-14) when you need dates, so names sort correctly.
Metadata worth keeping
A short README.md or notes file beside each project pays off months later. Record: the purpose and source URL (and license) of any remix, the units and key dimensions, the printer and nozzle, the filament brand and temperatures that worked, settings that were changed from default and why, print time and weight, and a photo of the result. 3MF files also carry metadata fields (title, designer, license) that repositories can read; fill them in when you publish.
Troubleshooting file problems
Most "the slicer is doing something strange" reports trace back to the file, not the printer. Work through the symptoms below before changing print settings.
| Symptom | Likely cause | First thing to try |
|---|---|---|
| Model appears tiny or enormous | Unit mismatch (inches vs millimeters, or meters from a game or architecture tool) | Check the export unit setting; scale by 25.4 or 1000 in the slicer only as a last resort, then fix the source |
| Slicer warns "open edges" or "auto-repaired" | Non-manifold geometry, holes or flipped faces | Accept the repair, inspect the preview, and re-export from the source with a clean Boolean union if the shape changed |
| Parts of the model missing in the preview | Inverted normals, or thin features below the line width | Recalculate normals outward in a mesh tool; thicken the feature to at least one nozzle width |
| Surface looks faceted or like a polygon | Coarse tessellation at export | Lower the export deviation or angle tolerance and re-export; avoid re-importing a decimated mesh |
| File is huge and the slicer is slow | Over-dense mesh from a scan or sculpt | Decimate to a sensible triangle count while checking that small features survive |
| Colors or materials are lost | Format does not carry them (STL), or the importer ignores them | Use 3MF or OBJ with materials, and assign filaments in the slicer after import |
| Two bodies fused together unexpectedly | Overlapping shells interpreted as one solid | Separate them into objects, or keep a small gap and rely on a deliberate print-in-place clearance |
| Hole is smaller than designed | Polygonal approximation and plastic squish, not a file error | Apply hole compensation, or model holes slightly larger; see tolerances and fits |
Pre-slice checklist
- The file opens at the expected size, in the expected units.
- The slicer reports no errors, or the auto-repair result looks right in the preview.
- The smallest feature is at least one line width thick; ideally at least two for strength.
- The orientation puts the flattest, largest face on the bed, or follows the load direction (see strength and orientation).
- Overhangs beyond about 45–60° are supported or redesigned (see supports, bridges and overhangs).
- The source file and the exported file are named consistently with a version number.
Converting between formats
Converting is a one-way street in most cases: going from a rich format to a poorer one discards information, and going back does not restore it. The table summarizes what survives common conversions.
| From → to | What is kept | What is lost | Advice |
|---|---|---|---|
| STEP → STL | Shape, as a triangle approximation | Exact curves, features, units metadata, assembly structure | Choose the tessellation tolerance deliberately; keep the STEP |
| STEP → 3MF | Shape, units, optionally colors and multiple objects | Exact curves (the mesh is still triangles) | Preferred route for printing from CAD |
| STL → STEP | A faceted shell with thousands of tiny faces | Nothing was recovered; features are not rebuilt | Avoid, unless you have specialist reverse-engineering software |
| OBJ → STL | Geometry | Textures, vertex colors, material assignments | Fine for single-color prints |
| 3MF → STL | Geometry in world coordinates | Settings, colors, plates, modifiers | Use only for sharing a pure shape |
| SVG/DXF → solid | 2D outlines | Nothing; you add height by extruding in CAD | Check scale and units on import, and clean up tiny gaps in outlines |
| G-code → anything | Not recoverable as a model | The original geometry | Archive the 3MF or source model, not just the G-code |
If you need to change a part later, the file you keep must be the one you can edit: a native CAD file, a parametric script, or at least a STEP. STL and 3MF are what you send to the printer, not what you design in.
Meshes from scans and sculpts
Photogrammetry, structured-light and handheld 3D scanners produce dense, noisy meshes that often have holes where the scanner could not see (undercuts, shiny or dark surfaces). Sculpting tools produce high-polygon models with organic shapes but no real wall thickness. Both need cleanup before printing: fill holes, remove floating fragments, smooth noise, decimate to a manageable size, and give the object real thickness (offset or solidify the surface, or hollow it). Treat the cleanup as a small project in itself, and compare the result against the original object with calipers to be sure that dimensions were not altered by smoothing.
What the slicer does on import
A slicer reads the mesh, merges coincident vertices, checks for open edges, may apply automatic repair, and slices it into layers by intersecting the surface with horizontal planes. This explains several behaviors: tiny gaps smaller than the slicing resolution are closed, overlapping shells are merged or treated as a union, and extremely thin walls are either widened or dropped depending on the wall generator. A model that previews well and has a sound closed surface almost always slices well; if previews show odd gaps, the answer is in the mesh, not in the print profile. Details about each setting are in slicer settings.
Quick self-check
Which format is best as a long-term master file of an engineered part?
STEP preserves exact geometry; STL and G-code are lossy or machine-specific outputs.
A model appears solid in a viewer but vanishes in the slicer. A likely cause?
Slicers use normals and closed surfaces to decide what is inside; errors can make the part vanish.
Your Boolean subtract leaves a thin skin over the hole. How do you fix it?
Coincident faces confuse Boolean algorithms; overshoot the cutter.
Key takeaways
- Use 3MF for slicing and sharing, STEP for exact geometry, and treat STL as a throw-away export.
- A printable mesh is closed, manifold, has outward normals and walls thicker than a line width.
- Faceted curves come from coarse tessellation, not from the printer; re-export with finer tolerance.
- Repair in escalating steps: slicer, mesh tool, then rebuild the source.
- Check the license before you remix or sell, and record where each file came from.
- Keep text sources in Git and binaries in Git LFS, and name files with versions.
Next: G-code, firmware & ecosystem covers what the slicer produces from these files. Practice with Level 2 exercises.