Parse dxf files into a readable, logical js object.
npm install dxf-parser-2
npm install dxf-parser
`
Browsers -- As of 0.1.3 standalone browserify version is in the dist/ folder. Copy it out of the install directory or just download it from the GitHub repo directly. We may evetually publish this to bower, but the build environment needs a little work first.
#### Usage
`
// Grab fileText in node.js or browser
var fileText = ...;
var parser = new DxfParser();
try {
var dxf = parser.parseSync(fileText);
}catch(err) {
return console.error(err.stack);
}
`
See the wiki Example Output page to get an idea of what the results look like.
#### Run Samples
node.js
`
npm install
npm run build
node samples/node/parseSync
node samples/node/parseStream
`
browser - the three-dxf repo has a sample for viewing dxf cad in the browser
#### What's Supported
Support
* Header
* Most 2D entities
* Layers
* LType table
* Block table and inserts
* VPort table
* Text and some MTEXT
* Some XData
Does not yet support
* 3DSolids
* All types of Leaders
* other less common objects and entities.
$3
See the wiki for info on contributing
#### Run Tests
`
npm install -g mocha
//Then
npm test
//OR
mocha test
``