1 # Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
3 # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 from GraphSwitchs import *
24 GraphSwitchs.SetName('GraphEditSwitchs')
25 GraphEditSwitchs = GraphSwitchs
27 exec GraphEditSwitchs.ListNodes()
28 InitLoopSwitch.destroy()
30 aPyFile = os.getenv('DATA_DIR') + '/Superv/Python/GraphEditGraphSwitchs_1.py'
31 GraphEditSwitchs.Export( aPyFile )
33 InitLoop.SetName('InitLoopSwitch')
34 InitLoopSwitch = InitLoop
35 EndOfInitLoop.SetName('EndOfInitLoopSwitch')
36 EndOfInitLoopSwitch = EndOfInitLoop
38 exec InitLoopSwitch.ListPorts()
39 exec Switch.ListPorts()
41 GraphEditSwitchs.Link( OInitLoopSwitchIndex , ISwitcha )
43 exec EndOfInitLoopSwitch.ListPorts()
44 IEndOfInitLoopSwitchIndex.Link().destroy()
46 aPyFile = os.getenv('DATA_DIR') + '/Superv/Python/GraphEditGraphSwitchs_2.py'
47 GraphEditSwitchs.Export( aPyFile )
49 exec EndOfSwitch.ListPorts()
50 GraphEditSwitchs.Link(OEndOfSwitcha,IEndOfInitLoopSwitchIndex)
52 exec EndSwitch.ListPorts()
53 GraphEditSwitchs.Link(OEndSwitchGate,IEndOfInitLoopSwitchGate)
55 aPyFile = os.getenv('DATA_DIR') + '/Superv/Python/GraphEditGraphSwitchs_3.py'
56 GraphEditSwitchs.Export( aPyFile )
58 IsOdd_1.SetName('IsEven')
61 exec IsEven.ListPorts()
62 IIsEvena.Link().destroy()
64 IIsEvenGate.Link().destroy()
66 exec Switch_1.ListPorts()
67 GraphEditSwitchs.Link(OSwitch_1Even,IIsEvenGate)
69 aPyFile = os.getenv('DATA_DIR') + '/Superv/Python/GraphEditGraphSwitchs_4.py'
70 GraphEditSwitchs.Export( aPyFile )
72 GraphEditSwitchs.PrintLinks()
74 L = GraphEditSwitchs.Link(OSwitch_1Even,IEndSwitchDefault)
77 aPyFile = os.getenv('DATA_DIR') + '/Superv/Python/GraphEditGraphSwitchs_5.py'
78 GraphEditSwitchs.Export( aPyFile )
80 GraphEditSwitchs.Link(OSwitch_1Default,IEndSwitchDefault)
82 GraphEditSwitchs.Link(OSwitch_1a,IIsEvena)
84 GraphEditSwitchs.Export( aPyFile)
90 aPyFile = os.getenv('DATA_DIR') + '/Superv/Python/GraphEditGraphSwitchs_3.py'
91 GraphEditSwitchs = Graph( aPyFile )