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 OX = geompy.MakeVectorDXDYDZ(1,0,0)
14 OY = geompy.MakeVectorDXDYDZ(0,1,0)
15 OZ = geompy.MakeVectorDXDYDZ(0,0,1)
34 quadBig = geompy.MakeFaceHW( 20,20, 1 )
35 quadBig = geompy.MakeTranslation( quadBig, 15,15,0 )
36 quadSmall = geompy.MakeFaceHW( 10,10, 1 )
37 smallQuads1 = geompy.MakeMultiTranslation1D( quadSmall, OX, 10, 3 )
38 smallQuads2 = geompy.MakeMultiTranslation1D( quadSmall, OY, 10, 3 )
39 smallQuads2 = geompy.SubShapeAllSortedCentres( smallQuads2, geompy.ShapeType[
"FACE"])[1:]
41 base = geompy.MakeCompound( smallQuads2 + [smallQuads1, quadBig])
42 axis = geompy.MakeLine( geompy.MakeVertex( 25,25,0), OZ )
43 base = geompy.MultiRotate1DNbTimes( base, axis, 4)
44 base = geompy.MakePartition( [base], theName=
"base")
45 path = geompy.MakeSketcher(
"Sketcher:F 0 0:TT 0 100:R 0:C -90 180:T 0 -150",[0,0,0, 0,-1,0, 1,0,0])
48 pipe = geompy.MakePipe( base, path )
49 prisms = geompy.MakePartition( [pipe], theName=
"prisms")
53 smallQuad = geompy.GetFaceNearPoint( prisms, geompy.MakeVertex( 0,0,0 ),
"smallQuad")
54 bigQuad = geompy.GetFaceNearPoint( prisms, geompy.MakeVertex( 15,15,0 ),
"bigQuad")
57 mesh = smesh.Mesh( prisms )
71 mesh.Quadrangle(smallQuad)
75 mesh.Triangle(bigQuad)