Salome HOME
PR: merge from tag BR_CCRT2_mergeto_V2_1_0b1
authorprascle <prascle>
Mon, 29 Nov 2004 15:59:55 +0000 (15:59 +0000)
committerprascle <prascle>
Mon, 29 Nov 2004 15:59:55 +0000 (15:59 +0000)
100 files changed:
bin/runSalome.py
build_configure
configure.in.base
examples/crank.igs [new file with mode: 0644]
idl/SALOMEDS_Attributes.idl
resources/KERNELCatalog.xml
salome_adm/unix/config_files/ac_cxx_use_std_iostream.m4
salome_adm/unix/config_files/ac_cxx_warnings.m4
salome_adm/unix/config_files/check_Kernel.m4
salome_adm/unix/config_files/check_boost.m4
salome_adm/unix/config_files/check_med2.m4
salome_adm/unix/config_files/check_qt.m4
salome_adm/unix/config_files/check_withihm.m4 [new file with mode: 0644]
salome_adm/unix/config_files/production.m4
salome_adm/unix/envScript.in
salome_adm/unix/make_conclude.in
src/CASCatch/CASCatch_SignalsHandler.cxx
src/Communication/SALOME_Comm_i.cxx
src/Communication/SALOME_Comm_i.hxx
src/Container/Component_i.cxx
src/Container/Container_i.cxx
src/Container/Makefile.in
src/Container/SALOME_Component_i.hxx
src/Container/SALOME_Container_SignalsHandler.cxx
src/Container/SALOME_Container_i.hxx
src/HDFPersist/HDFconvert.cc
src/Loader/Makefile.in
src/MPIContainer/Makefile.in
src/Makefile.in
src/ModuleCatalog/Makefile.in
src/ModuleGenerator/testIDLparser.in
src/OCCViewer/Makefile.in
src/OCCViewer/OCCViewer_ViewFrame.cxx
src/OCCViewer/OCCViewer_ViewFrame.h
src/OCCViewer/OCCViewer_ViewPort3d.cxx
src/OCCViewer/OCCViewer_Viewer3d.cxx
src/OCCViewer/OCCViewer_Viewer3d.h
src/PatchQt/BUGS_DESCRIPTION [new file with mode: 0644]
src/SALOMEDS/Makefile.in
src/SALOMEDS/SALOMEDS_AttributeFlags_i.cxx [new file with mode: 0644]
src/SALOMEDS/SALOMEDS_AttributeFlags_i.hxx [new file with mode: 0644]
src/SALOMEDS/SALOMEDS_AttributeGraphic_i.cxx [new file with mode: 0644]
src/SALOMEDS/SALOMEDS_AttributeGraphic_i.hxx [new file with mode: 0644]
src/SALOMEDS/SALOMEDS_FlagsAttribute.cxx [new file with mode: 0644]
src/SALOMEDS/SALOMEDS_FlagsAttribute.hxx [new file with mode: 0644]
src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx
src/SALOMEDS/SALOMEDS_GraphicAttribute.cxx [new file with mode: 0644]
src/SALOMEDS/SALOMEDS_GraphicAttribute.hxx [new file with mode: 0644]
src/SALOMEDS/SALOMEDS_SObject_i.cxx
src/SALOMEDS/SALOMEDS_SObject_i.hxx
src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx
src/SALOMEDS/SALOMEDS_StudyManager_i.cxx
src/SALOMEGUI/QAD_Desktop.cxx
src/SALOMEGUI/QAD_Study.cxx
src/SALOMEGUI/QAD_Study.h
src/SALOMEGUI/QAD_StudyFrame.cxx
src/SALOMEGUI/QAD_ViewFrame.h
src/SALOMEGUI/SALOMEGUI.cxx
src/SALOMEGUI/SALOMEGUI.h
src/SALOME_PYQT/SALOME_PYQT_GUI.cxx
src/SALOME_PYQT/SALOME_PYQT_GUI.h
src/SALOME_PYQT/SalomePyQt.cxx
src/SALOME_PYQT/SalomePyQt.hxx
src/SALOME_PYQT/SalomePyQt.sip
src/SALOME_SWIG/Makefile.in
src/SALOME_SWIG/batchmode_salome.py
src/SALOME_SWIG_WITHOUTIHM/Help.py [new file with mode: 0755]
src/SALOME_SWIG_WITHOUTIHM/Makefile.in [new file with mode: 0755]
src/SALOME_SWIG_WITHOUTIHM/PyInterp.py [new file with mode: 0755]
src/SALOME_SWIG_WITHOUTIHM/batchmode_salome.py [new file with mode: 0755]
src/SALOME_SWIG_WITHOUTIHM/examplevtk1.py [new file with mode: 0755]
src/SALOME_SWIG_WITHOUTIHM/import_hook.py [new file with mode: 0755]
src/SALOME_SWIG_WITHOUTIHM/kernel_shared_modules.py [new file with mode: 0755]
src/SALOME_SWIG_WITHOUTIHM/salome.py [new file with mode: 0755]
src/SALOME_SWIG_WITHOUTIHM/salome_shared_modules.py [new file with mode: 0755]
src/SALOME_SWIG_WITHOUTIHM/salome_test.py [new file with mode: 0755]
src/SALOME_SWIG_WITHOUTIHM/supervisionexample.py.in [new file with mode: 0755]
src/SALOME_SWIG_WITHOUTIHM/supervisiongeomexample.py.in [new file with mode: 0755]
src/SALOME_SWIG_WITHOUTIHM/test_big_table.py [new file with mode: 0755]
src/SALOME_SWIG_WITHOUTIHM/test_many_objects.py [new file with mode: 0755]
src/SALOME_SWIG_WITHOUTIHM/test_remove_ref.py [new file with mode: 0644]
src/SALOME_SWIG_WITHOUTIHM/test_table.py [new file with mode: 0755]
src/SALOME_SWIG_WITHOUTIHM/testattr.py [new file with mode: 0755]
src/Session/SALOME_Session_Server.cxx
src/TOOLSDS/SALOMEDS_Tool.cxx
src/TOOLSDS/SALOMEDS_Tool.hxx
src/TOOLSGUI/Makefile.in
src/TOOLSGUI/ToolsGUI.cxx
src/TOOLSGUI/ToolsGUI.h
src/TestContainer/SALOME_TestComponent_i.cxx
src/TestContainer/TestContainer.cxx
src/TestMPIContainer/Makefile.in
src/Utils/Utils_DESTRUCTEUR_GENERIQUE.cxx
src/Utils/Utils_Identity.cxx
src/Utils/Utils_SignalsHandler.cxx
src/VTKViewer/VTKViewer_InteractorStyleSALOME.cxx
src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx
src/VTKViewer/VTKViewer_RenderWindowInteractor.h
src/VTKViewer/VTKViewer_ViewFrame.cxx
src/VTKViewer/VTKViewer_ViewFrame.h

index 3ef4833318b9998ba587cff70c000105ac4625f7..9cb2cfc675f12c7c16cabf2936d5b73378f6d86c 100755 (executable)
@@ -179,7 +179,7 @@ from killSalome import killAllPorts
 def killLocalPort():
     """
     kill servers from a previous SALOME exection, if needed,
-    on the same CORBA port
+    on the CORBA port given in args of runSalome
     """
     
     from killSalomeWithPort import killMyPort
@@ -191,7 +191,21 @@ def killLocalPort():
         pass
     pass
     
+def givenPortKill(port):
+    """
+    kill servers from a previous SALOME exection, if needed,
+    on the same CORBA port
+    """
     
+    from killSalomeWithPort import killMyPort
+    my_port=port
+    try:
+        killMyPort(my_port)
+    except:
+        print "problem in LocalPortKill(), killMyPort("<<port<<")"
+        pass
+    pass
+
 def kill_salome(args):
     """
     Kill servers from previous SALOME executions, if needed;
@@ -202,7 +216,7 @@ def kill_salome(args):
     if args['killall']:
         killAllPorts()
     elif args['portkill']:
-        killLocalPort()
+        givenPortKill(str(args['port']))
        
 # -----------------------------------------------------------------------------
 #
@@ -246,7 +260,7 @@ class CatalogServer(Server):
         self.SCMD2=['-personal',
                     '${HOME}/Salome/resources/CatalogModulePersonnel.xml'] 
 
-    def setpath(self,modules_list):
+    def setpath(self,modules_list,modules_root_dir):
         cata_path=[]
         list_modules = modules_list[:]
         list_modules.reverse()
@@ -453,7 +467,7 @@ def startSalome(args, modules_list, modules_root_dir):
 
     if 'moduleCatalog' not in args['embedded']:
         cataServer=CatalogServer(args)
-        cataServer.setpath(modules_list)
+        cataServer.setpath(modules_list,modules_root_dir)
         cataServer.run()
         import SALOME_ModuleCatalog
         clt.waitNS("/Kernel/ModulCatalog",SALOME_ModuleCatalog.ModuleCatalog)
@@ -591,8 +605,10 @@ def useSalome(args, modules_list, modules_root_dir):
     To kill SALOME processes from a console (kill all sessions from all ports):
       python killSalome.py 
     To kill SALOME from the present interpreter, if it is not closed :
-      killLocalPort()  --> kill this session
-      killAllPorts()   --> kill all sessions
+      killLocalPort()      --> kill this session
+                               (use CORBA port from args of runSalome)
+      givenPortKill(port)  --> kill a specific session with given CORBA port 
+      killAllPorts()       --> kill all sessions
     
     runSalome, with --killall option, starts with killing
     the processes resulting from the previous execution.
index 8ce1d16edf507dc0ed325a91bceff90b0b15b673..d3294fb598984b68abfa9d9457bb0f874b8c2ece 100755 (executable)
@@ -28,8 +28,11 @@ CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
 
 find_in()
 {
-  local i
-  local f=$2
+#CCRT
+  #local i
+  i=0
+  #local f=$2
+  f=$2
 
 # if the first argument is not a directory, returns
 
@@ -79,9 +82,13 @@ ABS_CONF_DIR=`pwd`
 # Common part of the configure.in file
 #
 chmod u+w configure.in.base
-if ! \cp -f configure.in.base configure.in_tmp1 
+#CCRT
+#if ! \cp -f configure.in.base configure.in_tmp1
+if \cp -f configure.in.base configure.in_tmp1
 then
        echo
+else
+       echo
        echo "error : can't create files in" ${CONF_DIR}
        echo "aborting ..."
         chmod u-w configure.in.base 
@@ -149,9 +156,13 @@ then
        fi
 else
        echo -n "Updating 'configure.in' file ... "
-       if ! \cp configure.in configure.in_old >& /dev/null
+#CCRT
+#      if ! \cp configure.in configure.in_old >& /dev/null
+       if \cp configure.in configure.in_old >& /dev/null
        then
                echo
+        else
+               echo
                echo
                echo "Can't backup previous configure.in"
                echo -n "Continue (you will not be able to revert) - (Y/N) ? "
index 880355a612a7b0eec58b94076457ce721598ce09..8c0768b44b1863bed16f1fd123c726fa5297665d 100644 (file)
@@ -132,19 +132,27 @@ AC_LINKER_OPTIONS
 
 echo
 echo ---------------------------------------------
-echo BOOST Library
+echo testing threads
 echo ---------------------------------------------
 echo
 
-CHECK_BOOST
+ENABLE_PTHREADS
+
+dnl
+dnl ---------------------------------------------
+dnl testing WITHIHM
+dnl ---------------------------------------------
+dnl
+
+CHECK_WITHIHM
 
 echo
 echo ---------------------------------------------
-echo testing threads
+echo BOOST Library
 echo ---------------------------------------------
 echo
 
-ENABLE_PTHREADS
+CHECK_BOOST
 
 dnl
 dnl ---------------------------------------------
@@ -242,13 +250,6 @@ AC_SUBST_FILE(CORBA)
 corba=make_$ORB
 CORBA=salome_adm/unix/$corba
 
-echo
-echo ---------------------------------------------
-echo testing openGL
-echo ---------------------------------------------
-echo
-
-CHECK_OPENGL
 
 echo
 echo ---------------------------------------------
@@ -258,61 +259,71 @@ echo
 
 CHECK_QT
 
-echo
-echo ---------------------------------------------
-echo testing VTK
-echo ---------------------------------------------
-echo
+if test "X$WITHIHM" = "Xyes"; then
+       echo
+       echo ---------------------------------------------
+       echo Testing sip
+       echo ---------------------------------------------
+       echo
 
-CHECK_VTK
+       CHECK_SIP
 
-echo
-echo ---------------------------------------------
-echo testing HDF5
-echo ---------------------------------------------
-echo
+       echo
+       echo ---------------------------------------------
+       echo testing openGL
+       echo ---------------------------------------------
+       echo
 
-CHECK_HDF5
+       CHECK_OPENGL
 
-echo
-echo ---------------------------------------------
-echo testing MED2
-echo ---------------------------------------------
-echo
+       echo
+       echo ---------------------------------------------
+       echo testing VTK
+       echo ---------------------------------------------
+       echo
 
-CHECK_MED2
+       CHECK_VTK
 
-echo
-echo ---------------------------------------------
-echo Testing OpenCascade
-echo ---------------------------------------------
-echo
+       echo
+       echo ---------------------------------------------
+       echo Testing pyqt
+       echo ---------------------------------------------
+       echo
 
-CHECK_CAS
+       CHECK_PYQT
+
+       echo
+       echo ---------------------------------------------
+       echo Testing qwt
+       echo ---------------------------------------------
+       echo
+
+       CHECK_QWT
+fi
 
 echo
 echo ---------------------------------------------
-echo Testing sip
+echo testing HDF5
 echo ---------------------------------------------
 echo
 
-CHECK_SIP
+CHECK_HDF5
 
 echo
 echo ---------------------------------------------
-echo Testing pyqt
+echo testing MED2
 echo ---------------------------------------------
 echo
 
-CHECK_PYQT
+CHECK_MED2
 
 echo
 echo ---------------------------------------------
-echo Testing qwt
+echo Testing OpenCascade
 echo ---------------------------------------------
 echo
 
-CHECK_QWT
+CHECK_CAS
 
 echo
 echo ---------------------------------------------
@@ -402,8 +413,8 @@ do
   local_bin=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"`
   case "$local_bin" in
         *.in | *~) ;;
-        ./bin/CVS | ./bin/salome)                    ;;
-        *) /usr/bin/install -c $i .; echo $local_bin ;;
+        ./bin/CVS | ./bin/salome) ;;
+        *) $INSTALL $i .; echo $local_bin ;;
   esac
 done
 cd $ROOT_BUILDDIR
diff --git a/examples/crank.igs b/examples/crank.igs
new file mode 100644 (file)
index 0000000..5c3ab16
--- /dev/null
@@ -0,0 +1,1012 @@
+                                                                        S0000001
+,,,13HFilename.iges,31HMATRA-DATAVISION EUCLID-QUANTUM,                 G0000001
+45HOL-2.0D on SunOS 5.5.1 sparc Sun_Microsystems,32,308,15,308,15,      G0000002
+7HUnknown,1.,2,2HMM,1,0.01,13H981223.100346,0.0001,160.525285,7Hcascade,G0000003
+16HMatra Datavision,9,0,13H981223.100346;                               G0000004
+     402       1       0       0       0       0       0       000000000D0000001
+     402       0       0       1       1                               0D0000002
+     144       2       0       0       0       0       0       000020000D0000003
+     144       0       0       1       0                               0D0000004
+     128       3       0       0       0       0       0       000010000D0000005
+     128       0       0       7       0                               0D0000006
+     142      10       0       0       0       0       0       000010500D0000007
+     142       0       0       1       0                               0D0000008
+     102      11       0       0       0       0       0       000010000D0000009
+     102       0       0       1       0                               0D0000010
+     126      12       0       0       0       0       0       000010000D0000011
+     126       0       0       9       0                               0D0000012
+     110      21       0       0       0       0       0       000010000D0000013
+     110       0       0       1       0                               0D0000014
+     126      22       0       0       0       0       0       000010000D0000015
+     126       0       0       9       0                               0D0000016
+     100      31       0       0       0       0       0       000010000D0000017
+     100       0       0       2       0                               0D0000018
+     126      33       0       0       0       0       0       000010000D0000019
+     126       0       0       9       0                               0D0000020
+     110      42       0       0       0       0       0       000010000D0000021
+     110       0       0       2       0                               0D0000022
+     126      44       0       0       0       0       0       000010000D0000023
+     126       0       0       9       0                               0D0000024
+     100      53       0       0       0       0       0       000010000D0000025
+     100       0       0       2       0                               0D0000026
+     102      55       0       0       0       0       0       000010000D0000027
+     102       0       0       1       0                               0D0000028
+     100      56       0       0       0       0      31       000010000D0000029
+     100       0       0       1       0                               0D0000030
+     124      57       0       0       0       0       0       000000000D0000031
+     124       0       0       2       0                               0D0000032
+     110      59       0       0       0       0       0       000010000D0000033
+     110       0       0       2       0                               0D0000034
+     100      61       0       0       0       0      37       000010000D0000035
+     100       0       0       2       0                               0D0000036
+     124      63       0       0       0       0       0       000000000D0000037
+     124       0       0       2       0                               0D0000038
+     100      65       0       0       0       0      41       000010000D0000039
+     100       0       0       2       0                               0D0000040
+     124      67       0       0       0       0       0       000000000D0000041
+     124       0       0       2       0                               0D0000042
+     100      69       0       0       0       0      45       000010000D0000043
+     100       0       0       2       0                               0D0000044
+     124      71       0       0       0       0       0       000000000D0000045
+     124       0       0       2       0                               0D0000046
+     110      73       0       0       0       0       0       000010000D0000047
+     110       0       0       2       0                               0D0000048
+     100      75       0       0       0       0      51       000010000D0000049
+     100       0       0       2       0                               0D0000050
+     124      77       0       0       0       0       0       000000000D0000051
+     124       0       0       2       0                               0D0000052
+     100      79       0       0       0       0      55       000010000D0000053
+     100       0       0       2       0                               0D0000054
+     124      81       0       0       0       0       0       000000000D0000055
+     124       0       0       2       0                               0D0000056
+     142      83       0       0       0       0       0       000010500D0000057
+     142       0       0       1       0                               0D0000058
+     126      84       0       0       0       0       0       000010000D0000059
+     126       0       0      10       0                               0D0000060
+     126      94       0       0       0       0       0       000010000D0000061
+     126       0       0      12       0                               0D0000062
+     142     106       0       0       0       0       0       000010500D0000063
+     142       0       0       1       0                               0D0000064
+     126     107       0       0       0       0       0       000010000D0000065
+     126       0       0      10       0                               0D0000066
+     126     117       0       0       0       0       0       000010000D0000067
+     126       0       0      12       0                               0D0000068
+     144     129       0       0       0       0       0       000020000D0000069
+     144       0       0       1       0                               0D0000070
+     120     130       0       0       0       0      73       000010000D0000071
+     120       0       0       1       0                               0D0000072
+     124     131       0       0       0       0       0       000000000D0000073
+     124       0       0       2       0                               0D0000074
+     110     133       0       0       0       0       0       000010000D0000075
+     110       0       0       1       0                               0D0000076
+     110     134       0       0       0       0       0       000010000D0000077
+     110       0       0       1       0                               0D0000078
+     142     135       0       0       0       0       0       000010500D0000079
+     142       0       0       1       0                               0D0000080
+     102     136       0       0       0       0       0       000010000D0000081
+     102       0       0       1       0                               0D0000082
+     110     137       0       0       0       0       0       000010000D0000083
+     110       0       0       1       0                               0D0000084
+     110     138       0       0       0       0       0       000010000D0000085
+     110       0       0       2       0                               0D0000086
+     110     140       0       0       0       0       0       000010000D0000087
+     110       0       0       1       0                               0D0000088
+     110     141       0       0       0       0       0       000010000D0000089
+     110       0       0       1       0                               0D0000090
+     102     142       0       0       0       0       0       000010000D0000091
+     102       0       0       1       0                               0D0000092
+     110     143       0       0       0       0       0       000010000D0000093
+     110       0       0       2       0                               0D0000094
+     100     145       0       0       0       0      97       000010000D0000095
+     100       0       0       2       0                               0D0000096
+     124     147       0       0       0       0       0       000000000D0000097
+     124       0       0       2       0                               0D0000098
+     110     149       0       0       0       0       0       000010000D0000099
+     110       0       0       2       0                               0D0000100
+     100     151       0       0       0       0     103       000010000D0000101
+     100       0       0       1       0                               0D0000102
+     124     152       0       0       0       0       0       000000000D0000103
+     124       0       0       2       0                               0D0000104
+     144     154       0       0       0       0       0       000020000D0000105
+     144       0       0       1       0                               0D0000106
+     120     155       0       0       0       0     109       000010000D0000107
+     120       0       0       1       0                               0D0000108
+     124     156       0       0       0       0       0       000000000D0000109
+     124       0       0       2       0                               0D0000110
+     110     158       0       0       0       0       0       000010000D0000111
+     110       0       0       1       0                               0D0000112
+     110     159       0       0       0       0       0       000010000D0000113
+     110       0       0       1       0                               0D0000114
+     142     160       0       0       0       0       0       000010500D0000115
+     142       0       0       1       0                               0D0000116
+     102     161       0       0       0       0       0       000010000D0000117
+     102       0       0       1       0                               0D0000118
+     110     162       0       0       0       0       0       000010000D0000119
+     110       0       0       1       0                               0D0000120
+     110     163       0       0       0       0       0       000010000D0000121
+     110       0       0       2       0                               0D0000122
+     110     165       0       0       0       0       0       000010000D0000123
+     110       0       0       1       0                               0D0000124
+     110     166       0       0       0       0       0       000010000D0000125
+     110       0       0       1       0                               0D0000126
+     102     167       0       0       0       0       0       000010000D0000127
+     102       0       0       1       0                               0D0000128
+     110     168       0       0       0       0       0       000010000D0000129
+     110       0       0       2       0                               0D0000130
+     100     170       0       0       0       0     133       000010000D0000131
+     100       0       0       2       0                               0D0000132
+     124     172       0       0       0       0       0       000000000D0000133
+     124       0       0       2       0                               0D0000134
+     110     174       0       0       0       0       0       000010000D0000135
+     110       0       0       2       0                               0D0000136
+     100     176       0       0       0       0     139       000010000D0000137
+     100       0       0       2       0                               0D0000138
+     124     178       0       0       0       0       0       000000000D0000139
+     124       0       0       2       0                               0D0000140
+     144     180       0       0       0       0       0       000020000D0000141
+     144       0       0       1       0                               0D0000142
+     120     181       0       0       0       0     145       000010000D0000143
+     120       0       0       1       0                               0D0000144
+     124     182       0       0       0       0       0       000000000D0000145
+     124       0       0       2       0                               0D0000146
+     110     184       0       0       0       0       0       000010000D0000147
+     110       0       0       1       0                               0D0000148
+     110     185       0       0       0       0       0       000010000D0000149
+     110       0       0       1       0                               0D0000150
+     142     186       0       0       0       0       0       000010500D0000151
+     142       0       0       1       0                               0D0000152
+     102     187       0       0       0       0       0       000010000D0000153
+     102       0       0       1       0                               0D0000154
+     110     188       0       0       0       0       0       000010000D0000155
+     110       0       0       1       0                               0D0000156
+     110     189       0       0       0       0       0       000010000D0000157
+     110       0       0       2       0                               0D0000158
+     110     191       0       0       0       0       0       000010000D0000159
+     110       0       0       1       0                               0D0000160
+     110     192       0       0       0       0       0       000010000D0000161
+     110       0       0       1       0                               0D0000162
+     102     193       0       0       0       0       0       000010000D0000163
+     102       0       0       1       0                               0D0000164
+     110     194       0       0       0       0       0       000010000D0000165
+     110       0       0       2       0                               0D0000166
+     100     196       0       0       0       0     169       000010000D0000167
+     100       0       0       1       0                               0D0000168
+     124     197       0       0       0       0       0       000000000D0000169
+     124       0       0       2       0                               0D0000170
+     110     199       0       0       0       0       0       000010000D0000171
+     110       0       0       2       0                               0D0000172
+     100     201       0       0       0       0     175       000010000D0000173
+     100       0       0       2       0                               0D0000174
+     124     203       0       0       0       0       0       000000000D0000175
+     124       0       0       2       0                               0D0000176
+     144     205       0       0       0       0       0       000020000D0000177
+     144       0       0       1       0                               0D0000178
+     128     206       0       0       0       0       0       000010000D0000179
+     128       0       0       6       0                               0D0000180
+     142     212       0       0       0       0       0       000010500D0000181
+     142       0       0       1       0                               0D0000182
+     102     213       0       0       0       0       0       000010000D0000183
+     102       0       0       1       0                               0D0000184
+     110     214       0       0       0       0       0       000010000D0000185
+     110       0       0       1       0                               0D0000186
+     110     215       0       0       0       0       0       000010000D0000187
+     110       0       0       1       0                               0D0000188
+     110     216       0       0       0       0       0       000010000D0000189
+     110       0       0       1       0                               0D0000190
+     110     217       0       0       0       0       0       000010000D0000191
+     110       0       0       1       0                               0D0000192
+     102     218       0       0       0       0       0       000010000D0000193
+     102       0       0       1       0                               0D0000194
+     110     219       0       0       0       0       0       000010000D0000195
+     110       0       0       2       0                               0D0000196
+     110     221       0       0       0       0       0       000010000D0000197
+     110       0       0       2       0                               0D0000198
+     110     223       0       0       0       0       0       000010000D0000199
+     110       0       0       2       0                               0D0000200
+     110     225       0       0       0       0       0       000010000D0000201
+     110       0       0       2       0                               0D0000202
+     144     227       0       0       0       0       0       000020000D0000203
+     144       0       0       1       0                               0D0000204
+     120     228       0       0       0       0     207       000010000D0000205
+     120       0       0       1       0                               0D0000206
+     124     229       0       0       0       0       0       000000000D0000207
+     124       0       0       2       0                               0D0000208
+     110     231       0       0       0       0       0       000010000D0000209
+     110       0       0       1       0                               0D0000210
+     110     232       0       0       0       0       0       000010000D0000211
+     110       0       0       1       0                               0D0000212
+     142     233       0       0       0       0       0       000010500D0000213
+     142       0       0       1       0                               0D0000214
+     102     234       0       0       0       0       0       000010000D0000215
+     102       0       0       1       0                               0D0000216
+     110     235       0       0       0       0       0       000010000D0000217
+     110       0       0       1       0                               0D0000218
+     110     236       0       0       0       0       0       000010000D0000219
+     110       0       0       2       0                               0D0000220
+     110     238       0       0       0       0       0       000010000D0000221
+     110       0       0       1       0                               0D0000222
+     110     239       0       0       0       0       0       000010000D0000223
+     110       0       0       1       0                               0D0000224
+     102     240       0       0       0       0       0       000010000D0000225
+     102       0       0       1       0                               0D0000226
+     110     241       0       0       0       0       0       000010000D0000227
+     110       0       0       2       0                               0D0000228
+     100     243       0       0       0       0     231       000010000D0000229
+     100       0       0       1       0                               0D0000230
+     124     244       0       0       0       0       0       000000000D0000231
+     124       0       0       2       0                               0D0000232
+     110     246       0       0       0       0       0       000010000D0000233
+     110       0       0       2       0                               0D0000234
+     100     248       0       0       0       0     237       000010000D0000235
+     100       0       0       2       0                               0D0000236
+     124     250       0       0       0       0       0       000000000D0000237
+     124       0       0       2       0                               0D0000238
+     144     252       0       0       0       0       0       000020000D0000239
+     144       0       0       1       0                               0D0000240
+     120     253       0       0       0       0     243       000010000D0000241
+     120       0       0       1       0                               0D0000242
+     124     254       0       0       0       0       0       000000000D0000243
+     124       0       0       2       0                               0D0000244
+     110     256       0       0       0       0       0       000010000D0000245
+     110       0       0       1       0                               0D0000246
+     110     257       0       0       0       0       0       000010000D0000247
+     110       0       0       1       0                               0D0000248
+     142     258       0       0       0       0       0       000010500D0000249
+     142       0       0       1       0                               0D0000250
+     102     259       0       0       0       0       0       000010000D0000251
+     102       0       0       1       0                               0D0000252
+     110     260       0       0       0       0       0       000010000D0000253
+     110       0       0       1       0                               0D0000254
+     110     261       0       0       0       0       0       000010000D0000255
+     110       0       0       2       0                               0D0000256
+     110     263       0       0       0       0       0       000010000D0000257
+     110       0       0       1       0                               0D0000258
+     110     264       0       0       0       0       0       000010000D0000259
+     110       0       0       1       0                               0D0000260
+     102     265       0       0       0       0       0       000010000D0000261
+     102       0       0       1       0                               0D0000262
+     110     266       0       0       0       0       0       000010000D0000263
+     110       0       0       2       0                               0D0000264
+     100     268       0       0       0       0     267       000010000D0000265
+     100       0       0       2       0                               0D0000266
+     124     270       0       0       0       0       0       000000000D0000267
+     124       0       0       2       0                               0D0000268
+     110     272       0       0       0       0       0       000010000D0000269
+     110       0       0       2       0                               0D0000270
+     100     274       0       0       0       0     273       000010000D0000271
+     100       0       0       2       0                               0D0000272
+     124     276       0       0       0       0       0       000000000D0000273
+     124       0       0       2       0                               0D0000274
+     144     278       0       0       0       0       0       000020000D0000275
+     144       0       0       1       0                               0D0000276
+     120     279       0       0       0       0     279       000010000D0000277
+     120       0       0       1       0                               0D0000278
+     124     280       0       0       0       0       0       000000000D0000279
+     124       0       0       2       0                               0D0000280
+     110     282       0       0       0       0       0       000010000D0000281
+     110       0       0       1       0                               0D0000282
+     110     283       0       0       0       0       0       000010000D0000283
+     110       0       0       1       0                               0D0000284
+     142     284       0       0       0       0       0       000010500D0000285
+     142       0       0       1       0                               0D0000286
+     102     285       0       0       0       0       0       000010000D0000287
+     102       0       0       1       0                               0D0000288
+     110     286       0       0       0       0       0       000010000D0000289
+     110       0       0       1       0                               0D0000290
+     110     287       0       0       0       0       0       000010000D0000291
+     110       0       0       2       0                               0D0000292
+     110     289       0       0       0       0       0       000010000D0000293
+     110       0       0       1       0                               0D0000294
+     110     290       0       0       0       0       0       000010000D0000295
+     110       0       0       1       0                               0D0000296
+     102     291       0       0       0       0       0       000010000D0000297
+     102       0       0       1       0                               0D0000298
+     110     292       0       0       0       0       0       000010000D0000299
+     110       0       0       2       0                               0D0000300
+     100     294       0       0       0       0     303       000010000D0000301
+     100       0       0       2       0                               0D0000302
+     124     296       0       0       0       0       0       000000000D0000303
+     124       0       0       2       0                               0D0000304
+     110     298       0       0       0       0       0       000010000D0000305
+     110       0       0       2       0                               0D0000306
+     100     300       0       0       0       0     309       000010000D0000307
+     100       0       0       2       0                               0D0000308
+     124     302       0       0       0       0       0       000000000D0000309
+     124       0       0       2       0                               0D0000310
+     144     304       0       0       0       0       0       000020000D0000311
+     144       0       0       1       0                               0D0000312
+     128     305       0       0       0       0       0       000010000D0000313
+     128       0       0       6       0                               0D0000314
+     142     311       0       0       0       0       0       000010500D0000315
+     142       0       0       1       0                               0D0000316
+     102     312       0       0       0       0       0       000010000D0000317
+     102       0       0       1       0                               0D0000318
+     110     313       0       0       0       0       0       000010000D0000319
+     110       0       0       1       0                               0D0000320
+     110     314       0       0       0       0       0       000010000D0000321
+     110       0       0       1       0                               0D0000322
+     110     315       0       0       0       0       0       000010000D0000323
+     110       0       0       1       0                               0D0000324
+     110     316       0       0       0       0       0       000010000D0000325
+     110       0       0       1       0                               0D0000326
+     102     317       0       0       0       0       0       000010000D0000327
+     102       0       0       1       0                               0D0000328
+     110     318       0       0       0       0       0       000010000D0000329
+     110       0       0       2       0                               0D0000330
+     110     320       0       0       0       0       0       000010000D0000331
+     110       0       0       2       0                               0D0000332
+     110     322       0       0       0       0       0       000010000D0000333
+     110       0       0       2       0                               0D0000334
+     110     324       0       0       0       0       0       000010000D0000335
+     110       0       0       2       0                               0D0000336
+     144     326       0       0       0       0       0       000020000D0000337
+     144       0       0       1       0                               0D0000338
+     120     327       0       0       0       0     341       000010000D0000339
+     120       0       0       1       0                               0D0000340
+     124     328       0       0       0       0       0       000000000D0000341
+     124       0       0       2       0                               0D0000342
+     110     330       0       0       0       0       0       000010000D0000343
+     110       0       0       1       0                               0D0000344
+     110     331       0       0       0       0       0       000010000D0000345
+     110       0       0       1       0                               0D0000346
+     142     332       0       0       0       0       0       000010500D0000347
+     142       0       0       1       0                               0D0000348
+     102     333       0       0       0       0       0       000010000D0000349
+     102       0       0       1       0                               0D0000350
+     110     334       0       0       0       0       0       000010000D0000351
+     110       0       0       1       0                               0D0000352
+     110     335       0       0       0       0       0       000010000D0000353
+     110       0       0       2       0                               0D0000354
+     110     337       0       0       0       0       0       000010000D0000355
+     110       0       0       1       0                               0D0000356
+     126     338       0       0       0       0       0       000010000D0000357
+     126       0       0       3       0                               0D0000358
+     102     341       0       0       0       0       0       000010000D0000359
+     102       0       0       1       0                               0D0000360
+     110     342       0       0       0       0       0       000010000D0000361
+     110       0       0       2       0                               0D0000362
+     126     344       0       0       0       0       0       000010000D0000363
+     126       0       0      12       0                               0D0000364
+     110     356       0       0       0       0       0       000010000D0000365
+     110       0       0       2       0                               0D0000366
+     126     358       0       0       0       0       0       000010000D0000367
+     126       0       0      12       0                               0D0000368
+     144     370       0       0       0       0       0       000020000D0000369
+     144       0       0       1       0                               0D0000370
+     120     371       0       0       0       0     373       000010000D0000371
+     120       0       0       1       0                               0D0000372
+     124     372       0       0       0       0       0       000000000D0000373
+     124       0       0       2       0                               0D0000374
+     110     374       0       0       0       0       0       000010000D0000375
+     110       0       0       1       0                               0D0000376
+     110     375       0       0       0       0       0       000010000D0000377
+     110       0       0       1       0                               0D0000378
+     142     376       0       0       0       0       0       000010500D0000379
+     142       0       0       1       0                               0D0000380
+     102     377       0       0       0       0       0       000010000D0000381
+     102       0       0       1       0                               0D0000382
+     110     378       0       0       0       0       0       000010000D0000383
+     110       0       0       1       0                               0D0000384
+     110     379       0       0       0       0       0       000010000D0000385
+     110       0       0       2       0                               0D0000386
+     110     381       0       0       0       0       0       000010000D0000387
+     110       0       0       1       0                               0D0000388
+     126     382       0       0       0       0       0       000010000D0000389
+     126       0       0       3       0                               0D0000390
+     102     385       0       0       0       0       0       000010000D0000391
+     102       0       0       1       0                               0D0000392
+     110     386       0       0       0       0       0       000010000D0000393
+     110       0       0       2       0                               0D0000394
+     126     388       0       0       0       0       0       000010000D0000395
+     126       0       0      12       0                               0D0000396
+     110     400       0       0       0       0       0       000010000D0000397
+     110       0       0       2       0                               0D0000398
+     126     402       0       0       0       0       0       000010000D0000399
+     126       0       0      12       0                               0D0000400
+     144     414       0       0       0       0       0       000020000D0000401
+     144       0       0       1       0                               0D0000402
+     128     415       0       0       0       0       0       000010000D0000403
+     128       0       0       7       0                               0D0000404
+     142     422       0       0       0       0       0       000010500D0000405
+     142       0       0       1       0                               0D0000406
+     102     423       0       0       0       0       0       000010000D0000407
+     102       0       0       1       0                               0D0000408
+     126     424       0       0       0       0       0       000010000D0000409
+     126       0       0       9       0                               0D0000410
+     110     433       0       0       0       0       0       000010000D0000411
+     110       0       0       1       0                               0D0000412
+     126     434       0       0       0       0       0       000010000D0000413
+     126       0       0       9       0                               0D0000414
+     100     443       0       0       0       0       0       000010000D0000415
+     100       0       0       2       0                               0D0000416
+     126     445       0       0       0       0       0       000010000D0000417
+     126       0       0       9       0                               0D0000418
+     110     454       0       0       0       0       0       000010000D0000419
+     110       0       0       2       0                               0D0000420
+     126     456       0       0       0       0       0       000010000D0000421
+     126       0       0       9       0                               0D0000422
+     100     465       0       0       0       0       0       000010000D0000423
+     100       0       0       2       0                               0D0000424
+     102     467       0       0       0       0       0       000010000D0000425
+     102       0       0       1       0                               0D0000426
+     100     468       0       0       0       0     429       000010000D0000427
+     100       0       0       1       0                               0D0000428
+     124     469       0       0       0       0       0       000000000D0000429
+     124       0       0       2       0                               0D0000430
+     110     471       0       0       0       0       0       000010000D0000431
+     110       0       0       2       0                               0D0000432
+     100     473       0       0       0       0     435       000010000D0000433
+     100       0       0       2       0                               0D0000434
+     124     475       0       0       0       0       0       000000000D0000435
+     124       0       0       2       0                               0D0000436
+     100     477       0       0       0       0     439       000010000D0000437
+     100       0       0       2       0                               0D0000438
+     124     479       0       0       0       0       0       000000000D0000439
+     124       0       0       2       0                               0D0000440
+     100     481       0       0       0       0     443       000010000D0000441
+     100       0       0       2       0                               0D0000442
+     124     483       0       0       0       0       0       000000000D0000443
+     124       0       0       2       0                               0D0000444
+     110     485       0       0       0       0       0       000010000D0000445
+     110       0       0       2       0                               0D0000446
+     100     487       0       0       0       0     449       000010000D0000447
+     100       0       0       2       0                               0D0000448
+     124     489       0       0       0       0       0       000000000D0000449
+     124       0       0       2       0                               0D0000450
+     100     491       0       0       0       0     453       000010000D0000451
+     100       0       0       2       0                               0D0000452
+     124     493       0       0       0       0       0       000000000D0000453
+     124       0       0       2       0                               0D0000454
+     142     495       0       0       0       0       0       000010500D0000455
+     142       0       0       1       0                               0D0000456
+     126     496       0       0       0       0       0       000010000D0000457
+     126       0       0      10       0                               0D0000458
+     126     506       0       0       0       0       0       000010000D0000459
+     126       0       0      12       0                               0D0000460
+     142     518       0       0       0       0       0       000010500D0000461
+     142       0       0       1       0                               0D0000462
+     126     519       0       0       0       0       0       000010000D0000463
+     126       0       0      10       0                               0D0000464
+     126     529       0       0       0       0       0       000010000D0000465
+     126       0       0      12       0                               0D0000466
+402,12,3,69,105,141,177,203,239,275,311,337,369,401;             0000001P0000001
+144,5,1,2,7,57,63;                                               0000003P0000002
+128,1,1,1,1,0,0,1,0,0,-139.650442578,-139.650442578,             0000005P0000003
+164.864616815,164.864616815,-52.441943309,-52.441943309,         0000005P0000004
+47.40098106,47.40098106,1.,1.,1.,1.,-139.650442578,              0000005P0000005
+-52.441943309,-19.999999553,164.864616815,-52.441943309,         0000005P0000006
+-19.999999553,-139.650442578,47.40098106,-19.999999553,          0000005P0000007
+164.864616815,47.40098106,-19.999999553,-139.650442578,          0000005P0000008
+164.864616815,-52.441943309,47.40098106;                         0000005P0000009
+142,0,5,9,27,3;                                                  0000007P0000010
+102,8,11,13,15,17,19,21,23,25;                                   0000009P0000011
+126,7,4,0,0,0,0,1.073345169,1.073345169,1.073345169,1.073345169, 0000011P0000012
+1.073345169,1.284126135,1.284126135,1.284126135,1.494907102,     0000011P0000013
+1.494907102,1.494907102,1.494907102,1.494907102,1.011189921,     0000011P0000014
+1.011189921,1.011189931,1.011179532,1.011179532,1.011189931,     0000011P0000015
+1.011189921,1.011189921,93.497879803,36.745399237,0.,            0000011P0000016
+90.049436422,34.872902929,0.,86.473696164,33.245011418,0.,       0000011P0000017
+82.790432165,31.870724965,0.,75.248696652,29.647496417,0.,       0000011P0000018
+71.408940021,28.804071284,0.,67.521947549,28.232023481,0.,       0000011P0000019
+63.609212637,27.934517711,0.,1.073345169,1.494907102,0.,0.,1.;   0000011P0000020
+110,63.609212637,27.934517711,0.,-72.422526777,17.591310665,0.;  0000013P0000021
+126,7,4,0,0,0,0,1.367007434,1.367007434,1.367007434,1.367007434, 0000015P0000022
+1.367007434,1.781832767,1.781832767,1.781832767,2.1966581,       0000015P0000023
+2.1966581,2.1966581,2.1966581,2.1966581,1.044284595,1.044284595, 0000015P0000024
+1.044285207,1.044124006,1.044124006,1.044285207,1.044284595,     0000015P0000025
+1.044284595,-72.422526777,17.591310665,0.,-74.496301391,         0000015P0000026
+17.162749235,0.,-76.619336034,17.023005488,0.,-78.746721852,     0000015P0000027
+17.175011565,0.,-82.917772227,18.068559876,0.,-84.920732008,     0000015P0000028
+18.80138208,0.,-86.800206478,19.798568183,0.,-88.516429067,      0000015P0000029
+21.039046347,0.,1.367007434,2.1966581,0.,0.,1.;                  0000015P0000030
+100,0.,-105.960486735,-3.095103428,-88.516429067,21.039046347,   0000017P0000031
+-88.516429067,-27.229253203;                                     0000017P0000032
+126,7,4,0,0,0,0,4.086527207,4.086527207,4.086527207,4.086527207, 0000019P0000033
+4.086527207,4.434162711,4.434162711,4.434162711,4.781798214,     0000019P0000034
+4.781798214,4.781798214,4.781798214,4.781798214,1.03083173,      0000019P0000035
+1.03083173,1.03083194,1.030753477,1.030753477,1.03083194,        0000019P0000036
+1.03083173,1.03083173,-88.516429067,-27.229253203,0.,            0000019P0000037
+-86.786150795,-25.978615653,0.,-84.916794517,-24.932704109,0.,   0000019P0000038
+-82.936273839,-24.107124921,0.,-78.80986423,-22.928478295,0.,    0000019P0000039
+-76.69208436,-22.583439786,0.,-74.552323437,-22.484207509,0.,    0000019P0000040
+-72.422526777,-22.632272914,0.,4.086527207,4.781798214,0.,0.,1.; 0000019P0000041
+110,-72.422526777,-22.632272914,0.,59.138831837,-31.778538464,   0000021P0000042
+0.;                                                              0000021P0000043
+126,7,4,0,0,0,0,4.781798214,4.781798214,4.781798214,4.781798214, 0000023P0000044
+4.781798214,4.995819176,4.995819176,4.995819176,5.209840139,     0000023P0000045
+5.209840139,5.209840139,5.209840139,5.209840139,1.011539234,     0000023P0000046
+1.011539234,1.011539246,1.011528189,1.011528189,1.011539246,     0000023P0000047
+1.011539234,1.011539234,59.138831837,-31.778538464,0.,           0000023P0000048
+63.635671563,-32.09116286,0.,68.104473804,-32.724194555,0.,      0000023P0000049
+72.519765903,-33.674023313,0.,81.191994379,-36.199999233,0.,     0000023P0000050
+85.426740197,-37.76968291,0.,89.536511056,-39.635347961,0.,      0000023P0000051
+93.497879803,-41.786361486,0.,4.781798214,5.209840139,0.,0.,1.;  0000023P0000052
+100,0.,114.819156639,-2.520481125,93.497879803,-41.786361486,    0000025P0000053
+93.497879803,36.745399237;                                       0000025P0000054
+102,8,29,33,35,39,43,47,49,53;                                   0000027P0000055
+100,0.,0.,0.,35.534447703,65.441267094,5.645780537,74.252148619; 0000029P0000056
+124,1.,0.,0.,57.9634321,0.,-1.,0.,102.18666633,0.,0.,-1.,        0000031P0000057
+-19.999999553;                                                   0000031P0000058
+110,63.609212637,27.934517711,-19.999999553,-72.422526777,       0000033P0000059
+17.591310665,-19.999999553;                                      0000033P0000060
+100,0.,0.,0.,4.132451861,19.996605313,-11.961450429,             0000035P0000061
+16.548869631;                                                    0000035P0000062
+124,1.,0.,0.,-76.554978638,0.,-1.,0.,37.587915978,0.,0.,-1.,     0000037P0000063
+-19.999999553;                                                   0000037P0000064
+100,0.,0.,0.,17.444057668,24.134149775,17.444057668,             0000039P0000065
+-24.134149775;                                                   0000039P0000066
+124,1.,0.,-0.,-105.960486735,0.,1.,0.,-3.095103428,0.,0.,1.,     0000041P0000067
+-19.999999553;                                                   0000041P0000068
+100,0.,0.,0.,-14.390216636,-19.90910889,1.703685653,             0000043P0000069
+-24.506089179;                                                   0000043P0000070
+124,1.,0.,0.,-74.12621243,0.,-1.,0.,-47.138362093,0.,0.,-1.,     0000045P0000071
+-19.999999553;                                                   0000045P0000072
+110,-72.422526777,-22.632272914,-19.999999553,59.138831837,      0000047P0000073
+-31.778538464,-19.999999553;                                     0000047P0000074
+100,0.,0.,0.,5.842874313,-84.04484635,40.201922279,              0000049P0000075
+-74.037023328;                                                   0000049P0000076
+124,1.,0.,0.,53.295957524,0.,-1.,0.,-115.823384813,0.,0.,-1.,    0000051P0000077
+-19.999999553;                                                   0000051P0000078
+100,0.,0.,0.,-21.321276836,-39.265880361,-21.321276836,          0000053P0000079
+39.265880361;                                                    0000053P0000080
+124,1.,0.,-0.,114.819156639,0.,1.,0.,-2.520481125,0.,0.,1.,      0000055P0000081
+-19.999999553;                                                   0000055P0000082
+142,0,5,59,61,3;                                                 0000057P0000083
+126,7,4,0,0,0,0,1.570796327,1.570796327,1.570796327,1.570796327, 0000059P0000084
+1.570796327,4.71238898,4.71238898,4.71238898,7.853981634,        0000059P0000085
+7.853981634,7.853981634,7.853981634,7.853981634,3.831440713E+29, 0000059P0000086
+3.831440713E+29,4.129910647E+29,2.363425258E+29,2.363425258E+29, 0000059P0000087
+4.129910647E+29,3.831440713E+29,3.831440713E+29,-91.414337225,   0000059P0000088
+-2.809300087,0.,-91.414337225,-14.635572856,0.,-102.903753475,   0000059P0000089
+-21.095273982,0.,-121.529693537,-21.981331368,0.,-121.529693537, 0000059P0000090
+16.362731193,0.,-102.903753475,15.476673808,0.,-91.414337225,    0000059P0000091
+9.016972681,0.,-91.414337225,-2.809300087,0.,1.570796327,        0000059P0000092
+7.853981634,0.,0.,1.;                                            0000059P0000093
+126,7,4,0,1,0,0,1.570796327,1.570796327,1.570796327,1.570796327, 0000061P0000094
+1.570796327,4.71238898,4.71238898,4.71238898,7.853981634,        0000061P0000095
+7.853981634,7.853981634,7.853981634,7.853981634,3.831440713E+29, 0000061P0000096
+3.831440713E+29,4.129910647E+29,2.363425258E+29,2.363425258E+29, 0000061P0000097
+4.129910647E+29,3.831440713E+29,3.831440713E+29,-91.414337225,   0000061P0000098
+-2.809300087,-19.999999553,-91.414337225,-14.635572856,          0000061P0000099
+-19.999999553,-102.903753475,-21.095273982,-19.999999553,        0000061P0000100
+-121.529693537,-21.981331368,-19.999999553,-121.529693537,       0000061P0000101
+16.362731193,-19.999999553,-102.903753475,15.476673808,          0000061P0000102
+-19.999999553,-91.414337225,9.016972681,-19.999999553,           0000061P0000103
+-91.414337225,-2.809300087,-19.999999553,1.570796327,            0000061P0000104
+7.853981634,0.,0.,1.;                                            0000061P0000105
+142,0,5,65,67,3;                                                 0000063P0000106
+126,7,4,0,0,0,0,1.570796327,1.570796327,1.570796327,1.570796327, 0000065P0000107
+1.570796327,4.71238898,4.71238898,4.71238898,7.853981634,        0000065P0000108
+7.853981634,7.853981634,7.853981634,7.853981634,3.831440713E+29, 0000065P0000109
+3.831440713E+29,4.129910647E+29,2.363425258E+29,2.363425258E+29, 0000065P0000110
+4.129910647E+29,3.831440713E+29,3.831440713E+29,141.976625459,   0000065P0000111
+-4.606760107,0.,141.976625459,-22.988349754,0.,124.118612294,    0000065P0000112
+-33.028670798,0.,95.168291791,-34.405870832,0.,95.168291791,     0000065P0000113
+25.192350618,0.,124.118612294,23.815150584,0.,141.976625459,     0000065P0000114
+13.77482954,0.,141.976625459,-4.606760107,0.,1.570796327,        0000065P0000115
+7.853981634,0.,0.,1.;                                            0000065P0000116
+126,7,4,0,1,0,0,1.570796327,1.570796327,1.570796327,1.570796327, 0000067P0000117
+1.570796327,4.71238898,4.71238898,4.71238898,7.853981634,        0000067P0000118
+7.853981634,7.853981634,7.853981634,7.853981634,3.831440713E+29, 0000067P0000119
+3.831440713E+29,4.129910647E+29,2.363425258E+29,2.363425258E+29, 0000067P0000120
+4.129910647E+29,3.831440713E+29,3.831440713E+29,141.976625459,   0000067P0000121
+-4.606760107,-19.999999553,141.976625459,-22.988349754,          0000067P0000122
+-19.999999553,124.118612294,-33.028670798,-19.999999553,         0000067P0000123
+95.168291791,-34.405870832,-19.999999553,95.168291791,           0000067P0000124
+25.192350618,-19.999999553,124.118612294,23.815150584,           0000067P0000125
+-19.999999553,141.976625459,13.77482954,-19.999999553,           0000067P0000126
+141.976625459,-4.606760107,-19.999999553,1.570796327,            0000067P0000127
+7.853981634,0.,0.,1.;                                            0000067P0000128
+144,71,1,0,79;                                                   0000069P0000129
+120,75,77,1.073345169,1.494907102;                               0000071P0000130
+124,1.,0.,0.,57.9634321,0.,1.,0.,102.18666633,0.,0.,1.,          0000073P0000131
+-19.999999553;                                                   0000073P0000132
+110,0.,0.,1.,0.,0.,0.;                                           0000075P0000133
+110,74.466478448,0.,0.,74.466478448,0.,39.999999106;             0000077P0000134
+142,0,71,81,91,3;                                                0000079P0000135
+102,4,83,85,87,89;                                               0000081P0000136
+110,1.,1.494907102,0.,-2.658028415E-17,1.494907102,0.;           0000083P0000137
+110,-2.658028415E-17,1.494907102,0.,-2.892042303E-17,            0000085P0000138
+1.073345169,0.;                                                  0000085P0000139
+110,-2.892042303E-17,1.073345169,0.,1.,1.073345169,0.;           0000087P0000140
+110,1.,1.073345169,0.,1.,1.494907102,0.;                         0000089P0000141
+102,4,93,95,99,101;                                              0000091P0000142
+110,63.609212637,27.934517711,19.999999553,63.609212637,         0000093P0000143
+27.934517711,-19.999999553;                                      0000093P0000144
+100,0.,0.,0.,5.645780537,-74.252148619,35.534447703,             0000095P0000145
+-65.441267094;                                                   0000095P0000146
+124,1.,0.,0.,57.9634321,0.,1.,0.,102.18666633,0.,0.,1.,          0000097P0000147
+-19.999999553;                                                   0000097P0000148
+110,93.497879803,36.745399237,-19.999999553,93.497879803,        0000099P0000149
+36.745399237,19.999999553;                                       0000099P0000150
+100,0.,0.,0.,35.534447703,65.441267094,5.645780537,74.252148619; 0000101P0000151
+124,1.,0.,0.,57.9634321,0.,-1.,0.,102.18666633,0.,0.,-1.,        0000103P0000152
+19.999999553;                                                    0000103P0000153
+144,107,1,0,115;                                                 0000105P0000154
+120,111,113,-2.068247485,2.068247485;                            0000107P0000155
+124,1.,0.,0.,114.819156639,0.,-1.,0.,-2.520481125,0.,0.,-1.,     0000109P0000156
+-19.999999553;                                                   0000109P0000157
+110,0.,0.,1.,0.,0.,0.;                                           0000111P0000158
+110,44.681161651,0.,-39.999999106,44.681161651,0.,0.;            0000113P0000159
+142,0,107,117,127,3;                                             0000115P0000160
+102,4,119,121,123,125;                                           0000117P0000161
+110,1.,2.068247485,0.,-2.220446049E-16,2.068247485,0.;           0000119P0000162
+110,-2.339760561E-17,2.068247485,0.,-4.635976591E-17,            0000121P0000163
+-2.068247485,0.;                                                 0000121P0000164
+110,-2.220446049E-16,-2.068247485,0.,1.,-2.068247485,0.;         0000123P0000165
+110,1.,-2.068247485,0.,1.,2.068247485,0.;                        0000125P0000166
+102,4,129,131,135,137;                                           0000127P0000167
+110,93.497879803,36.745399237,-19.999999553,93.497879803,        0000129P0000168
+36.745399237,19.999999553;                                       0000129P0000169
+100,0.,0.,0.,-21.321276836,-39.265880361,-21.321276836,          0000131P0000170
+39.265880361;                                                    0000131P0000171
+124,1.,0.,0.,114.819156639,0.,-1.,0.,-2.520481125,0.,0.,-1.,     0000133P0000172
+19.999999553;                                                    0000133P0000173
+110,93.497879803,-41.786361486,19.999999553,93.497879803,        0000135P0000174
+-41.786361486,-19.999999553;                                     0000135P0000175
+100,0.,0.,0.,-21.321276836,-39.265880361,-21.321276836,          0000137P0000176
+39.265880361;                                                    0000137P0000177
+124,1.,0.,-0.,114.819156639,0.,1.,0.,-2.520481125,0.,0.,1.,      0000139P0000178
+-19.999999553;                                                   0000139P0000179
+144,143,1,0,151;                                                 0000141P0000180
+120,147,149,4.781798214,5.209840139;                             0000143P0000181
+124,1.,0.,0.,53.295957524,0.,1.,0.,-115.823384813,0.,0.,1.,      0000145P0000182
+-19.999999553;                                                   0000145P0000183
+110,0.,0.,1.,0.,0.,0.;                                           0000147P0000184
+110,84.24770251,0.,0.,84.24770251,0.,39.999999106;               0000149P0000185
+142,0,143,153,163,3;                                             0000151P0000186
+102,4,155,157,159,161;                                           0000153P0000187
+110,1.,5.209840139,0.,-5.958262731E-18,5.209840139,0.;           0000155P0000188
+110,-5.958262731E-18,5.209840139,0.,-8.334372787E-18,            0000157P0000189
+4.781798214,0.;                                                  0000157P0000190
+110,-8.334372787E-18,4.781798214,0.,1.,4.781798214,0.;           0000159P0000191
+110,1.,4.781798214,0.,1.,5.209840139,0.;                         0000161P0000192
+102,4,165,167,171,173;                                           0000163P0000193
+110,93.497879803,-41.786361486,19.999999553,93.497879803,        0000165P0000194
+-41.786361486,-19.999999553;                                     0000165P0000195
+100,0.,0.,0.,40.201922279,74.037023328,5.842874313,84.04484635;  0000167P0000196
+124,1.,0.,0.,53.295957524,0.,1.,0.,-115.823384813,0.,0.,1.,      0000169P0000197
+-19.999999553;                                                   0000169P0000198
+110,59.138831837,-31.778538464,-19.999999553,59.138831837,       0000171P0000199
+-31.778538464,19.999999553;                                      0000171P0000200
+100,0.,0.,0.,5.842874313,-84.04484635,40.201922279,              0000173P0000201
+-74.037023328;                                                   0000173P0000202
+124,1.,0.,0.,53.295957524,0.,-1.,0.,-115.823384813,0.,0.,-1.,    0000175P0000203
+19.999999553;                                                    0000175P0000204
+144,179,1,0,181;                                                 0000177P0000205
+128,1,1,1,1,0,0,1,0,0,0.,0.,131.878903748,131.878903748,         0000179P0000206
+-39.999999106,-39.999999106,0.,0.,1.,1.,1.,1.,59.138831837,      0000179P0000207
+-31.778538464,19.999999553,-72.422526777,-22.632272914,          0000179P0000208
+19.999999553,59.138831837,-31.778538464,-19.999999553,           0000179P0000209
+-72.422526777,-22.632272914,-19.999999553,0.,131.878903748,      0000179P0000210
+-39.999999106,0.;                                                0000179P0000211
+142,0,179,183,193,3;                                             0000181P0000212
+102,4,185,187,189,191;                                           0000183P0000213
+110,0.,0.,0.,0.,-39.999999106,0.;                                0000185P0000214
+110,0.,-39.999999106,0.,131.878903748,-39.999999106,0.;          0000187P0000215
+110,131.878903748,-39.999999106,0.,131.878903748,0.,0.;          0000189P0000216
+110,131.878903748,-3.552713679E-14,0.,0.,-3.552713679E-14,0.;    0000191P0000217
+102,4,195,197,199,201;                                           0000193P0000218
+110,59.138831837,-31.778538464,-19.999999553,59.138831837,       0000195P0000219
+-31.778538464,19.999999553;                                      0000195P0000220
+110,59.138831837,-31.778538464,19.999999553,-72.422526777,       0000197P0000221
+-22.632272914,19.999999553;                                      0000197P0000222
+110,-72.422526777,-22.632272914,19.999999553,-72.422526777,      0000199P0000223
+-22.632272914,-19.999999553;                                     0000199P0000224
+110,-72.422526777,-22.632272914,-19.999999553,59.138831837,      0000201P0000225
+-31.778538464,-19.999999553;                                     0000201P0000226
+144,205,1,0,213;                                                 0000203P0000227
+120,209,211,4.086527207,4.781798214;                             0000205P0000228
+124,1.,0.,0.,-74.12621243,0.,1.,0.,-47.138362093,0.,0.,1.,       0000207P0000229
+-19.999999553;                                                   0000207P0000230
+110,0.,0.,1.,0.,0.,0.;                                           0000209P0000231
+110,24.565238685,0.,0.,24.565238685,0.,39.999999106;             0000211P0000232
+142,0,205,215,225,3;                                             0000213P0000233
+102,4,217,219,221,223;                                           0000215P0000234
+110,1.,4.781798214,0.,-8.334372787E-18,4.781798214,0.;           0000217P0000235
+110,-8.334372787E-18,4.781798214,0.,-1.219390227E-17,            0000219P0000236
+4.086527207,0.;                                                  0000219P0000237
+110,-1.219390227E-17,4.086527207,0.,1.,4.086527207,0.;           0000221P0000238
+110,1.,4.086527207,0.,1.,4.781798214,0.;                         0000223P0000239
+102,4,227,229,233,235;                                           0000225P0000240
+110,-72.422526777,-22.632272914,19.999999553,-72.422526777,      0000227P0000241
+-22.632272914,-19.999999553;                                     0000227P0000242
+100,0.,0.,0.,1.703685653,24.506089179,-14.390216636,19.90910889; 0000229P0000243
+124,1.,0.,0.,-74.12621243,0.,1.,0.,-47.138362093,0.,0.,1.,       0000231P0000244
+-19.999999553;                                                   0000231P0000245
+110,-88.516429067,-27.229253203,-19.999999553,-88.516429067,     0000233P0000246
+-27.229253203,19.999999553;                                      0000233P0000247
+100,0.,0.,0.,-14.390216636,-19.90910889,1.703685653,             0000235P0000248
+-24.506089179;                                                   0000235P0000249
+124,1.,0.,0.,-74.12621243,0.,-1.,0.,-47.138362093,0.,0.,-1.,     0000237P0000250
+19.999999553;                                                    0000237P0000251
+144,241,1,0,249;                                                 0000239P0000252
+120,245,247,0.944934554,5.338250753;                             0000241P0000253
+124,1.,0.,0.,-105.960486735,0.,-1.,0.,-3.095103428,0.,0.,-1.,    0000243P0000254
+-19.999999553;                                                   0000243P0000255
+110,0.,0.,1.,0.,0.,0.;                                           0000245P0000256
+110,29.778387016,0.,-39.999999106,29.778387016,0.,0.;            0000247P0000257
+142,0,241,251,261,3;                                             0000249P0000258
+102,4,253,255,257,259;                                           0000251P0000259
+110,1.,5.338250753,0.,-2.220446049E-16,5.338250753,0.;           0000253P0000260
+110,-5.245440609E-18,5.338250753,0.,-2.963324515E-17,            0000255P0000261
+0.944934554,0.;                                                  0000255P0000262
+110,-2.220446049E-16,0.944934554,0.,1.,0.944934554,0.;           0000257P0000263
+110,1.,0.944934554,0.,1.,5.338250753,0.;                         0000259P0000264
+102,4,263,265,269,271;                                           0000261P0000265
+110,-88.516429067,-27.229253203,-19.999999553,-88.516429067,     0000263P0000266
+-27.229253203,19.999999553;                                      0000263P0000267
+100,0.,0.,0.,17.444057668,24.134149775,17.444057668,             0000265P0000268
+-24.134149775;                                                   0000265P0000269
+124,1.,0.,0.,-105.960486735,0.,-1.,0.,-3.095103428,0.,0.,-1.,    0000267P0000270
+19.999999553;                                                    0000267P0000271
+110,-88.516429067,21.039046347,19.999999553,-88.516429067,       0000269P0000272
+21.039046347,-19.999999553;                                      0000269P0000273
+100,0.,0.,0.,17.444057668,24.134149775,17.444057668,             0000271P0000274
+-24.134149775;                                                   0000271P0000275
+124,1.,0.,-0.,-105.960486735,0.,1.,0.,-3.095103428,0.,0.,1.,     0000273P0000276
+-19.999999553;                                                   0000273P0000277
+144,277,1,0,285;                                                 0000275P0000278
+120,281,283,1.367007434,2.1966581;                               0000277P0000279
+124,1.,0.,0.,-76.554978638,0.,1.,0.,37.587915978,0.,0.,1.,       0000279P0000280
+-19.999999553;                                                   0000279P0000281
+110,0.,0.,1.,0.,0.,0.;                                           0000281P0000282
+110,20.419142549,0.,0.,20.419142549,0.,39.999999106;             0000283P0000283
+142,0,277,287,297,3;                                             0000285P0000284
+102,4,289,291,293,295;                                           0000287P0000285
+110,1.,2.1966581,0.,-2.268478349E-17,2.1966581,0.;               0000289P0000286
+110,-2.268478349E-17,2.1966581,0.,-2.729026995E-17,1.367007434,  0000291P0000287
+0.;                                                              0000291P0000288
+110,-2.729026995E-17,1.367007434,0.,1.,1.367007434,0.;           0000293P0000289
+110,1.,1.367007434,0.,1.,2.1966581,0.;                           0000295P0000290
+102,4,299,301,305,307;                                           0000297P0000291
+110,-88.516429067,21.039046347,19.999999553,-88.516429067,       0000299P0000292
+21.039046347,-19.999999553;                                      0000299P0000293
+100,0.,0.,0.,-11.961450429,-16.548869631,4.132451861,            0000301P0000294
+-19.996605313;                                                   0000301P0000295
+124,1.,0.,0.,-76.554978638,0.,1.,0.,37.587915978,0.,0.,1.,       0000303P0000296
+-19.999999553;                                                   0000303P0000297
+110,-72.422526777,17.591310665,-19.999999553,-72.422526777,      0000305P0000298
+17.591310665,19.999999553;                                       0000305P0000299
+100,0.,0.,0.,4.132451861,19.996605313,-11.961450429,             0000307P0000300
+16.548869631;                                                    0000307P0000301
+124,1.,0.,0.,-76.554978638,0.,-1.,0.,37.587915978,0.,0.,-1.,     0000309P0000302
+19.999999553;                                                    0000309P0000303
+144,313,1,0,315;                                                 0000311P0000304
+128,1,1,1,1,0,0,1,0,0,0.,0.,136.424396865,136.424396865,         0000313P0000305
+-39.999999106,-39.999999106,0.,0.,1.,1.,1.,1.,-72.422526777,     0000313P0000306
+17.591310665,19.999999553,63.609212637,27.934517711,             0000313P0000307
+19.999999553,-72.422526777,17.591310665,-19.999999553,           0000313P0000308
+63.609212637,27.934517711,-19.999999553,0.,136.424396865,        0000313P0000309
+-39.999999106,0.;                                                0000313P0000310
+142,0,313,317,327,3;                                             0000315P0000311
+102,4,319,321,323,325;                                           0000317P0000312
+110,0.,0.,0.,0.,-39.999999106,0.;                                0000319P0000313
+110,0.,-39.999999106,0.,136.424396865,-39.999999106,0.;          0000321P0000314
+110,136.424396865,-39.999999106,0.,136.424396865,0.,0.;          0000323P0000315
+110,136.424396865,-3.552713679E-14,0.,0.,-3.552713679E-14,0.;    0000325P0000316
+102,4,329,331,333,335;                                           0000327P0000317
+110,-72.422526777,17.591310665,-19.999999553,-72.422526777,      0000329P0000318
+17.591310665,19.999999553;                                       0000329P0000319
+110,-72.422526777,17.591310665,19.999999553,63.609212637,        0000331P0000320
+27.934517711,19.999999553;                                       0000331P0000321
+110,63.609212637,27.934517711,19.999999553,63.609212637,         0000333P0000322
+27.934517711,-19.999999553;                                      0000333P0000323
+110,63.609212637,27.934517711,-19.999999553,-72.422526777,       0000335P0000324
+17.591310665,-19.999999553;                                      0000335P0000325
+144,339,1,0,347;                                                 0000337P0000326
+120,343,345,-3.552713679E-15,6.283185307;                        0000339P0000327
+124,1.,0.,0.,-106.472015381,0.,1.,0.,-2.809300087,0.,0.,1.,      0000341P0000328
+-40.000199106;                                                   0000341P0000329
+110,0.,0.,1.,0.,0.,0.;                                           0000343P0000330
+110,15.057678156,0.,20.000199553,15.057678156,0.,60.000198659;   0000345P0000331
+142,0,339,349,359,3;                                             0000347P0000332
+102,4,351,353,355,357;                                           0000349P0000333
+110,1.,6.283185307,0.,8.881784396E-17,6.283185307,0.;            0000351P0000334
+110,1.232595164E-32,6.283185307,0.,-3.487868576E-17,             0000353P0000335
+7.993605777E-15,0.;                                              0000353P0000336
+110,8.881784396E-17,-1.77631253E-15,0.,1.,7.105471469E-15,0.;    0000355P0000337
+126,1,1,0,0,1,0,1.570796327,1.570796327,7.853981634,7.853981634, 0000357P0000338
+1.,1.,1.,1.687538997E-14,0.,1.,6.283185307,0.,1.570796327,       0000357P0000339
+7.853981634,0.,0.,1.;                                            0000357P0000340
+102,4,361,363,365,367;                                           0000359P0000341
+110,-91.414337225,-2.809300087,19.999999553,-91.414337225,       0000361P0000342
+-2.809300087,-19.999999553;                                      0000361P0000343
+126,7,4,0,1,0,0,4.71238898,4.71238898,4.71238898,4.71238898,     0000363P0000344
+4.71238898,7.853981634,7.853981634,7.853981634,10.995574288,     0000363P0000345
+10.995574288,10.995574288,10.995574288,10.995574288,             0000363P0000346
+3.831440713E+29,3.831440713E+29,4.129910647E+29,2.363425258E+29, 0000363P0000347
+2.363425258E+29,4.129910647E+29,3.831440713E+29,3.831440713E+29, 0000363P0000348
+-91.414337225,-2.809300087,-19.999999553,-91.414337225,          0000363P0000349
+9.016972681,-19.999999553,-102.903753475,15.476673808,           0000363P0000350
+-19.999999553,-121.529693537,16.362731193,-19.999999553,         0000363P0000351
+-121.529693537,-21.981331368,-19.999999553,-102.903753475,       0000363P0000352
+-21.095273982,-19.999999553,-91.414337225,-14.635572856,         0000363P0000353
+-19.999999553,-91.414337225,-2.809300087,-19.999999553,          0000363P0000354
+4.71238898,10.995574288,0.,0.,1.;                                0000363P0000355
+110,-91.414337225,-2.809300087,-19.999999553,-91.414337225,      0000365P0000356
+-2.809300087,19.999999553;                                       0000365P0000357
+126,7,4,0,1,0,0,1.570796327,1.570796327,1.570796327,1.570796327, 0000367P0000358
+1.570796327,4.71238898,4.71238898,4.71238898,7.853981634,        0000367P0000359
+7.853981634,7.853981634,7.853981634,7.853981634,3.831440713E+29, 0000367P0000360
+3.831440713E+29,4.129910647E+29,2.363425258E+29,2.363425258E+29, 0000367P0000361
+4.129910647E+29,3.831440713E+29,3.831440713E+29,-91.414337225,   0000367P0000362
+-2.809300087,19.999999553,-91.414337225,-14.635572856,           0000367P0000363
+19.999999553,-102.903753475,-21.095273982,19.999999553,          0000367P0000364
+-121.529693537,-21.981331368,19.999999553,-121.529693537,        0000367P0000365
+16.362731193,19.999999553,-102.903753475,15.476673808,           0000367P0000366
+19.999999553,-91.414337225,9.016972681,19.999999553,             0000367P0000367
+-91.414337225,-2.809300087,19.999999553,1.570796327,7.853981634, 0000367P0000368
+0.,0.,1.;                                                        0000367P0000369
+144,371,1,0,379;                                                 0000369P0000370
+120,375,377,-3.552713679E-15,6.283185307;                        0000371P0000371
+124,1.,0.,0.,118.572458625,0.,1.,0.,-4.606760107,0.,0.,1.,       0000373P0000372
+-40.000199106;                                                   0000373P0000373
+110,0.,0.,1.,0.,0.,0.;                                           0000375P0000374
+110,23.404166834,0.,20.000199553,23.404166834,0.,60.000198659;   0000377P0000375
+142,0,371,381,391,3;                                             0000379P0000376
+102,4,383,385,387,389;                                           0000381P0000377
+110,1.,6.283185307,0.,8.881784396E-17,6.283185307,0.;            0000383P0000378
+110,1.232595164E-32,6.283185307,0.,-3.487868576E-17,             0000385P0000379
+7.993605777E-15,0.;                                              0000385P0000380
+110,8.881784396E-17,-1.77631253E-15,0.,1.,7.105471469E-15,0.;    0000387P0000381
+126,1,1,0,0,1,0,1.570796327,1.570796327,7.853981634,7.853981634, 0000389P0000382
+1.,1.,1.,1.687538997E-14,0.,1.,6.283185307,0.,1.570796327,       0000389P0000383
+7.853981634,0.,0.,1.;                                            0000389P0000384
+102,4,393,395,397,399;                                           0000391P0000385
+110,141.976625459,-4.606760107,19.999999553,141.976625459,       0000393P0000386
+-4.606760107,-19.999999553;                                      0000393P0000387
+126,7,4,0,1,0,0,4.71238898,4.71238898,4.71238898,4.71238898,     0000395P0000388
+4.71238898,7.853981634,7.853981634,7.853981634,10.995574288,     0000395P0000389
+10.995574288,10.995574288,10.995574288,10.995574288,             0000395P0000390
+3.831440713E+29,3.831440713E+29,4.129910647E+29,2.363425258E+29, 0000395P0000391
+2.363425258E+29,4.129910647E+29,3.831440713E+29,3.831440713E+29, 0000395P0000392
+141.976625459,-4.606760107,-19.999999553,141.976625459,          0000395P0000393
+13.77482954,-19.999999553,124.118612294,23.815150584,            0000395P0000394
+-19.999999553,95.168291791,25.192350618,-19.999999553,           0000395P0000395
+95.168291791,-34.405870832,-19.999999553,124.118612294,          0000395P0000396
+-33.028670798,-19.999999553,141.976625459,-22.988349754,         0000395P0000397
+-19.999999553,141.976625459,-4.606760107,-19.999999553,          0000395P0000398
+4.71238898,10.995574288,0.,0.,1.;                                0000395P0000399
+110,141.976625459,-4.606760107,-19.999999553,141.976625459,      0000397P0000400
+-4.606760107,19.999999553;                                       0000397P0000401
+126,7,4,0,1,0,0,1.570796327,1.570796327,1.570796327,1.570796327, 0000399P0000402
+1.570796327,4.71238898,4.71238898,4.71238898,7.853981634,        0000399P0000403
+7.853981634,7.853981634,7.853981634,7.853981634,3.831440713E+29, 0000399P0000404
+3.831440713E+29,4.129910647E+29,2.363425258E+29,2.363425258E+29, 0000399P0000405
+4.129910647E+29,3.831440713E+29,3.831440713E+29,141.976625459,   0000399P0000406
+-4.606760107,19.999999553,141.976625459,-22.988349754,           0000399P0000407
+19.999999553,124.118612294,-33.028670798,19.999999553,           0000399P0000408
+95.168291791,-34.405870832,19.999999553,95.168291791,            0000399P0000409
+25.192350618,19.999999553,124.118612294,23.815150584,            0000399P0000410
+19.999999553,141.976625459,13.77482954,19.999999553,             0000399P0000411
+141.976625459,-4.606760107,19.999999553,1.570796327,7.853981634, 0000399P0000412
+0.,0.,1.;                                                        0000399P0000413
+144,403,1,2,405,455,461;                                         0000401P0000414
+128,1,1,1,1,0,0,1,0,0,-139.650442578,-139.650442578,             0000403P0000415
+164.864616815,164.864616815,-52.441943309,-52.441943309,         0000403P0000416
+47.40098106,47.40098106,1.,1.,1.,1.,-139.650442578,              0000403P0000417
+-52.441943309,19.999999553,164.864616815,-52.441943309,          0000403P0000418
+19.999999553,-139.650442578,47.40098106,19.999999553,            0000403P0000419
+164.864616815,47.40098106,19.999999553,-139.650442578,           0000403P0000420
+164.864616815,-52.441943309,47.40098106;                         0000403P0000421
+142,0,403,407,425,3;                                             0000405P0000422
+102,8,409,411,413,415,417,419,421,423;                           0000407P0000423
+126,7,4,0,0,0,0,1.073345169,1.073345169,1.073345169,1.073345169, 0000409P0000424
+1.073345169,1.284126135,1.284126135,1.284126135,1.494907102,     0000409P0000425
+1.494907102,1.494907102,1.494907102,1.494907102,1.011189921,     0000409P0000426
+1.011189921,1.011189931,1.011179532,1.011179532,1.011189931,     0000409P0000427
+1.011189921,1.011189921,93.497879803,36.745399237,0.,            0000409P0000428
+90.049436422,34.872902929,0.,86.473696164,33.245011418,0.,       0000409P0000429
+82.790432165,31.870724965,0.,75.248696652,29.647496417,0.,       0000409P0000430
+71.408940021,28.804071284,0.,67.521947549,28.232023481,0.,       0000409P0000431
+63.609212637,27.934517711,0.,1.073345169,1.494907102,0.,0.,1.;   0000409P0000432
+110,63.609212637,27.934517711,0.,-72.422526777,17.591310665,0.;  0000411P0000433
+126,7,4,0,0,0,0,1.367007434,1.367007434,1.367007434,1.367007434, 0000413P0000434
+1.367007434,1.781832767,1.781832767,1.781832767,2.1966581,       0000413P0000435
+2.1966581,2.1966581,2.1966581,2.1966581,1.044284595,1.044284595, 0000413P0000436
+1.044285207,1.044124006,1.044124006,1.044285207,1.044284595,     0000413P0000437
+1.044284595,-72.422526777,17.591310665,0.,-74.496301391,         0000413P0000438
+17.162749235,0.,-76.619336034,17.023005488,0.,-78.746721852,     0000413P0000439
+17.175011565,0.,-82.917772227,18.068559876,0.,-84.920732008,     0000413P0000440
+18.80138208,0.,-86.800206478,19.798568183,0.,-88.516429067,      0000413P0000441
+21.039046347,0.,1.367007434,2.1966581,0.,0.,1.;                  0000413P0000442
+100,0.,-105.960486735,-3.095103428,-88.516429067,21.039046347,   0000415P0000443
+-88.516429067,-27.229253203;                                     0000415P0000444
+126,7,4,0,0,0,0,4.086527207,4.086527207,4.086527207,4.086527207, 0000417P0000445
+4.086527207,4.434162711,4.434162711,4.434162711,4.781798214,     0000417P0000446
+4.781798214,4.781798214,4.781798214,4.781798214,1.03083173,      0000417P0000447
+1.03083173,1.03083194,1.030753477,1.030753477,1.03083194,        0000417P0000448
+1.03083173,1.03083173,-88.516429067,-27.229253203,0.,            0000417P0000449
+-86.786150795,-25.978615653,0.,-84.916794517,-24.932704109,0.,   0000417P0000450
+-82.936273839,-24.107124921,0.,-78.80986423,-22.928478295,0.,    0000417P0000451
+-76.69208436,-22.583439786,0.,-74.552323437,-22.484207509,0.,    0000417P0000452
+-72.422526777,-22.632272914,0.,4.086527207,4.781798214,0.,0.,1.; 0000417P0000453
+110,-72.422526777,-22.632272914,0.,59.138831837,-31.778538464,   0000419P0000454
+0.;                                                              0000419P0000455
+126,7,4,0,0,0,0,4.781798214,4.781798214,4.781798214,4.781798214, 0000421P0000456
+4.781798214,4.995819176,4.995819176,4.995819176,5.209840139,     0000421P0000457
+5.209840139,5.209840139,5.209840139,5.209840139,1.011539234,     0000421P0000458
+1.011539234,1.011539246,1.011528189,1.011528189,1.011539246,     0000421P0000459
+1.011539234,1.011539234,59.138831837,-31.778538464,0.,           0000421P0000460
+63.635671563,-32.09116286,0.,68.104473804,-32.724194555,0.,      0000421P0000461
+72.519765903,-33.674023313,0.,81.191994379,-36.199999233,0.,     0000421P0000462
+85.426740197,-37.76968291,0.,89.536511056,-39.635347961,0.,      0000421P0000463
+93.497879803,-41.786361486,0.,4.781798214,5.209840139,0.,0.,1.;  0000421P0000464
+100,0.,114.819156639,-2.520481125,93.497879803,-41.786361486,    0000423P0000465
+93.497879803,36.745399237;                                       0000423P0000466
+102,8,427,431,433,437,441,445,447,451;                           0000425P0000467
+100,0.,0.,0.,35.534447703,65.441267094,5.645780537,74.252148619; 0000427P0000468
+124,1.,0.,0.,57.9634321,0.,-1.,0.,102.18666633,0.,0.,-1.,        0000429P0000469
+19.999999553;                                                    0000429P0000470
+110,63.609212637,27.934517711,19.999999553,-72.422526777,        0000431P0000471
+17.591310665,19.999999553;                                       0000431P0000472
+100,0.,0.,0.,4.132451861,19.996605313,-11.961450429,             0000433P0000473
+16.548869631;                                                    0000433P0000474
+124,1.,0.,0.,-76.554978638,0.,-1.,0.,37.587915978,0.,0.,-1.,     0000435P0000475
+19.999999553;                                                    0000435P0000476
+100,0.,0.,0.,17.444057668,24.134149775,17.444057668,             0000437P0000477
+-24.134149775;                                                   0000437P0000478
+124,1.,0.,-0.,-105.960486735,0.,1.,0.,-3.095103428,0.,0.,1.,     0000439P0000479
+19.999999553;                                                    0000439P0000480
+100,0.,0.,0.,-14.390216636,-19.90910889,1.703685653,             0000441P0000481
+-24.506089179;                                                   0000441P0000482
+124,1.,0.,0.,-74.12621243,0.,-1.,0.,-47.138362093,0.,0.,-1.,     0000443P0000483
+19.999999553;                                                    0000443P0000484
+110,-72.422526777,-22.632272914,19.999999553,59.138831837,       0000445P0000485
+-31.778538464,19.999999553;                                      0000445P0000486
+100,0.,0.,0.,5.842874313,-84.04484635,40.201922279,              0000447P0000487
+-74.037023328;                                                   0000447P0000488
+124,1.,0.,0.,53.295957524,0.,-1.,0.,-115.823384813,0.,0.,-1.,    0000449P0000489
+19.999999553;                                                    0000449P0000490
+100,0.,0.,0.,-21.321276836,-39.265880361,-21.321276836,          0000451P0000491
+39.265880361;                                                    0000451P0000492
+124,1.,0.,-0.,114.819156639,0.,1.,0.,-2.520481125,0.,0.,1.,      0000453P0000493
+19.999999553;                                                    0000453P0000494
+142,0,403,457,459,3;                                             0000455P0000495
+126,7,4,0,0,0,0,1.570796327,1.570796327,1.570796327,1.570796327, 0000457P0000496
+1.570796327,4.71238898,4.71238898,4.71238898,7.853981634,        0000457P0000497
+7.853981634,7.853981634,7.853981634,7.853981634,3.831440713E+29, 0000457P0000498
+3.831440713E+29,4.129910647E+29,2.363425258E+29,2.363425258E+29, 0000457P0000499
+4.129910647E+29,3.831440713E+29,3.831440713E+29,-91.414337225,   0000457P0000500
+-2.809300087,0.,-91.414337225,-14.635572856,0.,-102.903753475,   0000457P0000501
+-21.095273982,0.,-121.529693537,-21.981331368,0.,-121.529693537, 0000457P0000502
+16.362731193,0.,-102.903753475,15.476673808,0.,-91.414337225,    0000457P0000503
+9.016972681,0.,-91.414337225,-2.809300087,0.,1.570796327,        0000457P0000504
+7.853981634,0.,0.,1.;                                            0000457P0000505
+126,7,4,0,1,0,0,1.570796327,1.570796327,1.570796327,1.570796327, 0000459P0000506
+1.570796327,4.71238898,4.71238898,4.71238898,7.853981634,        0000459P0000507
+7.853981634,7.853981634,7.853981634,7.853981634,3.831440713E+29, 0000459P0000508
+3.831440713E+29,4.129910647E+29,2.363425258E+29,2.363425258E+29, 0000459P0000509
+4.129910647E+29,3.831440713E+29,3.831440713E+29,-91.414337225,   0000459P0000510
+-2.809300087,19.999999553,-91.414337225,-14.635572856,           0000459P0000511
+19.999999553,-102.903753475,-21.095273982,19.999999553,          0000459P0000512
+-121.529693537,-21.981331368,19.999999553,-121.529693537,        0000459P0000513
+16.362731193,19.999999553,-102.903753475,15.476673808,           0000459P0000514
+19.999999553,-91.414337225,9.016972681,19.999999553,             0000459P0000515
+-91.414337225,-2.809300087,19.999999553,1.570796327,7.853981634, 0000459P0000516
+0.,0.,1.;                                                        0000459P0000517
+142,0,403,463,465,3;                                             0000461P0000518
+126,7,4,0,0,0,0,1.570796327,1.570796327,1.570796327,1.570796327, 0000463P0000519
+1.570796327,4.71238898,4.71238898,4.71238898,7.853981634,        0000463P0000520
+7.853981634,7.853981634,7.853981634,7.853981634,3.831440713E+29, 0000463P0000521
+3.831440713E+29,4.129910647E+29,2.363425258E+29,2.363425258E+29, 0000463P0000522
+4.129910647E+29,3.831440713E+29,3.831440713E+29,141.976625459,   0000463P0000523
+-4.606760107,0.,141.976625459,-22.988349754,0.,124.118612294,    0000463P0000524
+-33.028670798,0.,95.168291791,-34.405870832,0.,95.168291791,     0000463P0000525
+25.192350618,0.,124.118612294,23.815150584,0.,141.976625459,     0000463P0000526
+13.77482954,0.,141.976625459,-4.606760107,0.,1.570796327,        0000463P0000527
+7.853981634,0.,0.,1.;                                            0000463P0000528
+126,7,4,0,1,0,0,1.570796327,1.570796327,1.570796327,1.570796327, 0000465P0000529
+1.570796327,4.71238898,4.71238898,4.71238898,7.853981634,        0000465P0000530
+7.853981634,7.853981634,7.853981634,7.853981634,3.831440713E+29, 0000465P0000531
+3.831440713E+29,4.129910647E+29,2.363425258E+29,2.363425258E+29, 0000465P0000532
+4.129910647E+29,3.831440713E+29,3.831440713E+29,141.976625459,   0000465P0000533
+-4.606760107,19.999999553,141.976625459,-22.988349754,           0000465P0000534
+19.999999553,124.118612294,-33.028670798,19.999999553,           0000465P0000535
+95.168291791,-34.405870832,19.999999553,95.168291791,            0000465P0000536
+25.192350618,19.999999553,124.118612294,23.815150584,            0000465P0000537
+19.999999553,141.976625459,13.77482954,19.999999553,             0000465P0000538
+141.976625459,-4.606760107,19.999999553,1.570796327,7.853981634, 0000465P0000539
+0.,0.,1.;                                                        0000465P0000540
+S      1G      4D    466P    540                                        T0000001
index 42310794f5ebe1a2a86636773e9c7c86c370f459..80afd5603f13bc71423e054829d2875302ccbcf5 100644 (file)
@@ -439,6 +439,36 @@ Sets the item to be selectable
     void   SetExpandable(in boolean value);
   };
 
+  //==========================================================================
+/*! \brief Flags Attribute.
+
+   This interface is intended for storing different object attributes that
+   have only two states (0 and 1).
+*/
+  //==========================================================================
+
+  interface AttributeFlags : GenericAttribute
+  {
+    long    GetFlags();
+    void    SetFlags( in long theFlags );
+
+    boolean Get( in long theFlag );
+    void    Set( in long theFlag, in boolean theValue );
+  };
+
+  //==========================================================================
+/*! \brief Graphic Attribute.
+   This class is intended for storing information about
+   graphic representation of objects in dirrent views
+*/
+  //==========================================================================
+
+  interface AttributeGraphic : GenericAttribute
+  {
+    void     SetVisibility( in long theViewId, in boolean theValue );
+    boolean  GetVisibility( in long theViewId );
+  };  
+
   //==========================================================================
 /*! \brief Opened flag Attribute.
 
index b7049193c4bf6f8dac39872d2051271656b73a51..c0d046504edb48917b2e694a5e856e600d7be0cc 100644 (file)
@@ -16,7 +16,7 @@
                <component-username>Salome</component-username>
                <component-type>Other</component-type>
                <component-author>NRI</component-author>
-               <component-version> 1.0</component-version>
+               <component-version>2.1.0</component-version>
                <component-comment>GUI Neutral Context</component-comment>
                <component-multistudy>1</component-multistudy>
 
index 88685ce56138dec275466a6e29595de4b31430d8..8e44db9ac19f86d4e8dd233dc86ec277f67f6c49 100644 (file)
@@ -38,7 +38,7 @@ EOF
 fUSE_STD_IOSTREAM=no
 for ac_CXX_USE_STD_IOSTREAM in "" -D__USE_STD_IOSTREAM ; do
   if $CXX ${ac_CXX_USE_STD_IOSTREAM} conftest.cxx > /dev/null 2>&1; then
-    CXXFLAGS="$CXXFLAGS ${ac_CXX_USE_STD_IOSTREAM}"
+    CPPFLAGS="$CPPFLAGS ${ac_CXX_USE_STD_IOSTREAM}"
     if test x${ac_CXX_USE_STD_IOSTREAM} = x; then
       AC_MSG_RESULT(yes)
     else
index 862f5e83c5144a290b67ed3e731fadd6f17ccc1f..b23ca3bd2a7767e62fb6df33633c2b21652be7a6 100644 (file)
@@ -27,4 +27,8 @@ dnl @author Bernard Secher (CEA) - 04/12/2003
 dnl
 AC_DEFUN([AC_CXX_WARNINGS],[
   AC_CXX_OPTION(-Wno-deprecated,CXXFLAGS)
+  AC_CXX_OPTION(-Wparentheses,CXXFLAGS)
+  AC_CXX_OPTION(-Wreturn-type,CXXFLAGS)
+  AC_CXX_OPTION(-Wmissing-declarations,CXXFLAGS)
+  AC_CXX_OPTION(-Wunused,CXXFLAGS)
 ])
index 85a53ce1b1d6ec0c075ec8be3371a35bf0badb19..fc07131da2f47636052c2a4a6a3905b3e5a0d970 100644 (file)
@@ -13,7 +13,7 @@ AC_ARG_WITH(kernel,
            [  --with-kernel=DIR               root directory path of KERNEL build or installation],
            KERNEL_DIR="$withval",KERNEL_DIR="")
 
-if test "x$KERNEL_DIR" == "x" ; then
+if test "x$KERNEL_DIR" = "x" ; then
 
 # no --with-kernel-dir option used
 
@@ -39,10 +39,10 @@ if test -f ${KERNEL_DIR}/bin/salome/runSalome ; then
    Kernel_ok=yes
    AC_MSG_RESULT(Using Kernel module distribution in ${KERNEL_DIR})
 
-   if test "x$KERNEL_ROOT_DIR" == "x" ; then
+   if test "x$KERNEL_ROOT_DIR" = "x" ; then
       KERNEL_ROOT_DIR=${KERNEL_DIR}
    fi
-   if test "x$KERNEL_SITE_DIR" == "x" ; then
+   if test "x$KERNEL_SITE_DIR" = "x" ; then
       KERNEL_SITE_DIR=${KERNEL_ROOT_DIR}
    fi
    AC_SUBST(KERNEL_ROOT_DIR)
index 1cc692c5fd5bad4bd57f3c99f0f1d6066445a475..789167b4c1264a3d29860a04c96f3f492090f5bf 100644 (file)
@@ -37,7 +37,7 @@ else
   AC_CHECKING(for boost/shared_ptr.hpp header file)
   dnl BOOST headers
   CPPFLAGS_old="${CPPFLAGS}"
-  BOOST_CPPFLAGS="-ftemplate-depth-32 -I${BOOSTDIR}"
+  BOOST_CPPFLAGS="-I${BOOSTDIR}"
   CPPFLAGS="${CPPFLAGS} ${BOOST_CPPFLAGS}"
 
   AC_CHECK_HEADER(boost/shared_ptr.hpp,boost_ok=yes,boost_ok=no)
index 68345204cef418b8fc93ea01ffb7ab761253eb14..6e8192b44a273dfbab82eaa0ea9b8fd15cb0604c 100644 (file)
@@ -58,7 +58,15 @@ dnl check med2 header
 
 CPPFLAGS_old="$CPPFLAGS"
 dnl we must test system : linux = -DPCLINUX
-CPPFLAGS="$CPPFLAGS -DPCLINUX $LOCAL_INCLUDES"
+dnl we must test system : Alpha-OSF = -DOSF1
+case $host_os in
+   linux*)
+      CPPFLAGS="$CPPFLAGS -DPCLINUX $LOCAL_INCLUDES"
+      ;;
+   osf*)
+      CPPFLAGS="$CPPFLAGS -DOSF1 $LOCAL_INCLUDES"
+      ;;
+esac
 AC_CHECK_HEADER(med.h,med2_ok=yes ,med2_ok=no)
 CPPFLAGS="$CPPFLAGS_old"
 
@@ -76,7 +84,14 @@ fi
 
 if  test "x$med2_ok" = "xyes"
 then
-  MED2_INCLUDES="-DPCLINUX $LOCAL_INCLUDES"
+case $host_os in
+   linux*)
+        MED2_INCLUDES="-DPCLINUX $LOCAL_INCLUDES"
+      ;;
+   osf*)
+      MED2_INCLUDES="-DOSF1 $LOCAL_INCLUDES"
+      ;;
+esac
   MED2_LIBS="$LOCAL_LIBS"
   MED2_MT_LIBS="$LOCAL_LIBS"
 fi
index 753521cf9fe43f0bdfa5adb55c9fecdeb08d2aa0..b27de2779cb4cb176f9f0472407ec1e4f14fcc3a 100644 (file)
@@ -80,8 +80,6 @@ QT_ROOT=$QTDIR
 
 if  test "x$qt_ok" = "xyes"
 then
-  AC_MSG_CHECKING(include of qt headers)
-
   CPPFLAGS_old=$CPPFLAGS
   CPPFLAGS="$CPPFLAGS -I$QTDIR/include"
 
@@ -90,13 +88,15 @@ then
 
   CPPFLAGS=$CPPFLAGS_old
 
+  AC_MSG_CHECKING(include of qt headers)
+
   if  test "x$qt_ok" = "xno"
   then
     AC_MSG_RESULT(qt headers not found, or too old qt version, in $QTDIR/include)
     AC_MSG_RESULT(QTDIR environment variable may be wrong)
   else
     AC_MSG_RESULT(yes)
-       QT_INCLUDES="-I${QT_ROOT}/include -DQT_THREAD_SUPPORT"
+    QT_INCLUDES="-I${QT_ROOT}/include -DQT_THREAD_SUPPORT"
     QT_MT_INCLUDES="-I${QT_ROOT}/include -DQT_THREAD_SUPPORT"
   fi
 fi
diff --git a/salome_adm/unix/config_files/check_withihm.m4 b/salome_adm/unix/config_files/check_withihm.m4
new file mode 100644 (file)
index 0000000..e4b412c
--- /dev/null
@@ -0,0 +1,68 @@
+dnl  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+dnl 
+dnl  This library is free software; you can redistribute it and/or 
+dnl  modify it under the terms of the GNU Lesser General Public 
+dnl  License as published by the Free Software Foundation; either 
+dnl  version 2.1 of the License. 
+dnl 
+dnl  This library is distributed in the hope that it will be useful, 
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+dnl  Lesser General Public License for more details. 
+dnl 
+dnl  You should have received a copy of the GNU Lesser General Public 
+dnl  License along with this library; if not, write to the Free Software 
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+dnl 
+dnl  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+dnl
+dnl
+dnl
+
+AC_DEFUN([CHECK_WITHIHM],[
+
+AC_ARG_WITH(ihm,
+           --with-ihm [default=yes],
+           WITHIHM="yes",WITHIHM="no")
+
+if test "${with_ihm}" = yes; then
+
+  echo
+  echo ---------------------------------------------
+  echo testing WITH_IHM : yes
+  echo ---------------------------------------------
+  echo
+  WITHIHM="yes"
+  if test "${with_ihm}" = "yes";then
+    withihm_ok=yes
+  fi
+
+elif test "${with_ihm}" = no; then
+
+  echo
+  echo ---------------------------------------------
+  echo testing WITH_IHM : no
+  echo ---------------------------------------------
+  echo
+  WITHIHM="no"
+  if test "${with_ihm}" = "no";then
+    withihm_ok=no
+  fi
+
+else
+
+  echo
+  echo ---------------------------------------------
+  echo testing WITH_IHM : yes
+  echo ---------------------------------------------
+  echo
+  WITHIHM="yes"
+  if test "${with_ihm}" = "yes";then
+    withihm_ok=yes
+  fi
+
+fi
+AC_SUBST(WITHIHM)
+
+])dnl
index 1cebe979e09be50fc9793d107fb83bbc9ffa28ac..e3da0539b890d86d2665320df4c629ff51083847 100644 (file)
@@ -53,14 +53,6 @@ no) enable_production=no ;;
 esac],
 enable_production=AC_ENABLE_PRODUCTION_DEFAULT)dnl
 
-# portage alpha/OSF
-# CXXFLAGS="$CXXFLAGS -Wno-deprecated -Wparentheses -Wreturn-type -Wmissing-declarations -Wunused "
-echo $CXX
-AC_CXX_OPTION(-Wparentheses,CXXFLAGS)
-AC_CXX_OPTION(-Wreturn-type,CXXFLAGS)
-AC_CXX_OPTION(-Wmissing-declarations,CXXFLAGS)
-AC_CXX_OPTION(-Wunused,CXXFLAGS)
-
 # supprimer car ne marche qu'avec compilo gnu
 # CXXVERSION=`$CXX --version`
 # if test "X$CXXVERSION" != "X2.95.3"; then
index 6fe41a56f994550c2d03c61ced58e3dc821985ab..eaa69845d612311bdea06cff8927f6245bcb461b 100644 (file)
@@ -17,4 +17,6 @@ export LD_LIBRARY_PATH=${SALOME_HOME_DIR}/lib:${LD_LIBRARY_PATH}
 PYVTK_PATH=@VTKPY_MODULES@
 export PYTHONPATH=${PYTHONPATH}:${SALOME_HOME_DIR}/idl:${SALOME_HOME_DIR}/bin:${SALOME_HOME_DIR}/lib:${PYVTK_PATH}:${EXEC_DIR}
 
-export MICORC=/dev/null
+MICORC=/dev/null
+export MICORC
+
index 4ad410361db070076e7201f87ebdf090f4918ac0..9c35798ec08d2b833ad053a3bbbc225b9e4295e1 100644 (file)
@@ -58,7 +58,7 @@ $(LIB_BUILD): $(top_builddir)/lib/salome/%.la: %.la
        ln -sf $(patsubst %.la, %.so, $(CURDIR)/.libs/$<).0 \
              $(patsubst %.la, %.so, $@).0 || true
 
-       if ! test -z $(LIB_SWIG) ; then \
+       if test "X$(LIB_SWIG)" != X; then \
           ln -sf $(patsubst %.la,%.so, $(CURDIR)/.libs/$<) $(top_builddir)/lib/salome/_$(LIB_SWIG) || true;\
        fi;
 
@@ -95,7 +95,7 @@ $(BIN:%=$(top_builddir)/bin/salome/%) $(TEST_PROGS:%=$(top_builddir)/bin/salome/
        ln -sf $(CURDIR)/$< $@
 
 $(BIN) $(TEST_PROGS): %: %.lo $(BIN_OBJ)
-       $(CXX) $(CXXFLAGS) -o $@ $^ $(BIN_LIB) $(LDFLAGS) $(LIBS)
+       $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $^ $(BIN_LIB) $(LDFLAGS) $(LIBS)
 
 # copy python scripts in $(top_builddir)/bin/salome
 #
@@ -160,7 +160,7 @@ install: $(LIB) $(BIN) $(TEST_PROGS) $(libdir) $(includedir) $(bindir) $(datadir
              ($(LT_INSTALL_LIB) $$f $(libdir)/. || exit 1);                  \
           fi;                                                                \
        done
-       @if ! test -z $(LIB_SWIG) ; then                                      \
+       @if test "X$(LIB_SWIG)" != X; then                                    \
          (cd $(libdir); ln -sf $(patsubst %.so, %cmodule.so, $(LIB_SWIG)) _$(LIB_SWIG)  || true); \
         fi;                                                                  
        @for f in X $(BIN); do                                                \
index 68cbb04bcff0391aefc6b330dd78d3ed72173a46..d18c1af6bda146db932071829073e8667127fcd6 100644 (file)
 
 
 #include "CASCatch_SignalsHandler.h"
+#include <signal.h>
 #include <OSD.hxx>
 using namespace std;
 
 CASCatch_SignalsHandler::CASCatch_SignalsHandler(bool theFloatingSignal)
 {
   OSD::SetSignal(theFloatingSignal);
+  // To allow application kill when used in xterm, one must use default behavior
+  // with SIGHUP signal
+  Utils_SignalsHandler::SetSigHandler(SIGHUP,SIG_DFL);
 }
index 49dd14a17ab99595f22fe2126764196417e31221..c9b677a84e3799283bda51ebd517c15c32d85b7d 100644 (file)
@@ -256,6 +256,10 @@ void SALOME_MPISender_i::close(const SALOME::MPISender::param& p)
 
 #ifdef HAVE_SOCKET
 
+//CCRT porting
+#define _POSIX_PII_SOCKET
+#define _LIBC_POLLUTION_H_
+
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -481,4 +485,8 @@ void SALOME_SocketSender_i::endOfCom()
   delete [] _argsForThr;
 }
 
+//CCRT porting
+#undef _LIBC_POLLUTION_H_
+#undef _POSIX_PII_SOCKET
+
 #endif
index 3fac77789e636a97bcef40e58331b090f4b21afa..7b6e8df4376315ae862cfe1980f361ea10df7150 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef _SALOME_COMM_I_HXX_
 #define _SALOME_COMM_I_HXX_
 
-#include <set.h>
 #include <string>
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(SALOME_Comm)
@@ -59,7 +58,7 @@ class SALOME_CorbaDoubleCSender_i : public POA_SALOME::CorbaDoubleCSender,
                                    public SALOME_Sender_i
 {
 public:
-  SALOME_CorbaDoubleCSender_i(const double *tabToSend,const long lgrTabToSend);
+  SALOME_CorbaDoubleCSender_i(const double *tabToSend,long lgrTabToSend);
   ~SALOME_CorbaDoubleCSender_i();
   CORBA::ULong getSize();
   SALOME::vectorOfDouble* sendPart(CORBA::ULong offset, CORBA::ULong length);
@@ -71,7 +70,7 @@ class SALOME_CorbaLongNCSender_i : public POA_SALOME::CorbaLongNCSender,
                                   public SALOME_Sender_i
 {
 public:
-  SALOME_CorbaLongNCSender_i(const int *tabToSend,const long lgrTabToSend);
+  SALOME_CorbaLongNCSender_i(const int *tabToSend,long lgrTabToSend);
   ~SALOME_CorbaLongNCSender_i();
   CORBA::ULong getSize();
   SALOME::vectorOfLong* sendPart(CORBA::ULong offset, CORBA::ULong length);
index a03faf92b6a5de411229855585e45ddc4542a101..0e28bd47d681594b02c1b2674c8702db82cd086d 100644 (file)
@@ -193,7 +193,14 @@ void Engines_Component_i::beginService(const char *serviceName)
        {
          const char* value;
          (*it).second >>= value;
-         int ret = setenv(cle.c_str(), value, overwrite);
+         //CCRT porting : setenv not defined in stdlib.h
+         std::string s(cle);
+         s+='=';
+         s+=value;
+         //char* cast because 1st arg of linux putenv function is not a const char* !!!
+         int ret=putenv((char *)s.c_str());
+         //End of CCRT porting
+         //int ret = setenv(cle.c_str(), value, overwrite);
          MESSAGE("--- setenv: "<<cle<<" = "<< value);
        }
     }
@@ -224,7 +231,7 @@ char* Engines_Component_i::nodeName() {
   return CORBA::string_dup( _nodeName.c_str() ) ;
 }
 
-bool Engines_Component_i::Killer( int ThreadId , int signum ) {
+bool Engines_Component_i::Killer( pthread_t ThreadId , int signum ) {
   if ( ThreadId ) {
     if ( signum == 0 ) {
       if ( pthread_cancel( ThreadId ) ) {
@@ -347,7 +354,7 @@ long Engines_Component_i::CpuUsed() {
   return cpu ;
 }
 
-long Engines_Component_i::CpuUsed_impl() {
+CORBA::Long Engines_Component_i::CpuUsed_impl() {
   long cpu = 0 ;
   if ( _ThreadId || _Executed ) {
     if ( _ThreadId > 0 ) {
index b753a67079b5a6d1b6bdb0902e982cd722c35f13..ca47f23d9da2532f8aa3c385cf20e820ec7a2e30 100644 (file)
@@ -448,7 +448,7 @@ void SigIntHandler(int what , siginfo_t * siginfo ,
 
 // Get the PID of the Container
 
-long Engines_Container_i::getPID() {
+CORBA::Long Engines_Container_i::getPID() {
     return (long)getpid();
 }
 
index 6d68f0fd7dc48c72a6cbf59b40e0718b71fafe3c..30881439020ec773099f02f82b04a34c1591c2d3 100644 (file)
@@ -56,6 +56,6 @@ CXXFLAGS+=$(OCC_CXXFLAGS)
 
 LDFLAGS+= -lSalomeNS -lRegistry -lOpUtil -lSalomeNotification -lSALOMELocalTrace
 
-LIBS += -Xlinker -export-dynamic $(PYTHON_LIBS) $(MPI_LIBS) -lCASCatch
+LIBS += @LDEXPDYNFLAGS@ $(PYTHON_LIBS) $(MPI_LIBS) -lCASCatch
 
 @CONCLUDE@
index 16a135dc2cd8deac57f6feb85d239e7f63e9a673..2911434da75cfa8b56fc96088133de21f47e97a9 100644 (file)
@@ -83,14 +83,14 @@ public:
   void Names( const char * graphName , const char * nodeName ) ;
   char * graphName() ;
   char * nodeName() ;
-  bool Killer( int ThreadId , int signum );
+  bool Killer( pthread_t ThreadId , int signum );
   bool Kill_impl();
   bool Stop_impl();
   bool Suspend_impl();
   bool Resume_impl();
   void SetCurCpu() ;
   long CpuUsed() ;
-  long CpuUsed_impl() ;
+  CORBA::Long CpuUsed_impl() ;
 
 protected:
   std::string _instanceName ;
index bb2d8989f1438e6460f75120b401b0c3af77e1a9..b40f721a451e9d2b2b7ac5dd039ec6166cc83b6c 100644 (file)
 
 #include <stdexcept>
 #include <CORBA.h>
+#include "utilities.h"
 
-#include "CASCatch_SignalsHandler.h" // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
+// CCRT porting
+// #include "CASCatch_SignalsHandler.h" // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
 
 using namespace std;
 
 extern "C" void HandleServerSideSignals(CORBA::ORB_ptr theORB)
 {
-  CASCatch_SignalsHandler aSignalsHandler;
+ // CCRT porting
+ //  CASCatch_SignalsHandler aSignalsHandler;
   try {
     theORB->run();
-  }catch(Standard_Failure){
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    throw std::runtime_error(aFail->GetMessageString());
+    // CCRT porting
+    //  }catch(CORBA::SystemException&){
+    //    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    //    throw std::runtime_error(aFail->GetMessageString());
+  }catch(CORBA::SystemException&){
+    INFOS("Caught CORBA::SystemException.");
+  }catch(PortableServer::POA::WrongPolicy&){
+    INFOS("Caught CORBA::WrongPolicyException.");
+  }catch(PortableServer::POA::ServantAlreadyActive&){
+    INFOS("Caught CORBA::ServantAlreadyActiveException");
+  }catch(CORBA::Exception&){
+    INFOS("Caught CORBA::Exception.");
+  }catch(std::exception& exc){
+    INFOS("Caught std::exception - "<<exc.what()); 
+  }catch(...){
+    INFOS("Caught unknown exception.");
   }
 }
index 6a65dcb3c86457be9fe9fa4a129c285cc709284c..6f309c50c8302c1d91249d0562d18a7680b9e23c 100644 (file)
@@ -76,7 +76,7 @@ public:
   bool Kill_impl() ;
 
   char* getHostName();
-  long getPID();
+  CORBA::Long getPID();
 
 protected:
 
index 434c666dae6eb03e459030873d0e07aa46c2d383..0249c933ae5a763c30b2bdcf2be8095746a40d7f 100644 (file)
@@ -68,7 +68,7 @@ int HDFConvert::FromAscii(const string& file, const HDFcontainerObject & hdf_con
 #endif
   
   // Creation du Dataset utilisateur 
-  hdf_dataset = new HDFdataset::HDFdataset( (char *) nomdataset.c_str(),            /*discard const */
+  hdf_dataset = new HDFdataset( (char *) nomdataset.c_str(),            /*discard const */
                                             (HDFcontainerObject*) &hdf_container,   /*discard const, pas de constructeur par référence */
                                             HDF_STRING,
                                             &length_long,1);
index 6caf10e2c80688243d23a00bb47eb7974dab3400..972c503b66a45b9d9762329874e57a4c26277bf2 100644 (file)
@@ -27,7 +27,7 @@ BIN_CLIENT_IDL = SALOME_Session.idl \
                 SALOME_Component.idl \
                 SALOME_ModuleCatalog.idl \
                 SALOME_Registry.idl \
-                 SALOME_Exception.idl
+                 SALOME_Exception.idl Logger.idl
 
 CPPFLAGS+=$(QT_MT_INCLUDES)
 CXXFLAGS+=$(OCC_CXXFLAGS)
index ae1ab27576ec7b96f4762f798d63a8fc210c321e..d01e24df8a59ed576221496df095023136301356 100644 (file)
@@ -44,6 +44,7 @@ EXPORT_HEADERS = \
 
 LIB = libSalomeMPIContainer.la 
 LIB_SRC = MPIObject_i.cxx  MPIContainer_i.cxx
+LIB_CLIENT_IDL = SALOME_Component.idl
 LIB_SERVER_IDL = SALOME_MPIObject.idl SALOME_MPIContainer.idl
 
 # Executables targets
index d40b8e22b424839364dd33cc9594b01fcb640c14..d97b5e791e3291965affc8017dad030349a491ee 100644 (file)
@@ -32,6 +32,7 @@ VPATH=.:@srcdir@
 
 @COMMENCE@
 
+ifeq (@WITHIHM@,yes)
 SUBDIRS = MSG2QM SALOMELocalTrace Logger Utils CASCatch PatchQt \
           GenericObj MEDWrapper NamingService Registry \
          ModuleCatalog DataTypeCatalog RessourcesCatalog \
@@ -39,10 +40,21 @@ SUBDIRS = MSG2QM SALOMELocalTrace Logger Utils CASCatch PatchQt \
          Container TestContainer LifeCycleCORBA HDFPersist Prs \
          VTKFilter OBJECT \
           TOOLSDS SALOMEDS Event \
-          SALOMEGUI Plot2d VTKViewer OCCViewer \
+          SALOMEGUI TOOLSGUI Plot2d VTKViewer OCCViewer \
          SUPERVGraph \
-         Session SALOME_SWIG TOOLSGUI SALOME_PY \
+         Session SALOME_SWIG SALOME_SWIG_WITHOUTIHM SALOME_PY \
           RegistryDisplay ModuleGenerator SALOME_PYQT Loader Communication
+endif
+
+ifeq (@WITHIHM@,no)
+SUBDIRS = MSG2QM SALOMELocalTrace Logger Utils CASCatch \
+          GenericObj NamingService Registry \
+         ModuleCatalog DataTypeCatalog RessourcesCatalog \
+         Notification  NOTIFICATION_SWIG \
+         Container TestContainer LifeCycleCORBA HDFPersist Prs \
+          TOOLSDS SALOMEDS Event \
+          SALOME_SWIG_WITHOUTIHM ModuleGenerator Loader Communication
+endif
 
 ifeq (@mpi_ok@,yes)
   SUBDIRS+= MPIContainer MPILifeCycleCORBA TestMPIContainer
index e6b0cc72d2418666e640a4da818b51a5177628fb..3d9a203c89d273b94246c2667f4e94149d7e7cf6 100644 (file)
@@ -51,13 +51,14 @@ LIB_SRC = \
                  SALOME_ModuleCatalog_impl.cxx \
                  SALOME_ModuleCatalog_Acomponent_impl.cxx
 
-CXXFLAGS+=-ftemplate-depth-32
+CXXFLAGS+=@CXXTMPDPTHFLAGS@
 
 # Executables targets
 # trouble we have client and serveur and build don't known about this with rule
 # in fact client is a test ! So it may go away BIN !
 BIN = SALOME_ModuleCatalog_Server SALOME_ModuleCatalog_Client
 BIN_SRC = 
+LIB_CLIENT_IDL = SALOME_ModuleCatalog.idl
 BIN_SERVER_IDL = SALOME_ModuleCatalog.idl
 
 CPPFLAGS+= $(QT_MT_INCLUDES) 
index 5daf6da85462b410a849417a4a981c2a37ff4ab4..94eccf70c1e2208d97cf9a92ab670d552ff83618 100755 (executable)
@@ -1,7 +1,10 @@
 #!/bin/bash
 
-export ROOT_SRCDIR=@ROOT_SRCDIR@
-export ROOT_BUILDDIR=@ROOT_BUILDDIR@
-export SRCDIR=${ROOT_SRCDIR}/SALOME/src/ModuleGenerator
+ROOT_SRCDIR=@ROOT_SRCDIR@
+export ROOT_SRCDIR
+ROOT_BUILDDIR=@ROOT_BUILDDIR@
+export ROOT_BUILDDIR
+SRCDIR=${ROOT_SRCDIR}/SALOME/src/ModuleGenerator
+export SRCDIR
 
 ${SRCDIR}/tests/test$1.sh
index d42b49280640b0dc20ff93f4b75f90cab236e565..55719f6e8d425db34c6c5b4e1dea1da7e72c4ee5 100644 (file)
@@ -43,7 +43,7 @@ LIB_CLIENT_IDL = SALOMEDS.idl \
 
 
 CPPFLAGS+=$(QT_INCLUDES) $(OCC_INCLUDES) $(OGL_INCLUDES) $(PYTHON_INCLUDES)
-LDFLAGS+=$(QT_MT_LIBS) $(OGL_LIBS) -lSalomePrs -lSalomeGUI
+LDFLAGS+=$(QT_MT_LIBS) $(OGL_LIBS) -lSalomePrs -lSalomeGUI -lToolsGUI
 
 
 @CONCLUDE@
index 47e4def85ecfb4fecd9f2a7162941a7275a6d121..caa2d2f2761a0567109e04db53bf57bcba097254 100644 (file)
@@ -44,6 +44,9 @@
 #include "QAD_Settings.h"
 #include "SALOME_Selection.h"
 #include "SALOME_AISShape.hxx"
+#include "SALOMEGUI.h"
+#include "SALOMEDS_Tool.hxx"
+#include "ToolsGUI.h"
 
 // QT Include
 #include <qapplication.h>
 #include <V3d_View.hxx>
 #include <AIS_ListIteratorOfListOfInteractive.hxx>
 #include <Visual3d_View.hxx>
+
+// IDL headers
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SALOMEDS)
+#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
+
 using namespace std;
 
-/*!
-    Constructor
+//=======================================================================
+// name    : getMapOfEntry
+// Purpose : Convert list of interactive objects in map <entry <--> interactive object>
+//=======================================================================
+static void getMapOfEntry( const AIS_ListOfInteractive&                    theList,
+                           QMap< QString, Handle(AIS_InteractiveObject) >& theMap )
+{
+  AIS_ListIteratorOfListOfInteractive anIter( theList );
+  for ( ; anIter.More(); anIter.Next() )
+  {
+    Handle(SALOME_InteractiveObject) anIO =
+      Handle(SALOME_InteractiveObject)::DownCast( anIter.Value() );
+    if ( !anIO.IsNull() )
+      theMap[ anIO->getEntry() ] = anIter.Value();
+  }
+}
+
+
+/*
+  Class       : OCCViewer_ViewFrame
+  Description : View frame for Open CASCADE view
 */
-OCCViewer_ViewFrame::OCCViewer_ViewFrame(QWidget* parent, const QString& title) 
-  : QAD_ViewFrame (parent, "")
+
+
+//=======================================================================
+// name    : OCCViewer_ViewFrame
+// Purpose : Constructor
+//=======================================================================
+OCCViewer_ViewFrame::OCCViewer_ViewFrame( QWidget* parent, const QString& title ) 
+  : QAD_ViewFrame ( parent, "" )
 {
   initialize();
 }
 
-/*!
-    Constructor
-*/
+//=======================================================================
+// name    : OCCViewer_ViewFrame
+// Purpose : Constructor
+//=======================================================================
 OCCViewer_ViewFrame::OCCViewer_ViewFrame( QWidget* parent ) 
   : QAD_ViewFrame (parent, "")
 {
   initialize();
 }
 
-/*!
-    Destructor
-*/
+//=======================================================================
+// name    : ~OCCViewer_ViewFrame
+// Purpose : Destructor
+//=======================================================================
 OCCViewer_ViewFrame::~OCCViewer_ViewFrame()
 {
   cleanup();
 }
 
-/*!
-    Init viewframe
-*/
+//=======================================================================
+// name    : initialize
+// Purpose : Initialize view frame (called from constructors )
+//=======================================================================
 void OCCViewer_ViewFrame::initialize()
 {
   myViewPort = NULL;
@@ -93,17 +130,18 @@ void OCCViewer_ViewFrame::initialize()
   myViewer->enableMultipleSelection( true );
 }
 
-/*!
-    Cleanup viewframe 
-*/
+//=======================================================================
+// name    : cleanup
+// Purpose : Cleanup viewframe 
+//=======================================================================
 void OCCViewer_ViewFrame::cleanup()
 {
-  
 } 
 
-/*!
-    Sets the viewport for this frame
-*/
+//=======================================================================
+// name    : setViewPort
+// Purpose : Sets the viewport for this frame
+//=======================================================================
 void OCCViewer_ViewFrame::setViewPort( OCCViewer_ViewPort* view )
 {
   myViewPort = view;
@@ -111,76 +149,81 @@ void OCCViewer_ViewFrame::setViewPort( OCCViewer_ViewPort* view )
   setCentralWidget ( myViewPort );
 }
 
-/*!
-    Inits the viewport for this frame
-*/
+//=======================================================================
+// name    : initViewPort
+// Purpose : Inits the viewport for this frame
+//=======================================================================
 void OCCViewer_ViewFrame::initViewPort()
 {
   /* Active Key Event */
+  
   setFocus();
 
   /* Initial attributes */
+  
   myViewPort->setCursor( cursor() );
   myViewPort->setBackgroundColor( backgroundColor() );
   
-  QAD_ASSERT ( QObject::connect(myViewPort, SIGNAL(vpKeyPress (QKeyEvent*)), 
-                               this, SIGNAL(vfKeyPress(QKeyEvent*))) );
-
-  /*  Listen to my viewport */ 
-  QAD_ASSERT ( QObject::connect(myViewPort, 
-                               SIGNAL(vpTransformationStarted (OCCViewer_ViewPort::OperationType)), 
-                               this, 
-                               SIGNAL(vfTransformationStarted(OCCViewer_ViewPort::OperationType))) );
-  QAD_ASSERT ( QObject::connect( myViewPort, 
-                                SIGNAL(vpTransformationFinished (OCCViewer_ViewPort::OperationType)),
-                                this, 
-                                SIGNAL(vfTransformationFinished(OCCViewer_ViewPort::OperationType))) );
-
-  QAD_ASSERT ( QObject::connect(myViewPort, SIGNAL(vpDrawExternal (QPainter*)), 
-                               this, SIGNAL(vfDrawExternal(QPainter*))) );     
-  QAD_ASSERT ( QObject::connect(myViewPort, SIGNAL(vpMousePress (QMouseEvent*)), 
-                               this, SIGNAL(vfMousePress(QMouseEvent*))) );
-  QAD_ASSERT ( QObject::connect(myViewPort, SIGNAL(vpMouseRelease (QMouseEvent*)), 
-                               this, SIGNAL(vfMouseRelease(QMouseEvent*))) );
-  QAD_ASSERT ( QObject::connect(myViewPort, SIGNAL(vpMouseMove (QMouseEvent*)), 
-                               this, SIGNAL(vfMouseMove(QMouseEvent*))) );
-  QAD_ASSERT ( QObject::connect(myViewPort, SIGNAL(vpMouseDoubleClick (QMouseEvent*)), 
-                               this, SIGNAL(vfMouseDoubleClick(QMouseEvent*))) );
-
-  QAD_ASSERT ( QObject::connect(myViewPort, SIGNAL(vpKeyPress (QKeyEvent*)), 
-                               this, SIGNAL(vfKeyPress(QKeyEvent*))) );
-  QAD_ASSERT ( QObject::connect(myViewPort, SIGNAL(vpKeyRelease (QKeyEvent*)), 
-                               this, SIGNAL(vfKeyRelease(QKeyEvent*))) );
-}
-
-/*!
-  Returns widget containing 3D-Viewer
-*/
+  QAD_ASSERT( QObject::connect(myViewPort, SIGNAL( vpKeyPress ( QKeyEvent* ) ), 
+              this, SIGNAL(vfKeyPress(QKeyEvent*))) );
+
+  /*  Listen to my viewport */
+  
+  QAD_ASSERT( connect( myViewPort, SIGNAL( vpTransformationStarted( OCCViewer_ViewPort::OperationType ) ), 
+                       this, SIGNAL( vfTransformationStarted( OCCViewer_ViewPort::OperationType ) ) ) );
+  QAD_ASSERT( connect( myViewPort, SIGNAL( vpTransformationFinished ( OCCViewer_ViewPort::OperationType ) ),
+                       this, SIGNAL( vfTransformationFinished( OCCViewer_ViewPort::OperationType ) ) ) );
+
+  QAD_ASSERT( connect( myViewPort, SIGNAL( vpDrawExternal( QPainter* ) ), 
+                       this, SIGNAL( vfDrawExternal( QPainter* ) ) ) );        
+  QAD_ASSERT( connect( myViewPort, SIGNAL( vpMousePress( QMouseEvent* ) ), 
+                       this, SIGNAL( vfMousePress( QMouseEvent* ) ) ) );
+  QAD_ASSERT( connect( myViewPort, SIGNAL( vpMouseRelease( QMouseEvent* ) ),
+                       this, SIGNAL( vfMouseRelease( QMouseEvent* ) ) ) );
+  QAD_ASSERT( connect( myViewPort, SIGNAL( vpMouseMove( QMouseEvent* ) ), 
+                       this, SIGNAL( vfMouseMove( QMouseEvent* ) ) ) );
+  QAD_ASSERT( connect( myViewPort, SIGNAL( vpMouseDoubleClick( QMouseEvent* ) ), 
+                       this, SIGNAL( vfMouseDoubleClick( QMouseEvent* ) ) ) );
+
+  QAD_ASSERT( connect( myViewPort, SIGNAL( vpKeyPress( QKeyEvent* ) ), 
+                       this, SIGNAL( vfKeyPress( QKeyEvent* ) ) ) );
+  QAD_ASSERT( connect( myViewPort, SIGNAL( vpKeyRelease( QKeyEvent* ) ),
+                       this, SIGNAL( vfKeyRelease( QKeyEvent* ) ) ) );
+}
+
+//=======================================================================
+// name    : getViewWidget
+// Purpose : Returns widget containing 3D-Viewer
+//=======================================================================
 QWidget* OCCViewer_ViewFrame::getViewWidget() 
 {
   return (QWidget*)getViewPort();
 }
 
-/*!
-    Returns the viewport of this frame 
-*/
+//=======================================================================
+// name    : getViewPort
+// Purpose : Returns the viewport of this frame        
+//=======================================================================
 OCCViewer_ViewPort* OCCViewer_ViewFrame::getViewPort() const
 {
   return myViewPort;
 }
 
-/*!
-    Sets the cursor for the viewframe's viewport
-*/
+//=======================================================================
+// name    : Sets the cursor for the viewframe's viewport
+// Purpose : setCursor
+//=======================================================================
 void OCCViewer_ViewFrame::setCursor( const QCursor& cursor)
 {
   if ( myViewPort ) 
-    myViewPort->QWidget::setCursor(cursor);
+    myViewPort->QWidget::setCursor( cursor );
 }
 
-/*!
-    Returns the current cursor 
-*/
+
+//=======================================================================
+// name    : cursor
+// Purpose : Returns the current cursor 
+//=======================================================================
 QCursor OCCViewer_ViewFrame::cursor() const
 {
   if ( myViewPort ) 
@@ -188,18 +231,20 @@ QCursor OCCViewer_ViewFrame::cursor() const
   return QMainWindow::cursor();
 }
 
-/*!
-    Set background of the viewport
-*/
+//=======================================================================
+// name    : setBackgroundColor
+// Purpose : Set background of the viewport
+//=======================================================================
 void OCCViewer_ViewFrame::setBackgroundColor( const QColor& color)
 {
   if ( myViewPort )
-    myViewPort->setBackgroundColor(color);
+    myViewPort->setBackgroundColor( color );
 }
 
-/*!
-    Returns background of the viewport
-*/
+//=======================================================================
+// name    : backgroundColor
+// Purpose : Returns background of the viewport
+//=======================================================================
 QColor OCCViewer_ViewFrame::backgroundColor() const
 {
   if ( myViewPort )
@@ -207,116 +252,135 @@ QColor OCCViewer_ViewFrame::backgroundColor() const
   return QMainWindow::backgroundColor();
 }
 
-/*!
-    Sets the parent viewer for the window
-*/
-void OCCViewer_ViewFrame::setViewer(OCCViewer_Viewer3d* viewer)
+//=======================================================================
+// name    : setViewer
+// Purpose : Sets the parent viewer for the window
+//=======================================================================
+void OCCViewer_ViewFrame::setViewer( OCCViewer_Viewer3d* viewer )
 {
   myViewer = viewer;
 }
 
-/*!
-  Returns the parent viewer for the window
-*/
+//=======================================================================
+// name    : getViewer
+// Purpose : Returns the parent viewer for the window
+//=======================================================================
 OCCViewer_Viewer3d* OCCViewer_ViewFrame::getViewer() const
 {
   return myViewer;
 }
 
-/*!
-    Returns 'true' if viewframe is visible
-*/
-void OCCViewer_ViewFrame::setVisible( bool visible )
+//=======================================================================
+// name    : setVisible
+// Purpose : Show/hide view
+//=======================================================================
+void OCCViewer_ViewFrame::setVisible( const bool visible )
 {
   if ( visible == QWidget::isVisible() )
     return;
   
-  if ( visible ) show();
-  else hide();
+  if ( visible )
+    show();
+  else
+    hide();
 }
 
-/*!
-   Called when viewframe is about to close
-*/
-void OCCViewer_ViewFrame::closeEvent(QCloseEvent* e)
+//=======================================================================
+// name    : closeEvent
+// Purpose : Called when viewframe is about to close
+//=======================================================================
+void OCCViewer_ViewFrame::closeEvent( QCloseEvent* e )
 {
-  emit vfViewClosing(e);  /* notify our viewer */
+  emit vfViewClosing( e );  /* notify our viewer */
 }
 
-/*!
-   Called when viewframe is resized 
-*/
-void OCCViewer_ViewFrame::resizeEvent(QResizeEvent* e)
+//=======================================================================
+// name    : resizeEvent
+// Purpose : Called when viewframe is resized 
+//=======================================================================
+void OCCViewer_ViewFrame::resizeEvent( QResizeEvent* e )
 {
-  emit vfResize(e);    
+  emit vfResize( e );
 }
 
+//=======================================================================
+// name    : keyPressEvent
+// Purpose : Called when key is pressed
+//=======================================================================
 void OCCViewer_ViewFrame::keyPressEvent( QKeyEvent *k )
 {
   emit vfKeyPress(k);
 }
 
-/*!
-    Fits all objects in the active view
-*/
+//=======================================================================
+// name    : onViewFitAll
+// Purpose : Fits all objects in the active view
+//=======================================================================
 void OCCViewer_ViewFrame::onViewFitAll()
 {
   myViewPort->fitAll();
 }
 
-/*!
-    Fits all obejcts within a rectangular area of the active view
-*/
+//=======================================================================
+// name    : onViewFitArea
+// Purpose : Fits all obejcts within a rectangular area of the active view
+//=======================================================================
 void OCCViewer_ViewFrame::onViewFitArea()
 {
   myViewPort->activateWindowFit();
-  QAD_Application::getDesktop()->putInfo( tr("PRP_VW3D_SKETCHAREA") );
+  QAD_Application::getDesktop()->putInfo( tr( "PRP_VW3D_SKETCHAREA" ) );
 }
 
-/*!
-    Moves the active view
-*/
+//=======================================================================
+// name    : onViewPan
+// Purpose : Moves the active view
+//=======================================================================
 void OCCViewer_ViewFrame::onViewPan()
 {
   myViewPort->activatePanning();
 }
 
-/*!
-    Zooms the active view
-*/
+//=======================================================================
+// name    : onViewZoom
+// Purpose : Zooms the active view
+//=======================================================================
 void OCCViewer_ViewFrame::onViewZoom()
 {
   myViewPort->activateZoom();
 }
 
-/*!
-    Sets a new center of the active view
-*/
+//=======================================================================
+// name    : onViewGlobalPan
+// Purpose : Sets a new center of the active view
+//=======================================================================
 void OCCViewer_ViewFrame::onViewGlobalPan()
 {
   myViewPort->activateGlobalPanning();
   QAD_Application::getDesktop()->putInfo( tr("PRP_VW3D_POINTCENTER") );
 }
 
-/*!
-    Rotates the active view
-*/
+//=======================================================================
+// name    : onViewRotate
+// Purpose : Rotates the active view
+//=======================================================================
 void OCCViewer_ViewFrame::onViewRotate()
 {
   myViewPort->activateRotation();
 }
 
-/*!
-    Reset the active view
-*/
+//=======================================================================
+// name    : onViewReset
+// Purpose : Reset the active view
+//=======================================================================
 void OCCViewer_ViewFrame::onViewReset()
 {
   myViewPort->reset();
 }
 
-/*!
-    Provides front projection of the active view
-*/
+//=======================================================================
+// name    : onViewFront
+// Purpose : Provides front projection of the active view
+//=======================================================================
 void OCCViewer_ViewFrame::onViewFront()
 {
   Handle( V3d_View) view3d = ((OCCViewer_ViewPort3d*)myViewPort)->getView();
@@ -324,9 +388,10 @@ void OCCViewer_ViewFrame::onViewFront()
   onViewFitAll();
 }
 
-/*!
-    Provides back projection of the active view
-*/
+//=======================================================================
+// name    : onViewBack
+// Purpose : Provides back projection of the active view
+//=======================================================================
 void OCCViewer_ViewFrame::onViewBack()
 {
   Handle( V3d_View) view3d = ((OCCViewer_ViewPort3d*)myViewPort)->getView();
@@ -334,9 +399,10 @@ void OCCViewer_ViewFrame::onViewBack()
   onViewFitAll();
 }
 
-/*!
-    Provides right projection of the active view
-*/
+//=======================================================================
+// name    : onViewRight
+// Purpose : Provides right projection of the active view
+//=======================================================================
 void OCCViewer_ViewFrame::onViewRight()
 {
   Handle( V3d_View) view3d = ((OCCViewer_ViewPort3d*)myViewPort)->getView();
@@ -345,9 +411,10 @@ void OCCViewer_ViewFrame::onViewRight()
   onViewFitAll();
 }
 
-/*!
-    Provides left projection of the active view
-*/
+//=======================================================================
+// name    : onViewLeft
+// Purpose : Provides left projection of the active view
+//=======================================================================
 void OCCViewer_ViewFrame::onViewLeft()
 {
   Handle( V3d_View) view3d = ((OCCViewer_ViewPort3d*)myViewPort)->getView();
@@ -356,9 +423,10 @@ void OCCViewer_ViewFrame::onViewLeft()
   onViewFitAll();
 }
 
-/*!
-    Provides bottom projection of the active view
-*/
+//=======================================================================
+// name    : onViewBottom
+// Purpose : Provides bottom projection of the active view
+//=======================================================================
 void OCCViewer_ViewFrame::onViewBottom()
 {
   Handle( V3d_View) view3d = ((OCCViewer_ViewPort3d*)myViewPort)->getView();
@@ -366,9 +434,10 @@ void OCCViewer_ViewFrame::onViewBottom()
   onViewFitAll();
 }
 
-/*!
-    Provides top projection of the active view
-*/
+//=======================================================================
+// name    : onViewTop
+// Purpose : Provides top projection of the active view
+//=======================================================================
 void OCCViewer_ViewFrame::onViewTop()
 {
   Handle( V3d_View) view3d = ((OCCViewer_ViewPort3d*)myViewPort)->getView();
@@ -376,9 +445,10 @@ void OCCViewer_ViewFrame::onViewTop()
   onViewFitAll();
 }
 
-/*!
-  Display/hide Trihedron
-*/
+//=======================================================================
+// name    : onViewTrihedron
+// Purpose : Display/hide Trihedron
+//=======================================================================
 void OCCViewer_ViewFrame::onViewTrihedron()
 {
   if (!myViewer->getAISContext()->IsDisplayed( myViewer->getTrihedron() ))
@@ -388,124 +458,143 @@ void OCCViewer_ViewFrame::onViewTrihedron()
   onAdjustTrihedron();
 }
 
-void OCCViewer_ViewFrame::rename( const Handle(SALOME_InteractiveObject)& IObject, QString newName )
+//=======================================================================
+// name    : rename
+// Purpose : Rename entry object
+//=======================================================================
+void OCCViewer_ViewFrame::rename( const Handle(SALOME_InteractiveObject)& IObject,
+                                  const QString newName )
 {
   myViewer->rename(IObject, newName);
 }
 
+//=======================================================================
+// name    : unHighlightAll
+// Purpose : Unhighlight all objects
+//=======================================================================
 void OCCViewer_ViewFrame::unHighlightAll() 
 {
   myViewer->unHighlightAll();
 }
 
-void OCCViewer_ViewFrame::highlight( const Handle(SALOME_InteractiveObject)& IObject, bool highlight, bool update ) 
+//=======================================================================
+// name    : highlight
+// Purpose : Highlight object
+//=======================================================================
+void OCCViewer_ViewFrame::highlight( const Handle(SALOME_InteractiveObject)& IObject,
+                                     const bool highlight,
+                                     const bool update ) 
 {
-  myViewer->highlight(IObject, highlight, update);
+  myViewer->highlight( IObject, highlight, update );
 }
 
+//=======================================================================
+// name    : isInViewer
+// Purpose : Magic function
+//=======================================================================
 bool OCCViewer_ViewFrame::isInViewer( const Handle(SALOME_InteractiveObject)& IObject ) 
 {
   return myViewer->isInViewer( IObject );
 }
 
+//=======================================================================
+// name    : isVisible
+// Purpose : Verify whether object is visible
+//=======================================================================
 bool OCCViewer_ViewFrame::isVisible( const Handle(SALOME_InteractiveObject)& IObject ) 
 {
   return myViewer->isVisible( IObject );
 }
 
+//=======================================================================
+// name    : setPopupServer
+// Purpose : Set popup server
+//=======================================================================
 void OCCViewer_ViewFrame::setPopupServer( QAD_Application* App )
 {
   myViewer->setPopupServer( App );
 }
 
-void OCCViewer_ViewFrame::undo(QAD_Study* theStudy, const char* StudyFrameEntry)
+//=======================================================================
+// name    : redisplayAll
+// Purpose : Redisplay all objects of active component in accordance with
+//           their display flags
+//=======================================================================
+void OCCViewer_ViewFrame::redisplayAll( QAD_Study* theQADStudy, const bool theToUpdate ) 
 {
-  SALOMEDS::Study_var aStudy = theStudy->getStudyDocument();
-  AIS_ListOfInteractive List1;
-  myViewer->getAISContext()->ObjectsInCollector(List1);
-  AIS_ListIteratorOfListOfInteractive ite1(List1);
-  for( ; ite1.More(); ite1.Next() )
-  {
-    Handle(SALOME_InteractiveObject) anObj =
-      Handle(SALOME_InteractiveObject)::DownCast( ite1.Value()->GetOwner() );
-      
-    if ( !anObj.IsNull() &&
-          anObj->hasEntry() &&
-          theStudy->isInViewer( anObj->getEntry(), StudyFrameEntry) )
-    {
-      myViewer->getAISContext()->Display( ite1.Value() );
-    }
-  }
+  SALOMEDS::Study_var      aStudy     = theQADStudy->getStudyDocument();
+  QAD_Desktop*             aDesktop   = QAD_Application::getDesktop();
+  SALOMEGUI*               aGUI       = aDesktop->getActiveGUI();
+  const QString&           aCompName  = aDesktop->getComponentDataType();
+  SALOMEDS::SObject_var    aComponent =
+    SALOMEDS::SObject::_narrow( aStudy->FindComponent ( aCompName.latin1() ) );
+
+  if ( aComponent->_is_nil() )
+    return;
+
+  Handle(AIS_InteractiveContext) anIC = myViewer->getAISContext();
+  bool isTrhDisplayed = anIC->IsDisplayed( myViewer->getTrihedron() );
   
-  AIS_ListOfInteractive List;
-  myViewer->getAISContext()->DisplayedObjects(List);
-  AIS_ListIteratorOfListOfInteractive ite(List);
-  for ( ; ite.More(); ite.Next() )
-  {
-    Handle(SALOME_InteractiveObject) anObj =
-      Handle(SALOME_InteractiveObject)::DownCast( ite.Value()->GetOwner() );
+  anIC->DisplayAll( true, false );
+  anIC->EraseAll( false, false );
+
+  if ( isTrhDisplayed )
+    anIC->Display( myViewer->getTrihedron(), false );
 
-    if ( !anObj.IsNull() &&
-          anObj->hasEntry() &&
-          theStudy->isInViewer( anObj->getEntry(), StudyFrameEntry) )
+  std::list<SALOMEDS::SObject_var> aList;
+  SALOMEDS_Tool::GetAllChildren( aStudy, aComponent, aList );
+
+  std::list<SALOMEDS::SObject_var>::iterator anIter = aList.begin();
+  for ( ; anIter != aList.end(); ++anIter )
+  {
+    SALOMEDS::SObject_var anObj = (*anIter);
+    if ( ToolsGUI::GetVisibility( aStudy, anObj, this ) )
     {
-      myViewer->getAISContext()->Erase( ite.Value(), true, true ); 
+      Handle(SALOME_InteractiveObject) anIObj = new SALOME_InteractiveObject();
+      anIObj->setEntry( anObj->GetID() );
+      aGUI->BuildPresentation( anIObj, this );
     }
   }
+
+  if ( theToUpdate )
+    Repaint();
 }
 
-void OCCViewer_ViewFrame::redo(QAD_Study* theStudy, const char* StudyFrameEntry)
+//=======================================================================
+// name    : undo
+// Purpose : Redisplay all objects of active component in accordance with
+//           their display flags. Called when undo operation is complited
+//=======================================================================
+void OCCViewer_ViewFrame::undo( QAD_Study* theQADStudy, const char* )
 {
-  SALOMEDS::Study_var aStudy = theStudy->getStudyDocument();
-  SALOMEDS::SObject_var RefSO;
-  SALOMEDS::SObject_var SO = aStudy->FindObjectID( StudyFrameEntry );
-  SALOMEDS::ChildIterator_var it = aStudy->NewChildIterator(SO);
-  for (; it->More();it->Next()){
-    SALOMEDS::SObject_var CSO= it->Value();
-    if (CSO->ReferencedObject(RefSO))
-    {
-      AIS_ListOfInteractive List;
-      myViewer->getAISContext()->ObjectsInCollector(List);
-      
-      AIS_ListIteratorOfListOfInteractive ite(List);
-      for ( ; ite.More(); ite.Next() )
-      {
-        Handle(SALOME_InteractiveObject) anObj =
-          Handle(SALOME_InteractiveObject)::DownCast( ite.Value()->GetOwner() );
-          
-        if ( !anObj.IsNull() && anObj->hasEntry() && strcmp( anObj->getEntry(), RefSO->GetID() ) == 0 )
-          myViewer->getAISContext()->Display( ite.Value(), false );
-      }
-    }
-  }
-  
-  AIS_ListOfInteractive List1;
-  myViewer->getAISContext()->DisplayedObjects(List1);
-  AIS_ListIteratorOfListOfInteractive ite1(List1);
-  for ( ; ite1.More(); ite1.Next() )
-  {
-    Handle(SALOME_InteractiveObject) anObj =
-      Handle(SALOME_InteractiveObject)::DownCast( ite1.Value()->GetOwner() );
+  redisplayAll( theQADStudy );
+}
 
-    if ( !anObj.IsNull() && anObj->hasEntry() && !theStudy->isInViewer( anObj->getEntry(), StudyFrameEntry ) )
-      myViewer->getAISContext()->Erase( ite1.Value(), false, true );
-  }
-  
-  Repaint();
+//=======================================================================
+// name    : redo
+// Purpose : Redisplay all objects of active component in accordance with
+//           their display flags. Called when undo operation is complited
+//=======================================================================
+void OCCViewer_ViewFrame::redo( QAD_Study* theQADStudy, const char* )
+{
+  redisplayAll( theQADStudy );
 }
 
-/* selection */
-Handle(SALOME_InteractiveObject) OCCViewer_ViewFrame::FindIObject(const char* Entry)
+//=======================================================================
+// name    : FindIObject
+// Purpose : Find in context SALOME_InteractiveObject by entry
+//=======================================================================
+Handle(SALOME_InteractiveObject) OCCViewer_ViewFrame::FindIObject( const char* Entry )
 {
   Handle (AIS_InteractiveContext) ic = myViewer->getAISContext();
       
   AIS_ListOfInteractive List;
-  ic->DisplayedObjects(List);
+  ic->DisplayedObjects( List );
   AIS_ListOfInteractive List1;
-  ic->ObjectsInCollector(List1);
-  List.Append(List1);
+  ic->ObjectsInCollector( List1 );
+  List.Append( List1 );
 
-  AIS_ListIteratorOfListOfInteractive ite(List);
+  AIS_ListIteratorOfListOfInteractive ite( List );
   for ( ; ite.More(); ite.Next() )
   {
     Handle(SALOME_InteractiveObject) anObj =
@@ -521,54 +610,69 @@ Handle(SALOME_InteractiveObject) OCCViewer_ViewFrame::FindIObject(const char* En
   return Handle(SALOME_InteractiveObject)();
 }
 
-/* display */          
-void OCCViewer_ViewFrame::Display(const Handle(SALOME_InteractiveObject)& IObject, bool update)
+//=======================================================================
+// name    : Display
+// Purpose : Display object
+//=======================================================================
+void OCCViewer_ViewFrame::Display( const Handle(SALOME_InteractiveObject)& theIObject,
+                                   bool toUpdate )
 {
-  QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy();
-  SALOME_Selection* Sel
-    = SALOME_Selection::Selection( myStudy->getSelection() );
+  if ( theIObject.IsNull() )
+    return;
 
-  Handle (AIS_InteractiveContext) ic = myViewer->getAISContext();
+  QAD_Study*          aQADStudy = QAD_Application::getDesktop()->getActiveStudy();
+  SALOME_Selection*   aSel      = SALOME_Selection::Selection( aQADStudy->getSelection() );
+  SALOMEDS::Study_var aStudy    = aQADStudy->getStudyDocument();
 
-  AIS_ListOfInteractive List;
-  ic->DisplayedObjects(List);
-  AIS_ListOfInteractive List1;
-  ic->ObjectsInCollector(List1);
-  List.Append(List1);
-  
-  AIS_ListIteratorOfListOfInteractive ite( List );
-  for ( ; ite.More(); ite.Next() )
+  Handle(AIS_InteractiveContext) anIC = myViewer->getAISContext();
+
+  AIS_ListOfInteractive aList;
+  anIC->ObjectsInCollector( aList );
+  AIS_ListIteratorOfListOfInteractive anIter( aList );
+  for ( ; anIter.More(); anIter.Next() )
   {
     Handle(SALOME_InteractiveObject) anObj =
-      Handle(SALOME_InteractiveObject)::DownCast( ite.Value()->GetOwner() );
+      Handle(SALOME_InteractiveObject)::DownCast( anIter.Value()->GetOwner() );
 
-    if ( !anObj.IsNull() && anObj->hasEntry() && anObj->isSame( IObject ) )
+    if ( !anObj.IsNull() && anObj->hasEntry() && anObj->isSame( theIObject ) )
     {
-      ic->Display( ite.Value(), false );
-      Sel->AddIObject( anObj, false );
+      anIC->Display( anIter.Value(), false );
+      aSel->AddIObject( anObj, false );
+      ToolsGUI::SetVisibility( aStudy, anObj->getEntry(), true, this );
       break;
     }
   }
   
-  if ( update )
+  if ( toUpdate )
     Repaint();
 }
 
-void OCCViewer_ViewFrame::DisplayOnly(const Handle(SALOME_InteractiveObject)& IObject)
+//=======================================================================
+// name    : DisplayOnly
+// Purpose : Display object and erase all other ones
+//=======================================================================
+void OCCViewer_ViewFrame::DisplayOnly( const Handle(SALOME_InteractiveObject)& theIO )
 {
-  QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy();
-  SALOME_Selection* Sel
-    = SALOME_Selection::Selection( myStudy->getSelection() );
+  EraseAll();
+  Display( theIO );
+}
 
-  Handle (AIS_InteractiveContext) ic = myViewer->getAISContext();
+//=======================================================================
+// name    : Erase
+// Purpose : Erase object
+//=======================================================================
+void OCCViewer_ViewFrame::Erase( const Handle(SALOME_InteractiveObject)& theIObject,
+                                 bool                                    toUpdate )
+{
+  QAD_Study* aStudy = QAD_Application::getDesktop()->getActiveStudy();
+  SALOME_Selection* aSel = SALOME_Selection::Selection( aStudy->getSelection() );
+
+  Handle(AIS_InteractiveContext) anIC = myViewer->getAISContext();
   
-  AIS_ListOfInteractive List;
-  ic->DisplayedObjects(List);
-  AIS_ListOfInteractive List1;
-  ic->ObjectsInCollector(List1);
-  List.Append(List1);
+  AIS_ListOfInteractive aList;
+  anIC->DisplayedObjects( aList );
   
-  AIS_ListIteratorOfListOfInteractive ite( List );
+  AIS_ListIteratorOfListOfInteractive ite( aList );
   for ( ; ite.More(); ite.Next() )
   {
     Handle(SALOME_InteractiveObject) anObj =
@@ -576,82 +680,129 @@ void OCCViewer_ViewFrame::DisplayOnly(const Handle(SALOME_InteractiveObject)& IO
 
     if ( !anObj.IsNull() && anObj->hasEntry() )
     {
-      if ( !anObj->isSame( IObject ) )
+      if ( anObj->isSame( theIObject ) )
       {
-        ic->Erase( ite.Value(), false );
-        Sel->RemoveIObject( anObj, false );
-      }
-      else
-      {
-        ic->Display( ite.Value(), false );
-        Sel->AddIObject( anObj, false );
+        anIC->Erase( ite.Value(), false );
+        aSel->RemoveIObject( anObj, false );
+        ToolsGUI::SetVisibility( aStudy->getStudyDocument(), anObj->getEntry(), false, this );
+        break;
       }
     }
   }
-  
-  Repaint();
+
+  if ( toUpdate )
+    Repaint();
 }
-void OCCViewer_ViewFrame::Erase(const Handle(SALOME_InteractiveObject)& IObject, bool update)
+
+//=======================================================================
+// name    : DisplayAll
+// Purpose : Display all objects of active component
+//=======================================================================
+void OCCViewer_ViewFrame::DisplayAll()
 {
-  QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy();
-  SALOME_Selection* Sel
-    = SALOME_Selection::Selection( myStudy->getSelection() );
+  SALOMEDS::Study_var      aStudy     = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
+  QAD_Desktop*             aDesktop   = QAD_Application::getDesktop();
+  SALOMEGUI*               aGUI       = aDesktop->getActiveGUI();
+  const QString&           aCompName  = aDesktop->getComponentDataType();
+  SALOMEDS::SObject_var    aComponent =
+    SALOMEDS::SObject::_narrow( aStudy->FindComponent ( aCompName.latin1() ) );
+
+  if ( aComponent->_is_nil() )
+    return;
 
-  Handle (AIS_InteractiveContext) ic = myViewer->getAISContext();
-  
-  AIS_ListOfInteractive List;
-  ic->DisplayedObjects(List);
-  
-  AIS_ListIteratorOfListOfInteractive ite( List );
-  for ( ; ite.More(); ite.Next() )
+  Handle(AIS_InteractiveContext) anIC = myViewer->getAISContext();
+
+  AIS_ListOfInteractive aDispList;
+  AIS_ListOfInteractive aCollList;
+  anIC->DisplayedObjects( aDispList );
+  anIC->ObjectsInCollector( aCollList );
+
+  QMap< QString, Handle(AIS_InteractiveObject) > aDispMap;
+  QMap< QString, Handle(AIS_InteractiveObject) > aCollMap;
+  getMapOfEntry( aDispList, aDispMap );
+  getMapOfEntry( aCollList, aCollMap );
+
+  std::list<SALOMEDS::SObject_var> aList;
+  SALOMEDS_Tool::GetAllChildren( aStudy, aComponent, aList );
+
+  std::list<SALOMEDS::SObject_var>::iterator anIter = aList.begin();
+  for ( ; anIter != aList.end(); ++anIter )
   {
-    Handle(SALOME_InteractiveObject) anObj =
-      Handle(SALOME_InteractiveObject)::DownCast( ite.Value()->GetOwner() );
+    SALOMEDS::SObject_var anObj = (*anIter);
+    if ( anObj->_is_nil() )
+      continue;
 
-    if ( !anObj.IsNull() && anObj->hasEntry() )
+    const char* aEntry = anObj->GetID();
+    if ( aCollMap.contains( aEntry ) )
     {
-      if ( anObj->isSame( IObject ) )
-      {
-        ic->Erase( ite.Value(), false );
-        Sel->RemoveIObject( anObj, false );
-        break;
-      }
+      anIC->DisplayFromCollector( aCollMap[ aEntry ], false );
+      ToolsGUI::SetVisibility( aStudy, aEntry, true, this );
+    }
+    else if ( !aDispMap.contains( aEntry ) )
+    {
+      Handle(SALOME_InteractiveObject) anIObj = new SALOME_InteractiveObject();
+      anIObj->setEntry( anObj->GetID() );
+      aGUI->BuildPresentation( anIObj, this );
     }
   }
-  
-  if ( update )
-    Repaint();
-}
 
-void OCCViewer_ViewFrame::DisplayAll()
-{
-  myViewer->getAISContext()->DisplayAll(Standard_False,Standard_True);
+  Repaint();
 }
+
+//=======================================================================
+// name    : EraseAll
+// Purpose : Erase all objects
+//=======================================================================
 void OCCViewer_ViewFrame::EraseAll()
 {
-  Standard_Boolean isTrihedronDisplayed = 
+  SALOMEDS::Study_var aStudy =
+    QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
+
+  Standard_Boolean isTrihedronDisplayed =
     myViewer->getAISContext()->IsDisplayed( myViewer->getTrihedron() );
-  myViewer->getAISContext()->EraseAll();
-  if (isTrihedronDisplayed)
+
+  Handle(AIS_InteractiveContext) anIC = myViewer->getAISContext();
+
+  AIS_ListOfInteractive aList;
+  anIC->DisplayedObjects( aList );
+  AIS_ListIteratorOfListOfInteractive anIter( aList );
+  for ( ; anIter.More(); anIter.Next() )
+  {
+    if ( anIC->IsDisplayed( myViewer->getTrihedron() ) &&
+         anIter.Value()->DynamicType() == STANDARD_TYPE( AIS_Trihedron ) )
+      continue;
+
+    Handle(AIS_InteractiveObject) anIO = anIter.Value();
+    anIC->Erase( anIO, false, true );
+
+    Handle(SALOME_InteractiveObject) anObj =
+      Handle(SALOME_InteractiveObject)::DownCast( anIO->GetOwner() );
+
+    if ( !anObj.IsNull() && anObj->hasEntry() )
+      ToolsGUI::SetVisibility( aStudy, anObj->getEntry(), false, this );
+  }
+
+  if ( isTrihedronDisplayed )
     myViewer->getAISContext()->Display( myViewer->getTrihedron() );
   else
     Repaint();
 }
 
-
-
+//=======================================================================
+// name    : Repaint
+// Purpose : Uodate view
+//=======================================================================
 void OCCViewer_ViewFrame::Repaint()
 {
   onAdjustTrihedron();
   myViewer->getViewer3d()->Update();
 }
 
-//==========================================================
-/*!
- *  OCCViewer_ViewFrame::getTrihedronSize
- *  Get new an current trihedron size
- */
-//==========================================================
+//=======================================================================
+// name    : getTrihedronSize
+// Purpose : Get new and current trihedron size corresponding to the
+//           current model size
+//=======================================================================
 bool OCCViewer_ViewFrame::getTrihedronSize( double& theNewSize, double& theSize )
 {
   theNewSize = 100;
@@ -661,10 +812,9 @@ bool OCCViewer_ViewFrame::getTrihedronSize( double& theNewSize, double& theSize
 
   if ( view3d.IsNull() )
     return false;
-    
+
   double Xmin = 0, Ymin = 0, Zmin = 0, Xmax = 0, Ymax = 0, Zmax = 0;
   double aMaxSide;
-  double aPercents;
 
   view3d->View()->MinMaxValues( Xmin, Ymin, Zmin, Xmax, Ymax, Zmax );
 
@@ -689,6 +839,10 @@ bool OCCViewer_ViewFrame::getTrihedronSize( double& theNewSize, double& theSize
          fabs( theNewSize - theSize) > theNewSize * EPS;
 }
 
+//=======================================================================
+// name    : AdjustTrihedrons
+// Purpose : Adjust trihedron size in accordance with size of model
+//=======================================================================
 void OCCViewer_ViewFrame::AdjustTrihedrons( const bool forced )
 {
   Handle (AIS_InteractiveContext) ic = myViewer->getAISContext();
@@ -711,17 +865,19 @@ void OCCViewer_ViewFrame::AdjustTrihedrons( const bool forced )
     myViewer->setTrihedronSize( aNewSize );
 }
 
+//=======================================================================
+// name    : onAdjustTrihedron
+// Purpose : Slot. Called when trihedrons must be resized
+//=======================================================================
 void OCCViewer_ViewFrame::onAdjustTrihedron()
 {
   AdjustTrihedrons( false );
 }
 
-//==========================================================
-/*!
- *  OCCViewer_ViewFrame::Display
- *  Display presentation
- */
-//==========================================================
+//=======================================================================
+// name    : Display
+// Purpose : Display presentation
+//=======================================================================
 void OCCViewer_ViewFrame::Display( const SALOME_OCCPrs* prs )
 {
   // try do downcast object
@@ -734,7 +890,7 @@ void OCCViewer_ViewFrame::Display( const SALOME_OCCPrs* prs )
   // get all displayed objects
   AIS_ListOfInteractive List;
   ic->DisplayedObjects( List );
-  // get objects in he collector
+  // get objects in the collector
   AIS_ListOfInteractive ListCollector;
   ic->ObjectsInCollector( ListCollector );
 
@@ -743,46 +899,63 @@ void OCCViewer_ViewFrame::Display( const SALOME_OCCPrs* prs )
   anOCCPrs->GetObjects( anAISObjects );
 
   AIS_ListIteratorOfListOfInteractive aIter( anAISObjects );
-  for ( ; aIter.More(); aIter.Next() ) {
+  for ( ; aIter.More(); aIter.Next() )
+  {
     Handle(AIS_InteractiveObject) anAIS = aIter.Value();
-    if ( !anAIS.IsNull() ) {
+    if ( !anAIS.IsNull() )
+    {
       // try to find presentation in the viewer
       bool bDisplayed = false;
       AIS_ListIteratorOfListOfInteractive ite( List );
-      while ( ite.More() ) {
-       // compare presentations by handles
-       // if the object is already displayed - nothing to do more
-       if ( ite.Value() == anAIS ) {
-    
-    // Deactivate object if necessary
-    if ( !anOCCPrs->ToActivate() )
-      ic->Deactivate( anAIS );
-         bDisplayed = true;
-         break;
-       }
-       ite.Next();
+      for ( ; ite.More(); ite.Next() )
+      {
+        // compare presentations by handles
+        // if the object is already displayed - nothing to do more
+        if ( ite.Value() == anAIS )
+        {
+          // Deactivate object if necessary
+          if ( !anOCCPrs->ToActivate() )
+            ic->Deactivate( anAIS );
+          bDisplayed = true;
+          break;
+        }
       }
+
       if ( bDisplayed )
-       continue;
+        continue;
+
       // then try to find presentation in the collector
       bDisplayed = false;
       ite.Initialize( ListCollector );
-      while ( ite.More() ) {
-       // compare presentations by handles
-       // if the object is in collector - display it
-       if ( ite.Value() == anAIS ) {
-         ic->DisplayFromCollector( anAIS, false );
-
-  // Deactivate object if necessary
-  if ( !anOCCPrs->ToActivate() )
-      ic->Deactivate( anAIS );
-         bDisplayed = true;
-         break;
-       }
-       ite.Next();
+      for ( ; ite.More(); ite.Next() )
+      {
+        // compare presentations by handles
+        // if the object is in collector - display it
+        if ( ite.Value() == anAIS )
+        {
+          ic->DisplayFromCollector( anAIS, false );
+
+          // Deactivate object if necessary
+          if ( !anOCCPrs->ToActivate() )
+            ic->Deactivate( anAIS );
+          bDisplayed = true;
+
+          // Set visibility flag
+          Handle(SALOME_InteractiveObject) anObj =
+            Handle(SALOME_InteractiveObject)::DownCast( anAIS->GetOwner() );
+          if ( !anObj.IsNull() && anObj->hasEntry() )
+          {
+            SALOMEDS::Study_var aStudy =
+              QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
+            ToolsGUI::SetVisibility( aStudy, anObj->getEntry(), true, this );
+          }
+
+          break;
+        }
       }
       if ( bDisplayed )
-       continue;
+        continue;
+
       // if object is not displayed and not found in the collector - display it
       if ( anAIS->IsKind( STANDARD_TYPE(AIS_Trihedron) ) )
       {
@@ -791,9 +964,19 @@ void OCCViewer_ViewFrame::Display( const SALOME_OCCPrs* prs )
         getTrihedronSize( aNewSize, aSize );
         aTrh->SetSize( aTrh == myViewer->getTrihedron() ? aNewSize : 0.5 * aNewSize );
       }
-      
+
       ic->Display( anAIS, false );
 
+      // Set visibility flag
+      Handle(SALOME_InteractiveObject) anObj =
+        Handle(SALOME_InteractiveObject)::DownCast( anAIS->GetOwner() );
+      if ( !anObj.IsNull() && anObj->hasEntry() )
+      {
+        SALOMEDS::Study_var aStudy =
+          QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
+        ToolsGUI::SetVisibility( aStudy, anObj->getEntry(), true, this );
+      }
+
       // Deactivate object if necessary
       if ( !anOCCPrs->ToActivate() )
         ic->Deactivate( anAIS );
@@ -801,12 +984,10 @@ void OCCViewer_ViewFrame::Display( const SALOME_OCCPrs* prs )
   }
 }
 
-//==========================================================
-/*!
- *  OCCViewer_ViewFrame::Erase
- *  Erase presentation
- */
-//==========================================================
+//=======================================================================
+// name    : Erase
+// Purpose : Erase presentation
+//=======================================================================
 void OCCViewer_ViewFrame::Erase( const SALOME_OCCPrs* prs, const bool forced )
 {
   // try do downcast object
@@ -827,16 +1008,27 @@ void OCCViewer_ViewFrame::Erase( const SALOME_OCCPrs* prs, const bool forced )
     if ( !anAIS.IsNull() ) {
       // erase the object from context : move it to collector
       ic->Erase( anAIS, false, forced ? false : true );
+
+      // Set visibility flag if necessary
+      if ( !forced )
+      {
+        Handle(SALOME_InteractiveObject) anObj =
+          Handle(SALOME_InteractiveObject)::DownCast( anAIS->GetOwner() );
+        if ( !anObj.IsNull() && anObj->hasEntry() )
+        {
+          SALOMEDS::Study_var aStudy =
+            QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
+          ToolsGUI::SetVisibility( aStudy, anObj->getEntry(), true, this );
+        }
+      }
     }
   }
 }
 
-//==========================================================
-/*!
- *  OCCViewer_ViewFrame::CreatePrs
- *  Create presentation by entry
- */
-//==========================================================
+//=======================================================================
+// name    : CreatePrs
+// Purpose : Create presentation corresponding to the entry
+//=======================================================================
 SALOME_Prs* OCCViewer_ViewFrame::CreatePrs( const char* entry )
 {
   OCCViewer_Prs* prs = new OCCViewer_Prs();
@@ -866,12 +1058,10 @@ SALOME_Prs* OCCViewer_ViewFrame::CreatePrs( const char* entry )
   return prs;
 }
 
-//==========================================================
-/*!
- *  OCCViewer_ViewFrame::LocalSelection
- *  Activates selection of sub shapes
- */
-//==========================================================
+//=======================================================================
+// name    : LocalSelection
+// Purpose : Activates selection of sub shapes
+//=======================================================================
 void OCCViewer_ViewFrame::LocalSelection( const SALOME_OCCPrs* thePrs, const int theMode )
 {
   Handle(AIS_InteractiveContext) anIC = myViewer->getAISContext();
@@ -914,12 +1104,10 @@ void OCCViewer_ViewFrame::LocalSelection( const SALOME_OCCPrs* thePrs, const int
   }
 }
 
-//==========================================================
-/*!
- *  OCCViewer_ViewFrame::GlobalSelection
- *  Deactivates selection of sub shapes
- */
-//==========================================================
+//=======================================================================
+// name    : GlobalSelection
+// Purpose : Deactivates selection of sub shapes
+//=======================================================================
 void OCCViewer_ViewFrame::GlobalSelection( const bool update ) const
 {
   Handle(AIS_InteractiveContext) anIC = myViewer->getAISContext();
@@ -929,24 +1117,20 @@ void OCCViewer_ViewFrame::GlobalSelection( const bool update ) const
     anIC->CurrentViewer()->Redraw();
 }
 
-//==========================================================
-/*!
- *  OCCViewer_ViewFrame::BeforeDisplay
- *  Axiluary method called before displaying of objects
- */
-//==========================================================
+//=======================================================================
+// name    : BeforeDisplay
+// Purpose : Axiluary method called before displaying of objects
+//=======================================================================
 void  OCCViewer_ViewFrame::BeforeDisplay( SALOME_Displayer* d )
 {
   d->BeforeDisplay( this, SALOME_OCCViewType() );
 }
 
-//==========================================================
-/*!
- *  OCCViewer_ViewFrame::AfterDisplay
- *  Axiluary method called after displaying of objects
- */
-//==========================================================
-void  OCCViewer_ViewFrame::AfterDisplay( SALOME_Displayer* d )
+//=======================================================================
+// name    : AfterDisplay
+// Purpose : Axiluary method called after displaying of objects
+//=======================================================================
+void OCCViewer_ViewFrame::AfterDisplay( SALOME_Displayer* d )
 {
   d->AfterDisplay( this, SALOME_OCCViewType() );
 }
index 4d29bcc441b1e4bbb6c1cad11267e21f81398ffe..42b3c0685ff07ace1318b84245de1abd2593d975 100644 (file)
 #include "SALOME_Selection.h"
 
 class OCCViewer_Viewer3d;
+
+/*
+  Class       : OCCViewer_ViewFrame
+  Description : View frame for Open CASCADE view
+*/
+
 class QAD_EXPORT OCCViewer_ViewFrame : public QAD_ViewFrame
 {
   Q_OBJECT
 
- public:
-  OCCViewer_ViewFrame(QWidget* parent, const QString& title);
-  OCCViewer_ViewFrame(QWidget* parent = 0);
-  virtual ~OCCViewer_ViewFrame();
-
- protected:
-  virtual void     initViewPort();
-  void              initialize();
-  void              cleanup();
-
- public:
-  ViewType          getTypeView() const{ return VIEW_OCC;};
-  QWidget*          getViewWidget();
-  void              setViewPort(OCCViewer_ViewPort* view);
-  OCCViewer_ViewPort*      getViewPort() const;
-
-  void             setViewer(OCCViewer_Viewer3d* viewer);
-  OCCViewer_Viewer3d*     getViewer() const;
+public:
 
-  void              setVisible( bool isVisible = true );
+                              OCCViewer_ViewFrame( QWidget* parent, const QString& title );
+                              OCCViewer_ViewFrame( QWidget* parent = 0 );
+  virtual                     ~OCCViewer_ViewFrame();
 
-  void              setBackgroundColor( const QColor& );
-  QColor            backgroundColor() const;
+  /*
+    Reimplemented from QAD_ViewFrame
+  */
 
-  void              setCursor( const QCursor& );
-  QCursor           cursor() const;
+  virtual ViewType            getTypeView() const { return VIEW_OCC; }
+  virtual QWidget*            getViewWidget();
+  virtual void                setBackgroundColor( const QColor& );
+  virtual QColor              backgroundColor() const;
+  virtual void                SetSelectionMode( Selection_Mode mode ) {};
 
-  void              SetSelectionMode( Selection_Mode mode ) {};
-  
   /*  popup management */
-  void              setPopupServer( QAD_Application* );
-
+  
+  virtual void                setPopupServer( QAD_Application* );
 
   /*  interactive object management */
-  void              highlight( const Handle(SALOME_InteractiveObject)& IObject, 
-                              bool highlight, bool update = true );
-  void              unHighlightAll();
-  void              rename( const Handle(SALOME_InteractiveObject)& IObject,
-                           QString newName );
-  bool              isInViewer( const Handle(SALOME_InteractiveObject)& IObject );
-  bool              isVisible( const Handle(SALOME_InteractiveObject)& IObject );
+
+  virtual void                highlight( const Handle(SALOME_InteractiveObject)&,
+                                         const bool highlight,
+                                         const bool update = true );
+  virtual void                unHighlightAll();
+  virtual void                rename( const Handle(SALOME_InteractiveObject)&,
+                                      QString );
+  virtual bool                isInViewer( const Handle(SALOME_InteractiveObject)& );
+  virtual bool                isVisible( const Handle(SALOME_InteractiveObject)& );
 
   /*  undo/redo management */
-  void              undo(QAD_Study* aStudy, const char* StudyFrameEntry);
-  void              redo(QAD_Study* aStudy, const char* StudyFrameEntry);
+  
+  void                        undo( QAD_Study* aStudy, const char* StudyFrameEntry );
+  void                        redo( QAD_Study* aStudy, const char* StudyFrameEntry );
 
   /* selection */
-  Handle(SALOME_InteractiveObject) FindIObject(const char* Entry);
+  
+  virtual Handle(SALOME_InteractiveObject) FindIObject( const char* Entry );
 
-  /* display */                
-  void           Display(const Handle(SALOME_InteractiveObject)& IObject, bool update = true);
-  void           DisplayOnly(const Handle(SALOME_InteractiveObject)& IObject);
-  void           Erase(const Handle(SALOME_InteractiveObject)& IObject, bool update = true);
-  void           DisplayAll();
-  void           EraseAll();
-  void           Repaint();
+  /* display */
+  virtual void                Display( const Handle(SALOME_InteractiveObject)&,
+                                       bool update = true);
+  virtual void                DisplayOnly( const Handle(SALOME_InteractiveObject)& );
+  virtual void                Erase( const Handle(SALOME_InteractiveObject)&,
+                                     bool update = true);
+  virtual void                DisplayAll();
+  virtual void                EraseAll();
+  virtual void                Repaint();
 
-  /* Reimplemented from SALOME_View */
-  void          Display( const SALOME_OCCPrs* );
-  void          Erase( const SALOME_OCCPrs*, const bool = false );
-  SALOME_Prs*   CreatePrs( const char* entry = 0 );
-  virtual void  BeforeDisplay( SALOME_Displayer* d );
-  virtual void  AfterDisplay ( SALOME_Displayer* d );
-  virtual void  LocalSelection( const SALOME_OCCPrs*, const int );
-  virtual void  GlobalSelection( const bool = false ) const;
-
-
-  void          AdjustTrihedrons( const bool forced  = false );
-
-  // Method for activation of sub-shapes selection
-
-
- protected:    
-  void              closeEvent(QCloseEvent* e);
-  void              resizeEvent(QResizeEvent* e);
-  void              keyPressEvent( QKeyEvent *k );
-
- signals:
-  void              vfTransformationStarted ( OCCViewer_ViewPort::OperationType );
-  void              vfTransformationFinished( OCCViewer_ViewPort::OperationType );
-  void              vfDrawExternal(QPainter* painter);
-  void              vfMousePress(QMouseEvent*);
-  void              vfMouseRelease(QMouseEvent*);
-  void              vfMouseMove(QMouseEvent*);
-  void              vfMouseDoubleClick(QMouseEvent*);
-  void              vfKeyPress(QKeyEvent*);
-  void              vfKeyRelease(QKeyEvent*);
-  void              vfResize(QResizeEvent*);
-  void              vfPrint(QPaintEvent*);
-  void              vfViewClosing(QCloseEvent*);
-  void              vfMoved (QMoveEvent*);
-
-  public slots:
-
-  void           onViewPan(); 
-  void           onViewZoom();
-  void           onViewFitAll();
-  void           onViewFitArea();
-  void           onViewGlobalPan(); 
-  void           onViewRotate();
-  void           onViewReset();     
-  void           onViewFront(); 
-  void           onViewBack(); 
-  void           onViewRight(); 
-  void           onViewLeft();     
-  void           onViewBottom();
-  void           onViewTop();
-  void           onViewTrihedron(); 
-  void           onAdjustTrihedron();
+  void                        AdjustTrihedrons( const bool forced  = false );
 
+  /* Reimplemented from SALOME_View */
+  
+  virtual void                Display( const SALOME_OCCPrs* );
+  virtual void                Erase( const SALOME_OCCPrs*, const bool = false );
+  virtual SALOME_Prs*         CreatePrs( const char* entry = 0 );
+  virtual void                BeforeDisplay( SALOME_Displayer* d );
+  virtual void                AfterDisplay ( SALOME_Displayer* d );
+  virtual void                LocalSelection( const SALOME_OCCPrs*, const int );
+  virtual void                GlobalSelection( const bool = false ) const;
+
+  /* Own public methods */
+  
+  void                        setViewPort( OCCViewer_ViewPort* );
+  OCCViewer_ViewPort*         getViewPort() const;
+
+  void                        setViewer( OCCViewer_Viewer3d* );
+  OCCViewer_Viewer3d*         getViewer() const;
+
+  void                        setVisible( const bool isVisible = true );
+
+  void                        setCursor( const QCursor& );
+  QCursor                     cursor() const;
+
+signals:
+
+  void                        vfTransformationStarted ( OCCViewer_ViewPort::OperationType );
+  void                        vfTransformationFinished( OCCViewer_ViewPort::OperationType );
+  void                        vfDrawExternal( QPainter* painter );
+  void                        vfMousePress( QMouseEvent* );
+  void                        vfMouseRelease( QMouseEvent* );
+  void                        vfMouseMove( QMouseEvent* );
+  void                        vfMouseDoubleClick( QMouseEvent* );
+  void                        vfKeyPress( QKeyEvent* );
+  void                        vfKeyRelease( QKeyEvent* );
+  void                        vfResize( QResizeEvent* );
+  void                        vfPrint( QPaintEvent* );
+  void                        vfViewClosing( QCloseEvent* );
+  void                        vfMoved ( QMoveEvent* );
+
+public slots:
+
+  void                        onViewPan();
+  void                        onViewZoom();
+  void                        onViewFitAll();
+  void                        onViewFitArea();
+  void                        onViewGlobalPan();
+  void                        onViewRotate();
+  void                        onViewReset();
+  void                        onViewFront();
+  void                        onViewBack();
+  void                        onViewRight();
+  void                        onViewLeft();
+  void                        onViewBottom();
+  void                        onViewTop();
+  void                        onViewTrihedron();
+  void                        onAdjustTrihedron();
+
+protected:
+
+  void                        initViewPort();
+  void                        initialize();
+  void                        cleanup();
+  void                        closeEvent( QCloseEvent* );
+  void                        resizeEvent( QResizeEvent* );
+  void                        keyPressEvent( QKeyEvent * );
 private:
-  bool           getTrihedronSize( double& theNewSize, double& theSize ); 
+
+  bool                        getTrihedronSize( double& theNewSize, double& theSize );
+  void                        redisplayAll( QAD_Study*, const bool = true );
  
- protected:
-  OCCViewer_Viewer3d*      myViewer;    // my owner
-  OCCViewer_ViewPort*      myViewPort; // child viewport
+private:
+
+  OCCViewer_Viewer3d*         myViewer;         // my owner
+  OCCViewer_ViewPort*         myViewPort; // child viewport
 };
 
 #endif
index 9ea1b6828116680aab9fe31f3bbca477f27fb50f..68a73d4a5b47cde0a8660cbb9e84de4349643bb7 100644 (file)
@@ -45,6 +45,7 @@
 #if !defined WNT
 #include <Xw.hxx>
 #endif
+
 using namespace std;
 
 /*!
@@ -84,7 +85,6 @@ void OCCViewer_ViewPort3d::onCreatePopup()
   if ( myPopup ) {     
     QAD_Desktop*     Desktop = (QAD_Desktop*) QAD_Application::getDesktop();
     QAD_Study*   myActiveStudy = Desktop->getActiveStudy();
-    SALOME_Selection*      Sel = SALOME_Selection::Selection( myActiveStudy->getSelection() );
     
     QString theContext;
     QString theParent("Viewer");
index fae548a60f4543868eb91ed555a6f05f86f04cf2..c79b20136121459860f9ccac0ecea9962fb75667 100644 (file)
@@ -32,6 +32,8 @@
 */
 
 #include "OCCViewer_Viewer3d.h"
+#include "OCCViewer_ViewFrame.h"
+#include "OCCViewer_AISSelector.h"
 #include "QAD.h"
 #include "QAD_Config.h"
 #include "QAD_Desktop.h"
@@ -61,6 +63,7 @@
 #include <TColStd_IndexedMapOfInteger.hxx>
 #include <NCollection_DefineBaseCollection.hxx>
 #include <NCollection_DefineDataMap.hxx>
+
 using namespace std;
 
 DEFINE_BASECOLLECTION( OCCViewer_CollectionOfIndexedMapOfShapes, TopTools_IndexedMapOfShape )
index dab77ab2aaf0323c4c8e86bf179a065cfce41a0d..f9433e2902a55c958c77890a71c0603026d7f871 100644 (file)
@@ -29,9 +29,7 @@
 #ifndef OCCVIEWER_VIEWER3D_H
 #define OCCVIEWER_VIEWER3D_H
 
-#include "OCCViewer_ViewFrame.h"
-#include "OCCViewer_AISSelector.h"
-
+#include "OCCViewer_ViewPort.h"
 #include "QAD.h"
 #include "QAD_Popup.h"
 #include "QAD_ViewFrame.h"
@@ -41,6 +39,9 @@
 #include <AIS_InteractiveContext.hxx>
 #include <AIS_Trihedron.hxx>
 
+class OCCViewer_ViewFrame;
+class OCCViewer_AISSelector;
+
 class QAD_EXPORT OCCViewer_Viewer3d : public QObject, public QAD_PopupClientServer
 {
   Q_OBJECT
diff --git a/src/PatchQt/BUGS_DESCRIPTION b/src/PatchQt/BUGS_DESCRIPTION
new file mode 100644 (file)
index 0000000..ecd2a82
--- /dev/null
@@ -0,0 +1,250 @@
+*********************************************************************
+* File    : BUGS_DESCRIPTION
+* Project : PAL/SALOME
+* Module  : PatchQt
+* Author  : Vadim SANDLER
+* Created : 03/11/2004
+*********************************************************************
+
+This file contains description of bugs found in Qt 3.0.5 classes and patches with bug-fixes and improvements done for Qt classes
+in frames of PAL/SALOME project.
+
+Main principles of the patches creation:
+* the original classes are renamed by adding "P" suffix to the class name;
+* private Qt classes are copied to patched files in order to avoid compilation/linking problems;
+* classes definitions are moved from *.cpp implementation to *.h header in order to avoid additional moc preprocessing for *.cpp files.
+
+*********************************************************************
+
+Bug: keyboard accelerators for actions (menu, toolbar, etc) are not disabled when action itself is disabled (grayed).
+
+Gravity: medium
+
+Patched file(s): 
+* qactionP.cxx:
+1) void QActionPrivate::update()
+- enable/disable key accelerator according to the action state
+
+*********************************************************************
+
+Bug: Wrong MDI behaviour
+To reproduce in SALOME:
+1. Create new study
+- Window Study1#1 appears and becomes active
+2. Create one more study
+- Window Study2#1 appears and becomes active (Study1#1 becames inactive)
+3. Minimize Study2#1 window
+- Window Study2#1 is minimized, Study1#1 becames active
+4. Minimize Study1#1 window
+- Window Study1#1 is minimized but stays still active (highlighted title)
+5. Menu command "File/Close"
+- Study2 document is closed, but should Study1 !!!
+
+Gravity: high
+
+Bug: Crash on close study window
+To reproduce in SALOME:
+1. Launch application.
+2. Create new study with any Viewer.
+3. Create second new study.
+4. Close second study.
+-> crash
+
+Gravity: high
+
+Bug: crash when leaving a study
+To reproduce in SALOME:
+1. Create new study
+2. Load VISU component
+3. Menu Window / New Window / Plot2d Viewer
+4. Miximize Study 1#2 window (with Plot2d viewer)
+5. Menu File / Close
+6. Press "Close w/o saving" button in "Close Active Study" dialog box.
+-> crash
+
+Gravity: high
+
+Patched files(s): 
+* qworkspaceP.h:
+- methods
+void QWorkspace::activateNextWindow()
+void QWorkspace::activatePreviousWindow()
+void QWorkspace::activateWindow( QWidget* w, bool change_focus = TRUE ) 
+are made public
+
+* qworkspaceP.cxx:
+- methods
+void QWorkspace::childEvent( QChildEvent * e)
+void QWorkspace::activateWindow( QWidget* w, bool change_focus )
+void QWorkspace::minimizeWindow( QWidget* w)
+bool QWorkspace::eventFilter( QObject *o, QEvent * e)
+void QWorkspace::activatePreviousWindow()
+are modified to activate correct child window on maximizing/minimizing/closing etc operations and to avoid crashes.
+
+*********************************************************************
+
+Improvement: Add controls to allow collapse/expand parts of view frame.
+The patch adds buttons with small arrows for splitter which allow to collapse/restore splitter in both (left/right or top/botton) directions.
+
+Gravity: medium
+
+Bug: Splitter is not shown in python console
+To reproduce in SALOME:
+1. Create new study
+2. Open new window (VTK or OCC) -> python console and message console is hidden
+3. Restore normal size of low frames (python and message consoles) by clicking corresponding splitter button.
+-> horizontal scrolbars for this windows are not shown, i.e. python and message frames are clipped.
+
+Gravity: medium
+
+Bug: Splitter does not restore its original position after collapsing/expanding operations.
+To reproduce try to collapse/expand repeatedly any splitter (e.g. that one between Python and Message consoles).
+
+Gravity: medium
+
+Improvement: Implement a functionality (for VISU module) to control the Viewers behavior from python console - concerning QSplitter it means a possibility
+to show/hide different parts of view frame (Object Browser, Python Console, 3d/2d viewer, Python console, Message window).
+
+Gravity: high
+
+Patched file(s): 
+* qsplitterP.h
+1) to process correctly resizing events:
+- methods
+QSizePolicy QSplitter::sizePolicy() const
+QSizePolicy QSplitterHandle::sizePolicy() const;
+are added 
+
+2) to allow collapse/expand functionality:
+- methods
+bool QSplitter::isCompressEnabled() const;
+void QSplitter::setCompressEnabled(bool on);
+void QSplitter::compress(QWidget*);
+void QSplitter::unCompress(QWidget*);
+QSplitterHandle* QSplitter::getHandleAfter(QWidget* w);
+QSplitterHandle* QSplitter::getHandleBefore(QWidget* w);
+bool QSplitter::isCompressed( const QWidget* ) const;
+QWidget* QSplitter::widgetBefore( int id ) const;
+QWidget* QSplitter::widgetAfter( int id ) const;
+QSize QSplitter::minSize( const QWidget *w ) const;
+QSize QSplitter::maxSize( const QWidget *w ) const;
+int QSplitter::hit( QPoint p );
+void QSplitter::updateSplitterHandles() const;
+and
+void QSplitterHandle::updateButtonState();
+void QSplitterHandle::compressAfter();
+void QSplitterHandle::unCompressAfter();
+void QSplitterHandle::compressBefore();
+void QSplitterHandle::unCompressBefore();
+void QSplitterHandle::onBeforeCompress();
+void QSplitterHandle::onAfterCompress();
+void QSplitterHandle::onBeforeUnCompress();
+void QSplitterHandle::onAfterUnCompress();
+are added
+
+- fields:
+QWidgetList QSplitter::compressed_widgets;
+bool QSplitter::compress_flag;
+and
+int QSplitterHandle::oldpos;
+QPushButton* QSplitterHandle::left;
+QPushButton* QSplitterHandle::right;
+QPushButton* QSplitterHandle::unleft;
+QPushButton* QSplitterHandle::unright;
+are added
+
+- method
+void QSplitter::setG( QWidget *w, int p, int s );
+is modified 
+
+* qsplitterP.cxx:
+1) to draw button arrows: 
+static const char* splitter_left_xpm[];
+static const char* splitter_right_xpm[];
+static const char* splitter_up_xpm[];
+static const char* splitter_down_xpm[];
+are added
+
+2) to process correctly resizing events:
+- methods
+QSizePolicy QSplitter::sizePolicy() const
+QSizePolicy QSplitterHandle::sizePolicy() const;
+are added 
+
+3) to allow collapse/expand functionality:
+- methods
+bool QSplitter::isCompressEnabled() const;
+void QSplitter::setCompressEnabled(bool on);
+void QSplitter::compress(QWidget*);
+void QSplitter::unCompress(QWidget*);
+QSplitterHandle* QSplitter::getHandleAfter(QWidget* w);
+QSplitterHandle* QSplitter::getHandleBefore(QWidget* w);
+bool QSplitter::isCompressed( const QWidget* ) const;
+QWidget* QSplitter::widgetBefore( int id ) const;
+QWidget* QSplitter::widgetAfter( int id ) const;
+QSize QSplitter::minSize( const QWidget *w ) const;
+QSize QSplitter::maxSize( const QWidget *w ) const;
+int QSplitter::hit( QPoint p );
+void QSplitter::updateSplitterHandles() const;
+and
+void QSplitterHandle::updateButtonState();
+void QSplitterHandle::compressAfter();
+void QSplitterHandle::unCompressAfter();
+void QSplitterHandle::compressBefore();
+void QSplitterHandle::unCompressBefore();
+void QSplitterHandle::onBeforeCompress();
+void QSplitterHandle::onAfterCompress();
+void QSplitterHandle::onBeforeUnCompress();
+void QSplitterHandle::onAfterUnCompress();
+are added
+
+- methods
+QSplitterHandle::QSplitterHandle()
+void QSplitter::setG( QWidget *w, int p, int s );
+QSize QSplitterHandle::sizeHint() const
+void QSplitterHandle::setOrientation( Qt::Orientation o )
+void QSplitterHandle::mouseReleaseEvent( QMouseEvent *e )
+void QSplitterHandle::paintEvent( QPaintEvent * )
+void QSplitter::init()
+void QSplitter::setOrientation( Orientation o )
+QSplitterLayoutStruct *QSplitter::addWidget( QWidget *w, bool first )
+void QSplitter::setRubberband( int p )
+void QSplitter::drawSplitter( QPainter *p, QCOORD x, QCOORD y, QCOORD w, QCOORD h )
+void QSplitter::moveSplitter( QCOORD p, int id )
+void QSplitter::moveBefore( int pos, int id, bool upLeft )
+void QSplitter::moveAfter( int pos, int id, bool upLeft )
+void QSplitter::getRange( int id, int *min, int *max )
+void QSplitter::doResize()
+void QSplitter::recalc( bool update )
+void QSplitter::styleChange( QStyle& old )
+are modified:
+
+*********************************************************************
+
+Bug: File names filter of the "Open" and "Save" dialog boxes is broken
+To reproduce in SALOME:
+1) start PAL/SALOME
+2) open new study with the help of OCC Viewer and load Geometry module
+3) Menu File / Import / BRep
+4) Browse to any directory may be changed by yourself
+5) Press "Create New Folder" button of the "Import" dialog box
+6) Browse to created directory "New Folder 1"
+7) Press "Create New Folder" button of the "Import" dialog box
+8) Browse to created directory "New Folder 1"
+9) Delete first created "New Folder 1" directory externally (e.g. from any terminal window)
+10) Press "One directory up" button of the "Import" dialog box
+11) Error message box appears: "Could not read directory .../New Folder 1/New Folder 1" - press OK button to close message box.
+-> Result: "BREP Files (*.brep)" filter is set as "File type" in the "Import" dialog box, but non-BREP files are also visible and available for the selection
+in the browser window of the "Import" dialog box
+-> The same situation takes place for the "Export" dialog box.
+
+Gravity: low
+
+Patch: 
+* qfiledialogP.cxx:
+1) methods 
+void QFileDialogP::urlFinished( QNetworkOperation *op )
+is modified to fix bug
+
+*********************************************************************
+
index a5f6b39e812d1c5b35177220d88a5d6b248f36ab..41c2227333ebdc898aa5052938e60974e67cd105 100644 (file)
@@ -70,6 +70,8 @@ LIB_SRC =     \
                  SALOMEDS_AttributeDrawable_i.cxx \
                  SALOMEDS_AttributeSelectable_i.cxx \
                  SALOMEDS_AttributeOpened_i.cxx \
+                 SALOMEDS_AttributeFlags_i.cxx \
+                 SALOMEDS_AttributeGraphic_i.cxx \
                  SALOMEDS_AttributeExpandable_i.cxx \
                  SALOMEDS_AttributeTextColor_i.cxx  \
                  SALOMEDS_AttributeTextHighlightColor_i.cxx  \
@@ -89,6 +91,8 @@ LIB_SRC =     \
                  SALOMEDS_SelectableAttribute.cxx \
                  SALOMEDS_ExpandableAttribute.cxx  \
                  SALOMEDS_OpenedAttribute.cxx \
+                 SALOMEDS_FlagsAttribute.cxx \
+                 SALOMEDS_GraphicAttribute.cxx \
                  SALOMEDS_TextColorAttribute.cxx \
                  SALOMEDS_TextHighlightColorAttribute.cxx \
                  SALOMEDS_PixMapAttribute.cxx \
@@ -112,6 +116,7 @@ BIN_SRC =
 LIB_SERVER_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Exception.idl
 BIN_SERVER_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl
 BIN_CLIENT_IDL = 
+LIB_CLIENT_IDL = SALOME_Component.idl SALOME_GenericObj.idl
 
 CPPFLAGS+=$(OCC_INCLUDES) $(HDF5_INCLUDES)
 CXXFLAGS+=$(OCC_CXXFLAGS)
diff --git a/src/SALOMEDS/SALOMEDS_AttributeFlags_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeFlags_i.cxx
new file mode 100644 (file)
index 0000000..d8eee23
--- /dev/null
@@ -0,0 +1,121 @@
+//  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library 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 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : SALOMEDS_AttributeFlags_i.cxx
+//  Author : Sergey LITONIN
+//  Module : SALOME
+//  $Header$
+
+#include "SALOMEDS_AttributeFlags_i.hxx"
+#include "SALOMEDS_SObject_i.hxx"
+
+using namespace std;
+
+/*
+  Class       : SALOMEDS_AttributeFlags_i
+  Description : This class is intended for storing different object attributes that
+                have only two states (0 and 1).
+                
+                Avalable attributes:
+                
+                IS_VISIBLE - is equal to 1 if object is visible in 3D view (0 - overwise).
+                             This attribute is valid for active view only.
+*/
+
+//=======================================================================
+// function : SALOMEDS_AttributeFlags_i::SALOMEDS_AttributeFlags_i
+// purpose  : Constructor
+//=======================================================================
+SALOMEDS_AttributeFlags_i::SALOMEDS_AttributeFlags_i(
+  const Handle(SALOMEDS_FlagsAttribute)& attr, CORBA::ORB_ptr orb )
+{
+  _myOrb = CORBA::ORB::_duplicate( orb );
+  _myAttr = attr;
+}
+
+//=======================================================================
+// function : SALOMEDS_AttributeFlags_i::~SALOMEDS_AttributeFlags_i
+// purpose  : Destructor
+//=======================================================================
+SALOMEDS_AttributeFlags_i::~SALOMEDS_AttributeFlags_i()
+{
+}
+
+//=======================================================================
+// function : SALOMEDS_AttributeFlags_i::GetFlags
+// purpose  : Get all flags as integer value
+//=======================================================================
+CORBA::Long SALOMEDS_AttributeFlags_i::GetFlags()
+{
+  return Handle(SALOMEDS_FlagsAttribute)::DownCast( _myAttr )->Get();
+}
+
+//=======================================================================
+// function : SALOMEDS_AttributeFlags_i::SetFlags
+// purpose  : Set all flags as integer value
+//=======================================================================
+void SALOMEDS_AttributeFlags_i::SetFlags( CORBA::Long theFlags )
+{
+  Handle(SALOMEDS_FlagsAttribute)::DownCast( _myAttr )->Set( theFlags );
+}
+
+//=======================================================================
+// function : SALOMEDS_AttributeFlags_i::Get
+// purpose  : Get specified flag
+//=======================================================================
+CORBA::Boolean SALOMEDS_AttributeFlags_i::Get( CORBA::Long theFlag )
+{
+  return Handle(SALOMEDS_FlagsAttribute)::DownCast( _myAttr )->Get() & theFlag ? true : false;
+}
+
+//=======================================================================
+// function : SALOMEDS_AttributeFlags_i::Set
+// purpose  : Set/Unset specified flag
+//=======================================================================
+void SALOMEDS_AttributeFlags_i::Set( CORBA::Long theFlag, CORBA::Boolean theValue )
+{
+  Handle(SALOMEDS_FlagsAttribute) anAttr =
+    Handle(SALOMEDS_FlagsAttribute)::DownCast( _myAttr );
+  if ( theValue )
+    anAttr->Set( anAttr->Get() | theFlag );
+  else
+    anAttr->Set( anAttr->Get() & ~theFlag );
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/SALOMEDS/SALOMEDS_AttributeFlags_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeFlags_i.hxx
new file mode 100644 (file)
index 0000000..6a02145
--- /dev/null
@@ -0,0 +1,67 @@
+//  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library 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 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : SALOMEDS_AttributeFlags_i.hxx
+//  Author : Sergey LITONIN
+//  Module : SALOME
+//  $Header:
+
+#ifndef SALOMEDS_AttributeFlags_i_HeaderFile
+#define SALOMEDS_AttributeFlags_i_HeaderFile
+
+// IDL headers
+
+#include "SALOMEDS_FlagsAttribute.hxx"
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
+#include "SALOMEDS_GenericAttribute_i.hxx"
+
+/*
+  Class       : SALOMEDS_AttributeFlags_i
+  Description : This class is intended for storing different object attributes that
+                have only two states (0 and 1).
+
+                Avalable attributes:
+
+                IS_VISIBLE - is equal to 1 if object is visible in 3D view (0 - overwise).
+                             This attribute is valid for active view only.
+*/
+
+class SALOMEDS_AttributeFlags_i: public virtual POA_SALOMEDS::AttributeFlags,
+                                 public virtual SALOMEDS_GenericAttribute_i
+{
+public:
+  
+                      SALOMEDS_AttributeFlags_i( const Handle(SALOMEDS_FlagsAttribute)&,
+                                                 CORBA::ORB_ptr orb );
+  virtual             ~SALOMEDS_AttributeFlags_i();
+
+  CORBA::Long         GetFlags();
+  void                SetFlags( CORBA::Long theFlags );
+
+  CORBA::Boolean      Get( CORBA::Long theFlag );
+  void                Set( CORBA::Long theFlag, CORBA::Boolean theValue );
+  
+};
+
+#endif
diff --git a/src/SALOMEDS/SALOMEDS_AttributeGraphic_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeGraphic_i.cxx
new file mode 100644 (file)
index 0000000..3ac4405
--- /dev/null
@@ -0,0 +1,99 @@
+//  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library 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 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : SALOMEDS_AttributeGraphic_i.cxx
+//  Author : Sergey LITONIN
+//  Module : SALOME
+//  $Header$
+
+#include "SALOMEDS_AttributeGraphic_i.hxx"
+#include "SALOMEDS_SObject_i.hxx"
+
+using namespace std;
+
+/*
+  Class       : SALOMEDS_AttributeGraphic_i
+  Description : This class is intended for storing information about
+                graphic representation of objects in dirrent views
+*/
+
+//=======================================================================
+// function : SALOMEDS_AttributeGraphic_i::SALOMEDS_AttributeGraphic_i
+// purpose  : Constructor
+//=======================================================================
+SALOMEDS_AttributeGraphic_i::SALOMEDS_AttributeGraphic_i(
+  const Handle(SALOMEDS_GraphicAttribute)& attr, CORBA::ORB_ptr orb )
+{
+  _myOrb = CORBA::ORB::_duplicate( orb );
+  _myAttr = attr;
+}
+
+//=======================================================================
+// function : SALOMEDS_AttributeGraphic_i::~SALOMEDS_AttributeGraphic_i
+// purpose  : Destructor
+//=======================================================================
+SALOMEDS_AttributeGraphic_i::~SALOMEDS_AttributeGraphic_i()
+{
+}
+
+//=======================================================================
+// function : SALOMEDS_AttributeGraphic_i::~SetVisibility
+// purpose  : Set visibility of object in given view
+//=======================================================================
+void SALOMEDS_AttributeGraphic_i::SetVisibility( CORBA::Long    theViewId,
+                                                 CORBA::Boolean theValue )
+{
+  Handle(SALOMEDS_GraphicAttribute) anAttr =
+    Handle(SALOMEDS_GraphicAttribute)::DownCast( _myAttr );
+  if ( !anAttr.IsNull() )
+    anAttr->SetVisibility( theViewId, theValue );
+}
+
+//=======================================================================
+// function : SALOMEDS_AttributeGraphic_i::~SALOMEDS_AttributeGraphic_i
+// purpose  : Get visibility of object in given view
+//=======================================================================                                     
+CORBA::Boolean SALOMEDS_AttributeGraphic_i::GetVisibility( CORBA::Long theViewId )
+{
+  Handle(SALOMEDS_GraphicAttribute) anAttr =
+    Handle(SALOMEDS_GraphicAttribute)::DownCast( _myAttr );
+  return !anAttr.IsNull() ? anAttr->GetVisibility( theViewId ) : false;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/SALOMEDS/SALOMEDS_AttributeGraphic_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeGraphic_i.hxx
new file mode 100644 (file)
index 0000000..70644c6
--- /dev/null
@@ -0,0 +1,60 @@
+//  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library 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 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : SALOMEDS_AttributeFlags_i.hxx
+//  Author : Sergey LITONIN
+//  Module : SALOME
+//  $Header:
+
+#ifndef SALOMEDS_AttributeGraphic_i_HeaderFile
+#define SALOMEDS_AttributeGraphic_i_HeaderFile
+
+// IDL headers
+
+#include "SALOMEDS_GraphicAttribute.hxx"
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
+#include "SALOMEDS_GenericAttribute_i.hxx"
+
+/*
+  Class       : SALOMEDS_AttributeGraphic_i
+  Description : This class is intended for storing information about
+                graphic representation of objects in dirrent views
+*/
+
+class SALOMEDS_AttributeGraphic_i: public virtual POA_SALOMEDS::AttributeGraphic,
+                                   public virtual SALOMEDS_GenericAttribute_i
+{
+public:
+  
+                      SALOMEDS_AttributeGraphic_i( const Handle(SALOMEDS_GraphicAttribute)&,
+                                                   CORBA::ORB_ptr orb );
+  virtual             ~SALOMEDS_AttributeGraphic_i();
+
+  void                SetVisibility( CORBA::Long    theViewId,
+                                     CORBA::Boolean theValue );
+  CORBA::Boolean      GetVisibility( CORBA::Long    theViewId );
+
+};
+
+#endif
diff --git a/src/SALOMEDS/SALOMEDS_FlagsAttribute.cxx b/src/SALOMEDS/SALOMEDS_FlagsAttribute.cxx
new file mode 100644 (file)
index 0000000..96ed5bd
--- /dev/null
@@ -0,0 +1,162 @@
+//  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library 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 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : SALOMEDS_FlagsAttribute.cxx
+//  Author : Sergey LITONIN
+//  Module : SALOME
+
+#include "SALOMEDS_FlagsAttribute.hxx"
+#include <TDataStd_Integer.hxx>
+#include <Standard_GUID.hxx>
+#include <TDF_Label.hxx>
+
+using namespace std;
+
+
+/*
+  Class       : SALOMEDS_FlagsAttribute
+  Description : This class is intended for storing different object attributes that
+                have only two states (0 and 1).
+*/
+
+IMPLEMENT_STANDARD_HANDLE( SALOMEDS_FlagsAttribute, TDataStd_Integer )
+IMPLEMENT_STANDARD_RTTIEXT( SALOMEDS_FlagsAttribute, TDataStd_Integer )
+
+//=======================================================================
+//function : SALOMEDS_FlagsAttribute::GetID
+//purpose  : Get GUID of this attribute
+//=======================================================================
+const Standard_GUID& SALOMEDS_FlagsAttribute::GetID ()
+{
+  static Standard_GUID SALOMEDS_FlagsAttributeID( "866EEC9F-A517-4cb4-88E6-E208DB8FC96F" );
+  return SALOMEDS_FlagsAttributeID;                
+}
+
+//=======================================================================
+//function : SALOMEDS_FlagsAttribute::Set
+//purpose  : Set value of the attribute
+//=======================================================================
+Handle(SALOMEDS_FlagsAttribute) SALOMEDS_FlagsAttribute::Set( const TDF_Label& L,
+                                                              const Standard_Integer value )
+{
+  Handle(SALOMEDS_FlagsAttribute) A;
+  if ( !L.FindAttribute(SALOMEDS_FlagsAttribute::GetID(),A ) )
+  {
+    A = new  SALOMEDS_FlagsAttribute();
+    L.AddAttribute( A );
+  }
+
+  ( Handle(TDataStd_Integer)::DownCast( A ) )->Set( value );
+  return A;
+}
+
+//=======================================================================
+//function : SALOMEDS_FlagsAttribute::SALOMEDS_FlagsAttribute
+//purpose  : Constructor
+//=======================================================================
+SALOMEDS_FlagsAttribute::SALOMEDS_FlagsAttribute()
+{
+  TDataStd_Integer::Set( 0 );
+}
+
+SALOMEDS_FlagsAttribute::~SALOMEDS_FlagsAttribute()
+{
+}
+
+//=======================================================================
+//function : SALOMEDS_FlagsAttribute::ID
+//purpose  : Get GUID of this attribute
+//=======================================================================
+const Standard_GUID& SALOMEDS_FlagsAttribute::ID () const
+{
+  return GetID();
+}
+
+//=======================================================================
+//function : SALOMEDS_FlagsAttribute::NewEmpty
+//purpose  : Create new empty attribute
+//=======================================================================
+
+Handle(TDF_Attribute) SALOMEDS_FlagsAttribute::NewEmpty () const
+{
+  return new SALOMEDS_FlagsAttribute();
+}
+
+//=======================================================================
+//function : SALOMEDS_FlagsAttribute::Restore
+//purpose  : Assign given value to the attribute
+//=======================================================================
+void SALOMEDS_FlagsAttribute::Restore( const Handle(TDF_Attribute)& with )
+{
+  Standard_Integer s = Handle(TDataStd_Integer)::DownCast( with )->Get();
+  TDataStd_Integer::Set( s );
+  return;
+}
+
+//=======================================================================
+//function : SALOMEDS_FlagsAttribute::Paste
+//purpose  : Assign internal value to the given attribute
+//=======================================================================
+void SALOMEDS_FlagsAttribute::Paste( const Handle(TDF_Attribute)& into,
+                                     const Handle(TDF_RelocationTable)& RT ) const
+{
+  Handle(TDataStd_Integer)::DownCast( into )->Set( Get() );
+}
+
+//=======================================================================
+//function : SALOMEDS_FlagsAttribute::Set
+//purpose  : Set value
+//=======================================================================
+void SALOMEDS_FlagsAttribute::Set( const Standard_Integer v )
+{
+  TDataStd_Integer::Set( v );
+}
+
+//=======================================================================
+//function : SALOMEDS_FlagsAttribute::Get
+//purpose  : GetValue
+//=======================================================================
+Standard_Integer SALOMEDS_FlagsAttribute::Get() const
+{
+  return TDataStd_Integer::Get();
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/SALOMEDS/SALOMEDS_FlagsAttribute.hxx b/src/SALOMEDS/SALOMEDS_FlagsAttribute.hxx
new file mode 100644 (file)
index 0000000..9163156
--- /dev/null
@@ -0,0 +1,72 @@
+//  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library 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 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : SALOMEDS_FlagsAttribute.hxx
+//  Author : Sergey LITONIN
+//  Module : SALOME
+
+#ifndef SALOMEDS_FlagsAttribute_HeaderFile
+#define SALOMEDS_FlagsAttribute_HeaderFile
+
+#include <Standard_DefineHandle.hxx>
+#include <TDF_Attribute.hxx>
+#include <TDataStd_Integer.hxx>
+
+class Standard_GUID;
+class TDF_Label;
+class Handle(TDF_Attribute);
+class Handle(TDF_RelocationTable);
+
+
+/*
+  Class       : SALOMEDS_FlagsAttribute
+  Description : This class is intended for storing different object attributes that
+                have only two states (0 and 1).
+*/
+
+DEFINE_STANDARD_HANDLE( SALOMEDS_FlagsAttribute, TDataStd_Integer )
+
+class Standard_EXPORT SALOMEDS_FlagsAttribute : public TDataStd_Integer
+{
+public:
+
+static const Standard_GUID&            GetID() ;
+static Handle(SALOMEDS_FlagsAttribute) Set( const TDF_Label&,
+                                            const Standard_Integer );
+                                                               
+                                       SALOMEDS_FlagsAttribute();
+virtual                                ~SALOMEDS_FlagsAttribute();
+
+const Standard_GUID&                   ID() const;
+void                                   Restore( const Handle(TDF_Attribute)& with );
+Handle_TDF_Attribute                   NewEmpty() const;
+void                                   Paste( const Handle(TDF_Attribute)& into,
+                                              const Handle(TDF_RelocationTable)& RT ) const;
+void                                   Set( const Standard_Integer );
+Standard_Integer                       Get() const;
+
+public:
+  DEFINE_STANDARD_RTTI( SALOMEDS_FlagsAttribute )
+};
+
+#endif
index 87f76e105662f21034a463cb9c387e2aec1c0427..8c6f980de6f7fbf2fee85bafc11ce759440294fe 100644 (file)
@@ -9,13 +9,14 @@
 //  Module : SALOME
 //  $Header$
 
-
 #include <TDataStd_TreeNode.hxx>
 #include <TDataStd_UAttribute.hxx>
 
 #include "SALOMEDS_AttributeDrawable_i.hxx"
 #include "SALOMEDS_AttributeSelectable_i.hxx"
 #include "SALOMEDS_AttributeOpened_i.hxx"
+#include "SALOMEDS_AttributeFlags_i.hxx"
+#include "SALOMEDS_AttributeGraphic_i.hxx"
 #include "SALOMEDS_AttributeTextColor_i.hxx"
 #include "SALOMEDS_AttributeTextHighlightColor_i.hxx"
 #include "SALOMEDS_AttributePixMap_i.hxx"
@@ -41,6 +42,8 @@
 #include "SALOMEDS_SelectableAttribute.hxx"
 #include "SALOMEDS_ExpandableAttribute.hxx"
 #include "SALOMEDS_OpenedAttribute.hxx"
+#include "SALOMEDS_FlagsAttribute.hxx"
+#include "SALOMEDS_GraphicAttribute.hxx"
 #include "SALOMEDS_TextColorAttribute.hxx"
 #include "SALOMEDS_TextHighlightColorAttribute.hxx"
 #include "SALOMEDS_PixMapAttribute.hxx"
 #include "SALOMEDS_ExternalFileDef.hxx"
 #include "SALOMEDS_FileType.hxx"
 #include "Utils_ExceptHandlers.hxx"
+
 using namespace std;
-#define RegisteredAttributes 26
+
+#define RegisteredAttributes 28
 
 UNEXPECT_CATCH(GALockProtection, SALOMEDS::GenericAttribute::LockProtection);
 
@@ -73,7 +78,9 @@ const char AttributesTypeNames[RegisteredAttributes][30] = {
   "AttributeStudyProperties",
   "AttributePythonObject",
   "AttributeUserID",
-  "AttributeExternalFileDef", "AttributeFileType"
+  "AttributeExternalFileDef", "AttributeFileType",
+  "AttributeFlags",
+  "AttributeGraphic"
 };
 
 const Standard_GUID AttributesGUIDs[RegisteredAttributes] = {
@@ -90,7 +97,9 @@ const Standard_GUID AttributesGUIDs[RegisteredAttributes] = {
   SALOMEDS_StudyPropertiesAttribute::GetID(),
   SALOMEDS_PythonObjectAttribute::GetID(),
   Standard_GUID("FFFFFFFF-D9CD-11d6-945D-1050DA506788"),
-  SALOMEDS_ExternalFileDef::GetID(), SALOMEDS_FileType::GetID()
+  SALOMEDS_ExternalFileDef::GetID(), SALOMEDS_FileType::GetID(),
+  SALOMEDS_FlagsAttribute::GetID(),
+  SALOMEDS_GraphicAttribute::GetID()
 };
 
 void SALOMEDS_GenericAttribute_i::CheckLocked() throw (SALOMEDS::GenericAttribute::LockProtection) {
@@ -192,6 +201,8 @@ SALOMEDS::GenericAttribute_ptr SALOMEDS_GenericAttribute_i::CreateAttribute(CORB
   __ReturnCORBAAttribute(SALOMEDS_PythonObjectAttribute, AttributePythonObject);
   __ReturnCORBAAttribute(SALOMEDS_ExternalFileDef, AttributeExternalFileDef);
   __ReturnCORBAAttribute(SALOMEDS_FileType, AttributeFileType);
+  __ReturnCORBAAttribute(SALOMEDS_FlagsAttribute, AttributeFlags);
+  __ReturnCORBAAttribute(SALOMEDS_GraphicAttribute, AttributeGraphic);
 
   Handle(TDataStd_TreeNode) aNode = Handle(TDataStd_TreeNode)::DownCast(theAttr);
   if (!aNode.IsNull()) {
diff --git a/src/SALOMEDS/SALOMEDS_GraphicAttribute.cxx b/src/SALOMEDS/SALOMEDS_GraphicAttribute.cxx
new file mode 100644 (file)
index 0000000..0b85894
--- /dev/null
@@ -0,0 +1,185 @@
+//  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library 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 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : SALOMEDS_GraphicAttribute.cxx
+//  Author : Sergey LITONIN
+//  Module : SALOME
+
+#include "SALOMEDS_GraphicAttribute.hxx"
+#include <TDF_Attribute.hxx>
+#include <Standard_GUID.hxx>
+#include <TDF_Label.hxx>
+#include <TColStd_DataMapIteratorOfDataMapOfIntegerInteger.hxx>
+
+/*
+  Class       : SALOMEDS_GraphicAttribute
+  Description : This class is intended for storing information about
+                graphic representation of objects in dirrent views
+*/
+
+IMPLEMENT_STANDARD_HANDLE( SALOMEDS_GraphicAttribute, TDF_Attribute )
+IMPLEMENT_STANDARD_RTTIEXT( SALOMEDS_GraphicAttribute, TDF_Attribute )
+
+//=======================================================================
+//function : GetID
+//purpose  : Get GUID of this attribute
+//=======================================================================
+const Standard_GUID& SALOMEDS_GraphicAttribute::GetID()
+{
+  static Standard_GUID SALOMEDS_GraphicAttributeID( "F17AE8F0-E354-4d6f-8E42-38385C36E67E" );
+  return SALOMEDS_GraphicAttributeID;
+}
+
+//=======================================================================
+//function : SALOMEDS_GraphicAttribute
+//purpose  : Empty Constructor
+//=======================================================================
+SALOMEDS_GraphicAttribute::SALOMEDS_GraphicAttribute()
+{
+}
+
+//=======================================================================
+//function : ~SALOMEDS_GraphicAttribute
+//purpose  : Destructor
+//=======================================================================
+SALOMEDS_GraphicAttribute::~SALOMEDS_GraphicAttribute()
+{
+}
+
+//=======================================================================
+//function : SetVisibility
+//purpose  : Set visibility of object in given view
+//=======================================================================
+void SALOMEDS_GraphicAttribute::SetVisibility( const Standard_Integer theViewId,
+                                               const Standard_Boolean theValue )
+{
+  if ( myVisibility.IsBound( theViewId ) && myVisibility( theViewId ) == theValue )
+    return;
+
+  Backup();
+  if ( myVisibility.IsBound( theViewId ) )
+    myVisibility.ChangeFind( theViewId ) = theValue ? 1 : 0;
+  else
+    myVisibility.Bind( theViewId, theValue ? 1 : 0 );
+}
+
+
+//=======================================================================
+//function : Get
+//purpose  : Get visibility of object in given view
+//=======================================================================
+Standard_Boolean SALOMEDS_GraphicAttribute::GetVisibility(
+  const Standard_Integer theViewId ) const
+{
+  return myVisibility.IsBound( theViewId ) ? myVisibility( theViewId ) : false;
+}
+
+
+//=======================================================================
+//function : ID
+//purpose  : Get GUID of this attribute
+//=======================================================================
+const Standard_GUID& SALOMEDS_GraphicAttribute::ID () const
+{
+  return GetID();
+}
+
+
+//=======================================================================
+//function : NewEmpty
+//purpose  : Create new empty attribute
+//=======================================================================
+Handle(TDF_Attribute) SALOMEDS_GraphicAttribute::NewEmpty () const
+{
+  return new SALOMEDS_GraphicAttribute ();
+}
+
+//=======================================================================
+//function : SetVisibility
+//purpose  : Set visibility of object in all views
+//=======================================================================
+void SALOMEDS_GraphicAttribute::SetVisibility( const TColStd_DataMapOfIntegerInteger& theMap )
+{
+  myVisibility = theMap;
+}
+
+//=======================================================================
+//function : SetVisibility
+//purpose  : Get visibility of object in all views
+//=======================================================================
+const TColStd_DataMapOfIntegerInteger& SALOMEDS_GraphicAttribute::GetVisibility()
+{
+  return myVisibility;
+}
+
+//=======================================================================
+//function : Restore
+//purpose  : Restore value of attribute with value of theWith one
+//=======================================================================
+void SALOMEDS_GraphicAttribute::Restore( const Handle(TDF_Attribute)& theWith )
+{
+  Handle(SALOMEDS_GraphicAttribute) anAttr =
+    Handle(SALOMEDS_GraphicAttribute)::DownCast( theWith );
+
+  if ( !anAttr.IsNull() )
+    SetVisibility( anAttr->GetVisibility() );
+}
+
+//=======================================================================
+//function : Paste
+//purpose  : Paste value of current attribute to the value of entry one
+//=======================================================================
+void SALOMEDS_GraphicAttribute::Paste( const Handle(TDF_Attribute)& theInto,
+                                       const Handle(TDF_RelocationTable)& ) const
+{
+  Handle(SALOMEDS_GraphicAttribute) anAttr =
+    Handle(SALOMEDS_GraphicAttribute)::DownCast( theInto );
+
+  if ( !anAttr.IsNull() )
+    anAttr->SetVisibility( myVisibility );
+}
+
+//=======================================================================
+//function : Dump
+//purpose  : Dump
+//=======================================================================
+Standard_OStream& SALOMEDS_GraphicAttribute::Dump( Standard_OStream& anOS ) const
+{
+  anOS << "Visibility of object:" << endl;
+  TColStd_DataMapIteratorOfDataMapOfIntegerInteger anIter( myVisibility );
+  for ( ; anIter.More(); anIter.Next() )
+  {
+    char str[ 100 ];
+    
+    if ( GetVisibility( anIter.Key() ) )
+      sprintf( str, "Viewer ID = 0x%X State = VISIBLE\n", anIter.Key() );
+    else
+      sprintf( str, "Viewer ID = 0x%X State = INVISIBLE\n", anIter.Key() );
+      
+    anOS << str;
+  }
+  
+  anOS << "Integer";
+  return anOS;
+}
+
diff --git a/src/SALOMEDS/SALOMEDS_GraphicAttribute.hxx b/src/SALOMEDS/SALOMEDS_GraphicAttribute.hxx
new file mode 100644 (file)
index 0000000..b70112b
--- /dev/null
@@ -0,0 +1,80 @@
+//  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library 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 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : SALOMEDS_GraphicAttribute.hxx
+//  Author : Sergey LITONIN
+//  Module : SALOME
+
+#ifndef SALOMEDS_GraphicAttribute_HeaderFile
+#define SALOMEDS_GraphicAttribute_HeaderFile
+
+#include <Standard_DefineHandle.hxx>
+#include <TDF_Attribute.hxx>
+#include <TDF_Attribute.hxx>
+#include <TColStd_DataMapOfIntegerInteger.hxx>
+
+class Standard_GUID;
+class TDF_Label;
+class Handle(TDF_Attribute);
+class Handle(TDF_RelocationTable);
+
+
+/*
+  Class       : SALOMEDS_GraphicAttribute
+  Description : This class is intended for storing information about
+                graphic representation of objects in dirrent views
+*/
+
+DEFINE_STANDARD_HANDLE( SALOMEDS_GraphicAttribute, TDF_Attribute )
+
+class Standard_EXPORT SALOMEDS_GraphicAttribute : public TDF_Attribute
+{
+
+public:
+                                  SALOMEDS_GraphicAttribute();
+                                  ~SALOMEDS_GraphicAttribute();
+
+  static const                    Standard_GUID& GetID() ;
+
+  void                            SetVisibility( const Standard_Integer,
+                                                 const Standard_Boolean );
+  Standard_Boolean                GetVisibility( const Standard_Integer ) const;
+  const Standard_GUID&            ID() const;
+  void                            Restore( const Handle(TDF_Attribute)& theWith );
+  Handle(TDF_Attribute)           NewEmpty() const;
+  void                            Paste( const Handle(TDF_Attribute)& theInto,
+                                         const Handle(TDF_RelocationTable)& ) const;
+  virtual Standard_OStream&       Dump( Standard_OStream& anOS ) const;
+
+  void                            SetVisibility( const TColStd_DataMapOfIntegerInteger& );
+
+  const TColStd_DataMapOfIntegerInteger& GetVisibility();
+  
+private:
+  TColStd_DataMapOfIntegerInteger myVisibility;
+
+public:
+  DEFINE_STANDARD_RTTI( SALOMEDS_GraphicAttribute )
+};
+
+#endif
index 04478d1deb0a47f7357450e349b5f91760f9b14f..00e37cfad17527ac8821206c5fe8a5e2b2ecc0af 100644 (file)
@@ -192,7 +192,7 @@ CORBA::Boolean SALOMEDS_SObject_i::ReferencedObject(SALOMEDS::SObject_out obj)
  *  Purpose  : 
  */
 //============================================================================
-CORBA::Boolean SALOMEDS_SObject_i::FindSubObject(long atag, SALOMEDS::SObject_out obj)
+CORBA::Boolean SALOMEDS_SObject_i::FindSubObject(CORBA::Long atag, SALOMEDS::SObject_out obj)
 {
   TDF_Label L = _lab.FindChild(atag,false);
   if (L.IsNull()) return false;
index 67ab9d9ba006b6ccff516fc3bf90de5486a25e94..1b6a29060bd7568815cd7c78997fa537494ac2c9 100644 (file)
@@ -73,7 +73,7 @@ public:
   virtual SALOMEDS::SObject_ptr    GetFather() ;
   virtual CORBA::Boolean FindAttribute(SALOMEDS::GenericAttribute_out anAttribute, const char* aTypeOfAttribute);
   virtual CORBA::Boolean ReferencedObject(SALOMEDS::SObject_out obj) ;
-  virtual CORBA::Boolean FindSubObject(long atag, SALOMEDS::SObject_out obj );
+  virtual CORBA::Boolean FindSubObject(CORBA::Long atag, SALOMEDS::SObject_out obj );
 
   virtual SALOMEDS::Study_ptr    GetStudy() ;
   virtual char* Name();
index 125152fedbd1723d1ce998e1d2dfe8d6a8f7cb6d..b5f8c37e24e3757173b9893208234b494017a2ea 100644 (file)
@@ -67,6 +67,8 @@
 #include "SALOMEDS_AttributeSelectable_i.hxx"
 #include "SALOMEDS_AttributeExpandable_i.hxx"
 #include "SALOMEDS_AttributeOpened_i.hxx"
+#include "SALOMEDS_AttributeFlags_i.hxx"
+#include "SALOMEDS_AttributeGraphic_i.hxx"
 #include "SALOMEDS_AttributeTextColor_i.hxx"
 #include "SALOMEDS_AttributeTextHighlightColor_i.hxx"
 #include "SALOMEDS_AttributePixMap_i.hxx"
@@ -82,6 +84,7 @@
 
 #include <HDFOI.hxx>
 #include <stdlib.h> 
+
 using namespace std;
 
 #define USE_CASE_LABEL_TAG            2
@@ -561,6 +564,8 @@ SALOMEDS::GenericAttribute_ptr SALOMEDS_StudyBuilder_i::FindOrCreateAttribute(SA
   __FindOrCreateAttribute(SALOMEDS_StudyPropertiesAttribute, AttributeStudyProperties)
   __FindOrCreateAttribute(SALOMEDS_ExternalFileDef, AttributeExternalFileDef)
   __FindOrCreateAttribute(SALOMEDS_FileType, AttributeFileType)
+  __FindOrCreateAttribute(SALOMEDS_FlagsAttribute, AttributeFlags)
+  __FindOrCreateAttribute(SALOMEDS_GraphicAttribute, AttributeGraphic)    
 
   if (strncmp(aTypeOfAttribute, "AttributeTreeNode",17) == 0 ) {
     Standard_GUID aTreeNodeGUID;
index 71033bb231804b2a6c4455836c63f34c0c313449..4e2e56a67b185a9ed760dbb49b33958cbe670496 100644 (file)
@@ -327,7 +327,8 @@ SALOMEDS::Study_ptr  SALOMEDS_StudyManager_i::Open(const char* aUrl)
 //        MESSAGE( "HDFexception ! " );
 //        cerr << "HDFexception ! " << endl;
       delete aHDFUrl;
-      char eStr[strlen(aUrl)+17];
+//       char eStr[strlen(aUrl)+17];
+      char *eStr = new char[strlen(aUrl)+17+1];
       sprintf(eStr,"Can't open file %s",aUrl);
       THROW_SALOME_CORBA_EXCEPTION(CORBA::string_dup(eStr),SALOME::BAD_PARAM);
       
@@ -375,7 +376,7 @@ SALOMEDS::Study_ptr  SALOMEDS_StudyManager_i::Open(const char* aUrl)
 //        MESSAGE( "HDFexception ! " );
 //        cerr << "HDFexception ! " << endl;
       delete aHDFUrl;
-      char eStr[strlen(aUrl)+17];
+      char *eStr=new char[strlen(aUrl)+17];
       sprintf(eStr,"Can't open file %s",aUrl);
       THROW_SALOME_CORBA_EXCEPTION(CORBA::string_dup(eStr),SALOME::BAD_PARAM);
     } 
index ac1763f4d810eb166a47bf99a18001743cc8be21..69bde6093a0dd6315c543f5fa8cf04c5af67f9e5 100644 (file)
@@ -173,22 +173,22 @@ QPalette* QAD_Desktop::getPalette()
   return palette;
 }
 
-/*!
-    Gets window ratio width/heght [ static ]
-*/
-static double myWindowRatio = 1;
-static double getWindowRatio()
-{
-  return myWindowRatio;
-}
-
-/*!
-    Sets window ratio width/heght [ static ]
-*/
-static void setWindowRatio(double aRatio)
-{
-  myWindowRatio = aRatio;
-}
+///*!
+//    Gets window ratio width/heght [ static ]
+//*/
+//static double  = 1;
+//static double getWindowRatio()
+//{
+//  return myWindowRatio;
+//}
+//
+///*!
+//    Sets window ratio width/heght [ static ]
+//*/
+//static void setWindowRatio(double aRatio)
+//{
+//  myWindowRatio = aRatio;
+//}
 
 /*!
     Constructor
@@ -2924,7 +2924,6 @@ void QAD_Desktop::onDispatchTools(int id)
   QFileInfo fileInfo ;
   bool found = false;
 
-  char arg[256] ;
   bool libToolsGUI = true;
   if( QAD_XmlHandler::_bibmap[ id ].isEmpty() ) 
   { 
index 1ad0b2112123565324e16c1a2f647fb4cca0531c..34f9d3fff778156e5774a48137f466f7e01d9870 100644 (file)
@@ -232,9 +232,17 @@ void QAD_Study::removeStudyFrame( QAD_StudyFrame* sf )
        aStudyBuilder->RemoveObject(fatherSF);
        if (aLocked) myStudy->GetProperties()->SetLocked(true);
       }
-      
+
       updateObjBrowser( true );
     }
+    
+    QAD_RightFrame* rightFrame = sf->getRightFrame();
+    if ( rightFrame ) {
+      QAD_ViewFrame* viewFrame = rightFrame->getViewFrame();
+      if ( viewFrame )
+       emit supervStudyFrameClosing( viewFrame );
+    }
+
     myStudyFrames.removeRef( sf );
   }
 }
@@ -1330,7 +1338,7 @@ void QAD_Study::Selection( QString aSelection )
 /*!
   Returns the name of current selection
 */
-QString QAD_Study::getSelection()
+QString QAD_Study::getSelection() const
 {
   return QString (myTitle + "_" + mySelection);
 }
index 4a41ee5d71e27351c349c0871252c33146eeb072..409b2aba4dc47e731a21504c2d5127d61a756244 100644 (file)
@@ -48,6 +48,7 @@ class QAD_Application;
 class QMutex;
 class QAD_PyInterp;
 class TInitStudyThread;
+class QAD_ViewFrame;
 
 class QAD_EXPORT QAD_Study : public QObject
 {
@@ -145,7 +146,7 @@ public:
 
   /* selection */
   void           Selection( QString aSelection );
-  QString        getSelection();
+  QString        getSelection() const;
 
   /* python interpreter */
   QAD_PyInterp*          get_PyInterp(void);
@@ -160,6 +161,7 @@ signals:
   void           docClosing( QAD_Study* );
   void           docOperationTerminated( bool );
   void            closed();
+  void            supervStudyFrameClosing( QAD_ViewFrame* );
 
 public slots:
   void           onStudyFrameActivated( QAD_StudyFrame* );
index 92f5823d6d577c9308f088a2c206662389bcad76..cfba6977e036c9299c380fb63ece7e9ef3146159 100644 (file)
@@ -214,6 +214,7 @@ ViewType QAD_StudyFrame::getTypeView() const
 void QAD_StudyFrame::onStudyFrameActivated ( QWidget* activeWindow )
 {
   emit sfStudyFrameActivated( (QAD_StudyFrame*) activeWindow );
+  getRightFrame()->getViewFrame()->Activate( getStudy() );
 }
 
 /*!
index 119490b634d6c8dc6b44e857fc74c65458cd9325..cdc9961aee19d3ac330decc1020d5babb77cc4d2 100644 (file)
@@ -90,6 +90,10 @@ public:
   virtual void           EraseAll() = 0;
   virtual void           Repaint() = 0;
 
+  /* activation */
+  virtual void           Activate( QAD_Study* ) {}
+  // this method is called when parent window of view frame is activated
+
 protected slots:
   virtual void           onViewPan() = 0; 
   virtual void           onViewZoom() = 0;
index 6c2795394e3a4c8a372cf3f86ddffe91502b5779..81e91ae424d3a278bbf2bc83145472afd83975ba 100644 (file)
@@ -28,8 +28,8 @@
 
 #include "SALOMEGUI.h"
 #include "QAD_Desktop.h"
-using namespace std;
 
+using namespace std;
 
 //=============================================================================
 /*!
@@ -155,7 +155,8 @@ bool SALOMEGUI::ActiveStudyChanged( QAD_Desktop* parent )
  *
  */
 //=============================================================================
-void SALOMEGUI::BuildPresentation( const Handle(SALOME_InteractiveObject)& theIO )
+void SALOMEGUI::BuildPresentation( const Handle(SALOME_InteractiveObject)&,
+                                   QAD_ViewFrame* )
 {
 }
 
@@ -164,7 +165,7 @@ void SALOMEGUI::BuildPresentation( const Handle(SALOME_InteractiveObject)& theIO
  *
  */
 //=============================================================================
-void SALOMEGUI::SupportedViewType(int* buffer, int bufferSize)
+void SALOMEGUI::SupportedViewType(int* /*buffer*/, int /*bufferSize*/ )
 {
 }
 
index d823c6e41a64e5358b9998895a0ab511cab09b3a..3e3ede634ee74318b1f53a62718a362d7dff7b92 100644 (file)
@@ -35,6 +35,7 @@
 #include <qstring.h>
 
 class QAD_Desktop;
+class QAD_ViewFrame;
 class QAD_StudyFrame;
 class SALOME_Event;
 
@@ -64,7 +65,8 @@ public:
                                    const QString & theParent, const QString & theObject );
   virtual void DefinePopup       ( QString & theContext, QString & theParent, QString & theObject );
   virtual bool ActiveStudyChanged( QAD_Desktop* parent );
-  virtual void BuildPresentation ( const Handle(SALOME_InteractiveObject)& theIO );
+  virtual void BuildPresentation ( const Handle(SALOME_InteractiveObject)& theIO,
+                                   QAD_ViewFrame*  = 0 );
   virtual void SupportedViewType (int* buffer, int bufferSize);
   virtual void Deactivate        ();
 
index 7bc439ab1918f0f982594b70111fad385fce9640..09c9227a74182ae558b063e4c9cb291ae3c2f6ae 100644 (file)
@@ -1,4 +1,3 @@
-using namespace std;
 //=============================================================================
 // File      : SALOME_PYQT_GUI.cxx
 // Created   : mer jun  4 17:17:20 UTC 2003
@@ -338,7 +337,8 @@ bool SALOME_PYQT_GUI::ActiveStudyChanged( QAD_Desktop* parent )
  *  no call to python module.BuildPresentation() (not yet ???)
  */
 //=============================================================================
-void SALOME_PYQT_GUI::BuildPresentation( const Handle(SALOME_InteractiveObject)& theIO )
+void SALOME_PYQT_GUI::BuildPresentation( const Handle(SALOME_InteractiveObject)&,
+                                         QAD_ViewFrame* )
 {
 }
 
@@ -347,7 +347,7 @@ void SALOME_PYQT_GUI::BuildPresentation( const Handle(SALOME_InteractiveObject)&
  *  no call to python module.SupportedViewType() (not yet ???)
  */
 //=============================================================================
-void SALOME_PYQT_GUI::SupportedViewType(int* buffer, int bufferSize)
+void SALOME_PYQT_GUI::SupportedViewType(int* /*buffer*/, int /*bufferSize*/ )
 {
 }
 
index 2e7617d5adf1ac4bb88775e4d583ad1befdfe092..eb1ca4861285573fbaf1fa973a952cd19b678556 100644 (file)
@@ -38,7 +38,8 @@ public:
                                    const QString & theParent, const QString & theObject );
   virtual void DefinePopup       ( QString & theContext, QString & theParent, QString & theObject );
   virtual bool ActiveStudyChanged( QAD_Desktop* parent);
-  virtual void BuildPresentation ( const Handle(SALOME_InteractiveObject)& theIO );
+  virtual void BuildPresentation ( const Handle(SALOME_InteractiveObject)& theIO,
+                                   QAD_ViewFrame* = 0 );
   virtual void SupportedViewType (int* buffer, int bufferSize);
   virtual void Deactivate        ();
   void initInterp(int studyId);
index 370280259ca77bf11b2c43809a6e1a992ef20519..8636165484df2c3a6f200ca2362f17f46b451f3a 100644 (file)
@@ -8,6 +8,7 @@
 #include "SalomePyQt.hxx"
 
 #include <qapplication.h>
+#include <qmenubar.h>
 
 #include "QAD_Application.h"
 #include "QAD_Desktop.h"
@@ -19,6 +20,7 @@
 
 #include "QAD_Config.h"
 #include "QAD_Settings.h"
+
 using namespace std;
 
 QWidget* SalomePyQt::getDesktop()
@@ -149,3 +151,12 @@ bool SalomePyQt::dumpView(const QString& filename)
   }
   return false;
 }
+
+QPopupMenu* SalomePyQt::getPopupMenu( const MenuName menu )
+{
+  QMenuBar* mainMenu = QAD_Application::getDesktop()->getMainMenuBar();
+  if ( mainMenu->findItem( menu ) ) {
+    return mainMenu->findItem( menu )->popup();
+  }
+  return 0;
+}
index b70d39dfe4b1bde5c0f9afbeb212537dfde56437..91c369aff56ccf9efb5d34cc08e5b774bb3e7548 100644 (file)
 #include <qstring.h>
 #include <qmenubar.h>
 
+enum MenuName {
+  File        = 1,
+  View        = 2,
+  Edit        = 3,
+  Preferences = 4,
+  Tools       = 5,
+  Window      = 6,
+  Help        = 7  
+};
+
 class SalomePyQt
 {
 public:
   static QWidget*          getDesktop();
   static QWorkspace*       getMainFrame();
   static QMenuBar*         getMainMenuBar();
+  static QPopupMenu*       getPopupMenu( const MenuName menu );
   static SALOME_Selection* getSelection();
   static int               getStudyId();
   static void              putInfo( const QString& );
index fe6a9d43a9b212339ab21d72be119a2ba21d4a05..df84b3fc1b58ace332cfd4f0ae8b633c944082ee 100644 (file)
@@ -17,6 +17,16 @@ signals:
   void currentSelectionChanged();
 };
 
+enum MenuName {
+  File        = 1,
+  View        = 2,
+  Edit        = 3,
+  Preferences = 4,
+  Tools       = 5,
+  Window      = 6,
+  Help        = 7  
+};
+
 class SalomePyQt
 {
 %HeaderCode
@@ -27,6 +37,7 @@ public:
   static QWidget*    getDesktop();
   static QWorkspace* getMainFrame();
   static QMenuBar*   getMainMenuBar();
+  static QPopupMenu* getPopupMenu( const MenuName );
   static SALOME_Selection* getSelection();
   static int getStudyId();
   static void putInfo( const QString& );
index 2a6f6933abcec44bde9babca20df9e3dd9be6a1c..a5dd3b7c9b9f68a2b1d50d1b74a3e5ddaea1b59f 100644 (file)
@@ -38,9 +38,11 @@ LIB = libSALOME_Swigcmodule.la
 LIB_SRC = 
 
 SWIG_DEF = libSALOME_Swig.i
-EXPORT_PYSCRIPTS = libSALOME_Swig.py Help.py PyInterp.py salome.py examplevtk1.py supervisionexample.py supervisiongeomexample.py salome_shared_modules.py batchmode_salome.py test_table.py test_big_table.py test_many_objects.py import_hook.py salome_test.py test_remove_ref.py
+#EXPORT_PYSCRIPTS = libSALOME_Swig.py Help.py PyInterp.py salome.py examplevtk1.py supervisionexample.py supervisiongeomexample.py salome_shared_modules.py batchmode_salome.py test_table.py test_big_table.py test_many_objects.py import_hook.py salome_test.py test_remove_ref.py
 
-EXPORT_SHAREDPYSCRIPTS=kernel_shared_modules.py
+EXPORT_PYSCRIPTS = libSALOME_Swig.py batchmode_salome.py
+
+#EXPORT_SHAREDPYSCRIPTS=kernel_shared_modules.py
 
 LIB_CLIENT_IDL = SALOMEDS.idl \
                 SALOME_Exception.idl
index c997d9fa6b0d949450beec71b309c1003e986131..87edd913b0eb1f363906b14ae11f4cda829c55b8 100644 (file)
@@ -215,24 +215,44 @@ def FindFileInDataDir(filename):
 # initialise the ORB
 orb = None
 
-while orb == None:
+step = 0
+while step < 100 and orb is None:
     orb = CORBA.ORB_init([''], CORBA.ORB_ID)
+    step = step + 1
+    time.sleep(4)
+
+if orb is None:
+    print "Warning: ORB has not been initialized !!!"
 
 # create an LifeCycleCORBA instance
 lcc = LifeCycleCORBA(orb)
 
-while lcc._catalog == None:
+step = 0
+while step < 100 and lcc._catalog is None:
     lcc = LifeCycleCORBA(orb)
-
+    step = step + 1
+    time.sleep(4)
+    
+if lcc._catalog is None:
+    print "Warning: LifeCycleCORBA object is incomplete !!!"
+    
 #create a naming service instance
 naming_service = SALOME_NamingServicePy_i(orb)
 
 # get Study Manager reference
-obj=None
-while obj == None:
-    obj = naming_service.Resolve('myStudyManager') 
+obj = None
+
+step = 0
+while step < 100 and obj == None:
+    obj = naming_service.Resolve('myStudyManager')
+    step = step + 1
+    time.sleep(4)
+     
 myStudyManager = obj._narrow(SALOMEDS.StudyManager)
 
+if myStudyManager is None:
+    print "Warning: SALOMEDS.StudyManager has not been created !!!"
+
 # create new study
 aListOfOpenStudies = myStudyManager.GetOpenStudies();
 myStudy = None;
diff --git a/src/SALOME_SWIG_WITHOUTIHM/Help.py b/src/SALOME_SWIG_WITHOUTIHM/Help.py
new file mode 100755 (executable)
index 0000000..404ee4d
--- /dev/null
@@ -0,0 +1,141 @@
+#  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+# 
+#  This library is free software; you can redistribute it and/or 
+#  modify it under the terms of the GNU Lesser General Public 
+#  License as published by the Free Software Foundation; either 
+#  version 2.1 of the License. 
+# 
+#  This library 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 
+#  Lesser General Public License for more details. 
+# 
+#  You should have received a copy of the GNU Lesser General Public 
+#  License along with this library; if not, write to the Free Software 
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+# 
+#  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+#
+#
+#
+#  File   : Help.py
+#  Author : Paul RASCLE, EDF
+#  Module : SALOME
+#  $Header$
+
+class SalomeDoc:
+    def __init__(self, aDoc):
+        self.doc = aDoc
+    def __repr__(self):
+        print self.doc
+        return "---"
+    def salome(self):
+        doc_salome = '''
+MODULE : salome
+---------------
+module salome gives access to Salome ressources:
+variables:
+
+  salome:orb             : CORBA
+  salome.naming_service  : instance of naming Service class
+      methods:
+          Resolve(name)  : find a CORBA object (ior) by its pathname
+          Register(name) : register a CORBA object under a pathname
+  salome.lcc             : instance of lifeCycleCORBA class
+      methods:
+          FindOrLoadComponent(server,name) :
+                           obtain an Engine (CORBA object)
+                           or launch the Engine if not found,
+                           with a Server name and an Engine name
+  salome.sg
+      methods:
+         updateObjBrowser(bool):
+         getActiveStudyId():
+         getActiveStudyName():
+         
+         SelectedCount():      returns number of selected objects
+         getSelected(i):       returns entry of selected object number i
+         getAllSelected():     returns list of entry of selected objects
+         AddIObject(Entry):    select an existing Interactive object
+         RemoveIObject(Entry): remove object from selection
+         ClearIObjects():      clear selection
+         
+         Display(*Entry):
+         DisplayOnly(Entry):
+         Erase(Entry):
+         DisplayAll():
+         EraseAll():
+
+         IDToObject(Entry):    returns CORBA reference from entry
+
+  salome.myStudyName     : active Study Name
+  salome.myStudyId       : active Study Id
+  salome.myStudy         : the active Study itself (CORBA ior)
+                           methods : defined in SALOMEDS.idl
+                                                         
+methods:
+  salome.DumpStudy(study) : Dump a study, given the ior
+---
+'''
+        print doc_salome
+        
+    def geompy(self):
+        doc_geompy = '''
+MODULE : geompy
+---------------
+module geompy provides an encapsulation of GEOM Engine methods
+variables:
+  geompy.geom               : a Geometry Engine, found or loaded
+                              at first import of module geompy.
+                              methods : defined in GEOM_Gen.idl
+  geompy.myBuilder          : a study builder
+  geompy.father             : GEOM root in current study (salome.myStudy)
+
+methods:
+  addToStudy(aShape, aName) : add the shape into the current study
+  --- all methods of GEOM_Gen.idl that returns a shape are encapsulated,
+      with the same interface : shapes are named with their ior
+'''
+        print doc_geompy
+        
+    def supervision(self):
+        doc_supervision = '''
+MODULES : SALOME_SuperVisionEditor and SALOME_SuperVisionExecutor
+-----------------------------------------------------------------
+this modules provide access to Editor and Executor Engine methods
+
+See SUPERV.idl
+
+In order to run the example (supervisionexample.py)
+
+    Type : from supervisionexample import *
+           supervisionexample.py contains comments
+
+A new python example avoids references to LifeCycleCORBA
+                     avoids references to NamingService
+                     avoids references to ModuleCatalog
+                     avoids SuperVisionComponent creation
+                     allows G.Input(...) instead of AddInput(G,...)
+                     replaces Editor/Executor with Graph
+                     allows Nodes, Ports and Links CORBA objects
+                     shortens methods names
+                     ...
+
+    See /SuperVisionTest/resources/GraphExample.py
+                                   and GraphExample.xml
+---
+'''
+        print doc_supervision
+        
+    
+
+help = SalomeDoc('''
+Availables modules:
+  salome      : gives access to Salome ressources
+  geompy      : encapsulation of GEOM Engine methods
+  supervision : gives access to SuperVision Engine
+To obtain specific help on a module "truc", type: help.truc()
+To run an example, type: import example3
+''')
+  
diff --git a/src/SALOME_SWIG_WITHOUTIHM/Makefile.in b/src/SALOME_SWIG_WITHOUTIHM/Makefile.in
new file mode 100755 (executable)
index 0000000..1c42c1a
--- /dev/null
@@ -0,0 +1,52 @@
+#  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+# 
+#  This library is free software; you can redistribute it and/or 
+#  modify it under the terms of the GNU Lesser General Public 
+#  License as published by the Free Software Foundation; either 
+#  version 2.1 of the License. 
+# 
+#  This library 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 
+#  Lesser General Public License for more details. 
+# 
+#  You should have received a copy of the GNU Lesser General Public 
+#  License along with this library; if not, write to the Free Software 
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+# 
+#  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+#
+#
+#
+#  File   : Makefile.in
+#  Author : Paul RASCLE, EDF
+#  Module : SALOME
+#  $Header$
+
+top_srcdir=@top_srcdir@
+top_builddir=../..
+srcdir=@srcdir@
+VPATH=.:@srcdir@:@top_srcdir@/idl
+
+
+@COMMENCE@
+
+# Libraries targets
+
+#LIB = libSALOME_Swigcmodule.la
+LIB_SRC = 
+
+#SWIG_DEF = libSALOME_Swig.i
+EXPORT_PYSCRIPTS = Help.py PyInterp.py salome.py examplevtk1.py supervisionexample.py supervisiongeomexample.py salome_shared_modules.py batchmode_salome.py test_table.py test_big_table.py test_many_objects.py import_hook.py salome_test.py
+
+EXPORT_SHAREDPYSCRIPTS=kernel_shared_modules.py
+
+#LIB_CLIENT_IDL = SALOMEDS.idl \
+                #SALOME_Exception.idl
+
+#CPPFLAGS+=$(QT_INCLUDES) $(PYTHON_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) -DHAVE_CONFIG_H
+#LIBS+= $(PYTHON_LIBS)
+#LDFLAGS+= -lSalomeGUI
+
+@CONCLUDE@
diff --git a/src/SALOME_SWIG_WITHOUTIHM/PyInterp.py b/src/SALOME_SWIG_WITHOUTIHM/PyInterp.py
new file mode 100755 (executable)
index 0000000..4831016
--- /dev/null
@@ -0,0 +1,101 @@
+#  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+# 
+#  This library is free software; you can redistribute it and/or 
+#  modify it under the terms of the GNU Lesser General Public 
+#  License as published by the Free Software Foundation; either 
+#  version 2.1 of the License. 
+# 
+#  This library 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 
+#  Lesser General Public License for more details. 
+# 
+#  You should have received a copy of the GNU Lesser General Public 
+#  License along with this library; if not, write to the Free Software 
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+# 
+#  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+#
+#
+#
+#  File   : PyInterp.py
+#  Author : Paul RASCLE, EDF
+#  Module : SALOME
+#  $Header$
+
+import sys
+from omniORB import CORBA
+from LifeCycleCORBA import *
+from libSALOME_Swig import *
+import SALOMEDS
+from SALOME_NamingServicePy import *
+
+    #--------------------------------------------------------------------------
+
+def DumpComponent(Study, SO, offset):
+    it = Study.NewChildIterator(SO)
+    Builder = Study.NewBuilder()
+    while it.More():
+        CSO = it.Value()
+        it.Next()
+        anAttr = Builder.FindOrCreateAttribute(CSO, "AttributeName")
+        AtName = anAttr._narrow(SALOMEDS.AttributeName)
+        t_name = AtName.Value()
+        if t_name[0] == 1:
+            ofs = 1
+            a = ""
+            while ofs <= offset:
+                a = a + "--"
+                ofs = ofs +1
+            print a + ">" + CSO.GetID() + " " + t_name[1]
+        t_RefSO = CSO.ReferencedObject()
+        if t_RefSO[0] == 1:
+            RefSO = t_RefSO[1]
+            ofs = 1
+            a = ""
+            while ofs <= offset:
+                a = a + "  "
+                ofs = ofs +1
+            print a + ">" + RefSO.GetID()
+        DumpComponent(Study, CSO, offset+2)
+
+    #--------------------------------------------------------------------------
+
+def DumpStudy(Study):
+    itcomp = Study.NewComponentIterator()
+    while itcomp.More():
+        SC = itcomp.Value()
+        itcomp.Next()
+        name = SC.ComponentDataType()
+        print "-> ComponentDataType is " + name
+        DumpComponent(Study, SC, 1)
+        
+
+    #--------------------------------------------------------------------------
+
+# initialise the ORB
+orb = CORBA.ORB_init([''], CORBA.ORB_ID)
+
+# create an LifeCycleCORBA instance
+lcc = LifeCycleCORBA(orb)
+
+# create an SALOMEGUI_Swig instance
+sg = SALOMEGUI_Swig()
+
+#create an naming service instance
+naming_service = SALOME_NamingServicePy_i(orb)
+
+# get active study name and id
+myStudyName = sg.getActiveStudyName()
+print myStudyName
+
+myStudyId = sg.getActiveStudyId()
+print myStudyId
+
+# get Study Manager reference
+obj = naming_service.Resolve('myStudyManager')
+myStudyManager = obj._narrow(SALOMEDS.StudyManager)
+
+# get active study
+myStudy = myStudyManager.GetStudyByName(myStudyName)
diff --git a/src/SALOME_SWIG_WITHOUTIHM/batchmode_salome.py b/src/SALOME_SWIG_WITHOUTIHM/batchmode_salome.py
new file mode 100755 (executable)
index 0000000..3897916
--- /dev/null
@@ -0,0 +1,269 @@
+#  Copyright (C) 2003  CEA/DEN, EDF R&D
+#
+#
+#
+#  File   : batchmode_salome.py
+#  Module : SALOME
+
+import salome_shared_modules
+
+from omniORB import CORBA
+from LifeCycleCORBA import *
+import SALOMEDS
+from SALOME_NamingServicePy import *
+
+#--------------------------------------------------------------------------
+
+def ImportComponentGUI(ComponentName):
+    libName = "lib" + ComponentName + "_Swig"
+    command = "from " + libName + " import *"
+    exec ( command )
+    constructor = ComponentName + "GUI_Swig()"
+    command = "gui = " + constructor
+    exec ( command )
+    return gui
+
+    #--------------------------------------------------------------------------
+
+def SalomeGUIgetAllSelected(self):
+    selNumber = self.SelectedCount()
+    listSelected = []
+    for i in range(selNumber):
+        listSelected.append(self.getSelected(i))
+    return listSelected
+    #--------------------------------------------------------------------------
+
+def generateName(prefix = None):
+    import whrandom;
+    int = whrandom.randint(1,1000);
+    if prefix is None:
+        return "Study" + str(int)
+    else :
+        return prefix + str(int)
+
+#WITHOUTIHMfrom libSALOME_Swig import *
+###from SalomePyQt import *
+#WITHOUTIHMclass SalomeGUI(SALOMEGUI_Swig):
+    #WITHOUTIHMgetAllSelected = SalomeGUIgetAllSelected
+   
+    #WITHOUTIHMdef getDesktop(self) :
+#      return SalomePyQt.getDesktop()
+       #WITHOUTIHMreturn None
+
+    #WITHOUTIHMdef getSelection(self) :
+#      return SalomePyQt.getSelection()
+       #WITHOUTIHMreturn None
+
+    #--------------------------------------------------------------------------
+
+def IDToObject(id):
+    myObj = None
+    mySO = myStudy.FindObjectID(id);
+    if mySO is not None:
+        ok, anAttr = mySO.FindAttribute("AttributeIOR")
+        if ok:
+            AtIOR = anAttr._narrow(SALOMEDS.AttributeIOR)
+            if AtIOR.Value() != "":
+                myObj = orb.string_to_object(AtIOR.Value())
+    return myObj
+
+def ObjectToSObject(obj):
+    mySO = None
+    if obj is not None:
+        ior =  orb.object_to_string(obj)
+        if ior != "":
+            mySO = myStudy.FindObjectIOR(ior)
+    return mySO
+
+def ObjectToID(obj):
+    mySO = ObjectToSObject(obj)
+    if mySO:
+        return mySO.GetID()
+    return ""
+
+def IDToSObject(id):
+    mySO = myStudy.FindObjectID(id);
+    return mySO
+
+    #--------------------------------------------------------------------------
+
+def PersistentPresentation(theStudy, theSO, theWithID):
+    # put the sobject's content (with subchildren) to the string
+    aResult = ""
+    attrs = theSO.GetAllAttributes()
+    aLen = len(attrs)
+    anUncopied = 0
+    for a in range(0,aLen):
+        attr = attrs[a]
+        if isinstance(attr,SALOMEDS._objref_AttributeTreeNode):
+            anUncopied += 1
+        elif isinstance(attr,SALOMEDS._objref_AttributeTarget):
+            anUncopied += 1
+        elif isinstance(attr,SALOMEDS._objref_AttributeReal) or \
+             isinstance(attr,SALOMEDS._objref_AttributeInteger) or \
+             isinstance(attr,SALOMEDS._objref_AttributeName) or \
+             isinstance(attr,SALOMEDS._objref_AttributeComment) or \
+             isinstance(attr,SALOMEDS._objref_AttributePersistentRef) or \
+             isinstance(attr,SALOMEDS._objref_AttributeLocalID) or \
+             isinstance(attr,SALOMEDS._objref_AttributeUserID):
+            aResult += " attribute value: " + str(attr.Value())
+        elif isinstance(attr,SALOMEDS._objref_AttributeIOR):
+            aResult += " attribute: IOR"
+        elif isinstance(attr,SALOMEDS._objref_AttributeSequenceOfReal) or \
+             isinstance(attr,SALOMEDS._objref_AttributeSequenceOfInteger):
+            aResult += " Sequence: " + str(attr.CorbaSequence())
+        elif isinstance(attr,SALOMEDS._objref_AttributeDrawable):
+            aResult += " Drawable: " + str(attr.IsDrawable())
+        elif isinstance(attr,SALOMEDS._objref_AttributeSelectable):
+            aResult += " Selectable: " + str(attr.IsSelectable())
+        elif isinstance(attr,SALOMEDS._objref_AttributeExpandable):
+            aResult += " Expandable: " + str(attr.IsExpandable())
+        elif isinstance(attr,SALOMEDS._objref_AttributeOpened):
+            aResult += " Opened: " + str(attr.IsOpened())
+        elif isinstance(attr,SALOMEDS._objref_AttributeTextColor):
+            aResult += " TextColor: " + str(attr.TextColor())
+        elif isinstance(attr,SALOMEDS._objref_AttributeTextHighlightColor):
+            aResult += " TextHighlightColor: " + str(attr.TextHighlightColor())
+        elif isinstance(attr,SALOMEDS._objref_AttributePixMap):
+            aResult += " PixMap: " + str(attr.GetPixMap())
+        elif isinstance(attr,SALOMEDS._objref_AttributeTableOfInteger) or \
+             isinstance(attr,SALOMEDS._objref_AttributeTableOfReal):
+            aResult += " Table with title: " + attr.GetTitle()
+        elif isinstance(attr,SALOMEDS._objref_AttributePythonObject):
+            aResult += " PythonObject: " + attr.GetObject()
+
+    if theWithID:
+        aResult = "sobject: " + theSO.GetID() + " nbattrs: " + str(aLen - anUncopied) + aResult + '\n'
+    else:
+        aResult = " nbattrs: " + str(aLen - anUncopied) + aResult + '\n'
+    anIter = theStudy.NewChildIterator(theSO)
+    while anIter.More():
+        aResult += PersistentPresentation(theStudy, anIter.Value(), theWithID)
+        anIter.Next()
+    return aResult
+
+    #--------------------------------------------------------------------------
+
+def GetTree(theSO):
+    # returns the document list tree (as list)
+    aResult = [theSO.GetID()]
+    anIter = myStudy.NewChildIterator(theSO)
+    while anIter.More():
+        aResult += GetTree(anIter.Value())
+        anIter.Next()
+    return aResult
+
+    #--------------------------------------------------------------------------
+
+def CheckCopyPaste(theSO, theInfo ,theComponentPaste):
+    aRoot = theSO
+    while aRoot.GetID() != "0:":
+        aRoot = aRoot.GetFather()
+    aTree = GetTree(aRoot)
+    aStudyPersist = PersistentPresentation(myStudy, aRoot, 1)
+
+    if not myStudyManager.CanCopy(theSO):
+        raise RuntimeError, "<CanCopy> for "+theInfo+" returns false"
+    
+    if not myStudyManager.Copy(theSO):
+        raise RuntimeError, "<Copy> for "+theInfo+" returns false"
+
+    
+    if not myStudyManager.CanPaste(theSO):
+        raise RuntimeError, "<CanPaste> for "+theInfo+" returns false"
+
+    # check: before paste study is not changed check
+    if aStudyPersist != PersistentPresentation(myStudy, aRoot, 1):
+        raise RuntimeError, "Study is changed before Paste calling for "+theInfo
+    
+    aSObj = theSO
+    if theComponentPaste:
+        aSObj = theSO.GetFatherComponent()
+        theInfo = theInfo + "(paste for component)"
+    if myStudyManager.Paste(aSObj) == None:
+        raise RuntimeError, "<Paste> for "+theInfo+" returns None object"
+    aNewTree = GetTree(aRoot)
+    aLen = len(aTree)
+    for a in range(0,aLen):
+        if aTree[a] != aNewTree[a]:
+            return myStudy.FindObjectID(aNewTree[a])
+        
+    if aLen < len(aNewTree):
+        return myStudy.FindObjectID(aNewTree[aLen])
+    
+    raise RuntimeError, "After Copy calling the tree is not changed"
+    
+    #--------------------------------------------------------------------------
+def FindFileInDataDir(filename):
+    import os
+    datadir = os.getenv("DATA_DIR")
+    if datadir is not None:
+        import string
+        dirs = string.split(datadir, ":")
+        for dir in dirs:
+            file = dir + "/" + filename
+            if os.path.exists(file):
+                return file;
+    datadir = os.getenv("KERNEL_ROOT_DIR") + "/examples/"
+    file = datadir + filename
+    if os.path.exists(file):
+        return file;
+
+    return None
+        
+#--------------------------------------------------------------------------
+# initialise the ORB
+orb = None
+
+step = 0
+while step < 100 and orb is None:
+    orb = CORBA.ORB_init([''], CORBA.ORB_ID)
+    step = step + 1
+    time.sleep(4)
+
+if orb is None:
+    print "Warning: ORB has not been initialized !!!"
+
+# create an LifeCycleCORBA instance
+lcc = LifeCycleCORBA(orb)
+
+step = 0
+while step < 100 and lcc._catalog is None:
+    lcc = LifeCycleCORBA(orb)
+    step = step + 1
+    time.sleep(4)
+    
+if lcc._catalog is None:
+    print "Warning: LifeCycleCORBA object is incomplete !!!"
+    
+#create a naming service instance
+naming_service = SALOME_NamingServicePy_i(orb)
+
+# get Study Manager reference
+obj = None
+
+step = 0
+while step < 100 and obj == None:
+    obj = naming_service.Resolve('myStudyManager')
+    step = step + 1
+    time.sleep(4)
+     
+myStudyManager = obj._narrow(SALOMEDS.StudyManager)
+
+if myStudyManager is None:
+    print "Warning: SALOMEDS.StudyManager has not been created !!!"
+
+# create new study
+aListOfOpenStudies = myStudyManager.GetOpenStudies();
+myStudy = None;
+if len(aListOfOpenStudies) == 0 :
+    myStudy = myStudyManager.NewStudy("Study1")
+else:
+    myStudyName = aListOfOpenStudies[0]
+    myStudy = myStudyManager.GetStudyByName(myStudyName)
+    
+myStudyName = myStudy._get_Name()
+
+myStudyId = myStudy._get_StudyId()
+print myStudyId
+
diff --git a/src/SALOME_SWIG_WITHOUTIHM/examplevtk1.py b/src/SALOME_SWIG_WITHOUTIHM/examplevtk1.py
new file mode 100755 (executable)
index 0000000..58a49be
--- /dev/null
@@ -0,0 +1,40 @@
+#  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+# 
+#  This library is free software; you can redistribute it and/or 
+#  modify it under the terms of the GNU Lesser General Public 
+#  License as published by the Free Software Foundation; either 
+#  version 2.1 of the License. 
+# 
+#  This library 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 
+#  Lesser General Public License for more details. 
+# 
+#  You should have received a copy of the GNU Lesser General Public 
+#  License along with this library; if not, write to the Free Software 
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+# 
+#  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+#
+#
+#
+#  File   : examplevtk1.py
+#  Module : SALOME
+
+import libSalomePy
+ren=libSalomePy.renderer
+#iren=libSalomePy.interactor
+
+from libVTKCommonPython import *
+from libVTKGraphicsPython import *
+cone = vtkConeSource()
+cone.SetResolution(8)
+coneMapper = vtkPolyDataMapper()
+coneMapper.SetInput(cone.GetOutput())
+coneActor = vtkActor()
+coneActor.SetMapper(coneMapper)
+
+ren.AddActor(coneActor)
+iren = vtkRenderWindowInteractor()
+
diff --git a/src/SALOME_SWIG_WITHOUTIHM/import_hook.py b/src/SALOME_SWIG_WITHOUTIHM/import_hook.py
new file mode 100755 (executable)
index 0000000..1e6613c
--- /dev/null
@@ -0,0 +1,105 @@
+"""
+This module replaces the standard import mechanism with one
+that filters some imports that can't be done more than once.
+
+This is related to the multi study feature that is implemented
+by using the Python multi interpreter feature.
+Some modules register objects or classes by calling modules
+implemented in C. These operations can't be done multiple times.
+So it's very important to control these imports.
+
+Examples:
+  - PyQt : import qt calls a C module to register classes
+  - OmniORB : import *_idl calls a C module to register CORBA interfaces
+
+Usage:
+  - First import the module : import import_hook. This module will
+    replace the original importer mechanism
+
+  - Next register the module names or pattern names to filter out::
+     import_hook.register_name("a")
+     import_hook.register_pattern(pattern)
+
+    where pattern is a function with one parameter, the module name
+    to be imported, that returns true or false depending if this module is
+    to be filtered or not.
+
+  - Then it's done
+
+IMPORTANT : Every subinterpretor has its own import_hook module. import_hook is not shared among subinterpretors.
+The mechanism only works if shared_imported and pattern are shared between all subinterpretors.
+This is done by calling init_shared_modules().
+  
+"""
+import sys, imp, __builtin__
+
+# Keep in shared_imported a copy of dictionnary modules
+# that need to be imported only once in multi-study context
+shared_imported={}
+
+# patterns contains functions that returns 1 or 0 depending if 
+# the module name (argument) must be filtered out or not
+# These functions are added by calling register_pattern
+patterns=[]
+
+original_import=__builtin__.__import__
+
+def register_name(name):
+    if shared_imported.has_key(name):return
+    shared_imported[name]=None
+
+def register_pattern(pattern):
+    patterns.append(pattern)
+
+def is_shared(name):
+    if shared_imported.has_key(name):return 1
+    for pattern in patterns:
+        if pattern(name) : return 1
+    return 0
+
+def get_shared_imported(name):
+    return shared_imported.get(name)
+def set_shared_imported(name,module):
+    shared_imported[name]=module
+    #print "Module %s shared registered" % name
+
+def get_shared_imported_with_copy(name):
+    module_dict= shared_imported.get(name)
+    m=imp.new_module(name)
+    m.__dict__.update(module_dict)
+    return m
+def set_shared_imported_with_copy(name,module):
+    shared_imported[name]=module.__dict__.copy()
+    #print "Module %s shared registered" % name
+
+def import_hook(name, globals=None, locals=None, fromlist=None):
+    module=get_shared_imported(name)
+    if module:
+       sys.modules[name]=module
+       return module
+
+    module= original_import(name, globals, locals, fromlist)
+
+    if is_shared(name):
+       set_shared_imported(name,module)
+    return module
+
+original_reload=__builtin__.reload
+
+def reload_hook(module):
+    if is_shared(module.__name__):
+       return module
+    return original_reload(module)
+
+__builtin__.__import__=import_hook
+# Reload is not replaced 
+#__builtin__.reload=reload_hook
+
+def init_shared_modules(shared_module):
+    global shared_imported, patterns
+    shared_imported=shared_module.shared_imported
+    patterns=       shared_module.patterns
+    shared_imported["salome_shared_modules"]=shared_module
+    import salome_shared_modules
+    for m in salome_shared_modules.list_modules:
+        m.init_shared_modules()
diff --git a/src/SALOME_SWIG_WITHOUTIHM/kernel_shared_modules.py b/src/SALOME_SWIG_WITHOUTIHM/kernel_shared_modules.py
new file mode 100755 (executable)
index 0000000..291e27c
--- /dev/null
@@ -0,0 +1,75 @@
+"""
+
+"""
+import glob,os,sys
+
+import import_hook
+from import_hook import register_name
+from import_hook import register_pattern
+
+register_name("qt")
+register_pattern(lambda(x):x.endswith("_idl"))
+
+register_name("omniORB")
+register_name("CosNaming")
+
+register_name("Engines")
+register_name("SALOME")
+register_name("SALOMEDS")
+register_name("SALOME_ModuleCatalog")
+
+# BE CAREFUL
+# Engines, SALOME, SALOMEDS must be imported in that order because :
+# Engines imports SALOME_Component_idl
+# SALOME imports SALOME_Session_idl and SALOME_Exception_idl which imports SALOME_Component_idl
+# and SALOMEDS imports SALOMEDS_idl and SALOMEDS_Attributes_idl which imports SALOME_Exception_idl
+# If SALOME is imported before Engines, that module would not be completely imported
+import Engines
+import SALOME
+import SALOMEDS
+
+import SALOME_ModuleCatalog
+from SALOME_utilities import MESSAGE
+#
+# We search all Python CORBA (omniorb) modules.
+# A Python CORBA module has 2 associated Python packages 
+# These packages are named : <module_name> and <module_name>__POA
+#
+# Get the SALOMEPATH if set or else use KERNEL_ROOT_DIR that should be set.
+salome_path=os.environ.get("SALOMEPATH",os.getenv("KERNEL_ROOT_DIR"))
+
+# Register all CORBA modules in the path and python modules in shared_modules
+path=salome_path.split(":")
+#
+for rep in path:
+   rep_salome=os.path.join(rep,"lib","python"+sys.version[:3],"site-packages","salome")
+   # Find all the *__POA packages in the path
+   for elem in glob.glob(os.path.join(rep_salome,"*__POA")):
+      if os.path.isdir(elem):
+         # Found a directory (Python package) named *__POA 
+         module__POA=os.path.basename(elem)
+         module=module__POA[:-5]
+         MESSAGE( "Register CORBA module: " + module + ". Directory: " + os.path.abspath(elem)[:-5] )
+         register_name(module)
+
+   # Now we import modules found in shared_modules directory
+   for elem in glob.glob(os.path.join(rep_salome,"shared_modules","*.py")):
+       module=os.path.basename(elem)[:-3]
+       MESSAGE( "Register Python module: " + module + ". Location: " + os.path.abspath(elem) )
+       register_name(module)
+
+def init_shared_modules():
+   """
+      This function initializes shared modules that need to be
+   """
+   # EDF-CCAR:
+   # Problem with omniORB : omniORB creates a C Python module named  _omnipy
+   # this module has sub-modules : omni_func, ...
+   # _omnipy is quite a package but import with Python sub-interpreters does not seem to work
+   # To make it work we need to add those sub-modules in sys.modules
+   import sys
+   import _omnipy
+   sys.modules["_omnipy.omni_func"]=_omnipy.omni_func
+   sys.modules["_omnipy.poa_func"]=_omnipy.poa_func
+   sys.modules["_omnipy.poamanager_func"]=_omnipy.poamanager_func
+   sys.modules["_omnipy.orb_func"]=_omnipy.orb_func
diff --git a/src/SALOME_SWIG_WITHOUTIHM/salome.py b/src/SALOME_SWIG_WITHOUTIHM/salome.py
new file mode 100755 (executable)
index 0000000..2d5ae11
--- /dev/null
@@ -0,0 +1,156 @@
+#  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+# 
+#  This library is free software; you can redistribute it and/or 
+#  modify it under the terms of the GNU Lesser General Public 
+#  License as published by the Free Software Foundation; either 
+#  version 2.1 of the License. 
+# 
+#  This library 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 
+#  Lesser General Public License for more details. 
+# 
+#  You should have received a copy of the GNU Lesser General Public 
+#  License along with this library; if not, write to the Free Software 
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+# 
+#  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+#
+#
+#
+#  File   : salome.py
+#  Author : Paul RASCLE, EDF
+#  Module : SALOME
+#  $Header$
+
+from omniORB import CORBA
+from LifeCycleCORBA import *
+from libSALOME_Swig import *
+import SALOMEDS
+from SALOME_NamingServicePy import *
+
+from SALOME_utilities import *
+
+#--------------------------------------------------------------------------
+
+def DumpComponent(Study, SO, offset):
+    it = Study.NewChildIterator(SO)
+    Builder = Study.NewBuilder()
+    while it.More():
+        CSO = it.Value()
+        it.Next()
+        anAttr = Builder.FindOrCreateAttribute(CSO, "AttributeName")
+        AtName = anAttr._narrow(SALOMEDS.AttributeName)
+        t_name = AtName.Value()
+        if t_name[0] == 1:
+            ofs = 1
+            a = ""
+            while ofs <= offset:
+                a = a + "--"
+                ofs = ofs +1
+            MESSAGE( a + ">" + str(CSO.GetID()) + " " + str(t_name[1]) )
+        t_RefSO = CSO.ReferencedObject()
+        if t_RefSO[0] == 1:
+            RefSO = t_RefSO[1]
+            ofs = 1
+            a = ""
+            while ofs <= offset:
+                a = a + "  "
+                ofs = ofs +1
+            MESSAGE( a + ">" + str(RefSO.GetID()) )
+        DumpComponent(Study, CSO, offset+2)
+
+    #--------------------------------------------------------------------------
+
+def DumpStudy(Study):
+    itcomp = Study.NewComponentIterator()
+    while itcomp.More():
+        SC = itcomp.Value()
+        itcomp.Next()
+        name = SC.ComponentDataType()
+        MESSAGE( "-> ComponentDataType is " + name )
+        DumpComponent(Study, SC, 1)
+        
+
+    #--------------------------------------------------------------------------
+
+def ImportComponentGUI(ComponentName):
+    libName = "lib" + ComponentName + "_Swig"
+    command = "from " + libName + " import *"
+    exec ( command )
+    constructor = ComponentName + "_Swig()"
+    command = "gui = " + constructor
+    exec ( command )
+    return gui
+
+    #--------------------------------------------------------------------------
+
+def SalomeGUIgetAllSelected(self):
+    selNumber = self.SelectedCount()
+    listSelected = []
+    for i in range(selNumber):
+        listSelected.append(self.getSelected(i))
+    return listSelected
+
+class SalomeGUI(SALOMEGUI_Swig):
+    getAllSelected = SalomeGUIgetAllSelected
+    
+    #--------------------------------------------------------------------------
+
+def IDToObject(id):
+    myObj = None
+    mySO = myStudy.FindObjectID(id);
+    if mySO is not None:
+        ok, anAttr = mySO.FindAttribute("AttributeIOR")
+        if ok:
+            AtIOR = anAttr._narrow(SALOMEDS.AttributeIOR)
+            if AtIOR.Value() != "":
+                myObj = orb.string_to_object(AtIOR.Value())
+    return myObj
+
+def ObjectToSObject(obj):
+    mySO = None
+    if obj is not None:
+        ior =  orb.object_to_string(obj)
+        if ior != "":
+            mySO = myStudy.FindObjectIOR(ior)
+    return mySO
+
+def ObjectToID(obj):
+    mySO = ObjectToSObject(obj)
+    if mySO:
+        return mySO.GetID()
+    return ""
+
+def IDToSObject(id):
+    mySO = myStudy.FindObjectID(id);
+    return mySO
+
+    #--------------------------------------------------------------------------
+
+# initialise the ORB
+orb = CORBA.ORB_init([''], CORBA.ORB_ID)
+
+# create an LifeCycleCORBA instance
+lcc = LifeCycleCORBA(orb)
+
+# create an SALOMEGUI_Swig instance
+sg = SalomeGUI()
+
+#create an naming service instance
+naming_service = SALOME_NamingServicePy_i(orb)
+
+# get active study name and id
+myStudyName = sg.getActiveStudyName()
+MESSAGE( myStudyName )
+
+myStudyId = sg.getActiveStudyId()
+MESSAGE( str(myStudyId) )
+
+# get Study Manager reference
+obj = naming_service.Resolve('myStudyManager')
+myStudyManager = obj._narrow(SALOMEDS.StudyManager)
+
+# get active study
+myStudy = myStudyManager.GetStudyByName(myStudyName)
diff --git a/src/SALOME_SWIG_WITHOUTIHM/salome_shared_modules.py b/src/SALOME_SWIG_WITHOUTIHM/salome_shared_modules.py
new file mode 100755 (executable)
index 0000000..ebc0d12
--- /dev/null
@@ -0,0 +1,89 @@
+#  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+# 
+#  This library is free software; you can redistribute it and/or 
+#  modify it under the terms of the GNU Lesser General Public 
+#  License as published by the Free Software Foundation; either 
+#  version 2.1 of the License. 
+# 
+#  This library 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 
+#  Lesser General Public License for more details. 
+# 
+#  You should have received a copy of the GNU Lesser General Public 
+#  License along with this library; if not, write to the Free Software 
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+# 
+#  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+#
+#
+#
+#  File   : salome_shared_modules.py
+#  Module : SALOME
+
+from SALOME_utilities import *
+
+"""
+This module with help of import_hook and *_shared_modules
+filters imports when using the embedded Python interpretor.
+
+Some imports can't be done more than once.
+This is related to the multi study feature that is implemented
+by using the Python multi interpreter feature.
+Some modules register objects or classes by calling modules
+implemented in C. These operations can't be done multiple times.
+So it's very important to control these imports.
+
+Examples:
+  - PyQt : import qt calls a C module to register classes
+  - OmniORB : import *_idl calls a C module to register CORBA interfaces
+
+Usage:
+  - First : the module salome_shared_modules is imported by main Python interpretor.
+    It will keep a dictionnary and a list that are shared among all
+    the subinterpretors and imports import_hook module that replaces
+    the standard import mechanism par one that prevents more than one import
+    for some modules identified by name (call register_name) or by a 
+    validator (call register_pattern).
+
+  Calls to register_name and register_pattern are done in modules named *_shared_modules
+  that could be found in the path SALOMEPATH
+
+"""
+import glob,os,sys
+
+import import_hook
+# shared_imported, patterns, register_name, register_pattern
+# will be shared by all Python sub interpretors
+from import_hook import shared_imported
+from import_hook import patterns
+from import_hook import register_name
+from import_hook import register_pattern
+
+register_name("salome_shared_modules")
+
+# Get the SALOMEPATH if set or else use KERNEL_ROOT_DIR that should be set.
+salome_path=os.environ.get("SALOMEPATH",os.getenv("KERNEL_ROOT_DIR"))
+
+list_modules=[]
+
+# Import all *_shared_modules in the path and store them in list_modules
+path=salome_path.split(":")
+for rep in path:
+    # Import all *_shared_modules in rep
+    for f in glob.glob(os.path.join(rep,"lib","python"+sys.version[:3],"site-packages","salome","shared_modules","*_shared_modules.py")):
+        try:
+           m=__import__(os.path.splitext(os.path.basename(f))[0])
+           list_modules.append(m)
+        except:
+           pass
+
+# 
+# If shared modules have been imported before installing import mechanism
+# we add them to shared_imported
+#
+for name,module in sys.modules.items():
+    if import_hook.is_shared(name) and shared_imported.get(name) is None:
+       #print "Module shared added to shared_imported: ",name
+       shared_imported[name]=module
diff --git a/src/SALOME_SWIG_WITHOUTIHM/salome_test.py b/src/SALOME_SWIG_WITHOUTIHM/salome_test.py
new file mode 100755 (executable)
index 0000000..a1e63a6
--- /dev/null
@@ -0,0 +1,486 @@
+#  SALOME SALOME_SWIG : binding of C++ implementation and Python
+#
+#  Copyright (C) 2003  CEA/DEN, EDF R&D
+#
+#
+#
+#  File   : salome_test.py
+#  Module : SALOME
+
+print "Test the application loading  GEOM, SMESH, VISU, MED, components and doing some"
+print "operation within the components."
+
+import salome
+from salome import sg
+import SALOMEDS
+import os
+
+import SALOME_ModuleCatalog
+
+print "======================================================================"
+print "           Get Catalog "
+print "======================================================================"
+obj = salome.naming_service.Resolve('Kernel/ModulCatalog')
+catalog = obj._narrow(SALOME_ModuleCatalog.ModuleCatalog)
+
+print "======================================================================"
+print "           Create Study "
+print "======================================================================"
+
+comp = catalog.GetComponent("GEOM")
+if comp is None:
+       raise RuntimeError,"Component GEOM not found in Module Catalog."
+
+import geompy
+
+print "================================="
+print "       create AttributeReal      "
+print "================================="
+A = geompy.myBuilder.FindOrCreateAttribute(geompy.father, "AttributeReal")
+if A == None :
+       raise  RuntimeError, "Can't create AttributeReal attribute"
+A = A._narrow(SALOMEDS.AttributeReal)
+A.SetValue(0.0001)
+if A.Value() != 0.0001:
+       raise  RuntimeError, "Error : wrong value of  AttributeReal"
+
+print
+print " ===========  Test Geometry  =========================="
+print
+
+print "==================================="
+print "     define a box"
+print "==================================="
+
+box = geompy.MakeBox(0., 0., 0., 100., 200., 300.)
+idbox = geompy.addToStudy(box,"box")
+
+print
+print "=============  Test SMESH  ============================="
+print
+
+import StdMeshers
+
+comp = catalog.GetComponent("SMESH")
+if comp is None:
+       raise RuntimeError,"Component SMESH not found in Module Catalog."
+
+comp = catalog.GetComponent("MED")
+if comp is None:
+       raise RuntimeError,"Component MED not found in Module Catalog."
+
+import SMESH
+
+geom = salome.lcc.FindOrLoadComponent("FactoryServer", "GEOM")
+myBuilder = salome.myStudy.NewBuilder()
+
+smesh = salome.lcc.FindOrLoadComponent("FactoryServer", "SMESH")
+smeshgui = salome.ImportComponentGUI("SMESH")
+smeshgui.Init(salome.myStudyId);
+
+ShapeTypeCompSolid = 1
+ShapeTypeSolid = 2
+ShapeTypeShell = 3
+ShapeTypeFace = 4
+ShapeTypeWire = 5
+ShapeTypeEdge = 6
+ShapeTypeVertex = 7
+
+# ---- define a box
+
+box = geompy.MakeBox(0., 0., 0., 100., 200., 300.)
+idbox = geompy.addToStudy(box,"box")
+
+# ---- add first face of box in study
+
+subShapeList=geompy.SubShapeAll(box,ShapeTypeFace)
+face=subShapeList[0]
+name = geompy.SubShapeName(face, box)
+print name
+idface=geompy.addToStudyInFather(box,face,name)
+
+# ---- add shell from box  in study
+
+subShellList=geompy.SubShapeAll(box,ShapeTypeShell)
+shell = subShellList[0]
+name = geompy.SubShapeName(shell, box)
+print name
+idshell=geompy.addToStudyInFather(box,shell,name)
+
+# ---- add first edge of face in study
+
+edgeList = geompy.SubShapeAll(face,ShapeTypeEdge)
+edge=edgeList[0];
+name = geompy.SubShapeName(edge, face)
+print name
+idedge=geompy.addToStudyInFather(face,edge,name)
+
+
+# ---- SMESH 
+
+# ---- create Hypothesis
+
+print "-------------------------- create Hypothesis"
+print "-------------------------- LocalLength"
+hypLen1 = smesh.CreateHypothesis( "LocalLength", "libStdMeshersEngine.so" )
+hypLen1.SetLength(100)
+print hypLen1.GetName()
+print hypLen1.GetId()
+print hypLen1.GetLength()
+
+smeshgui.SetName(salome.ObjectToID(hypLen1), "Local_Length_100")
+
+print "-------------------------- NumberOfSegments"
+hypNbSeg1= smesh.CreateHypothesis( "NumberOfSegments", "libStdMeshersEngine.so" )
+hypNbSeg1.SetNumberOfSegments(7)
+print hypNbSeg1.GetName()
+print hypNbSeg1.GetId()
+print hypNbSeg1.GetNumberOfSegments()
+
+smeshgui.SetName(salome.ObjectToID(hypNbSeg1), "NumberOfSegments_7")
+
+print "-------------------------- MaxElementArea"
+hypArea1 = smesh.CreateHypothesis( "MaxElementArea", "libStdMeshersEngine.so" )
+hypArea1.SetMaxElementArea(2500)
+print hypArea1.GetName()
+print hypArea1.GetId()
+print hypArea1.GetMaxElementArea()
+
+smeshgui.SetName(salome.ObjectToID(hypArea1), "MaxElementArea_2500")
+
+print "-------------------------- MaxElementArea"
+hypArea2 = smesh.CreateHypothesis( "MaxElementArea", "libStdMeshersEngine.so" )
+hypArea2.SetMaxElementArea(500)
+print hypArea2.GetName()
+print hypArea2.GetId()
+print hypArea2.GetMaxElementArea()
+
+smeshgui.SetName(salome.ObjectToID(hypArea2), "MaxElementArea_500")
+
+print "-------------------------- Regular_1D"
+algoReg = smesh.CreateHypothesis( "Regular_1D", "libStdMeshersEngine.so" )
+listHyp=algoReg.GetCompatibleHypothesis()
+for hyp in listHyp:
+    print hyp
+print algoReg.GetName()
+print algoReg.GetId()
+
+smeshgui.SetName(salome.ObjectToID(algoReg), "Regular_1D" )
+
+print "-------------------------- MEFISTO_2D"
+algoMef = smesh.CreateHypothesis( "MEFISTO_2D", "libStdMeshersEngine.so" )
+listHyp=algoMef.GetCompatibleHypothesis()
+for hyp in listHyp:
+    print hyp
+print algoMef.GetName()
+print algoMef.GetId()
+
+smeshgui.SetName(salome.ObjectToID(algoMef), "MEFISTO_2D" )
+
+# ---- add hypothesis to box
+
+print "-------------------------- add hypothesis to box"
+box=salome.IDToObject(idbox)
+mesh = smesh.CreateMesh(box)
+
+smeshgui.SetName( salome.ObjectToID(mesh), "MeshBox" );
+
+ret=mesh.AddHypothesis(box,algoReg)
+print ret
+ret=mesh.AddHypothesis(box,algoMef)
+print ret
+
+
+ret=mesh.AddHypothesis(box,hypNbSeg1)
+print ret
+ret=mesh.AddHypothesis(box,hypArea1)
+print ret
+
+
+# ---- add hypothesis to edge
+
+print "-------------------------- add hypothesis to edge"
+edge=salome.IDToObject(idedge)
+submesh=mesh.GetSubMesh(edge, "SubMeshEdge")
+
+ret=mesh.AddHypothesis(edge,algoReg)
+print ret
+ret=mesh.AddHypothesis(edge,hypLen1)
+print ret
+
+print "-------------------------- add hypothesis to face"
+face=salome.IDToObject(idface)
+submesh   = mesh.GetSubMesh(face, "SubMeshFace")
+
+ret=mesh.AddHypothesis(face,hypArea2)
+print ret
+
+smesh.Compute(mesh, box)
+sg.updateObjBrowser(1);
+
+print
+print "=============  Test  Supervisor  ============================="
+print
+
+comp = catalog.GetComponent("SUPERV")
+if comp is None:
+       raise RuntimeError,"Component SUPERV not found in Module Catalog."
+
+from SuperV import *
+import SALOMEDS
+myStudy = salome.myStudy
+myBuilder = myStudy.NewBuilder()
+
+SuperVision = lcc.FindOrLoadComponent("SuperVisionContainer","SUPERV")
+father = myStudy.FindComponent("SUPERV")
+if father is None:
+        father = myBuilder.NewComponent("SUPERV")
+        A1 = myBuilder.FindOrCreateAttribute(father, "AttributeName");
+        FName = A1._narrow(SALOMEDS.AttributeName)
+        FName.SetValue( salome.sg.getComponentUserName("SUPERV") )
+       A2 = myBuilder.FindOrCreateAttribute(father, "AttributePixMap");
+       aPixmap = A2._narrow(SALOMEDS.AttributePixMap);
+       aPixmap.SetPixMap( "ICON_OBJBROWSER_Supervision" );
+       myBuilder.DefineComponentInstance(father,SuperVision)
+
+def addStudy(ior):
+    dataflow = SuperVision.getStreamGraph(ior)
+    name=dataflow.Name()
+    itr = myStudy.NewChildIterator(father)
+    while itr.More():
+        item=itr.Value()
+        res,A=item.FindAttribute("AttributeName")
+        if res:
+            aName = A._narrow(SALOMEDS.AttributeName)
+            if aName.Value() == name :
+               print myBuilder.FindOrCreateAttribute(item, "AttributeIOR")
+               A  = myBuilder.FindOrCreateAttribute(item, "AttributeIOR")
+               print "A = ", A
+               if A is not None :
+                   #res,A = myBuilder.FindOrCreateAttribute(item, "AttributeIOR")
+                   anIOR  = A._narrow(SALOMEDS.AttributeIOR);
+                  print "anIOR.SetValue(dataflow.getIOR())"
+                  anIOR.SetValue(dataflow.getIOR()) 
+                return
+        itr.Next()
+    obj = myBuilder.NewObject(father)
+    A=myBuilder.FindOrCreateAttribute(obj, "AttributeName")
+    aName=A._narrow(SALOMEDS.AttributeName)
+    aName.SetValue(name)
+    A=myBuilder.FindOrCreateAttribute(obj, "AttributeIOR")
+    anIOR  = A._narrow(SALOMEDS.AttributeIOR)
+    anIOR.SetValue(dataflow.getIOR())
+
+import os
+dir= os.getenv("SUPERV_ROOT_DIR")
+if dir == None:
+       raise RuntimeError, "SUPERV_ROOT_DIR is not defined"
+xmlfile = dir +"/examples/GraphGeomEssai.xml"
+print "Load dataflow from the file : "
+print xmlfile
+print
+
+myGraph = StreamGraph ( xmlfile )
+
+# This DataFlow is "valid" : no loop, correct links between Nodes etc...
+print "myGraph.IsValid() = ", myGraph.IsValid()
+
+# Get Nodes
+myGraph.PrintNodes()
+
+# This DataFlow is "executable" : all pending Ports are defined with Datas
+print myGraph.IsExecutable()
+
+# Starts only execution of that DataFlow and gets control immediatly
+print myGraph.Run()
+
+# That DataFlow is running ==> 0 (false)
+print myGraph.IsDone()
+
+# Events of execution :
+aStatus,aNode,anEvent,aState = myGraph.Event()
+while aStatus :
+    print aNode.Thread(),aNode.SubGraph(),aNode.Name(),anEvent,aState
+    aStatus,aNode,anEvent,aState = myGraph.Event()
+print "myGraph.IsDone() = ",myGraph.IsDone()
+
+# Wait for Completion (but it is already done after event loop ...)
+print "Done : ",myGraph.DoneW()
+
+print " "
+#print "Type : print myGraph.IsDone()"
+#print "       If execution is finished ==> 1 (true)"
+res=myGraph.IsDone()
+if res != 1:
+       raise RuntimeError, "myGraph.Run() is not done"
+
+print " "
+print "Type : myGraph.PrintPorts()"
+print "       to see input and output values of the graph"
+myGraph.PrintPorts()
+
+# Export will create newsupervisionexample.xml and the corresponding .py file
+tmpdir=os.getenv("TmpDir")
+if tmpdir is None:
+       tmpdir="/tmp"
+file = tmpdir + "/newsupervisionexample"
+print "--------------\n"+file+"\n--------------\n"
+myGraph.Export(file)
+
+ior = salome.orb.object_to_string(myGraph.G)
+addStudy(ior)
+
+GraphName = myGraph.Name()
+print "Befor save ",
+#nodes = myGraph.Nodes()
+nodes = myGraph.G.Nodes().FNodes
+length_bs = len(nodes)
+print "ListOfNodes length = ", length_bs
+names=[]
+for node in nodes:
+       names.append(node.Name())
+print names
+
+# Graph creation 
+GraphInLines = StreamGraph( 'GraphInLines' )
+GraphInLines.SetName( 'GraphInLines' )
+GraphInLines.SetAuthor( '' )
+GraphInLines.SetComment( '' )
+GraphInLines.Coords( 0 , 0 )
+
+# Creation of InLine Nodes
+PyAdd = []
+PyAdd.append( 'def Add(a,b) :  ' )
+PyAdd.append( '    return a+b  ' )
+PyAdd.append( '' )
+Add = GraphInLines.INode( 'Add' , PyAdd )
+Add.InPort( 'a' , 'long' )
+Add.InPort( 'b' , 'long' )
+Add.OutPort( 'f' , 'long' )
+Add.SetName( 'Add' )
+Add.SetAuthor( '' )
+Add.SetComment( 'Python function' )
+Add.Coords( 351 , 77 )
+PySub = []
+PySub.append( 'def Sub(a,b) : ' )
+PySub.append( '    return a-b ' )
+PySub.append( '' )
+Sub = GraphInLines.INode( 'Sub' , PySub )
+Sub.InPort( 'a' , 'long' )
+Sub.InPort( 'b' , 'long' )
+Sub.OutPort( 'f' , 'long' )
+Sub.SetName( 'Sub' )
+Sub.SetAuthor( '' )
+Sub.SetComment( 'Python function' )
+Sub.Coords( 86 , 333 )
+PyMul = []
+PyMul.append( 'def Mul(a,b) : ' )
+PyMul.append( '    return a*b ' )
+Mul = GraphInLines.INode( 'Mul' , PyMul )
+Mul.InPort( 'a' , 'long' )
+Mul.InPort( 'b' , 'long' )
+Mul.OutPort( 'Result' , 'long' )
+Mul.SetName( 'Mul' )
+Mul.SetAuthor( '' )
+Mul.SetComment( 'Python function' )
+Mul.Coords( 616 , 247 )
+
+# Creation of intermediate Output variables and of Control Links
+Addf = Add.Port( 'f' )
+Mula = GraphInLines.Link( Addf , Mul.Port( 'a' ) )
+Mula.AddCoord( 1 , 570 , 356 )
+Mula.AddCoord( 2 , 570 , 186 )
+Subf = Sub.Port( 'f' )
+Mulb = GraphInLines.Link( Subf , Mul.Port( 'b' ) )
+Mulb.AddCoord( 1 , 282 , 376 )
+Mulb.AddCoord( 2 , 282 , 442 )
+Addb = GraphInLines.Link( Subf , Add.Port( 'b' ) )
+Addb.AddCoord( 1 , 283 , 209 )
+Addb.AddCoord( 2 , 283 , 374 )
+Addb.AddCoord( 3 , 283 , 442 )
+
+# Creation of Input datas
+Adda = Add.Input( 'a' , 1)
+Suba = Sub.Input( 'a' , 3)
+Subb = Sub.Input( 'b' , 4)
+
+# Creation of Output variables
+MulResult = Mul.Port( 'Result' )
+
+GraphInLines.Run()
+
+GraphInLines.DoneW()
+
+GraphInLines.PrintPorts()
+
+sg.updateObjBrowser(1);
+
+print
+print "=============  Test  VISU  and MED ============================="
+print
+
+comp = catalog.GetComponent("VISU")
+if comp is None:
+       raise RuntimeError,"Component VISU not found in Module Catalog."
+
+import sys
+import SALOMEDS
+import SALOME
+import SALOME_MED
+import VISU
+
+import visu_gui
+
+medFileName = "pointe.med"
+medFile = os.getenv('KERNEL_ROOT_DIR') + '/examples/' + medFileName
+print "Load ", medFile
+
+studyCurrent = salome.myStudyName
+
+med_comp = salome.lcc.FindOrLoadComponent("FactoryServer", "MED")
+myVisu = salome.lcc.FindOrLoadComponent("FactoryServer", "VISU")
+
+try:
+    if os.access(medFile, os.R_OK) :
+       if not os.access(medFile, os.W_OK) :
+              import random
+              medFileNew = "/tmp/" + str(random.randint(0,1000000)) + "_" + medFileName
+              print " -- Copy " + medFile + " to " + medFileNew
+              os.system("cp "+ medFile + " " + medFileNew)
+              medFile = medFileNew
+              os.system("chmod 755 " + medFile)
+
+       if os.access(medFile, os.W_OK) :
+           med_comp.readStructFileWithFieldType(medFile,studyCurrent)
+           med_obj = visu_gui.visu.getMedObjectFromStudy()
+           print "med_obj - ", med_obj
+
+           myField1 = visu_gui.visu.getFieldObjectFromStudy(2,1)
+           aMeshName = "maa1"
+           anEntity = VISU.NODE
+          aTimeStampId = -1
+                  
+           myResult1 = myVisu.ImportMedField(myField1)
+           aMesh1 = myVisu.MeshOnEntity(myResult1, aMeshName, anEntity);
+           
+          aScalarMap1= myVisu.ScalarMapOnField(myResult1, aMeshName, anEntity, myField1.getName(), aTimeStampId)
+          
+          myResult2 = myVisu.ImportFile(medFile);
+          aMesh2 = myVisu.MeshOnEntity(myResult2, aMeshName, anEntity);
+           
+          aTimeStampId = 3
+          aScalarMap2= myVisu.ScalarMapOnField(myResult2, aMeshName, anEntity, myField1.getName(), aTimeStampId)
+                  
+          sg.updateObjBrowser(0)
+       else :  print "We have no permission to rewrite medFile, so readStructFileWithFieldType can't open this file";
+    else :  print  "We have no permission to read medFile, it will not be opened"; 
+
+except:
+    if sys.exc_type == SALOME.SALOME_Exception :
+        print "There is no permission to read " + medFile
+    else :
+        print sys.exc_type 
+        print sys.exc_value
+        print sys.exc_traceback
+
+sg.updateObjBrowser(1);
diff --git a/src/SALOME_SWIG_WITHOUTIHM/supervisionexample.py.in b/src/SALOME_SWIG_WITHOUTIHM/supervisionexample.py.in
new file mode 100755 (executable)
index 0000000..0e209a0
--- /dev/null
@@ -0,0 +1,86 @@
+#==============================================================================
+#  File      : supervisionexample.py
+#  Created   : 23 nov 2001
+#  Author    : Jean Rahuel
+#  Project   : SALOME
+#  Copyright : CEA
+#==============================================================================
+
+from SuperV import *
+
+
+
+# load this object with Nodes, Links and Datas stored in GraphEssai.xml
+# (GraphEssai.xml was created with python in SuperVisionTest and GraphEssai.py)
+myGraph = Graph("@ROOT_BUILDDIR@/share/salome/resources/GraphEssai.xml")
+
+#myGraph = Graph("/home/data/jr_HEAD/build/share/salome/resources/GraphEssai.xml")
+# This DataFlow is "valid" : no loop, correct links between Nodes etc...
+
+print myGraph.IsValid()
+
+# Get Nodes
+myGraph.PrintNodes()
+Add,Sub,Mul,Div = myGraph.Nodes()
+
+# Load Datas
+Addx = Add.Input("x",3.)
+Addy = Add.Input("y",4.5)
+Subx = Sub.Input("x",1.5)
+
+# Get Output Port
+Addz = Add.Port('z')
+Subz = Sub.Port('z')
+Mulz = Mul.Port('z')
+Divz = Div.Port('z')
+
+# This DataFlow is "executable" : all pending Ports are defined with Datas
+print myGraph.IsExecutable()
+
+# Starts only execution of that DataFlow and gets control immediatly
+print myGraph.Run()
+
+# That DataFlow is running ==> 0 (false)
+print myGraph.IsDone()
+
+# Events of execution :
+aStatus,aNode,anEvent,aState = myGraph.Event()
+while aStatus :
+    print aNode.Thread(),aNode.SubGraph(),aNode.Name(),anEvent,aState
+    aStatus,aNode,anEvent,aState = myGraph.Event()
+print myGraph.IsDone()
+
+# Wait for Completion (but it is already done after event loop ...)
+print "Done : ",myGraph.DoneW()
+
+# Get result
+print "Result : ",Divz.ToString()
+
+# Intermediate results :
+print "Intermediate Result Add\z : ",Addz.ToString()
+print "Intermediate Result Sub\z : ",Subz.ToString()
+print "Intermediate Result Mul\z : ",Mulz.ToString()
+
+print " "
+print "Type : print myGraph.IsDone()"
+print "       If execution is finished ==> 1 (true)"
+print " "
+print "Type : print Divz.ToString()"
+print "       You will get the result"
+print " "
+print "Type : myGraph.PrintPorts()"
+print "       to see input and output values of the graph"
+print " "
+print "Type : Add.PrintPorts()"
+print "Type : Sub.PrintPorts()"
+print "Type : Mul.PrintPorts()"
+print "Type : Div.PrintPorts()"
+print "       to see input and output values of nodes"
+
+# Export will create newsupervisionexample.xml and the corresponding .py file
+print myGraph.Export("@ROOT_BUILDDIR@/share/salome/resources/newsupervisionexample.xml")
+
+print " "
+print "See file @ROOT_BUILDDIR@/share/salome/resources/newsupervisionexample.xml"
+print "See file @ROOT_BUILDDIR@/share/salome/resources/newsupervisionexample.py"
+
diff --git a/src/SALOME_SWIG_WITHOUTIHM/supervisiongeomexample.py.in b/src/SALOME_SWIG_WITHOUTIHM/supervisiongeomexample.py.in
new file mode 100755 (executable)
index 0000000..fb29bf0
--- /dev/null
@@ -0,0 +1,102 @@
+# Generated python file of Graph GraphGeom2Essai
+
+from SuperV import *
+
+import salome
+
+import geompy
+
+
+geom = lcc.FindOrLoadComponent("FactoryServer", "Geometry")
+geom.GetCurrentStudy(salome.myStudyId)
+
+myBuilder = salome.myStudy.NewBuilder()
+
+# Graph creation 
+GraphGeom2Essai = Graph( 'GraphGeom2Essai' )
+print GraphGeom2Essai.SetAuthor( '' )
+print GraphGeom2Essai.SetComment( '' )
+GraphGeom2Essai.Coords( 0 , 0 )
+
+# Creation of Nodes
+MakeSphere = GraphGeom2Essai.Node( 'Geometry' , 'Geometry' , 'MakeSphere' )
+print MakeSphere.SetAuthor( '' )
+print MakeSphere.SetContainer( 'FactoryServer' )
+print MakeSphere.SetComment( '' )
+MakeSphere.Coords( 26 , 13 )
+MakeCopy = GraphGeom2Essai.Node( 'Geometry' , 'Geometry' , 'MakeCopy' )
+print MakeCopy.SetAuthor( '' )
+print MakeCopy.SetContainer( 'FactoryServer' )
+print MakeCopy.SetComment( '' )
+MakeCopy.Coords( 219 , 12 )
+MakeTranslation = GraphGeom2Essai.Node( 'Geometry' , 'Geometry' , 'MakeTranslation' )
+print MakeTranslation.SetAuthor( '' )
+print MakeTranslation.SetContainer( 'FactoryServer' )
+print MakeTranslation.SetComment( '' )
+MakeTranslation.Coords( 219 , 159 )
+MakeFuse = GraphGeom2Essai.Node( 'Geometry' , 'Geometry' , 'MakeFuse' )
+print MakeFuse.SetAuthor( '' )
+print MakeFuse.SetContainer( 'FactoryServer' )
+print MakeFuse.SetComment( '' )
+MakeFuse.Coords( 465 , 106 )
+
+# Creation of intermediate Output variables and of links
+MakeSphereshape = MakeSphere.Port( 'shape' )
+MakeCopyshape1 = GraphGeom2Essai.Link( MakeSphereshape , MakeCopy.Port( 'shape1' ) )
+MakeTranslationshape1 = GraphGeom2Essai.Link( MakeSphereshape , MakeTranslation.Port( 'shape1' ) )
+MakeCopyshape = MakeCopy.Port( 'shape' )
+MakeFuseshape1 = GraphGeom2Essai.Link( MakeCopyshape , MakeFuse.Port( 'shape1' ) )
+MakeTranslationshape = MakeTranslation.Port( 'shape' )
+MakeFuseshape2 = GraphGeom2Essai.Link( MakeTranslationshape , MakeFuse.Port( 'shape2' ) )
+
+# Creation of Input datas
+MakeSpherex1 = MakeSphere.Input( 'x1' , 0)
+MakeSpherey1 = MakeSphere.Input( 'y1' , 0)
+MakeSpherez1 = MakeSphere.Input( 'z1' , 0)
+MakeSphereradius = MakeSphere.Input( 'radius' , 50)
+MakeTranslationx1 = MakeTranslation.Input( 'x1' , 80)
+MakeTranslationy1 = MakeTranslation.Input( 'y1' , 0)
+MakeTranslationz1 = MakeTranslation.Input( 'z1' , 0)
+
+# Missing Input datas : None
+
+# Creation of Output variables
+MakeFuseshape = MakeFuse.Port( 'shape' )
+
+# State of Ports of the Graph
+GraphGeom2Essai.PrintPorts()
+
+# Start asynchronous run
+print GraphGeom2Essai.Run()
+
+# Done ?
+print GraphGeom2Essai.IsDone()
+
+# Events of execution :
+aStatus,aNode,anEvent,aState = GraphGeom2Essai.Event()
+while aStatus :
+    print aNode.Thread(),aNode.SubGraph(),aNode.Name(),anEvent,aState
+    aStatus,aNode,anEvent,aState = GraphGeom2Essai.Event()
+print GraphGeom2Essai.IsDone()
+
+# Waiting end of execution :
+print GraphGeom2Essai.DoneW()
+
+print " "
+print "Type print GraphGeom2Essai.IsDone()"
+print "1 <==> It's done"
+print " "
+print "Type print GraphGeom2Essai.DoneW()"
+print "Wait until end of execution : 1(success)"
+print " "
+print "Type GraphGeom2Essai.PrintPorts()"
+print "     to see input and output values of the graph"
+print " "
+print "Type MakeSphere.PrintPorts()"
+print "Type MakeCopy.PrintPorts()"
+print "Type MakeTranslation.PrintPorts()"
+print "Type MakeFuse.PrintPorts()"
+print "     to see input and output values of nodes"
+print " "
+print "Type print GraphGeom2Essai.Export('File-Name')"
+print "You will get a .py and a .xml file of this graph"
diff --git a/src/SALOME_SWIG_WITHOUTIHM/test_big_table.py b/src/SALOME_SWIG_WITHOUTIHM/test_big_table.py
new file mode 100755 (executable)
index 0000000..689567e
--- /dev/null
@@ -0,0 +1,54 @@
+#  Copyright (C) 2003  CEA/DEN, EDF R&D
+#
+#
+#
+#  File   : test_big_table.py
+#  Author : Vadim SANDLER
+#  Module : SALOME
+#  $Header$
+
+import salome
+import math
+import SALOMEDS
+
+# >>> Getting study builder ==================================================
+myStudy = salome.myStudy
+myBuilder = myStudy.NewBuilder()
+
+# >>> Creating virtual component =============================================
+myComponent = myStudy.FindComponent("VirtualComponent")
+if not myComponent:
+   myComponent = myBuilder.NewComponent("VirtualComponent")
+   aName = myBuilder.FindOrCreateAttribute(myComponent, "AttributeName")
+   aName.SetValue("VirtualComponent")
+
+# >>> Creating object with Table of real[ 200 * 20 ] ========================
+myTRealObject = myBuilder.NewObject(myComponent)
+AName = myBuilder.FindOrCreateAttribute(myTRealObject, "AttributeName")
+AName.SetValue("Table Of Real")
+ARealTable = myBuilder.FindOrCreateAttribute(myTRealObject, "AttributeTableOfReal")
+myHorNb = 10
+myVerNb = 200
+
+k={}
+for j in range(0,myHorNb):
+   k[j] = j*10+1
+ARealTable.AddRow(k.values())
+ARealTable.SetRowTitle(1, "Frequency")
+ARealTable.SetRowUnit(1, "Hz")
+
+for i in range(1,myVerNb+1):
+   for j in range(0,myHorNb):
+      if j % 2 == 1:
+         k[j] = math.log10(j*30*math.pi/180) * 20 + i * 15 + j*5
+      else:
+         k[j] = math.sin(j*30*math.pi/180) * 20 + i * 15 + j*5 
+   ARealTable.AddRow(k.values())
+   ARealTable.SetRowTitle(i+1, "Power " + str(i))
+   ARealTable.SetRowUnit(i+1, "Wt")
+ARealTable.SetTitle("Very useful data")
+
+# >>> Updating Object Browser ================================================
+salome.sg.updateObjBrowser(1)
+
+# ============================================================================
diff --git a/src/SALOME_SWIG_WITHOUTIHM/test_many_objects.py b/src/SALOME_SWIG_WITHOUTIHM/test_many_objects.py
new file mode 100755 (executable)
index 0000000..aa1f4f5
--- /dev/null
@@ -0,0 +1,73 @@
+#  Copyright (C) 2003  CEA/DEN, EDF R&D
+#
+#
+#
+#  File   : visu_many_objects.py
+#  Author : Vadim SANDLER
+#  Module : SALOME
+#  $Header$
+
+import salome
+import SALOMEDS
+
+# >>> Getting study builder ==================================================
+myStudy = salome.myStudy
+myBuilder = myStudy.NewBuilder()
+
+# >>> Creating virtual component =============================================
+myComponent = myBuilder.NewComponent("VIRTUAL")
+AName = myBuilder.FindOrCreateAttribute(myComponent, "AttributeName")
+AName.SetValue("Virtual")
+ACmt = myBuilder.FindOrCreateAttribute(myComponent, "AttributeComment")
+ACmt.SetValue("Virtual")
+
+# >>> Creating objects =======================================================
+# TO CHANGE TOTAL NUMBER OF OBJECTS, SET PROPER <myNb1>, <myNb2>, <myNb3>
+# IF YOU DON'T WANT TO ADD REFERENCES, SET <myAddRef> = 0
+myNb1 = 20
+myNb2 = 5
+myNb3 = 3
+myAddRef = 1
+
+if myAddRef == 1:
+    myContainer =  myBuilder.NewObject(myComponent)
+    AName = myBuilder.FindOrCreateAttribute(myContainer, "AttributeName")
+    AName.SetValue("References")
+    ACmt = myBuilder.FindOrCreateAttribute(myContainer, "AttributeComment")
+    ACmt.SetValue("Container for objects")
+
+for i in range(0,myNb1):
+    myObject1 = myBuilder.NewObject(myComponent)
+    AName = myBuilder.FindOrCreateAttribute(myObject1, "AttributeName")
+    AName.SetValue("Object "+str(i))
+    ACmt = myBuilder.FindOrCreateAttribute(myObject1, "AttributeComment")
+    ACmt.SetValue("Virtual object "+str(i))
+    if myAddRef == 1:
+        myRefObject = myBuilder.NewObject(myContainer)
+        myBuilder.Addreference(myRefObject,myObject1);
+
+    for j in range(0,myNb2):
+        myObject2 = myBuilder.NewObject(myObject1)
+        AName = myBuilder.FindOrCreateAttribute(myObject2, "AttributeName")
+        AName.SetValue("Object "+str(i)+"-"+str(j))
+        ACmt = myBuilder.FindOrCreateAttribute(myObject2, "AttributeComment")
+        ACmt.SetValue("Virtual object "+str(i)+"-"+str(j))
+        if myAddRef == 1:
+            myRefObject = myBuilder.NewObject(myContainer)
+            myBuilder.Addreference(myRefObject,myObject2);
+
+        for k in range(0,myNb3):
+            myObject3 = myBuilder.NewObject(myObject2)
+            AName = myBuilder.FindOrCreateAttribute(myObject3, "AttributeName")
+            AName.SetValue("Object "+str(i)+"-"+str(j)+"-"+str(k))
+            ACmt = myBuilder.FindOrCreateAttribute(myObject3, "AttributeComment")
+            ACmt.SetValue("Virtual object "+str(i)+"-"+str(j)+"-"+str(k))
+            if myAddRef == 1:
+                myRefObject = myBuilder.NewObject(myContainer)
+                myBuilder.Addreference(myRefObject,myObject3);
+
+# >>> Updating Object Browser ================================================
+salome.sg.updateObjBrowser(1)
+
+# ============================================================================
+
diff --git a/src/SALOME_SWIG_WITHOUTIHM/test_remove_ref.py b/src/SALOME_SWIG_WITHOUTIHM/test_remove_ref.py
new file mode 100644 (file)
index 0000000..47fbada
--- /dev/null
@@ -0,0 +1,48 @@
+#  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library 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
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+#
+#
+#
+#  File   : test_remove_ref.py
+#  Module : SALOMEDS     
+
+from salome import *
+
+myBuilder = myStudy.NewBuilder()
+
+
+obj1 = myStudy.FindObjectID("0:1")
+if obj1 is None: print "Is null obj1 "
+else: print obj1.GetID()
+
+obj2 = myBuilder.NewObject(obj1)
+print "Obj2 ID = "+obj2.GetID()
+
+myBuilder.Addreference(obj1, obj2)
+
+(f, obj3) = obj1.ReferencedObject()
+
+print "Ref obj ID = "+obj3.GetID()
+
+
+myBuilder.RemoveReference(obj1)
+
+(f, obj4) = obj1.ReferencedObject()
+
+print "Ref is found ", f
diff --git a/src/SALOME_SWIG_WITHOUTIHM/test_table.py b/src/SALOME_SWIG_WITHOUTIHM/test_table.py
new file mode 100755 (executable)
index 0000000..2b7204e
--- /dev/null
@@ -0,0 +1,99 @@
+#  Copyright (C) 2003  CEA/DEN, EDF R&D
+#
+#
+#
+#  File   : test_table.py
+#  Author : Vadim SANDLER
+#  Module : SALOME
+#  $Header$
+
+import salome
+import math
+import SALOMEDS
+
+# >>> Getting study builder ==================================================
+myStudy = salome.myStudy
+myBuilder = myStudy.NewBuilder()
+
+# >>> Creating virtual component =============================================
+myComponent = myStudy.FindComponent("VirtualComponent")
+if not myComponent:
+   myComponent = myBuilder.NewComponent("VirtualComponent")
+   aName = myBuilder.FindOrCreateAttribute(myComponent, "AttributeName")
+   aName.SetValue("VirtualComponent")
+
+# >>> Creating object with Table of integer ==================================
+myTIntObject = myBuilder.NewObject(myComponent)
+AName = myBuilder.FindOrCreateAttribute(myTIntObject, "AttributeName")
+AName.SetValue("Table Of Integer")
+AIntTable = myBuilder.FindOrCreateAttribute(myTIntObject, "AttributeTableOfInteger")
+
+a=[1,2,3,4,5,6,7,8,9,10]
+AIntTable.AddRow(a)
+a=[110,120,130,140,150,160,170,180,190,200]
+AIntTable.AddRow(a)
+a=[-1,272,0,0,-642,10000,13,578,-578,99]
+AIntTable.AddRow(a)
+AIntTable.SetTitle("TEST table of integer")
+AIntTable.SetRowTitle(1,"FR")
+AIntTable.SetRowUnit(1,"m/h")
+AIntTable.SetRowTitle(2,"SR")
+AIntTable.SetRowUnit(2,"s")
+AIntTable.SetRowTitle(3,"TR")
+AIntTable.SetRowUnit(3,"$")
+c=["C1","C2","C3","C4","C5","C6","C7","C8","C9","C10"]
+AIntTable.SetColumnTitles(c)
+
+# >>> Creating object with Table of real =====================================
+myTRealObject = myBuilder.NewObject(myComponent)
+AName = myBuilder.FindOrCreateAttribute(myTRealObject, "AttributeName")
+AName.SetValue("Table Of Real")
+ARealTable = myBuilder.FindOrCreateAttribute(myTRealObject, "AttributeTableOfReal")
+
+k={}
+l={}
+for j in range(0,20):
+   k[j] = j*10+1
+   l[j] = "C"+str(j+1)
+ARealTable.AddRow(k.values())
+ARealTable.SetRowTitle(1, "Row 0")
+ARealTable.SetRowUnit(1, "Hz")
+ARealTable.SetColumnTitles(l.values())
+for i in range(1,11):
+   for j in range(1,21):
+      if j % 2 == 1:
+         k[j] = math.log10(j*30*math.pi/180) * 20 + i * 15 + j*5
+      else:
+         k[j] = math.sin(j*30*math.pi/180) * 20 + i * 15 + j*5 
+   ARealTable.AddRow(k.values())
+   ARealTable.SetRowTitle(i+1, "Row " + str(i))
+   ARealTable.SetRowUnit(i+1, "Wt")
+ARealTable.SetTitle("TEST table of real")
+
+# >>> Creating object with integer attribute =================================
+myIntObject = myBuilder.NewObject(myComponent)
+AName = myBuilder.FindOrCreateAttribute(myIntObject, "AttributeName")
+AName.SetValue("Integer")
+AInt = myBuilder.FindOrCreateAttribute(myIntObject, "AttributeInteger")
+AInt.SetValue(123)
+
+# >>> Creating object with real attribute ====================================
+myRealObject = myBuilder.NewObject(myComponent)
+AName = myBuilder.FindOrCreateAttribute(myRealObject, "AttributeName")
+AName.SetValue("Real")
+AReal = myBuilder.FindOrCreateAttribute(myRealObject, "AttributeReal")
+AReal.SetValue(-56.9634)
+
+# >>> Creating object with comment attribute =================================
+myCmtObject = myBuilder.NewObject(myComponent)
+AName = myBuilder.FindOrCreateAttribute(myCmtObject, "AttributeName")
+AName.SetValue("Comment")
+ACmt = myBuilder.FindOrCreateAttribute(myCmtObject, "AttributeComment")
+ACmt.SetValue("Just a comment")
+
+# >>> Updating Object Browser ================================================
+salome.sg.updateObjBrowser(1)
+
+# ============================================================================
+
+
diff --git a/src/SALOME_SWIG_WITHOUTIHM/testattr.py b/src/SALOME_SWIG_WITHOUTIHM/testattr.py
new file mode 100755 (executable)
index 0000000..ce38168
--- /dev/null
@@ -0,0 +1,109 @@
+#  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+# 
+#  This library is free software; you can redistribute it and/or 
+#  modify it under the terms of the GNU Lesser General Public 
+#  License as published by the Free Software Foundation; either 
+#  version 2.1 of the License. 
+# 
+#  This library 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 
+#  Lesser General Public License for more details. 
+# 
+#  You should have received a copy of the GNU Lesser General Public 
+#  License along with this library; if not, write to the Free Software 
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+# 
+#  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+#
+#
+#
+#  File   : testattr.py
+#  Module : SALOME
+
+import SALOMEDS
+#import SALOMEDS_Attributes_idl
+import geompy
+import salome
+# ===============================================================
+
+# creating new object ===========================================
+obj = geompy.myBuilder.NewObject(geompy.father)
+
+# adding Name attribute =========================================
+A1 = geompy.myBuilder.FindOrCreateAttribute(obj,"AttributeName")
+name = A1._narrow(SALOMEDS.AttributeName)
+name.SetValue("First Object")
+
+# adding Comment attribute ======================================
+A2 = geompy.myBuilder.FindOrCreateAttribute(obj,"AttributeComment")
+comment = A2._narrow(SALOMEDS.AttributeComment)
+comment.SetValue("This is Comment attribute")
+
+# adding IOR attribute ==========================================
+#A3 = geompy.myBuilder.FindOrCreateAttribute(obj,"AttributeIOR")
+# ...
+
+# adding integer attribute ======================================
+A4 = geompy.myBuilder.FindOrCreateAttribute(obj,"AttributeInteger")
+integer = A4._narrow(SALOMEDS.AttributeInteger)
+integer.SetValue(12)
+
+# adding real attribute =========================================
+A5 = geompy.myBuilder.FindOrCreateAttribute(obj,"AttributeReal")
+real = A5._narrow(SALOMEDS.AttributeReal)
+real.SetValue(0.25)
+
+# adding sequence of integer attribute ==========================
+A6 = geompy.myBuilder.FindOrCreateAttribute(obj,"AttributeSequenceOfInteger")
+intseq = A6._narrow(SALOMEDS.AttributeSequenceOfInteger)
+intseq.Add(1)
+intseq.Add(2)
+intseq.Add(3)
+
+
+# adding sequence of real attribute =============================
+A7 = geompy.myBuilder.FindOrCreateAttribute(obj,"AttributeSequenceOfReal")
+realseq = A7._narrow(SALOMEDS.AttributeSequenceOfReal)
+realseq.Add(0.001)
+realseq.Add(0.002)
+realseq.Add(0.003)
+
+# adding PersistentRef attribute ================================
+#A8 = geompy.myBuilder.FindOrCreateAttribute(obj,"AttributePersistentRef")
+# ...
+
+# adding Drawable attribute =====================================
+A9 = geompy.myBuilder.FindOrCreateAttribute(obj,"AttributeDrawable")
+drawable = A9._narrow(SALOMEDS.AttributeDrawable)
+drawable.SetDrawable(1)
+
+# adding Selectable attribute ===================================
+#A10 = geompy.myBuilder.FindOrCreateAttribute(obj,"AttributeSelectable")
+# ...
+
+# adding Expandable attribute ===================================
+#A11 = geompy.myBuilder.FindOrCreateAttribute(obj,"AttributeExpandable")
+# ...
+
+# adding Opened attribute =======================================
+#A12 = geompy.myBuilder.FindOrCreateAttribute(obj,"AttributeOpened")
+# ...
+
+# adding TextColor attribute ====================================
+A13 = geompy.myBuilder.FindOrCreateAttribute(obj,"AttributeTextColor")
+textcolor = A13._narrow(SALOMEDS.AttributeTextColor)
+
+# ...
+
+# adding TextHighlightColor of real attribute ===================
+#A14 = geompy.myBuilder.FindOrCreateAttribute(obj,"AttributeTextHighlightColor")
+# ...
+
+# adding PixMap of real attribute ===============================
+#A15 = geompy.myBuilder.FindOrCreateAttribute(obj,"AttributePixMap")
+# ...
+
+# opening OCAF Browser ==========================================
+# result = salome.myStudy.OCAFBrowser()
index c78fb6763ea9946b4b5499c6360e8f57563ebcf1..33d3440a3e61cb287b6fc9b6a485cee02256088b 100644 (file)
@@ -198,7 +198,7 @@ int main(int argc, char **argv)
              }
            catch(std::exception& e)
              {
-               INFOS("run(): An exception has been caught");
+               INFOS("run(): An exception has been caught " <<e.what() );
                QApplication::restoreOverrideCursor();
                QAD_MessageBox::error1 ( (QWidget*)QAD_Application::getDesktop(),
                                        QObject::tr("ERR_ERROR"), 
index 4e07ddf04dfa69d748997bee0ab9ef7791bf1c49..81d646b6069826aa1d8cdc2ec0c08ec34cc6fc8b 100644 (file)
@@ -25,6 +25,9 @@
 
 #include <sys/time.h>
 #include <stdlib.h>
+
+#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
+
 using namespace std;
 
 //============================================================================
@@ -249,7 +252,6 @@ SALOMEDS_Tool::PutStreamToFiles(const SALOMEDS::TMPFile& theStream,
 
   if(aBuffer == NULL) return NULL;
 
-  long aBufferSize = theStream.length();
   long aFileSize, aCurrentPos = 4;
   int i, aFileNameSize, aNbFiles = 0;
 
@@ -310,3 +312,102 @@ std::string SALOMEDS_Tool::GetDirFromPath(const char* thePath) {
   aDirString.ChangeAll('|','/');
   return aDirString.ToCString();
 }
+
+//=======================================================================
+// name    : GetFlag
+// Purpose : Retrieve specified flaf from "AttributeFlags" attribute
+//=======================================================================
+bool SALOMEDS_Tool::GetFlag( const int             theFlag,
+                             SALOMEDS::Study_var   theStudy,
+                             SALOMEDS::SObject_var theObj )
+{
+  SALOMEDS::GenericAttribute_var anAttr;
+  if ( !theObj->_is_nil() && theObj->FindAttribute( anAttr, "AttributeFlags" ) )
+  {
+    SALOMEDS::AttributeFlags_var aFlags = SALOMEDS::AttributeFlags::_narrow( anAttr );
+    return aFlags->Get( theFlag );
+  }
+
+  return false;
+}
+
+//=======================================================================
+// name    : SetFlag
+// Purpose : Set/Unset specified flaf from "AttributeFlags" attribute
+//=======================================================================
+bool SALOMEDS_Tool::SetFlag( const int           theFlag,
+                             SALOMEDS::Study_var theStudy,
+                             const char*         theEntry,
+                             const bool          theValue )
+{
+  SALOMEDS::SObject_var anObj = theStudy->FindObjectID( theEntry );
+
+  if ( !anObj->_is_nil() )
+  {
+    SALOMEDS::GenericAttribute_var aGAttr;
+    if ( anObj->FindAttribute( aGAttr, "AttributeFlags" ) )
+    {
+      SALOMEDS::AttributeFlags_var anAttr = SALOMEDS::AttributeFlags::_narrow( aGAttr );
+      anAttr->Set( theFlag, theValue );
+    }
+    else if ( theValue )
+    {
+      SALOMEDS::StudyBuilder_var aBuilder = theStudy->NewBuilder();
+      SALOMEDS::AttributeFlags_var anAttr = SALOMEDS::AttributeFlags::_narrow(
+        aBuilder->FindOrCreateAttribute( anObj, "AttributeFlags" ) );
+      anAttr->Set( theFlag, theValue );
+    }
+    return true;
+  }
+
+  return false;
+}
+
+//=======================================================================
+// name    : getAllChildren
+// Purpose : Get all children of object.
+//           If theObj is null all objects of study are returned
+//=======================================================================
+void SALOMEDS_Tool::GetAllChildren( SALOMEDS::Study_var               theStudy,
+                                    SALOMEDS::SObject_var             theObj,
+                                    std::list<SALOMEDS::SObject_var>& theList )
+{
+  if ( theObj->_is_nil() )
+  {
+    SALOMEDS::SComponentIterator_var anIter = theStudy->NewComponentIterator();
+    for ( ; anIter->More(); anIter->Next() )
+    {
+      SALOMEDS::SObject_var anObj = SALOMEDS::SObject::_narrow( anIter->Value() );
+      if ( !anObj->_is_nil() )
+      {
+        theList.push_back( anObj );
+        GetAllChildren( theStudy, anObj, theList );
+      }
+    }
+  }
+  else
+  {
+    SALOMEDS::ChildIterator_var anIter = theStudy->NewChildIterator( theObj );
+    for ( ; anIter->More(); anIter->Next() )
+    {
+      SALOMEDS::SObject_var anObj = anIter->Value();
+      SALOMEDS::SObject_var aRef;
+      if ( !anObj->ReferencedObject( aRef ) )
+      {
+        theList.push_back( anObj );
+        GetAllChildren( theStudy, anObj, theList );
+      }
+    }
+  }
+}
+
+
+
+
+
+
+
+
+
+
+
index fed29bf5509497fe361eaf8044f79631aad5ac7c..ecc4df6bc53b9840a16f8e52b7eb22f28146cb78 100644 (file)
@@ -10,7 +10,8 @@
 #ifndef __SALOMEDS_Tool_H__
 #define __SALOMEDS_Tool_H__
 
-#include <string> 
+#include <string>
+#include <list> 
 
 // IDL headers
 #include "SALOMEconfig.h"
@@ -50,5 +51,41 @@ public:
   // for an example: if thePath = "/tmp/aaa/doc1.hdf" the function returns "/tmp/aaa"
   static std::string GetDirFromPath(const char* thePath);
 
+  // Retrieves specified flaf from "AttributeFlags" attribute
+  static bool GetFlag( const int             theFlag,
+                       SALOMEDS::Study_var   theStudy,
+                       SALOMEDS::SObject_var theObj );
+
+  // Sets/Unsets specified flaf from "AttributeFlags" attribute
+  static bool SetFlag( const int           theFlag,
+                       SALOMEDS::Study_var theStudy,
+                       const char*         theEntry,
+                       const bool          theValue );
+
+  // Get all children of object. If theObj is null all objects of study are returned
+  static void GetAllChildren( SALOMEDS::Study_var               theStudy,
+                              SALOMEDS::SObject_var             theObj,
+                              std::list<SALOMEDS::SObject_var>& theList );
+
 };
 #endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
index 03a9868616a7cce1ac8bec39c861edc387baa91f..73a914c7f129b2700f886db4d357c150ab462e5b 100644 (file)
@@ -35,7 +35,7 @@ VPATH=.:@srcdir@:@top_srcdir@/idl
 @COMMENCE@
 
 # header files 
-EXPORT_HEADERS=
+EXPORT_HEADERS = ToolsGUI.h
 
 # .po files to transform in .qm
 PO_FILES = \
@@ -48,10 +48,10 @@ LIB = libToolsGUI.la
 LIB_SRC = ToolsGUI.cxx \
          ToolsGUI_CatalogGeneratorDlg.cxx
 
-LIB_MOC = ToolsGUI_moc.cxx \
-         ToolsGUI_CatalogGeneratorDlg_moc.cxx
+LIB_MOC = ToolsGUI_CatalogGeneratorDlg_moc.cxx
 
-LIB_CLIENT_IDL = SALOME_Exception.idl
+LIB_CLIENT_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl \
+                 SALOME_Component.idl SALOME_Exception.idl 
 
 # additionnal information to compil and link file
 
index 7e98ad7b18f263ca97ddd501adfec5a1e483795e..eb0b26b8577521f57a2e069f7f18653f175d1084 100644 (file)
 #include "utilities.h"
 
 #include <stdlib.h>
+
+#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
+
 using namespace std;
 
+//============================================================================
+// function : runCommand
+// purpose  : Run command
+//============================================================================
 int ToolsGUI::runCommand(string & arg)
 { 
   int res;
-  res = system(arg.c_str());
+  res = system( arg.c_str() );
  
-  if (res == -1)
-    MESSAGE("fork failed (system command result = 0x" << hex << res << ")" << dec
+  if ( res == -1 )
+    MESSAGE( "fork failed (system command result = 0x" << hex << res << ")" << dec 
   else
-    if (res == 217)
-      MESSAGE("shell exec failed (system command result = 0x" << hex << res << ")" << dec)
-       
+    if ( res == 217 )
+      MESSAGE( "shell exec failed (system command result = 0x" << hex << res << ")" << dec )
   return res;
 }
 
-bool ToolsGUI::OnGUIEvent(int theCommandID,  QAD_Desktop* parent)
+//============================================================================
+// function : OnGUIEvent
+// purpose  : Process events
+//============================================================================
+bool ToolsGUI::OnGUIEvent( int theCommandID,  QAD_Desktop* parent )
 {
-  QAD_Study* myActiveStudy = parent->getActiveStudy();
-  switch (theCommandID)
+  switch ( theCommandID )
+  {
+  case 5102 :
     {
-    case 5102 :
-      {
-       ToolsGUI_CatalogGeneratorDlg* aDlg = new ToolsGUI_CatalogGeneratorDlg(parent);
-       aDlg->exec();
-       delete aDlg;
-       break;
-      }
-
-    default:
-      MESSAGE (" No command associated with this id = " << theCommandID )
+      ToolsGUI_CatalogGeneratorDlg* aDlg = new ToolsGUI_CatalogGeneratorDlg( parent );
+      aDlg->exec();
+      delete aDlg;
       break;
     }
+
+  default:
+    MESSAGE ( " No command associated with this id = " << theCommandID )
+    break;
+  }
   return true;
 }
 
 extern "C"
 {
-  bool OnGUIEvent(int theCommandID, QAD_Desktop* parent)
+  bool OnGUIEvent( int theCommandID, QAD_Desktop* parent )
   {
-    //MESSAGE("ToolsGUI::OnGUIEvent "<< theCommandID);
     return ToolsGUI::OnGUIEvent(theCommandID, parent);
   }
+}
+
+//=======================================================================
+// name    : GetVisibility
+// Purpose : Verify whether object is visible or not
+//=======================================================================
+bool ToolsGUI::GetVisibility( SALOMEDS::Study_var   theStudy,
+                              SALOMEDS::SObject_var theObj,
+                              void*                 theId )
+{
+  SALOMEDS::GenericAttribute_var anAttr;
+  if ( !theObj->_is_nil() && theObj->FindAttribute( anAttr, "AttributeGraphic" ) )
+  {
+    SALOMEDS::AttributeGraphic_var aGraphic =
+      SALOMEDS::AttributeGraphic::_narrow( anAttr );
+    return aGraphic->GetVisibility( (unsigned long)theId );
+  }
 
+  return false;
 }
+
+//=======================================================================
+// name    : SetVisibility
+// Purpose : Set flag visibility of object
+//=======================================================================
+bool ToolsGUI::SetVisibility( SALOMEDS::Study_var theStudy,
+                              const char*         theEntry,
+                              const bool          theValue,
+                              void*               theId )
+{
+  SALOMEDS::SObject_var anObj = theStudy->FindObjectID( theEntry );
+
+  if ( !anObj->_is_nil() )
+  {
+    SALOMEDS::GenericAttribute_var aGAttr;
+    if ( anObj->FindAttribute( aGAttr, "AttributeGraphic" ) )
+    {
+      SALOMEDS::AttributeGraphic_var anAttr = SALOMEDS::AttributeGraphic::_narrow( aGAttr );
+      anAttr->SetVisibility( (unsigned long)theId, theValue );
+    }
+    else if ( theValue )
+    {
+      SALOMEDS::StudyBuilder_var aBuilder = theStudy->NewBuilder();
+      SALOMEDS::AttributeGraphic_var anAttr = SALOMEDS::AttributeGraphic::_narrow(
+        aBuilder->FindOrCreateAttribute( anObj, "AttributeGraphic" ) );
+      anAttr->SetVisibility( (unsigned long)theId, theValue );
+    }
+    return true;
+  }
+
+  return false;
+}
+
+
+
+
+
+
index 93f697881a59609b4da8d181d1b968d7a446908d..bd4022f22b7e9ff34c73271fb4d429f90d40690c 100644 (file)
 
 #include "QAD_Desktop.h"
 
-class ToolsGUI : public QObject
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SALOMEDS)
+
+class Standard_EXPORT ToolsGUI  
 {
-  Q_OBJECT
 
 public :
 
-// Methods PUBLIC
-// 
-    Standard_EXPORT static int ToolsGUI::runCommand(string & arg);
-Standard_EXPORT static bool OnGUIEvent (int theCommandID, QAD_Desktop* parent);
-protected:
-
- // Methods PROTECTED
- // 
-
-
- // Fields PROTECTED
- //
-
-
-private: 
-
- // Methods PRIVATE
- // 
-
-
- // Fields PRIVATE
- //
+  static int                runCommand( string&  );
+  static bool               OnGUIEvent( int theCommandID, QAD_Desktop* parent );
 
+  static bool               GetVisibility( SALOMEDS::Study_var   theStudy,
+                                           SALOMEDS::SObject_var theObj,
+                                           void*                 theId );
+  static bool               SetVisibility( SALOMEDS::Study_var theStudy,
+                                           const char*         theEntry,
+                                           const bool          theValue,
+                                           void*               theId );
 };
 
 #endif
index 3c765b45cb55610ae79301b8997815a351c6b3ae..413fd2fa04bfecbc49d694c2d70ca6c6cdd66272 100644 (file)
@@ -74,7 +74,14 @@ void Engines_TestComponent_i::Setenv()
        {
          const char* value;
          (*it).second >>= value;
-         int ret = setenv(cle.c_str(), value, overwrite);
+         //CCRT porting : setenv not defined in stdlib.h
+         std::string s(cle);
+         s+='=';
+         s+=value;
+         //char* cast because 1st arg of linux putenv function is not a const char* !!!
+         int ret=putenv((char *)s.c_str());
+         //End of CCRT porting
+         //int ret = setenv(cle.c_str(), value, overwrite);
          MESSAGE("--- setenv: "<<cle<<" = "<< value);
        }
     }
index 25eeed28b13e1c5da14709a37b8122322a6d8997..7766bb46ec9eaa09f5848417c62d023c30eccec9 100644 (file)
@@ -39,6 +39,7 @@
 #include "Utils_SINGLETON.hxx"
 #include "Utils_SALOME_Exception.hxx"
 #include "Utils_CommException.hxx"
+#include "LocalTraceCollector.hxx"
 using namespace std;
 
 static ostream& operator<<(ostream& os, const CORBA::Exception& e)
@@ -62,10 +63,15 @@ static ostream& operator<<(ostream& os, const CORBA::Exception& e)
 int main (int argc, char * argv[])
 {
 
+  // Initializing omniORB
+  ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
+  CORBA::ORB_var &orb = init( argc , argv ) ;
+  LocalTraceCollector *myThreadTrace = LocalTraceCollector::instance(orb);
+
   try
     {
-      // Initializing omniORB
-      CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
+
+
     
       // use IOR to find container
       //if (argc != 2) { return 1; }
@@ -221,6 +227,7 @@ int main (int argc, char * argv[])
     INFOS("Caught unknown exception.")
       }
 
+  delete myThreadTrace;
   return 0;
 }
 
index 59ba1abad460c31ba24fe36576f420e1b4edc2a0..3924ce0e012f2bb5858e797395d0b8680f41da9d 100644 (file)
@@ -23,7 +23,7 @@ EXPORT_HEADERS = TestMPIComponentEngine.hxx
 
 LIB = libSalomeTestMPIComponentEngine.la 
 LIB_SRC = TestMPIComponentEngine.cxx
-LIB_CLIENT_IDL = Logger.idl SALOME_MPIObject.idl SALOME_TestMPIComponent.idl
+LIB_CLIENT_IDL = Logger.idl SALOME_MPIObject.idl SALOME_TestMPIComponent.idl SALOME_Component.idl
 
 # Executables targets
 BIN = TestMPIContainer
index 268aa1f3038a26672827cb05b38e49743b0f893e..62ce955efcf89946da8ca849203b912f95551eb8 100644 (file)
@@ -59,6 +59,10 @@ static list<DESTRUCTEUR_GENERIQUE_*> *Destructeurs=0 ;
  * pour effectuer cet enregistrement une seule fois indépendament de l'utilisateur.
  */
 
+//CCRT
+static bool ATEXIT_Done = false ;
+//CCRT
+
 class ATEXIT_
 {
 public :
@@ -68,14 +72,20 @@ public :
         *
         * La liste chaînée Destructeurs est détruite dans la fonction Nettoyage.
         */
-       ATEXIT_( void )
+        //CCRT ATEXIT_( void )
+        ATEXIT_( bool Make_ATEXIT )
        {
+         //CCRT
+         if ( Make_ATEXIT && !ATEXIT_Done ) {
+           //CCRT
                ASSERT (Destructeurs==0);
                if(MYDEBUG) MESSAGE("Construction ATEXIT"); // message necessaire pour utiliser logger dans Nettoyage (cf.BUG KERNEL4561)
                Destructeurs = new list<DESTRUCTEUR_GENERIQUE_*> ; // Destructeurs alloué dynamiquement (cf. ci-dessous) ,
                                                                   // il est utilisé puis détruit par la fonction Nettoyage
                int cr = atexit( Nettoyage );                      // exécute Nettoyage lors de exit, après la destruction des données statiques !
                ASSERT(cr==0) ;
+               ATEXIT_Done = true ;
+         }
        }
 
        ~ATEXIT_( )
@@ -87,7 +97,7 @@ public :
 
 
 
-static ATEXIT_ nettoyage ;     /* singleton statique */
+static ATEXIT_ nettoyage = ATEXIT_( false );   /* singleton statique */
 
 
 /*!
@@ -139,6 +149,12 @@ const int DESTRUCTEUR_GENERIQUE_::Ajout( DESTRUCTEUR_GENERIQUE_ &objet )
        // N.B. : l'ordre de creation des SINGLETON etant important
        //        on n'utilise pas deux fois la meme position pour
        //        les stocker dans la pile des objets.
+
+        //CCRT
+        if ( !ATEXIT_Done ) {
+          nettoyage = ATEXIT_( true ) ;
+       }
+       //CCRT
        ASSERT(Destructeurs) ;
        Destructeurs->push_back( &objet ) ;
        return Destructeurs->size() ;
index 55bed3bf7409daf4c3c58fd355f449dac09559c9..570839bfa3ad993b957158de24ed40d5603a1298 100644 (file)
@@ -72,12 +72,13 @@ Identity::Identity( const char *name ):     _name(duplicate(name)),\
                                                        _adip(get_adip()),\
                                                        _uid(getuid()) ,\
                                                        _pwname(get_pwname()) ,\
-                                                       _dir(getcwd(NULL,0)),\
+                                                       _dir(getcwd(NULL,256)),\
                                                        _pid(getpid()) ,\
                                                        _start(time(NULL)),\
                                                        _cstart(ctime(&_start))
+//CCRT
 {
-       ;
+       ASSERT(strlen(_dir)<256);
 }
 
 
index a76eb3eafb909da5fa5df775fb466901d3fe3135..e0940bfdacd39ab2f6ebb85ecaabde562b9d19a6 100644 (file)
@@ -78,7 +78,7 @@ static void RestoreSigHandler(TSigHandler theSigHandler,
 //=======================================================================
 Utils_SignalsHandler::Utils_SignalsHandler()
 {
-  StoreSignalHandler(mySigHandlerCont,SIGHUP); // floating point exception
+  StoreSignalHandler(mySigHandlerCont,SIGHUP); // end of leader process
   StoreSignalHandler(mySigHandlerCont,SIGFPE); // floating point exception
   
   StoreSignalHandler(mySigHandlerCont,SIGINT); // interrupt
index c2ac9c3cc00f51623b2e2a338e27bfec587c727b..276a5bc6d747826e1f3c58eb7e7c583acb81ed39 100644 (file)
@@ -171,6 +171,8 @@ VTKViewer_InteractorStyleSALOME::~VTKViewer_InteractorStyleSALOME()
 void VTKViewer_InteractorStyleSALOME::setPreselectionProp(const double& theRed, const double& theGreen, 
                                                          const double& theBlue, const int& theWidth) 
 {
+  if ( myPreSelectionActor->GetProperty() == 0 )
+    return;
   myPreSelectionActor->GetProperty()->SetColor(theRed, theGreen, theBlue);
   myPreSelectionActor->GetProperty()->SetLineWidth(theWidth);
   myPreSelectionActor->GetProperty()->SetPointSize(theWidth);
@@ -835,7 +837,7 @@ void VTKViewer_InteractorStyleSALOME::onFinishOperation()
       rect = rect.normalize();
       if (State == VTK_INTERACTOR_STYLE_CAMERA_FIT) {
         // making fit rect opeation 
-        int w, h, x, y;
+        int w, h;
         m_Interactor->GetSize(w, h);
         int x1, y1, x2, y2;
         x1 = rect.left(); 
@@ -965,7 +967,7 @@ void VTKViewer_InteractorStyleSALOME::onFinishOperation()
          //      vtkCamera *cam = this->CurrentRenderer->GetActiveCamera();
          QRect rect(myPoint, myOtherPoint);
          rect = rect.normalize();
-         int w, h, x, y;
+         int w, h;
          m_Interactor->GetSize(w, h);
          int x1, y1, x2, y2;
          x1 = rect.left(); 
@@ -1272,7 +1274,7 @@ void VTKViewer_InteractorStyleSALOME::onCursorMove(QPoint mousePos) {
       }
     }
   }
-  else if ( vtkPicker* picker = vtkPicker::SafeDownCast(aPicker) ) {
+  else if ( vtkPicker::SafeDownCast(aPicker) ) {
     if ( SActor ) {
       if ( myPreViewActor != SActor ) {
        if ( myPreViewActor != NULL ) {
index c7d3828a95907295998b1f595ca96eb30bb3f93d..d8d86e86c3e7c7906d0d2cd7d38fa9a31aa2fdee 100644 (file)
@@ -575,7 +575,6 @@ void VTKViewer_RenderWindowInteractor::EraseAll()
   emit RenderWindowModified() ;
 }
 
-
 void VTKViewer_RenderWindowInteractor::DisplayAll()
 { 
   vtkActorCollection* aCollection = GetRenderer()->GetActors();
@@ -624,8 +623,39 @@ void VTKViewer_RenderWindowInteractor::Remove(const Handle(SALOME_InteractiveObj
                          TIsSameIObject<SALOME_Actor>(theIObject),
                          TRemoveAction(aRen));
 
-  if(update)
-    emit RenderWindowModified();
+  
+}
+
+void VTKViewer_RenderWindowInteractor::Remove( SALOME_Actor* SActor, bool updateViewer )
+{
+  if ( SActor != 0 )
+  {
+    GetRenderer()->RemoveProp( SActor );
+    if ( updateViewer )
+      emit RenderWindowModified();
+  }
+}
+
+void VTKViewer_RenderWindowInteractor::RemoveAll( const bool updateViewer )
+{
+  vtkRenderer* aRenderer = GetRenderer();
+  vtkActorCollection* anActors = aRenderer->GetActors();
+  if ( anActors )
+  {
+    anActors->InitTraversal();
+    while ( vtkActor *anAct = anActors->GetNextActor() )
+    {
+      if ( anAct->IsA( "SALOME_Actor" ) )
+      {
+        SALOME_Actor* aSAct = (SALOME_Actor*)anAct;
+        if ( aSAct->hasIO() && aSAct->getIO()->hasEntry() )
+          aRenderer->RemoveActor( anAct );
+      }
+    }
+
+    if ( updateViewer )
+      emit RenderWindowModified();
+  }
 }
 
 
index eb4fdb004a6eb78c46c16035b3d4fe0ef5d29f1f..99ef01e82eebda6c7f27ed0bedc01b3144458ced 100644 (file)
@@ -68,7 +68,7 @@ class VTKViewer_InteractorStyleSALOME;
 class VTK_EXPORT VTKViewer_RenderWindowInteractor : 
   public QObject, public vtkRenderWindowInteractor
 {
-  Q_OBJECT ;
+  Q_OBJECT ;   
   friend class VTKViewer_ViewFrame;
 public:
 
@@ -178,12 +178,14 @@ public:
   // Erase Display functions
   void EraseAll();
   void DisplayAll();
+  void RemoveAll( const bool immediatly );
   void Erase(const Handle(SALOME_InteractiveObject)& IObject, bool immediatly=true);
   void Remove(const Handle(SALOME_InteractiveObject)& IObject, bool immediatly=true);
   void Display(const Handle(SALOME_InteractiveObject)& IObject, bool immediatly=true);
 
   void Display( SALOME_Actor* SActor, bool immediatly = true );
   void Erase( SALOME_Actor* SActor, bool immediatly = true );
+  void Remove( SALOME_Actor* SActor, bool updateViewer = true );
 
   // Transparency
   void SetTransparency(const Handle(SALOME_InteractiveObject)& IObject,float trans);
index f16a93f4cd30b8fba296731c2cd2df49c3d12164..1dc5b8db490bd521e1721652a1ca718896c9fb5b 100644 (file)
@@ -40,6 +40,7 @@
 #include "SALOME_Transform.h"
 #include "SALOME_TransformFilter.h"
 #include "SALOME_GeometryFilter.h"
+#include "SALOMEGUI.h"
 
 #include "QAD_Settings.h"
 #include "QAD_Config.h"
@@ -47,6 +48,8 @@
 #include "QAD_Desktop.h"
 #include "SALOME_Selection.h"
 #include "SALOME_InteractiveObject.hxx"
+#include "ToolsGUI.h"
+#include "SALOMEDS_Tool.hxx"
 
 #include "utilities.h"
 
@@ -476,10 +479,12 @@ Handle(SALOME_InteractiveObject) VTKViewer_ViewFrame::FindIObject(const char* th
 /* display */          
 void VTKViewer_ViewFrame::Display(const Handle(SALOME_InteractiveObject)& theIObject, bool update)
 {
-  QAD_Study* aStudy = QAD_Application::getDesktop()->getActiveStudy();
-  SALOME_Selection* aSel = SALOME_Selection::Selection(aStudy->getSelection());
+  QAD_Study*          aQADStudy = QAD_Application::getDesktop()->getActiveStudy();
+  SALOME_Selection*   aSel      = SALOME_Selection::Selection( aQADStudy->getSelection() );
+  SALOMEDS::Study_var aStudy    = aQADStudy->getStudyDocument();
 
   m_RWInteractor->Display(theIObject,false);
+  ToolsGUI::SetVisibility( aStudy, theIObject->getEntry(), true, this );
   aSel->AddIObject(theIObject,false);
 
   if(update)
@@ -506,13 +511,17 @@ void VTKViewer_ViewFrame::DisplayOnly(const Handle(SALOME_InteractiveObject)& th
   SALOME_Selection* aSel = SALOME_Selection::Selection(aStudy->getSelection());
 
   aSel->ClearIObjects();
-  m_RWInteractor->EraseAll();
+  //m_RWInteractor->EraseAll();
+  EraseAll();
 
   using namespace SALOME::VTK;
   ForEachIf<SALOME_Actor>(getRenderer()->GetActors(),
                          TIsSameIObject<SALOME_Actor>(theIObject),
                          TDisplayAction(aSel,theIObject));
 
+  ToolsGUI::SetVisibility(
+    aStudy->getStudyDocument(), theIObject->getEntry(), true, this );
+
   Repaint();
 }
 
@@ -541,6 +550,9 @@ void VTKViewer_ViewFrame::Erase(const Handle(SALOME_InteractiveObject)& theIObje
                          TIsSameIObject<SALOME_Actor>(theIObject),
                          TEraseAction(aSel,theIObject,m_RWInteractor));
 
+  ToolsGUI::SetVisibility(
+    aStudy->getStudyDocument(), theIObject->getEntry(), false, this );
+
   if(update)
     Repaint();
 }
@@ -549,12 +561,42 @@ void VTKViewer_ViewFrame::Erase(const Handle(SALOME_InteractiveObject)& theIObje
 void VTKViewer_ViewFrame::DisplayAll()
 {
   m_RWInteractor->DisplayAll();
+
+  // update flag of visibility
+  QAD_Study*               aQADStudy  = QAD_Application::getDesktop()->getActiveStudy();
+  SALOMEDS::Study_var      aStudy     = aQADStudy->getStudyDocument();
+  QAD_Desktop*             aDesktop   = QAD_Application::getDesktop();
+  const QString&           aCompName  = aDesktop->getComponentDataType();
+  SALOMEDS::SObject_var    aComponent =
+    SALOMEDS::SObject::_narrow( aStudy->FindComponent ( aCompName.latin1() ) );
+    
+  std::list<SALOMEDS::SObject_var> aList;
+  SALOMEDS_Tool::GetAllChildren( aStudy, aComponent, aList );
+
+  std::list<SALOMEDS::SObject_var>::iterator anIter = aList.begin();
+  for ( ; anIter != aList.end(); ++anIter )
+    ToolsGUI::SetVisibility( aStudy, (*anIter)->GetID(), true, this );
 }
 
 
 void VTKViewer_ViewFrame::EraseAll()
 {
   m_RWInteractor->EraseAll();
+
+  // update flag of visibility
+  QAD_Study*               aQADStudy  = QAD_Application::getDesktop()->getActiveStudy();
+  SALOMEDS::Study_var      aStudy     = aQADStudy->getStudyDocument();
+  QAD_Desktop*             aDesktop   = QAD_Application::getDesktop();
+  const QString&           aCompName  = aDesktop->getComponentDataType();
+  SALOMEDS::SObject_var    aComponent =
+    SALOMEDS::SObject::_narrow( aStudy->FindComponent ( aCompName.latin1() ) );
+
+  std::list<SALOMEDS::SObject_var> aList;
+  SALOMEDS_Tool::GetAllChildren( aStudy, aComponent, aList );
+
+  std::list<SALOMEDS::SObject_var>::iterator anIter = aList.begin();
+  for ( ; anIter != aList.end(); ++anIter )
+    ToolsGUI::SetVisibility( aStudy, (*anIter)->GetID(), false, this );
 }
 
 
@@ -625,6 +667,16 @@ void VTKViewer_ViewFrame::Display( const SALOME_VTKPrs* prs )
     {
       // just display the object
       m_RWInteractor->Display( salomeActor, false );
+      
+      // Set visibility flag
+      Handle(SALOME_InteractiveObject) anObj = salomeActor->getIO();
+      if ( !anObj.IsNull() && anObj->hasEntry() )
+      {
+        SALOMEDS::Study_var aStudy =
+          QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
+        ToolsGUI::SetVisibility( aStudy, anObj->getEntry(), true, this );
+      }
+
       if ( salomeActor->IsSetCamera() )
         salomeActor->SetCamera( getRenderer()->GetActiveCamera() );
     }
@@ -648,13 +700,27 @@ void VTKViewer_ViewFrame::Erase( const SALOME_VTKPrs* prs, const bool forced )
   if ( !actors )
     return;
 
+  SALOMEDS::Study_var aStudy =
+    QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
+
   actors->InitTraversal();
   vtkActor* actor;
   while( ( actor = actors->GetNextActor() ) ) {
     SALOME_Actor* salomeActor = SALOME_Actor::SafeDownCast( actor );
     if ( salomeActor ) {
       // just erase the object
-      m_RWInteractor->Erase( salomeActor, forced );
+      if ( forced )
+        m_RWInteractor->Remove( salomeActor, false );
+      else
+        m_RWInteractor->Erase( salomeActor, forced );
+
+      // Set visibility flag if necessary
+      if ( !forced )
+      {
+        Handle(SALOME_InteractiveObject) anObj = salomeActor->getIO();
+        if ( !anObj.IsNull() && anObj->hasEntry() )
+          ToolsGUI::SetVisibility( aStudy, anObj->getEntry(), true, this );
+      }
     }
   }
 }
@@ -703,3 +769,89 @@ void  VTKViewer_ViewFrame::AfterDisplay( SALOME_Displayer* d )
 {
   d->AfterDisplay( this, SALOME_VTKViewType() );
 }
+
+//==========================================================
+/*!
+ *  VTKViewer_ViewFrame::undo
+ *  Redisplay all objects in viewer
+ */
+//==========================================================
+void VTKViewer_ViewFrame::undo( QAD_Study* theQADStudy, const char* /*StudyFrameEntry*/ )
+{
+  redisplayAll( theQADStudy, true );
+}
+
+//==========================================================
+/*!
+ *  VTKViewer_ViewFrame::redo
+ *  Redisplay all objects in viewer
+ */
+//==========================================================
+void VTKViewer_ViewFrame::redo( QAD_Study* theQADStudy, const char* /*StudyFrameEntry*/ )
+{
+  redisplayAll( theQADStudy, true );
+}
+
+//==========================================================
+/*!
+ *  VTKViewer_ViewFrame::redisplayAll
+ *  Redisplay all objects in viewer
+ */
+//==========================================================
+void VTKViewer_ViewFrame::redisplayAll( QAD_Study* theQADStudy, const bool theToUpdate )
+{
+  SALOMEDS::Study_var      aStudy     = theQADStudy->getStudyDocument();
+  SALOME_Selection*        aSel       = SALOME_Selection::Selection( theQADStudy->getSelection() );
+  QAD_Desktop*             aDesktop   = QAD_Application::getDesktop();
+  SALOMEGUI*               aGUI       = aDesktop->getActiveGUI();
+  const QString&           aCompName  = aDesktop->getComponentDataType();
+  SALOMEDS::SObject_var    aComponent =
+    SALOMEDS::SObject::_narrow( aStudy->FindComponent ( aCompName.latin1() ) );
+
+  if ( aComponent->_is_nil() )
+    return;
+
+  bool isTrhDisplayed = isTrihedronDisplayed();
+
+  m_RWInteractor->RemoveAll( false );
+  //m_RWInteractor->EraseAll();
+
+  aSel->ClearIObjects();
+  
+  if ( isTrhDisplayed )
+    m_Triedron->AddToRender( m_Renderer );
+
+  std::list<SALOMEDS::SObject_var> aList;
+  SALOMEDS_Tool::GetAllChildren( aStudy, aComponent, aList );
+
+  std::list<SALOMEDS::SObject_var>::iterator anIter = aList.begin();
+  for ( ; anIter != aList.end(); ++anIter )
+  {
+    SALOMEDS::SObject_var anObj = (*anIter);
+    if ( ToolsGUI::GetVisibility( aStudy, anObj, this ) )
+    {
+      Handle(SALOME_InteractiveObject) anIObj = new SALOME_InteractiveObject();
+      anIObj->setEntry( anObj->GetID() );
+      aGUI->BuildPresentation( anIObj, this );
+    }
+    
+  }
+
+  if ( theToUpdate )
+    Repaint();
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
index 7f67e444de6619c25eea69121e1d2a69db2efa9b..6a8d79b25d316ea8b09768ebe5ba86fe1f814d04 100644 (file)
@@ -42,98 +42,108 @@ class VTKViewer_RenderWindow;
 class VTKViewer_RenderWindowInteractor;
 
 
-class QAD_EXPORT VTKViewer_ViewFrame : public QAD_ViewFrame{
+class QAD_EXPORT VTKViewer_ViewFrame : public QAD_ViewFrame
+{
   Q_OBJECT;
- public:
-  VTKViewer_ViewFrame(QWidget* parent, const char* name=0 );
-  ~VTKViewer_ViewFrame();
+
+public:
+                                    VTKViewer_ViewFrame(QWidget* parent, const char* name=0 );
+                                    ~VTKViewer_ViewFrame();
   
-  ViewType                       getTypeView() const{ return VIEW_VTK;};
-  QWidget*                       getViewWidget();
-  vtkRenderer*                   getRenderer() {return m_Renderer;}
+  ViewType                          getTypeView() const{ return VIEW_VTK;};
+  QWidget*                          getViewWidget();
+  vtkRenderer*                      getRenderer() {return m_Renderer;}
 
-  VTKViewer_RenderWindow*       getRW() {return m_RW;}
+  VTKViewer_RenderWindow*                getRW() {return m_RW;}
   VTKViewer_RenderWindowInteractor* getRWInteractor() {return m_RWInteractor;}
 
-  bool                           isTrihedronDisplayed();
+  bool                              isTrihedronDisplayed();
  
-  void                           setBackgroundColor( const QColor& );
-  QColor                         backgroundColor() const;
+  void                              setBackgroundColor( const QColor& );
+  QColor                            backgroundColor() const;
   
-  void                           SetSelectionMode( Selection_Mode mode );
+  void                              SetSelectionMode( Selection_Mode mode );
 
   /*  popup management */
-  void                           setPopupServer( QAD_Application* );
+  void                              setPopupServer( QAD_Application* );
 
   /*  interactive object management */
-  void                           highlight( const Handle(SALOME_InteractiveObject)& IObject, 
-                                           bool highlight, bool immediatly = true );
-  void                           unHighlightAll();
-  void                           rename( const Handle(SALOME_InteractiveObject)& IObject,
-                                        QString newName );
-  bool                           isInViewer( const Handle(SALOME_InteractiveObject)& IObject );
-  bool                           isVisible( const Handle(SALOME_InteractiveObject)& IObject );
+  void                              highlight( const Handle(SALOME_InteractiveObject)& IObject, 
+                                               bool highlight, bool immediatly = true );
+  void                              unHighlightAll();
+  void                              rename( const Handle(SALOME_InteractiveObject)& IObject,
+                                            QString newName );
+  bool                              isInViewer( const Handle(SALOME_InteractiveObject)& IObject );
+  bool                              isVisible( const Handle(SALOME_InteractiveObject)& IObject );
 
   /* selection */
-  Handle(SALOME_InteractiveObject) FindIObject(const char* Entry);
+  Handle(SALOME_InteractiveObject)  FindIObject(const char* Entry);
   
   /* display */                
-  void           Display(const Handle(SALOME_InteractiveObject)& IObject, bool immediatly = true);
-  void           DisplayOnly(const Handle(SALOME_InteractiveObject)& IObject);
-  void           Erase(const Handle(SALOME_InteractiveObject)& IObject, bool immediatly = true);
-  void           DisplayAll();
-  void           EraseAll();
-  void           Repaint(bool theUpdateTrihedron);
-  void           Repaint() { Repaint(true); }
+  void                              Display( const Handle(SALOME_InteractiveObject)& IObject,
+                                             bool immediatly = true );
+  void                              DisplayOnly( const Handle(SALOME_InteractiveObject)& IObject );
+  void                              Erase( const Handle(SALOME_InteractiveObject)& IObject,
+                                           bool immediatly = true );
+  void                              DisplayAll();
+  void                              EraseAll();
+  void                              Repaint( bool theUpdateTrihedron );
+  void                              Repaint() { Repaint(true); }
+
+  virtual void                      undo( QAD_Study* aStudy, const char* StudyFrameEntry );
+  virtual void                      redo( QAD_Study* aStudy, const char* StudyFrameEntry );
 
   /* Reimplemented from SALOME_View */
-  void          Display( const SALOME_VTKPrs* );
-  void          Erase( const SALOME_VTKPrs*, const bool = false );
-  SALOME_Prs*   CreatePrs( const char* entry = 0 );
-  virtual void  BeforeDisplay( SALOME_Displayer* d );
-  virtual void  AfterDisplay ( SALOME_Displayer* d );
+  void                              Display( const SALOME_VTKPrs* );
+  void                              Erase( const SALOME_VTKPrs*, const bool = false );
+  SALOME_Prs*                       CreatePrs( const char* entry = 0 );
+  virtual void                      BeforeDisplay( SALOME_Displayer* d );
+  virtual void                      AfterDisplay ( SALOME_Displayer* d );
 
   //apply existing transformation on adding SALOME_Actor
-  void SetScale(double theScale[3]);
-  void GetScale(double theScale[3]);
-  void AddActor(SALOME_Actor*, bool update = false);
-  void RemoveActor(SALOME_Actor*, bool update = false);
-
-  void          AdjustTrihedrons( const bool forced );
-  bool          ComputeTrihedronSize( double& theNewSize, double& theOldSize );
-  double        GetTrihedronSize() const;
- public slots:
-  void           onViewPan(); 
-  void           onViewZoom();
-  void           onViewFitAll();
-  void           onViewFitArea();
-  void           onViewGlobalPan(); 
-  void           onViewRotate();
-  void           onViewReset();     
-  void           onViewFront(); 
-  void           onViewBack(); 
-  void           onViewRight(); 
-  void           onViewLeft();     
-  void           onViewBottom();
-  void           onViewTop();
-  void           onViewTrihedron(); 
-  void           onAdjustTrihedron();
- private:
-  void InitialSetup();
-
-  double m_ViewUp[3];
-  double m_ViewNormal[3];
+  void                              SetScale( double theScale[3] );
+  void                              GetScale( double theScale[3] );
+  void                              AddActor( SALOME_Actor*, bool update = false );
+  void                              RemoveActor(SALOME_Actor*, bool update = false);
+
+  void                              AdjustTrihedrons( const bool forced );
+  bool                              ComputeTrihedronSize( double& theNewSize,
+                                                          double& theOldSize );
+  double                            GetTrihedronSize() const;
   
-  vtkRenderer* m_Renderer;
-  VTKViewer_RenderWindow* m_RW;
+public slots:
+  void                              onViewPan(); 
+  void                              onViewZoom();
+  void                              onViewFitAll();
+  void                              onViewFitArea();
+  void                              onViewGlobalPan(); 
+  void                              onViewRotate();
+  void                              onViewReset();     
+  void                              onViewFront(); 
+  void                              onViewBack(); 
+  void                              onViewRight(); 
+  void                              onViewLeft();     
+  void                              onViewBottom();
+  void                              onViewTop();
+  void                              onViewTrihedron(); 
+  void                              onAdjustTrihedron();
+private:
+  void                              InitialSetup();
+  void                              redisplayAll( QAD_Study*, const bool = true );
+  void                              InsertActor( SALOME_Actor* theActor,
+                                                 bool theMoveInternalActors = false );
+  void                              MoveActor( SALOME_Actor* theActor );
+
+private:  
+  double                            m_ViewUp[ 3 ];
+  double                            m_ViewNormal[ 3 ];
+  vtkRenderer*                      m_Renderer;
+  VTKViewer_RenderWindow*           m_RW;
   VTKViewer_RenderWindowInteractor* m_RWInteractor;
+  VTKViewer_Trihedron*              m_Triedron;  
+  SALOME_Transform*                 m_Transform;
 
-  friend class VTKViewer_RenderWindowInteractor;
-  void InsertActor(SALOME_Actor* theActor, bool theMoveInternalActors = false);
-  void MoveActor(SALOME_Actor* theActor);
-
-  VTKViewer_Trihedron* m_Triedron;  
-  SALOME_Transform* m_Transform;
+  friend class                      VTKViewer_RenderWindowInteractor;
 };
 #endif