Salome HOME
Merge from V5_1_main 14/05/2010
[modules/visu.git] / src / VISU_SWIG / visu_pointmap3d.py
1 #  -*- coding: iso-8859-1 -*-
2 #  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
3 #
4 #  This library is free software; you can redistribute it and/or
5 #  modify it under the terms of the GNU Lesser General Public
6 #  License as published by the Free Software Foundation; either
7 #  version 2.1 of the License.
8 #
9 #  This library is distributed in the hope that it will be useful,
10 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
11 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 #  Lesser General Public License for more details.
13 #
14 #  You should have received a copy of the GNU Lesser General Public
15 #  License along with this library; if not, write to the Free Software
16 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 import os
22 import VISU
23 import salome
24 from visu_gui import *
25
26 myVisu.SetCurrentStudy(salome.myStudy)
27
28 aTableFile = os.getenv('DATA_DIR') + '/Tables/table_test.xls'
29
30 aTableSObject = myVisu.ImportTables(aTableFile, False)
31
32 aTable = None
33 if aTableSObject:
34   anIsFound, aSObject = aTableSObject.FindSubObject(1)
35   if anIsFound:
36     aTable = aSObject.GetObject()
37
38 aViewManager = myVisu.GetViewManager();
39 aView = aViewManager.Create3DView()
40 if aView is None : print "Creating View Error"
41 print aTable
42
43 ##########Get Values################
44 aScaleFactor = aTable.GetScaleFactor();
45 anIsContourPrs = aTable.GetIsContourPrs();
46 aNbOfContours = aTable.GetNbOfContours();
47 aScaling = aTable.GetScaling();
48 aMin = aTable.GetMin();
49 aMax = aTable.GetMax();
50 aSourceMin = aTable.GetSourceMin();
51 aSourceMax = aTable.GetSourceMax();
52 aPosX = aTable.GetPosX();
53 aPosY = aTable.GetPosY();
54 aHeight = aTable.GetHeight();
55 aWidth = aTable.GetWidth();
56 aNbColors = aTable.GetNbColors();
57 aLabels = aTable.GetLabels();
58 aBarOrientation = aTable.GetBarOrientation();
59
60
61 print "Get Values:"
62 print "aScaleFactor = ", aScaleFactor
63 print "anIsContourPrs = ", anIsContourPrs
64 print "aNbOfContours = ", aNbOfContours
65 print "aScaling = ", aScaling
66 print "===== SCALAR BAR ======="
67 print "aMin = ", aMin
68 print "aMax = ", aMax
69 print "aSourceMin = ", aSourceMin
70 print "aSourceMax = ", aSourceMax
71 print "aPosX = ", aPosX
72 print "aPosY = ", aPosY
73 print "aHeight = ", aHeight
74 print "aWidth = ", aWidth
75 print "aNbColors = ", aNbColors
76 print "aLabels = ", aLabels
77 print "aBarOrientation = ", aBarOrientation
78
79 aView.DisplayOnly( aTable )
80 aView.FitAll()