mardi 29 décembre 2009

Week 11 [21/12 to 27/12]

Work Of The Week



This week was the first Christmas Holiday week. For those 2 week break I prepared a list of tasks I should complete for the project. I update the list during the work also, when new detailed tasks was needed. There was around 20 points to be done, and 13 of them were completed.

The complete list is:

  1. Modify the loading process for OBJ
  2. Add "save normals" options for OBJ
  3. Scale the loaded mesh
  4. Remove the unused "edge" component of a face
    • from Loader
    • from Saver
  5. No double error message when Loader display an error
  6. Rewrite the tooltips of the CameraWidget when the settings changes
  7. Use the translation precision setting
  8. Finish the picking in OpenGL: end up with a unique selection from the mesh
  9. resolve the MeshWidget and the dock resize defaults (mainwidget over the dockwidgets)
  10. Update the settings widget
    • change from a tab to another
    • save and save all
    • reset and reset all
    • default and default all
    • colour and light page
    • no default button to allow enter key to be pressed
    • default values for camera to be used
  11. Find segmentatio fault in loading
  12. Add warning handling for Tasks
  13. Modify the current text format to only load points => real point cloud loading and adapt widget for it
  14. modify the point size in OpenGL

  15. adapt the code to avoid language translation redundancy


  16. add warning if extension name is empty on saving


  17. recognise a triangulated OBJ file


  18. WorkInProgress widget to inform that a task is running


  19. add time information for the task


  20. run another editor from the original one and load in another editor


  21. update the display after closing


And finally the summary of the week work! This week I mostly work on a new process organisation, in order to be able to create a parallel thread more easily to handle a separated action (as loading, saving and later running an algorithm)> It took time to understand how to work with the QThread class, because some points were not obviously explained in the documentation. But after few researches and tests, I managed to create a threaded class called Task, and make the Load and Save classes to inherit from it. In further development the algorithms used to modify the mesh will also inherit from the Task. Creating another thread to handle external processes allow the display thread to continue its job, and avoid a "freezing" look to the interface while a time consuming action is performed.

I also spend a lot of time just after this work to find a segmentation error, caused by a sneaky part of the code, that I taught I wasn't using.

Total worked: 18 hours.







Multiple modifications


I handle the new OBJ loading process, using standard C functions instead of the QString and streaming technique used before. The result is a less sensible loading process, that do not care about spaces between values for example. It now allow all type of OBJ definition to be handle without (normally) causing dangerous troubles. Quad mesh are loaded as Triangulated one, resulting in a strange looking mesh but do not create dangerous failure for loading. Completion of point 1.

Various modification were made on the CameraWidget and MeshWidget to re-distribute tasks. The first scaling code adaptation was done, resulting in strange translation and near/far problems. Was cancelled because causing segmentation fault.

Several modification were made on the interface, mostly to correct few illogic option display and adapt the choices from the settings. Cleaning of the MeshWidget code.

Adding warning handling - task 12 completed

Time worked:
9 h 30

Adapt both Loader and Saver loading and saving function to remove the edge (that is unused) component. Modify the FileSearchWidget to handle the correct option accordingly to the chosen format.
Time worked: 1h



Task: a threaded action



The creation of the threaded task was done in common with the WorkInProgressWidget, as both are related to display the running activity. The main difficulty was to understand the QThread running process to handle the Qt events. Thus it was not difficult to copy the code from my referenced website (see further) but some errors appears just after that. The segmentation fault source was unknown until the 29/12 (week 12).

Time worked:
3 h 30
Segmentation fault search. Not an easy task because it was not thrown when the application was run into the debugger. No solution was found.Time worked: 5 h

Information And References



To use the QThread I used a good explanation from Harold Hunt blog but a also used the previous posted OBJ definition to verify my loader compatibilities with the OBJ standard.

Aucun commentaire:

Enregistrer un commentaire