#!/usr/bin/env python

###
### This file is generated automatically by SALOME v9.3.0 with dump python functionality
###

import sys
import salome

salome.salome_init()
import salome_notebook
notebook = salome_notebook.NoteBook()
sys.path.insert(0, r'C:\Users\User\Cenos\ZF\ZF_Germany_2//geometry//')

###
### SHAPER component
###

###
### GEOM component
###

import GEOM
from salome.geom import geomBuilder
import math
import SALOMEDS


geompy = geomBuilder.New()

O = geompy.MakeVertex(0, 0, 0)
OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
OZ = geompy.MakeVectorDXDYDZ(0, 0, 1)
O_1 = geompy.MakeVertex(0, 0, 0)
OX_1 = geompy.MakeVectorDXDYDZ(1, 0, 0)
OY_1 = geompy.MakeVectorDXDYDZ(0, 1, 0)
OZ_1 = geompy.MakeVectorDXDYDZ(0, 0, 1)
geomObj_1 = geompy.MakeVertex(0, 0, 0)
geomObj_2 = geompy.MakeVectorDXDYDZ(1, 0, 0)
geomObj_3 = geompy.MakeVectorDXDYDZ(0, 1, 0)
geomObj_4 = geompy.MakeVectorDXDYDZ(0, 0, 1)
ImportedGeometry_0 = geompy.ImportSTEP("D:/CENOS/ZF_Germany/Geometry/Airbox.step", False, True)
ImportedGeometry_1 = geompy.ImportSTEP("D:/CENOS/ZF_Germany/Geometry/Inductor.step", False, True)
[Solid_1,Solid_2] = geompy.SubShapes(ImportedGeometry_1, [3, 122])
ImportedGeometry_2 = geompy.ImportSTEP("D:/CENOS/ZF_Germany/Geometry/WP.step", False, True)
Partition_1 = geompy.MakePartition([Solid_1, Solid_2, ImportedGeometry_2, ImportedGeometry_0], [], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
[geomObj_5,_Face14,_Face29,_Face34,_Face47,_Face50,_Face53,_Face64,_Face69,_Face79,_Face81,_Face84,_Face95,_Face100,_Face109,_Face112,geomObj_6,_Face118,geomObj_7,_Face132,_Face147,_Face152,_Face165,_Face168,_Face171,_Face182,_Face187,_Face197,_Face199,_Face202,_Face213,_Face218,_Face227,_Face230,geomObj_8,_Face236,geomObj_9,geomObj_10,geomObj_11,geomObj_12,geomObj_13,geomObj_14,geomObj_15,geomObj_16,geomObj_17,geomObj_18,geomObj_19,geomObj_20,geomObj_21,geomObj_22,geomObj_23,geomObj_24,geomObj_25,geomObj_26,geomObj_27,geomObj_28,geomObj_29,geomObj_30,geomObj_31,geomObj_32,geomObj_33,geomObj_34,geomObj_35,geomObj_36,geomObj_37,geomObj_38,geomObj_39,geomObj_40,geomObj_41,geomObj_42,geomObj_43,geomObj_44,geomObj_45,geomObj_46,geomObj_47,geomObj_48,geomObj_49,geomObj_50,geomObj_51,geomObj_52,geomObj_53,geomObj_54,geomObj_55,geomObj_56,geomObj_57,geomObj_58,geomObj_59,geomObj_60,geomObj_61,geomObj_62,geomObj_63,geomObj_64,geomObj_65,geomObj_66,geomObj_67,geomObj_68,geomObj_69,geomObj_70,geomObj_71,geomObj_72,geomObj_73,geomObj_74,geomObj_75,geomObj_76,geomObj_77,geomObj_78,geomObj_79,geomObj_80] = geompy.SubShapeAll(Partition_1, geompy.ShapeType["FACE"])
Air_3D = geompy.CreateGroup(Partition_1, geompy.ShapeType["SOLID"])
geompy.UnionIDs(Air_3D, [602])
Air_infinity = geompy.CreateGroup(Partition_1, geompy.ShapeType["FACE"])
geompy.UnionIDs(Air_infinity, [635, 630, 614, 604, 621, 638])
WP = geompy.CreateGroup(Partition_1, geompy.ShapeType["SOLID"])
geompy.UnionIDs(WP, [238])
WP_interface = geompy.CreateGroup(Partition_1, geompy.ShapeType["FACE"])
geompy.UnionIDs(WP_interface, [462, 560, 250, 388, 314, 374, 555, 368, 590, 482, 536, 485, 445, 337, 522, 300, 502, 385, 563, 395, 580, 324, 258, 307, 398, 475, 550, 525, 435, 240, 290, 358, 353, 577, 268, 515, 587, 408, 382, 597, 405, 472, 334, 422, 344, 261, 600, 293, 452, 331, 505, 319, 570, 432, 415, 281, 495, 378, 425, 455, 492, 442, 543, 512, 465, 361])
Inductor_1 = geompy.CreateGroup(Partition_1, geompy.ShapeType["SOLID"])
geompy.UnionIDs(Inductor_1, [120])
Inductor_2 = geompy.CreateGroup(Partition_1, geompy.ShapeType["SOLID"])
geompy.UnionIDs(Inductor_2, [2])
T1 = geompy.CreateGroup(Partition_1, geompy.ShapeType["FACE"])
geompy.UnionIDs(T1, [122])
T2 = geompy.CreateGroup(Partition_1, geompy.ShapeType["FACE"])
geompy.UnionIDs(T2, [233])
T3 = geompy.CreateGroup(Partition_1, geompy.ShapeType["FACE"])
geompy.UnionIDs(T3, [4])
T4 = geompy.CreateGroup(Partition_1, geompy.ShapeType["FACE"])
geompy.UnionIDs(T4, [115])
[Air_3D, Air_infinity, WP, WP_interface, Inductor_1, Inductor_2, T1, T2, T3, T4] = geompy.GetExistingSubObjects(Partition_1, True)
[Air_3D, Air_infinity, WP, WP_interface, Inductor_1, Inductor_2, T1, T2, T3, T4] = geompy.GetExistingSubObjects(Partition_1, True)
[Air_3D, Air_infinity, WP, WP_interface, Inductor_1, Inductor_2, T1, T2, T3, T4] = geompy.GetExistingSubObjects(Partition_1, True)
[Air_3D, Air_infinity, WP, WP_interface, Inductor_1, Inductor_2, T1, T2, T3, T4] = geompy.GetExistingSubObjects(Partition_1, True)
[Air_3D, Air_infinity, WP, WP_interface, Inductor_1, Inductor_2, T1, T2, T3, T4] = geompy.GetExistingSubObjects(Partition_1, True)
[Air_3D, Air_infinity, WP, WP_interface, Inductor_1, Inductor_2, T1, T2, T3, T4] = geompy.GetExistingSubObjects(Partition_1, True)
[Air_3D, Air_infinity, WP, WP_interface, Inductor_1, Inductor_2, T1, T2, T3, T4] = geompy.GetExistingSubObjects(Partition_1, True)
[Air_3D, Air_infinity, WP, WP_interface, Inductor_1, Inductor_2, T1, T2, T3, T4] = geompy.GetExistingSubObjects(Partition_1, True)
[Air_3D, Air_infinity, WP, WP_interface, Inductor_1, Inductor_2, T1, T2, T3, T4] = geompy.GetExistingSubObjects(Partition_1, True)
[Air_3D, Air_infinity, WP, WP_interface, Inductor_1, Inductor_2, T1, T2, T3, T4] = geompy.GetExistingSubObjects(Partition_1, True)
[Air_3D, Air_infinity, WP, WP_interface, Inductor_1, Inductor_2, T1, T2, T3, T4] = geompy.GetExistingSubObjects(Partition_1, True)
[Air_3D, Air_infinity, WP, WP_interface, Inductor_1, Inductor_2, T1, T2, T3, T4] = geompy.GetExistingSubObjects(Partition_1, True)
[Air_3D, Air_infinity, WP, WP_interface, Inductor_1, Inductor_2, T1, T2, T3, T4] = geompy.GetExistingSubObjects(Partition_1, True)
[Air_3D, Air_infinity, WP, WP_interface, Inductor_1, Inductor_2, T1, T2, T3, T4] = geompy.GetExistingSubObjects(Partition_1, True)
[Air_3D, Air_infinity, WP, WP_interface, Inductor_1, Inductor_2, T1, T2, T3, T4] = geompy.GetExistingSubObjects(Partition_1, True)
[Air_3D, Air_infinity, WP, WP_interface, Inductor_1, Inductor_2, T1, T2, T3, T4] = geompy.GetExistingSubObjects(Partition_1, True)
[Air_3D, Air_infinity, WP, WP_interface, Inductor_1, Inductor_2, T1, T2, T3, T4] = geompy.GetExistingSubObjects(Partition_1, True)
[Air_3D, Air_infinity, WP, WP_interface, Inductor_1, Inductor_2, T1, T2, T3, T4] = geompy.GetExistingSubObjects(Partition_1, True)
geompy.addToStudy( O, 'O' )
geompy.addToStudy( OX, 'OX' )
geompy.addToStudy( OY, 'OY' )
geompy.addToStudy( OZ, 'OZ' )
geompy.addToStudy( O_1, 'O' )
geompy.addToStudy( OX_1, 'OX' )
geompy.addToStudy( OY_1, 'OY' )
geompy.addToStudy( OZ_1, 'OZ' )
geompy.addToStudy( ImportedGeometry_0, 'ImportedGeometry_0' )
geompy.addToStudy( ImportedGeometry_1, 'ImportedGeometry_1' )
geompy.addToStudy( ImportedGeometry_2, 'ImportedGeometry_2' )
geompy.addToStudyInFather( ImportedGeometry_1, Solid_1, 'Solid_1' )
geompy.addToStudyInFather( ImportedGeometry_1, Solid_2, 'Solid_2' )
geompy.addToStudy( Partition_1, 'Partition_1' )
geompy.addToStudyInFather( Partition_1, Air_3D, 'Air_3D' )
geompy.addToStudyInFather( Partition_1, Air_infinity, 'Air_infinity' )
geompy.addToStudyInFather( Partition_1, WP, 'WP' )
geompy.addToStudyInFather( Partition_1, WP_interface, 'WP_interface' )
geompy.addToStudyInFather( Partition_1, Inductor_1, 'Inductor_1' )
geompy.addToStudyInFather( Partition_1, Inductor_2, 'Inductor_2' )
geompy.addToStudyInFather( Partition_1, T1, 'T1' )
geompy.addToStudyInFather( Partition_1, T2, 'T2' )
geompy.addToStudyInFather( Partition_1, T3, 'T3' )
geompy.addToStudyInFather( Partition_1, T4, 'T4' )
geompy.addToStudyInFather( Partition_1, _Face14, '_Face14' )
geompy.addToStudyInFather( Partition_1, _Face29, '_Face29' )
geompy.addToStudyInFather( Partition_1, _Face34, '_Face34' )
geompy.addToStudyInFather( Partition_1, _Face47, '_Face47' )
geompy.addToStudyInFather( Partition_1, _Face50, '_Face50' )
geompy.addToStudyInFather( Partition_1, _Face53, '_Face53' )
geompy.addToStudyInFather( Partition_1, _Face64, '_Face64' )
geompy.addToStudyInFather( Partition_1, _Face69, '_Face69' )
geompy.addToStudyInFather( Partition_1, _Face79, '_Face79' )
geompy.addToStudyInFather( Partition_1, _Face81, '_Face81' )
geompy.addToStudyInFather( Partition_1, _Face84, '_Face84' )
geompy.addToStudyInFather( Partition_1, _Face95, '_Face95' )
geompy.addToStudyInFather( Partition_1, _Face100, '_Face100' )
geompy.addToStudyInFather( Partition_1, _Face109, '_Face109' )
geompy.addToStudyInFather( Partition_1, _Face112, '_Face112' )
geompy.addToStudyInFather( Partition_1, _Face118, '_Face118' )
geompy.addToStudyInFather( Partition_1, _Face132, '_Face132' )
geompy.addToStudyInFather( Partition_1, _Face147, '_Face147' )
geompy.addToStudyInFather( Partition_1, _Face152, '_Face152' )
geompy.addToStudyInFather( Partition_1, _Face165, '_Face165' )
geompy.addToStudyInFather( Partition_1, _Face168, '_Face168' )
geompy.addToStudyInFather( Partition_1, _Face171, '_Face171' )
geompy.addToStudyInFather( Partition_1, _Face182, '_Face182' )
geompy.addToStudyInFather( Partition_1, _Face187, '_Face187' )
geompy.addToStudyInFather( Partition_1, _Face197, '_Face197' )
geompy.addToStudyInFather( Partition_1, _Face199, '_Face199' )
geompy.addToStudyInFather( Partition_1, _Face202, '_Face202' )
geompy.addToStudyInFather( Partition_1, _Face213, '_Face213' )
geompy.addToStudyInFather( Partition_1, _Face218, '_Face218' )
geompy.addToStudyInFather( Partition_1, _Face227, '_Face227' )
geompy.addToStudyInFather( Partition_1, _Face230, '_Face230' )
geompy.addToStudyInFather( Partition_1, _Face236, '_Face236' )

###
### SMESH component
###

import  SMESH, SALOMEDS
from salome.smesh import smeshBuilder

smesh = smeshBuilder.New()
#smesh.SetEnablePublish( False ) # Set to False to avoid publish in study if not needed or in some particular situations:
                                 # multiples meshes built in parallel, complex and numerous mesh edition (performance)

aCriteria = []
aCriterion = smesh.GetCriterion(SMESH.FACE,SMESH.FT_AspectRatio3D,SMESH.FT_MoreThan,1000)
aCriteria.append(aCriterion)
aCriteria = []
aCriterion = smesh.GetCriterion(SMESH.FACE,SMESH.FT_AspectRatio3D,SMESH.FT_MoreThan,10000)
aCriteria.append(aCriterion)
aCriteria = []
aCriterion = smesh.GetCriterion(SMESH.FACE,SMESH.FT_Taper,SMESH.FT_MoreThan,0.3)
aCriteria.append(aCriterion)
aCriteria = []
aCriterion = smesh.GetCriterion(SMESH.FACE,SMESH.FT_Taper,SMESH.FT_MoreThan,0.5)
aCriteria.append(aCriterion)
Mesh_1 = smesh.Mesh(Partition_1)
Regular_1D = Mesh_1.Segment()
Max_Size_1 = Regular_1D.MaxSize(0.0339498)
NETGEN_2D = Mesh_1.Triangle(algo=smeshBuilder.NETGEN_2D)
NETGEN_3D = Mesh_1.Tetrahedron()
Regular_1D_1 = Mesh_1.Segment(geom=WP)
Max_Size_2 = Regular_1D_1.MaxSize(0.002)
NETGEN_2D_1 = Mesh_1.Triangle(algo=smeshBuilder.NETGEN_2D,geom=WP)
Length_From_Edges_1 = NETGEN_2D_1.LengthFromEdges()
NETGEN_3D_1 = Mesh_1.Tetrahedron(geom=WP)
Viscous_Layers_1 = NETGEN_3D_1.ViscousLayers(1.5,6,1.5,[],1,smeshBuilder.SURF_OFFSET_SMOOTH)
Viscous_Layers_1.SetTotalThickness( 0.00044 )
Viscous_Layers_1.SetNumberLayers( 6 )
Viscous_Layers_1.SetStretchFactor( 1.5 )
Viscous_Layers_1.SetMethod( smeshBuilder.SURF_OFFSET_SMOOTH )
Viscous_Layers_1.SetFaces( [], 1 )
Regular_1D_2 = Mesh_1.Segment(geom=smeshObj_1)
Max_Size_3 = Regular_1D_2.MaxSize(0.006)
NETGEN_2D_2 = Mesh_1.Triangle(algo=smeshBuilder.NETGEN_2D,geom=smeshObj_1)
Length_From_Edges_2 = NETGEN_2D_2.LengthFromEdges()
NETGEN_3D_2 = Mesh_1.Tetrahedron(geom=smeshObj_1)
Viscous_Layers_2 = NETGEN_3D_2.ViscousLayers(0.43,4,1.5,[ 122, 233 ],1,smeshBuilder.SURF_OFFSET_SMOOTH)
#Mesh_1.GetMesh().RemoveSubMesh( smeshObj_2 ) ### smeshObj_2 has not been yet created
Regular_1D_3 = Mesh_1.Segment(geom=Inductor_1)
status = Mesh_1.AddHypothesis(Max_Size_3,Inductor_1)
NETGEN_2D_3 = Mesh_1.Triangle(algo=smeshBuilder.NETGEN_2D,geom=Inductor_1)
status = Mesh_1.AddHypothesis(Length_From_Edges_2,Inductor_1)
NETGEN_3D_3 = Mesh_1.Tetrahedron(geom=Inductor_1)
status = Mesh_1.AddHypothesis(Viscous_Layers_2,Inductor_1)
Regular_1D_4 = Mesh_1.Segment(geom=Inductor_2)
status = Mesh_1.AddHypothesis(Max_Size_3,Inductor_2)
NETGEN_2D_4 = Mesh_1.Triangle(algo=smeshBuilder.NETGEN_2D,geom=Inductor_2)
status = Mesh_1.AddHypothesis(Length_From_Edges_2,Inductor_2)
NETGEN_3D_4 = Mesh_1.Tetrahedron(geom=Inductor_2)
Viscous_Layers_3 = NETGEN_3D_4.ViscousLayers(0.003,4,1.5,[ 4, 115 ],1,smeshBuilder.SURF_OFFSET_SMOOTH)
Air_3D_1 = Mesh_1.GroupOnGeom(Air_3D,'Air_3D',SMESH.VOLUME)
WP_1 = Mesh_1.GroupOnGeom(WP,'WP',SMESH.VOLUME)
Inductor_1_1 = Mesh_1.GroupOnGeom(Inductor_1,'Inductor_1',SMESH.VOLUME)
Inductor_2_1 = Mesh_1.GroupOnGeom(Inductor_2,'Inductor_2',SMESH.VOLUME)
Air_infinity_1 = Mesh_1.GroupOnGeom(Air_infinity,'Air_infinity',SMESH.FACE)
WP_interface_1 = Mesh_1.GroupOnGeom(WP_interface,'WP_interface',SMESH.FACE)
T1_1 = Mesh_1.GroupOnGeom(T1,'T1',SMESH.FACE)
T2_1 = Mesh_1.GroupOnGeom(T2,'T2',SMESH.FACE)
T3_1 = Mesh_1.GroupOnGeom(T3,'T3',SMESH.FACE)
T4_1 = Mesh_1.GroupOnGeom(T4,'T4',SMESH.FACE)
aCriteria = []
aCriterion = smesh.GetCriterion(SMESH.FACE,SMESH.FT_AspectRatio3D,SMESH.FT_MoreThan,1000)
aCriteria.append(aCriterion)
aCriteria = []
aCriterion = smesh.GetCriterion(SMESH.FACE,SMESH.FT_AspectRatio3D,SMESH.FT_MoreThan,10000)
aCriteria.append(aCriterion)
aCriteria = []
aCriterion = smesh.GetCriterion(SMESH.FACE,SMESH.FT_Taper,SMESH.FT_MoreThan,0.3)
aCriteria.append(aCriterion)
aCriteria = []
aCriterion = smesh.GetCriterion(SMESH.FACE,SMESH.FT_Taper,SMESH.FT_MoreThan,0.5)
aCriteria.append(aCriterion)
Max_Size_3.SetLength( 0.005 )
Viscous_Layers_2.SetTotalThickness( 0.0021 )
Viscous_Layers_2.SetNumberLayers( 5 )
Viscous_Layers_2.SetStretchFactor( 1.5 )
Viscous_Layers_2.SetMethod( smeshBuilder.SURF_OFFSET_SMOOTH )
Viscous_Layers_2.SetFaces( [ 122, 233 ], 1 )
Viscous_Layers_3.SetTotalThickness( 0.0021 )
Viscous_Layers_3.SetNumberLayers( 5 )
Viscous_Layers_3.SetStretchFactor( 1.5 )
Viscous_Layers_3.SetMethod( smeshBuilder.SURF_OFFSET_SMOOTH )
Viscous_Layers_3.SetFaces( [ 4, 115 ], 1 )
isDone = Mesh_1.Compute()
aCriteria = []
aCriterion = smesh.GetCriterion(SMESH.FACE,SMESH.FT_AspectRatio3D,SMESH.FT_MoreThan,1000)
aCriteria.append(aCriterion)
aCriteria = []
aCriterion = smesh.GetCriterion(SMESH.FACE,SMESH.FT_AspectRatio3D,SMESH.FT_MoreThan,10000)
aCriteria.append(aCriterion)
aCriteria = []
aCriterion = smesh.GetCriterion(SMESH.FACE,SMESH.FT_Taper,SMESH.FT_MoreThan,0.3)
aCriteria.append(aCriterion)
aCriteria = []
aCriterion = smesh.GetCriterion(SMESH.FACE,SMESH.FT_Taper,SMESH.FT_MoreThan,0.5)
aCriteria.append(aCriterion)
[ Air_3D_1, WP_1, Inductor_1_1, Inductor_2_1, Air_infinity_1, WP_interface_1, T1_1, T2_1, T3_1, T4_1 ] = Mesh_1.GetGroups()
_Face14_1 = Mesh_1.GroupOnGeom(_Face14,'_Face14',SMESH.FACE)
_Face29_1 = Mesh_1.GroupOnGeom(_Face29,'_Face29',SMESH.FACE)
_Face34_1 = Mesh_1.GroupOnGeom(_Face34,'_Face34',SMESH.FACE)
_Face47_1 = Mesh_1.GroupOnGeom(_Face47,'_Face47',SMESH.FACE)
_Face50_1 = Mesh_1.GroupOnGeom(_Face50,'_Face50',SMESH.FACE)
_Face53_1 = Mesh_1.GroupOnGeom(_Face53,'_Face53',SMESH.FACE)
_Face64_1 = Mesh_1.GroupOnGeom(_Face64,'_Face64',SMESH.FACE)
_Face69_1 = Mesh_1.GroupOnGeom(_Face69,'_Face69',SMESH.FACE)
_Face79_1 = Mesh_1.GroupOnGeom(_Face79,'_Face79',SMESH.FACE)
_Face81_1 = Mesh_1.GroupOnGeom(_Face81,'_Face81',SMESH.FACE)
_Face84_1 = Mesh_1.GroupOnGeom(_Face84,'_Face84',SMESH.FACE)
_Face95_1 = Mesh_1.GroupOnGeom(_Face95,'_Face95',SMESH.FACE)
_Face100_1 = Mesh_1.GroupOnGeom(_Face100,'_Face100',SMESH.FACE)
_Face109_1 = Mesh_1.GroupOnGeom(_Face109,'_Face109',SMESH.FACE)
_Face112_1 = Mesh_1.GroupOnGeom(_Face112,'_Face112',SMESH.FACE)
_Face118_1 = Mesh_1.GroupOnGeom(_Face118,'_Face118',SMESH.FACE)
_Face132_1 = Mesh_1.GroupOnGeom(_Face132,'_Face132',SMESH.FACE)
_Face147_1 = Mesh_1.GroupOnGeom(_Face147,'_Face147',SMESH.FACE)
_Face152_1 = Mesh_1.GroupOnGeom(_Face152,'_Face152',SMESH.FACE)
_Face165_1 = Mesh_1.GroupOnGeom(_Face165,'_Face165',SMESH.FACE)
_Face168_1 = Mesh_1.GroupOnGeom(_Face168,'_Face168',SMESH.FACE)
_Face171_1 = Mesh_1.GroupOnGeom(_Face171,'_Face171',SMESH.FACE)
_Face182_1 = Mesh_1.GroupOnGeom(_Face182,'_Face182',SMESH.FACE)
_Face187_1 = Mesh_1.GroupOnGeom(_Face187,'_Face187',SMESH.FACE)
_Face197_1 = Mesh_1.GroupOnGeom(_Face197,'_Face197',SMESH.FACE)
_Face199_1 = Mesh_1.GroupOnGeom(_Face199,'_Face199',SMESH.FACE)
_Face202_1 = Mesh_1.GroupOnGeom(_Face202,'_Face202',SMESH.FACE)
_Face213_1 = Mesh_1.GroupOnGeom(_Face213,'_Face213',SMESH.FACE)
_Face218_1 = Mesh_1.GroupOnGeom(_Face218,'_Face218',SMESH.FACE)
_Face227_1 = Mesh_1.GroupOnGeom(_Face227,'_Face227',SMESH.FACE)
_Face230_1 = Mesh_1.GroupOnGeom(_Face230,'_Face230',SMESH.FACE)
_Face236_1 = Mesh_1.GroupOnGeom(_Face236,'_Face236',SMESH.FACE)
[ Air_3D_1, WP_1, Inductor_1_1, Inductor_2_1, Air_infinity_1, WP_interface_1, T1_1, T2_1, T3_1, T4_1, _Face14_1, _Face29_1, _Face34_1, _Face47_1, _Face50_1, _Face53_1, _Face64_1, _Face69_1, _Face79_1, _Face81_1, _Face84_1, _Face95_1, _Face100_1, _Face109_1, _Face112_1, _Face118_1, _Face132_1, _Face147_1, _Face152_1, _Face165_1, _Face168_1, _Face171_1, _Face182_1, _Face187_1, _Face197_1, _Face199_1, _Face202_1, _Face213_1, _Face218_1, _Face227_1, _Face230_1, _Face236_1 ] = Mesh_1.GetGroups()
WP_2 = Regular_1D_1.GetSubMesh()
Inductor_1_2 = Regular_1D_3.GetSubMesh()
Inductor_2_2 = Regular_1D_4.GetSubMesh()

## some objects were removed
aStudyBuilder = salome.myStudy.NewBuilder()
SO = salome.myStudy.FindObjectIOR(salome.myStudy.ConvertObjectToIOR(smeshObj_1))
if SO: aStudyBuilder.RemoveObjectWithChildren(SO)

## Set names of Mesh objects
smesh.SetName(_Face14_1, '_Face14')
smesh.SetName(_Face29_1, '_Face29')
smesh.SetName(T4_1, 'T4')
smesh.SetName(T2_1, 'T2')
smesh.SetName(T3_1, 'T3')
smesh.SetName(WP_2, 'WP')
smesh.SetName(WP_interface_1, 'WP_interface')
smesh.SetName(T1_1, 'T1')
smesh.SetName(Inductor_2_2, 'Inductor_2')
smesh.SetName(Inductor_1_2, 'Inductor_1')
smesh.SetName(Air_infinity_1, 'Air_infinity')
smesh.SetName(_Face95_1, '_Face95')
smesh.SetName(_Face84_1, '_Face84')
smesh.SetName(_Face81_1, '_Face81')
smesh.SetName(_Face79_1, '_Face79')
smesh.SetName(_Face69_1, '_Face69')
smesh.SetName(_Face64_1, '_Face64')
smesh.SetName(_Face53_1, '_Face53')
smesh.SetName(_Face50_1, '_Face50')
smesh.SetName(_Face47_1, '_Face47')
smesh.SetName(_Face34_1, '_Face34')
smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D')
smesh.SetName(NETGEN_2D.GetAlgorithm(), 'NETGEN 2D')
smesh.SetName(NETGEN_3D.GetAlgorithm(), 'NETGEN 3D')
smesh.SetName(_Face236_1, '_Face236')
smesh.SetName(Max_Size_2, 'Max Size_2')
smesh.SetName(_Face230_1, '_Face230')
smesh.SetName(Max_Size_1, 'Max Size_1')
smesh.SetName(Viscous_Layers_1, 'Viscous Layers_1')
smesh.SetName(Length_From_Edges_1, 'Length From Edges_1')
smesh.SetName(_Face213_1, '_Face213')
smesh.SetName(Length_From_Edges_2, 'Length From Edges_2')
smesh.SetName(_Face202_1, '_Face202')
smesh.SetName(_Face168_1, '_Face168')
smesh.SetName(Max_Size_3, 'Max Size_3')
smesh.SetName(_Face227_1, '_Face227')
smesh.SetName(_Face171_1, '_Face171')
smesh.SetName(_Face218_1, '_Face218')
smesh.SetName(Viscous_Layers_2, 'Viscous Layers_2')
smesh.SetName(_Face187_1, '_Face187')
smesh.SetName(Viscous_Layers_3, 'Viscous Layers_3')
smesh.SetName(_Face182_1, '_Face182')
smesh.SetName(_Face132_1, '_Face132')
smesh.SetName(_Face199_1, '_Face199')
smesh.SetName(_Face147_1, '_Face147')
smesh.SetName(Mesh_1.GetMesh(), 'Mesh_1')
smesh.SetName(_Face197_1, '_Face197')
smesh.SetName(_Face152_1, '_Face152')
smesh.SetName(_Face165_1, '_Face165')
smesh.SetName(_Face100_1, '_Face100')
smesh.SetName(_Face109_1, '_Face109')
smesh.SetName(_Face112_1, '_Face112')
smesh.SetName(_Face118_1, '_Face118')
smesh.SetName(Air_3D_1, 'Air_3D')
smesh.SetName(Inductor_1_1, 'Inductor_1')
smesh.SetName(WP_1, 'WP')
smesh.SetName(Inductor_2_1, 'Inductor_2')


if salome.sg.hasDesktop():
  salome.sg.updateObjBrowser()
