#!/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:/Cenos/Cases/TFX/Uniedge/geometry')

####################################################
##       Begin of NoteBook variables section      ##
####################################################
notebook.set("N_Pene_Strip", 12)
notebook.set("N_Trans_Strip", 15)
notebook.set("N_Rest_Strip", 40)
notebook.set("N_Tickness_Strip", 1)
notebook.set("N_X_In_Out_Strip", 20)
notebook.set("N_X_Wind_Strip", 75)
####################################################
##        End of NoteBook variables section       ##
####################################################
###
### SHAPER component
###

from salome.shaper import model

model.begin()
partSet = model.moduleDocument()
model.end()
###
### 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("C:/Cenos/Cases/TFX/Uniedge/geometry/input/Air.step", False, True)
ImportedGeometry_1 = geompy.ImportSTEP("C:/Cenos/Cases/TFX/Uniedge/geometry/input/Strip.step", False, True)
ImportedGeometry_2 = geompy.ImportSTEP("C:/Cenos/Cases/TFX/Uniedge/geometry/input/System.step", False, True)
Partition_1 = geompy.MakePartition([ImportedGeometry_0, ImportedGeometry_1, ImportedGeometry_2], [], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
[geomObj_5,geomObj_6,geomObj_7,geomObj_8,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,geomObj_81,geomObj_82,geomObj_83,geomObj_84,geomObj_85,geomObj_86,geomObj_87,geomObj_88,geomObj_89,geomObj_90,geomObj_91,geomObj_92,geomObj_93,geomObj_94,geomObj_95,geomObj_96,geomObj_97,geomObj_98] = geompy.SubShapeAll(Partition_1, geompy.ShapeType["FACE"])
[geomObj_99,geomObj_100,geomObj_101,geomObj_102,geomObj_103,geomObj_104,geomObj_105,geomObj_106,geomObj_107,geomObj_108,geomObj_109,geomObj_110,geomObj_111,geomObj_112,geomObj_113,geomObj_114,geomObj_115,geomObj_116,geomObj_117,geomObj_118,geomObj_119,geomObj_120,geomObj_121,geomObj_122,geomObj_123,geomObj_124,geomObj_125,geomObj_126,geomObj_127,geomObj_128,geomObj_129,geomObj_130,geomObj_131,geomObj_132,geomObj_133,geomObj_134,geomObj_135,geomObj_136,geomObj_137,geomObj_138,geomObj_139,geomObj_140,geomObj_141,geomObj_142,geomObj_143,geomObj_144,geomObj_145,geomObj_146,geomObj_147,geomObj_148,geomObj_149,geomObj_150,geomObj_151,geomObj_152,geomObj_153,geomObj_154,geomObj_155,geomObj_156,geomObj_157,geomObj_158,geomObj_159,geomObj_160,geomObj_161,geomObj_162,geomObj_163,geomObj_164,geomObj_165,geomObj_166,geomObj_167,geomObj_168,geomObj_169,geomObj_170,geomObj_171,geomObj_172,geomObj_173,geomObj_174,geomObj_175,geomObj_176,geomObj_177,geomObj_178,geomObj_179,geomObj_180,geomObj_181,geomObj_182,geomObj_183,geomObj_184,geomObj_185,geomObj_186,geomObj_187,geomObj_188,geomObj_189,geomObj_190,geomObj_191,geomObj_192] = geompy.SubShapeAll(Partition_1, geompy.ShapeType["FACE"])
[geomObj_193,geomObj_194,geomObj_195,geomObj_196,geomObj_197,geomObj_198,geomObj_199,geomObj_200,geomObj_201,geomObj_202,geomObj_203,geomObj_204,geomObj_205,geomObj_206,geomObj_207,geomObj_208,geomObj_209,geomObj_210,geomObj_211,geomObj_212,geomObj_213,geomObj_214,geomObj_215,geomObj_216,geomObj_217,geomObj_218,geomObj_219,geomObj_220,geomObj_221,geomObj_222,geomObj_223,geomObj_224,geomObj_225,geomObj_226,geomObj_227,geomObj_228,geomObj_229,geomObj_230,geomObj_231,geomObj_232,geomObj_233,geomObj_234,geomObj_235,geomObj_236,geomObj_237,geomObj_238,geomObj_239,geomObj_240,geomObj_241,geomObj_242,geomObj_243,geomObj_244,geomObj_245,geomObj_246,geomObj_247,geomObj_248,geomObj_249,geomObj_250,geomObj_251,geomObj_252,geomObj_253,geomObj_254,geomObj_255,geomObj_256,geomObj_257,geomObj_258,geomObj_259,geomObj_260,geomObj_261,geomObj_262,geomObj_263,geomObj_264,geomObj_265,geomObj_266,geomObj_267,geomObj_268,geomObj_269,geomObj_270,geomObj_271,geomObj_272,geomObj_273,geomObj_274,geomObj_275,geomObj_276,geomObj_277,geomObj_278,geomObj_279,geomObj_280,geomObj_281,geomObj_282,geomObj_283,geomObj_284,geomObj_285,geomObj_286] = geompy.SubShapeAll(Partition_1, geompy.ShapeType["FACE"])
Strip_Z_Pene = geompy.CreateGroup(Partition_1, geompy.ShapeType["EDGE"])
geompy.UnionIDs(Strip_Z_Pene, [13, 75, 184, 114])
Strip_Z_Trans = geompy.CreateGroup(Partition_1, geompy.ShapeType["EDGE"])
geompy.UnionIDs(Strip_Z_Trans, [116, 179, 70, 11])
Strip_Z_Rest = geompy.CreateGroup(Partition_1, geompy.ShapeType["EDGE"])
geompy.UnionIDs(Strip_Z_Rest, [9, 65, 102, 107])
Strip_X_In_Out = geompy.CreateGroup(Partition_1, geompy.ShapeType["EDGE"])
geompy.UnionIDs(Strip_X_In_Out, [24, 67, 72, 77, 192, 195, 109, 28])
Strip_X_Wind = geompy.CreateGroup(Partition_1, geompy.ShapeType["EDGE"])
geompy.UnionIDs(Strip_X_Wind, [104, 26, 181, 186])
Strip_Skin = geompy.CreateGroup(Partition_1, geompy.ShapeType["FACE"])
geompy.UnionIDs(Strip_Skin, [68, 63, 182, 196, 177, 105, 193, 100, 73, 187, 78, 190])
Strip_Normal = geompy.CreateGroup(Partition_1, geompy.ShapeType["FACE"])
geompy.UnionIDs(Strip_Normal, [376, 390, 476, 457, 386, 469, 420, 450, 359])
Strip_parallel = geompy.CreateGroup(Partition_1, geompy.ShapeType["FACE"])
geompy.UnionIDs(Strip_parallel, [417, 397, 356])
Strip_in = geompy.CreateGroup(Partition_1, geompy.ShapeType["FACE"])
geompy.UnionIDs(Strip_in, [373, 351, 383])
Strip_out = geompy.CreateGroup(Partition_1, geompy.ShapeType["FACE"])
geompy.UnionIDs(Strip_out, [407, 473, 466])
Air_Normal = geompy.CreateGroup(Partition_1, geompy.ShapeType["FACE"])
geompy.UnionIDs(Air_Normal, [83])
Air_Parallel = geompy.CreateGroup(Partition_1, geompy.ShapeType["FACE"])
geompy.UnionIDs(Air_Parallel, [22])
Air_Infinity = geompy.CreateGroup(Partition_1, geompy.ShapeType["FACE"])
geompy.UnionIDs(Air_Infinity, [97, 92, 110, 4])
Ind1_Plus = geompy.CreateGroup(Partition_1, geompy.ShapeType["FACE"])
geompy.UnionIDs(Ind1_Plus, [438])
Ind2_Plus = geompy.CreateGroup(Partition_1, geompy.ShapeType["FACE"])
geompy.UnionIDs(Ind2_Plus, [432])
Ind3_Plus = geompy.CreateGroup(Partition_1, geompy.ShapeType["FACE"])
geompy.UnionIDs(Ind3_Plus, [426])
Ind1_Minus = geompy.CreateGroup(Partition_1, geompy.ShapeType["FACE"])
geompy.UnionIDs(Ind1_Minus, [436])
Ind2_Minus = geompy.CreateGroup(Partition_1, geompy.ShapeType["FACE"])
geompy.UnionIDs(Ind2_Minus, [430])
Ind3_Minus = geompy.CreateGroup(Partition_1, geompy.ShapeType["FACE"])
geompy.UnionIDs(Ind3_Minus, [424])
Air = geompy.CreateGroup(Partition_1, geompy.ShapeType["SOLID"])
geompy.UnionIDs(Air, [2])
Ind1 = geompy.CreateGroup(Partition_1, geompy.ShapeType["SOLID"])
geompy.UnionIDs(Ind1, [434])
Ind2 = geompy.CreateGroup(Partition_1, geompy.ShapeType["SOLID"])
geompy.UnionIDs(Ind2, [428])
Ind3 = geompy.CreateGroup(Partition_1, geompy.ShapeType["SOLID"])
geompy.UnionIDs(Ind3, [422])
Core = geompy.CreateGroup(Partition_1, geompy.ShapeType["SOLID"])
geompy.UnionIDs(Core, [478])
Strip = geompy.CreateGroup(Partition_1, geompy.ShapeType["SOLID"])
geompy.UnionIDs(Strip, [471, 361, 440, 388, 337, 405, 378, 452, 459])
Group_Inds = geompy.CreateGroup(Partition_1, geompy.ShapeType["SOLID"])
geompy.UnionIDs(Group_Inds, [434, 428, 422])
Strip_Surface_Top = geompy.CreateGroup(Partition_1, geompy.ShapeType["FACE"])
geompy.UnionIDs(Strip_Surface_Top, [68, 105, 177, 63, 193, 100, 73, 182, 196])
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
geompy.DifferenceIDs(Strip_Normal, [450, 359])
geompy.UnionIDs(Strip_Normal, [474, 444, 481, 410, 400, 383, 414, 493, 500])
geompy.DifferenceIDs(Strip_Normal, [474, 444, 481, 410, 400, 383, 414, 493, 500])
geompy.UnionIDs(Strip_Normal, [421, 380, 441])
geompy.DifferenceIDs(Strip_Normal, [421, 380, 441])
geompy.UnionIDs(Strip_Normal, [375, 397, 407])
geompy.DifferenceIDs(Strip_out, [407, 466])
geompy.UnionIDs(Strip_out, [490, 497, 431])
geompy.DifferenceIDs(Air_Normal, [83])
geompy.UnionIDs(Air_Normal, [83])
geompy.DifferenceIDs(Ind1_Plus, [438])
geompy.UnionIDs(Ind1_Plus, [462])
geompy.UnionIDs(Ind2_Plus, [456])
geompy.UnionIDs(Ind3_Plus, [450])
geompy.DifferenceIDs(Ind3_Plus, [450])
geompy.UnionIDs(Ind3_Plus, [450])
geompy.UnionIDs(Ind1_Minus, [460])
geompy.UnionIDs(Ind2_Minus, [454])
geompy.DifferenceIDs(Ind3_Minus, [424])
geompy.UnionIDs(Ind3_Minus, [448])
geompy.DifferenceIDs(Air, [2])
geompy.UnionIDs(Air, [2])
geompy.UnionIDs(Ind1, [458])
geompy.UnionIDs(Ind2, [452])
geompy.UnionIDs(Ind3, [446])
geompy.UnionIDs(Core, [502])
geompy.DifferenceIDs(Strip, [361, 452])
geompy.UnionIDs(Strip, [385, 483, 361, 476, 429, 464, 412, 402, 495])
geompy.UnionIDs(Group_Inds, [458, 452, 446])
geompy.DifferenceIDs(Strip_Surface_Top, [68, 105, 177, 63, 193, 100, 73, 182, 196])
geompy.UnionIDs(Strip_Surface_Top, [182, 196, 177, 105, 193, 63, 100, 73, 68])
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
[Strip_Z_Pene, Strip_Z_Trans, Strip_Z_Rest, Strip_X_In_Out, Strip_X_Wind, Strip_Skin, Strip_Normal, Strip_parallel, Strip_in, Strip_out, Air_Normal, Air_Parallel, Air_Infinity, Ind1_Plus, Ind2_Plus, Ind3_Plus, Ind1_Minus, Ind2_Minus, Ind3_Minus, Air, Ind1, Ind2, Ind3, Core, Strip, Group_Inds, Strip_Surface_Top] = geompy.GetExistingSubObjects(Partition_1, True)
geompy.DifferenceIDs(Strip_parallel, [397, 356])
geompy.UnionIDs(Strip_parallel, [421, 441, 380])
geompy.DifferenceIDs(Strip_Normal, [375, 397, 407])
geompy.UnionIDs(Strip_Normal, [481, 383, 493, 500, 400, 410, 444, 474, 414])
geompy.DifferenceIDs(Strip_in, [383])
geompy.UnionIDs(Strip_in, [407, 397, 375])
geompy.DifferenceIDs(Strip_out, [490, 497, 431])
geompy.UnionIDs(Strip_out, [490, 497, 431])
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.addToStudy( Partition_1, 'Partition_1' )
geompy.addToStudyInFather( Partition_1, Strip_Z_Pene, 'Strip_Z_Pene' )
geompy.addToStudyInFather( Partition_1, Strip_Z_Trans, 'Strip_Z_Trans' )
geompy.addToStudyInFather( Partition_1, Strip_Z_Rest, 'Strip_Z_Rest' )
geompy.addToStudyInFather( Partition_1, Strip_X_In_Out, 'Strip_X_In_Out' )
geompy.addToStudyInFather( Partition_1, Strip_X_Wind, 'Strip_X_Wind' )
geompy.addToStudyInFather( Partition_1, Strip_Skin, 'Strip_Skin' )
geompy.addToStudyInFather( Partition_1, Strip_Normal, 'Strip_Normal' )
geompy.addToStudyInFather( Partition_1, Strip_parallel, 'Strip_parallel' )
geompy.addToStudyInFather( Partition_1, Strip_in, 'Strip_in' )
geompy.addToStudyInFather( Partition_1, Strip_out, 'Strip_out' )
geompy.addToStudyInFather( Partition_1, Air_Normal, 'Air_Normal' )
geompy.addToStudyInFather( Partition_1, Air_Parallel, 'Air_Parallel' )
geompy.addToStudyInFather( Partition_1, Air_Infinity, 'Air_Infinity' )
geompy.addToStudyInFather( Partition_1, Ind1_Plus, 'Ind1_Plus' )
geompy.addToStudyInFather( Partition_1, Ind2_Plus, 'Ind2_Plus' )
geompy.addToStudyInFather( Partition_1, Ind3_Plus, 'Ind3_Plus' )
geompy.addToStudyInFather( Partition_1, Ind1_Minus, 'Ind1_Minus' )
geompy.addToStudyInFather( Partition_1, Ind2_Minus, 'Ind2_Minus' )
geompy.addToStudyInFather( Partition_1, Ind3_Minus, 'Ind3_Minus' )
geompy.addToStudyInFather( Partition_1, Air, 'Air' )
geompy.addToStudyInFather( Partition_1, Ind1, 'Ind1' )
geompy.addToStudyInFather( Partition_1, Ind2, 'Ind2' )
geompy.addToStudyInFather( Partition_1, Ind3, 'Ind3' )
geompy.addToStudyInFather( Partition_1, Core, 'Core' )
geompy.addToStudyInFather( Partition_1, Strip, 'Strip' )
geompy.addToStudyInFather( Partition_1, Group_Inds, 'Group_Inds' )
geompy.addToStudyInFather( Partition_1, Strip_Surface_Top, 'Strip_Surface_Top' )

###
### 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)

Maillage_1 = smesh.Mesh(Partition_1)
Regular_1D = Maillage_1.Segment(geom=Strip_Z_Pene)
Pene_Strip = Regular_1D.GetSubMesh()
Regular_1D_1 = Maillage_1.Segment(geom=Strip_Z_Trans)
Transition = Regular_1D_1.GetSubMesh()
Number_of_Segments_1 = Regular_1D_1.NumberOfSegments("N_Trans_Strip",None,[])
Regular_1D_2 = Maillage_1.Segment(geom=Strip_Z_Rest)
Rest_WStrip = Regular_1D_2.GetSubMesh()
Number_of_Segments_2 = Regular_1D_2.NumberOfSegments("N_Rest_Strip",None,[])
Number_of_Segments_3 = Regular_1D.NumberOfSegments("N_Pene_Strip",None,[])
Regular_1D_3 = Maillage_1.Segment(geom=Strip_X_In_Out)
Strip_X_InOut = Regular_1D_3.GetSubMesh()
Number_of_Segments_4 = Regular_1D_3.NumberOfSegments("N_X_In_Out_Strip",None,[])
Regular_1D_4 = Maillage_1.Segment(geom=Strip_X_Wind)
Strip_X_Wind_1 = Regular_1D_4.GetSubMesh()
Number_of_Segments_5 = Regular_1D_4.NumberOfSegments("N_X_Wind_Strip",None,[])
Regular_1D_5 = Maillage_1.Segment(geom=Strip_Surface_Top)
Strip_Surf_Top = Regular_1D_5.GetSubMesh()
Quadrangle_2D = Maillage_1.Quadrangle(algo=smeshBuilder.QUADRANGLE,geom=Strip_Surface_Top)
Regular_1D_6 = Maillage_1.Segment(geom=Strip)
Number_of_Segments_6 = Regular_1D_6.NumberOfSegments("N_Tickness_Strip",None,[])
Strip_1 = Regular_1D_6.GetSubMesh()
Prism_3D = Maillage_1.Prism(geom=Strip)
isDone = Maillage_1.SetMeshOrder( [ [ Pene_Strip, Transition, Rest_WStrip, Strip_X_InOut, Strip_X_Wind_1, Strip_Surf_Top, Strip_1 ] ])
Regular_1D_7 = Maillage_1.Segment(geom=Group_Inds)
Max_Size_1 = Regular_1D_7.MaxSize(0.025)
MEFISTO_2D = Maillage_1.Triangle(algo=smeshBuilder.MEFISTO,geom=Group_Inds)
NETGEN_3D = Maillage_1.Tetrahedron(geom=Group_Inds)
Regular_1D_8 = Maillage_1.Segment(geom=Core)
Max_Size_2 = Regular_1D_8.MaxSize(0.04)
MEFISTO_2D_1 = Maillage_1.Triangle(algo=smeshBuilder.MEFISTO,geom=Core)
NETGEN_3D_1 = Maillage_1.Tetrahedron(geom=Core)
theNbElems = Maillage_1.Evaluate(Partition_1)
Max_Size_3 = smesh.CreateHypothesis('MaxLength')
Max_Size_3.SetLength( 1 )
Regular_1D_9 = Maillage_1.Segment()
Max_Size_4 = Regular_1D_9.MaxSize(0.27313)
MEFISTO_2D_2 = Maillage_1.Triangle(algo=smeshBuilder.MEFISTO)
NETGEN_3D_2 = Maillage_1.Tetrahedron()
Air_1 = Maillage_1.GroupOnGeom(Air,'Air',SMESH.VOLUME)
Ind1_1 = Maillage_1.GroupOnGeom(Ind1,'Ind1',SMESH.VOLUME)
Ind2_1 = Maillage_1.GroupOnGeom(Ind2,'Ind2',SMESH.VOLUME)
Ind3_1 = Maillage_1.GroupOnGeom(Ind3,'Ind3',SMESH.VOLUME)
Core_1 = Maillage_1.GroupOnGeom(Core,'Core',SMESH.VOLUME)
Strip_2 = Maillage_1.GroupOnGeom(Strip,'Strip',SMESH.VOLUME)
Strip_Skin_1 = Maillage_1.GroupOnGeom(Strip_Skin,'Strip_Skin',SMESH.FACE)
Strip_Normal_1 = Maillage_1.GroupOnGeom(Strip_Normal,'Strip_Normal',SMESH.FACE)
Strip_parallel_1 = Maillage_1.GroupOnGeom(Strip_parallel,'Strip_parallel',SMESH.FACE)
Strip_in_1 = Maillage_1.GroupOnGeom(Strip_in,'Strip_in',SMESH.FACE)
Strip_out_1 = Maillage_1.GroupOnGeom(Strip_out,'Strip_out',SMESH.FACE)
Air_Normal_1 = Maillage_1.GroupOnGeom(Air_Normal,'Air_Normal',SMESH.FACE)
Air_Parallel_1 = Maillage_1.GroupOnGeom(Air_Parallel,'Air_Parallel',SMESH.FACE)
Air_Infinity_1 = Maillage_1.GroupOnGeom(Air_Infinity,'Air_Infinity',SMESH.FACE)
Ind1_Plus_1 = Maillage_1.GroupOnGeom(Ind1_Plus,'Ind1_Plus',SMESH.FACE)
Ind2_Plus_1 = Maillage_1.GroupOnGeom(Ind2_Plus,'Ind2_Plus',SMESH.FACE)
Ind3_Plus_1 = Maillage_1.GroupOnGeom(Ind3_Plus,'Ind3_Plus',SMESH.FACE)
Ind1_Minus_1 = Maillage_1.GroupOnGeom(Ind1_Minus,'Ind1_Minus',SMESH.FACE)
Ind2_Minus_1 = Maillage_1.GroupOnGeom(Ind2_Minus,'Ind2_Minus',SMESH.FACE)
Ind3_Minus_1 = Maillage_1.GroupOnGeom(Ind3_Minus,'Ind3_Minus',SMESH.FACE)
[ Air_1, Ind1_1, Ind2_1, Ind3_1, Core_1, Strip_2, Strip_Skin_1, Strip_Normal_1, Strip_parallel_1, Strip_in_1, Strip_out_1, Air_Normal_1, Air_Parallel_1, Air_Infinity_1, Ind1_Plus_1, Ind2_Plus_1, Ind3_Plus_1, Ind1_Minus_1, Ind2_Minus_1, Ind3_Minus_1 ] = Maillage_1.GetGroups()
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_1, Ind1_1, Ind2_1, Ind3_1, Core_1, Strip_2, Strip_Skin_1, Strip_Normal_1, Strip_parallel_1, Strip_in_1, Strip_out_1, Air_Normal_1, Air_Parallel_1, Air_Infinity_1, Ind1_Plus_1, Ind2_Plus_1, Ind3_Plus_1, Ind1_Minus_1, Ind2_Minus_1, Ind3_Minus_1 ] = Maillage_1.GetGroups()
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_1, Ind1_1, Ind2_1, Ind3_1, Core_1, Strip_2, Strip_Skin_1, Strip_Normal_1, Strip_parallel_1, Strip_in_1, Strip_out_1, Air_Normal_1, Air_Parallel_1, Air_Infinity_1, Ind1_Plus_1, Ind2_Plus_1, Ind3_Plus_1, Ind1_Minus_1, Ind2_Minus_1, Ind3_Minus_1 ] = Maillage_1.GetGroups()
Maillage_1.Clear()
NETGEN_3D_3 = Regular_1D_7.GetSubMesh()
Core_2 = Regular_1D_8.GetSubMesh()


