Friday, 31 May 2013

Exams are finished

Yesterday was a momentous occasion. Completing my last exam, I have now finally completed the four years of my degree studying Mechanical Engineering. I guess that's party time for me!

With the unpredictable and quite volatile nature of British weather, there are bound to be a few days that will be pouring with rain, hence an opportunity for further work on getting this drawing module completed.

Over the past week, I have been making a few small refinements, consisting of fixes:

* Preventing a segfault when creating a dimension
* Fix for incorrectly placed dimension - was difficult to locate the bug
* Fixed a rounding error which meant decimals were not being displayed

Dimensions Arrows:

I have also added a support class for displaying dimension arrows, although these are just diagonals at the minute.

'

Having a separate QGraphicsItem class is more useful as it keeps the source code tidy by having the drawing code separate. Also it gives flexibility to manipulate the arrows, such as scaling, flipping etc more universally.

It would also be nice to get the page template working again, but waiting on some work to be ready!

Projected Dimensions:

I spent of time to work on this. Originally I thought this was going to be a difficult task. I thought that to get projected dimensions, I would have to make measurements of projected geometry, which would have been laborious to do. Instead, a quite simple solution is to use the same measurement code for true lengths, but project the measurement vector (direction and length) onto the view plane. Taking our complex case below, there will be a difference between true and projected dimensions.


Taking the top projection of this object and taking dimensions for the corner of each pad the result is below.


The dimension on the far left is the true length, and the right is the projected length. I have attempted to make all dimensions which reference orthographic views to use projected type. 

The next step is to work on getting edge to edge dimensions and angles working. The angles bit is more complicated because the angle value measured is based on the quadrant chosen.