-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drawing a UML diagram #1
Comments
@elquimista you up for this? |
@ronaldtse yes I'm up for this. The second diagram is a class diagram right? Can you draw it on paper and share? |
@elquimista Yes the second diagram is a class diagram that we wish to reproduce in OGDF. |
@elquimista please feel free to ask questions here. @w00lf and @DmitryDrobotov would be also able to help. Thanks! |
Find below (also attached as SVG) graph for the second diagram generated by OGDF (code attached - C++17): After spending considerable time and effort on this, here are my observations and updates: OGDF doesn't fully support UML Class diagrams yet! Additionally, I've tried to use its GML and GraphML formats but it didn't work. On the other hand, I tried yEd and it supports these things out-of-the-box and is pretty straightforward to use. To sum up, if the objective is just to provide Ruby bindings for OGDF APIs then that should be targeted. |
@elquimista could you provide the code you wrote for both diagrams? You mentioned about code attached but I don't see them...
The first diagram, generated via OGDF, contains attributes, generalization and composition. yEd does not meet our requirements for drawing these: https://github.com/lutaml/lutaml-uml/issues What exactly did you mean by:
Were you able to find out how to do diagrams like this? https://ogdf.uos.de/doc/dir_d2bf5410fcb0d0ed7083a64a0eaec90a.html Maybe the approach is we have to do a C++ program in OGDF to handle our UML syntax and create a Ruby binding for that. |
Sorry I thought I attached it. Here's the code: ogdf-example.zip
A code reference may have helped but could not find anything remotely similar. Even if it was developed with OGDF, its support must be buried deep in its Git history. Maybe, you want to look at that.
Right.
OGDF doesn't support UML fully and it's going to be removed. So, it was suggested that the required components, algorithms, and renderer may be custom-developed.
These are simple graphs with a different layout (planar + upward + weighted edges), not UML Class diagrams.
Which is akin to build a custom library altogether, as I mentioned earlier, and that from the scratch. |
That's strange, we have made research before about ogdf capabilities and most of the sources tell that it can be used to create complex uml state diagrams, for example - http://publications.lib.chalmers.se/records/fulltext/252095/252095.pdf, in 2.4.1 ogdf described as a modular library capable of rendering complex diagrams. Maybe there are some additional libraries(plugins) for ogdf that extend its drawing capabilities? |
That discusses State Machines (useful for FA, TG, GTG, etc.), not Class Diagrams. Here are some of the resources that I've gone through:
That may be the case. But, then something must pop up in the search results, GitHub history, or the source code. |
@elquimista can you help do this? The point is we want to create that UML diagram. |
@ronaldtse I'd like to help you with this provided that the detailed specs are complete and I'm not busy on other things. |
The main requirement here is to create a collection of predefined methods that we can use as native extensions from our ruby library like described here - http://tristanpenman.com/blog/posts/2018/09/16/extending-ruby-with-cpp/. performance won't be an issue here, the largest diagram we encounter so far in our docs consists of 15 nodes. @elquimista do you think it will be possible to create such collection of methods? |
Ping @elquimista |
@ronaldtse Did you get my email I sent on Sep 3? |
We need to use OGDF to draw a UML diagram in C++.
OGDF is a framework for drawing graphs. They seem to be able to draw UML diagrams well.
Some links:
This site contains quite a number of examples for OGDF usage https://chameerawijebandara.wordpress.com/tag/ogdf/
Documentation available here with examples: https://ogdf.uos.de/doc/
There is XMI support in UmlModelGraph (https://ogdf.uos.de/doc/classogdf_1_1_uml_model_graph.html)
Description of OGDF: http://tcs.informatik.uos.de/_media/pubs/gdchapter_ogdf.pdf
Here's an example of UML generated by OGDF:
The goal is to re-draw this diagram using OGDF (the current diagram is ugly, OGDF output is much nicer!):
I think one of these ways will work:
Eventually the goal is to have a Ruby API that can perform either of these.
The text was updated successfully, but these errors were encountered: