Hi
There was a strike in Lille, and I admit it's not that easy to work home, it's far more easy to sleep in the sofa.
I have made a new shape anyway : ROArc, its an arc of a sixth of circle, maybe we can script it to choose the another shape (1/4, 1/2 ...).
Gofer new
smalltalkhubUser: 'MathieuDehouck' project: 'RoassalAlgorithm';
package: 'Roassal-New'; load
You can try:
-=-=-=-=-=-=-=-=-=-=-=-
"Source code: ROExample>>expandableNodesOn:" "Preambule. It includes the initialization. " | view rawView layout | rawView := ROView new. view := ROMondrianViewBuilder view: rawView. "-------------" "-------------"
layout:= ROVerticalCompactTree new.
view shape circle size: 15 . view nodes: (Collection withAllSubclasses).
view edgesFrom: #superclass. layout userDefinedEdges: view edges.
view layout: layout. layout verticalGap: 70; horizontalGap: 30. view applyLayout.
view nodes do: [ :f | (layout childrenFor: f) do: [ :t | (t model inheritsFrom: f model) ifTrue: [ t model methodDict keysDo: [ :k | (f model methodDict includesKey: k) ifTrue: [ view edgeFromAssociation: f model ->t model ] ] ] ] ].
view edges do: [ :e | e - ROLine + (ROArc new color: (Color r: 0 g: 1 b: 0.5 ); width: 2) ]. layout userDefinedEdges do: [ :e | e - ROArc + ((ROLine new) color: (Color r: 1 g: 0 b: 0 ); width: 2 ) ].
view shape: (ROBezierCurve orthoVertical new color: (Color r: 0.9 g: 0.8 b: 0 ); width: 2 ) . view edgeFromAssociation: (view nodes at: 1) model ->(view nodes at: 33) model. view edgeFromAssociation: (view nodes at: 5) model ->(view nodes at: 45) model. view edgeFromAssociation: (view nodes at: 8) model ->(view nodes at: 36) model.
"-------------" "-------------" "Below is the initiation of the menu and opening the visualization" ROEaselMorphic new populateMenuOn: view. view open.
-=-=-=-=-=-=-=-=-=-=-=-=-
And you'll see that when we set a new shape in the easel, only the next edge is affected.
In this example red edges represent inheritance, green arcs represent overriding on parent's methods, and the 3 other are just for test purpose.
And we noticed that only one of the three is drawn in yellow, the two other are in straight grey.
And I think, we got the same problem when defining multiple edges at the same time, only the first take the newly set shape.
Regards
Mathieu
There is a : " self unsetShape " at the end of edgeFromAssociation: and of other methods such as rawEdgesToAll: ...
Is it necessary ?
Wouldn't it be more natural to have something like : " view shape default " ?
So that we can apply our shape to several edges ?
Well I know that we can do it with edgesFromAssociations: , but I wonder if it's necessary to reset the shape after adding edges.
Regards
Mathieu
Yes, it is important to reset the shape after every edge or node creation command.
Cheers, Doru
On Fri, May 17, 2013 at 11:47 AM, mathieubmddehouck@mailoo.org wrote:
**
There is a : " self unsetShape " at the end of edgeFromAssociation: and of other methods such as rawEdgesToAll: ...
Is it necessary ?
Wouldn't it be more natural to have something like : " view shape default " ?
So that we can apply our shape to several edges ?
Well I know that we can do it with edgesFromAssociations: , but I wonder if it's necessary to reset the shape after adding edges.
Regards
Mathieu
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
hi Mathieu,
I have made a new shape anyway : ROArc, its an arc of a sixth of circle, maybe we can script it to choose the another shape (1/4, 1/2 ...).
Thanks for ROArc. It will soon appear in the mainstream.
And we noticed that only one of the three is drawn in yellow, the two other are in straight grey.
And I think, we got the same problem when defining multiple edges at the same time, only the first take the newly set shape.
This is a decision that we have deliberately taken when defining Mondrian. The point you are making is interesting because you are not the first one to mention it. So, the script:
-=-=-=-=-=-=-=-=-=-=-=-= view shape circle size: 30. view nodes: (1 to: 3). view shape line color: Color red. view edgesFromAssociations: { 1 -> 2 }. view edgesFromAssociations: { 2-> 3 }. -=-=-=-=-=-=-=-=-=-=-=-=
Should produce the following:
Cheers, Alexandre
By the way, is your ROArc finished? Do you think it is ready to be included in the mainstream of Roassal. It looks like, but I prefer to ask before. I am now processing your force based layout (sorry, I am late on this, I know :-)
Alexandre
On May 17, 2013, at 9:59 AM, Alexandre Bergel alexandre.bergel@me.com wrote:
hi Mathieu,
I have made a new shape anyway : ROArc, its an arc of a sixth of circle, maybe we can script it to choose the another shape (1/4, 1/2 ...).
Thanks for ROArc. It will soon appear in the mainstream.
And we noticed that only one of the three is drawn in yellow, the two other are in straight grey.
And I think, we got the same problem when defining multiple edges at the same time, only the first take the newly set shape.
This is a decision that we have deliberately taken when defining Mondrian. The point you are making is interesting because you are not the first one to mention it. So, the script:
-=-=-=-=-=-=-=-=-=-=-=-= view shape circle size: 30. view nodes: (1 to: 3). view shape line color: Color red. view edgesFromAssociations: { 1 -> 2 }. view edgesFromAssociations: { 2-> 3 }. -=-=-=-=-=-=-=-=-=-=-=-=
Should produce the following:
<Screen Shot 2013-05-17 at 9.58.41 AM.png>
Cheers, Alexandre
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Yes, it's ready to be used, but the question is :
Do we want to be able to change the curve radius ?
The Roassal algorithm has been changed, so it could be nice, to change it too.
Regards
Mathieu
Yes, it's ready to be used, but the question is :
Do we want to be able to change the curve radius ?
Ideally yes.
The Roassal algorithm has been changed, so it could be nice, to change it too.
I am not sure to understand this. Which algorithm are you referring to?
Alexandre
Le 17.05.2013 16:53, Alexandre Bergel a écrit :
Yes, it's ready
to be used, but the question is : Do we want to be able to change the curve radius ?
Ideally yes.
The Roassal algorithm has been
changed, so it could be nice, to change it too.
I am not sure to
understand this. Which algorithm are you referring to?
Alexandre
I mean Roassal-Algorithm package has been changed and it could be add in mainstream.
I use ROElement >> position: because it's fine more quick than transateTo:.
Mathieu
I use ROElement >> position: because it's fine more quick than transateTo:.
Yes, I suspected that. I still believe we should use translateTo:. The reason is to have only one way to move elements. Having two different ways opens the door to all kind of nasty things. Now, my job is to make #translateTo: faster, and I have idea about that. I am working on it
Alexandre
You probably want to have at the end of the script mondrian:
... assocs := OrderedCollection new. assocs add: (view nodes at: 1) model ->(view nodes at: 33) model. assocs add: (view nodes at: 5) model ->(view nodes at: 45) model. assocs add: (view nodes at: 8) model ->(view nodes at: 36) model. view edgesFromAssociations: assocs. ...
Nice rendering:
Cheers, Alexandre
On May 17, 2013, at 4:52 AM, mathieubmddehouck@mailoo.org wrote:
Hi
There was a strike in Lille, and I admit it's not that easy to work home, it's far more easy to sleep in the sofa.
I have made a new shape anyway : ROArc, its an arc of a sixth of circle, maybe we can script it to choose the another shape (1/4, 1/2 ...).
Gofer new smalltalkhubUser: 'MathieuDehouck' project: 'RoassalAlgorithm'; package: 'Roassal-New'; load
You can try:
-=-=-=-=-=-=-=-=-=-=-=-
"Source code: ROExample>>expandableNodesOn:" "Preambule. It includes the initialization. " | view rawView layout | rawView := ROView new. view := ROMondrianViewBuilder view: rawView. "-------------" "-------------"
layout:= ROVerticalCompactTree new. view shape circle size: 15 . view nodes: (Collection withAllSubclasses). view edgesFrom: #superclass. layout userDefinedEdges: view edges. view layout: layout. layout verticalGap: 70; horizontalGap: 30. view applyLayout. view nodes do: [ :f | (layout childrenFor: f) do: [ :t | (t model inheritsFrom: f model) ifTrue: [ t model methodDict keysDo: [ :k | (f model methodDict includesKey: k) ifTrue: [ view edgeFromAssociation: f model ->t model ] ] ] ] ]. view edges do: [ :e | e - ROLine + (ROArc new color: (Color r: 0 g: 1 b: 0.5 ); width: 2) ]. layout userDefinedEdges do: [ :e | e - ROArc + ((ROLine new) color: (Color r: 1 g: 0 b: 0 ); width: 2 ) ]. view shape: (ROBezierCurve orthoVertical new color: (Color r: 0.9 g: 0.8 b: 0 ); width: 2 ) . view edgeFromAssociation: (view nodes at: 1) model ->(view nodes at: 33) model. view edgeFromAssociation: (view nodes at: 5) model ->(view nodes at: 45) model. view edgeFromAssociation: (view nodes at: 8) model ->(view nodes at: 36) model.
"-------------" "-------------" "Below is the initiation of the menu and opening the visualization" ROEaselMorphic new populateMenuOn: view. view open.
-=-=-=-=-=-=-=-=-=-=-=-=-
And you'll see that when we set a new shape in the easel, only the next edge is affected.
In this example red edges represent inheritance, green arcs represent overriding on parent's methods, and the 3 other are just for test purpose.
And we noticed that only one of the three is drawn in yellow, the two other are in straight grey.
And I think, we got the same problem when defining multiple edges at the same time, only the first take the newly set shape.
Regards
Mathieu
<test shape.png>_______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev