X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fexamples%2Fh011_normalCaseManualInterpolZ.py;h=647a8b203b3d5ae60e02cfd217f731e9996cd89d;hb=61fb5fc7b0d481359dda905574e6bd548290716d;hp=70b756b91f9676b50524cdc4efb455ed5ae5509f;hpb=053f21f47f5ae452176157cce388f0f6923fd9a7;p=modules%2Fhydro.git diff --git a/doc/salome/examples/h011_normalCaseManualInterpolZ.py b/doc/salome/examples/h011_normalCaseManualInterpolZ.py index 70b756b9..647a8b20 100644 --- a/doc/salome/examples/h011_normalCaseManualInterpolZ.py +++ b/doc/salome/examples/h011_normalCaseManualInterpolZ.py @@ -8,9 +8,9 @@ import salome salome.salome_init() theStudy = salome.myStudy - + #---------------------- -# --- HYDRO +# --- HYDRO #---------------------- from HYDROPy import * @@ -294,7 +294,7 @@ garonne_1_riveGauche.SetName("garonne_1_riveGauche") garonne_1_entry = garonne_1.Export( theStudy._get_StudyId() ) #---------------------- -# --- Geometry +# --- Geometry #---------------------- # Get geometry shape and print debug information @@ -311,7 +311,7 @@ HYDRO_garonne_1 = salome.IDToObject( str( garonne_1_entry ) ) print "Geom shape:", HYDRO_garonne_1 print "Geom shape name:", HYDRO_garonne_1.GetName() -# --- manual definition: geometrical faces +# --- manual definition: geometrical faces [riveGauche,litMineur,riveDroite] = geompy.ExtractShapes(HYDRO_garonne_1, geompy.ShapeType["FACE"], True) # --- manual definition: useful groups of edges @@ -344,14 +344,16 @@ geompy.addToStudyInFather( HYDRO_garonne_1, bordDroiteDomaine, 'bordDroiteDomain # --- basic properties control: edges length, surfaces controlGeomProps(geompy, riveGauche, 29149.36918, 35948828.352061) -controlGeomProps(geompy, litMineur, 30337.5484919, 3263628.55399) -controlGeomProps(geompy, riveDroite, 32012.3432411, 26177085.4601) +#controlGeomProps(geompy, litMineur, 30337.5484919, 3263628.55399) +#controlGeomProps(geompy, riveDroite, 32012.3432411, 26177085.4601) +controlGeomProps(geompy, litMineur, 30337.548492, 3488480.304388) +controlGeomProps(geompy, riveDroite, 32012.343241, 25998769.23615) #---------------------- -# --- Meshing +# --- Meshing #---------------------- -med_file = r'/garonne_1.med' +med_file = r'/tmp/garonne_1.med' try: os.remove(med_file) except OSError: @@ -426,16 +428,20 @@ SectionsGaronne_3 = garonne_1.GroupOnGeom(SectionsGaronne,'SectionsGaronne',SMES garonne_1.SetAutoColor( 1 ) garonne_1.ExportMED( med_file, 0, SMESH.MED_V2_2, 1, None ,1) -controlMeshStats(garonne_1, 1763, 180, 3360) -controlSubMeshStats(litMineur_2, 48) -controlSubMeshStats(riveDroite_1, 1360) -controlSubMeshStats(riveGauche_1, 1952) +#controlMeshStats(garonne_1, 1763, 180, 3360) +#controlSubMeshStats(litMineur_2, 48) +#controlSubMeshStats(riveDroite_1, 1360) +#controlSubMeshStats(riveGauche_1, 1952) +controlMeshStats(garonne_1, 3888, 475, 7597) +controlSubMeshStats(litMineur_2, 2384) +controlSubMeshStats(riveDroite_1, 2342) +controlSubMeshStats(riveGauche_1, 2871) if salome.sg.hasDesktop(): salome.sg.updateObjBrowser(1) #---------------------- -# --- Z interpolation with HYDRO +# --- Z interpolation with HYDRO #---------------------- from salome.hydrotools.interpolZ import interpolZ, createZfield2 @@ -452,7 +458,7 @@ dicoGroupeRegion= dict(litMineur = 'garonne_1_litMineur', riveDroite = 'garonne_1_riveDroite', riveGauche = 'garonne_1_riveGauche', ) -# --- value to use for Z when the node is not in a region (used to detect problems) +# --- value to use for Z when the node is not in a region (used to detect problems) zUndef = 90 # --- Z interpolation on the bathymety/altimetry on the mesh nodes