A dxf parser it parse dxf content to a readable javascript object.
pnpm add @dxfjs/parser
const { Parser } = require('@dxfjs/parser')
const content = '...' // The dxf content
const parser = new Parser()
parser
.parse(content)
.then((obj) => {
console.log(obj)
// ...
})
.catch((error) => console.error(error))
-
Parse
HEADER
section. -
Parse
CLASSES
section. -
Parse
TABLES
section. -
Parse
BLOCKS
section. -
Parse
ENTITIES
section.Supported entities
- 3DFACE
- 3DSOLID
- ARC
- CIRCLE
- ELLIPSE
- HATCH
- INSERT
- LINE
- LWPOLYLINE
- POINT
- POLYLINE
- SOLID
- SPLINE
- TEXT
-
Parse
OBJECTS
section.