6 from salome.geom import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
10 from salome.smesh import smeshBuilder
11 smesh = smeshBuilder.New(salome.myStudy)
13 Box = geompy.MakeBoxDXDYDZ(200, 200, 200)
14 f = geompy.SubShapeAllSorted(Box, geompy.ShapeType["FACE"])
16 Mesh1 = smesh.Mesh(f[0])
17 Regular_1D = Mesh1.Segment()
18 Nb_Segments_1 = Regular_1D.NumberOfSegments(3)
19 Nb_Segments_1.SetDistrType( 0 )
20 Quadrangle_2D = Mesh1.Quadrangle()
21 isDone = Mesh1.Compute()
23 #Perform scale opration for the whole mesh and creation of a new mesh
24 newMesh = Mesh1.ScaleMakeMesh(Mesh1,SMESH.PointStruct(100,100,200),[0.5,0.3,0.7],True,"ScaledMesh")
26 #Perform scale operation for the whole mesh and copy elements
27 Mesh1.Scale(Mesh1,SMESH.PointStruct(200,100,100),[0.5,0.5,0.5],True,True)
29 #Perform scale opration for two edges and move elements
30 Mesh1.Scale([1,2],SMESH.PointStruct(-100,100,100),[0.8,1.0,0.7],False)
32 #Perform scale opration for one face and move elements
33 Mesh1.Scale([21],SMESH.PointStruct(0,200,200),[0.7,0.7,0.7],False)