Difference between revisions of "User:Gaganjyotsingh/librecadkernel"

From BRL-CAD
 
(3 intermediate revisions by the same user not shown)
Line 8: Line 8:
  
 
Things that are going to be implemented in GSoC are,
 
Things that are going to be implemented in GSoC are,
support for moving entities from one position to another.
+
*support for moving entities from one position to another.
Ability to copy entities any number of times.
+
*Ability to copy entities any number of times.
Scaling the entities.
+
*Scaling the entities.
Rotating the entities with respect to some point.
+
*Rotating the entities with respect to some point.
  
It will have support for text and dimensioning after the GSoC period.
+
*It will have support for text and dimensioning after the GSoC period.
  
.
+
Directory structure and operations,
|-- base
+
 
|  |-- cadentity.cpp
+
Base directory :
|  |-- cadentity.h
+
 
|  |-- id.cpp
+
cadentity.*
|  |-- id.h
+
 
|  |-- metainfo.cpp
+
It is the base class for all entities and each entity is inherited from this class.
|  `-- metainfo.h
+
 
|-- const.h
+
id.*
|-- dochelpers
+
 
|  |-- documentimpl.cpp
+
These file contain the class that generates a unique ID for every new entity so created.
|  |-- documentimpl.h
+
 
|  |-- documentlayerimpl.cpp
+
metainfo.*
|  |-- documentlayerimpl.h
+
 
|  |-- entitymanagerimpl.cpp
+
These files contains the classes which are metatypes for any entity. For example the pen color, line width, layer of entity.
|  |-- entitymanagerimpl.h
+
 
|  |-- layermanagerimpl.cpp
+
Dochelpers :
|  |-- layermanagerimpl.h
+
 
|  |-- undomanagerimpl.cpp
+
These are the implementation files of the files in document folder( containing the virtual functions).
|  `-- undomanagerimpl.h
+
 
|-- document
+
documentimpl
|  |-- abstractdocument.cpp
+
 
|  |-- abstractdocument.h
+
contains the following functions,
|  |-- basemanager.h
+
*addentity
|  |-- documentlayer.h
+
*removeentity
|  |-- entitymanager.h
+
*begin a process
|  |-- layermanager.h
+
*commiting a process
|  |-- selectionmanager.h
+
 
|  `-- undomanager.h
+
documentlayerimpl
|-- events
+
*add entity // adds an entity to the layer
|  |-- absoleteentityevent.h
+
*remove entity // removes the entity from the layer
|  |-- addentityevent.h
+
*find by id // Finds the entity by the unique ID specified
|  |-- beginprocessevent.h
+
 
|  |-- commitprocessevent.h
+
layermanagerimpl
|  |-- removeentityevent.h
+
It manages the layers, adds/deletes layers.
|  `-- replaceentityevent.h
 
|-- functions
 
|  |-- intersect.cpp
 
|  |-- intersect.h
 
|  |-- trim.cpp
 
|  `-- trim.h
 
|-- geometry
 
|  |-- geoarc.cpp
 
|  |-- geoarc.h
 
|  |-- geoarea.cpp
 
|  |-- geoarea.h
 
|  |-- geocircle.cpp
 
|  |-- geocircle.h
 
|  |-- geocoordinate.cpp
 
|  |-- geocoordinate.h
 
|  |-- geoellipse.cpp
 
|  |-- geoellipse.h
 
|  |-- geotext.cpp
 
|  |-- geotext.h
 
|  |-- geovector.cpp
 
|  `-- geovector.h
 
|-- interface
 
|  |-- entitydispatch.h
 
|  |-- entityvisitor.h
 
|  |-- metatype.h
 
|  |-- snapable.h
 
|  `-- variantable.h
 
|-- math
 
|  |-- geointersect.cpp
 
|  `-- geointersect.h
 
|-- meta
 
|  |-- color.cpp
 
|  |-- color.h
 
|  |-- layer.cpp
 
|  |-- layer.h
 
|  |-- linewidth.cpp
 
|  |-- linewidth.h
 
|  |-- pen.cpp
 
|  `-- pen.h
 
|-- operations
 
|  |-- createentities.cpp
 
|  |-- createentities.h
 
|  |-- deleteentities.cpp
 
|  |-- deleteentities.h
 
|  |-- moveentities.cpp
 
|  |-- moveentities.h
 
|  |-- operation.h
 
|  |-- trimentity.cpp
 
|  |-- trimentity.h
 
|  `-- undoable.h
 
|-- primitive
 
|  |-- arc.cpp
 
|  |-- arc.h
 
|  |-- circle.cpp
 
|  |-- circle.h
 
|  |-- ellipse.cpp
 
|  |-- ellipse.h
 
|  |-- line.cpp
 
|  |-- line.h
 
|  |-- text.cpp
 
|  `-- text.h
 
`-- vo
 
    |-- entitycoordinate.h
 
    `-- entitydistance.h
 

Latest revision as of 06:19, 20 March 2014

LibreCAD Kernel Documentation/API Documentation for the usage with other softwares.

LibreCAD kernel is a library to perform 2D operations. Rightnow it supports the basic entities like circle, line, arc, ellipse ( Although can be extended to b-splines, beizer curves ) and the code is built in C++ and Qt. .

It now follows a document based approach and has been designed to be very extensible.

It supports the operations of creating, deleting and trimming of entities. Has an undo-redo stack hence you can do unlimited undos and redos.

Things that are going to be implemented in GSoC are,

  • support for moving entities from one position to another.
  • Ability to copy entities any number of times.
  • Scaling the entities.
  • Rotating the entities with respect to some point.
  • It will have support for text and dimensioning after the GSoC period.

Directory structure and operations,

Base directory :

cadentity.*

It is the base class for all entities and each entity is inherited from this class.

id.*

These file contain the class that generates a unique ID for every new entity so created.

metainfo.*

These files contains the classes which are metatypes for any entity. For example the pen color, line width, layer of entity.

Dochelpers :

These are the implementation files of the files in document folder( containing the virtual functions).

documentimpl

contains the following functions,

  • addentity
  • removeentity
  • begin a process
  • commiting a process

documentlayerimpl

  • add entity // adds an entity to the layer
  • remove entity // removes the entity from the layer
  • find by id // Finds the entity by the unique ID specified

layermanagerimpl It manages the layers, adds/deletes layers.