3 \page tui_modifying_meshes_page Modifying Meshes
6 \anchor tui_adding_nodes_and_elements
7 <h2>Adding Nodes and Elements</h2>
16 mesh = SMESH_mechanic.mesh
19 new_id = mesh.AddNode(50, 10, 0)
21 if new_id == 0: print "KO node addition."
22 else: print "New Node has been added with ID ", new_id
32 mesh = SMESH_mechanic.mesh
36 n1 = mesh.AddNode(50, 10, 0)
37 if n1 == 0: print "KO node addition."
40 e1 = mesh.AddEdge([n1, 38])
41 if e1 == 0: print "KO edge addition."
42 else: print "New Edge has been added with ID ", e1
46 \anchor tui_add_triangle
52 mesh = SMESH_mechanic.mesh
56 n1 = mesh.AddNode(50, 10, 0)
57 if n1 == 0: print "KO node addition."
60 t1 = mesh.AddFace([n1, 38, 39])
61 if t1 == 0: print "KO triangle addition."
62 else: print "New Triangle has been added with ID ", t1
66 \anchor tui_add_quadrangle
67 <h3>Add Quadrangle</h3>
72 mesh = SMESH_mechanic.mesh
76 n1 = mesh.AddNode(50, 10, 0)
77 if n1 == 0: print "KO node addition."
79 n2 = mesh.AddNode(40, 20, 0)
80 if n2 == 0: print "KO node addition."
83 q1 = mesh.AddFace([n2, n1, 38, 39])
84 if q1 == 0: print "KO quadrangle addition."
85 else: print "New Quadrangle has been added with ID ", q1
89 \anchor tui_add_tetrahedron
90 <h3>Add Tetrahedron</h3>
95 mesh = SMESH_mechanic.mesh
99 n1 = mesh.AddNode(50, 10, 0)
100 if n1 == 0: print "KO node addition."
103 t1 = mesh.AddVolume([n1, 38, 39, 246])
104 if t1 == 0: print "KO tetrahedron addition."
105 else: print "New Tetrahedron has been added with ID ", t1
109 \anchor tui_add_hexahedron
110 <h3>Add Hexahedron</h3>
113 import SMESH_mechanic
115 mesh = SMESH_mechanic.mesh
119 nId1 = mesh.AddNode(50, 10, 0)
120 nId2 = mesh.AddNode(47, 12, 0)
121 nId3 = mesh.AddNode(50, 10, 10)
122 nId4 = mesh.AddNode(47, 12, 10)
124 if nId1 == 0 or nId2 == 0 or nId3 == 0 or nId4 == 0: print "KO node addition."
127 vId = mesh.AddVolume([nId2, nId1, 38, 39, nId4, nId3, 245, 246])
128 if vId == 0: print "KO Hexahedron addition."
129 else: print "New Hexahedron has been added with ID ", vId
133 \anchor tui_add_polygon
142 # create an empty mesh structure
145 # a method to build a polygonal mesh element with <nb_vert> angles:
146 def MakePolygon (a_mesh, x0, y0, z0, radius, nb_vert):
147 al = 2.0 * math.pi / nb_vert
150 # Create nodes for a polygon
151 for ii in range(nb_vert):
152 nid = mesh.AddNode(x0 + radius * math.cos(ii*al),
153 y0 + radius * math.sin(ii*al),
159 return mesh.AddPolygonalFace(node_ids)
161 # Create three polygons
162 f1 = MakePolygon(mesh, 0, 0, 0, 30, 13)
163 f2 = MakePolygon(mesh, 0, 0, 10, 21, 9)
164 f3 = MakePolygon(mesh, 0, 0, 20, 13, 6)
166 salome.sg.updateObjBrowser(1)
170 \anchor tui_add_polyhedron
171 <h3>Add Polyhedron</h3>
177 # create an empty mesh structure
180 # Create nodes for 12-hedron with pentagonal faces
181 al = 2 * math.pi / 5.0
184 rr = aa / (2.0 * math.sin(al/2.0))
185 dr = 2.0 * rr * cosal
187 dh = rr * math.sqrt(2.0 * (1.0 - cosal * (1.0 + 2.0 * cosal)))
188 hh = 2.0 * dh - dr * (rr*(cosal - 1) + (rr + dr)*(math.cos(al/2) - 1)) / dh
192 bb = [] # above bottom
196 cos_bot = math.cos(i*al)
197 sin_bot = math.sin(i*al)
199 cos_top = math.cos(i*al + al/2.0)
200 sin_top = math.sin(i*al + al/2.0)
202 nd = mesh.AddNode(rr * cos_top, rr * sin_top, hh ) # top
203 nc = mesh.AddNode(r1 * cos_top, r1 * sin_top, hh - dh) # below top
204 nb = mesh.AddNode(r1 * cos_bot, r1 * sin_bot, dh) # above bottom
205 na = mesh.AddNode(rr * cos_bot, rr * sin_bot, 0) # bottom
207 cc.append(nc) # below top
208 bb.append(nb) # above bottom
209 aa.append(na) # bottom
212 # Create a polyhedral volume (12-hedron with pentagonal faces)
213 MeshEditor.AddPolyhedralVolume([dd[0], dd[1], dd[2], dd[3], dd[4], # top
214 dd[0], cc[0], bb[1], cc[1], dd[1], # -
215 dd[1], cc[1], bb[2], cc[2], dd[2], # -
216 dd[2], cc[2], bb[3], cc[3], dd[3], # - below top
217 dd[3], cc[3], bb[4], cc[4], dd[4], # -
218 dd[4], cc[4], bb[0], cc[0], dd[0], # -
219 aa[4], bb[4], cc[4], bb[0], aa[0], # .
220 aa[3], bb[3], cc[3], bb[4], aa[4], # .
221 aa[2], bb[2], cc[2], bb[3], aa[3], # . above bottom
222 aa[1], bb[1], cc[1], bb[2], aa[2], # .
223 aa[0], bb[0], cc[0], bb[1], aa[1], # .
224 aa[0], aa[1], aa[2], aa[3], aa[4]], # bottom
225 [5,5,5,5,5,5,5,5,5,5,5,5])
227 salome.sg.updateObjBrowser(1)
231 \anchor tui_removing_nodes_and_elements
232 <h2>Removing Nodes and Elements</h2>
235 \anchor tui_removing_nodes
236 <h3>Removing Nodes</h3>
239 import SMESH_mechanic
241 mesh = SMESH_mechanic.mesh
243 # remove nodes #246 and #255
244 res = mesh.RemoveNodes([246, 255])
245 if res == 1: print "Nodes removing is OK!"
246 else: print "KO nodes removing."
250 \anchor tui_removing_elements
251 <h3>Removing Elements</h3>
254 import SMESH_mechanic
256 mesh = SMESH_mechanic.mesh
258 # remove three elements: #850, #859 and #814
259 res = mesh.RemoveElements([850, 859, 814])
260 if res == 1: print "Elements removing is OK!"
261 else: print "KO Elements removing."
265 \anchor tui_renumbering_nodes_and_elements
266 <h2>Renumbering Nodes and Elements</h2>
269 import SMESH_mechanic
271 mesh = SMESH_mechanic.mesh
275 mesh.RenumberElements()
279 \anchor tui_moving_nodes
280 <h2>Moving Nodes</h2>
283 import SMESH_mechanic
285 mesh = SMESH_mechanic.mesh
288 mesh.MoveNode(38, 20., 10., 0.)
292 \anchor tui_mesh_through_point
293 <h2>Mesh through point</h2>
299 box = MakeBoxDXDYDZ(200, 200, 200)
302 mesh.Segment().AutomaticLength(0.1)
306 # find node at (0,0,0)
308 for vId in SubShapeAllIDs( box, ShapeType["VERTEX"]):
310 nodeIds = mesh.GetSubMeshNodesId( vId, True )
312 xyz = mesh.GetNodeXYZ( node )
313 if xyz[0] == 0 and xyz[1] == 0 and xyz[2] == 0 :
320 raise "node000 not found"
322 # find node000 using the tested function
323 n = mesh.FindNodeClosestTo( -1,-1,-1 )
325 raise "FindNodeClosestTo() returns " + str( n ) + " != " + str( node000 )
327 # check if any node will be found for a point inside a box
328 n = mesh.FindNodeClosestTo( 100, 100, 100 )
330 raise "FindNodeClosestTo( 100, 100, 100 ) fails"
332 # move node000 to a new location
333 x,y,z = -10, -10, -10
334 n = mesh.MeshToPassThroughAPoint( x,y,z )
336 raise "FindNodeClosestTo() returns " + str( n ) + " != " + str( node000 )
338 # check the coordinates of the node000
339 xyz = mesh.GetNodeXYZ( node000 )
340 if not ( xyz[0] == x and xyz[1] == y and xyz[2] == z) :
341 raise "Wrong coordinates: " + str( xyz ) + " != " + str( [x,y,z] )
345 \anchor tui_diagonal_inversion
346 <h2>Diagonal Inversion</h2>
352 # create an empty mesh structure
355 # create the following mesh:
365 ff = [0, 0, 0, 0, 0, 0]
367 bb[0] = mesh.AddNode( 0., 0., 0.)
368 bb[1] = mesh.AddNode(10., 0., 0.)
369 bb[2] = mesh.AddNode(20., 0., 0.)
370 bb[3] = mesh.AddNode(30., 0., 0.)
372 tt[0] = mesh.AddNode( 0., 15., 0.)
373 tt[1] = mesh.AddNode(10., 15., 0.)
374 tt[2] = mesh.AddNode(20., 15., 0.)
375 tt[3] = mesh.AddNode(30., 15., 0.)
377 ff[0] = mesh.AddFace([bb[0], bb[1], tt[1]])
378 ff[1] = mesh.AddFace([bb[0], tt[1], tt[0]])
379 ff[2] = mesh.AddFace([bb[1], bb[2], tt[2]])
380 ff[3] = mesh.AddFace([bb[1], tt[2], tt[1]])
381 ff[4] = mesh.AddFace([bb[2], bb[3], tt[3]])
382 ff[5] = mesh.AddFace([bb[2], tt[3], tt[2]])
384 # inverse the diagonal bb[1] - tt[2]
385 print "\nDiagonal inversion ... ",
386 res = mesh.InverseDiag(bb[1], tt[2])
387 if not res: print "failed!"
390 salome.sg.updateObjBrowser(1)
394 \anchor tui_uniting_two_triangles
395 <h2>Uniting two Triangles</h2>
401 # create an empty mesh structure
404 # create the following mesh:
414 ff = [0, 0, 0, 0, 0, 0]
416 bb[0] = mesh.AddNode( 0., 0., 0.)
417 bb[1] = mesh.AddNode(10., 0., 0.)
418 bb[2] = mesh.AddNode(20., 0., 0.)
419 bb[3] = mesh.AddNode(30., 0., 0.)
421 tt[0] = mesh.AddNode( 0., 15., 0.)
422 tt[1] = mesh.AddNode(10., 15., 0.)
423 tt[2] = mesh.AddNode(20., 15., 0.)
424 tt[3] = mesh.AddNode(30., 15., 0.)
426 ff[0] = mesh.AddFace([bb[0], bb[1], tt[1]])
427 ff[1] = mesh.AddFace([bb[0], tt[1], tt[0]])
428 ff[2] = mesh.AddFace([bb[1], bb[2], tt[2]])
429 ff[3] = mesh.AddFace([bb[1], tt[2], tt[1]])
430 ff[4] = mesh.AddFace([bb[2], bb[3], tt[3]])
431 ff[5] = mesh.AddFace([bb[2], tt[3], tt[2]])
433 # delete the diagonal bb[1] - tt[2]
434 print "\nUnite two triangles ... ",
435 res = mesh.DeleteDiag(bb[1], tt[2])
436 if not res: print "failed!"
439 salome.sg.updateObjBrowser(1)
443 \anchor tui_uniting_set_of_triangles
444 <h2>Uniting a Set of Triangles</h2>
450 # create an empty mesh structure
453 # create the following mesh:
463 ff = [0, 0, 0, 0, 0, 0]
465 bb[0] = mesh.AddNode( 0., 0., 0.)
466 bb[1] = mesh.AddNode(10., 0., 0.)
467 bb[2] = mesh.AddNode(20., 0., 0.)
468 bb[3] = mesh.AddNode(30., 0., 0.)
470 tt[0] = mesh.AddNode( 0., 15., 0.)
471 tt[1] = mesh.AddNode(10., 15., 0.)
472 tt[2] = mesh.AddNode(20., 15., 0.)
473 tt[3] = mesh.AddNode(30., 15., 0.)
475 ff[0] = mesh.AddFace([bb[0], bb[1], tt[1]])
476 ff[1] = mesh.AddFace([bb[0], tt[1], tt[0]])
477 ff[2] = mesh.AddFace([bb[1], bb[2], tt[2]])
478 ff[3] = mesh.AddFace([bb[1], tt[2], tt[1]])
479 ff[4] = mesh.AddFace([bb[2], bb[3], tt[3]])
480 ff[5] = mesh.AddFace([bb[2], tt[3], tt[2]])
482 # unite a set of triangles
483 print "\nUnite a set of triangles ... ",
484 res = mesh.TriToQuad([ff[2], ff[3], ff[4], ff[5]], smesh.FT_MinimumAngle, 60.)
485 if not res: print "failed!"
488 salome.sg.updateObjBrowser(1)
492 \anchor tui_orientation
499 # create an empty mesh structure
502 # build five quadrangles:
506 n1 = mesh.AddNode(0.0 * dx, 0, 0)
507 n2 = mesh.AddNode(1.0 * dx, 0, 0)
508 n3 = mesh.AddNode(2.0 * dx, 0, 0)
509 n4 = mesh.AddNode(3.0 * dx, 0, 0)
510 n5 = mesh.AddNode(4.0 * dx, 0, 0)
511 n6 = mesh.AddNode(5.0 * dx, 0, 0)
512 n7 = mesh.AddNode(0.0 * dx, dy, 0)
513 n8 = mesh.AddNode(1.0 * dx, dy, 0)
514 n9 = mesh.AddNode(2.0 * dx, dy, 0)
515 n10 = mesh.AddNode(3.0 * dx, dy, 0)
516 n11 = mesh.AddNode(4.0 * dx, dy, 0)
517 n12 = mesh.AddNode(5.0 * dx, dy, 0)
519 f1 = mesh.AddFace([n1, n2, n8 , n7 ])
520 f2 = mesh.AddFace([n2, n3, n9 , n8 ])
521 f3 = mesh.AddFace([n3, n4, n10, n9 ])
522 f4 = mesh.AddFace([n4, n5, n11, n10])
523 f5 = mesh.AddFace([n5, n6, n12, n11])
525 # Change the orientation of the second and the fourth faces.
526 mesh.Reorient([2, 4])
528 salome.sg.updateObjBrowser(1)
532 \anchor tui_cutting_quadrangles
533 <h2>Cutting Quadrangles</h2>
536 import SMESH_mechanic
538 smesh = SMESH_mechanic.smesh
539 mesh = SMESH_mechanic.mesh
541 # cut two quadrangles: 405 and 406
542 mesh.QuadToTri([405, 406], smesh.FT_MinimumAngle)
546 \anchor tui_smoothing
553 import SMESH_mechanic
555 smesh = SMESH_mechanic.smesh
556 mesh = SMESH_mechanic.mesh
558 # select the top face
559 faces = geompy.SubShapeAllSorted(SMESH_mechanic.shape_mesh, geompy.ShapeType["FACE"])
561 geompy.addToStudyInFather(SMESH_mechanic.shape_mesh, face, "face planar with hole")
563 # create a group of faces to be smoothed
564 GroupSmooth = mesh.GroupOnGeom(face, "Group of faces (smooth)", smesh.FACE)
568 # boolean SmoothObject(Object, IDsOfFixedNodes, MaxNbOfIterations, MaxAspectRatio, Method)
569 res = mesh.SmoothObject(GroupSmooth, [], 20, 2., smesh.CENTROIDAL_SMOOTH)
570 print "\nSmoothing ... ",
571 if not res: print "failed!"
574 salome.sg.updateObjBrowser(1)
578 \anchor tui_extrusion
585 import SMESH_mechanic
587 smesh = SMESH_mechanic.smesh
588 mesh = SMESH_mechanic.mesh
590 # select the top face
591 faces = geompy.SubShapeAllSorted(SMESH_mechanic.shape_mesh, geompy.ShapeType["FACE"])
593 geompy.addToStudyInFather(SMESH_mechanic.shape_mesh, face, "face circular top")
595 # create a vector for extrusion
596 point = smesh.PointStruct(0., 0., 5.)
597 vector = smesh.DirStruct(point)
599 # create a group to be extruded
600 GroupTri = mesh.GroupOnGeom(face, "Group of faces (extrusion)", smesh.FACE)
602 # perform extrusion of the group
603 mesh.ExtrusionSweepObject(GroupTri, vector, 5)
605 salome.sg.updateObjBrowser(1)
609 \anchor tui_extrusion_along_path
610 <h2>Extrusion along a Path</h2>
620 points = [[0, 0], [50, 30], [50, 110], [0, 150], [-80, 150], [-130, 70], [-130, -20]]
625 vert = geompy.MakeVertex(point[0], point[1], 0)
626 geompy.addToStudy(vert, "Vertex_" + `iv`)
627 vertices.append(vert)
631 # 2. Create edges and wires
632 Edge_straight = geompy.MakeEdge(vertices[0], vertices[4])
633 Edge_bezierrr = geompy.MakeBezier(vertices)
634 Wire_polyline = geompy.MakePolyline(vertices)
635 Edge_Circle = geompy.MakeCircleThreePnt(vertices[0], vertices[1], vertices[2])
637 geompy.addToStudy(Edge_straight, "Edge_straight")
638 geompy.addToStudy(Edge_bezierrr, "Edge_bezierrr")
639 geompy.addToStudy(Wire_polyline, "Wire_polyline")
640 geompy.addToStudy(Edge_Circle , "Edge_Circle")
642 # 3. Explode wire on edges, as they will be used for mesh extrusion
643 Wire_polyline_edges = geompy.SubShapeAll(Wire_polyline, geompy.ShapeType["EDGE"])
644 for ii in range(len(Wire_polyline_edges)):
645 geompy.addToStudyInFather(Wire_polyline, Wire_polyline_edges[ii], "Edge_" + `ii + 1`)
651 # Mesh the given shape with the given 1d hypothesis
652 def Mesh1D(shape1d, nbSeg, name):
653 mesh1d_tool = smesh.Mesh(shape1d, name)
654 algo = mesh1d_tool.Segment()
655 hyp = algo.NumberOfSegments(nbSeg)
656 isDone = mesh1d_tool.Compute()
657 if not isDone: print 'Mesh ', name, ': computation failed'
660 # Create a mesh with six nodes, seven edges and two quadrangle faces
661 def MakeQuadMesh2(mesh_name):
662 quad_1 = smesh.Mesh(name = mesh_name)
665 n1 = quad_1.AddNode(0, 20, 10)
666 n2 = quad_1.AddNode(0, 40, 10)
667 n3 = quad_1.AddNode(0, 40, 30)
668 n4 = quad_1.AddNode(0, 20, 30)
669 n5 = quad_1.AddNode(0, 0, 30)
670 n6 = quad_1.AddNode(0, 0, 10)
673 quad_1.AddEdge([n1, n2]) # 1
674 quad_1.AddEdge([n2, n3]) # 2
675 quad_1.AddEdge([n3, n4]) # 3
676 quad_1.AddEdge([n4, n1]) # 4
677 quad_1.AddEdge([n4, n5]) # 5
678 quad_1.AddEdge([n5, n6]) # 6
679 quad_1.AddEdge([n6, n1]) # 7
681 # two quadrangle faces
682 quad_1.AddFace([n1, n2, n3, n4]) # 8
683 quad_1.AddFace([n1, n4, n5, n6]) # 9
684 return [quad_1, [1,2,3,4,5,6,7], [8,9]]
687 Edge_straight_mesh = Mesh1D(Edge_straight, 7, "Edge_straight")
688 Edge_bezierrr_mesh = Mesh1D(Edge_bezierrr, 7, "Edge_bezierrr")
689 Wire_polyline_mesh = Mesh1D(Wire_polyline, 3, "Wire_polyline")
690 Edge_Circle_mesh = Mesh1D(Edge_Circle , 8, "Edge_Circle")
692 # Initial meshes (to be extruded)
693 [quad_1, ee_1, ff_1] = MakeQuadMesh2("quad_1")
694 [quad_2, ee_2, ff_2] = MakeQuadMesh2("quad_2")
695 [quad_3, ee_3, ff_3] = MakeQuadMesh2("quad_3")
696 [quad_4, ee_4, ff_4] = MakeQuadMesh2("quad_4")
697 [quad_5, ee_5, ff_5] = MakeQuadMesh2("quad_5")
698 [quad_6, ee_6, ff_6] = MakeQuadMesh2("quad_6")
699 [quad_7, ee_7, ff_7] = MakeQuadMesh2("quad_7")
702 # IDsOfElements, PathMesh, PathShape, NodeStart,
703 # HasAngles, Angles, HasRefPoint, RefPoint
704 refPoint = smesh.PointStruct(0, 0, 0)
705 a10 = 10.0*math.pi/180.0
706 a45 = 45.0*math.pi/180.0
708 # 1. Extrusion of two mesh edges along a straight path
709 error = quad_1.ExtrusionAlongPath([1,2], Edge_straight_mesh, Edge_straight, 1,
712 # 2. Extrusion of one mesh edge along a curved path
713 error = quad_2.ExtrusionAlongPath([2], Edge_bezierrr_mesh, Edge_bezierrr, 1,
716 # 3. Extrusion of one mesh edge along a curved path with usage of angles
717 error = quad_3.ExtrusionAlongPath([2], Edge_bezierrr_mesh, Edge_bezierrr, 1,
718 1, [a45, a45, a45, 0, -a45, -a45, -a45], 0, refPoint)
720 # 4. Extrusion of one mesh edge along the path, which is a part of a meshed wire
721 error = quad_4.ExtrusionAlongPath([4], Wire_polyline_mesh, Wire_polyline_edges[0], 1,
722 1, [a10, a10, a10], 0, refPoint)
724 # 5. Extrusion of two mesh faces along the path, which is a part of a meshed wire
725 error = quad_5.ExtrusionAlongPath(ff_5 , Wire_polyline_mesh, Wire_polyline_edges[2], 4,
728 # 6. Extrusion of two mesh faces along a closed path
729 error = quad_6.ExtrusionAlongPath(ff_6 , Edge_Circle_mesh, Edge_Circle, 1,
732 # 7. Extrusion of two mesh faces along a closed path with usage of angles
733 error = quad_7.ExtrusionAlongPath(ff_7, Edge_Circle_mesh, Edge_Circle, 1,
734 1, [a45, -a45, a45, -a45, a45, -a45, a45, -a45], 0, refPoint)
736 salome.sg.updateObjBrowser(1)
740 \anchor tui_revolution
746 import SMESH_mechanic
748 mesh = SMESH_mechanic.mesh
749 smesh = SMESH_mechanic.smesh
751 # create a group of faces to be revolved
752 FacesRotate = [492, 493, 502, 503]
753 GroupRotate = mesh.CreateGroup(SMESH.FACE,"Group of faces (rotate)")
754 GroupRotate.Add(FacesRotate)
756 # define revolution angle and axis
757 angle45 = 45 * math.pi / 180
758 axisXYZ = SMESH.AxisStruct(-38.3128, -73.3658, -23.321, -13.3402, -13.3265, 6.66632)
760 # perform revolution of an object
761 mesh.RotationSweepObject(GroupRotate, axisXYZ, angle45, 4, 1e-5)
765 \anchor tui_pattern_mapping
766 <h2>Pattern Mapping</h2>
773 # define the geometry
774 Box_1 = geompy.MakeBoxDXDYDZ(200., 200., 200.)
775 geompy.addToStudy(Box_1, "Box_1")
777 faces = geompy.SubShapeAll(Box_1, geompy.ShapeType["FACE"])
781 geompy.addToStudyInFather(Box_1, Face_1, "Face_1")
782 geompy.addToStudyInFather(Box_1, Face_2, "Face_2")
784 # build a quadrangle mesh 3x3 on Face_1
785 Mesh_1 = smesh.Mesh(Face_1)
786 algo1D = Mesh_1.Segment()
787 algo1D.NumberOfSegments(3)
790 isDone = Mesh_1.Compute()
791 if not isDone: print 'Mesh Mesh_1 : computation failed'
793 # build a triangle mesh on Face_2
794 Mesh_2 = smesh.Mesh(Face_2)
796 algo1D = Mesh_2.Segment()
797 algo1D.NumberOfSegments(1)
798 algo2D = Mesh_2.Triangle()
799 algo2D.MaxElementArea(240)
801 isDone = Mesh_2.Compute()
802 if not isDone: print 'Mesh Mesh_2 : computation failed'
805 pattern = smesh.GetPattern()
807 isDone = pattern.LoadFromFace(Mesh_2.GetMesh(), Face_2, 0)
808 if (isDone != 1): print 'LoadFromFace :', pattern.GetErrorCode()
810 # apply the pattern to a face of the first mesh
811 pattern.ApplyToMeshFaces(Mesh_1.GetMesh(), [17], 0, 0)
813 isDone = pattern.MakeMesh(Mesh_1.GetMesh(), 0, 0)
814 if (isDone != 1): print 'MakeMesh :', pattern.GetErrorCode()