DXF (.dxf)
Background & Context
-
- MIME types: image/vnd.dxf, image/x-dxf
- AutoCAD DXF format.
- 3D geometry format.
- Commonly used for the exchange of CAD data.
- Plain text ASCII or binary format.
- DXF is an acronym derived from Drawing Exchange Format.
- Stores a 3D object as a collection of line and polygon primitives and their properties.
- Introduced in 1982.
Import & Export
- Import["file.dxf"] imports a DXF file as a MeshRegion object representing the surface.
- Import["file.dxf",elem] imports the specified element from a DXF file.
- The import format can be specified with Import["file","DXF"] or Import["file",{"DXF",elem,…}].
- Export["file.dxf",expr] exports a 3D mesh-based geometric region to a DXF file. The expr can be any region that is ConstantRegionQ or a Graphics or Graphics3D object.
- The export format can be specified with Export["file",expr,"DXF"] or Export["file",expr,{"DXF", opt1->val1,…}].
- See the following reference pages for full general information:
-
Import, Export import from or export to a file CloudImport, CloudExport import from or export to a cloud object ImportString, ExportString import from or export to a string ImportByteArray, ExportByteArray import from or export to a byte array
Import Elements
- General Import elements:
-
"Elements" list of elements and options available in this file "Rules" full list of rules for each element and option "Summary" summary of the file "CoordinateTransform" transformation function from DXF format - Data format representation elements:
-
"LineData" list of line elements in indexed form "PointData" list of point elements in indexed form "PolygonData" list of polygon elements in indexed form "VertexColors" list of vertex colors "VertexData" list of vertex coordinates - Geometry representation elements:
-
"BoundaryMeshRegion" boundary mesh representation of a solid "MeshRegion" mesh representation of a surface - Graphics representation elements:
-
"Graphics3D" DXF file represented as a Graphics3D object "GraphicsComplex" DXF file as a GraphicsComplex object "LineObjects" list of line primitives in absolute coordinates "PointObjects" list of point primitives in absolute coordinates "PolygonObjects" list of polygon primitives in absolute coordinates - Import and Export use the "MeshRegion" element by default for DXF files.
Examples
open allclose allBasic Examples (2)
Import a 3D model from DXF as a MeshRegion object:
Summary properties of the solid model:
Scope (10)
Import Elements (12)
"CoordinateTransform" (1)
"Graphics3D" (1)
Give the Graphics3D object:
"GraphicsComplex" (1)
Give the GraphicsComplex object:
"LineObjects" (1)
Give the list of Line primitives given in absolute coordinates: