Code Monkey home page Code Monkey logo

acadsharp's Introduction

ACadSharp Build&Test License nuget

C# library to read/write cad files like dxf/dwg.

Compatible Dwg/Dxf versions:

  • Release 1.1
  • Release 1.2
  • Release 1.4
  • Release 2.0
  • Release 2.10
  • AC1002 - Release 2.5
  • AC1003 - Release 2.6
  • AC1004 - Release 9
  • AC1006 - Release 10
  • AC1009 - Release 11/12 (LT R1/R2)
  • AC1012 - Release 14, 14.01 (LT97/LT98)
  • AC1014 - Release 14, 14.01 (LT97/LT98)
  • AC1015 - AutoCAD 2000/2000i/2002
  • AC1018 - AutoCAD 2004/2005/2006
  • AC1021 - AutoCAD 2007/2008/2009
  • AC1024 - AutoCAD 2010/2011/2012
  • AC1027 - AutoCAD 2013/2014/2015/2016/2017
  • AC1032 - AutoCAD 2018/2019/2020

Code Example

public static void Main()
{
	string path = "sample.dwg";
	CadDocument doc = DwgReader.Read(path, onNotification);
}

// Process a notification form the reader
private static void onNotification(object sender, NotificationEventArgs e)
{
	Console.WriteLine(e.Message);
}

For more examples check.

WIP

The dwg/dxf readers are not yet fully implemented, the NotificationHandler will send a message to inform about the objects that could not be readed or any other error in the process.

Dwg reader entities not implemented

  • ACDBPLACEHOLDER
  • VP_ENT_HDR
  • POLYLINE_PFACE
  • ACAD_PROXY_OBJECT
  • MESH

Dxf reader entities not implemented

  • POLYLINE_PFACE
  • ACAD_TABLE
  • WIPEOUT
  • LEADER
  • 3DFACE
  • MESH

Dwg Writer

ACadSharp has the first DwgWriter in an early alpha.

Compatible versions:

  • AC1014 - Release 14, 14.01 (LT97/LT98) - (WIP)
    • Produces a valid file but the entities are not in the model.
  • AC1015 - AutoCAD 2000/2000i/2002
    • This version depens on the implementation of VP_ENT_HDR to work properly with the different Viewports
  • AC1018 - AutoCAD 2004/2005/2006 (MOST STABLE - RECOMENDED)

Not implemented versions - Status

  • AC1021 - AutoCAD 2007/2008/2009
    • This is a particular and isolated version for DWG, it uses a different compression system and file distribution, due this difficulties, this version will not be implemented any time soon.
  • AC1024 - AutoCAD 2010/2011/2012
  • AC1027 - AutoCAD 2013/2014/2015/2016/2017
  • AC1032 - AutoCAD 2018/2019/2020
    • This versions have a similar structure than AC1018 but the file that is generated by the current writer seems to be missing something, they need further investigation.

IMPORTANT NOTE when you open a file writen by ACadSharp with Autocad the following message will appear: The drawing file requires recovery press on Recover and it will open the file normally. This process this may cause a loss of information on the file.

Contributing

Please feel free to fork this repo and send a pull request if you want to contribute to this project.

Notice that this project is in an alpha version, not all the features are implemented and there can be bugs due to this so any PR with a bug fix will not have a priority.

If you want to contribute you can check the Dxf documentation here.

acadsharp's People

Contributors

domcr avatar djgosnell avatar hexer611 avatar michal-kindl avatar nuanyangl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.