Skip to content
/ parser Public

A dxf parser it parse dxf content to a readable javascript object.

License

Notifications You must be signed in to change notification settings

dxfjs/parser

Repository files navigation

parser

A dxf parser it parse dxf content to a readable javascript object.

CI

Installation

pnpm add @dxfjs/parser

Get started

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))

Progress

  • 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.