brepjs API Reference
    Preparing search index...

    Function exportDXF

    • Export DXF entities to a DXF R12 ASCII string.

      Produces a complete DXF document with HEADER, TABLES, ENTITIES, and EOF sections. Layer definitions are generated automatically from entities.

      Parameters

      • entities: DXFEntity[]

        Array of LINE or POLYLINE entities to write.

      • Optionaloptions: DXFExportOptions

        Layer name and formatting options.

      Returns string

      A complete DXF ASCII string ready to save as a .dxf file.

      const entities: DXFEntity[] = [
      { type: 'LINE', start: [0, 0], end: [10, 0] },
      ];
      const dxfString = exportDXF(entities);

      blueprintToDXF for a higher-level API that converts Blueprints directly.