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 นาทีในการอ่าน · อัปเดต · โดยทีม Zorocut

คู่มือนี้ยังไม่ได้แปล: ตอนนี้คุณกำลังอ่านต้นฉบับภาษาอังกฤษ

ขั้นตอน
  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.

แหล่งที่มา

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

ติดปัญหาเรื่องอื่น? ถามได้เลย — ทีม Zorocut ตอบทุกคำถาม

ตั้งคำถาม

เคล็ดลับการจัดวางและเสนอราคาส่งถึงกล่องจดหมายของคุณ

ประมาณเดือนละหนึ่งอีเมล: เคล็ดลับการจัดวางและเสนอราคา วิธีแก้ปัญหาที่ผู้คนถามในชุมชน และข่าวของ Zorocut

ประมาณเดือนละหนึ่งอีเมล พร้อมคู่มือการตัดและเสนอราคาใหม่ๆ วิดีโอ และข่าวของ Zorocut เราจะส่งลิงก์ให้คุณยืนยันก่อน และคุณยกเลิกการรับได้ทุกเมื่อ นโยบายความเป็นส่วนตัว

จัดวางและคิดราคาใน Zorocut

กฎระยะห่าง การตรวจหน่วย ความเร็วเริ่มต้น และสูตรเสนอราคาจากคู่มือเหล่านี้ถูกสร้างไว้ใน Zorocut Nest และตัวจัดวางออนไลน์ฟรี ไฟล์ DXF ของคุณอยู่ในคอมพิวเตอร์ของคุณ