add YED geometry import tests
This commit is contained in:
@@ -59,7 +59,7 @@ exit/</data>
|
|||||||
|
|
||||||
exit/</data>
|
exit/</data>
|
||||||
<data key="dGeometry">
|
<data key="dGeometry">
|
||||||
<rect x="-788.000000" y="645.000000" width="413.000000" height="208.000000"/>
|
<rect x="-2.000000" y="153.000000" width="413.000000" height="208.000000"/>
|
||||||
</data>
|
</data>
|
||||||
</node>
|
</node>
|
||||||
<node id="n0::n2">
|
<node id="n0::n2">
|
||||||
@@ -69,7 +69,7 @@ exit/</data>
|
|||||||
|
|
||||||
exit/</data>
|
exit/</data>
|
||||||
<data key="dGeometry">
|
<data key="dGeometry">
|
||||||
<rect x="-784.000000" y="311.000000" width="413.000000" height="208.000000"/>
|
<rect x="2.000000" y="-181.000000" width="413.000000" height="208.000000"/>
|
||||||
</data>
|
</data>
|
||||||
</node>
|
</node>
|
||||||
</graph>
|
</graph>
|
||||||
@@ -89,54 +89,54 @@ exit/
|
|||||||
<edge id="n0-n3" source="n0" target="n3">
|
<edge id="n0-n3" source="n0" target="n3">
|
||||||
<data key="dData">АнализаторЦели.ЦельПотеряна/</data>
|
<data key="dData">АнализаторЦели.ЦельПотеряна/</data>
|
||||||
<data key="dSourcePoint">
|
<data key="dSourcePoint">
|
||||||
<point x="0.000000" y="0.000000"/>
|
<point x="0.000000" y="383.459412"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dTargetPoint">
|
<data key="dTargetPoint">
|
||||||
<point x="0.000000" y="0.000000"/>
|
<point x="413.000000" y="142.769318"/>
|
||||||
</data>
|
</data>
|
||||||
</edge>
|
</edge>
|
||||||
<edge id="n0-n3#0" source="n0" target="n3">
|
<edge id="n0-n3#0" source="n0" target="n3">
|
||||||
<data key="dData">АнализаторЦели.ЦельУничтожена/</data>
|
<data key="dData">АнализаторЦели.ЦельУничтожена/</data>
|
||||||
<data key="dSourcePoint">
|
<data key="dSourcePoint">
|
||||||
<point x="0.000000" y="0.000000"/>
|
<point x="0.000000" y="383.459412"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dTargetPoint">
|
<data key="dTargetPoint">
|
||||||
<point x="0.000000" y="0.000000"/>
|
<point x="413.000000" y="142.769318"/>
|
||||||
</data>
|
</data>
|
||||||
</edge>
|
</edge>
|
||||||
<edge id="n3-n0::n1" source="n3" target="n0::n1">
|
<edge id="n3-n0::n1" source="n3" target="n0::n1">
|
||||||
<data key="dData">Сенсор.ЦельПолучена/</data>
|
<data key="dData">Сенсор.ЦельПолучена/</data>
|
||||||
<data key="dSourcePoint">
|
<data key="dSourcePoint">
|
||||||
<point x="0.000000" y="0.000000"/>
|
<point x="413.000000" y="109.013374"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dTargetPoint">
|
<data key="dTargetPoint">
|
||||||
<point x="0.000000" y="0.000000"/>
|
<point x="0.000000" y="69.013382"/>
|
||||||
</data>
|
</data>
|
||||||
</edge>
|
</edge>
|
||||||
<edge id="n0::n1-n0::n2" source="n0::n1" target="n0::n2">
|
<edge id="n0::n1-n0::n2" source="n0::n1" target="n0::n2">
|
||||||
<data key="dData">ОружиеЦелевое.ЦельВошлаВЗонуАтаки/</data>
|
<data key="dData">ОружиеЦелевое.ЦельВошлаВЗонуАтаки/</data>
|
||||||
<data key="dSourcePoint">
|
<data key="dSourcePoint">
|
||||||
<point x="0.000000" y="0.000000"/>
|
<point x="413.000000" y="0.000000"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dTargetPoint">
|
<data key="dTargetPoint">
|
||||||
<point x="0.000000" y="0.000000"/>
|
<point x="0.000000" y="208.000000"/>
|
||||||
</data>
|
</data>
|
||||||
</edge>
|
</edge>
|
||||||
<edge id="n0::n2-n0::n1" source="n0::n2" target="n0::n1">
|
<edge id="n0::n2-n0::n1" source="n0::n2" target="n0::n1">
|
||||||
<data key="dData">ОружиеЦелевое.ЦельВышлаИзЗоныАтаки/</data>
|
<data key="dData">ОружиеЦелевое.ЦельВышлаИзЗоныАтаки/</data>
|
||||||
<data key="dSourcePoint">
|
<data key="dSourcePoint">
|
||||||
<point x="0.000000" y="0.000000"/>
|
<point x="0.000000" y="208.000000"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dTargetPoint">
|
<data key="dTargetPoint">
|
||||||
<point x="0.000000" y="0.000000"/>
|
<point x="413.000000" y="0.000000"/>
|
||||||
</data>
|
</data>
|
||||||
</edge>
|
</edge>
|
||||||
<edge id="n1-n3" source="n1" target="n3">
|
<edge id="n1-n3" source="n1" target="n3">
|
||||||
<data key="dSourcePoint">
|
<data key="dSourcePoint">
|
||||||
<point x="0.000000" y="0.000000"/>
|
<point x="8.933799" y="4.493021"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dTargetPoint">
|
<data key="dTargetPoint">
|
||||||
<point x="0.000000" y="0.000000"/>
|
<point x="0.000000" y="247.853790"/>
|
||||||
</data>
|
</data>
|
||||||
</edge>
|
</edge>
|
||||||
</graph>
|
</graph>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
Document: {id: '', name: 'Автобортник', format: 'yEd Berloga', meta: {standard version: '1.0', name: 'Автобортник', transition order: transition first, event propagation: block events}, elements: {State Machine: {id: 'G', name: 'Автобортник', elements: {Initial: {id: 'n1', name: '', geometry: (-1623; 753)}, Composite State: {id: 'n0', name: 'Бой', actions: {a {entry}, a {exit}}, geometry: (-786; 492; 517; 770), elements: {Simple State: {id: 'n0::n1', name: 'Сближение', actions: {a {entry, behavior: 'МодульДвижения.ДвигатьсяКЦели()'}, a {exit}}, geometry: (-788; 645; 413; 208)}, Simple State: {id: 'n0::n2', name: 'Атака', actions: {a {entry, behavior: 'ОружиеЦелевое.АтаковатьЦель()'}, a {exit}}, geometry: (-784; 311; 413; 208)}}}, Simple State: {id: 'n3', name: 'Скан', actions: {a {entry, behavior: 'Сенсор.ПоискВрагаПоДистанции(мин)'}, a {exit, behavior: 'Сенсор.ОстановкаПоиска()'}}, geometry: (-1573; 738; 413; 288)}, Transition: {id: 'n0-n3', source: 'n0', target: 'n3', action: {trigger: 'АнализаторЦели.ЦельПотеряна'}, sp: (0; 0), tp: (0; 0)}, Transition: {id: 'n0-n3#0', source: 'n0', target: 'n3', action: {trigger: 'АнализаторЦели.ЦельУничтожена'}, sp: (0; 0), tp: (0; 0)}, Transition: {id: 'n3-n0::n1', source: 'n3', target: 'n0::n1', action: {trigger: 'Сенсор.ЦельПолучена'}, sp: (0; 0), tp: (0; 0)}, Transition: {id: 'n0::n1-n0::n2', source: 'n0::n1', target: 'n0::n2', action: {trigger: 'ОружиеЦелевое.ЦельВошлаВЗонуАтаки'}, sp: (0; 0), tp: (0; 0)}, Transition: {id: 'n0::n2-n0::n1', source: 'n0::n2', target: 'n0::n1', action: {trigger: 'ОружиеЦелевое.ЦельВышлаИзЗоныАтаки'}, sp: (0; 0), tp: (0; 0)}, Transition: {id: 'n1-n3', source: 'n1', target: 'n3', sp: (0; 0), tp: (0; 0)}}}}
|
Document: {id: '', name: 'Автобортник', format: 'yEd Berloga', meta: {standard version: '1.0', name: 'Автобортник', transition order: transition first, event propagation: block events}, elements: {State Machine: {id: 'G', name: 'Автобортник', elements: {Initial: {id: 'n1', name: '', geometry: (-1623; 753)}, Composite State: {id: 'n0', name: 'Бой', actions: {a {entry}, a {exit}}, geometry: (-786; 492; 517; 770), elements: {Simple State: {id: 'n0::n1', name: 'Сближение', actions: {a {entry, behavior: 'МодульДвижения.ДвигатьсяКЦели()'}, a {exit}}, geometry: (-2; 153; 413; 208)}, Simple State: {id: 'n0::n2', name: 'Атака', actions: {a {entry, behavior: 'ОружиеЦелевое.АтаковатьЦель()'}, a {exit}}, geometry: (2; -181; 413; 208)}}}, Simple State: {id: 'n3', name: 'Скан', actions: {a {entry, behavior: 'Сенсор.ПоискВрагаПоДистанции(мин)'}, a {exit, behavior: 'Сенсор.ОстановкаПоиска()'}}, geometry: (-1573; 738; 413; 288)}, Transition: {id: 'n0-n3', source: 'n0', target: 'n3', action: {trigger: 'АнализаторЦели.ЦельПотеряна'}, sp: (0; 383.459), tp: (413; 142.769)}, Transition: {id: 'n0-n3#0', source: 'n0', target: 'n3', action: {trigger: 'АнализаторЦели.ЦельУничтожена'}, sp: (0; 383.459), tp: (413; 142.769)}, Transition: {id: 'n3-n0::n1', source: 'n3', target: 'n0::n1', action: {trigger: 'Сенсор.ЦельПолучена'}, sp: (413; 109.013), tp: (0; 69.0134)}, Transition: {id: 'n0::n1-n0::n2', source: 'n0::n1', target: 'n0::n2', action: {trigger: 'ОружиеЦелевое.ЦельВошлаВЗонуАтаки'}, sp: (413; 0), tp: (0; 208)}, Transition: {id: 'n0::n2-n0::n1', source: 'n0::n2', target: 'n0::n1', action: {trigger: 'ОружиеЦелевое.ЦельВышлаИзЗоныАтаки'}, sp: (0; 208), tp: (413; 0)}, Transition: {id: 'n1-n3', source: 'n1', target: 'n3', sp: (8.9338; 4.49302), tp: (0; 247.854)}}}}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ exit/
|
|||||||
orientation.stop_motor(AXIS_Z)
|
orientation.stop_motor(AXIS_Z)
|
||||||
</data>
|
</data>
|
||||||
<data key="dGeometry">
|
<data key="dGeometry">
|
||||||
<rect x="445.462036" y="97.713547" width="297.494720" height="506.212646"/>
|
<rect x="35.557465" y="47.118244" width="297.494720" height="506.212646"/>
|
||||||
</data>
|
</data>
|
||||||
<graph id="n0::n0:" edgedefault="directed">
|
<graph id="n0::n0:" edgedefault="directed">
|
||||||
<node id="n0::n0::n0">
|
<node id="n0::n0::n0">
|
||||||
@@ -61,7 +61,7 @@ orientation.stop_motor(AXIS_Z)
|
|||||||
reduce_speed()
|
reduce_speed()
|
||||||
</data>
|
</data>
|
||||||
<data key="dGeometry">
|
<data key="dGeometry">
|
||||||
<rect x="460.462036" y="286.453033" width="267.494720" height="69.211853"/>
|
<rect x="15.000000" y="188.739487" width="267.494720" height="69.211853"/>
|
||||||
</data>
|
</data>
|
||||||
</node>
|
</node>
|
||||||
<node id="n0::n0::n1">
|
<node id="n0::n0::n1">
|
||||||
@@ -70,14 +70,14 @@ reduce_speed()
|
|||||||
calculate_turn()
|
calculate_turn()
|
||||||
</data>
|
</data>
|
||||||
<data key="dGeometry">
|
<data key="dGeometry">
|
||||||
<rect x="460.462036" y="396.384155" width="267.494720" height="69.211853"/>
|
<rect x="15.000000" y="298.670593" width="267.494720" height="69.211853"/>
|
||||||
</data>
|
</data>
|
||||||
</node>
|
</node>
|
||||||
<node id="n0::n0::n2">
|
<node id="n0::n0::n2">
|
||||||
<data key="dVertex">initial</data>
|
<data key="dVertex">initial</data>
|
||||||
<data key="dName"></data>
|
<data key="dName"></data>
|
||||||
<data key="dGeometry">
|
<data key="dGeometry">
|
||||||
<point x="594.209412" y="247.953018"/>
|
<point x="148.747375" y="150.239471"/>
|
||||||
</data>
|
</data>
|
||||||
</node>
|
</node>
|
||||||
<node id="n0::n0::n3">
|
<node id="n0::n0::n3">
|
||||||
@@ -86,7 +86,7 @@ calculate_turn()
|
|||||||
complete_turn()
|
complete_turn()
|
||||||
</data>
|
</data>
|
||||||
<data key="dGeometry">
|
<data key="dGeometry">
|
||||||
<rect x="460.462036" y="506.315277" width="267.494720" height="69.211853"/>
|
<rect x="15.000000" y="408.601746" width="267.494720" height="69.211853"/>
|
||||||
</data>
|
</data>
|
||||||
</node>
|
</node>
|
||||||
</graph>
|
</graph>
|
||||||
@@ -95,14 +95,14 @@ complete_turn()
|
|||||||
<data key="dName">idle</data>
|
<data key="dName">idle</data>
|
||||||
<data key="dData">entry/</data>
|
<data key="dData">entry/</data>
|
||||||
<data key="dGeometry">
|
<data key="dGeometry">
|
||||||
<rect x="766.168030" y="103.962479" width="313.216827" height="117.952454"/>
|
<rect x="356.263458" y="53.367176" width="313.216827" height="117.952454"/>
|
||||||
</data>
|
</data>
|
||||||
</node>
|
</node>
|
||||||
<node id="n0::n2">
|
<node id="n0::n2">
|
||||||
<data key="dName">wait</data>
|
<data key="dName">wait</data>
|
||||||
<data key="dData">entry/</data>
|
<data key="dData">entry/</data>
|
||||||
<data key="dGeometry">
|
<data key="dGeometry">
|
||||||
<rect x="1102.596069" y="106.936821" width="432.212921" height="640.662781"/>
|
<rect x="692.691528" y="56.341518" width="432.212921" height="640.662781"/>
|
||||||
</data>
|
</data>
|
||||||
<graph id="n0::n2:" edgedefault="directed">
|
<graph id="n0::n2:" edgedefault="directed">
|
||||||
<node id="n0::n2::n0">
|
<node id="n0::n2::n0">
|
||||||
@@ -114,7 +114,7 @@ exit/
|
|||||||
orientation.stop_motor(AXIS_Z)
|
orientation.stop_motor(AXIS_Z)
|
||||||
</data>
|
</data>
|
||||||
<data key="dGeometry">
|
<data key="dGeometry">
|
||||||
<rect x="1121.596069" y="320.743958" width="393.600128" height="400.073730"/>
|
<rect x="19.000000" y="213.807129" width="393.600128" height="400.073730"/>
|
||||||
</data>
|
</data>
|
||||||
<graph id="n0::n2::n0:" edgedefault="directed">
|
<graph id="n0::n2::n0:" edgedefault="directed">
|
||||||
<node id="n0::n2::n0::n0">
|
<node id="n0::n2::n0::n0">
|
||||||
@@ -123,7 +123,7 @@ orientation.stop_motor(AXIS_Z)
|
|||||||
orientation.set_motor_moment(AXIS_Z, -M)
|
orientation.set_motor_moment(AXIS_Z, -M)
|
||||||
</data>
|
</data>
|
||||||
<data key="dGeometry">
|
<data key="dGeometry">
|
||||||
<rect x="1140.349731" y="479.237457" width="358.315155" height="75.337151"/>
|
<rect x="18.753662" y="158.493500" width="358.315155" height="75.337151"/>
|
||||||
</data>
|
</data>
|
||||||
</node>
|
</node>
|
||||||
<node id="n0::n2::n0::n1">
|
<node id="n0::n2::n0::n1">
|
||||||
@@ -132,14 +132,14 @@ orientation.set_motor_moment(AXIS_Z, -M)
|
|||||||
orientation.set_motor_moment(AXIS_Z, M)
|
orientation.set_motor_moment(AXIS_Z, M)
|
||||||
</data>
|
</data>
|
||||||
<data key="dGeometry">
|
<data key="dGeometry">
|
||||||
<rect x="1140.349731" y="624.163330" width="358.315155" height="75.337151"/>
|
<rect x="18.753662" y="303.419373" width="358.315155" height="75.337151"/>
|
||||||
</data>
|
</data>
|
||||||
</node>
|
</node>
|
||||||
<node id="n0::n2::n0::n2">
|
<node id="n0::n2::n0::n2">
|
||||||
<data key="dVertex">initial</data>
|
<data key="dVertex">initial</data>
|
||||||
<data key="dName"></data>
|
<data key="dName"></data>
|
||||||
<data key="dGeometry">
|
<data key="dGeometry">
|
||||||
<point x="1319.507324" y="436.352631"/>
|
<point x="197.911255" y="115.608673"/>
|
||||||
</data>
|
</data>
|
||||||
</node>
|
</node>
|
||||||
</graph>
|
</graph>
|
||||||
@@ -148,14 +148,14 @@ orientation.set_motor_moment(AXIS_Z, M)
|
|||||||
<data key="dName">static</data>
|
<data key="dName">static</data>
|
||||||
<data key="dData">entry/</data>
|
<data key="dData">entry/</data>
|
||||||
<data key="dGeometry">
|
<data key="dGeometry">
|
||||||
<rect x="1122.707275" y="201.438705" width="393.600128" height="75.337151"/>
|
<rect x="20.111206" y="94.501884" width="393.600128" height="75.337151"/>
|
||||||
</data>
|
</data>
|
||||||
</node>
|
</node>
|
||||||
<node id="n0::n2::n2">
|
<node id="n0::n2::n2">
|
||||||
<data key="dVertex">initial</data>
|
<data key="dVertex">initial</data>
|
||||||
<data key="dName"></data>
|
<data key="dName"></data>
|
||||||
<data key="dGeometry">
|
<data key="dGeometry">
|
||||||
<point x="1319.507324" y="158.553864"/>
|
<point x="216.911255" y="51.617043"/>
|
||||||
</data>
|
</data>
|
||||||
</node>
|
</node>
|
||||||
</graph>
|
</graph>
|
||||||
@@ -181,10 +181,10 @@ test3sm_orient.py</data>
|
|||||||
</node>
|
</node>
|
||||||
<edge id="e0" source="n1" target="n0::n1">
|
<edge id="e0" source="n1" target="n0::n1">
|
||||||
<data key="dSourcePoint">
|
<data key="dSourcePoint">
|
||||||
<point x="0.000000" y="0.000000"/>
|
<point x="0.000000" y="10.000000"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dTargetPoint">
|
<data key="dTargetPoint">
|
||||||
<point x="23.007910" y="-7.047745"/>
|
<point x="156.608414" y="0.000000"/>
|
||||||
</data>
|
</data>
|
||||||
</edge>
|
</edge>
|
||||||
<edge id="e1" source="n0" target="n0::n1">
|
<edge id="e1" source="n0" target="n0::n1">
|
||||||
@@ -194,10 +194,10 @@ test3sm_orient.py</data>
|
|||||||
<point x="918.657471" y="-4.951387"/>
|
<point x="918.657471" y="-4.951387"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dSourcePoint">
|
<data key="dSourcePoint">
|
||||||
<point x="-157.871811" y="-122.809059"/>
|
<point x="574.737610" y="0.000000"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dTargetPoint">
|
<data key="dTargetPoint">
|
||||||
<point x="-4.118959" y="-7.297270"/>
|
<point x="156.608414" y="0.000000"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dLabelGeometry">
|
<data key="dLabelGeometry">
|
||||||
<point x="-50.904530" y="-43.776615"/>
|
<point x="-50.904530" y="-43.776615"/>
|
||||||
@@ -211,10 +211,10 @@ update_turn_parameters(target_a, 0.0)
|
|||||||
<point x="1018.008484" y="374.381714"/>
|
<point x="1018.008484" y="374.381714"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dSourcePoint">
|
<data key="dSourcePoint">
|
||||||
<point x="95.232048" y="21.029173"/>
|
<point x="156.608414" y="117.952454"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dTargetPoint">
|
<data key="dTargetPoint">
|
||||||
<point x="129.207840" y="23.561827"/>
|
<point x="297.494720" y="276.668121"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dLabelGeometry">
|
<data key="dLabelGeometry">
|
||||||
<point x="-248.976791" y="112.880707"/>
|
<point x="-248.976791" y="112.880707"/>
|
||||||
@@ -228,10 +228,10 @@ update_turn_parameters(target_a, 180.0)
|
|||||||
<point x="1036.419922" y="468.787109"/>
|
<point x="1036.419922" y="468.787109"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dSourcePoint">
|
<data key="dSourcePoint">
|
||||||
<point x="113.643471" y="25.929409"/>
|
<point x="156.608414" y="117.952454"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dTargetPoint">
|
<data key="dTargetPoint">
|
||||||
<point x="148.774094" y="117.967224"/>
|
<point x="297.494720" y="371.073517"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dLabelGeometry">
|
<data key="dLabelGeometry">
|
||||||
<point x="-263.427216" y="205.216812"/>
|
<point x="-263.427216" y="205.216812"/>
|
||||||
@@ -239,19 +239,19 @@ update_turn_parameters(target_a, 180.0)
|
|||||||
</edge>
|
</edge>
|
||||||
<edge id="n0::n0::e0" source="n0::n0::n2" target="n0::n0::n0">
|
<edge id="n0::n0::e0" source="n0::n0::n2" target="n0::n0::n0">
|
||||||
<data key="dSourcePoint">
|
<data key="dSourcePoint">
|
||||||
<point x="0.000000" y="0.000000"/>
|
<point x="0.000000" y="10.000000"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dTargetPoint">
|
<data key="dTargetPoint">
|
||||||
<point x="0.000000" y="0.000000"/>
|
<point x="133.747360" y="0.000000"/>
|
||||||
</data>
|
</data>
|
||||||
</edge>
|
</edge>
|
||||||
<edge id="n0::n0::e1" source="n0::n0::n0" target="n0::n0::n1">
|
<edge id="n0::n0::e1" source="n0::n0::n0" target="n0::n0::n1">
|
||||||
<data key="dData">[completed()]/</data>
|
<data key="dData">[completed()]/</data>
|
||||||
<data key="dSourcePoint">
|
<data key="dSourcePoint">
|
||||||
<point x="0.000000" y="0.000000"/>
|
<point x="133.747360" y="69.211853"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dTargetPoint">
|
<data key="dTargetPoint">
|
||||||
<point x="0.000000" y="0.000000"/>
|
<point x="133.747360" y="0.000000"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dLabelGeometry">
|
<data key="dLabelGeometry">
|
||||||
<point x="1.574948" y="11.386170"/>
|
<point x="1.574948" y="11.386170"/>
|
||||||
@@ -260,10 +260,10 @@ update_turn_parameters(target_a, 180.0)
|
|||||||
<edge id="n0::n0::e2" source="n0::n0::n1" target="n0::n0::n3">
|
<edge id="n0::n0::e2" source="n0::n0::n1" target="n0::n0::n3">
|
||||||
<data key="dData">[completed()]/</data>
|
<data key="dData">[completed()]/</data>
|
||||||
<data key="dSourcePoint">
|
<data key="dSourcePoint">
|
||||||
<point x="0.000000" y="0.000000"/>
|
<point x="133.747360" y="69.211853"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dTargetPoint">
|
<data key="dTargetPoint">
|
||||||
<point x="0.000000" y="0.000000"/>
|
<point x="133.747360" y="0.000000"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dLabelGeometry">
|
<data key="dLabelGeometry">
|
||||||
<point x="5.912465" y="11.386169"/>
|
<point x="5.912465" y="11.386169"/>
|
||||||
@@ -278,10 +278,10 @@ DISPATCH(navigation, 'ORIENTED')
|
|||||||
<point x="1050.996216" y="526.111328"/>
|
<point x="1050.996216" y="526.111328"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dSourcePoint">
|
<data key="dSourcePoint">
|
||||||
<point x="-216.093536" y="98.843132"/>
|
<point x="0.000000" y="419.174500"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dTargetPoint">
|
<data key="dTargetPoint">
|
||||||
<point x="128.219757" y="13.393255"/>
|
<point x="156.608414" y="117.952454"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dLabelGeometry">
|
<data key="dLabelGeometry">
|
||||||
<point x="-237.115860" y="17.656166"/>
|
<point x="-237.115860" y="17.656166"/>
|
||||||
@@ -290,10 +290,10 @@ DISPATCH(navigation, 'ORIENTED')
|
|||||||
<edge id="n0::n2::n0::e0" source="n0::n2::n0::n0" target="n0::n2::n0::n1">
|
<edge id="n0::n2::n0::e0" source="n0::n2::n0::n0" target="n0::n2::n0::n1">
|
||||||
<data key="dData">[orientation.get_angular_velocity(AXIS_Z) < DW]/</data>
|
<data key="dData">[orientation.get_angular_velocity(AXIS_Z) < DW]/</data>
|
||||||
<data key="dSourcePoint">
|
<data key="dSourcePoint">
|
||||||
<point x="-154.388992" y="1.810381"/>
|
<point x="179.157578" y="75.337151"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dTargetPoint">
|
<data key="dTargetPoint">
|
||||||
<point x="-154.388992" y="5.481530"/>
|
<point x="179.157578" y="0.000000"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dLabelGeometry">
|
<data key="dLabelGeometry">
|
||||||
<point x="11.403487" y="9.562100"/>
|
<point x="11.403487" y="9.562100"/>
|
||||||
@@ -302,10 +302,10 @@ DISPATCH(navigation, 'ORIENTED')
|
|||||||
<edge id="n0::n2::n0::e1" source="n0::n2::n0::n1" target="n0::n2::n0::n0">
|
<edge id="n0::n2::n0::e1" source="n0::n2::n0::n1" target="n0::n2::n0::n0">
|
||||||
<data key="dData">[orientation.get_angular_velocity(AXIS_Z) > DW]/</data>
|
<data key="dData">[orientation.get_angular_velocity(AXIS_Z) > DW]/</data>
|
||||||
<data key="dSourcePoint">
|
<data key="dSourcePoint">
|
||||||
<point x="163.300400" y="-10.020717"/>
|
<point x="179.157578" y="0.000000"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dTargetPoint">
|
<data key="dTargetPoint">
|
||||||
<point x="163.300400" y="1.093013"/>
|
<point x="179.157578" y="75.337151"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dLabelGeometry">
|
<data key="dLabelGeometry">
|
||||||
<point x="-299.029510" y="-26.177195"/>
|
<point x="-299.029510" y="-26.177195"/>
|
||||||
@@ -313,18 +313,18 @@ DISPATCH(navigation, 'ORIENTED')
|
|||||||
</edge>
|
</edge>
|
||||||
<edge id="n0::n2::n0::e2" source="n0::n2::n0::n2" target="n0::n2::n0::n0">
|
<edge id="n0::n2::n0::e2" source="n0::n2::n0::n2" target="n0::n2::n0::n0">
|
||||||
<data key="dSourcePoint">
|
<data key="dSourcePoint">
|
||||||
<point x="0.000000" y="0.000000"/>
|
<point x="0.000000" y="10.000000"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dTargetPoint">
|
<data key="dTargetPoint">
|
||||||
<point x="0.000000" y="0.000000"/>
|
<point x="179.157578" y="0.000000"/>
|
||||||
</data>
|
</data>
|
||||||
</edge>
|
</edge>
|
||||||
<edge id="n0::n2::e0" source="n0::n2::n2" target="n0::n2::n1">
|
<edge id="n0::n2::e0" source="n0::n2::n2" target="n0::n2::n1">
|
||||||
<data key="dSourcePoint">
|
<data key="dSourcePoint">
|
||||||
<point x="0.000000" y="0.000000"/>
|
<point x="0.000000" y="10.000000"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dTargetPoint">
|
<data key="dTargetPoint">
|
||||||
<point x="0.000000" y="0.000000"/>
|
<point x="196.800064" y="0.000000"/>
|
||||||
</data>
|
</data>
|
||||||
</edge>
|
</edge>
|
||||||
<edge id="n0::e3" source="n0::n0::n3" target="n0::n2">
|
<edge id="n0::e3" source="n0::n0::n3" target="n0::n2">
|
||||||
@@ -333,10 +333,10 @@ DISPATCH(navigation, 'ORIENTED')
|
|||||||
<point x="665.626831" y="711.283508"/>
|
<point x="665.626831" y="711.283508"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dSourcePoint">
|
<data key="dSourcePoint">
|
||||||
<point x="71.417427" y="14.494992"/>
|
<point x="133.747360" y="69.211853"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dTargetPoint">
|
<data key="dTargetPoint">
|
||||||
<point x="-17.616568" y="284.015320"/>
|
<point x="0.000000" y="604.346680"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dLabelGeometry">
|
<data key="dLabelGeometry">
|
||||||
<point x="17.582609" y="96.752647"/>
|
<point x="17.582609" y="96.752647"/>
|
||||||
@@ -345,10 +345,10 @@ DISPATCH(navigation, 'ORIENTED')
|
|||||||
<edge id="n0::n2::e1" source="n0::n2::n0" target="n0::n2::n1">
|
<edge id="n0::n2::e1" source="n0::n2::n0" target="n0::n2::n1">
|
||||||
<data key="dData">[is_target_dw()]/</data>
|
<data key="dData">[is_target_dw()]/</data>
|
||||||
<data key="dSourcePoint">
|
<data key="dSourcePoint">
|
||||||
<point x="138.107727" y="-80.285820"/>
|
<point x="196.800064" y="0.000000"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dTargetPoint">
|
<data key="dTargetPoint">
|
||||||
<point x="136.996552" y="11.085690"/>
|
<point x="196.800064" y="75.337151"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dLabelGeometry">
|
<data key="dLabelGeometry">
|
||||||
<point x="-100.932228" y="-30.990881"/>
|
<point x="-100.932228" y="-30.990881"/>
|
||||||
@@ -357,10 +357,10 @@ DISPATCH(navigation, 'ORIENTED')
|
|||||||
<edge id="n0::n2::e2" source="n0::n2::n1" target="n0::n2::n0">
|
<edge id="n0::n2::e2" source="n0::n2::n1" target="n0::n2::n0">
|
||||||
<data key="dData">[not is_target_dw()]/</data>
|
<data key="dData">[not is_target_dw()]/</data>
|
||||||
<data key="dSourcePoint">
|
<data key="dSourcePoint">
|
||||||
<point x="-136.091248" y="13.453504"/>
|
<point x="196.800064" y="75.337151"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dTargetPoint">
|
<data key="dTargetPoint">
|
||||||
<point x="-134.980087" y="-169.298065"/>
|
<point x="196.800064" y="0.000000"/>
|
||||||
</data>
|
</data>
|
||||||
<data key="dLabelGeometry">
|
<data key="dLabelGeometry">
|
||||||
<point x="9.669483" y="13.809602"/>
|
<point x="9.669483" y="13.809602"/>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Document: {id: '', name: 'orientation', format: 'yEd Ostranna', meta: {standard version: '1.0', name: 'orientation', transition order: transition first, event propagation: block events}, elements: {State Machine: {id: 'G', name: 'orientation', elements: {Composite State: {id: 'n0', name: 'orientation', actions: {a {entry}}, geometry: (409.905; 50.5953; 1149.48; 725.384), elements: {Composite State: {id: 'n0::n0', name: 'turn', actions: {a {entry, behavior: 'orientation.start_motor(AXIS_Z)'}, a {exit, behavior: 'orientation.stop_motor(AXIS_Z)'}}, geometry: (445.462; 97.7135; 297.495; 506.213), elements: {Simple State: {id: 'n0::n0::n0', name: 'slow_down', actions: {a {entry, behavior: 'reduce_speed()'}}, geometry: (460.462; 286.453; 267.495; 69.2119)}, Simple State: {id: 'n0::n0::n1', name: 'start_turn', actions: {a {entry, behavior: 'calculate_turn()'}}, geometry: (460.462; 396.384; 267.495; 69.2119)}, Initial: {id: 'n0::n0::n2', name: '', geometry: (594.209; 247.953)}, Simple State: {id: 'n0::n0::n3', name: 'finish_turn', actions: {a {entry, behavior: 'complete_turn()'}}, geometry: (460.462; 506.315; 267.495; 69.2119)}}}, Simple State: {id: 'n0::n1', name: 'idle', actions: {a {entry}}, geometry: (766.168; 103.962; 313.217; 117.952)}, Composite State: {id: 'n0::n2', name: 'wait', actions: {a {entry}}, geometry: (1102.6; 106.937; 432.213; 640.663), elements: {Composite State: {id: 'n0::n2::n0', name: 'maintain', actions: {a {entry, behavior: 'orientation.start_motor(AXIS_Z)'}, a {exit, behavior: 'orientation.stop_motor(AXIS_Z)'}}, geometry: (1121.6; 320.744; 393.6; 400.074), elements: {Simple State: {id: 'n0::n2::n0::n0', name: 'correct_cw', actions: {a {entry, behavior: 'orientation.set_motor_moment(AXIS_Z, -M)'}}, geometry: (1140.35; 479.237; 358.315; 75.3372)}, Simple State: {id: 'n0::n2::n0::n1', name: 'correct_ccw', actions: {a {entry, behavior: 'orientation.set_motor_moment(AXIS_Z, M)'}}, geometry: (1140.35; 624.163; 358.315; 75.3372)}, Initial: {id: 'n0::n2::n0::n2', name: '', geometry: (1319.51; 436.353)}}}, Simple State: {id: 'n0::n2::n1', name: 'static', actions: {a {entry}}, geometry: (1122.71; 201.439; 393.6; 75.3372)}, Initial: {id: 'n0::n2::n2', name: '', geometry: (1319.51; 158.554)}}}}}, Initial: {id: 'n1', name: '', geometry: (945.784; -25.4024)}, Comment: {id: 'n2', body: 'Init scripts:
|
Document: {id: '', name: 'orientation', format: 'yEd Ostranna', meta: {standard version: '1.0', name: 'orientation', transition order: transition first, event propagation: block events}, elements: {State Machine: {id: 'G', name: 'orientation', elements: {Composite State: {id: 'n0', name: 'orientation', actions: {a {entry}}, geometry: (409.905; 50.5953; 1149.48; 725.384), elements: {Composite State: {id: 'n0::n0', name: 'turn', actions: {a {entry, behavior: 'orientation.start_motor(AXIS_Z)'}, a {exit, behavior: 'orientation.stop_motor(AXIS_Z)'}}, geometry: (35.5575; 47.1182; 297.495; 506.213), elements: {Simple State: {id: 'n0::n0::n0', name: 'slow_down', actions: {a {entry, behavior: 'reduce_speed()'}}, geometry: (15; 188.739; 267.495; 69.2119)}, Simple State: {id: 'n0::n0::n1', name: 'start_turn', actions: {a {entry, behavior: 'calculate_turn()'}}, geometry: (15; 298.671; 267.495; 69.2119)}, Initial: {id: 'n0::n0::n2', name: '', geometry: (148.747; 150.239)}, Simple State: {id: 'n0::n0::n3', name: 'finish_turn', actions: {a {entry, behavior: 'complete_turn()'}}, geometry: (15; 408.602; 267.495; 69.2119)}}}, Simple State: {id: 'n0::n1', name: 'idle', actions: {a {entry}}, geometry: (356.263; 53.3672; 313.217; 117.952)}, Composite State: {id: 'n0::n2', name: 'wait', actions: {a {entry}}, geometry: (692.692; 56.3415; 432.213; 640.663), elements: {Composite State: {id: 'n0::n2::n0', name: 'maintain', actions: {a {entry, behavior: 'orientation.start_motor(AXIS_Z)'}, a {exit, behavior: 'orientation.stop_motor(AXIS_Z)'}}, geometry: (19; 213.807; 393.6; 400.074), elements: {Simple State: {id: 'n0::n2::n0::n0', name: 'correct_cw', actions: {a {entry, behavior: 'orientation.set_motor_moment(AXIS_Z, -M)'}}, geometry: (18.7537; 158.493; 358.315; 75.3372)}, Simple State: {id: 'n0::n2::n0::n1', name: 'correct_ccw', actions: {a {entry, behavior: 'orientation.set_motor_moment(AXIS_Z, M)'}}, geometry: (18.7537; 303.419; 358.315; 75.3372)}, Initial: {id: 'n0::n2::n0::n2', name: '', geometry: (197.911; 115.609)}}}, Simple State: {id: 'n0::n2::n1', name: 'static', actions: {a {entry}}, geometry: (20.1112; 94.5019; 393.6; 75.3372)}, Initial: {id: 'n0::n2::n2', name: '', geometry: (216.911; 51.617)}}}}}, Initial: {id: 'n1', name: '', geometry: (945.784; -25.4024)}, Comment: {id: 'n2', body: 'Init scripts:
|
||||||
|
|
||||||
test3sm_constants.py
|
test3sm_constants.py
|
||||||
test3sm_orient.py', geometry: (445.462; 652.554; 160.084; 95.0456)}, Transition: {id: 'e0', source: 'n1', target: 'n0::n1', sp: (0; 0), tp: (23.0079; -7.04775)}, Transition: {id: 'e1', source: 'n0', target: 'n0::n1', action: {trigger: 'STOP'}, sp: (-157.872; -122.809), tp: (-4.11896; -7.29727), label: (-50.9045; -43.7766), polyline: [ (826.77; -4.95139), (918.657; -4.95139) ]}, Transition: {id: 'n0::e0', source: 'n0::n1', target: 'n0::n0', action: {trigger: 'TANGENT(target_a)', behavior: 'update_turn_parameters(target_a, 0.0)'}, sp: (95.232; 21.0292), tp: (129.208; 23.5618), label: (-248.977; 112.881), polyline: [ (1018.01; 374.382) ]}, Transition: {id: 'n0::e1', source: 'n0::n1', target: 'n0::n0', action: {trigger: 'BACK(target_a)', behavior: 'update_turn_parameters(target_a, 180.0)'}, sp: (113.643; 25.9294), tp: (148.774; 117.967), label: (-263.427; 205.217), polyline: [ (1036.42; 468.787) ]}, Transition: {id: 'n0::n0::e0', source: 'n0::n0::n2', target: 'n0::n0::n0', sp: (0; 0), tp: (0; 0)}, Transition: {id: 'n0::n0::e1', source: 'n0::n0::n0', target: 'n0::n0::n1', action: {guard: 'completed()'}, sp: (0; 0), tp: (0; 0), label: (1.57495; 11.3862)}, Transition: {id: 'n0::n0::e2', source: 'n0::n0::n1', target: 'n0::n0::n3', action: {guard: 'completed()'}, sp: (0; 0), tp: (0; 0), label: (5.91246; 11.3862)}, Transition: {id: 'n0::e2', source: 'n0::n2', target: 'n0::n1', action: {trigger: 'TIME_TICK', guard: 'orientation_completed()', behavior: 'DISPATCH(cpu, 'ORIENTED')
|
test3sm_orient.py', geometry: (445.462; 652.554; 160.084; 95.0456)}, Transition: {id: 'e0', source: 'n1', target: 'n0::n1', sp: (0; 10), tp: (156.608; 0)}, Transition: {id: 'e1', source: 'n0', target: 'n0::n1', action: {trigger: 'STOP'}, sp: (574.738; 0), tp: (156.608; 0), label: (-50.9045; -43.7766), polyline: [ (826.77; -4.95139), (918.657; -4.95139) ]}, Transition: {id: 'n0::e0', source: 'n0::n1', target: 'n0::n0', action: {trigger: 'TANGENT(target_a)', behavior: 'update_turn_parameters(target_a, 0.0)'}, sp: (156.608; 117.952), tp: (297.495; 276.668), label: (-248.977; 112.881), polyline: [ (1018.01; 374.382) ]}, Transition: {id: 'n0::e1', source: 'n0::n1', target: 'n0::n0', action: {trigger: 'BACK(target_a)', behavior: 'update_turn_parameters(target_a, 180.0)'}, sp: (156.608; 117.952), tp: (297.495; 371.074), label: (-263.427; 205.217), polyline: [ (1036.42; 468.787) ]}, Transition: {id: 'n0::n0::e0', source: 'n0::n0::n2', target: 'n0::n0::n0', sp: (0; 10), tp: (133.747; 0)}, Transition: {id: 'n0::n0::e1', source: 'n0::n0::n0', target: 'n0::n0::n1', action: {guard: 'completed()'}, sp: (133.747; 69.2119), tp: (133.747; 0), label: (1.57495; 11.3862)}, Transition: {id: 'n0::n0::e2', source: 'n0::n0::n1', target: 'n0::n0::n3', action: {guard: 'completed()'}, sp: (133.747; 69.2119), tp: (133.747; 0), label: (5.91246; 11.3862)}, Transition: {id: 'n0::e2', source: 'n0::n2', target: 'n0::n1', action: {trigger: 'TIME_TICK', guard: 'orientation_completed()', behavior: 'DISPATCH(cpu, 'ORIENTED')
|
||||||
DISPATCH(navigation, 'ORIENTED')'}, sp: (-216.094; 98.8431), tp: (128.22; 13.3933), label: (-237.116; 17.6562), polyline: [ (1051; 526.111) ]}, Transition: {id: 'n0::n2::n0::e0', source: 'n0::n2::n0::n0', target: 'n0::n2::n0::n1', action: {guard: 'orientation.get_angular_velocity(AXIS_Z) < DW'}, sp: (-154.389; 1.81038), tp: (-154.389; 5.48153), label: (11.4035; 9.5621)}, Transition: {id: 'n0::n2::n0::e1', source: 'n0::n2::n0::n1', target: 'n0::n2::n0::n0', action: {guard: 'orientation.get_angular_velocity(AXIS_Z) > DW'}, sp: (163.3; -10.0207), tp: (163.3; 1.09301), label: (-299.03; -26.1772)}, Transition: {id: 'n0::n2::n0::e2', source: 'n0::n2::n0::n2', target: 'n0::n2::n0::n0', sp: (0; 0), tp: (0; 0)}, Transition: {id: 'n0::n2::e0', source: 'n0::n2::n2', target: 'n0::n2::n1', sp: (0; 0), tp: (0; 0)}, Transition: {id: 'n0::e3', source: 'n0::n0::n3', target: 'n0::n2', action: {guard: 'completed()'}, sp: (71.4174; 14.495), tp: (-17.6166; 284.015), label: (17.5826; 96.7526), polyline: [ (665.627; 711.284) ]}, Transition: {id: 'n0::n2::e1', source: 'n0::n2::n0', target: 'n0::n2::n1', action: {guard: 'is_target_dw()'}, sp: (138.108; -80.2858), tp: (136.997; 11.0857), label: (-100.932; -30.9909)}, Transition: {id: 'n0::n2::e2', source: 'n0::n2::n1', target: 'n0::n2::n0', action: {guard: 'not is_target_dw()'}, sp: (-136.091; 13.4535), tp: (-134.98; -169.298), label: (9.66948; 13.8096)}}}}
|
DISPATCH(navigation, 'ORIENTED')'}, sp: (0; 419.174), tp: (156.608; 117.952), label: (-237.116; 17.6562), polyline: [ (1051; 526.111) ]}, Transition: {id: 'n0::n2::n0::e0', source: 'n0::n2::n0::n0', target: 'n0::n2::n0::n1', action: {guard: 'orientation.get_angular_velocity(AXIS_Z) < DW'}, sp: (179.158; 75.3372), tp: (179.158; 0), label: (11.4035; 9.5621)}, Transition: {id: 'n0::n2::n0::e1', source: 'n0::n2::n0::n1', target: 'n0::n2::n0::n0', action: {guard: 'orientation.get_angular_velocity(AXIS_Z) > DW'}, sp: (179.158; 0), tp: (179.158; 75.3372), label: (-299.03; -26.1772)}, Transition: {id: 'n0::n2::n0::e2', source: 'n0::n2::n0::n2', target: 'n0::n2::n0::n0', sp: (0; 10), tp: (179.158; 0)}, Transition: {id: 'n0::n2::e0', source: 'n0::n2::n2', target: 'n0::n2::n1', sp: (0; 10), tp: (196.8; 0)}, Transition: {id: 'n0::e3', source: 'n0::n0::n3', target: 'n0::n2', action: {guard: 'completed()'}, sp: (133.747; 69.2119), tp: (0; 604.347), label: (17.5826; 96.7526), polyline: [ (665.627; 711.284) ]}, Transition: {id: 'n0::n2::e1', source: 'n0::n2::n0', target: 'n0::n2::n1', action: {guard: 'is_target_dw()'}, sp: (196.8; 0), tp: (196.8; 75.3372), label: (-100.932; -30.9909)}, Transition: {id: 'n0::n2::e2', source: 'n0::n2::n1', target: 'n0::n2::n0', action: {guard: 'not is_target_dw()'}, sp: (196.8; 75.3372), tp: (196.8; 0), label: (9.66948; 13.8096)}}}}
|
||||||
|
|||||||
40
tests/19-legacy-geometry.cpp
Normal file
40
tests/19-legacy-geometry.cpp
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/* -----------------------------------------------------------------------------
|
||||||
|
* The Cyberiada GraphML C++ library implemention
|
||||||
|
*
|
||||||
|
* The test
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024 Alexey Fedoseev <aleksey@fedoseev.net>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see https://www.gnu.org/licenses/
|
||||||
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
#include "cyberiadamlpp.h"
|
||||||
|
|
||||||
|
using namespace Cyberiada;
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
Document d;
|
||||||
|
try {
|
||||||
|
d.load(string(argv[0]) + "-input.graphml", formatLegacyYED);
|
||||||
|
cout << d << endl;
|
||||||
|
d.save(string(argv[0]) + ".graphml", formatCyberiada10);
|
||||||
|
} catch (const Cyberiada::Exception& e) {
|
||||||
|
cerr << e.str() << endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
208
tests/19-legacy-geometry.test-input.graphml
Normal file
208
tests/19-legacy-geometry.test-input.graphml
Normal file
@@ -0,0 +1,208 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:java="http://www.yworks.com/xml/yfiles-common/1.0/java" xmlns:sys="http://www.yworks.com/xml/yfiles-common/markup/primitives/2.0" xmlns:x="http://www.yworks.com/xml/yfiles-common/markup/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xmlns:yed="http://www.yworks.com/xml/yed/3" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd">
|
||||||
|
<!--Created by yEd 3.22-->
|
||||||
|
<key attr.name="Description" attr.type="string" for="graph" id="d0"/>
|
||||||
|
<key for="port" id="d1" yfiles.type="portgraphics"/>
|
||||||
|
<key for="port" id="d2" yfiles.type="portgeometry"/>
|
||||||
|
<key for="port" id="d3" yfiles.type="portuserdata"/>
|
||||||
|
<key attr.name="url" attr.type="string" for="node" id="d4"/>
|
||||||
|
<key attr.name="description" attr.type="string" for="node" id="d5"/>
|
||||||
|
<key for="node" id="d6" yfiles.type="nodegraphics"/>
|
||||||
|
<key for="graphml" id="d7" yfiles.type="resources"/>
|
||||||
|
<key attr.name="url" attr.type="string" for="edge" id="d8"/>
|
||||||
|
<key attr.name="description" attr.type="string" for="edge" id="d9"/>
|
||||||
|
<key for="edge" id="d10" yfiles.type="edgegraphics"/>
|
||||||
|
<graph edgedefault="directed" id="G">
|
||||||
|
<data key="d0" xml:space="preserve"/>
|
||||||
|
<node id="n0" yfiles.foldertype="group">
|
||||||
|
<data key="d6">
|
||||||
|
<y:ProxyAutoBoundsNode>
|
||||||
|
<y:Realizers active="0">
|
||||||
|
<y:GroupNode>
|
||||||
|
<y:Geometry height="450" width="1000" x="-5" y="-5"/>
|
||||||
|
<y:Fill color="#F5F5F5" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Consolas" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="970.5001510062414" x="0.0" xml:space="preserve" y="0.0">node 0</y:NodeLabel>
|
||||||
|
<y:NodeLabel alignment="left" autoSizePolicy="node_size" bottomInset="10" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="452.38341509094073" horizontalTextPosition="center" iconTextGap="4" leftInset="10" modelName="internal" modelPosition="tr" rightInset="10" textColor="#000000" topInset="10" verticalTextPosition="bottom" visible="true" width="970.5001510062414" x="-4.0" xml:space="preserve" y="4.0">
|
||||||
|
|
||||||
|
</y:NodeLabel>
|
||||||
|
<y:Shape type="roundrectangle"/>
|
||||||
|
<y:State closed="false" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
|
||||||
|
<y:NodeBounds considerNodeLabelSize="true"/>
|
||||||
|
<y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
|
||||||
|
<y:BorderInsets bottom="46" bottomF="45.70312500000023" left="17" leftF="17.130593607305826" right="34" rightF="33.743750000000546" top="45" topF="45.22812500000009"/>
|
||||||
|
</y:GroupNode>
|
||||||
|
<y:GroupNode>
|
||||||
|
<y:Geometry height="51.4609375" width="88.0" x="0.0" y="0.0"/>
|
||||||
|
<y:Fill color="#F5F5F5" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Consolas" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="88.0" x="0.0" xml:space="preserve" y="0.0">parent 0</y:NodeLabel>
|
||||||
|
<y:NodeLabel alignment="left" autoSizePolicy="node_size" bottomInset="10" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="51.4609375" horizontalTextPosition="center" iconTextGap="4" leftInset="10" modelName="internal" modelPosition="tr" rightInset="10" textColor="#000000" topInset="10" verticalTextPosition="bottom" visible="true" width="88.0" x="-4.0" xml:space="preserve" y="4.0">
|
||||||
|
|
||||||
|
</y:NodeLabel>
|
||||||
|
<y:Shape type="roundrectangle"/>
|
||||||
|
<y:State closed="true" closedHeight="51.4609375" closedWidth="88.0" innerGraphDisplayEnabled="false"/>
|
||||||
|
<y:NodeBounds considerNodeLabelSize="true"/>
|
||||||
|
<y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
|
||||||
|
<y:BorderInsets bottom="118" bottomF="118.08944746942686" left="86" leftF="86.26940639269415" right="36" rightF="35.54337899543384" top="4" topF="3.9313501903903045"/>
|
||||||
|
</y:GroupNode>
|
||||||
|
</y:Realizers>
|
||||||
|
</y:ProxyAutoBoundsNode>
|
||||||
|
</data>
|
||||||
|
<graph edgedefault="directed" id="n0:">
|
||||||
|
<node id="n0::n0" yfiles.foldertype="group">
|
||||||
|
<data key="d6">
|
||||||
|
<y:ProxyAutoBoundsNode>
|
||||||
|
<y:Realizers active="0">
|
||||||
|
<y:GroupNode>
|
||||||
|
<y:Geometry height="300" width="600" x="50" y="50"/>
|
||||||
|
<y:Fill color="#F5F5F5" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Consolas" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="660.8733566763747" x="0.0" xml:space="preserve" y="0.0">node 0-0</y:NodeLabel>
|
||||||
|
<y:NodeLabel alignment="left" autoSizePolicy="node_size" bottomInset="10" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="305.99122759094047" horizontalTextPosition="center" iconTextGap="4" leftInset="10" modelName="internal" modelPosition="tr" rightInset="10" textColor="#000000" topInset="10" verticalTextPosition="bottom" visible="true" width="660.8733566763747" x="-4.0" xml:space="preserve" y="3.999999999999943">
|
||||||
|
|
||||||
|
</y:NodeLabel>
|
||||||
|
<y:Shape type="roundrectangle"/>
|
||||||
|
<y:State closed="false" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
|
||||||
|
<y:NodeBounds considerNodeLabelSize="true"/>
|
||||||
|
<y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
|
||||||
|
<y:BorderInsets bottom="47" bottomF="46.874999999999886" left="59" leftF="58.99835667637461" right="22" rightF="21.875" top="23" topF="22.655290090940582"/>
|
||||||
|
</y:GroupNode>
|
||||||
|
<y:GroupNode>
|
||||||
|
<y:Geometry height="51.4609375" width="88.0" x="0.0" y="0.0"/>
|
||||||
|
<y:Fill color="#F5F5F5" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Consolas" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="88.0" x="0.0" xml:space="preserve" y="0.0">parent 0</y:NodeLabel>
|
||||||
|
<y:NodeLabel alignment="left" autoSizePolicy="node_size" bottomInset="10" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="51.4609375" horizontalTextPosition="center" iconTextGap="4" leftInset="10" modelName="internal" modelPosition="tr" rightInset="10" textColor="#000000" topInset="10" verticalTextPosition="bottom" visible="true" width="88.0" x="-4.0" xml:space="preserve" y="4.0">
|
||||||
|
|
||||||
|
</y:NodeLabel>
|
||||||
|
<y:Shape type="roundrectangle"/>
|
||||||
|
<y:State closed="true" closedHeight="51.4609375" closedWidth="88.0" innerGraphDisplayEnabled="false"/>
|
||||||
|
<y:NodeBounds considerNodeLabelSize="true"/>
|
||||||
|
<y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
|
||||||
|
<y:BorderInsets bottom="118" bottomF="118.08944746942686" left="86" leftF="86.26940639269415" right="36" rightF="35.54337899543384" top="4" topF="3.9313501903903045"/>
|
||||||
|
</y:GroupNode>
|
||||||
|
</y:Realizers>
|
||||||
|
</y:ProxyAutoBoundsNode>
|
||||||
|
</data>
|
||||||
|
<graph edgedefault="directed" id="n0::n0:">
|
||||||
|
<node id="n0::n0::n0">
|
||||||
|
<data key="d6">
|
||||||
|
<y:GenericNode configuration="com.yworks.bpmn.Event">
|
||||||
|
<y:Geometry height="10.0" width="10.0" x="245" y="115"/>
|
||||||
|
<y:Fill color="#333333" color2="#000000" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="4.0" x="14.0" y="2.5490196078431495">
|
||||||
|
<y:LabelModel>
|
||||||
|
<y:SmartNodeLabelModel distance="4.0"/>
|
||||||
|
</y:LabelModel>
|
||||||
|
<y:ModelParameter>
|
||||||
|
<y:SmartNodeLabelModelParameter labelRatioX="-0.5" labelRatioY="-0.5" nodeRatioX="0.5" nodeRatioY="-0.24509803921568613" offsetX="4.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
|
||||||
|
</y:ModelParameter>
|
||||||
|
</y:NodeLabel>
|
||||||
|
<y:StyleProperties>
|
||||||
|
<y:Property class="com.yworks.yfiles.bpmn.view.EventCharEnum" name="com.yworks.bpmn.characteristic" value="EVENT_CHARACTERISTIC_START"/>
|
||||||
|
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.line.color" value="#000000"/>
|
||||||
|
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.fill2" value="#d4d4d4cc"/>
|
||||||
|
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.fill" value="#ffffffe6"/>
|
||||||
|
<y:Property class="com.yworks.yfiles.bpmn.view.BPMNTypeEnum" name="com.yworks.bpmn.type" value="EVENT_TYPE_PLAIN"/>
|
||||||
|
</y:StyleProperties>
|
||||||
|
</y:GenericNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n0::n0::n1">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:GenericNode configuration="com.yworks.entityRelationship.big_entity">
|
||||||
|
<y:Geometry height="150.0" width="300.0" x="100" y="150"/>
|
||||||
|
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="12" fontStyle="bold" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="300.0" x="0.0" xml:space="preserve" y="4.0">node 0-0-0</y:NodeLabel>
|
||||||
|
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.attributes" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="45.90625" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.814453125" x="4.0" xml:space="preserve" y="4.0">
|
||||||
|
|
||||||
|
|
||||||
|
</y:NodeLabel>
|
||||||
|
<y:StyleProperties>
|
||||||
|
<y:Property class="java.lang.Boolean" name="y.view.ShadowNodePainter.SHADOW_PAINTING" value="false"/>
|
||||||
|
<y:Property class="java.lang.Boolean" name="doubleBorder" value="false"/>
|
||||||
|
</y:StyleProperties>
|
||||||
|
</y:GenericNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n0::n0::n2">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:GenericNode configuration="com.yworks.entityRelationship.big_entity">
|
||||||
|
<y:Geometry height="150.0" width="150.0" x="500" y="150"/>
|
||||||
|
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="12" fontStyle="bold" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="150.0" x="0.0" xml:space="preserve" y="4.0">node 0-0-1</y:NodeLabel>
|
||||||
|
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.attributes" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="4.0" x="4.0" y="4.0"/>
|
||||||
|
<y:StyleProperties>
|
||||||
|
<y:Property class="java.lang.Boolean" name="y.view.ShadowNodePainter.SHADOW_PAINTING" value="false"/>
|
||||||
|
<y:Property class="java.lang.Boolean" name="doubleBorder" value="false"/>
|
||||||
|
</y:StyleProperties>
|
||||||
|
</y:GenericNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
</graph>
|
||||||
|
</node>
|
||||||
|
<node id="n0::n1">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:GenericNode configuration="com.yworks.entityRelationship.big_entity">
|
||||||
|
<y:Geometry height="150.0" width="150.0" x="800" y="150"/>
|
||||||
|
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="12" fontStyle="bold" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="150.0" x="0.0" xml:space="preserve" y="4.0">node 0-1</y:NodeLabel>
|
||||||
|
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.attributes" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="4.0" x="4.0" y="4.0"/>
|
||||||
|
<y:StyleProperties>
|
||||||
|
<y:Property class="java.lang.Boolean" name="y.view.ShadowNodePainter.SHADOW_PAINTING" value="false"/>
|
||||||
|
<y:Property class="java.lang.Boolean" name="doubleBorder" value="false"/>
|
||||||
|
</y:StyleProperties>
|
||||||
|
</y:GenericNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
</graph>
|
||||||
|
</node>
|
||||||
|
<edge id="n0::n0::e0" source="n0::n0::n1" target="n0::n0::n1">
|
||||||
|
<data key="d10">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0">
|
||||||
|
<y:Point x="75" y="225"/>
|
||||||
|
<y:Point x="75" y="325"/>
|
||||||
|
<y:Point x="250" y="325"/>
|
||||||
|
</y:Path>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="standard"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="33.859375" x="3.7781014984796855" xml:space="preserve" y="100.78889772605316"><y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="6.283185307179586" distance="10.60701968581491" distanceToCenter="true" position="right" ratio="0.2817913132870727" segment="2"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="false"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="n0::n0::e1" source="n0::n0::n0" target="n0::n0::n1">
|
||||||
|
<data key="d10">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="standard"/>
|
||||||
|
<y:BendStyle smoothed="false"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="n0::n0::e2" source="n0::n0::n1" target="n0::n0::n2">
|
||||||
|
<data key="d10">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="50.0" sy="30.0" tx="-40.0" ty="30.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="standard"/>
|
||||||
|
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="41.39453125" x="0" xml:space="preserve" y="45">LABEL<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="6.283185307179586" distance="45.0" distanceToCenter="false" position="right" ratio="-2.0" segment="-1"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
|
||||||
|
<y:BendStyle smoothed="false"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
</graph>
|
||||||
|
<data key="d7">
|
||||||
|
<y:Resources/>
|
||||||
|
</data>
|
||||||
|
</graphml>
|
||||||
114
tests/19-output.graphml
Normal file
114
tests/19-output.graphml
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<graphml xmlns="http://graphml.graphdrawing.org/xmlns">
|
||||||
|
<data key="gFormat">Cyberiada-GraphML-1.0</data>
|
||||||
|
<key id="gFormat" for="graphml" attr.name="format" attr.type="string"/>
|
||||||
|
<key id="dName" for="graph" attr.name="name" attr.type="string"/>
|
||||||
|
<key id="dName" for="node" attr.name="name" attr.type="string"/>
|
||||||
|
<key id="dStateMachine" for="graph" attr.name="stateMachine" attr.type="string"/>
|
||||||
|
<key id="dSubmachineState" for="node" attr.name="submachineState" attr.type="string"/>
|
||||||
|
<key id="dGeometry" for="graph" attr.name="geometry"/>
|
||||||
|
<key id="dGeometry" for="node" attr.name="geometry"/>
|
||||||
|
<key id="dGeometry" for="edge" attr.name="geometry"/>
|
||||||
|
<key id="dSourcePoint" for="edge" attr.name="sourcePoint"/>
|
||||||
|
<key id="dTargetPoint" for="edge" attr.name="targetPoint"/>
|
||||||
|
<key id="dLabelGeometry" for="edge" attr.name="labelGeometry"/>
|
||||||
|
<key id="dNote" for="node" attr.name="note" attr.type="string"/>
|
||||||
|
<key id="dVertex" for="node" attr.name="vertex" attr.type="string"/>
|
||||||
|
<key id="dData" for="node" attr.name="data" attr.type="string"/>
|
||||||
|
<key id="dData" for="edge" attr.name="data" attr.type="string"/>
|
||||||
|
<key id="dMarkup" for="node" attr.name="markup" attr.type="string"/>
|
||||||
|
<key id="dColor" for="node" attr.name="color" attr.type="string"/>
|
||||||
|
<key id="dColor" for="edge" attr.name="color" attr.type="string"/>
|
||||||
|
<key id="dPivot" for="edge" attr.name="pivot" attr.type="string"/>
|
||||||
|
<key id="dChunk" for="edge" attr.name="chunk" attr.type="string"/>
|
||||||
|
<graph id="G" edgedefault="directed">
|
||||||
|
<data key="dName">node 0</data>
|
||||||
|
<node id="nMeta">
|
||||||
|
<data key="dNote">formal</data>
|
||||||
|
<data key="dName">CGML_META</data>
|
||||||
|
<data key="dData">standardVersion/ 1.0
|
||||||
|
|
||||||
|
name/ node 0
|
||||||
|
|
||||||
|
transitionOrder/ transitionFirst
|
||||||
|
|
||||||
|
eventPropagation/ block
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n0">
|
||||||
|
<data key="dName">node 0</data>
|
||||||
|
<data key="dGeometry">
|
||||||
|
<rect x="-5.000000" y="-5.000000" width="1000.000000" height="450.000000"/>
|
||||||
|
</data>
|
||||||
|
<graph id="n0:" edgedefault="directed">
|
||||||
|
<node id="n0::n0">
|
||||||
|
<data key="dName">node 0-0</data>
|
||||||
|
<data key="dGeometry">
|
||||||
|
<rect x="55.000000" y="55.000000" width="600.000000" height="300.000000"/>
|
||||||
|
</data>
|
||||||
|
<graph id="n0::n0:" edgedefault="directed">
|
||||||
|
<node id="n0::n0::n0">
|
||||||
|
<data key="dVertex">initial</data>
|
||||||
|
<data key="dName"></data>
|
||||||
|
<data key="dGeometry">
|
||||||
|
<point x="200.000000" y="70.000000"/>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n0::n0::n1">
|
||||||
|
<data key="dName">node 0-0-0</data>
|
||||||
|
<data key="dGeometry">
|
||||||
|
<rect x="50.000000" y="100.000000" width="300.000000" height="150.000000"/>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n0::n0::n2">
|
||||||
|
<data key="dName">node 0-0-1</data>
|
||||||
|
<data key="dGeometry">
|
||||||
|
<rect x="450.000000" y="100.000000" width="150.000000" height="150.000000"/>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
</graph>
|
||||||
|
</node>
|
||||||
|
<node id="n0::n1">
|
||||||
|
<data key="dName">node 0-1</data>
|
||||||
|
<data key="dGeometry">
|
||||||
|
<rect x="805.000000" y="155.000000" width="150.000000" height="150.000000"/>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
</graph>
|
||||||
|
</node>
|
||||||
|
<edge id="n0::n0::e0" source="n0::n0::n1" target="n0::n0::n1">
|
||||||
|
<data key="dGeometry">
|
||||||
|
<point x="75.000000" y="225.000000"/>
|
||||||
|
<point x="75.000000" y="325.000000"/>
|
||||||
|
<point x="250.000000" y="325.000000"/>
|
||||||
|
</data>
|
||||||
|
<data key="dSourcePoint">
|
||||||
|
<point x="0.000000" y="74.999985"/>
|
||||||
|
</data>
|
||||||
|
<data key="dTargetPoint">
|
||||||
|
<point x="150.000000" y="150.000000"/>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="n0::n0::e1" source="n0::n0::n0" target="n0::n0::n1">
|
||||||
|
<data key="dSourcePoint">
|
||||||
|
<point x="0.000000" y="10.000000"/>
|
||||||
|
</data>
|
||||||
|
<data key="dTargetPoint">
|
||||||
|
<point x="150.000000" y="0.000000"/>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="n0::n0::e2" source="n0::n0::n1" target="n0::n0::n2">
|
||||||
|
<data key="dData">LABEL/</data>
|
||||||
|
<data key="dSourcePoint">
|
||||||
|
<point x="300.000000" y="105.000000"/>
|
||||||
|
</data>
|
||||||
|
<data key="dTargetPoint">
|
||||||
|
<point x="0.000000" y="104.999992"/>
|
||||||
|
</data>
|
||||||
|
<data key="dLabelGeometry">
|
||||||
|
<point x="0.000000" y="45.000000"/>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
</graph>
|
||||||
|
</graphml>
|
||||||
1
tests/19-output.txt
Normal file
1
tests/19-output.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Document: {id: '', name: 'node 0', format: 'yEd Ostranna', meta: {standard version: '1.0', name: 'node 0', transition order: transition first, event propagation: block events}, elements: {State Machine: {id: 'G', name: 'node 0', elements: {Composite State: {id: 'n0', name: 'node 0', geometry: (-5; -5; 1000; 450), elements: {Composite State: {id: 'n0::n0', name: 'node 0-0', geometry: (55; 55; 600; 300), elements: {Initial: {id: 'n0::n0::n0', name: '', geometry: (200; 70)}, Simple State: {id: 'n0::n0::n1', name: 'node 0-0-0', geometry: (50; 100; 300; 150)}, Simple State: {id: 'n0::n0::n2', name: 'node 0-0-1', geometry: (450; 100; 150; 150)}}}, Simple State: {id: 'n0::n1', name: 'node 0-1', geometry: (805; 155; 150; 150)}}}, Transition: {id: 'n0::n0::e0', source: 'n0::n0::n1', target: 'n0::n0::n1', sp: (0; 75), tp: (150; 150), polyline: [ (75; 225), (75; 325), (250; 325) ]}, Transition: {id: 'n0::n0::e1', source: 'n0::n0::n0', target: 'n0::n0::n1', sp: (0; 10), tp: (150; 0)}, Transition: {id: 'n0::n0::e2', source: 'n0::n0::n1', target: 'n0::n0::n2', action: {trigger: 'LABEL'}, sp: (300; 105), tp: (0; 105), label: (0; 45)}}}}
|
||||||
40
tests/20-legacy-geometry2.cpp
Normal file
40
tests/20-legacy-geometry2.cpp
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/* -----------------------------------------------------------------------------
|
||||||
|
* The Cyberiada GraphML C++ library implemention
|
||||||
|
*
|
||||||
|
* The test
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024 Alexey Fedoseev <aleksey@fedoseev.net>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see https://www.gnu.org/licenses/
|
||||||
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
#include "cyberiadamlpp.h"
|
||||||
|
|
||||||
|
using namespace Cyberiada;
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
Document d;
|
||||||
|
try {
|
||||||
|
d.load(string(argv[0]) + "-input.graphml", formatLegacyYED);
|
||||||
|
cout << d << endl;
|
||||||
|
d.save(string(argv[0]) + ".graphml", formatCyberiada10);
|
||||||
|
} catch (const Cyberiada::Exception& e) {
|
||||||
|
cerr << e.str() << endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
192
tests/20-legacy-geometry2.test-input.graphml
Normal file
192
tests/20-legacy-geometry2.test-input.graphml
Normal file
@@ -0,0 +1,192 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:java="http://www.yworks.com/xml/yfiles-common/1.0/java" xmlns:sys="http://www.yworks.com/xml/yfiles-common/markup/primitives/2.0" xmlns:x="http://www.yworks.com/xml/yfiles-common/markup/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xmlns:yed="http://www.yworks.com/xml/yed/3" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd">
|
||||||
|
<!--Created by yEd 3.22-->
|
||||||
|
<key attr.name="Description" attr.type="string" for="graph" id="d0"/>
|
||||||
|
<key for="port" id="d1" yfiles.type="portgraphics"/>
|
||||||
|
<key for="port" id="d2" yfiles.type="portgeometry"/>
|
||||||
|
<key for="port" id="d3" yfiles.type="portuserdata"/>
|
||||||
|
<key attr.name="url" attr.type="string" for="node" id="d4"/>
|
||||||
|
<key attr.name="description" attr.type="string" for="node" id="d5"/>
|
||||||
|
<key for="node" id="d6" yfiles.type="nodegraphics"/>
|
||||||
|
<key for="graphml" id="d7" yfiles.type="resources"/>
|
||||||
|
<key attr.name="url" attr.type="string" for="edge" id="d8"/>
|
||||||
|
<key attr.name="description" attr.type="string" for="edge" id="d9"/>
|
||||||
|
<key for="edge" id="d10" yfiles.type="edgegraphics"/>
|
||||||
|
<graph edgedefault="directed" id="G">
|
||||||
|
<data key="d0" xml:space="preserve"/>
|
||||||
|
<node id="n0" yfiles.foldertype="group">
|
||||||
|
<data key="d6">
|
||||||
|
<y:ProxyAutoBoundsNode>
|
||||||
|
<y:Realizers active="0">
|
||||||
|
<y:GroupNode>
|
||||||
|
<y:Geometry height="800" width="800" x="0" y="0"/>
|
||||||
|
<y:Fill color="#F5F5F5" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Consolas" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="980.9314502062911" x="0.0" xml:space="preserve" y="0.0">parent</y:NodeLabel>
|
||||||
|
<y:NodeLabel alignment="left" autoSizePolicy="node_size" bottomInset="10" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="854.4999762055836" horizontalTextPosition="center" iconTextGap="4" leftInset="10" modelName="internal" modelPosition="tr" rightInset="10" textColor="#000000" topInset="10" verticalTextPosition="bottom" visible="true" width="980.9314502062911" x="-4.0" xml:space="preserve" y="4.0">
|
||||||
|
|
||||||
|
</y:NodeLabel>
|
||||||
|
<y:Shape type="roundrectangle"/>
|
||||||
|
<y:State closed="false" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
|
||||||
|
<y:NodeBounds considerNodeLabelSize="true"/>
|
||||||
|
<y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
|
||||||
|
<y:BorderInsets bottom="23" bottomF="22.65565513959382" left="100" leftF="99.65559360730586" right="111" rightF="110.80339467005115" top="70" topF="70.36137373096454"/>
|
||||||
|
</y:GroupNode>
|
||||||
|
<y:GroupNode>
|
||||||
|
<y:Geometry height="51.4609375" width="88.0" x="0.0" y="0.0"/>
|
||||||
|
<y:Fill color="#F5F5F5" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Consolas" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="88.0" x="0.0" xml:space="preserve" y="0.0">parent 0</y:NodeLabel>
|
||||||
|
<y:NodeLabel alignment="left" autoSizePolicy="node_size" bottomInset="10" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="51.4609375" horizontalTextPosition="center" iconTextGap="4" leftInset="10" modelName="internal" modelPosition="tr" rightInset="10" textColor="#000000" topInset="10" verticalTextPosition="bottom" visible="true" width="88.0" x="-4.0" xml:space="preserve" y="4.0">
|
||||||
|
|
||||||
|
</y:NodeLabel>
|
||||||
|
<y:Shape type="roundrectangle"/>
|
||||||
|
<y:State closed="true" closedHeight="51.4609375" closedWidth="88.0" innerGraphDisplayEnabled="false"/>
|
||||||
|
<y:NodeBounds considerNodeLabelSize="true"/>
|
||||||
|
<y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
|
||||||
|
<y:BorderInsets bottom="118" bottomF="118.08944746942686" left="86" leftF="86.26940639269415" right="36" rightF="35.54337899543384" top="4" topF="3.9313501903903045"/>
|
||||||
|
</y:GroupNode>
|
||||||
|
</y:Realizers>
|
||||||
|
</y:ProxyAutoBoundsNode>
|
||||||
|
</data>
|
||||||
|
<graph edgedefault="directed" id="n0:">
|
||||||
|
<node id="n0::n0">
|
||||||
|
<data key="d6">
|
||||||
|
<y:GenericNode configuration="com.yworks.bpmn.Event">
|
||||||
|
<y:Geometry height="10.0" width="10.0" x="195" y="195"/>
|
||||||
|
<y:Fill color="#333333" color2="#000000" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="4.0" x="14.0" y="2.5490196078431353">
|
||||||
|
<y:LabelModel>
|
||||||
|
<y:SmartNodeLabelModel distance="4.0"/>
|
||||||
|
</y:LabelModel>
|
||||||
|
<y:ModelParameter>
|
||||||
|
<y:SmartNodeLabelModelParameter labelRatioX="-0.5" labelRatioY="-0.5" nodeRatioX="0.5" nodeRatioY="-0.24509803921568613" offsetX="4.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
|
||||||
|
</y:ModelParameter>
|
||||||
|
</y:NodeLabel>
|
||||||
|
<y:StyleProperties>
|
||||||
|
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.line.color" value="#000000"/>
|
||||||
|
<y:Property class="com.yworks.yfiles.bpmn.view.EventCharEnum" name="com.yworks.bpmn.characteristic" value="EVENT_CHARACTERISTIC_START"/>
|
||||||
|
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.fill2" value="#d4d4d4cc"/>
|
||||||
|
<y:Property class="java.awt.Color" name="com.yworks.bpmn.icon.fill" value="#ffffffe6"/>
|
||||||
|
<y:Property class="com.yworks.yfiles.bpmn.view.BPMNTypeEnum" name="com.yworks.bpmn.type" value="EVENT_TYPE_PLAIN"/>
|
||||||
|
</y:StyleProperties>
|
||||||
|
</y:GenericNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n0::n1">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:GenericNode configuration="com.yworks.entityRelationship.big_entity">
|
||||||
|
<y:Geometry height="150.0" width="150.0" x="325" y="325"/>
|
||||||
|
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="12" fontStyle="bold" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="155.0" x="0.0" xml:space="preserve" y="4.0">node 0</y:NodeLabel>
|
||||||
|
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.attributes" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="45.90625" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="7.814453125" x="4.0" xml:space="preserve" y="4.0">
|
||||||
|
|
||||||
|
|
||||||
|
</y:NodeLabel>
|
||||||
|
<y:StyleProperties>
|
||||||
|
<y:Property class="java.lang.Boolean" name="y.view.ShadowNodePainter.SHADOW_PAINTING" value="false"/>
|
||||||
|
<y:Property class="java.lang.Boolean" name="doubleBorder" value="false"/>
|
||||||
|
</y:StyleProperties>
|
||||||
|
</y:GenericNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n0::n2">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:GenericNode configuration="com.yworks.entityRelationship.big_entity">
|
||||||
|
<y:Geometry height="150.0" width="150.0" x="525" y="125"/>
|
||||||
|
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="12" fontStyle="bold" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="150.0" x="0.0" xml:space="preserve" y="4.0">node 1</y:NodeLabel>
|
||||||
|
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.attributes" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="4.0" x="4.0" y="4.0"/>
|
||||||
|
<y:StyleProperties>
|
||||||
|
<y:Property class="java.lang.Boolean" name="y.view.ShadowNodePainter.SHADOW_PAINTING" value="false"/>
|
||||||
|
<y:Property class="java.lang.Boolean" name="doubleBorder" value="false"/>
|
||||||
|
</y:StyleProperties>
|
||||||
|
</y:GenericNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n0::n3">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:GenericNode configuration="com.yworks.entityRelationship.big_entity">
|
||||||
|
<y:Geometry height="150.0" width="150.0" x="525" y="525"/>
|
||||||
|
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="12" fontStyle="bold" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="150.0" x="4.0" xml:space="preserve" y="4.0">node 2</y:NodeLabel>
|
||||||
|
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.attributes" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="4.0" x="4.0" y="4.0"/>
|
||||||
|
<y:StyleProperties>
|
||||||
|
<y:Property class="java.lang.Boolean" name="y.view.ShadowNodePainter.SHADOW_PAINTING" value="false"/>
|
||||||
|
<y:Property class="java.lang.Boolean" name="doubleBorder" value="false"/>
|
||||||
|
</y:StyleProperties>
|
||||||
|
</y:GenericNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n0::n4">
|
||||||
|
<data key="d4" xml:space="preserve"/>
|
||||||
|
<data key="d6">
|
||||||
|
<y:GenericNode configuration="com.yworks.entityRelationship.big_entity">
|
||||||
|
<y:Geometry height="150.0" width="150.0" x="125" y="525"/>
|
||||||
|
<y:Fill color="#E8EEF7" color2="#B7C9E3" transparent="false"/>
|
||||||
|
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#B7C9E3" configuration="com.yworks.entityRelationship.label.name" fontFamily="Dialog" fontSize="12" fontStyle="bold" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="150.0" x="0.0" xml:space="preserve" y="4.0">node 3</y:NodeLabel>
|
||||||
|
<y:NodeLabel alignment="left" autoSizePolicy="content" configuration="com.yworks.entityRelationship.label.attributes" fontFamily="Consolas" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="tl" textColor="#000000" verticalTextPosition="bottom" visible="true" width="4.0" x="4.0" y="4.0"/>
|
||||||
|
<y:StyleProperties>
|
||||||
|
<y:Property class="java.lang.Boolean" name="y.view.ShadowNodePainter.SHADOW_PAINTING" value="false"/>
|
||||||
|
<y:Property class="java.lang.Boolean" name="doubleBorder" value="false"/>
|
||||||
|
</y:StyleProperties>
|
||||||
|
</y:GenericNode>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
</graph>
|
||||||
|
</node>
|
||||||
|
<edge id="n0::e0" source="n0::n0" target="n0::n1">
|
||||||
|
<data key="d10">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="standard"/>
|
||||||
|
<y:BendStyle smoothed="false"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="n0::e1" source="n0::n1" target="n0::n2">
|
||||||
|
<data key="d10">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="standard"/>
|
||||||
|
<y:BendStyle smoothed="false"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="n0::e2" source="n0::n3" target="n0::n1">
|
||||||
|
<data key="d9"/>
|
||||||
|
<data key="d10">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="standard"/>
|
||||||
|
<y:BendStyle smoothed="false"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="n0::e3" source="n0::n4" target="n0::n1">
|
||||||
|
<data key="d9"/>
|
||||||
|
<data key="d10">
|
||||||
|
<y:PolyLineEdge>
|
||||||
|
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
||||||
|
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
||||||
|
<y:Arrows source="none" target="standard"/>
|
||||||
|
<y:BendStyle smoothed="false"/>
|
||||||
|
</y:PolyLineEdge>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
</graph>
|
||||||
|
<data key="d7">
|
||||||
|
<y:Resources/>
|
||||||
|
</data>
|
||||||
|
</graphml>
|
||||||
111
tests/20-output.graphml
Normal file
111
tests/20-output.graphml
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<graphml xmlns="http://graphml.graphdrawing.org/xmlns">
|
||||||
|
<data key="gFormat">Cyberiada-GraphML-1.0</data>
|
||||||
|
<key id="gFormat" for="graphml" attr.name="format" attr.type="string"/>
|
||||||
|
<key id="dName" for="graph" attr.name="name" attr.type="string"/>
|
||||||
|
<key id="dName" for="node" attr.name="name" attr.type="string"/>
|
||||||
|
<key id="dStateMachine" for="graph" attr.name="stateMachine" attr.type="string"/>
|
||||||
|
<key id="dSubmachineState" for="node" attr.name="submachineState" attr.type="string"/>
|
||||||
|
<key id="dGeometry" for="graph" attr.name="geometry"/>
|
||||||
|
<key id="dGeometry" for="node" attr.name="geometry"/>
|
||||||
|
<key id="dGeometry" for="edge" attr.name="geometry"/>
|
||||||
|
<key id="dSourcePoint" for="edge" attr.name="sourcePoint"/>
|
||||||
|
<key id="dTargetPoint" for="edge" attr.name="targetPoint"/>
|
||||||
|
<key id="dLabelGeometry" for="edge" attr.name="labelGeometry"/>
|
||||||
|
<key id="dNote" for="node" attr.name="note" attr.type="string"/>
|
||||||
|
<key id="dVertex" for="node" attr.name="vertex" attr.type="string"/>
|
||||||
|
<key id="dData" for="node" attr.name="data" attr.type="string"/>
|
||||||
|
<key id="dData" for="edge" attr.name="data" attr.type="string"/>
|
||||||
|
<key id="dMarkup" for="node" attr.name="markup" attr.type="string"/>
|
||||||
|
<key id="dColor" for="node" attr.name="color" attr.type="string"/>
|
||||||
|
<key id="dColor" for="edge" attr.name="color" attr.type="string"/>
|
||||||
|
<key id="dPivot" for="edge" attr.name="pivot" attr.type="string"/>
|
||||||
|
<key id="dChunk" for="edge" attr.name="chunk" attr.type="string"/>
|
||||||
|
<graph id="G" edgedefault="directed">
|
||||||
|
<data key="dName">parent</data>
|
||||||
|
<node id="nMeta">
|
||||||
|
<data key="dNote">formal</data>
|
||||||
|
<data key="dName">CGML_META</data>
|
||||||
|
<data key="dData">standardVersion/ 1.0
|
||||||
|
|
||||||
|
name/ parent
|
||||||
|
|
||||||
|
transitionOrder/ transitionFirst
|
||||||
|
|
||||||
|
eventPropagation/ block
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n0">
|
||||||
|
<data key="dName">parent</data>
|
||||||
|
<data key="dGeometry">
|
||||||
|
<rect x="0.000000" y="0.000000" width="800.000000" height="800.000000"/>
|
||||||
|
</data>
|
||||||
|
<graph id="n0:" edgedefault="directed">
|
||||||
|
<node id="n0::n0">
|
||||||
|
<data key="dVertex">initial</data>
|
||||||
|
<data key="dName"></data>
|
||||||
|
<data key="dGeometry">
|
||||||
|
<point x="200.000000" y="200.000000"/>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n0::n1">
|
||||||
|
<data key="dName">node 0</data>
|
||||||
|
<data key="dGeometry">
|
||||||
|
<rect x="325.000000" y="325.000000" width="150.000000" height="150.000000"/>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n0::n2">
|
||||||
|
<data key="dName">node 1</data>
|
||||||
|
<data key="dGeometry">
|
||||||
|
<rect x="525.000000" y="125.000000" width="150.000000" height="150.000000"/>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n0::n3">
|
||||||
|
<data key="dName">node 2</data>
|
||||||
|
<data key="dGeometry">
|
||||||
|
<rect x="525.000000" y="525.000000" width="150.000000" height="150.000000"/>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
<node id="n0::n4">
|
||||||
|
<data key="dName">node 3</data>
|
||||||
|
<data key="dGeometry">
|
||||||
|
<rect x="125.000000" y="525.000000" width="150.000000" height="150.000000"/>
|
||||||
|
</data>
|
||||||
|
</node>
|
||||||
|
</graph>
|
||||||
|
</node>
|
||||||
|
<edge id="n0::e0" source="n0::n0" target="n0::n1">
|
||||||
|
<data key="dSourcePoint">
|
||||||
|
<point x="7.071068" y="7.071068"/>
|
||||||
|
</data>
|
||||||
|
<data key="dTargetPoint">
|
||||||
|
<point x="0.000000" y="0.000000"/>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="n0::e1" source="n0::n1" target="n0::n2">
|
||||||
|
<data key="dSourcePoint">
|
||||||
|
<point x="150.000000" y="0.000000"/>
|
||||||
|
</data>
|
||||||
|
<data key="dTargetPoint">
|
||||||
|
<point x="0.000000" y="150.000000"/>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="n0::e2" source="n0::n3" target="n0::n1">
|
||||||
|
<data key="dSourcePoint">
|
||||||
|
<point x="0.000000" y="0.000000"/>
|
||||||
|
</data>
|
||||||
|
<data key="dTargetPoint">
|
||||||
|
<point x="149.999954" y="150.000000"/>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
<edge id="n0::e3" source="n0::n4" target="n0::n1">
|
||||||
|
<data key="dSourcePoint">
|
||||||
|
<point x="150.000000" y="0.000000"/>
|
||||||
|
</data>
|
||||||
|
<data key="dTargetPoint">
|
||||||
|
<point x="0.000000" y="150.000000"/>
|
||||||
|
</data>
|
||||||
|
</edge>
|
||||||
|
</graph>
|
||||||
|
</graphml>
|
||||||
1
tests/20-output.txt
Normal file
1
tests/20-output.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Document: {id: '', name: 'parent', format: 'yEd Ostranna', meta: {standard version: '1.0', name: 'parent', transition order: transition first, event propagation: block events}, elements: {State Machine: {id: 'G', name: 'parent', elements: {Composite State: {id: 'n0', name: 'parent', geometry: (0; 0; 800; 800), elements: {Initial: {id: 'n0::n0', name: '', geometry: (200; 200)}, Simple State: {id: 'n0::n1', name: 'node 0', geometry: (325; 325; 150; 150)}, Simple State: {id: 'n0::n2', name: 'node 1', geometry: (525; 125; 150; 150)}, Simple State: {id: 'n0::n3', name: 'node 2', geometry: (525; 525; 150; 150)}, Simple State: {id: 'n0::n4', name: 'node 3', geometry: (125; 525; 150; 150)}}}, Transition: {id: 'n0::e0', source: 'n0::n0', target: 'n0::n1', sp: (7.07107; 7.07107), tp: (0; 0)}, Transition: {id: 'n0::e1', source: 'n0::n1', target: 'n0::n2', sp: (150; 0), tp: (0; 150)}, Transition: {id: 'n0::e2', source: 'n0::n3', target: 'n0::n1', sp: (0; 0), tp: (150; 150)}, Transition: {id: 'n0::e3', source: 'n0::n4', target: 'n0::n1', sp: (150; 0), tp: (0; 150)}}}}
|
||||||
Reference in New Issue
Block a user