We have moved to https://dokuwiki.librecad.org/

Lots of content was already moved to the new wiki, but there is still work to do. If you want to contribute, please register a new account at https://dokuwiki.librecad.org/

This wiki will be kept for a while to keep search engine results valid. Moved sites may be deleted here in future.

Difference between revisions of "GSoC 2019 Dev Log"

From LibreCAD wiki
Jump to: navigation, search
(Coding Period Phase 1 (May 27th - June 28th))
(Coding Period Phase 1 (May 27th - June 28th))
Line 35: Line 35:
 
== '''Coding Period Phase 1 (May 27th - June 28th)''' ==
 
== '''Coding Period Phase 1 (May 27th - June 28th)''' ==
  
== <pre style="color: green"> '''Coding Period Phase 1 (May 27th - June 28th)''' </pre> ==
+
== ''' <pre style="color: green"> Coding Period Phase 1 (May 27th - June 28th) </pre> ''' ==
  
 
== '''Week 1''' ==
 
== '''Week 1''' ==

Revision as of 18:20, 25 June 2019

Community Bonding Period (May 6th - May 27th)

> During Community Bonding Period i continued doing more research work for the LibreCAD OpenGL rendering project.

> Linked a partial implemented OpenGL painter with the LibreCAD 3 which uses BufferObjects for rendering

> Implemented basic facilities like pan, zoom

> I started with finding the connections of rendering functions of drawables,drawentities etc.

> Implement and connect the drawables like grid,cursor, origin pointer etc.

> Found connection of tempentities , drawentities

> Tried and check ways of Text Rendering with OpenGL painter( basic ttf type / MSDF type )

> Found place for the caching the saved entities.

> Implemented few more functions in opengl painter (analogous to Cairo) which does Matrix/Vector/Coordinate manipulations(manually with GLM)

> Deciding the basic complete layout of OpenGL painter and found possible ways of complete implementation : https://github.com/sckorpio/LibreCAD_3

> I created blog for the development log on LibreCAD blog : https://blog.librecad.org/tag/google-summer-of-code-gsoc-2019/

TODO:

> Finalize and implement basic gl_entity class which could hold all type of possible entities and render them

> Create a gl_pack class which could hold a number of gl_entities to cache and render complex entities (like dimensions)

> Decide which text rendering should be used (basic ttf or MSDF or both..)

> little research work left on gradient rendering and line patterns and continuing work to complete the painter implementation

Coding Period Phase 1 (May 27th - June 28th)

 Coding Period Phase 1 (May 27th - June 28th) 

Week 1

May 27th

> I started with reviewing the partially implemented opengl painter and used only one painter instance with each viewer (which was earlier 3 instances for background,foreground and document using cairo)

> making the painter instance creation more robust starting from UI

May 28th

> Started with testing the drawables rendering with opengl painter , drawables doest require caching

> Connect the signal(drawevent) and slot(grid's draw() code) , Tested the grid drawing calls with the opengl painter

TODO: Debug later -- the zooming out of grid misses some lines

May 29th

> Connect the lccursor with drawevent signal , Tested the cursor drawing calls with the opengl painter

May 30th

> Connected the tempentities with the signal, Now the entities (during drawing/editing process) can also be rendered

> Connected the dragpoints with the signal, Now the entities can be edited using dragpoints

> Checked the editing options correct working like- translate, rotate, scale , copy etc

May 31st

> Found some errors in cursor during high zoom, debugging the lccursor

> Trying to get the perfect viewport with error free pan and zoom so that later the new entities can be seen while testing

June 1st

> Separated the translate,rotate,scale matrix from the model,view,projection matrix in Renderer

> Fixed the clipping of grid while zooming out also speed up the cursor at high zoom.

June 2nd

> Implemented the reset_transformation function

> Now the zoom is perfect working , zooming into the cursor with stability

> In Cairo all matrix are 3*3 so manually implemented all with 4*4 matrices in OpenGL Renderer Class

Week 2

June 3rd

> Found need of Isolated Transformations

> Need of context saving and restoring which stores the transformation matrices, linewidth, color etc

June 4th

> Created a structure which can save the context attributes like glm::mat , linewidth , color

> Created Stack Implementation for the saving and restoring of context

> Implemented the painters save() and restore() methods, now isolated transformations working correctly

June 5th

> Joined the lcvdimensions with the render calls, dimensions all working fine now

> Temporary Implemented the rendering of empty quads in place of text , just to check the saving and restoring of context. Working fine

June 6th

> Implemented the Rotation Matrix manipulation methods

> The Text Quads are now getting rendered with correct angle, working OK

> Now the basic operations of OpenGL painter are functioning correct ( without caching mechanism )

June 7th

> Starting with Caching mechanism

> Reviewing all draw() codes once again to design and finalize the gl_entity class

June 8th

> Found some possible errors which can clash with opengl painter

> Fix those draw codes to work correctly with painter

June 9th

> BREAK

Week 3

June 10th

> Found possible issue with multiple matrix transformations, Need to remember the transformations after caching

> Redesigned the painter matrix manipulations with single CTM and MVP

> Shifting the model matrix to caching painter

June 11th

> Understanding the kernel and storage part of librecad

> Found the Signal and slot connections of events between the document and documentcanvas

June 12th

> Found error with the remove entity signal emitting code ( of paperviewer )

> Fixed some function in storage manager to solve the issue , now entities are rendering OK in paperviewer tab also

June 13th

> Found the duplication of entities storing in entity container of document canvas

> Tried to make a new cached container with key = id of entity

June 14th

> Found some issue with the draw code of paperbackground

> Fixed the missing stroke() call , now the paper background is rendering correct ( Temporary as a white rectangle )

June 15th

> Reviewed all draw() codes and planned the structure of caching , things which are constant and which are variable

> Updated the gl_entity class to hold attributes need in caching

June 16th

> BREAK

Week 4

June 17th

> Discussed the different ways of caching with mentors and decided to implement a particular

> Started with making a separate class named caching painter which will only cache things without any rendering

June 18th

> Started making other classes like Cacher, gl_pack etc which will work in caching

> Added few more functions in main painter and documentcanvas for making caching more abstracted

June 19th

> Continuing working on these classes

June 20th

> Almost completed with the gl_entity, gl_pack, cacher , cacherpainter classes

> Now able to run the draw() codes through caching painter

> Able to cache the gl_packs and implemented the required query functions regarding caching

June 21st

> Ran Caching with basic entities lines , circle , arc etc and with dimensions ( leaving text) all working OK

> Fixed caching issues , all caching working OK

> Found some signal issues in PAPER viewer while MODEL viewer is all OK

June 22nd

> BREAK

June 23rd

> Fixed the entity storage issue and signals

> Changed the entityDrawItem map in document canvas with key as entity's ID

> Cleaned the Code till now

Week 5

June 24th

>

June 25th

>

June 26th

>

June 27th

>

June 28th

>

Coding Period Phase 2 (June 29th - July 26th)

June 29th

>

June 30th

>

Week 6