## Set names of Mesh objects
smesh.SetName(Max_Size_4, 'Max Size_4')
smesh.SetName(NETGEN_3D_3, 'NETGEN_3D')
smesh.SetName(Ind2_Plus_1, 'Ind2_Plus')
smesh.SetName(Ind3_Plus_1, 'Ind3_Plus')
smesh.SetName(Ind1_Minus_1, 'Ind1_Minus')
smesh.SetName(Ind2_Minus_1, 'Ind2_Minus')
smesh.SetName(Ind3_Minus_1, 'Ind3_Minus')
smesh.SetName(Transition, 'Transition')
smesh.SetName(Rest_WStrip, 'Rest_WStrip')
smesh.SetName(Pene_Strip, 'Pene_Strip')
smesh.SetName(Strip_Surf_Top, 'Strip_Surf_Top')
smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D')
smesh.SetName(Strip_1, 'Strip')
smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D')
smesh.SetName(Ind1_Plus_1, 'Ind1_Plus')
smesh.SetName(Prism_3D.GetAlgorithm(), 'Prism_3D')
smesh.SetName(Strip_X_InOut, 'Strip_X_InOut')
smesh.SetName(Air_Infinity_1, 'Air_Infinity')
smesh.SetName(MEFISTO_2D.GetAlgorithm(), 'MEFISTO_2D')
smesh.SetName(Strip_X_Wind_1, 'Strip_X_Wind')
smesh.SetName(NETGEN_3D.GetAlgorithm(), 'NETGEN 3D')
smesh.SetName(Strip_2, 'Strip')
smesh.SetName(Ind3_1, 'Ind3')
smesh.SetName(Core_1, 'Core')
smesh.SetName(Ind1_1, 'Ind1')
smesh.SetName(Strip_Skin_1, 'Strip_Skin')
smesh.SetName(Ind2_1, 'Ind2')
smesh.SetName(Strip_parallel_1, 'Strip_parallel')
smesh.SetName(Air_1, 'Air')
smesh.SetName(Strip_Normal_1, 'Strip_Normal')
smesh.SetName(Strip_out_1, 'Strip_out')
smesh.SetName(Strip_in_1, 'Strip_in')
smesh.SetName(Air_Parallel_1, 'Air_Parallel')
smesh.SetName(Air_Normal_1, 'Air_Normal')
smesh.SetName(Maillage_1.GetMesh(), 'Maillage_1')
smesh.SetName(Number_of_Segments_3, 'Number of Segments_3')
smesh.SetName(Core_2, 'Core')
smesh.SetName(Number_of_Segments_2, 'Number of Segments_2')
smesh.SetName(Number_of_Segments_1, 'Number of Segments_1')
smesh.SetName(Max_Size_1, 'Max Size_1')
smesh.SetName(Number_of_Segments_6, 'Number of Segments_6')
smesh.SetName(Number_of_Segments_5, 'Number of Segments_5')
smesh.SetName(Number_of_Segments_4, 'Number of Segments_4')
smesh.SetName(Max_Size_3, 'Max Size_3')
smesh.SetName(Max_Size_2, 'Max Size_2')


if salome.sg.hasDesktop():
  salome.sg.updateObjBrowser()
