Why a STEP model comes out 25.4× too big
The unit and size dimension, decided before you convert rather than after. Every number on this page was measured with the engine this site ships, and npm test re-runs each one and fails on a mismatch.
The short answer: a conversion can be completely correct and still hand you a model 25.4× the size you expected, because the number that doubled was never in the file to begin with. 25.4 is exactly the number of millimetres in an inch, so a unit error is never approximate — it announces itself as a clean factor. The one move that settles it is a division: take the reported bounding box, divide each axis by 25.4, and see whether the results are whole numbers.
- A factor of exactly 25.4 means the unit, not the conversion. The file was drawn in inches and read as millimetres. Nothing about the mesh is broken.
- Divide the bounding box by 25.4. Whole inches on all three axes means the part was laid out in inches. Our AP203 assembly divides into exactly 200 × 87 × 150.
- Read the unit the file declares. It sits near the top under
GLOBAL_UNIT_ASSIGNED_CONTEXT, and it — not the extension, not the file name — sets the scale of every number after it. - Check that number against the size you know. Nothing is rescaled on the way out, so a size you did not expect was already in the file before it reached the converter.
Read this part first: the two numbers to check
Before you convert, open the file in a text editor and look for one block near the top. A STEP file states its own length unit in a context that begins with GLOBAL_UNIT_ASSIGNED_CONTEXT. It will name something like SI_UNIT(.MILLI.,.METRE.) for millimetres, or a CONVERSION_BASED_UNIT with 'INCH' in it for inches. That single declaration sets the scale of every coordinate that follows it.
Then convert once and take the bounding box the page reports. Divide each axis by 25.4. Whole numbers on all three axes is the fingerprint of a part designed in inches. Fractional results mean it was designed in millimetres and is fine.
| Where the unit lives | Inside the file, near the top, under GLOBAL_UNIT_ASSIGNED_CONTEXT. It outranks the file extension and the file name. |
|---|---|
| Why 25.4 | It is exactly the number of millimetres in an inch. That is why unit errors are always a clean factor and never a vague drift. |
| The whole-inch test | Divide each axis of the bounding box by 25.4. All three whole means an inch-designed part; any fractional axis means millimetres. |
| If the size is wrong anyway | Any ratio other than a clean 25.4 is a modelling question, not a unit one — and the verification page has the checks for that case. |
The whole-inch test, on two real files
This is the measurement we did not expect. We took two assembly files that both declare millimetres, converted both with the same engine at the same setting, and divided each reported bounding box by 25.4. One divides into whole inches on all three axes. The other does not divide cleanly at all.
| Test file | Bounding box (mm) | ÷ 25.4 | Whole inches? |
|---|---|---|---|
| as1_pe_203.stp (AP203, 18 parts) | 5080 × 2209.8 × 3810 | 200 × 87 × 150 | Yes, all three axes |
| as1-oc-214.stp (AP214, 18 parts) | 200 × 150 × 84 | 7.874 × 5.906 × 3.307 | No |
The AP203 file is the interesting one. Its box is 5080 × 2209.8 × 3810 millimetres, and those three numbers divide into 200 × 87 × 150 inches — each axis landing on a whole inch with a remainder below 1×10−13 of an inch, which is floating-point noise rather than a real fraction. A part laid out on whole-inch dimensions does that. A part laid out in millimetres essentially never does, on all three axes at once.
The AP214 file is the control that keeps this honest. It reports 200 × 150 × 84 mm, which divides into 7.874 × 5.906 × 3.307 inches — not whole numbers, because it was designed in millimetres. Both files declare millimetres. Both are 18-part assemblies. Same engine, same setting, same session. The declaration inside the file tells you what the file claims to be; dividing the bounding box by 25.4 tells you what the part actually was built as.
What this test is worth: one division, no tools, no second application. If your part is the wrong size and the box divides into whole inches, you have found the cause before trusting any output, and you know the fix belongs in your CAD tool’s export settings rather than in the converter.
How far the test actually holds — and where it stops
An honest limit, because it matters if you plan to rely on this. The AP203 file’s bounding box lands on whole inches, but its vertices mostly do not. Of the file’s 54,792 coordinate values, 21,300 are whole inches and 33,492 are not, sitting up to half an inch from the nearest whole inch. So read the test as a statement about the size of the part, not a claim about every vertex in it.
That is not a weakness, it is the right scope for the question. The bounding box is the extremes of the part on each axis, and the extremes are what a designer sets deliberately, on round numbers. The vertices between those extremes land wherever the geometry puts them. A test that only holds for the extremes is still enough to tell you which unit the part was drawn in, because a millimetre part does not land on whole inches three times out of three.
A unit error is a clean factor; a size error is any other factor
Dividing by 25.4 answers one question — whether the part was laid out in inches — but it does not yet say whether the fault is a unit at all. The two faults separate on a single number: a unit error lands on an exact conversion factor, and a size error lands on anything else. Inches give 25.4, centimetres give 10, metres give 1,000. No unit in use turns a length into some arbitrary multiple of itself, so a ratio that is not one of those is not a unit story.
The cleanest way to see it is one cube written twice. Below are two STEP files holding the same 1,000 mm cube — 28 points each, the same 12 triangles out, the same 684 bytes out — where one stores its coordinates in millimetres and the other stores them in inches and declares which.
| File | Declared unit | Largest coordinate stored | Measured box (mm) | Triangles | Binary STL |
|---|---|---|---|---|---|
| cube-mm.step | SI_UNIT(.MILLI.,.METRE.) | 1000 | 1000 × 1000 × 1000 | 12 | 684 B |
| cube-in.step | CONVERSION_BASED_UNIT('INCH') | 39.370078740157 | 1000 × 1000 × 1000 | 12 | 684 B |
Those two stored numbers are the whole story. 1000 ÷ 39.370078740157 = 25.4000000000003, and going back the other way, 39.370078740157 × 25.4 = 999.9999999999877 mm — 1.2×10−11 below 1,000, which is the price of writing the number to twelve decimals rather than a modelling difference. Both files measure 1000 × 1000 × 1000 mm, because the engine applies the declaration before it reports anything. Both also come out at 12 triangles and 684 bytes, which is the binary-STL identity 84 + 50 × 12 — re-expressing a coordinate changes no triangle and no byte.
Now read the same two numbers as a reader that ignored the declaration. The inch file would report a box of 39.37 mm instead of 1,000 — exactly 25.4× too small, with nothing else changed, because 39.370078740157 stays 39.370078740157 once nothing rescales it. That is what a unit error looks like from the other side, and it is why the test works in both directions: the factor is always a unit, never a vague drift.
What a size error looks like instead
A size that is wrong without being a clean unit factor is a modelling or tessellation question, and this page has a measured example of it already. The IGES flange above reads 198.54 mm at Draft against its 200 mm nominal on the curved axis — 0.9927 of the nominal, 0.73% short — and that shortfall follows the preset and never the declaration. Dividing the output by 25.4 would not close a 1.5 mm gap, because no unit is involved in it. Fix the preset or the geometry, not the unit.
How do I tell a unit error from a part that is simply the wrong size? Divide the size you got by the size you expected. A unit error is a clean conversion factor: 25.4 for inches, 10 for centimetres, 1,000 for metres. Nothing else moves. Our two copies of one 1,000 mm cube report the same box, 12 triangles and 684 bytes whether the file stores 1000 or 39.370078740157. Any other ratio, such as 0.9927, means the geometry or the tessellation is a different size, so treat it as a modelling question rather than a unit one.
npm test
The command above re-reads both cube files, re-measures both boxes, and re-checks every figure in the table, including the two stored literals and the 25.4 division between them.
Where to take the two faults next: the verification page owns the check that catches a unit mismatch in a finished STL, the triangle-budget page covers what a quality preset does to a mesh, and the STEP vs STL page covers which of the two formats carries a unit declaration at all.
What the inch option does, and does not do
The converter can write the numbers in inches, and the useful thing to know is what that actually changes. It divides the coordinate values by 25.4 on the way out and touches nothing else. The workflow page covers the control that proves the mesh is untouched; here is what the same operation does to the one file this page is about.
Take the first vertex of the AP203 assembly. Its coordinates are −3556, −508, −1905 mm. Divided by 25.4 they become −140, −20, −75 — three whole numbers, exactly, with nothing left over. That is the same fact the bounding box tells you, seen from one vertex instead of three: this part was laid out on whole-inch values, and the numbers still say so after you divide.
What does not change is the mesh. The triangle count stays at 6,088 and the binary file stays at 304,484 bytes, because a binary STL is 84 bytes of header plus 50 bytes per triangle and every one of those bytes is a coordinate. Re-expressing a number is not a change of shape, so no triangle appears or disappears.
| Input | as1_pe_203.stp, 18 parts, declaring millimetres, 6,088 triangles at Normal. |
|---|---|
| First vertex, out in mm | −3556, −508, −1905. |
| First vertex, out in inch | −140, −20, −75. Three whole numbers. |
| What stayed the same | 6,088 triangles, 304,484 bytes. Only the coordinate values changed. |
Note what that means for the file you download: a binary STL has no unit field at all. The unit you choose is a promise about the numbers, not a label inside the file, so it is worth writing down alongside the download.
Millimetres remain the default. The unit declared inside your STEP file is applied before any number is reported, so whichever you choose, the numbers describe the same physical object.
If the number is wrong, here is the order to fix it in
- Divide the bounding box by 25.4. Whole inches on all three axes means an inch-designed part, and the converter reported it correctly.
- Read the unit declaration in the file. If it says
SI_UNIT(.MILLI.,.METRE.)but the box divides into whole inches, the part was drawn in inches and exported as millimetres. That is a CAD-side export setting, and it is worth fixing there rather than patching the output. - Decide which number your downstream tool expects. A slicer expecting millimetres wants the default output. One expecting inches wants the inch option, which divides the coordinates by 25.4 and leaves the mesh identical.
- Do not scale the model to compensate. A bigger model is not a more detailed one; the workflow page has the measurement, at three quality settings, showing the triangle count does not move.
- Check the result against the size you know. The verification page has the bounding-box check alongside the four that need a file size and an edge count.
If you would rather not read the unit declaration by hand, convert once and read the bounding box the page reports — the whole-inch test needs nothing but that number and a calculator.
Size and orientation are separate faults. If the three axes are the right size but the part faces the wrong way, the unit was read correctly and the frame came from the source file; the orientation and origin page shows why no conversion setting can turn it.
The same question in IGES, where the declaration sits somewhere else
A STEP file names its unit in a context you can search for. An IGES file has no such block: it carries the same information in its global section, as a unit flag plus a unit-name string. So the useful question is not whether the format has a unit field — both do — but whether that field actually reaches the number you read off the screen. We tested it with four copies of one part.
The part is a DN80 PN16 flange measuring 200 × 200 × 20 mm. It exists four times, with its coordinates written in millimetres, centimetres, metres and inches, each file declaring the unit it was written in. The same engine, at each of its three presets, converted all four.
| Declared unit | Coordinates as written | Measured box (mm) | Triangles, Draft / Normal / Fine |
|---|---|---|---|
| millimetre | 200 wide | 200 × 200 × 20 | 1,072 / 1,712 / 5,072 |
| centimetre | 20 wide | 200 × 200 × 20 | 1,072 / 1,712 / 5,072 |
| metre | 0.2 wide | 200 × 200 × 20 | 1,072 / 1,712 / 5,072 |
| inch | 7.874016 wide | 200 × 200 × 20 | 1,072 / 1,712 / 5,072 |
Four different coordinate ranges, one box. The declaration is the only thing that changed, and it is the reason all four land on the same 200 × 200 × 20 mm. What does not follow the declaration is the mesh: the triangle counts are 1,072 at Draft, 1,712 at Normal and 5,072 at Fine, identical for all four copies, because the curvature of a part does not change when you re-express its coordinates. By the binary-STL identity (84 + 50 × triangles) those three counts fix the output at 53,684 / 85,684 / 253,684 bytes — three figures calculated from the triangle counts, not separately measured.
One number on this flange does move between the four — and it is the one that looks like a unit error and is not. The part has a curved cross-section, so the mesh cuts the curve into chords, and a chord sits inside the true surface. Measured across that axis, the box reads 198.54 mm at Draft, 199.44 mm at Normal and 199.94 mm at Fine. All four declarations give those same three numbers. The shortfall follows the preset, never the declaration. If you were looking for a symptom of a misread unit, this is the number to rule out first: it is the tessellation's own error budget, and it is the same at every unit.
What this does and does not prove
It proves that this engine applies the declaration in these four files, and nothing wider. It is not a claim that every IGES file in circulation declares its unit correctly, or that every exporter writes the field the same way — the record format packs the global section into fixed 72-column lines, so a long unit name can be split across the line boundary, and a reader that does not join the lines back together will miss it. Our own reader handles that split and is tested on it. Where the declared unit is applied in the full procedure, in order, is on the workflow page.
Nor is a missing declaration a licence to guess. When an IGES file names no unit at all, the label the page shows stays unknown, and the output is written as millimetres — that is this site’s own choice, not a CAD standard. Your step, before trusting the numbers, is the same as with STEP: convert once, read the bounding box, and compare it with the size you know. A factor of exactly 10, 1,000 or 25.4 between the two is the declaration, not the conversion.
The verification page carries the checks for a finished STL, and the workflow page covers where units sit in the order of a conversion. This section is only the IGES half of the ruler this page is about.
The whole thing on one screen
| The 25.4 factor | Exactly the millimetres in an inch. A clean factor of 25.4 is a unit mismatch, not a bad conversion. |
|---|---|
| Whole-inch test | 5080 × 2209.8 × 3810 mm ÷ 25.4 = 200 × 87 × 150, all whole. The control, 200 × 150 × 84 mm, gives 7.874 × 5.906 × 3.307, none whole. |
| Where the limit is | The bounding box only. 21,300 of the AP203 file’s 54,792 coordinate values are whole inches; 33,492 are not. |
| Inch option | Coordinates ÷ 25.4 and nothing else. 6,088 triangles and 304,484 bytes either way. |
| Where the unit is declared | Near the top of the file, under GLOBAL_UNIT_ASSIGNED_CONTEXT. It outranks the extension and the file name. |
Where these numbers come from
Published · Last updated
- The two bounding boxes and the whole-inch division — produced by running the shipped engine (occt-import-js 0.0.23, a WebAssembly build of OpenCASCADE) in Node.js over the project’s own test files on this machine.
npm testre-runs both conversions, divides the measured boxes by 25.4 itself, and asserts that the three AP203 axes land within 1×10−12 of a whole inch while none of the AP214 axes do. - 25.4 itself — the exact number of millimetres in an inch, which is why the factor is clean rather than approximate.
- The two cube files — one 1,000 mm cube written twice, in millimetres (
cube-mm.step) and in inches (cube-in.step), each declaring its own unit. The suite re-reads both sources, checks the stored literals 1000 and 39.370078740157, divides them to confirm the 25.4 ratio, and re-measures both outputs: the same 1000 × 1000 × 1000 mm box, 12 triangles and 684 bytes each. - 21,300 of 54,792, and 33,492 that are not — counted by taking every coordinate value the engine emits for the AP203 file at Normal, dividing each by 25.4, and testing how far it sits from the nearest whole inch. The test recomputes both counts and fails on a mismatch, and it also asserts that the worst case sits within half an inch of a whole number.
- The inch option’s behaviour — measured by running the shipped converter’s own writers: the coordinate values are divided by 25.4 and the binary STL is written again, then the byte lengths are compared. Because the record size is fixed at 50 bytes per triangle, an unchanged byte length is an unchanged triangle count. The first-vertex figures are read off the same run.
- What we do not claim — the whole-inch test tells you the size a part was laid out at. It does not tell you who exported the file, which tool it came from, or whether the designer intended those dimensions. We do not pretend the 33,492 non-whole vertices are anything other than what they are.
- The four IGES declarations — one DN80 PN16 flange written four times, in millimetres, centimetres, metres and inches, each copy declaring its own unit in the IGES global section. The shipped engine converts all four at Draft, Normal and Fine; the test asserts that every copy measures the same 200 × 200 × 20 mm box, that the three triangle counts are identical across all four, and that the byte figures are the 84 + 50 × triangles identity applied to those counts rather than separate measurements. The same test feeds two unit names split across the 72-column record boundary and one file with no unit name at all, which must stay
unknown. - We do not publish the test files — they live in a development folder that is never deployed, so nothing on this site asks you to trust a file you cannot inspect. The check you can run yourself needs no file at all: convert your own STEP or IGES, divide the reported bounding box by 25.4, and see whether the numbers are whole.
The workflow page covers the conversion in the order it happens, including the proof that the unit a file declares is honoured and the per-setting quality numbers. The verification page covers the six checks you run on a finished STL. This page is the one dimension that settles the numbers before any of that: units and size. Every byte and triangle count quoted on this page belongs to the measured table on the front page, re-run by npm test.
Sponsored link: Creality’s official store (3D printers, scanners, filament and parts) is an affiliate partner — clicking it may earn this site a commission. It changes nothing about the converter; see what sponsored links mean here.
Convert a file now: STEP to STL converter for STEP, STP, IGES and IGS, or 3MF to STL converter for 3MF. Both run in the browser and upload nothing.