Editing User:Gaganjyotsingh/Proposal/LibreCADkickoff
From BRL-CAD
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 21: | Line 21: | ||
− | ==Project Information :== | + | ===Project Information :=== |
===Project Title: LibreCAD Kickoff=== | ===Project Title: LibreCAD Kickoff=== | ||
− | ===Brief Summary:=== | + | ====Brief Summary:==== |
LibreCAD v3 kernel was developed in 2012 by Ries Van Twisk as in experimental stage using modern technologies and the new C++11 standard code and libraries. A kernel is the part of any software which stands the base for software. A CAD kernel is one which manages the various operations such as scale, move, copy, trim, rotate. It manages the entities, attributes of entities and the data/information of the entity. It also manages the way the data is stored in memory and how the data will be written to a file ( file format ) or storing the values in a database. This project will extend the new completely rewritten code base so as to stand as the base for the new LibreCAD. | LibreCAD v3 kernel was developed in 2012 by Ries Van Twisk as in experimental stage using modern technologies and the new C++11 standard code and libraries. A kernel is the part of any software which stands the base for software. A CAD kernel is one which manages the various operations such as scale, move, copy, trim, rotate. It manages the entities, attributes of entities and the data/information of the entity. It also manages the way the data is stored in memory and how the data will be written to a file ( file format ) or storing the values in a database. This project will extend the new completely rewritten code base so as to stand as the base for the new LibreCAD. | ||
− | + | ==Detailed Description:== | |
LibreCAD when started was a fork of QCADv2 community edition. The QCAD version was only working on QT3 while qt 4 was in the market. So LibreCAD was forked and ported to Qt4. This fork was about 10 years ago and hence the codebase is quite old. To overcome this problem, Ries started developing a new versions of LibreCAD from scratch. | LibreCAD when started was a fork of QCADv2 community edition. The QCAD version was only working on QT3 while qt 4 was in the market. So LibreCAD was forked and ported to Qt4. This fork was about 10 years ago and hence the codebase is quite old. To overcome this problem, Ries started developing a new versions of LibreCAD from scratch. | ||
Line 39: | Line 39: | ||
#The CAD viewer | #The CAD viewer | ||
− | The Kernel ( My playground ): | + | ==The Kernel ( My playground ):== |
+ | The kernel is the base of this CAD software. It does the operations that are to be done on any entity. This kernel follows the immutable entity approach. Every entity in this kernel has its own unique ID. This means if an entity is created, if any operation is to be performed on it, it will be deleted and a new entity will be created with the operation performed on it with the same ID as of the deleted entity. | ||
− | + | =Operations := | |
− | + | =Move:= | |
− | |||
− | |||
The implementation of the Move operation involves ( atleast ) an offset. Offset is the value by which the entity needs to be moved. | The implementation of the Move operation involves ( atleast ) an offset. Offset is the value by which the entity needs to be moved. | ||
For the Line, the move can be implemented as | For the Line, the move can be implemented as | ||
− | |||
void move_line ( coordinate offset ) { | void move_line ( coordinate offset ) { | ||
− | |||
start_point = start_point + offset; | start_point = start_point + offset; | ||
− | |||
end_point = end_point + offset; | end_point = end_point + offset; | ||
− | |||
} | } | ||
delete_line(id); // Immutable approach, older gets deleted and a new will be created. | delete_line(id); // Immutable approach, older gets deleted and a new will be created. | ||
− | |||
new_line(start_point, end_point); // values changed above. | new_line(start_point, end_point); // values changed above. | ||
− | |||
For Circle and Arc, the center will be moved by the offset value | For Circle and Arc, the center will be moved by the offset value | ||
Line 72: | Line 65: | ||
− | + | =Copy := | |
Copy includes almost the same code as the code of Move. Even in the copy, the new copy will be placed at some offset. | Copy includes almost the same code as the code of Move. Even in the copy, the new copy will be placed at some offset. | ||
The only difference between Copy and move is only that in the move, the older entity is deleted but in Copy both the entity remain in the document. | The only difference between Copy and move is only that in the move, the older entity is deleted but in Copy both the entity remain in the document. | ||
Line 82: | Line 75: | ||
void copy_entity ( coordinate offset, double angle, int copies ) // copies will be created each at a difference of offset provided in first argument. | void copy_entity ( coordinate offset, double angle, int copies ) // copies will be created each at a difference of offset provided in first argument. | ||
− | + | =Rotate:= | |
Rotate is required for rotating an entity. It could be rotating with respect to any other special point ( such as the origin ) or may be with respect to entity it self. | Rotate is required for rotating an entity. It could be rotating with respect to any other special point ( such as the origin ) or may be with respect to entity it self. | ||
void rotate ( double angle ) { | void rotate ( double angle ) { | ||
− | |||
// Rotation around itself at some angle. | // Rotation around itself at some angle. | ||
− | + | // first the double value will be converted into a coordinate using sin cos functions for x and y coordinate respectively | |
− | // first the double value will be converted into a coordinate using sin cos | ||
− | functions for x and y coordinate respectively | ||
and then the algo will be applied to rotate the entity. Which is like | and then the algo will be applied to rotate the entity. Which is like | ||
− | |||
temp_x = x * angle.x – y * angle.y // stored in temp since we need older x value | temp_x = x * angle.x – y * angle.y // stored in temp since we need older x value | ||
− | |||
y = x * angle.y – y * angle.x | y = x * angle.y – y * angle.x | ||
− | |||
x = temp | x = temp | ||
− | |||
} | } | ||
− | + | =Entites:= | |
Two entities will be added. | Two entities will be added. | ||
Line 107: | Line 93: | ||
2) Dimension | 2) Dimension | ||
− | + | Text will have support for the following attributes, | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | The | + | Insertion point : The point at wich entity is to be inserted. |
− | + | SecondPoint : It is used by the aligned fit. | |
+ | Widthrel : It is the width of reference rectangle around the text. | ||
+ | Height : Height of text | ||
+ | Valign : Vertical Alignment of the Dimension value text | ||
+ | Halign : Horizontal Alignment of the dimension value text | ||
+ | Text : Text value held by dimension entity | ||
+ | Style : Style of the text | ||
+ | Angle : If the text is aligned at some angle | ||
− | + | Dimension has the following attributes, | |
− | + | DefinitionPoint : The point at which dimension is defined | |
+ | MiddleOfText : Middle of the dimension text | ||
+ | Valign : Vertical Alignment of the Dimension value text | ||
+ | Halign : Horizontal Alignment of the dimension value text | ||
+ | LineSpacingStyle : Spacing style if any for the dimension | ||
+ | LineSpacingFactor : Spacing factor if any | ||
+ | Text : Text value held by dimension entity | ||
+ | Style : Style of the text | ||
+ | Angle : If the text is aligned at some angle | ||
− | + | Intersection Stuff | |
+ | // YET TO BE ADDED AND IS THE MAIN MATHS PART | ||
− | and | + | References :- |
+ | Circle circle intersection | ||
+ | http://mathworld.wolfram.com/Circle-CircleIntersection.html | ||
+ | http://stackoverflow.com/questions/3349125/circle-circle-intersection-points | ||
+ | Ellipse Line : | ||
+ | http://www.nabla.hr/Z_MemoHU-029.htm | ||
+ | http://gieseanw.wordpress.com/2013/07/19/an-analytic-solution-for-ellipse-and-line-intersection/ | ||
− | The | + | ==Deliverables:== |
+ | The project can be divided in at least 5 parts, so all of this can be considered a specific measurable goal (one for every feature implemented). LibreCAD v3 Kernel will be delivered with the support of following, | ||
− | + | ==Operations:== | |
+ | 1. Move | ||
+ | 2. Copy | ||
+ | 3. Rotate | ||
− | + | ==Entities :== | |
+ | 1. Text | ||
+ | 2. Dimensions | ||
− | + | Intersection support extended to Arc, Line, Circle, ellipse. | |
− | + | Unit tests so as to test the working of implemented stuff. | |
− | |||
− | + | Milestones( or Plan ): | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
19 May – 27 May: | 19 May – 27 May: | ||
Move will be implemented to all the entities. | Move will be implemented to all the entities. | ||
− | |||
28 May – 5 June: | 28 May – 5 June: | ||
Copy will be implemented to all the entities. | Copy will be implemented to all the entities. | ||
− | |||
6 June – 14 june: | 6 June – 14 june: | ||
Rotate will be implemented to all the entities. | Rotate will be implemented to all the entities. | ||
Line 244: | Line 169: | ||
11 August – 18 August: | 11 August – 18 August: | ||
Code Cleanup, fixing bugs if any and preparing/submitting final submission. | Code Cleanup, fixing bugs if any and preparing/submitting final submission. | ||
+ | |||
+ | |||
− | + | Future work / scope (Post GsoC): | |
− | + | After the GSoC, the LibreCAD kernel will have functionalities to be embedded into the LibreCAD v3 and hence on with the development of UI and CAD viewer of LibreCADv3, it will be soon replacing the LibreCADv2. | |
− | + | Moreover since this is a complete rewrite, this way the license be totally on the LibreCAD team and hence we will be able to avoid the conflict that is going from about 3 years between the LibreCAD and LibreDWG library. This way users will also be able to read the DWG files into LibreCAD hence uplifting the status of CAD on opensource platforms. | |
− | + | Time Availability: | |
I will be available 40 to 48 hours a week, if needed can spend more. | I will be available 40 to 48 hours a week, if needed can spend more. | ||
− | + | Why LibreCAD? | |
My interest in CAD programs. | My interest in CAD programs. | ||
There is no CAD program till now which satisfies my needs exactly right now on Linux. LibreCAD meets my demands more than others. Hence I will be making libreCAD do all my work. | There is no CAD program till now which satisfies my needs exactly right now on Linux. LibreCAD meets my demands more than others. Hence I will be making libreCAD do all my work. | ||
− | + | Why me? | |
I wish to lift up the level of open source CAD and Linux. With previous Summer of code done with a CAD library, I have gained more experience about the working of CAD. There is a great need of a person who basically has knowledge of softwares like AutoCAD, LibreCAD, BRL-CAD, SolidWorks, NX and knowledge in field of machines, I being a mechanical engineer and a programmer have undergone rigorous practice for CAD softwares listed above. Moreover, My recent college project was also first designed on solidworks and BRL-CAD before bringing it to reality. I therefore can easily understand user requirements can and bring it to reality. At last my wish to work for open source/open source CAD and my passion for programming. | I wish to lift up the level of open source CAD and Linux. With previous Summer of code done with a CAD library, I have gained more experience about the working of CAD. There is a great need of a person who basically has knowledge of softwares like AutoCAD, LibreCAD, BRL-CAD, SolidWorks, NX and knowledge in field of machines, I being a mechanical engineer and a programmer have undergone rigorous practice for CAD softwares listed above. Moreover, My recent college project was also first designed on solidworks and BRL-CAD before bringing it to reality. I therefore can easily understand user requirements can and bring it to reality. At last my wish to work for open source/open source CAD and my passion for programming. |