print "Geom shape:", Case_1_geom
print "Geom shape name:", Case_1_geom.GetName()
-controlGeomProps(geompy, Case_1_geom, 1218.7373973, 49578.1516521)
+controlGeomProps(geompy, Case_1_geom, 1218.7373973, 49697.2117918)
if salome.sg.hasDesktop():
salome.sg.updateObjBrowser(1)
geompy.addToStudyInFather( HYDRO_garonne_1, riveDroite, 'riveDroite' )
controlGeomProps(geompy, riveGauche, 29149.36918, 35948828.352061)
-controlGeomProps(geompy, litMineur, 30337.548492, 3488480.304388)
-controlGeomProps(geompy, riveDroite, 32012.343241, 25998769.23615)
+controlGeomProps(geompy, litMineur, 30337.5484919, 3263628.55399)
+controlGeomProps(geompy, riveDroite, 32012.3432411, 26177085.4601)
if salome.sg.hasDesktop():
salome.sg.updateObjBrowser(1)
# --- basic properties control: edges length, surfaces
controlGeomProps(geompy, riveGauche, 29149.36918, 35948828.352061)
-controlGeomProps(geompy, litMineur, 30337.548492, 3488480.304388)
-controlGeomProps(geompy, riveDroite, 32012.343241, 25998769.23615)
-
+controlGeomProps(geompy, litMineur, 30337.5484919, 3263628.55399)
+controlGeomProps(geompy, riveDroite, 32012.3432411, 26177085.4601)
#----------------------
# --- Meshing
#----------------------
+med_file = r'/garonne_1.med'
+
+try:
+ os.remove(med_file)
+except OSError:
+ pass
+
+
import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
from salome.hydrotools.controls import controlMeshStats, controlSubMeshStats
SectionsGaronne_3 = garonne_1.GroupOnGeom(SectionsGaronne,'SectionsGaronne',SMESH.NODE)
garonne_1.SetAutoColor( 1 )
-garonne_1.ExportMED( r'/tmp/garonne_1.med', 0, SMESH.MED_V2_2, 1, None ,1)
+garonne_1.ExportMED( med_file, 0, SMESH.MED_V2_2, 1, None ,1)
-controlMeshStats(garonne_1, 3888, 475, 7597)
-controlSubMeshStats(litMineur_2, 2384)
-controlSubMeshStats(riveDroite_1, 2342)
-controlSubMeshStats(riveGauche_1, 2871)
+controlMeshStats(garonne_1, 1763, 180, 3360)
+controlSubMeshStats(litMineur_2, 48)
+controlSubMeshStats(riveDroite_1, 1360)
+controlSubMeshStats(riveGauche_1, 1952)
if salome.sg.hasDesktop():
salome.sg.updateObjBrowser(1)
geompy.addToStudyInFather( HYDRO_garonne_1, bordDroiteDomaine, 'bordDroiteDomaine' )
# --- basic properties control: edges length, surfaces
+
controlGeomProps(geompy, riveGauche, 29149.36918, 35948828.352061)
-controlGeomProps(geompy, litMineur, 30337.548492, 3488480.304388)
-controlGeomProps(geompy, riveDroite, 32012.343241, 25998769.23615)
+controlGeomProps(geompy, litMineur, 30337.5484919, 3263628.55399)
+controlGeomProps(geompy, riveDroite, 32012.3432411, 26177085.4601)
#----------------------
# --- Meshing
#----------------------
+med_file = r'/garonne_1.med'
+try:
+ os.remove(med_file)
+except OSError:
+ pass
+
+
import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
from salome.hydrotools.controls import controlMeshStats, controlSubMeshStats
SectionsGaronne_3 = garonne_1.GroupOnGeom(SectionsGaronne,'SectionsGaronne',SMESH.NODE)
garonne_1.SetAutoColor( 1 )
-garonne_1.ExportMED( r'/tmp/garonne_1.med', 0, SMESH.MED_V2_2, 1, None ,1)
+garonne_1.ExportMED( med_file, 0, SMESH.MED_V2_2, 1, None ,1)
-controlMeshStats(garonne_1, 3888, 475, 7597)
-controlSubMeshStats(litMineur_2, 2384)
-controlSubMeshStats(riveDroite_1, 2342)
-controlSubMeshStats(riveGauche_1, 2871)
+controlMeshStats(garonne_1, 1763, 180, 3360)
+controlSubMeshStats(litMineur_2, 48)
+controlSubMeshStats(riveDroite_1, 1360)
+controlSubMeshStats(riveGauche_1, 1952)
if salome.sg.hasDesktop():
salome.sg.updateObjBrowser(1)
nomCas = 'garonne_1'
# --- med file 2D(x,y) of the case produced by SMESH
-fichierMaillage = '/tmp/garonne_1.med'
+fichierMaillage = med_file
# --- dictionary [med group name] = region name
dicoGroupeRegion= dict(litMineur = 'garonne_1_litMineur',
geompy.addToStudyInFather( HYDRO_garonne_2, litMineur, 'litMineur' )
geompy.addToStudyInFather( HYDRO_garonne_2, riveDroite, 'riveDroite' )
-controlGeomProps(geompy, riveGauche, 39493.270283, 35845790.613557)
-controlGeomProps(geompy, digue, 10343.901103, 103037.738504)
-controlGeomProps(geompy, litMineur, 30337.548492, 3488480.304388)
-controlGeomProps(geompy, riveDroite, 32012.343241, 25998769.23615)
+controlGeomProps(geompy, riveGauche, 39489.5116033, 35889668.8348)
+controlGeomProps(geompy, digue, 10340.1424233, 102887.6201)
+controlGeomProps(geompy, litMineur, 30337.5484919, 3646827.74981)
+controlGeomProps(geompy, riveDroite, 32012.3432411, 26177085.4601)
if salome.sg.hasDesktop():
salome.sg.updateObjBrowser(1)
#garonne_2_digue_Right_Bank = geompy.CreateGroup(HYDRO_garonne_2, geompy.ShapeType["EDGE"])
#geompy.UnionIDs(garonne_2_digue_Right_Bank, [48])
-controlGeomProps(geompy, riveGauche, 39493.270283, 35845790.613557)
-controlGeomProps(geompy, digue, 10343.901103, 103037.738504)
-controlGeomProps(geompy, litMineur, 30337.548492, 3488480.304388)
-controlGeomProps(geompy, riveDroite, 32012.343241, 25998769.23615)
+controlGeomProps(geompy, riveGauche, 39489.5116033, 35889668.8348)
+controlGeomProps(geompy, digue, 10340.1424233, 102887.6201)
+controlGeomProps(geompy, litMineur, 30337.5484919, 3646827.74981)
+controlGeomProps(geompy, riveDroite, 32012.3432411, 26177085.4601)
#----------------------
# --- Meshing
#bordDroiteDomaine_2 = garonne_2.GroupOnGeom(bordDroiteDomaine,'bordDroiteDomaine',SMESH.NODE)
SectionsGaronne_3 = garonne_2.GroupOnGeom(SectionsGaronne,'SectionsGaronne',SMESH.NODE)
+
+med_file = r'/garonne_2.med'
+
+try:
+ os.remove(med_file)
+except OSError:
+ pass
+
garonne_2.SetAutoColor( 1 )
-garonne_2.ExportMED( r'/tmp/garonne_2.med', 0, SMESH.MED_V2_2, 1, None ,1)
+garonne_2.ExportMED( med_file, 0, SMESH.MED_V2_2, 1, None ,1)
-controlMeshStats(garonne_2, 6190, 691, 12201)
+controlMeshStats(garonne_2, 5247, 717, 10075)
controlSubMeshStats(litMineur_2, 2384)
-controlSubMeshStats(riveDroite_1, 2400)
-controlSubMeshStats(riveGauche_1, 6585)
-controlSubMeshStats(digue_1, 832)
+controlSubMeshStats(riveDroite_1, 2348)
+controlSubMeshStats(riveGauche_1, 5343)
+controlSubMeshStats(digue_1, 0)
if salome.sg.hasDesktop():
salome.sg.updateObjBrowser(1)
#garonne_2_digue_Right_Bank = geompy.CreateGroup(HYDRO_garonne_2, geompy.ShapeType["EDGE"])
#geompy.UnionIDs(garonne_2_digue_Right_Bank, [48])
-controlGeomProps(geompy, riveGauche, 39493.270283, 35845790.613557)
-controlGeomProps(geompy, digue, 10343.901103, 103037.738504)
-controlGeomProps(geompy, litMineur, 30337.548492, 3488480.304388)
-controlGeomProps(geompy, riveDroite, 32012.343241, 25998769.23615)
+controlGeomProps(geompy, riveGauche, 39489.5116033, 35889668.8348)
+controlGeomProps(geompy, digue, 10340.1424233, 102887.6201)
+controlGeomProps(geompy, litMineur, 30337.5484919, 3646827.74981)
+controlGeomProps(geompy, riveDroite, 32012.3432411, 26177085.4601)
#----------------------
# --- Meshing
#bordDroiteDomaine_2 = garonne_2.GroupOnGeom(bordDroiteDomaine,'bordDroiteDomaine',SMESH.NODE)
SectionsGaronne_3 = garonne_2.GroupOnGeom(SectionsGaronne,'SectionsGaronne',SMESH.NODE)
+
+med_file = r'/garonne_2.med'
+
+try:
+ os.remove(med_file)
+except OSError:
+ pass
+
+
garonne_2.SetAutoColor( 1 )
-garonne_2.ExportMED( r'/tmp/garonne_2.med', 0, SMESH.MED_V2_2, 1, None ,1)
+garonne_2.ExportMED( med_file, 0, SMESH.MED_V2_2, 1, None ,1)
-controlMeshStats(garonne_2, 6190, 691, 12201)
+controlMeshStats(garonne_2, 5247, 717, 10075)
controlSubMeshStats(litMineur_2, 2384)
-controlSubMeshStats(riveDroite_1, 2400)
-controlSubMeshStats(riveGauche_1, 6585)
-controlSubMeshStats(digue_1, 832)
+controlSubMeshStats(riveDroite_1, 2348)
+controlSubMeshStats(riveGauche_1, 5343)
+controlSubMeshStats(digue_1, 0)
if salome.sg.hasDesktop():
salome.sg.updateObjBrowser(1)
nomCas = 'garonne_2'
# --- med file 2D(x,y) of the case produced by SMESH
-fichierMaillage = '/tmp/garonne_2.med'
+fichierMaillage = med_file
# --- dictionary [med group name] = region name
dicoGroupeRegion= dict(litMineur = 'garonne_2_litMineur',
geompy.addToStudyInFather( HYDRO_casGaronne_1, piles, 'piles' )
# --- basic properties control: edges length, surfaces
-controlGeomProps(geompy, riveGauche, 29149.1353799, 35949580.6716)
-controlGeomProps(geompy, litMineur_aval, 7965.23431497, 935955.786347)
-controlGeomProps(geompy, litMineur_pont, 961.8255222, 19618.016847)
-controlGeomProps(geompy, litMineur_amont, 22635.6212065, 2531409.65041)
-controlGeomProps(geompy, riveDroite, 32012.2241814, 25998085.6892)
+controlGeomProps(geompy, riveGauche, 29149.1353799, 35950762.8967)
+controlGeomProps(geompy, litMineur_aval, 7965.23431497, 938890.904721)
+controlGeomProps(geompy, litMineur_pont, 961.8255222, 19618.0787789)
+controlGeomProps(geompy, litMineur_amont, 22635.6212065, 2548509.17447)
+controlGeomProps(geompy, riveDroite, 32012.2241814, 26188706.2202)
###
### SMESH component
smesh.SetName(nbseg_litMineur_amont, 'nbseg_litMineur_amont')
smesh.SetName(sections_1, 'sections')
+med_file = r'/casGaronne_1.med'
+
+try:
+ os.remove(med_file)
+except OSError:
+ pass
+
+
casGaronne_1.SetAutoColor( 1 )
-casGaronne_1.ExportMED( r'/tmp/casGaronne_1.med', 0, SMESH.MED_V2_2, 1, None ,1)
+casGaronne_1.ExportMED( med_file, 0, SMESH.MED_V2_2, 1, None ,1)
-controlMeshStats(casGaronne_1, 6985, 745, 13761)
-controlSubMeshStats(litMineur_pont_2, 185)
+controlMeshStats(casGaronne_1, 7040, 746, 13871)
+controlSubMeshStats(litMineur_pont_2, 204)
controlSubMeshStats(litMineur_amont_2, 3000)
controlSubMeshStats(litMineur_aval_2, 2000)
-controlSubMeshStats(riveDroite_1, 3941)
-controlSubMeshStats(riveGauche_1, 4635)
+controlSubMeshStats(riveDroite_1, 4040)
+controlSubMeshStats(riveGauche_1, 4627)
if salome.sg.hasDesktop():
domaine_1 = relief.GroupOnGeom(domaine,'domaine',SMESH.FACE)
domaine_2 = relief.GroupOnGeom(domaine,'domaine',SMESH.NODE)
smesh.SetName(relief, 'relief')
+
+med_file = r'/relief.med'
+
+try:
+ os.remove(med_file)
+except OSError:
+ pass
+
+
try:
- relief.ExportMED( r'/tmp/relief.med', 0, SMESH.MED_V2_2, 1, None ,1)
+ relief.ExportMED( med_file, 0, SMESH.MED_V2_2, 1, None ,1)
except:
print 'ExportToMEDX() failed. Invalid file name?'
nomCas = 'etude'
# --- fichier med 2D(x,y) du cas, produit par SMESH
-fichierMaillage = '/tmp/relief.med'
+fichierMaillage = med_file
# --- dictionnaire: (clé = nom de groupe med, valeur= nom de région)
dicoGroupeRegion= dict(domaine = 'etude_Reg_1',