Part 3 · Software

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.

IntermediateAdvanced⏱ 40 min read
What you will learn

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.

Exact solidsSTEP · IGES · Parasolidcurves are true curveseditable in CAD Vector outlinesSVG · DXF2D shapes, logos, laserextrude to make 3D tessellate extrude Triangle meshes STL: bare trianglesOBJ / PLY: + colors, UVsAMF: older XML mesh3MF: mesh + units, colors, materials, settings what slicers import slice Machine instructions .gcode: text commands.bgcode: binary, compact.gcode.3mf: G-code inside a 3MF package (Bambu) what the printer reads glTF / OBJ travel the display and game-asset route; they can be printed but are rarely ideal sources.
Figure 1. Where each format sits in the pipeline. Keep the exact version (STEP or native CAD) as the master and export meshes only for slicing.
FormatStoresUnitsColor / multi-materialBest forWatch out for
STL (.stl)Triangles only (binary or ASCII)None; assumed mmNoUniversal single-material exchangeNo units, no metadata, large files for fine curves
OBJ (.obj + .mtl)Triangles/polygons, normals, UVs, material namesNoneVia textures or material groupsSculpts, textured and colored modelsPolygons can be quads or n-gons; separate .mtl and texture files
3MF (.3mf)Mesh, units, build plate, colors, materials, thumbnails, slicer settingsYes (default mm)YesModern default for slicers; sharing projectsSlicer-specific extensions; settings may not transfer between brands
AMF (.amf)XML mesh with curved patches, colors, materialsYesYesLegacy; largely superseded by 3MFPoor software support today
STEP (.step/.stp)Exact B-rep geometry, assembliesYesLimitedCAD exchange and archivingNot directly printable in all slicers; tessellation settings matter
IGES (.igs)Older surface/curve exchangeYesNoLegacy CAD exchangeOften surfaces without a closed solid
Parasolid (.x_t/.x_b)Exact B-rep kernel formatYesNoSolidWorks, NX, Shapr3D exchangeProprietary kernel; fewer free tools
PLY (.ply)Points/triangles with vertex colorsNonePer-vertex color3D scans and photogrammetryUsually needs conversion and cleanup
glTF/GLBMeshes, materials, textures, animationMeters by conventionTexturesWeb, AR and game assetsMeters, not mm; can be non-manifold and non-solid
SVG / DXF2D vector pathsYes (DXF), varies (SVG)NoLogos, laser cutters, extrusionsNeeds closed, clean paths and correct scaling
G-code (.gcode)Printer commandsmmVia tool changesDirect printingPrinter-specific; not a model
The three-file habit

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.

Vertices · edges · faces vertex normal Each triangle has 3 vertices,3 edges and 1 normal. Closed (watertight) surface inside Normals point outward everywhere,so the slicer knows what is solid. Euler's check cube: V = 8 E = 12 (18 if triangulated) F = 6 (12 triangles)V − E + F = 2 For a closed surface without holesthe count is 2; many repair toolsuse it as a quick sanity check.
Figure 2. The building blocks of a mesh. Outward normals tell the slicer which side of a face is solid material.

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.

