Salome HOME
Copyrights update 2015.
[samples/datafiles.git] / Superv / Python / GraphEditGraphSwitchs.py
1 # Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
3 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 #
6 # This library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Lesser General Public
8 # License as published by the Free Software Foundation; either
9 # version 2.1 of the License, or (at your option) any later version.
10 #
11 # This library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 # Lesser General Public License for more details.
15 #
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this library; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 #
20 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #
22 from GraphSwitchs import *
23
24 GraphSwitchs.SetName('GraphEditSwitchs')
25 GraphEditSwitchs = GraphSwitchs
26
27 exec GraphEditSwitchs.ListNodes()
28 InitLoopSwitch.destroy()
29
30 aPyFile = os.getenv('DATA_DIR') + '/Superv/Python/GraphEditGraphSwitchs_1.py'
31 GraphEditSwitchs.Export( aPyFile )
32
33 InitLoop.SetName('InitLoopSwitch')
34 InitLoopSwitch = InitLoop
35 EndOfInitLoop.SetName('EndOfInitLoopSwitch')
36 EndOfInitLoopSwitch = EndOfInitLoop
37
38 exec InitLoopSwitch.ListPorts()
39 exec Switch.ListPorts()
40
41 GraphEditSwitchs.Link( OInitLoopSwitchIndex , ISwitcha )
42
43 exec EndOfInitLoopSwitch.ListPorts()
44 IEndOfInitLoopSwitchIndex.Link().destroy()
45
46 aPyFile = os.getenv('DATA_DIR') + '/Superv/Python/GraphEditGraphSwitchs_2.py'
47 GraphEditSwitchs.Export( aPyFile )
48
49 exec EndOfSwitch.ListPorts()
50 GraphEditSwitchs.Link(OEndOfSwitcha,IEndOfInitLoopSwitchIndex)
51
52 exec EndSwitch.ListPorts()
53 GraphEditSwitchs.Link(OEndSwitchGate,IEndOfInitLoopSwitchGate)
54
55 aPyFile = os.getenv('DATA_DIR') + '/Superv/Python/GraphEditGraphSwitchs_3.py'
56 GraphEditSwitchs.Export( aPyFile )
57
58 IsOdd_1.SetName('IsEven')
59 IsEven = IsOdd_1
60
61 exec IsEven.ListPorts()
62 IIsEvena.Link().destroy()
63
64 IIsEvenGate.Link().destroy()
65
66 exec Switch_1.ListPorts()
67 GraphEditSwitchs.Link(OSwitch_1Even,IIsEvenGate)
68
69 aPyFile = os.getenv('DATA_DIR') + '/Superv/Python/GraphEditGraphSwitchs_4.py'
70 GraphEditSwitchs.Export( aPyFile )
71
72 GraphEditSwitchs.PrintLinks()
73
74 L = GraphEditSwitchs.Link(OSwitch_1Even,IEndSwitchDefault)
75 L.destroy()
76
77 aPyFile = os.getenv('DATA_DIR') + '/Superv/Python/GraphEditGraphSwitchs_5.py'
78 GraphEditSwitchs.Export( aPyFile )
79
80 GraphEditSwitchs.Link(OSwitch_1Default,IEndSwitchDefault)
81
82 GraphEditSwitchs.Link(OSwitch_1a,IIsEvena)
83
84 GraphEditSwitchs.Export( aPyFile)
85
86 Switch_1.SetName('')
87
88 from SuperV import *
89
90 aPyFile = os.getenv('DATA_DIR') + '/Superv/Python/GraphEditGraphSwitchs_3.py'
91 GraphEditSwitchs = Graph( aPyFile )
92