Graph Editor ! (V0.3.6)

User projects written in or related to FreeBASIC.
AGS
Posts: 1284
Joined: Sep 25, 2007 0:26
Location: the Netherlands

Post by AGS »

Hezad wrote:UPDATE (V0.3.6) !

Changes :

Graph Editor :

MAJOR :
- Some tweaks of the Layout
- Created and Added Buttons Images
- Added Quick File Access Buttons

Fixed :
- Resizing keep a nice looking GUI
I just checked out some other graph - tool at the gnome - files - repository. A link:

http://www.gnomefiles.org/app.php/GraphThing

File - format is a bit like what you use (coordinates and the rest are in 1 file though)

Format used:

vertex <"A"> at (x,y)
vertex <"B"> at (x,y)
etc....
one empty line
edge "A" -- "B"
edge "B" -- "C"
etc....

The idea of all sorts of layouts is a nice feature of the program. Circle, wheel, line etc....

Back to FreeBASIC. I'll be testing the latest graph - editor very soon (this weekend for sure) and I already have a couple of questions regarding performance.

When loading a large graph the drawing of vertices and edges takes very little time (nice one that). However, adding the graph to the edit - box takes (compared to the time it takes to draw a graph) a very long time. After the graph has been drawn the user just sits around waiting for the text - box to get filled up.

Redrawing of the bottom - left - side of the main - window has been rather slow (up to this version of the graph - editor anyway). Have you got any idea why?

I've checked out the source and in the bottom - left side you use a lot of containers to get the lay - out the way you want it. I'm guessing that is what slows things down when the bottom - left part of the screen gets redrawn. But that's just a guess, I guess.

Time for some more bug-hunting.....
AGS
Posts: 1284
Joined: Sep 25, 2007 0:26
Location: the Netherlands

Post by AGS »

Bugreport

When entering some vertices and choosing menu -> new (without having saved the vertices) the vertices get removed from the text - area (the tex - area gets 'cleared').

When I open a large graph (maximum number of vertices, maximum number of arcs) in a maximized window all is well. When I then make the window smaller a large part of the graph isn't visible any more. When maximizing the window again the entire graph gets shown again. Not sure though if this is a bug.

When I enter an illegal arc in the text - area (an arc from an existing vertex to a non-existing vertex) there is no message: when updating (canvas) the arc just gets removed from the text - area.

When entering vertices and arcs but forgetting to end the arcs with a ';' I get the message "Updating error, please check syntax". After the message that I cannot check the syntax because the text - area gets cleared.

When choosing new while there is an unsaved graph I get the save - dialog. When I then press "Cancel" ('do not save and do not create a new graph, I changed my mind, I want to work on this graph some more') the graph gets cleared.

Some minor issues now. I was hoping the text - buttons would be replaced by picture - buttons with shortcuts. And though the buttons have been replaced there are no shortcuts.

Would it be possible to place the numbers above the vertices inside the vertices (GL - canvas)? The canvas would look less cluttered. And would it be a good idea to let the program generate numbers and place the numbers on the left - hand - side of the text - area (as an 'uneditable' part of the GUI?). It would look like line-numbering.

The window - updating is still slow, it did not get better with this version. The problem lies in the size of the graph: updating gets slower as the graph gets bigger.

That's it for now and I will be posting again very soon.

Before I forget: graph-editor is looking great now. When it is (more or less) 'finished' it'll be quite a piece of work. Not bad at all for a first project ;)
Hezad
Posts: 469
Joined: Dec 17, 2006 23:37
Contact:

Post by Hezad »

Hi :)
I just checked out some other graph - tool at the gnome - files - repository. A link:

http://www.gnomefiles.org/app.php/GraphThing

File - format is a bit like what you use (coordinates and the rest are in 1 file though)

Format used:

vertex <"A"> at (x,y)
vertex <"B"> at (x,y)
etc....
one empty line
edge "A" -- "B"
edge "B" -- "C"
etc....

The idea of all sorts of layouts is a nice feature of the program. Circle, wheel, line etc....
Yep this program seems nice ! And embedding Coords AND Graph infos in the same file would be nice. But I should rewrite once again the loading/saving routines so I keep this idea in a todo list but I don't think i'll code this now.