1 Hole (open boundary) missing faces; slicer seesan open skin 2 Non-manifold edge one edge shared by 3+ faces:no clear inside/outside 3 Self-intersection two shells overlap without aproper union; slicers maydisagree about the overlap 4 Inverted normals normals face inward solid looks hollow; partsvanish or print inside out 5 Walls too thin 0.2 mm 1.2 mm thinner than one line: skippedor printed fragile 6 Tiny shells stray fragments: wasted timeand stringy blobs
Figure 3. Six problems that confuse slicers. Most can be fixed automatically; non-manifold edges and self-intersections often need manual attention.
Symptom in the slicerLikely mesh causeFirst thing to try
"Object has errors" or auto-repair warningHoles, non-manifold edges, inverted normalsAccept the slicer's repair, then check the preview
Part missing in preview or layers emptyFlipped normals or open shellRecalculate outside normals; close holes
Random gaps or lines inside wallsSelf-intersections or overlapping shellsBoolean union in a mesh tool or CAD; remove duplicates
Thin walls vanishWalls under line widthThicken in CAD or enable thin-wall detection
Specks and blobs outside the partTiny stray shellsDelete tiny components in a mesh editor
Huge slicing time or stutterMillions of trianglesDecimate (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.

8 segments16 segments64 segments deviationvisible flats, fast to slice good for decorative parts smooth; larger file Rule of thumb: chord deviation 0.01–0.05 mm is below what most FDM printers can resolve; finer just inflates file size.
Figure 4. Tessellation. The number of segments needed to keep the deviation below a target grows with the radius, so large round parts need more triangles than small ones.
Why curves look faceted even at 0.1 mm layers

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.

1 · Slicer auto-repaircloses tiny holes, flipsnormals, removes sliversseconds · always try first 2 · Mesh toolMeshLab, Blender, Netfabb,online repair servicesminutes · for stubborn meshes 3 · Rebuildremodel the problem areain CAD, or remesh and sculpthours · when repair keeps failing Always keep the original file; repairs change geometry, and sometimes in ways you do not want.
Figure 5. Escalate only as far as needed. If repair fails repeatedly, the problem is usually the way the model was built, so fix the source.
ToolWhat it does wellNotes (verify current status)
Slicer auto-repair (Bambu Studio, OrcaSlicer, PrusaSlicer, Cura)Fixes holes and flipped normals on import; warns about errorsConvenient; cannot fix serious self-intersections
Windows 3D BuilderSimple one-click repair for beginnersMicrosoft no longer actively develops it; may not be available on newer installs
MeshmixerInspector, hollowing, plane cuts, support editingAutodesk stopped development; still used where installed, but use alternatives for new work
MeshLabFree, powerful cleaning, decimation and filter scripting; reads scan formatsTechnical interface; steep learning curve
Blender + 3D-Print ToolboxChecks for non-manifold, thin walls, overhangs and intersections; full sculpting and remeshingThe add-on ships with Blender or is available as an extension, depending on version
Autodesk NetfabbProfessional repair and analysisCommercial; some repair features also exist in other Autodesk products
Online repair servicesUpload, repair, download; no installPrivacy: you upload your model to a third party; availability changes
🔧 A manual repair recipe in Blender
  1. Import the model and set the scene unit scale to millimeters (see scaling and units).
  2. Enable the 3D-Print Toolbox. Run Check All: it reports non-manifold edges, intersections, thin walls and overhangs.
  3. 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).
  4. Recalculate normals outside (Shift+N).
  5. If overlapping shells remain, use a Boolean modifier (Union, Exact) to merge them, then apply it.
  6. 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.

Coplanar cutter: ambiguousOvershoot cutter: clean faces coincide: skin or hole? The cutter's top face sits exactly on the surface. overshoot 0.1–1 mm Extend the cutter beyond every face it should pass through. Also: avoid zero-thickness walls, keep unions overlapping by a small amount, and run the Boolean in CAD rather than on a dense mesh.
Figure 6. Classic Boolean trap: coincident faces. Overshoot cutters and overlap joined parts to give the algorithm unambiguous geometry.

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.

Original: denseDecimatedRemeshed 2 M triangles 200 k triangles, similar shape uniform triangles, new topology Too much decimation shows as faceting and lost fine text; check silhouettes and sharp edges after every pass.
Figure 7. Decimation reduces triangle count; remeshing redistributes it. Both are useful for scans, but use them sparingly on engineered parts.

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.

1 Cut on a flat plane2 Pegs and sockets3 Glue and finish flat cut face on the plate peg ≈ 0.2–0.3 mm smaller than socket glue line; sand and fill if visible
Figure 8. Splitting with alignment connectors. A clearance of about 0.2–0.3 mm between pin and socket is a common starting point; tune it with a test print.

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 seeLikely factorCauseFix
Model is tiny (≈ 4 % of expected)÷ 25.4Exported in inchesScale 2540 %
Model is 10× too small÷ 10Exported in centimetersScale 1000 %
Model is 1000× too small÷ 1000Exported in meters (Blender, glTF)Scale 100000 %, or re-export with the correct unit setting
Model is huge× 25.4 or × 1000Source in mm read as inches/metersScale down; fix the source export unit
Non-uniform stretchOne axis differsLock aspect ratio off or applied non-uniform scale in the sourceRe-export; apply scale before exporting
Measure once in the slicer

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

