How the 3D Model Converter Works
There are two kinds of 3D file. Exact (B-rep) files such as STEP describe the true surfaces: a hole is a real cylinder with a radius. Mesh files such as STL, OBJ, 3MF, PLY, GLB and OFF describe the outside as flat triangles. Going from exact to mesh is easy and loses a little accuracy; going from mesh to exact cannot bring the true curves back.
The converter is written in Rust and compiled to WebAssembly. It runs in a background worker in your browser, so big files do not freeze the page, and you can cancel at any time. It reads the file, converts everything to millimetres, applies your options, checks the mesh and writes the format you choose.
The Formats
| Format | Kind | Units | Colours and bodies | Best for |
|---|---|---|---|---|
| STEP (.step, .stp) | Exact B-rep | Stated in the file | Colours, assemblies | Swapping parts between CAD programs (Fusion, SolidWorks, FreeCAD, Onshape) |
| STL | Triangles only | None (bare numbers) | One mesh (ASCII can hold several) | 3D printing and CAM; every slicer reads it |
| 3MF | Triangles, zipped XML | Stated (we write mm) | Several objects and their placement | PrusaSlicer, Cura, Bambu Studio and OrcaSlicer; smaller than STL and keeps units |
| OBJ | Polygons | None | Groups; vertex colours (extension) | Blender, rendering, older software |
| GLB (glTF binary) | Triangles | Metres, +Y up | Meshes, node transforms, vertex colours | Web viewers, AR, game engines |
| PLY | Polygons | None | Vertex colours | 3D scans, MeshLab, CloudCompare |
| OFF | Polygons | None | Optional colours | Geometry research tools |
The Method
STEP to STL: Why the Exact Geometry Is Lost
A STEP hole is a perfect cylinder. STL can only hold flat triangles, so the converter tessellates every face with truck: curved faces are cut into triangles whose corners sit on the true surface. Two settings decide how fine:
- Chord tolerance: the largest gap between a triangle and the true surface. 0.02 mm is below what an FDM printer or most CNC finishing passes can show.
- Angle: the largest turn of a curve across one triangle. The converter applies it by tightening the chord tolerance to r × (1 − cos(θ/2)) for the smallest radius in each body, so small holes and fillets stay round.
Flat faces are triangulated exactly from their edges. Halving the tolerance roughly doubles the triangles on curves and makes the file bigger without making a printed part any better.
STL to STEP: Why the Result Is Faceted
An STL does not know that 48 thin triangles were once a hole. The converter builds a real STEP solid (a closed B-rep shell, AP214, millimetres) by merging triangles that are truly coplanar into one flat face, so a block or bracket gets clean flat faces you can select and measure in CAD. Curved surfaces stay as many small flats. It is not the original CAD model: you cannot pick a hole's diameter or edit a fillet. To keep the STEP small, meshes over 50,000 triangles are refused; simplify them first. A mesh that is not watertight is written as surfaces rather than a solid.
Worked Examples
- Default settings (0.02 mm, 15°) give 9,144 triangles: 3,790 for the block and 5,354 for the pin.
- Block volume: 32,990.7 mm³ against the exact 60 × 40 × 15 − π × 8² × 15 = 32,984.1 mm³ (+0.02 %, because the faceted hole is slightly smaller than the true one). Pin: 7,845.4 mm³ against π × 10² × 25 = 7,854.0 mm³ (−0.11 %).
- Both bodies are watertight. The binary STL is 84 + 50 × 9,144 = 457,284 bytes; the 3MF of the same mesh is far smaller because it shares vertices and is zipped.
- A 1 × 1 × 1 cube exported from inch CAD as STL: 12 triangles, 36 corners. Read as millimetres it is a 1 mm cube, so set Source is in to inches.
- Size becomes 25.4 × 25.4 × 25.4 mm, volume 16,387.064 mm³ (1 in³), and merging vertices leaves 8 vertices.
- STEP output merges each pair of coplanar triangles: 6 planar faces in 1 solid, with 12 edges and 8 vertices, which CAD opens as a closed solid.
Which Format to Use
- PrusaSlicer, Cura, Bambu Studio, OrcaSlicer: 3MF (keeps units and several parts) or STL. To estimate print time and filament, try the STL print estimator.
- Fusion, SolidWorks, FreeCAD, Onshape: STEP from the original CAD whenever you can get it. A faceted STEP from a mesh is a last resort. Look inside a STEP with the STEP file viewer.
- CAM for a CNC router or mill: STEP for 2.5D work; STL for 3D relief and surfacing.
- Blender and rendering: OBJ or GLB. Web, AR and game engines: GLB.
- More on the differences in STEP vs STL vs DXF.
Tips for Using the Results
- Check the size first. A part 25.4 times too small or too big is a unit mix-up; a part 1,000 times off is mm versus metres.
- Volume needs a watertight mesh. If there are open edges, the volume shown is not reliable; repair the model in the CAD or a mesh tool first.
- "On the bed" centres the part in X and Y and sets the lowest point to Z = 0, which helps CAM and slicers that do not auto-place.
- Fix flipped normals makes the triangles on each connected part agree with their neighbours, then turns closed parts outward. It cannot close holes.
Frequently Asked Questions
Limits
Files up to 300 MB and 20 million triangles. GLB must be self-contained (no external buffers) and without Draco or meshopt compression; text .gltf is not read. OBJ materials and textures, texture coordinates and normals are not carried over; vertex colours are. 3MF output carries geometry only (no colours or print settings). STEP output is faceted and limited to 50,000 triangles. Some STEP files have small gaps where the reader's tessellation of neighbouring faces does not match; the check shows them as open edges.
Open-Source Credits
Built in Rust with truck (truck-stepio, truck-modeling, truck-meshalgo; Apache-2.0) and ruststep (Apache-2.0) for STEP, zip (MIT) with flate2 and miniz_oxide (MIT/Apache-2.0) for 3MF and zip files, earcutr (ISC) for flat faces, serde and serde_json (MIT/Apache-2.0), and wasm-bindgen (MIT/Apache-2.0). The preview uses three.js (MIT).