Need help with three-dxf?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

322 Stars 106 Forks MIT License 73 Commits 15 Opened issues


A dxf viewer for the browser using three.js

Services available


Need anything else?

Contributors list


Three-Dxf is a javascript viewer for dxf files. It takes dxf objects produced from Dxf-Parser and renders them using three.js.


npm install three-dxf

For now we recommend cloning the repo, and starting with our sample. See Run Samples below.

Example of the viewer


// See index.js in the sample for more details
var parser = new window.DxfParser();
var dxf = parser.parseSync(fileReader.result);
cadCanvas = new ThreeDxf.Viewer(dxf, document.getElementById('cad-view'), 400, 400);

Run Samples

# first, compile three-dxf
> npm install
> npm run build

then install the sample's dependencies

> cd sample > npm install

go back to the root and run http-server to run the sample

> cd .. > npm install -g [email protected] > http-server .

use http-server -c-1 . to prevent caching

After performing the steps above, you can see the example at You can use the dxf file included in the sample. NOTE: the latest version of http-server will go into a redirect loop if you exlcude "/index.html" from the url.

Supported DXF Features

Supports: * Most LW entities (lines, polylines, circles, etc) * Layers * Simple Text * Splines * Ellipses * Text and MText (Basic multiline support available in v1.3.0 but not all formatting is supported)

Does not yet support: * Attributes * 3DSolids * All types of Leaders * other less common objects and entities.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.