bower install three-dxf
For now we recommend cloning the repo, and starting with our sample. See Run Samples below.
// 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);
> cd sample > bower install > npm install -g http-server > http-server . # use `http-server -c-1 .` to prevent caching
After performing the steps above, you can see the example at localhost:8080. You can use the dxf file included in the sample.
Note that the sample contains some three.js extras for Text support. If you wish to view text in DXF files, you will need those extras.
Supported DXF Features
- Most LW entities (lines, polylines, circles, etc)
- Some support for line types
- Simple Text
Does not yet support:
- All types of Leaders
- other less common objects and entities.