ReadonlyconfigConfiguration for the converter
OptionalprogressOptional progress callback for tracking conversion progress
ProtectedgetResolves 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.
Optionaltimeout: numberProtectedonProtectedonProtectedparseProtectedprocessProtectedprocessProtectedprocessOptional 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).
ProtectedprocessProtectedprocessOptional_progress: AcDbConversionProgressCallbackProtectedprocessProtectedprocessProtectedprocessProtectedprocessProtectedprocessProtectedprocessReads 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.
The input data to convert
The database to populate with converted data
Optional read options (chunk size, progress, etc.)
Promise that resolves when conversion is complete
Native DXF → database converter.
Streams DXF pairs through AcDbDxfFiler / AcDbDxfDocumentReader directly into AcDbDatabase, avoiding the ParsedDxf JSON intermediate used by
@mlightcad/dxf-json-converter.Conversion stages:
START → PARSE → ENTITY → END. The reader fills the database quietly (entity-appended events batched); then the batch flushes so the first draw happens after parse completes. Fonts are loaded on demand by the mtext renderer when a font is first needed.Mid-PARSE byte progress, chunked ENTITY flush, and time-budgeted UI yields keep the status bar / spinner responsive without stalling large files on per-chunk
requestAnimationFramewaits.