When loading a large graph the drawing of vertices and edges takes very little time (nice one that). However, adding the graph to the edit - box takes (compared to the time it takes to draw a graph) a very long time. After the graph has been drawn the user just sits around waiting for the text - box to get filled up.

Redrawing of the bottom - left - side of the main - window has been rather slow (up to this version of the graph - editor anyway). Have you got any idea why?

I've checked out the source and in the bottom - left side you use a lot of containers to get the lay - out the way you want it. I'm guessing that is what slows things down when the bottom - left part of the screen gets redrawn. But that's just a guess, I guess.
Hum .. The "update time" you get is weird, It doesn't take anytime for me. Still, I have the redrawing time of the layout too, maybe i should rewrite the layout or something.. I don't know, i'll check it!

2nd post :

When entering some vertices and choosing menu -> new (without having saved the vertices) the vertices get removed from the text - area (the tex - area gets 'cleared').
I don't get it, it's normal to clear all areas when clicking on "new file". Did you want to keep the text area content when clicking "New" ?
When I open a large graph (maximum number of vertices, maximum number of arcs) in a maximized window all is well. When I then make the window smaller a large part of the graph isn't visible any more. When maximizing the window again the entire graph gets shown again. Not sure though if this is a bug.
Yep that's totally normal : I'll implement scroll bars (Well, I tried but it was harder than I thought, I'll work on it) to have an "infinite" workspace :)
When I enter an illegal arc in the text - area (an arc from an existing vertex to a non-existing vertex) there is no message: when updating (canvas) the arc just gets removed from the text - area.
In fact, the Text area is checked only when the user asks for update, so illegal arcs are checked in the same time. I'll implement a message box with the removing.
When entering vertices and arcs but forgetting to end the arcs with a ';' I get the message "Updating error, please check syntax". After the message that I cannot check the syntax because the text - area gets cleared.
Hum yeah, the text area should go back to the last valid state .. But when the ";" is forgotten before the first update of the graph, the last valid state is the blank text area. I'll check it.
When choosing new while there is an unsaved graph I get the save - dialog. When I then press "Cancel" ('do not save and do not create a new graph, I changed my mind, I want to work on this graph some more') the graph gets cleared.
Oops, i forgot to add a "Cancel" button in the "Save Graph?" msg box, it'll be fixed :)
Some minor issues now. I was hoping the text - buttons would be replaced by picture - buttons with shortcuts. And though the buttons have been replaced there are no shortcuts.
Yeah I didn't implement it. On the Todo List !
Would it be possible to place the numbers above the vertices inside the vertices (GL - canvas)? The canvas would look less cluttered.
It would be possible :) I forgot to change it when I changed the rendering method.
And would it be a good idea to let the program generate numbers and place the numbers on the left - hand - side of the text - area (as an 'uneditable' part of the GUI?). It would look like line-numbering.

I like the idea of the line numbers, I'll think about it.
The window - updating is still slow, it did not get better with this version. The problem lies in the size of the graph: updating gets slower as the graph gets bigger.
Hum .. I'll have to work a lot on optimization (lines are still drawn by calculating a lot of cosines and arctans)
That's it for now and I will be posting again very soon.

Before I forget: graph-editor is looking great now. When it is (more or less) 'finished' it'll be quite a piece of work. Not bad at all for a first project ;)
Thanks :) I have to admit it's becoming less and less funny with time (I have a lot of ideas for other projects and Graph theory doesn't interrest me like in the beginning of this project), but I'm really glad I went this far, thanks to you. I'll continue debugging and adding things to this project, but to be totally honest, I guess it will be less often !

Once again, thanks (a lot ! ) for your implication !
AGS
Posts: 1284
Joined: Sep 25, 2007 0:26
Location: the Netherlands

Post by AGS »

Hezad wrote:Hi :)
I have to admit it's becoming less and less funny with time (I have a lot of ideas for other projects and Graph theory doesn't interrest me like in the beginning of this project), but I'm really glad I went this far, thanks to you. I'll continue debugging and adding things to this project, but to be totally honest, I guess it will be less often !

Once again, thanks (a lot ! ) for your implication !
It's nice to test software and I'm glad I could help you out a bit with the graph - editor.
AGS
Posts: 1284
Joined: Sep 25, 2007 0:26
Location: the Netherlands

Post by AGS »

