About UML class diagram

25 views
Skip to first unread message

光暁

unread,
Nov 11, 2020, 8:00:23 PM11/11/20
to ogdf
Hi,
   I'm a student and I'm trying to understand ogdf . The layout algorithms of ogdf is amazing! But I study the API Documentation for 1 days and I stiil don't know how to draw UML class diagram and other diagrams .It would be helpful if you can show me some examples about how to draw them.
   Thank you!

Dagobert Smart

unread,
Nov 12, 2020, 6:01:48 AM11/12/20
to ogdf
Hello,

when it comes to UML diagrams, I can only quote what another developer wrote in a somewhat recent GitHub issue:

"Unfortunately, I have to say that I have no idea about OGDF's UML capabilities. I think they are somewhat available but mostly half-baked, perceived as legacy code by most of the recent active developers and hence planned to be removed sooner or later. Based on this, I wouldn't recommend OGDF to render UML (maybe for the layouting, but I don't know if it's then harder to merge layouting and display)."

Best regards,
Dagobert

光暁

unread,
Nov 17, 2020, 3:14:52 AM11/17/20
to ogdf

Thanks.
And I have other problems.
When I try to set the size of nodes in a graph and ues  the Hierarchical layout as you showed in the examples , there is a problem ——in the result of the graph ,all node become 20*20-size .And I want to know which layout algorithm is best for UML class diagram and sequence diagram. If there are other examples for them, it will be great helpful.

Thanks,
Hikari

Dagobert Smart

unread,
Nov 17, 2020, 8:04:09 AM11/17/20
to ogdf
For the bug with the hierarchical layout, please look at https://github.com/ogdf/ogdf/issues/66 .

I assume that you could try out a wide of range of layout algorithms for class diagrams and see which one works best. Maybe try the SugiyamaLayout, SpringEmbedderKK, or for planar graphs, MixedModelLayout. For examples on how to use some of these layout algorithms, see the files in doc/examples/layout/.
However, I do not know about features to visualize the particulars of UML diagrams. I also doubt that there are any useful layout algorithms for sequence diagrams.

Best regards,
Dagobert
Reply all
Reply to author
Forward
0 new messages