воскресенье, 3 июля 2016 г.

Week 6 Report.

Last week I had to move back home, and I had to set up a new working environment, and it took a lot of time. Also, I changed priority a little, so 'probably to be done' tasks are done (EED), and 'to be done' task becomes next week task.

1. This week I've done:
Libopencad changes:
- ExtendedEntityData is now available by method vector< string > CADGeometry::getEED();
- ESRI SpatialRef is now available by method string CADFile::getESRISpatialRef();

OGR CAD Driver changes:
- EED support added (all EED are presented as a feature string attribute).
- *.prj file reading, or extracting it from CAD file, if not presented.

2. Plan on doing next week:
Polylines tesselation, spline geometry. Test library on a files with a lot of different objects (raster/vector). Fix CAD driver issue (described below).

3. Blocking:
As far as I can see Latest commits to libopencad crashed CAD Driver on my Mac. GDAL still builts fine, but calling ogrinfo with DWG file causes an endless loop somewhere in libopencad, however, tests are passed and cadinfo app works just fine. Currently I have no idea what can cause such behavior, and I am working on it.

Links:


Best regards,

Alexandr Borzykh

воскресенье, 26 июня 2016 г.

Week 5 Report.

I have declined the idea of starting implementing R13-14 support because R15 still misses some necessary capabilities, and they should be done earlier than adding support for a new version. Also, the differences between R15 and R13/R14 are pretty small, and implementing them will not be a difficult task.

1. This week I've done:
Libopencad changes:
- Fixed failing on geometry reading tests (if library was compiled with GCC).
- Fixed Travis-CI build (now it works properly).

OGR CAD Driver changes:
- Added LWPolyline, Polyline3D (polylines does not support 'tesselation' yet), Text, MText (texts are presented as single point with filled "Text" attribute field), Ellipse support.
- Changed VSIF...() functions calls to VSIF...L().

2. Plan on doing next week:
Implement methods to extract info about coordinate system from file, or from associated .prj file.
Add tesselation to polylines. Add spline geometry support in driver. Start on implementing reading of ExtendedEntityData and adding its support to CAD Driver.

3. Blocking:
None, but Hatch geometry is pretty complex to implement, I am still working on it (will be done in next 2-3 days). Also, WIPEOUT geometry (which sometimes can be seen in DWG files) has no description in ODA DWG Specs.

Links:


воскресенье, 19 июня 2016 г.

Week 4 Report.

1. This week I've done:

Libopencad is extended with:
- 2 new geometry types: ATTDEF and ATTRIB.
- Color is now a geometry attribute, so, it can be got by calling CADGeometry->getColor() (returns RGBColor struct).
- Libopencad docs prototype can be seen there (a lot of things are missed).

OGR CAD Driver extended with:
- All libopencad's file I/O was rewritten using VSIF.
- Arc, Face3D geometries.
- Now geometry color is attribute (given as IntegerList in RGB format).

2. Plan on doing next week:
Previous week tasks: add Polyline3D, LWPolyline, Ellipse support to CAD Driver.
Add hatch geometry to libopencad. Implement dimensions library output representation. Start working on R13-R14 DWG support.

3. Blocking:
None.

Links:

суббота, 11 июня 2016 г.

Week 3 Report.


1. This week I've done:
Implemented CAD OGR Driver, now it can read points/lines/circles received from libopencad.
Since libopencad is written in C++11, I’ve added a check in configure tool which tests whether C++ compiler supports C++11. If it does, CAD driver will be a built-in, or disabled if no support is provided.

Now, ogrinfo can open .DWG files (only supported versions by libopencad).
Example:
File opening errors are also handled:

2. Plan on doing next week:
Rewrite libopencad’s file I/O with VSIF functions (now it uses fstream).
Increase driver geometries pool with ellipses, lwpolylines, 3dpolylines. Start implementing doxygen to libopencad.

3. Blocking:
None.

Links:

суббота, 4 июня 2016 г.

Week 2 Report.

This week we've changed the development direction with my mentor (Dmitry Baryshnikov). Now, library (libopencad) development is 'freezed' in some kind, and I am starting developing OGR driver.
  1. This week I've done:
1. Implemented Linetypes reading (but they are not associated with drawing objects still). Implemented google tests for reading large files (with big amount of objects) - for lwpolylines and 3dpolylines.
2. A little code refactoring.

2. Plan on doing next week: Implement linetypes for objects, extend supported geometries list with new ones. Code refactoring.
Write driver 'skeleton', and try to integrate libopencad.

3. Blocking:
None, but since I am not very familiar with OGR driver implementation - I am slowed down by this fact.

суббота, 28 мая 2016 г.

Week 1 Report.

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:
  • Point
  • Circle
  • Ellipse
  • Arc
  • Text
  • Solid
  • Spline
  • Line
  • Polyline 2D
  • Polyline 3D
  • LWPolyline
  • Ray
  • Raster (Images)
  • MText
  • MLine
  • XLine
  • Polyface Mesh
  • 3DFace
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:
  1. By-block reading, by providing a function GetBlock, same functional as GetLayer, but attached to a block.
  2. 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).

  1. 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.

3. Blocking:
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.

воскресенье, 22 мая 2016 г.

Current state of libopencad

Hello.

Recently I've added SOLID geometry support, solved problem with deleted entities, and a lot of refactoring were done too. Updated tests.

Up on the list now:
1. Add reading of blocks (now only layers are supported).
2. Add reading of attributes/line types for geometries.