Weekly report: week 1
To begin with, I'd like to say I've done before May 23, and to end up with this week report.
Libopencad (which will be used in OGR DWG Driver as a DWG reader) now has a variety of capabilities:
1. Reading of layers and layers attributes, such as name, state (frozen/locked, etc).
2. Reading of geometries which are attached to a concrete layer.
3. Reading of CAD Variables, but it's presented as raw data and I am not completely sure how to use it for now.
Supported geometries/objects, which libopencad can extract from a .DWG file are:
- Polyline 2D
- Polyline 3D
- Raster (Images)
- Polyface Mesh
Missing geometries, and why they are not supported yet can be seen here.
Library architecture was made to make it possible to extend supported formats just by adding support to a new one. It can be done by writing a new class which will be a derived class of CADFile, and implement "version/format dependent" functions, like GetGeometry, GetObject.
Libopencad uses googletest for testing, and now it has tests:
1. Of internal reading of CAD datatypes, such as Bitcoded long, Bitcoded short, etc.
2. Of reading geometries, such as polyline, circle, ellipse, arc (but not all geometries has tests).
What is missed in the library, and will be implemented during next month:
- By-block reading, by providing a function GetBlock, same functional as GetLayer, but attached to a block.
- LineTypes reading, Extented Entity Data reading, Attributes (they can be read, but library does not “make a connection” between attribute and an object, which it is associated with).
- This week I've done:
1. Added support to geometries: Ray, MText, MLine, Raster, XLine, 3DFace, Polyline Pface, and added reading of Dimensions (7 types) on internal level (libopencad cad read it, but doesnot provide 'access' to it by its API).
2. Tested reading of Raster Images.
3. Code refactoring.
2. Plan on doing next week:
- Write google tests for correct opening of large files with big amount of geometries and layers.
- Start implementing reading of LineTypes and by-block reading.
- Extend supported geometries list with new ones.
I am not really stucked on anything, except I recently tried to add CRC calculation to the library, and did not get a correctly working feature.
I am getting stucked from time-to-time because of mistakes/mistypes in ODA DWG Specification, because some of them can be found by bruteforce of possible variants what they have wanted to say.