LicenseMeaning (summary)Can you sell prints?Can you remix and share?
CC0 / public domainNo rights reservedGenerally yesYes
CC BYCredit the authorUsually yes, with creditYes, with credit
CC BY-SACredit + share derivatives under the same licenseUsually yes, with creditYes, same license
CC BY-NCCredit, non-commercial onlyNo (unless the author grants permission)Yes, non-commercially
CC BY-NDCredit, no modified versions sharedDepends on the commercial clauseNot for publication
Standard digital file / custom licenseSite-specific terms; often personal use onlyCheck the termsCheck the terms
Careful and general, not legal advice

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.

Overhang analysisWall thickness analysis flat ceiling: supportself-supporting steeper than about 45° from vertical is risky 3 mm1.2 mm0.3 mm Aim for ≥ 2 nozzle widths where strength matters
Figure 9. Overhang and wall-thickness analysis. Blender's 3D-Print Toolbox, some slicers and CAD packages show these overlays.

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.

bracket-v2/ ├─ src/ bracket.py · params.json ├─ cad/ bracket.f3d / .step ├─ export/ bracket.3mf · bracket.stl ├─ slicer/ project.3mf · profiles/ ├─ docs/ README.md · notes.md └─ photos/ test-print.jpg One folder per project; name with a version. Git (text).py · .scad · .json.md · .gitignorefull history, diffssmall and fast Git LFS (binary).3mf · .stl · .step.f3d · .blend · imagespointer in repo,file on LFS server
Figure 10. A tidy project folder and where each type of file belongs. Many hosting services have an LFS quota, so check limits before storing gigabytes.
# 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

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.

SymptomLikely causeFirst thing to try
Model appears tiny or enormousUnit 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 facesAccept 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 previewInverted normals, or thin features below the line widthRecalculate normals outward in a mesh tool; thicken the feature to at least one nozzle width
Surface looks faceted or like a polygonCoarse tessellation at exportLower the export deviation or angle tolerance and re-export; avoid re-importing a decimated mesh
File is huge and the slicer is slowOver-dense mesh from a scan or sculptDecimate to a sensible triangle count while checking that small features survive
Colors or materials are lostFormat does not carry them (STL), or the importer ignores themUse 3MF or OBJ with materials, and assign filaments in the slicer after import
Two bodies fused together unexpectedlyOverlapping shells interpreted as one solidSeparate them into objects, or keep a small gap and rely on a deliberate print-in-place clearance
Hole is smaller than designedPolygonal approximation and plastic squish, not a file errorApply hole compensation, or model holes slightly larger; see tolerances and fits

Pre-slice checklist

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 → toWhat is keptWhat is lostAdvice
STEP → STLShape, as a triangle approximationExact curves, features, units metadata, assembly structureChoose the tessellation tolerance deliberately; keep the STEP
STEP → 3MFShape, units, optionally colors and multiple objectsExact curves (the mesh is still triangles)Preferred route for printing from CAD
STL → STEPA faceted shell with thousands of tiny facesNothing was recovered; features are not rebuiltAvoid, unless you have specialist reverse-engineering software
OBJ → STLGeometryTextures, vertex colors, material assignmentsFine for single-color prints
3MF → STLGeometry in world coordinatesSettings, colors, plates, modifiersUse only for sharing a pure shape
SVG/DXF → solid2D outlinesNothing; you add height by extruding in CADCheck scale and units on import, and clean up tiny gaps in outlines
G-code → anythingNot recoverable as a modelThe original geometryArchive the 3MF or source model, not just the G-code
Round-trip rule

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

Next: G-code, firmware & ecosystem covers what the slicer produces from these files. Practice with Level 2 exercises.