]> SALOME platform Git repositories - modules/hydro.git/blob - doc/salome/examples/h006_importBathyXYZBad.py
Salome HOME
controles du maillage, orientation
[modules/hydro.git] / doc / salome / examples / h006_importBathyXYZBad.py
1 # -*- coding: utf-8 -*-
2
3 import os
4 HYDRO_SAMPLES = os.path.join( os.environ["HYDRO_ROOT_DIR"], "bin/salome/test/HYDRO")
5
6 import sys
7 import salome
8
9 salome.salome_init()
10 theStudy = salome.myStudy
11
12 from HYDROPy import *
13 from PyQt4.QtCore import *
14 from PyQt4.QtGui import *
15
16 hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
17
18 hydro_doc.SetLocalCS( 430000, 6.35e+06 )
19
20 Cloud_inexistant = hydro_doc.CreateObject( KIND_BATHYMETRY )
21 Cloud_inexistant.SetName( "Cloud_inexistant" )
22
23 Cloud_inexistant.SetAltitudesInverted( 0 );
24 Cloud_inexistant.ImportFromFile( os.path.join(HYDRO_SAMPLES,  "Cloud_inexistant.xyz" ))
25
26 # TODO : ce chargement doit echouer avec un retour d'erreur à traiter
27 raise ValueError('file not found')
28
29 Cloud_inexistant.Update()
30
31 if salome.sg.hasDesktop():
32   salome.sg.updateObjBrowser(1)