Skip to content

DXF units: mm or inch, and why parts come in 25.4× too big or too small

A part that comes in 25.4 times too large or too small was read in the wrong unit: drawn in inches and read as mm, or the reverse. A DXF stores bare numbers and its only unit flag, $INSUNITS, is often 0 (unitless) or missing — so check the overall size of every imported part before you nest or quote it.

5 min lugemist · Uuendatud · Zorocuti meeskonnalt

See juhend on praegu inglise keeles: sa loed ingliskeelset originaali.

Sammud
  1. Look at the part's overall size right after import
  2. If it is 25.4× off, set the units by hand (mm or inch) and check the size again
  3. Fix the source: export the DXF again with its unit set, or ask the customer which unit they drew in

What the file actually says

Every coordinate in a DXF is a plain number. The header variable $INSUNITS names the unit: 0 = unitless, 1 = inches, 2 = feet, 4 = millimetres, 5 = centimetres, 6 = metres. Autodesk's own reference describes it as the default unit for DesignCenter blocks — weaker than “the unit of the drawing” — and many exporters leave it at 0 or do not write it at all.

  • $MEASUREMENT (0 = imperial, 1 = metric) only picks hatch and linetype files; it says nothing about the coordinates.
  • $LUNITS is the display format (decimal, architectural…), not a scale.
  • Blocks are not converted either: only an INSERT's own scale factor changes their size.

The 25.4 test

A 100 mm bracket drawn in mm but read as inches becomes 2540 mm long — longer than a 1250 × 2500 mm sheet. A 4 in plate drawn in inches but read as mm becomes 4 mm — a speck. The error is obvious if you look at the size and invisible if you only look at the shape. It is also the costliest quoting mistake: cut length is off by 25.4× and area by about 645×, and the price follows both.

How Zorocut reads the units

  • If $INSUNITS is set (inches, feet, mm, cm, m…), Zorocut uses it and says so: “Read as mm — the file says so”.
  • If it is 0 or missing, Zorocut guesses: a drawing no larger than 120 units whose points lie mostly on a 1/16 grid (…0.5, …0.25, …0.0625) is read as inches, anything else as mm. The pre-cut check then shows “Units guessed”, so you look at the size.
  • You can override it per part (Units: From file / mm / inch) in Zorocut Nest, and the DXF checker shows every part's size and flags a guessed unit.

Files from Inkscape and SVG

Inkscape writes $INSUNITS from the document unit, and a document in px is written as 0 (unitless) at 96 px per inch. Such a file arrives with numbers 3.78 times larger than millimetres (96 ÷ 25.4). For SVG files Zorocut reads the width, height and viewBox; without a size in mm it takes one unit as 1/96 inch (1/72 inch for Adobe Illustrator files) and warns you to check the part sizes.

Fix it at the source

  1. AutoCAD: set the INSUNITS variable to 4 (mm) or 1 (inch) before you save the DXF.
  2. Fusion, SolidWorks and Inkscape: set the document or export unit to mm before exporting.
  3. When a customer sends a unitless file, ask “mm or inch?” and write the answer on the quote.

Allikad

  1. Autodesk, AutoCAD 2012 DXF Reference ($INSUNITS, OCS, entities)
  2. ezdxf documentation, DXF Units
  3. Inkscape extensions, DXF outlines exporter (dxf_outlines.py)

Oled millegi muuga hädas? Küsi — Zorocuti meeskond vastab igale küsimusele.

Esita küsimus

Paigutuse ja hinnapakkumise nõuanded sinu postkasti

Umbes üks e-kiri kuus: paigutuse ja hinnapakkumise nõuanded, lahendused probleemidele, mille kohta kogukonnas küsitakse, ning Zorocuti uudised.

Umbes üks e-kiri kuus uute lõikamis- ja hinnapakkumisjuhendite, videote ja Zorocuti uudistega. Saadame sulle esmalt kinnituslingi ja tellimuse saad igal ajal lõpetada. Privaatsuspoliitika

Paiguta ja hinda see Zorocutis

Nende juhendite vahereegel, ühikukontroll, algkiirused ja pakkumisvalem on sisse ehitatud Zorocut Nesti ja tasuta veebipaigutajasse. Sinu DXF-failid jäävad sinu arvutisse.