AGS wrote:
Hezad wrote:Hi :)
I have to admit it's becoming less and less funny with time (I have a lot of ideas for other projects and Graph theory doesn't interrest me like in the beginning of this project), but I'm really glad I went this far, thanks to you. I'll continue debugging and adding things to this project, but to be totally honest, I guess it will be less often !

Once again, thanks (a lot ! ) for your implication !
It's nice to test software and I'm glad I could help out getting the graph - editor to it's current point of development.
Hezad
Posts: 469
Joined: Dec 17, 2006 23:37
Contact:

Post by Hezad »

Hi !

Bad news : I coded new stuff and fixed a lot of things in Graph Editor, I was about to post it here and .. Overvoltage in my room, Video card burnt, DVD player burnt (Yep this one is weird..) and ... Hard drive burnt (aaaaaaargh) and no backup, i lost all my files (and there was much more important files than Graph editor code ...)

Now you red a super-interresting part of my life, I'll just say I won't update Graph Editor anymore, i'm too dismayed (let's use big words !) to rewrite the last lines I added in the code since I didn't want to update Graph Editor as often anyway.

Last words :
I already said that but I'm happy I went this far on this first project :) I learnt a lot (really) and I can use this knowledge on new projects now.
Thanks a lot to AGS who helped all along this with those bug reports !

edit : If someone want to use this code in any way, don't hesitate of course :p
AGS
Posts: 1284
Joined: Sep 25, 2007 0:26
Location: the Netherlands

Post by AGS »

Hezad wrote:Hi !

Bad news : I coded new stuff and fixed a lot of things in Graph Editor, I was about to post it here and .. Overvoltage in my room, Video card burnt, DVD player burnt (Yep this one is weird..) and ... Hard drive burnt (aaaaaaargh) and no backup, i lost all my files (and there was much more important files than Graph editor code ...)
What can I say? Loosing valuable equipment is very bad but loosing important files is even worse.
Hezad wrote: Now you red a super-interresting part of my life, I'll just say I won't update Graph Editor anymore, i'm too dismayed (let's use big words !) to rewrite the last lines I added in the code since I didn't want to update Graph Editor as often anyway.
You've probably been cursing at the electricity - company since the 'meltdown' of your pc! Graph Editor is in good hands now (I hope). I'm going to pick it up where you left of.
Hezad wrote: Last words :
I already said that but I'm happy I went this far on this first project :) I learnt a lot (really) and I can use this knowledge on new projects now.
Thanks a lot to AGS who helped all along this with those bug reports !

edit : If someone want to use this code in any way, don't hesitate of course :p
Consider your code used, Hezad. I'm not going to update as often as you did but I am going to try to make Graph Editor into something of a Diagram Editor while maintaining it's graph - abilities.

Most likely I am going to change the file - format to GraphML, use libxml for the file - I/O and see what I can do about the performance of the GUI.

Printing of a graph has not been implemented yet, exporting a graph to some graphics format would be nice....... enough ideas to keep the development going for some time to come.

Yes, your code will be used, Hezad.
notthecheatr
Posts: 1759
Joined: May 23, 2007 21:52
Location: Cut Bank, MT
Contact:

Post by notthecheatr »

Ouch, that's really unfortunate. I guess I'll have to be the annoying geek who says "always backup!" (even though I don't really do it myself often enough :P)
Hezad
Posts: 469
Joined: Dec 17, 2006 23:37
Contact:

Post by Hezad »

AGS >
You've probably been cursing at the electricity - company since the 'meltdown' of your pc! Graph Editor is in good hands now (I hope). I'm going to pick it up where you left of.
That's good news ! :) I'm glad that this project is not dead !
Consider your code used, Hezad. I'm not going to update as often as you did but I am going to try to make Graph Editor into something of a Diagram Editor while maintaining it's graph - abilities.

Most likely I am going to change the file - format to GraphML, use libxml for the file - I/O and see what I can do about the performance of the GUI.

Printing of a graph has not been implemented yet, exporting a graph to some graphics format would be nice....... enough ideas to keep the development going for some time to come.

Yes, your code will be used, Hezad.
Good ideas, i'll keep an interrested eye on this :)

notthecheatr >
Ouch, that's really unfortunate. I guess I'll have to be the annoying geek who says "always backup!" (even though I don't really do it myself often enough :P)
No no, it's not annoying, I thought the same thing some seconds after the event lol I guess I'll do it from now on ! :)
Post Reply