LibreCAD v3 : A work in progress

Project : LibreCAD v3 Development.

Hi all, this is Gaganjyot Singh here. I am pursuing Bachelors of Computer Science and engineering at Chandigarh Engineering College, Chandigarh, Punjab. This year, I got a chance to  work for a pure CAD software. The LibreCAD. LibreCAD had a plan for a version 3 and the creator of LibreCAD had some code which he created 2 years ago for the v3 development. I begun working on the code. My first priority was to develop, polish and enhance the 2D kernel.

Looking towards the LibreCAD, the Code is kept pretty modularized so that the user can have choice. For example the LCviewerNoQt contains the code for rendering the drawings on the screen. At the moment the functionality is moved from Qt to Cairo but in future, the user may have an option to choose between Qt, Cairo or may be OpenGL too. This modularity is also designed keeping in mind the extensibility and usability of code. The LCKernel is a robust 2D kernel being developed at the moment. So it can be used in any other software which may require such functionalities ( transformations, Intersections etc). LibreCADv3 currently uses Lua as its scripting language, which is pretty finalised. The modularity code allows the developers to add their favourite scripting langauges, may be python, ruby or any preferred. The design principles of the LibreCAD v3 include the immutable concept. Every entity in the kernel is assigned with an ID at the time of creation. Whenever a transformation is to be processed on entity such as a move or rotate operation, the new data ( Coordinates, Radius, start/end angles ) etc are calculated and a new entity is created at the Coordinates calculated with the same ID and the older entity is deleted.

My main project was just concentrated over the kernel but the concepts to be implemented till the mid term were implemented very quicly so I went on implementing other extra functionalities to the code.

Tasks completed,

  • Implemented the Move, Copy, Rotate and Scale operations for all the entities.
  • Implemented Ellipse in kernel and viewer
  • Implemented Text in kernel and viewer
  • Implemented Point in kernel and viewer
  • Implemented Dimensioning in kernel
  • Implemented Arrowheads in viewer
  • Implemented MText in kernel
  • Spline in kernel.
  • Splitted the Viewer into ViewerQt and ViewerNoQt part
  • Ported LibreCADv3 to use CMake

My future work includes,

  • Porting of the Quadratic solvers from v2
  • Implementing the interseciton pattern in v3
  • Creating the Unit tests.

The nature of my project is Dynamic and research based( Sometimes ). So sometimes the code gets implemented before time and sometimes it takes longer then expected. Completing the above remaining tasks, I do expect there will be time left which I will be using in adding extra functionalities to the program. Expected functionalities which I plan to implement include DXF support, work on the UI portion.

My commits, code addition and deletion is as,

65 commits

24524 Additions

15446 Deletions

Off Topic:

While coding with the LibreCADv3, I shared it with a group of my friends and the played a bit with the Lua scripting and designed marvellous designs.

https://gurpindersingh751.wordpress.com/2014/06/10/10-june-2014/

https://gurpindersingh751.wordpress.com/2014/06/08/8-june-2014/

https://navdeepsaini48.wordpress.com/2014/06/08/taijitu-code-for-libre-cadv3/

http://jagmeet787.wordpress.com/2014/06/08/8-june-2014/

http://jagmeet787.wordpress.com/2014/06/07/7-june-2014/

http://darshpreets.files.wordpress.com/2014/06/storm.png

http://234satwant.wordpress.com/2014/06/10/logos-using-lua/

4 thoughts on “LibreCAD v3 : A work in progress

    • We are not sure yet.

      GNU decided that LibreDWG (that would be the library of our choice) is GPLed while LibreCAD 3 will be a BSD-3 type license. The problem is that a BSD-3 licenses application cannot just pull in and link against a GPLed sources. However, by the time we are building the application we will re-visit this subject and see what we can do to have this capability.

      Also, remember that DWG has many versions, and I believe that LibreDWG doesn’t support the latest versions. We also need to think about this because we want to prevent having our forum’s being flooded with ‘cannot read DWG file…’ style messages simply because the DWG file the user want’s to load is to new and not supported.

      Ofcourse, you are free to download any DWG->DXF converter and use this ‘stand alone’.

    • Most probably it is a “Yes”, LibreCAD 3 at some point in future might support DWG also. We have removed any dependency on the LibreDWG library due to the isues mentioned by Ries. We have now opted for LibDXFrw. LibDXFrw is actively being developed and supports latest versions of DWG as well. So all in all there are possibilities of having DWG in LibreCAD 3.

  1. I like to learn Lua and as i am a visual person i like the work above.
    Please tell me what is needed for that. I see a QT window.
    Is everything included in the latest librecad?
    thanks for Help.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.