Hello Alexandre,

thanks a lot.
This convenience method works very well and I adjusted the script accordingly (https://gist.github.com/mkroehnert/aa3d1d9913cb0f29a49f).

I Agree with having a dedicated builder for this task makes a lot of sense.
I am going to look at other Roassal builders for reference implementations, soon.
Or is there additional material available on creating builders.

Thanks a lot,

On Mon, Nov 2, 2015 at 3:51 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi Manfred,

I have just updated Roassal with two methods #horizontal and #vertical defined on RTBezierLine. 
Here is an example on how to use it:
v := RTView new.
shape := RTEllipse new size: 15; color: Color blue trans.
e1 := shape element.
e2 := shape element.
v add: e1; add: e2.
e1 @ RTDraggable.
e2 @ RTDraggable.
e := RTBezierLine vertical edgeFrom: e1 to: e2.
v add: e.

With this, you will not need to create intermediary elements.
Something important, I strongly suggest you to have a dedicated builder. Having very long script is painful...

Alexandre Bergel  http://www.bergel.eu

On Oct 31, 2015, at 1:28 PM, Manfred Kröhnert <mkroehnert42@googlemail.com> wrote:

Hello Alexandre,

I am trying to revive this thread.
Sorry for not posting any updates in such a long time.
Unfortunately, I just did not have time to experiment with this any further.

My latest attempt was to replace the straight lines with BezierLine elements.
The code and a screenshot can be found here:

It looks okay, but in my opinion, the code for creating the BezierLine is a bit cumbersome.
Especially having to create invisible RTEllipse elements for control points.

Therefore, it would be nice to have your opinion on this.
Is this correct, or are there better ways to achieve this?

Thanks a lot,

On Fri, Jun 5, 2015 at 10:50 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Looks good! Keep doing!

Alexandre Bergel  http://www.bergel.eu

On Jun 5, 2015, at 12:42 PM, Manfred Kröhnert <mkroehnert42@googlemail.com> wrote:

Thanks Alexandre,

great advice once again.

Here is the current result


and the script:


spaceBetweenLine := 150.
lineHeight := 250.
labelColor := (Color red alpha: 0.3).
lineColor := (Color red alpha: 0.2).

"columns: Array of column label Arrays"
columns := #(
#('One' 'Two')
#('Ten' 'Eleven' 'Twelve' 'Thirteen' 'Fourteen' 'Fifteen')
#('Twenty' 'Twentyone' 'Twentytwo' 'Twentythree')

"values: Array of columns
 column: Array of columnelements
 columnelement: Array of indices the element is associated with in the next column"
values := #(
#( #(1 3 4 5 6) #(2 3 5) )
#( #(1 2) #(1 2 3) #(3 4) #(2 3 4) #(2 4) #(4) )

numberOfColumns := columns size.
maxColumnElements := (columns
collect: [ :element | element size])
reduce: [ :size1 :size2 | size1 max: size2 ].

v := RTView new.
label := RTLabel text: [ :t | t ].
label color: labelColor.

"draw labels"
columnElements := OrderedCollection new.
1 to: numberOfColumns do: [ :i | | t labels |
t := OrderedCollection new.
labels := label elementsOn: (columns at: i).
labels doWithIndex: [ :element :index |
t add: element.
element translateTo: 
(i * (spaceBetweenLine - 1)) @
(index * lineHeight / maxColumnElements).
v add: element
columnElements add: t.

"draw lines"
2 to: numberOfColumns do: [ :column |
(values at: column - 1) doWithIndex: [ :setOfValues :index |
setOfValues do: [ :setIndex |
| fromElement toElement line |
fromElement := ((columnElements at: (column - 1)) at: index).
toElement := ((columnElements at: column) at: setIndex).
lineShape := RTLine new color: lineColor.
lineShape attachPoint: RTShorterDistanceAttachPoint new.
line := lineShape
edgeFrom: fromElement
to: toElement.
v add: line


The last thing I am going to experiment with will be to replace the straight lines with RTBezierLine.