Database converter for DWG files based on libredwg-web.

Hierarchy (View Summary)

Constructors

Properties

Configuration for the converter

Optional progress callback for tracking conversion progress

Methods

  • Resolves the parser worker timeout in milliseconds.

    Explicit timeout always takes precedence. Otherwise the timeout scales linearly with file size at one extra second per MiB, clamped to the range of 30 seconds to 2 minutes.

    Parameters

    • data: ArrayBuffer
    • Optionaltimeout: number

    Returns number

  • Optional stage: CLASSES metadata only augments the database and older converters predate it. A throwing default (like the mandatory stages above) would break any converter compiled before this stage existed — the HEADER task calls it unconditionally, so a data-model upgrade without a matching converter upgrade aborted every file open with "Error occurred in conversion stage HEADER" (mlightcad/cad-viewer#437).

    Parameters

    Returns void

  • Reads and converts data into an AcDbDatabase.

    This method orchestrates the entire conversion process, including parsing, processing various components (linetypes, styles, etc.), and building the final database.

    Parameters

    Returns Promise<void>

    Promise that resolves when conversion is complete