Hi Rob,
On 01.11.2013 17:23, Rob Weir wrote:
Yesterday I was create a diagram in Impress. It was a complicated
diagram, around 20 small circles and squares, with a lot of connectors
between them. I wasted a lot of time to make it look good, making the
nodes so they did not overlap, getting the nodes arranged so the
closely-connected ones were adjacent, optimizing the placement of the
connectors, etc. It was a tedious manual process.
I wish there was a button I could press in the toolbar called
"optimize layout" that would do that all for me.
This should be possible. Graph layout algorithms are well-known [1].
There are popular open source packages like graphviz that implement
some of these algorithms. You define the nodes and the edges and
graphviz determines an optimal layout.
It should be possible to take an Impress (or Draw) diagram and extract
the abstract qualities of the diagram (the nodes, and their
connections), create an optimal layout using graphviz and then bring
that layout back into the diagram and apply it. I know it could be
done by directly operating on the ODF XML. I assume it could be done
at runtime as well.
Nice idea, and surely useful, but connectors know only the two objects
they are connected with, thus there is no way for them to find out what
'other' objects they should avoid to travel over. That would be a lot of
'guessing', e.g. do you avoid objects on the masterpage, too? The
rectangle shape the whole structure is lying above? Who defines what the
'whole structure' is?
Surely it can be done e.g. with an extension working on a selection of
objects; as input that selection would need something like the
connectors (how else to define the connecitons?), but potentially cannot
use these for output, simply because connectors are limited to 5 line
segments currently (the whole layouting is based on this, and - even
worse - the possible maximum thee control points to adjust the maximum
three inner edges).
Thus, it may be possible by creating simple polygons as output instead
of the connectors, but else I doubt it could be done without core
changes, sorry
Sincerely,
Armin
Something to think about.
[1] http://en.wikipedia.org/wiki/Graph_drawing
[2] http://www.graphviz.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org