0.2.0 • Published 1 year ago

@dxfom/dxf v0.2.0

Weekly downloads
2
License
GPL-3.0
Repository
github
Last release
1 year ago

DXF Object Model / DXF

Lossless low level DXF object model.

Installation

$ npm i @dxfom/dxf

Usage

import fs from 'fs'
import { parseDxfFileArrayBuffer } from '@dxfom/dxf/bundle.js'

const buffer = fs.readFileSync('my.dxf')
const dxf = parseDxfFileArrayBuffer(buffer.buffer)

for (const entity of dxf.ENTITIES) {
  for (const [groupCode, groupCodeValue] of entity) {
    console.log(groupCode, ':', groupCodeValue)
  }
  console.log('----')
}

Object Model

See Dxf.ts.

License

GPL 3.0