Bug 414595 - Improve auto layout for associations
Summary: Improve auto layout for associations
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 2.29.3 (KDE Applications 19.08.3)
Platform: Other All
: NOR wishlist
Target Milestone: 2.31 (KDE releases 20.04)
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-28 09:01 UTC by Ralf Habacker
Modified: 2020-03-02 07:38 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.30.80 (KDE releases 20.03.80)


Attachments
screenshot (26.71 KB, image/png)
2019-11-28 09:01 UTC, Ralf Habacker
Details
Screenhot from layout generated by dot (28.03 KB, image/png)
2019-11-28 09:03 UTC, Ralf Habacker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2019-11-28 09:01:44 UTC
Created attachment 124150 [details]
screenshot

Auto-Layout uses the command line tool 'dot' to create a non-overlapping layout according to predefined rules. From this layout, the layout generator fetches node positions to place widgets and edge endpoints to place associations. 

The point output format such as plain-ext[1] or xdot[2] also provides additional edge positions in the base spline format, which are currently not evaluated, but would be helpful to improve the visual display.

STEPS TO REPRODUCE
1. start umbrello
2. open appended xmi file 
3. open state diagram
4. apply vertical layout

OBSERVED RESULT
Comparing the visual with the generated dot file shows differences

EXPECTED RESULT
The visual should be similar to the generated dot file

SOFTWARE/OS VERSIONS
irrelevant

ADDITIONAL INFORMATION
[1] https://www.graphviz.org/doc/info/output.html#d:plain-ext
[2] https://www.graphviz.org/doc/info/output.html#d:xdot
Comment 1 Ralf Habacker 2019-11-28 09:03:18 UTC
Created attachment 124151 [details]
Screenhot from layout generated by dot

You can see that there are no overlapping associations
Comment 2 Ralf Habacker 2019-12-03 18:50:54 UTC
Git commit e7cb330d64f50375e08a86fd3817f5fb0c464270 by Ralf Habacker.
Committed on 03/12/2019 at 18:50.
Pushed by habacker into branch 'master'.

Show parsed data by layout generator in graphics scene

M  +12   -0    umbrello/dotgenerator.cpp
M  +32   -0    umbrello/layoutgenerator.cpp
M  +21   -1    umbrello/layouts/activity-vertical.desktop
M  +21   -1    umbrello/layouts/class-export.desktop
M  +21   -1    umbrello/layouts/class-horizontal.desktop
M  +21   -1    umbrello/layouts/class-vertical.desktop
M  +21   -1    umbrello/layouts/component-horizontal.desktop
M  +21   -1    umbrello/layouts/component-vertical.desktop
M  +21   -1    umbrello/layouts/entityrelationship-export.desktop
M  +21   -1    umbrello/layouts/entityrelationship-horizontal.desktop
M  +21   -1    umbrello/layouts/entityrelationship-vertical.desktop
M  +21   -1    umbrello/layouts/object-export.desktop
M  +21   -1    umbrello/layouts/object-horizontal.desktop
M  +21   -1    umbrello/layouts/object-vertical.desktop
M  +21   -1    umbrello/layouts/state-export.desktop
M  +22   -2    umbrello/layouts/state-vertical.desktop
M  +22   -2    umbrello/layouts/usecase-default.desktop
M  +5    -0    umbrello/umlwidgets/associationline.cpp
M  +1    -0    umbrello/umlwidgets/associationline.h

https://invent.kde.org/kde/umbrello/commit/e7cb330d64f50375e08a86fd3817f5fb0c464270
Comment 3 Ralf Habacker 2019-12-03 18:50:54 UTC
Git commit 4e91d7d0f5f682cbd4ce9bfe9cbe191bbe8bb103 by Ralf Habacker.
Committed on 03/12/2019 at 18:50.
Pushed by habacker into branch 'master'.

Fix resolution of origin in layout generator

M  +3    -3    umbrello/layoutgenerator.cpp
M  +1    -1    umbrello/layoutgenerator.h

https://invent.kde.org/kde/umbrello/commit/4e91d7d0f5f682cbd4ce9bfe9cbe191bbe8bb103
Comment 4 Ralf Habacker 2019-12-03 18:50:54 UTC
Git commit a104881789d0e03a1706031679968d952fd56d36 by Ralf Habacker.
Committed on 03/12/2019 at 18:50.
Pushed by habacker into branch 'master'.

Add debug option to start png viewer with image generated from dot file

M  +10   -1    umbrello/layoutgenerator.cpp

https://invent.kde.org/kde/umbrello/commit/a104881789d0e03a1706031679968d952fd56d36
Comment 5 Ralf Habacker 2019-12-03 18:50:54 UTC
Git commit 971f68830eb6dcd7c5b306d2432a22db8b7d97ef by Ralf Habacker.
Committed on 03/12/2019 at 18:50.
Pushed by habacker into branch 'master'.

Improve auto layout for associations

The line type selected in the association settings dialog is passed to
the 'dot' command line tool, which creates the lines according to the
selected style. The modified lines then get this selected type and the
imported (control) points are passed to the lines.

When importing polylines, duplicate points are removed.
FIXED-IN:2.30.80 (KDE Applications 20.03.80)

M  +23   -17   umbrello/layoutgenerator.cpp

https://invent.kde.org/kde/umbrello/commit/971f68830eb6dcd7c5b306d2432a22db8b7d97ef
Comment 6 Ralf Habacker 2019-12-03 18:50:54 UTC
Git commit 6272e5ec1d174d639d0999981bba52773ba855a3 by Ralf Habacker.
Committed on 03/12/2019 at 18:50.
Pushed by habacker into branch 'master'.

Move generator related stuff in base class DotGenerator

M  +50   -0    umbrello/dotgenerator.cpp
M  +6    -0    umbrello/dotgenerator.h
M  +1    -41   umbrello/layoutgenerator.cpp
M  +0    -2    umbrello/layoutgenerator.h

https://invent.kde.org/kde/umbrello/commit/6272e5ec1d174d639d0999981bba52773ba855a3
Comment 7 Ralf Habacker 2019-12-03 18:50:55 UTC
Git commit c0870e1988604a0c3f72e2eafe0704424e431d88 by Ralf Habacker.
Committed on 03/12/2019 at 18:50.
Pushed by habacker into branch 'master'.

Ignore polyline, spline and orthogonal line layout for dot version <= 2.28.0

dot with version at least <= 2.28.0 creates an unknown edge point format,
which leads to unusable results.

M  +20   -1    umbrello/dotgenerator.cpp
M  +2    -1    umbrello/dotgenerator.h
M  +24   -18   umbrello/layoutgenerator.cpp

https://invent.kde.org/kde/umbrello/commit/c0870e1988604a0c3f72e2eafe0704424e431d88