Start again

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Start again

sp1der
I've been thinking. I am no developer but would it be a good idea to maybe re-write the base code for libreCAD, to my knowledge the code used is from the old QCAD isn't it?

Rather than keep on spending lots of time trying to solve bugs with the old code wouldn't it be better to start again?
Reply | Threaded
Open this post in threaded view
|

Re: Start again

sp1der
Any feedback on this ?
Reply | Threaded
Open this post in threaded view
|

Re: Start again

R. van Twisk
Administrator
Arct,

this is not as easy as it sounds as there are several aspects going on.

1) We need to have a small group of developer that can work in sprint’s to design several aspect’s of any new codebase so we have something running in a small amouth of time, this can set the base for further developments.
2) Somebody needs to write a design document ao any developer within the team can follow this design.
3) Somebody needs to write a architectural document so everybody can understand how to develop against LibreCAD, so we don’t get a hack’ish design and put’s us in the same position as we are currently at.

before we do anything, 2) and 3) are very important. I personally have a idea how thing’s should be designed, Dli and I am sure some hard-core c++ user with CAD experience have their own ideas!
The problem is to get everybody on the same line and make time to have this happen...




2 years ago I did develop this : https://github.com/rvt/kerneldev

It was designed with the following in mind:

1) Separate of concern.
 * Application (the GUI) has it’s own codebase
 * The kernel (that handles CAD entities) has it’s own codebase
 * a CAD viewer /that handles viewing of entities) has it’w own codebase.

2) All CAD entities are immutable it has the following advantages
 * Very easy to handle unto/redo
 * Multi processor ‘ready’
 * Easer to make a storage layer (DB, File, REST etc…)

3) ‘Kernel’ handles all entities and it’s modifications through a clear interface
 * This will make plugging various things into the kernel a LOT easer without having the modify the viewer or the GUI

Here is a bit of code example to create lines:
void CadMdiChild::on_actionAdd_Random_Lines_triggered() {
    lc::CreateEntities* foo = new  lc::CreateEntities(_document, "0");

    for (int i = 0; i < 1000; i++) {
    ..
    ..
        foo->append(shared_ptr<const lc::CADEntity>(new lc::Line(lc::geo::Coordinate(x1, y1), lc::geo::Coordinate(x2, y2))));
    }

    _document->operateOn(shared_ptr<lc::Operation>(foo));
}

The only way to get your drawing modified is using the operateOn method. So even if some code tries to ‘move’ a line/circle etc,
the kernel will never be updated you cannot do this on line , example : myLine=line->Move(10,0); 

...



--
Kind Regards,

e:[hidden email] / Tel. <a href="callto:+1%20803%20426%203350">+1 803 426 3350 / Skype: <a href="callto:r.vantwisk">r.vantwisk
http://riesvantwisk.com / chat:<a href="im:vantwisk@gmail.com">vantwisk@gmail.com


On Feb 6, 2014, at 8:25 AM, arct [via LibreCAD] <[hidden email]> wrote:

Any feedback on this ?


If you reply to this email, your message will be added to the discussion below:
http://forum.librecad.org/Start-again-tp5709511p5709525.html
To start a new topic under LibreCAD-dev, email [hidden email]
To unsubscribe from LibreCAD, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Start again

sp1der
Okay, thanks Ries for your informative reply. I see that there would be a lot of work to do then...but it's easy to spend the next 2-3 years as we are with LibreCAD and keep on fixing bugs or you could get a team together and dedicate time to really developing a new code base and then LibreCAD will fly hopefully for a lot longer -yes/no ?