Vincent Parrett 750 Posted October 7, 2021 Does anyone know of any Delphi libraries that tackle directed acyclic graphs (DAG) and layout algorithms? In particular I'm interested in a layered layout (Sugiyama's algorithm).My goal here is to produce a visual representation of a target dependency graph - something like this. [Clean] [Build] |________| | [Rebuild] [Sign] |_________| | [Deploy] It seems like every other language out there has tons to choose from (open source to $$$$ commercial), but so far I have found nothing useful for Delphi. Of course I could attempt to translate another library to delphi.. but I was hoping to avoid that if possible . Share this post Link to post
Darian Miller 361 Posted October 7, 2021 Synopse documentation builder has some of this built-in which might help... not sure how standalone it is. @Arnaud Bouchez 1 Share this post Link to post
Vincent Parrett 750 Posted October 7, 2021 18 hours ago, Darian Miller said: Synopse documentation builder has some of this built-in which might help... not sure how standalone it is. Thanks, I'll take a look. Share this post Link to post
Arnaud Bouchez 407 Posted October 31, 2021 This is a bit tricky (a COM object) but it works fine on Win32. You have the source code at https://github.com/synopse/SynProject We embedded the COM object as resource with the main exe, and it is uncompressed and registered for the current user. Share this post Link to post
VilleK 3 Posted October 31, 2021 (edited) Hi, I implemented Sugiyama here: https://github.com/VilleKrumlinde/zgameeditor/blob/master/tools/ZDesigner/3rdparty/SugiyamaLayout.pas It is fully defined in a single unit. I've used it in several projects and it is very fast, robust, and as far as I know bugfree :). Let me know if you need help with using it! You create a subclass and override ExtractNodes and ApplyNodes methods. See this unit for an example (the TMyLayout class). Edited October 31, 2021 by VilleK 2 1 Share this post Link to post
Edwin Yip 154 Posted October 31, 2021 1 hour ago, VilleK said: Hi, I implemented Sugiyama here: https://github.com/VilleKrumlinde/zgameeditor/blob/master/tools/ZDesigner/3rdparty/SugiyamaLayout.pas Do you mean this algorithm : https://blog.disy.net/sugiyama-method Share this post Link to post
VilleK 3 Posted October 31, 2021 1 hour ago, Edwin Yip said: Do you mean this algorithm : https://blog.disy.net/sugiyama-method Yes, exactly that. I initially used it for a class diagram tool. Share this post Link to post
Vincent Parrett 750 Posted October 31, 2021 6 hours ago, VilleK said: I implemented Sugiyama here: excellent thanks, this is exacly what I was looking for. 2 Share this post Link to post