суббота, 30 апреля 2016 г.

Libopencad

I have started writing a library for reading (and in far future - writing) CAD format files. The current state of the project is:
-Uniform CADGeometry type implementation, which is shared between all variety of DWG/DXF versions.

Implemented IO functions to work with DWG file data streams (such as ReadBITSHORT(), etc). Almost all data types are covered.
Successful reading of file header, object map, AcDb:Classes section, AcDb:Header section.

Current problems are: cannot calculate CRC to compare it with file stored CRC's, some problems connected with check if Object belongs to the drawing (DWG stores some info about DELETED geometries, looks like object map also stores it, so some links can be invalid, currently have no implementation of this check).

Now, library can successfully read this type of geometries: lwpolyline, point, circle, ellipse, arc, line, text.

Libopencad can be built to static library, or implemented directly via code include.
Also, there are some components which use C++11 features, so it should be compiled with -std=c++11 option.

Libopencad github: https://github.com/sandyre/libopencad

вторник, 5 апреля 2016 г.

ODA 'L' undefined data type

ODA made another mistype in their DWG specification

p.154 in data structure there is a field called Numreactors, which type is 'L', but 'L' is not defined in their data table (at the specification start).
This mistype also tooks place in other data structures below.

So, is it BL, or RL? Who knows.