Search packages, repositories and app categories

Package detailsv3.1.3

dxf

DXF package for Dart developers to create, read, update and delete the data in AutoCAD DXF file - a CAD data file format developed by Autodesk.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
2.5K
Likes
30
Pub points
150

Install package

flutter pub add dxf

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The dxf package enables Dart developers to programmatically create, read, update, and delete data in AutoCAD DXF files, a widely used CAD data format. It provides a structured way to interact with geometric and metadata elements within DXF files across multiple platforms. Ideal for applications requiring CAD file manipulation, such as design tools, engineering software, or 3D modeling workflows. The package supports full lifecycle management of DXF content and is compatible with Android, iOS, Web, macOS, Windows, and Linux.

Use cases

  • CAD file generation
  • 3D model data extraction
  • engineering design automation
  • DXF file editing
  • cross-platform CAD integration

Key features

  • Read and write DXF files
  • Support for geometric entities
  • Metadata manipulation
  • Cross-platform compatibility
  • Open-source implementation

Suitable for

  • CAD application developers
  • 3D modeling tools
  • Engineering software
  • IoT design systems
  • Web-based drafting tools

Considerations

  • Limited to DXF format only
  • No advanced 3D rendering
  • Requires understanding of DXF structure
  • Not optimized for large files
  • Dependent on external library maintenance

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

DXF package for Dart and Flutter developers

pub package

DXF package for Dart developers to create, read, update and delete the data in AutoCAD DXF file - a CAD data file format developed by Autodesk.

Usage

A simple usage example:

import 'package:dxf/dxf.dart';

void main() {
  final dxf = DXF.create();
  // or dxf = DXF.fromString(dxfString);
  var arc = AcDbArc(
    x: -3.4,
    y: 19.8,
    z: 0,
    radius: 4.5,
    startAngle: 297,
    endAngle: 40,
  );
  dxf.addEntities(arc);

  var circle = AcDbCircle(
    x: 0.2,
    y: 12,
    z: 0,
    radius: 2.5,
  );
  dxf.addEntities(circle);

  var ellipse = AcDbEllipse(
    x: 5.4,
    y: 19,
    z: 0,
    xEndPoint: -1.6,
    yEndPoint: -0.8,
    zEndPoint: 0,
    ratioMajor: 0.5,
    start: 0,
    end: 2 * pi,
  );
  dxf.addEntities(ellipse);

  var line = AcDbLine(
    x: 3.6,
    y: 14.3,
    x1: 8.08,
    y1: 15.3,
  );
  dxf.addEntities(line);

  var mtext = AcDbMText(
      x: 3.7,
      y: 12.3,
      z: 0,
      textHeight: 2.5,
      textString: 'Hello, xin chào',
      columnWidth: 12.9);
  dxf.addEntities(mtext);

  var point = AcDbPoint(x: -0.6, y: 8.3, z: 0);
  dxf.addEntities(point);

  var vertices = <List<double>>[];
  vertices.addAll([
    [2.4, 21.1],
    [6.7, 22.6],
    [9.9, 21.7],
    [13.5, 22.6]
  ]);

  var polyline = AcDbPolyline(vertices: vertices, isClosed: false);
  dxf.addEntities(polyline);

  var text = AcDbText(
    x: 14.2,
    y: 16.7,
    textString: 'https://humg.edu.vn',
  );
  dxf.addEntities(text);

  print(dxf.dxfString);
}

Features and bugs

Please file feature requests and bugs at the issue tracker.

Categories

Source repository

Projects using this package

No data available yet.