Salome HOME
PAL12557: SMESH Documentation for scripts is not up to date. T3_2_1_pre V3_2_1
authorjfa <jfa@opencascade.com>
Fri, 14 Jul 2006 10:40:47 +0000 (10:40 +0000)
committerjfa <jfa@opencascade.com>
Fri, 14 Jul 2006 10:40:47 +0000 (10:40 +0000)
doc/salome/gui/SMESH/constructing_meshes.htm
doc/salome/gui/SMESH/defining_hypotheses_tui.htm
doc/salome/gui/SMESH/grouping_elements.htm
doc/salome/gui/SMESH/modifying_meshes.htm
doc/salome/gui/SMESH/quality_controls.htm
doc/salome/gui/SMESH/transforming_meshes.htm
doc/salome/gui/SMESH/viewing_meshes.htm

index d460c30..e32e648 100755 (executable)
@@ -7,11 +7,13 @@
 <meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
 <meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com"><style type="text/css">\r
 <!--\r
-p.whs1 { margin-top:0pt; margin-bottom:0pt; font-family:'Lucida Console' , monospace; }\r
-p.whs2 { margin-top:0pt; margin-bottom:0pt; }\r
-p.whs3 { font-family:'Lucida Console' , monospace; margin-top:0px; margin-bottom:0px; }\r
-p.whs4 { margin-top:0px; margin-bottom:0px; }\r
+p.whs1 { margin-top:0pt; margin-bottom:0pt; }\r
+p.whs2 { margin-top:0pt; margin-bottom:0pt; font-family:'Lucida Console' , monospace; }\r
+p.whs3 { margin-top:0pt; margin-bottom:0pt; font-family:'Times New Roman' , serif; }\r
+p.whs4 { font-family:'Lucida Console' , monospace; margin-top:0px; margin-bottom:0px; }\r
 p.whs5 { margin-top:0px; margin-bottom:0px; font-family:'Times New Roman' , serif; }\r
+p.whs6 { margin-top:0px; margin-bottom:0px; }\r
+p.whs7 { margin-top:0px; margin-bottom:0px; font-family:'Lucida Console' , monospace; }\r
 -->\r
 </style><script type="text/javascript" language="JavaScript">\r
 <!--\r
@@ -23,6 +25,8 @@ if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))
   strNSS += "p.whs3 {margin-top:1pt;margin-bottom:1pt; }";\r
   strNSS += "p.whs4 {margin-top:1pt;margin-bottom:1pt; }";\r
   strNSS += "p.whs5 {margin-top:1pt;margin-bottom:1pt; }";\r
+  strNSS += "p.whs6 {margin-top:1pt;margin-bottom:1pt; }";\r
+  strNSS += "p.whs7 {margin-top:1pt;margin-bottom:1pt; }";\r
   strNSS +="</style>";\r
   document.write(strNSS);\r
 }\r
@@ -89,650 +93,350 @@ if (window.writeIntopicBar)
 </script>\r
 <h1>Creating Meshes</h1>\r
 \r
-<p>At first see <a href="smesh_py_introduction.htm">Example of 3d mesh generation</a>, using <b>smesh</b> package.\r
-<p>Other examples of python scripts will be also updated soon to use <b>smesh</b> package instead of direct usage of idl interface.\r
+<p class="whs1">First of all see <a href="smesh_py_introduction.htm">Example \r
+ of 3d mesh generation</a>, which is an example of good python script style \r
+ for Mesh module. </p>\r
 \r
-<h3><a name=bookmark>Construction of a Mesh</a></h3>\r
-\r
-<p>Attention! This script was written using old approach, based on direct usage of SMESH idl interface. To be updated for version 3.2.1 to use <b>smesh</b> package.\r
-<br>&nbsp;\r
-\r
-<p class="whs1">import salome</p>\r
-\r
-<p class="whs1">import geompy</p>\r
-\r
-<p class="whs1">import StdMeshers</p>\r
+<p class="whs1">Other examples of python \r
+ scripts will be also updated soon to use smesh package instead of direct \r
+ usage of idl interface. </p>\r
 \r
-<p class="whs1">smesh = salome.lcc.FindOrLoadComponent(&quot;FactoryServer&quot;, \r
- &quot;SMESH&quot;)</p>\r
+<h3><a name=bookmark>Construction of a Mesh</a></h3>\r
 \r
-<p class="whs1">smeshgui = salome.ImportComponentGUI(&quot;SMESH&quot;)</p>\r
+<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">import \r
+ geompy</span></p>\r
 \r
-<p class="whs1">smeshgui.Init(salome.myStudyId);</p>\r
+<p class="whs2">import smesh</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2"># create a box</p>\r
+<p class="whs3"># create a box</p>\r
 \r
-<p class="whs1">box = geompy.MakeBox(0., \r
+<p class="whs2">box = geompy.MakeBox(0., \r
  0., 0., 100., 200., 300.)</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs2"># add box to the study</p>\r
-\r
-<p class="whs1">idbox = geompy.addToStudy(box, \r
+<p class="whs2">idbox = geompy.addToStudy(box, \r
  &quot;box&quot;)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2"># create a hypothesis</p>\r
-\r
-<p class="whs1">print &quot;-------------------------- \r
- create Hypothesis&quot;</p>\r
-\r
-<p class="whs1">print &quot;-------------------------- \r
- NumberOfSegments&quot;</p>\r
-\r
-<p class="whs1">numberOfSegments \r
- = 7</p>\r
-\r
-<p class="whs1">hypNbSeg = smesh.CreateHypothesis(&quot;NumberOfSegments&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
-\r
-<p class="whs1">hypNbSeg.SetNumberOfSegments(numberOfSegments)</p>\r
-\r
-<p class="whs1">print hypNbSeg.GetName()</p>\r
-\r
-<p class="whs1">print hypNbSeg.GetId()</p>\r
-\r
-<p class="whs1">print hypNbSeg.GetNumberOfSegments()</p>\r
-\r
-<p class="whs1">smeshgui.SetName(salome.ObjectToID(hypNbSeg), \r
- &quot;NumberOfSegments_10&quot;)</p>\r
-\r
-<p class="whs1">print &quot;-------------------------- \r
- MaxElementArea&quot;</p>\r
-\r
-<p class="whs1">maxElementArea = \r
- 800</p>\r
+<p class="whs3"># create a mesh</p>\r
 \r
-<p class="whs1">hypArea = smesh.CreateHypothesis(&quot;MaxElementArea&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
-\r
-<p class="whs1">hypArea.SetMaxElementArea(maxElementArea)</p>\r
-\r
-<p class="whs1">print hypArea.GetName()</p>\r
-\r
-<p class="whs1">print hypArea.GetId()</p>\r
-\r
-<p class="whs1">print hypArea.GetMaxElementArea()</p>\r
-\r
-<p class="whs1">smeshgui.SetName(salome.ObjectToID(hypArea), \r
- &quot;MaxElementArea_500&quot;)</p>\r
-\r
-<p class="whs1">print &quot;-------------------------- \r
- MaxElementVolume&quot;</p>\r
-\r
-<p class="whs1">maxElementVolume \r
- = 900</p>\r
-\r
-<p class="whs1">hypVolume = smesh.CreateHypothesis(&quot;MaxElementVolume&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
-\r
-<p class="whs1">hypVolume.SetMaxElementVolume(maxElementVolume)</p>\r
-\r
-<p class="whs1">print hypVolume.GetName()</p>\r
-\r
-<p class="whs1">print hypVolume.GetId()</p>\r
-\r
-<p class="whs1">print hypVolume.GetMaxElementVolume()</p>\r
-\r
-<p class="whs1">smeshgui.SetName(salome.ObjectToID(hypVolume), \r
- &quot;MaxElementVolume_500&quot;)</p>\r
+<p class="whs2">tetra = smesh.Mesh(box, \r
+ &quot;MeshBox&quot;)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2"># create algorithms</p>\r
-\r
-<p class="whs1">print &quot;-------------------------- \r
- create Algorithms&quot;</p>\r
+<p class="whs2">algo1D = tetra.Segment()</p>\r
 \r
-<p class="whs1">print &quot;-------------------------- \r
- Regular_1D&quot;</p>\r
+<p class="whs2">algo1D.NumberOfSegments(7)</p>\r
 \r
-<p class="whs1">regular1D = smesh.CreateHypothesis(&quot;Regular_1D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
-\r
-<p class="whs1">smeshgui.SetName(salome.ObjectToID(regular1D), \r
- &quot;Wire Discretisation&quot;)</p>\r
-\r
-<p class="whs1">print &quot;-------------------------- \r
- MEFISTO_2D&quot;</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs1">mefisto2D = smesh.CreateHypothesis(&quot;MEFISTO_2D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs2">algo2D = tetra.Triangle()</p>\r
 \r
-<p class="whs1">smeshgui.SetName(salome.ObjectToID(mefisto2D), \r
- &quot;MEFISTO_2D&quot;)</p>\r
+<p class="whs2">algo2D.MaxElementArea(800.)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2"># initialize a mesh with \r
- the box</p>\r
+<p class="whs2">algo3D = tetra.Tetrahedron(smesh.NETGEN)</p>\r
 \r
-<p class="whs1">mesh = smesh.CreateMesh(box)</p>\r
-\r
-<p class="whs1">smeshgui.SetName(salome.ObjectToID(mesh), \r
- &quot;MeshBox&quot;)</p>\r
+<p class="whs2">algo3D.MaxElementVolume(900.)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2"># add the hypothesis to \r
- the box</p>\r
+<p class="whs3"># compute the mesh</p>\r
 \r
-<p class="whs1">print &quot;-------------------------- \r
- add hypothesis to the box&quot;</p>\r
+<p class="whs2">ret = tetra.Compute()</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(box,hypNbSeg)</p>\r
+<p class="whs2">if ret == 0:</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(box,hypArea)</p>\r
+<p class="whs2">&nbsp;&nbsp;&nbsp;&nbsp;print \r
+ &quot;problem when computing the mesh&quot;</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(box,hypVolume)</p>\r
+<p class="whs2">else:</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(box,regular1D)</p>\r
+<p class="whs2">&nbsp;&nbsp;&nbsp;&nbsp;print \r
+ &quot;mesh computed&quot;</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(box,mefisto2D)</p>\r
+<p class="whs2">&nbsp;&nbsp;&nbsp;&nbsp;pass \r
+ </p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2"># compute the mesh</p>\r
-\r
-<p class="whs1">print &quot;-------------------------- \r
- compute the mesh of the box&quot;</p>\r
-\r
-<p class="whs1">ret = smesh.Compute(mesh,box)</p>\r
-\r
-<p class="whs1">print ret</p>\r
-\r
-<p class="whs1">if ret == 0:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;probleme when computing the mesh&quot;</p>\r
-\r
-<p class="whs1">salome.sg.updateObjBrowser(1)</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
 <h3><a name=bookmark1>Construction of a Submesh</a></h3>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3"><span style="font-family: 'Lucida Console', monospace;">from \r
+<p class="whs4"><span style="font-family: 'Lucida Console', monospace;">from \r
  geompy import *</span></p>\r
 \r
-<p class="whs3">import smesh</p>\r
+<p class="whs4">import smesh</p>\r
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs4"># create vertices</p>\r
-\r
-<p class="whs3">Point111 = MakeVertex( 0, &nbsp;0, \r
- &nbsp;0)</p>\r
+<p class="whs5"># create a box</p>\r
 \r
-<p class="whs3">Point211 = MakeVertex(10, &nbsp;0, \r
- &nbsp;0)</p>\r
+<p class="whs4">box = MakeBoxDXDYDZ(10., 10., 10.)</p>\r
 \r
-<p class="whs3">Point121 = MakeVertex( 0, 10, &nbsp;0)</p>\r
-\r
-<p class="whs3">Point221 = MakeVertex(10, 10, &nbsp;0)</p>\r
-\r
-<p class="whs3">Point112 = MakeVertex( 0, &nbsp;0, \r
- 10)</p>\r
-\r
-<p class="whs3">Point212 = MakeVertex(10, &nbsp;0, \r
- 10)</p>\r
-\r
-<p class="whs3">Point122 = MakeVertex( 0, 10, 10)</p>\r
-\r
-<p class="whs3">Point222 = MakeVertex(10, 10, 10)</p>\r
+<p class="whs4">addToStudy(box, &quot;Box&quot;)</p>\r
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs4"># create edges</p>\r
-\r
-<p class="whs3">EdgeX111 = MakeEdge(Point111, Point211)</p>\r
-\r
-<p class="whs3">EdgeX121 = MakeEdge(Point121, Point221)</p>\r
-\r
-<p class="whs3">EdgeX112 = MakeEdge(Point112, Point212)</p>\r
-\r
-<p class="whs3">EdgeX122 = MakeEdge(Point122, Point222)</p>\r
-\r
-<p class="whs3">EdgeY11 = MakeEdge(Point111, Point121)</p>\r
+<p class="whs5"># select one edge of \r
+ the box for definition of a local hypothesis</p>\r
 \r
-<p class="whs3">EdgeY21 = MakeEdge(Point211, Point221)</p>\r
+<p class="whs4">p5 = MakeVertex(5., 0., 0.)</p>\r
 \r
-<p class="whs3">EdgeY12 = MakeEdge(Point112, Point122)</p>\r
+<p class="whs4">EdgeX = GetEdgeNearPoint(box, p5)</p>\r
 \r
-<p class="whs3">EdgeY22 = MakeEdge(Point212, Point222)</p>\r
-\r
-<p class="whs3">EdgeZ111 = MakeEdge(Point111, Point112)</p>\r
-\r
-<p class="whs3">EdgeZ211 = MakeEdge(Point211, Point212)</p>\r
-\r
-<p class="whs3">EdgeZ121 = MakeEdge(Point121, Point122)</p>\r
-\r
-<p class="whs3">EdgeZ221 = MakeEdge(Point221, Point222)</p>\r
+<p class="whs4">addToStudyInFather(box, EdgeX, &quot;Edge \r
+ [0,0,0 - 10,0,0]&quot;)</p>\r
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs4"># create faces</p>\r
-\r
-<p class="whs3">FaceX11 = MakeQuad(EdgeY11, EdgeZ111, \r
- EdgeY12, EdgeZ121)</p>\r
+<p class="whs5"># create a hexahedral \r
+ mesh on the box</p>\r
 \r
-<p class="whs3">FaceX21 = MakeQuad(EdgeY21, EdgeZ211, \r
- EdgeY22, EdgeZ221)</p>\r
-\r
-<p class="whs3">FaceY111 = MakeQuad(EdgeX111, EdgeZ111, \r
- EdgeX112, EdgeZ211)</p>\r
-\r
-<p class="whs3">FaceY121 = MakeQuad(EdgeX121, EdgeZ121, \r
- EdgeX122, EdgeZ221)</p>\r
-\r
-<p class="whs3">FaceZ11 = MakeQuad(EdgeX111, EdgeY11, \r
- EdgeX121, EdgeY21)</p>\r
-\r
-<p class="whs3">FaceZ12 = MakeQuad(EdgeX112, EdgeY12, \r
- EdgeX122, EdgeY22)</p>\r
+<p class="whs4">quadra = smesh.Mesh(box, &quot;Box : quadrangle \r
+ 2D mesh&quot;)</p>\r
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs4"># create a solid</p>\r
+<p class="whs5"># create a regular \r
+ 1D algorithm for the faces</p>\r
 \r
-<p class="whs3">Block = MakeHexa(FaceX11, FaceX21, FaceY111, \r
- FaceY121, FaceZ11, FaceZ12)</p>\r
+<p class="whs4">algo1D = quadra.Segment()</p>\r
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs4"># create a compound</p>\r
+<p class="whs5"># define &quot;NumberOfSegments&quot; \r
+ hypothesis to cut</p>\r
 \r
-<p class="whs3">box = MakeCompound([Block])</p>\r
+<p class="whs5"># all the edges in \r
+ a fixed number of segments</p>\r
 \r
-<p class="whs4">&nbsp;</p>\r
-\r
-<p class="whs4"># add in the study</p>\r
-\r
-<p class="whs3">box_id = addToStudy(box, &quot;Box compound&quot;)</p>\r
+<p class="whs4">algo1D.NumberOfSegments(4)</p>\r
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs4"># create hexahedral mesh \r
- on the box</p>\r
-\r
-<p class="whs3">hexa = smesh.Mesh(box, &quot;Box compound \r
- : hexahedrical mesh&quot;)</p>\r
+<p class="whs5"># create a quadrangle \r
+ 2D algorithm for the faces</p>\r
 \r
-<p class="whs3">algo = hexa.Segment()</p>\r
+<p class="whs4">quadra.Quadrangle()</p>\r
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs4"># define &quot;NumberOfSegments&quot; \r
hypothesis to cut the edge in a fixed number of segments</p>\r
+<p class="whs5"># construct a submesh \r
on the edge with a local hypothesis</p>\r
 \r
-<p class="whs3">algo.NumberOfSegments(4)</p>\r
+<p class="whs4">algo_local = quadra.Segment(EdgeX)</p>\r
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs4"># creates a quadrangle \r
- 2D algorithm for the faces</p>\r
+<p class="whs5"># define &quot;Arithmetic1D&quot; \r
+ hypothesis to cut the edge<span style="margin-top: 0px;\r
+                                                                               margin-bottom: 0px;\r
+                                                                               font-family: 'Times New Roman', serif;"> \r
+ in several segments with increasing arithmetic length</span></p>\r
 \r
-<p class="whs3">hexa.Quadrangle()</p>\r
+<p class="whs4">algo_local.Arithmetic1D(1, 4)</p>\r
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs4"># construct a submesh with \r
a local hypothesis</p>\r
+<p class="whs5"># define &quot;Propagation&quot; \r
hypothesis that propagates all other hypotheses</p>\r
 \r
-<p class="whs3">algo = hexa.Segment(EdgeX111)</p>\r
+<p class="whs5"># on all edges of the \r
+ opposite side in case of quadrangular faces</p>\r
 \r
-<p class="whs4">&nbsp;</p>\r
-\r
-<p class="whs4"># define &quot;Arithmetic1D&quot; \r
- hypothesis to cut an edge in several segments with increasing arithmetic \r
- length </p>\r
-\r
-<p class="whs3">algo.Arithmetic1D(1, 4)</p>\r
+<p class="whs4">algo_local.Propagation()</p>\r
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs4"># define &quot;Propagation&quot; \r
- hypothesis that propagates all other hypothesis on all edges on the opposite \r
- side in case of quadrangular faces</p>\r
+<p class="whs5"># compute the mesh</p>\r
 \r
-<p class="whs3">algo.Propagation()</p>\r
+<p class="whs4">quadra.Compute() </p>\r
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs4"># compute the mesh</p>\r
-\r
-<p class="whs3">hexa.Compute() </p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
 <h3><a name=bookmark2>Editing of a mesh</a></h3>\r
 \r
-<p>Attention! This script was written using old approach, based on direct usage of SMESH idl interface. To be updated for version 3.2.1 to use <b>smesh</b> package.\r
-<br>&nbsp;\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3"><span style="font-family: 'Lucida Console', monospace;">import \r
- salome</span></p>\r
-\r
-<p class="whs3">import geompy</p>\r
+<p class="whs4"><span style="font-family: 'Lucida Console', monospace;">import \r
+ geompy</span></p>\r
 \r
-<p class="whs3">import SMESH</p>\r
+<p class="whs4">import smesh</p>\r
 \r
-<p class="whs3">import StdMeshers</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs3">smesh = salome.lcc.FindOrLoadComponent(&quot;FactoryServer&quot;, \r
- &quot;SMESH&quot;)</p>\r
+<p class="whs4">def PrintMeshInfo(theMesh):</p>\r
 \r
-<p class="whs3">smesh.SetCurrentStudy(salome.myStudy)</p>\r
+<p class="whs4">&nbsp;&nbsp;&nbsp;&nbsp;aMesh \r
+ = theMesh.GetMesh()</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs4">&nbsp;&nbsp;&nbsp;&nbsp;print \r
+ &quot;Information about mesh:&quot;</p>\r
 \r
-<p class="whs3">box &nbsp;&nbsp;= \r
- geompy.MakeBox(0., 0., 0., 20., 20., 20.)</p>\r
+<p class="whs4">&nbsp;&nbsp;&nbsp;&nbsp;print \r
+ &quot;Number of nodes &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: \r
+ &quot;, aMesh.NbNodes()</p>\r
 \r
-<p class="whs3">idbox = geompy.addToStudy(box, &quot;box&quot;)</p>\r
+<p class="whs4">&nbsp;&nbsp;&nbsp;&nbsp;print \r
+ &quot;Number of edges &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: \r
+ &quot;, aMesh.NbEdges()</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs4">&nbsp;&nbsp;&nbsp;&nbsp;print \r
+ &quot;Number of faces &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: \r
+ &quot;, aMesh.NbFaces()</p>\r
 \r
-<p class="whs3">subShapeList = geompy.SubShapeAll(box, \r
- geompy.ShapeType[&quot;EDGE&quot;])</p>\r
+<p class="whs4">&nbsp;&nbsp;&nbsp;&nbsp;print \r
+ &quot;Number of volumes &nbsp;&nbsp;&nbsp;&nbsp;: \r
+ &quot;, aMesh.NbVolumes()</p>\r
 \r
-<p class="whs3">edge &nbsp;&nbsp;= \r
- subShapeList[0]</p>\r
+<p class="whs4">&nbsp;&nbsp;&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs3">name &nbsp;&nbsp;= \r
- geompy.SubShapeName(edge, box)</p>\r
-\r
-<p class="whs3">idedge = geompy.addToStudyInFather(box, \r
- edge, name)</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs5"># create a box</p>\r
 \r
-<p class="whs3">box &nbsp;= \r
salome.IDToObject(idbox)</p>\r
+<p class="whs4">box = geompy.MakeBox(0., 0., 0., 20., \r
20., 20.)</p>\r
 \r
-<p class="whs3">edge = salome.IDToObject(idedge)</p>\r
+<p class="whs4">geompy.addToStudy(box, &quot;box&quot;)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs3">hyp1 = smesh.CreateHypothesis(&quot;NumberOfSegments&quot;, \r
&quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs5"># select one edge of \r
the box for definition of a local hypothesis</p>\r
 \r
-<p class="whs3">hyp1.SetNumberOfSegments(3)</p>\r
+<p class="whs4">subShapeList = geompy.SubShapeAll(box, \r
+ geompy.ShapeType[&quot;EDGE&quot;])</p>\r
 \r
-<p class="whs3">hyp2 = smesh.CreateHypothesis(&quot;MaxElementArea&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs4">edge = subShapeList[0]</p>\r
 \r
-<p class="whs3">hyp2.SetMaxElementArea(10)</p>\r
+<p class="whs4">name = geompy.SubShapeName(edge, box)</p>\r
 \r
-<p class="whs3">hyp3 = smesh.CreateHypothesis(&quot;Arithmetic1D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs4">geompy.addToStudyInFather(box, edge, name)</p>\r
 \r
-<p class="whs3">hyp3.SetLength(1,1)</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs3">hyp3.SetLength(6,0)</p>\r
+<p class="whs5"># create a mesh</p>\r
 \r
-<p class="whs3">hyp4 = smesh.CreateHypothesis(&quot;Propagation&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs4">tria = smesh.Mesh(box, &quot;Mesh 2D&quot;)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs4">algo1D = tria.Segment()</p>\r
 \r
-<p class="whs3">algo1 = smesh.CreateHypothesis(&quot;Regular_1D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs4">hyp1 = algo1D.NumberOfSegments(3)</p>\r
 \r
-<p class="whs3">algo2 = smesh.CreateHypothesis(&quot;MEFISTO_2D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs4">algo2D = tria.Triangle()</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs4">hyp2 = algo2D.MaxElementArea(10.)</p>\r
 \r
-<p class="whs3">mesh = smesh.CreateMesh(box)</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs3">mesh.AddHypothesis(box,hyp1)</p>\r
+<p class="whs5"># create a sub-mesh</p>\r
 \r
-<p class="whs3">mesh.AddHypothesis(box,hyp2)</p>\r
+<p class="whs4">algo_local = tria.Segment(edge)</p>\r
 \r
-<p class="whs3">mesh.AddHypothesis(box,algo1)</p>\r
+<p class="whs4">hyp3 = algo_local.Arithmetic1D(1, 6)</p>\r
 \r
-<p class="whs3">mesh.AddHypothesis(box,algo2)</p>\r
+<p class="whs4">hyp4 = algo_local.Propagation()</p>\r
 \r
-<p class="whs3">mesh.AddHypothesis(edge,hyp3)</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs3">mesh.AddHypothesis(edge,hyp4)</p>\r
+<p class="whs5"># compute the mesh</p>\r
 \r
-<p class="whs3">mesh.AddHypothesis(edge,algo1)</p>\r
+<p class="whs4">tria.Compute()</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs4">PrintMeshInfo(tria)</p>\r
 \r
-<p class="whs3">smesh.Compute(mesh,box)</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs3">salome.sg.updateObjBrowser(1)</p>\r
+<p class="whs5"># remove a local hypothesis</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs4">mesh = tria.GetMesh()</p>\r
 \r
-<p class="whs5"># remove a hypothesis</p>\r
+<p class="whs4">mesh.RemoveHypothesis(edge, hyp4)</p>\r
 \r
-<p class="whs3">mesh.RemoveHypothesis(edge,hyp4)</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs5"># compute the mesh</p>\r
 \r
-<p class="whs3">smesh.Compute(mesh,box)</p>\r
+<p class="whs4">tria.Compute()</p>\r
 \r
-<p class="whs3">salome.sg.updateObjBrowser(1)</p>\r
+<p class="whs4">PrintMeshInfo(tria)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
 <p class="whs5"># change the value \r
- of the hypothesis</p>\r
-\r
-<p class="whs3">hyp2.SetMaxElementArea(2)</p>\r
-\r
-<p class="whs3">mesh.AddHypothesis(box,hyp2)</p>\r
+ of the 2D hypothesis</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">smesh.Compute(mesh,box)</p>\r
-\r
-<p class="whs3">salome.sg.updateObjBrowser(1) </p>\r
+<p class="whs4">hyp2.SetMaxElementArea(2.)</p>\r
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<h3><a name=bookmark3>Export of a Mesh</a></h3>\r
-\r
-<p>Attention! This script was written using old approach, based on direct usage of SMESH idl interface. To be updated for version 3.2.1 to use <b>smesh</b> package.\r
-<br>&nbsp;\r
-\r
-<p class="whs4">&nbsp;</p>\r
+<p class="whs5"># compute the mesh</p>\r
 \r
-<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">import \r
- salome</span></p>\r
+<p class="whs4">tria.Compute()</p>\r
 \r
-<p class="whs1">import geompy</p>\r
+<p class="whs4">PrintMeshInfo(tria) </p>\r
 \r
-<p class="whs1">import StdMeshers</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs1">smesh = salome.lcc.FindOrLoadComponent(&quot;FactoryServer&quot;, \r
- &quot;SMESH&quot;)</p>\r
+<h3><a name=bookmark3>Export of a Mesh</a></h3>\r
 \r
-<p class="whs1">smeshgui = salome.ImportComponentGUI(&quot;SMESH&quot;)</p>\r
+<p class="whs7">import geompy</p>\r
 \r
-<p class="whs1">smeshgui.Init(salome.myStudyId);</p>\r
+<p class="whs7">import smesh</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs2"># create a box</p>\r
+<p class="whs6"># create a box</p>\r
 \r
-<p class="whs1">box = geompy.MakeBox(0., \r
+<p class="whs7">box = geompy.MakeBox(0., \r
  0., 0., 100., 200., 300.)</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs2"># add the box to the study</p>\r
-\r
-<p class="whs1">idbox = geompy.addToStudy(box, \r
+<p class="whs7">idbox = geompy.addToStudy(box, \r
  &quot;box&quot;)</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs2"># create a hypothesis</p>\r
-\r
-<p class="whs1">print &quot;-------------------------- \r
- create Hypothesis&quot;</p>\r
-\r
-<p class="whs1">print &quot;-------------------------- \r
- NumberOfSegments&quot;</p>\r
-\r
-<p class="whs1">numberOfSegments \r
- = 7</p>\r
-\r
-<p class="whs1">hypNbSeg = smesh.CreateHypothesis(&quot;NumberOfSegments&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
-\r
-<p class="whs1">hypNbSeg.SetNumberOfSegments(numberOfSegments)</p>\r
-\r
-<p class="whs1">print hypNbSeg.GetName()</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs1">print hypNbSeg.GetId()</p>\r
+<p class="whs6"># create a mesh</p>\r
 \r
-<p class="whs1">print hypNbSeg.GetNumberOfSegments()</p>\r
-\r
-<p class="whs1">smeshgui.SetName(salome.ObjectToID(hypNbSeg), \r
- &quot;NumberOfSegments_10&quot;)</p>\r
-\r
-<p class="whs1">print &quot;-------------------------- \r
- MaxElementArea&quot;</p>\r
-\r
-<p class="whs1">maxElementArea = \r
- 800</p>\r
-\r
-<p class="whs1">hypArea = smesh.CreateHypothesis(&quot;MaxElementArea&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
-\r
-<p class="whs1">hypArea.SetMaxElementArea(maxElementArea)</p>\r
-\r
-<p class="whs1">print hypArea.GetName()</p>\r
-\r
-<p class="whs1">print hypArea.GetId()</p>\r
-\r
-<p class="whs1">print hypArea.GetMaxElementArea()</p>\r
-\r
-<p class="whs1">smeshgui.SetName(salome.ObjectToID(hypArea), \r
- &quot;MaxElementArea_500&quot;)</p>\r
-\r
-<p class="whs1">print &quot;-------------------------- \r
- MaxElementVolume&quot;</p>\r
-\r
-<p class="whs1">maxElementVolume \r
- = 900</p>\r
-\r
-<p class="whs1">hypVolume = smesh.CreateHypothesis(&quot;MaxElementVolume&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
-\r
-<p class="whs1">hypVolume.SetMaxElementVolume(maxElementVolume)</p>\r
-\r
-<p class="whs1">print hypVolume.GetName()</p>\r
-\r
-<p class="whs1">print hypVolume.GetId()</p>\r
-\r
-<p class="whs1">print hypVolume.GetMaxElementVolume()</p>\r
-\r
-<p class="whs1">smeshgui.SetName(salome.ObjectToID(hypVolume), \r
- &quot;MaxElementVolume_500&quot;)</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs2"># create algorithms</p>\r
-\r
-<p class="whs1">print &quot;-------------------------- \r
- create Algorithms&quot;</p>\r
-\r
-<p class="whs1">print &quot;-------------------------- \r
- Regular_1D&quot;</p>\r
-\r
-<p class="whs1">regular1D = smesh.CreateHypothesis(&quot;Regular_1D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
-\r
-<p class="whs1">smeshgui.SetName(salome.ObjectToID(regular1D), \r
- &quot;Wire Discretisation&quot;)</p>\r
-\r
-<p class="whs1">print &quot;-------------------------- \r
- MEFISTO_2D&quot;</p>\r
-\r
-<p class="whs1">mefisto2D = smesh.CreateHypothesis(&quot;MEFISTO_2D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
-\r
-<p class="whs1">smeshgui.SetName(salome.ObjectToID(mefisto2D), \r
- &quot;MEFISTO_2D&quot;)</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs2"># initialize a mesh with \r
- the box</p>\r
-\r
-<p class="whs1">mesh = smesh.CreateMesh(box)</p>\r
-\r
-<p class="whs1">smeshgui.SetName(salome.ObjectToID(mesh), \r
+<p class="whs7">tetra = smesh.Mesh(box, \r
  &quot;MeshBox&quot;)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs2"># add the hypothesis to \r
- the box</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs1">print &quot;-------------------------- \r
- add hypothesis to the box&quot;</p>\r
+<p class="whs7">algo1D = tetra.Segment()</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(box,hypNbSeg)</p>\r
+<p class="whs7">algo1D.NumberOfSegments(7)</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(box,hypArea)</p>\r
+<p class="whs7">&nbsp;</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(box,hypVolume)</p>\r
+<p class="whs7">algo2D = tetra.Triangle()</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(box,regular1D)</p>\r
+<p class="whs7">algo2D.MaxElementArea(800.)</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(box,mefisto2D)</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs7">&nbsp;</p>\r
 \r
-<p class="whs2"># compute the mesh</p>\r
+<p class="whs7">algo3D = tetra.Tetrahedron(smesh.NETGEN)</p>\r
 \r
-<p class="whs1">print &quot;-------------------------- \r
- compute the mesh of the box&quot;</p>\r
+<p class="whs7">algo3D.MaxElementVolume(900.)</p>\r
 \r
-<p class="whs1">ret = smesh.Compute(mesh,box)</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs1">print ret</p>\r
+<p class="whs6"># compute the mesh</p>\r
 \r
-<p class="whs1">if ret == 0:</p>\r
+<p class="whs7">tetra.Compute()</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;probleme when computing the mesh&quot;</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs1">salome.sg.updateObjBrowser(1)</p>\r
+<p class="whs6"># export the mesh in a \r
+ MED file</p>\r
 \r
-<p class="whs1">mesh.ExportMED(&quot;/tmp/meshMED.med&quot;,0)</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs4">&nbsp;</p>\r
+<p class="whs7">tetra.ExportMED(&quot;/tmp/meshMED.med&quot;, \r
+ 0) </p>\r
 \r
 <script type="text/javascript" language="javascript1.2">\r
 <!--\r
index 3fe7884..144d565 100755 (executable)
@@ -99,173 +99,62 @@ if (window.writeIntopicBar)
 \r
 <p>&nbsp;</p>\r
 \r
-<p class="whs2">from geompy import \r
*</p>\r
+<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">import \r
geompy</span></p>\r
 \r
 <p class="whs2">import smesh</p>\r
 \r
-<p>&nbsp;</p>\r
-\r
-<p># create vertices</p>\r
-\r
-<p class="whs2">Point111 = MakeVertex( \r
- 0, &nbsp;0, &nbsp;0)</p>\r
-\r
-<p class="whs2">Point211 = MakeVertex(10, \r
- &nbsp;0, &nbsp;0)</p>\r
-\r
-<p class="whs2">Point121 = MakeVertex( \r
- 0, 10, &nbsp;0)</p>\r
-\r
-<p class="whs2">Point221 = MakeVertex(10, \r
- 10, &nbsp;0)</p>\r
-\r
-<p class="whs2">Point112 = MakeVertex( \r
- 0, &nbsp;0, 10)</p>\r
-\r
-<p class="whs2">Point212 = MakeVertex(10, \r
- &nbsp;0, 10)</p>\r
-\r
-<p class="whs2">Point122 = MakeVertex( \r
- 0, 10, 10)</p>\r
-\r
-<p class="whs2">Point222 = MakeVertex(10, \r
- 10, 10)</p>\r
-\r
-<p>&nbsp;</p>\r
-\r
-<p># create edges</p>\r
-\r
-<p class="whs2">EdgeX111 = MakeEdge(Point111, \r
- Point211)</p>\r
-\r
-<p class="whs2">EdgeX121 = MakeEdge(Point121, \r
- Point221)</p>\r
-\r
-<p class="whs2">EdgeX112 = MakeEdge(Point112, \r
- Point212)</p>\r
-\r
-<p class="whs2">EdgeX122 = MakeEdge(Point122, \r
- Point222)</p>\r
-\r
-<p class="whs2">EdgeY11 = MakeEdge(Point111, \r
- Point121)</p>\r
-\r
-<p class="whs2">EdgeY21 = MakeEdge(Point211, \r
- Point221)</p>\r
-\r
-<p class="whs2">EdgeY12 = MakeEdge(Point112, \r
- Point122)</p>\r
-\r
-<p class="whs2">EdgeY22 = MakeEdge(Point212, \r
- Point222)</p>\r
-\r
-<p class="whs2">EdgeZ111 = MakeEdge(Point111, \r
- Point112)</p>\r
-\r
-<p class="whs2">EdgeZ211 = MakeEdge(Point211, \r
- Point212)</p>\r
-\r
-<p class="whs2">EdgeZ121 = MakeEdge(Point121, \r
- Point122)</p>\r
-\r
-<p class="whs2">EdgeZ221 = MakeEdge(Point221, \r
- Point222)</p>\r
-\r
-<p>&nbsp;</p>\r
-\r
-<p># create faces</p>\r
-\r
-<p class="whs2">FaceX11 = MakeQuad(EdgeY11, \r
- EdgeZ111, EdgeY12, EdgeZ121)</p>\r
-\r
-<p class="whs2">FaceX21 = MakeQuad(EdgeY21, \r
- EdgeZ211, EdgeY22, EdgeZ221)</p>\r
-\r
-<p class="whs2">FaceY111 = MakeQuad(EdgeX111, \r
- EdgeZ111, EdgeX112, EdgeZ211)</p>\r
-\r
-<p class="whs2">FaceY121 = MakeQuad(EdgeX121, \r
- EdgeZ121, EdgeX122, EdgeZ221)</p>\r
-\r
-<p class="whs2">FaceZ11 = MakeQuad(EdgeX111, \r
- EdgeY11, EdgeX121, EdgeY21)</p>\r
-\r
-<p class="whs2">FaceZ12 = MakeQuad(EdgeX112, \r
- EdgeY12, EdgeX122, EdgeY22)</p>\r
-\r
-<p>&nbsp;</p>\r
-\r
-<p># create a solid</p>\r
-\r
-<p class="whs2">Block = MakeHexa(FaceX11, \r
- FaceX21, FaceY111, FaceY121, FaceZ11, FaceZ12)</p>\r
-\r
-<p>&nbsp;</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p># create a compound</p>\r
+<p class="whs3"># create a box</p>\r
 \r
-<p class="whs2">box = MakeCompound([Block])</p>\r
+<p class="whs2">box = geompy.MakeBoxDXDYDZ(10., \r
+ 10., 10.)</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs2">geompy.addToStudy(box, \r
+ &quot;Box&quot;)</p>\r
 \r
-<p># add in the study</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2">box_id = addToStudy(box, \r
&quot;Box compound&quot;)</p>\r
+<p class="whs3"># create a hexahedral \r
mesh on the box</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs2">hexa = smesh.Mesh(box, \r
+ &quot;Box : hexahedrical mesh&quot;)</p>\r
 \r
-<p># create a hexahedral mesh on the box</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2">hexa = smesh.Mesh(box, \r
&quot;Box compound : hexahedrical mesh&quot;)</p>\r
+<p class="whs3"># create a Regular 1D \r
algorithm for edges</p>\r
 \r
-<p class="whs2">algo = hexa.Segment()</p>\r
+<p class="whs2">algo1D = hexa.Segment()</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p># define &quot;NumberOfSegments&quot; hypothesis to cut an edge in a \r
- fixed number of segments</p>\r
+<p class="whs3"># define &quot;Arithmetic1D&quot; \r
+ hypothesis to cut all edges in several segments with increasing arithmetic \r
+ length </p>\r
 \r
-<p class="whs2">algo.NumberOfSegments(4)</p>\r
+<p class="whs2">algo1D.Arithmetic1D(1, \r
+ 4)</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p># create a quadrangle 2D algorithm for faces</p>\r
+<p class="whs3"># create a quadrangle \r
+ 2D algorithm for faces</p>\r
 \r
 <p class="whs2">hexa.Quadrangle()</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p># create a hexahedron 3D algorithm for solids</p>\r
+<p class="whs3"># create a hexahedron \r
+ 3D algorithm for solids</p>\r
 \r
 <p class="whs2">hexa.Hexahedron()</p>\r
 \r
-<p>&nbsp;</p>\r
-\r
-<p># create a local hypothesis</p>\r
-\r
-<p class="whs2">algo = hexa.Segment(EdgeX111)</p>\r
-\r
-<p>&nbsp;</p>\r
-\r
-<p># define &quot;Arithmetic1D&quot; hypothesis to cut an edge in several \r
- segments with arithmetic length increasing</p>\r
-\r
-<p class="whs2">algo.Arithmetic1D(1, \r
- 4)</p>\r
-\r
-<p>&nbsp;</p>\r
-\r
-<p># define &quot;Propagation&quot; hypothesis that propagates all other \r
- hypothesis on all edges on the opposite side in case of quadrangular faces</p>\r
-\r
-<p class="whs2">algo.Propagation()</p>\r
-\r
-<p>&nbsp;</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p># compute the mesh</p>\r
+<p class="whs3"># compute the mesh</p>\r
 \r
 <p class="whs2">hexa.Compute() </p>\r
 \r
@@ -273,132 +162,94 @@ if (window.writeIntopicBar)
 \r
 <h4><a name=bookmark9>Deflection 1D and Number of Segments</a></h4>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">import \r
+ geompy</span></p>\r
 \r
 <p class="whs2">import smesh</p>\r
 \r
-<p class="whs2">import geompy</p>\r
-\r
-<p class="whs2">import salome</p>\r
-\r
-<p class="whs2">gg = salome.ImportComponentGUI(&quot;GEOM&quot;)</p>\r
-\r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs3"># create vertices</p>\r
+<p class="whs3"># create a face from \r
+ arc and straight segment</p>\r
+\r
+<p class="whs2">px = geompy.MakeVertex(100., \r
+ 0. &nbsp;, 0. \r
+ &nbsp;)</p>\r
 \r
-<p class="whs2">px &nbsp;&nbsp;= \r
geompy.MakeVertex(100., 0. &nbsp;\r
+<p class="whs2">py = geompy.MakeVertex(0. \r
&nbsp;, 100.\r
  0. &nbsp;)</p>\r
 \r
-<p class="whs2">py &nbsp;&nbsp;= \r
- geompy.MakeVertex(0. &nbsp;, \r
- 100., 0. &nbsp;)</p>\r
-\r
-<p class="whs2">pz &nbsp;&nbsp;= \r
- geompy.MakeVertex(0. &nbsp;, \r
- 0. &nbsp;, 100.)</p>\r
+<p class="whs2">pz = geompy.MakeVertex(0. \r
+ &nbsp;, 0. &nbsp;, \r
+ 100.)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs3"># create a vector from \r
- two points</p>\r
-\r
-<p class="whs2">vxy = geompy.MakeVector(px, \r
+<p class="whs2">exy = geompy.MakeEdge(px, \r
  py)</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs3"># create an arc from \r
- three points</p>\r
-\r
 <p class="whs2">arc = geompy.MakeArc(py, \r
  pz, px)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs3"># create a wire</p>\r
-\r
-<p class="whs2">wire = geompy.MakeWire([vxy, \r
+<p class="whs2">wire = geompy.MakeWire([exy, \r
  arc])</p>\r
 \r
-<p class="whs2">isPlanarFace = 1</p>\r
-\r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs3"># create a face from \r
- the wire</p>\r
+<p class="whs2">isPlanarFace = 1</p>\r
 \r
 <p class="whs2">face1 = geompy.MakeFace(wire, \r
  isPlanarFace)</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs3"><span style="font-family: 'Times New Roman', serif;"># \r
- get edges from the face</span></p>\r
-\r
-<p class="whs2">vxy,arc = geompy.SubShapeAll(face1,geompy.ShapeType[&quot;EDGE&quot;])</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3"># add objects in the \r
- study</p>\r
-\r
-<p class="whs2">id_face1 = geompy.addToStudy(face1,&quot;Face1&quot;)</p>\r
-\r
-<p class="whs2">id_arc = geompy.addToStudyInFather(face1,arc,&quot;Arc \r
- Edge&quot;)</p>\r
+<p class="whs2">geompy.addToStudy(face1,&quot;Face1&quot;)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs3"># display faces</p>\r
+<p class="whs3"># get edges from the \r
+ face</p>\r
 \r
-<p class="whs2">gg.createAndDisplayGO(id_face1)</p>\r
+<p class="whs2">e_straight,e_arc = \r
+ geompy.SubShapeAll(face1, geompy.ShapeType[&quot;EDGE&quot;])</p>\r
 \r
-<p class="whs2">gg.setDisplayMode(id_face1,1)</p>\r
-\r
-<p class="whs2">gg.setTransparency(id_face1,0.2)</p>\r
+<p class="whs2">geompy.addToStudyInFather(face1, \r
+ e_arc, &quot;Arc Edge&quot;)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs3"># create hexahedral mesh</p>\r
 \r
 <p class="whs2">hexa = smesh.Mesh(face1, \r
- &quot;Face compound : hexahedrical mesh&quot;)</p>\r
-\r
-<p class="whs2">algo = hexa.Triangle()</p>\r
+ &quot;Face : triangle mesh&quot;)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs3"># define &quot;MaxElementArea&quot; \r
- hypothesis</p>\r
-\r
-<p class="whs2">algo.MaxElementArea(30)</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3"># define &quot;NumberOfSegments&quot; \r
+ hypothesis to cut a straight edge in a fixed number of segments</p>\r
 \r
-<p class="whs3"># create a local hypothesis \r
- on the wire</p>\r
+<p class="whs2">algo1D = hexa.Segment()</p>\r
 \r
-<p class="whs2">algo = hexa.Segment(wire)</p>\r
+<p class="whs2">algo1D.NumberOfSegments(6)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs3"># define &quot;NumberOfSegments&quot; \r
- hypothesis to cut a straight edge in a fixed number of segments</p>\r
+<p class="whs3"># define &quot;MaxElementArea&quot; \r
+ hypothesis</p>\r
+\r
+<p class="whs2">algo2D = hexa.Triangle()</p>\r
 \r
-<p class="whs2">algo.NumberOfSegments(6)</p>\r
+<p class="whs2">algo2D.MaxElementArea(70.0)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs3"># define a local &quot;Deflection1D&quot; \r
  hypothesis on the arc</p>\r
 \r
-<p class="whs2">algo = hexa.Segment(arc)</p>\r
+<p class="whs2">algo_local = hexa.Segment(e_arc)</p>\r
 \r
-<p class="whs2">algo.Deflection1D(1)</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs2">algo_local.Deflection1D(1.0)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
@@ -406,298 +257,121 @@ if (window.writeIntopicBar)
 \r
 <p class="whs2">hexa.Compute() </p>\r
 \r
-<p>&nbsp;</p>\r
-\r
 <h4><a name=bookmark2>Start and End Length</a></h4>\r
 \r
-<p class="whs2">from geompy import \r
*</p>\r
+<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">from \r
geompy import *</span></p>\r
 \r
 <p class="whs2">import smesh</p>\r
 \r
-<p>&nbsp;</p>\r
-\r
-<p># create vertices</p>\r
-\r
-<p class="whs2">Point111 = MakeVertex( \r
- 0, &nbsp;0, &nbsp;0)</p>\r
-\r
-<p class="whs2">Point211 = MakeVertex(10, \r
- &nbsp;0, &nbsp;0)</p>\r
-\r
-<p class="whs2">Point121 = MakeVertex( \r
- 0, 10, &nbsp;0)</p>\r
-\r
-<p class="whs2">Point221 = MakeVertex(10, \r
- 10, &nbsp;0)</p>\r
-\r
-<p class="whs2">Point112 = MakeVertex( \r
- 0, &nbsp;0, 10)</p>\r
-\r
-<p class="whs2">Point212 = MakeVertex(10, \r
- &nbsp;0, 10)</p>\r
-\r
-<p class="whs2">Point122 = MakeVertex( \r
- 0, 10, 10)</p>\r
-\r
-<p class="whs2">Point222 = MakeVertex(10, \r
- 10, 10)</p>\r
-\r
-<p>&nbsp;</p>\r
-\r
-<p># create edges</p>\r
-\r
-<p class="whs2">EdgeX111 = MakeEdge(Point111, \r
- Point211)</p>\r
-\r
-<p class="whs2">EdgeX121 = MakeEdge(Point121, \r
- Point221)</p>\r
-\r
-<p class="whs2">EdgeX112 = MakeEdge(Point112, \r
- Point212)</p>\r
-\r
-<p class="whs2">EdgeX122 = MakeEdge(Point122, \r
- Point222)</p>\r
-\r
-<p class="whs2">EdgeY11 = MakeEdge(Point111, \r
- Point121)</p>\r
-\r
-<p class="whs2">EdgeY21 = MakeEdge(Point211, \r
- Point221)</p>\r
-\r
-<p class="whs2">EdgeY12 = MakeEdge(Point112, \r
- Point122)</p>\r
-\r
-<p class="whs2">EdgeY22 = MakeEdge(Point212, \r
- Point222)</p>\r
-\r
-<p class="whs2">EdgeZ111 = MakeEdge(Point111, \r
- Point112)</p>\r
-\r
-<p class="whs2">EdgeZ211 = MakeEdge(Point211, \r
- Point212)</p>\r
-\r
-<p class="whs2">EdgeZ121 = MakeEdge(Point121, \r
- Point122)</p>\r
-\r
-<p class="whs2">EdgeZ221 = MakeEdge(Point221, \r
- Point222)</p>\r
-\r
-<p>&nbsp;</p>\r
-\r
-<p># create faces</p>\r
-\r
-<p class="whs2">FaceX11 = MakeQuad(EdgeY11, \r
- EdgeZ111, EdgeY12, EdgeZ121)</p>\r
-\r
-<p class="whs2">FaceX21 = MakeQuad(EdgeY21, \r
- EdgeZ211, EdgeY22, EdgeZ221)</p>\r
-\r
-<p class="whs2">FaceY111 = MakeQuad(EdgeX111, \r
- EdgeZ111, EdgeX112, EdgeZ211)</p>\r
-\r
-<p class="whs2">FaceY121 = MakeQuad(EdgeX121, \r
- EdgeZ121, EdgeX122, EdgeZ221)</p>\r
-\r
-<p class="whs2">FaceZ11 = MakeQuad(EdgeX111, \r
- EdgeY11, EdgeX121, EdgeY21)</p>\r
-\r
-<p class="whs2">FaceZ12 = MakeQuad(EdgeX112, \r
- EdgeY12, EdgeX122, EdgeY22)</p>\r
-\r
-<p>&nbsp;</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p># create a solid</p>\r
+<p class="whs3"># create a box</p>\r
 \r
-<p class="whs2">Block = MakeHexa(FaceX11\r
FaceX21, FaceY111, FaceY121, FaceZ11, FaceZ12)</p>\r
+<p class="whs2">box = MakeBoxDXDYDZ(10.\r
10., 10.)</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs2">addToStudy(box, &quot;Box&quot;)</p>\r
 \r
-<p># create a compound</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2">box = MakeCompound([Block])</p>\r
+<p class="whs3"># get one edge of the \r
+ box to put local hypothesis on</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs2">p5 = MakeVertex(5., \r
+ 0., 0.)</p>\r
 \r
-<p># add in the study</p>\r
+<p class="whs2">EdgeX = GetEdgeNearPoint(box, \r
+ p5)</p>\r
 \r
-<p class="whs2">box_id = addToStudy(box, \r
&quot;Box compound&quot;)</p>\r
+<p class="whs2">addToStudyInFather(box, \r
EdgeX, &quot;Edge [0,0,0 - 10,0,0]&quot;)</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p># create a hexahedral mesh on the box</p>\r
+<p class="whs3"># create a hexahedral \r
+ mesh on the box</p>\r
 \r
 <p class="whs2">hexa = smesh.Mesh(box, \r
- &quot;Box compound : hexahedrical mesh&quot;)</p>\r
-\r
-<p class="whs2">algo = hexa.Segment()</p>\r
-\r
-<p>&nbsp;</p>\r
-\r
-<p># define &quot;NumberOfSegments&quot; hypothesis to cut an edge in a \r
- fixed number of segments</p>\r
+ &quot;Box : hexahedrical mesh&quot;)</p>\r
 \r
-<p class="whs2">algo.NumberOfSegments(4)</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs3"># set algorithms</p>\r
 \r
-<p># create a quadrangle 2D algorithm for faces</p>\r
+<p class="whs2">algo1D = hexa.Segment()</p>\r
 \r
 <p class="whs2">hexa.Quadrangle()</p>\r
 \r
-<p>&nbsp;</p>\r
-\r
-<p># create a hexahedron 3D algorithm for solids</p>\r
-\r
 <p class="whs2">hexa.Hexahedron()</p>\r
 \r
-<p>&nbsp;</p>\r
-\r
-<p># create a local hypothesis</p>\r
-\r
-<p class="whs2">algo = hexa.Segment(EdgeX111)</p>\r
-\r
-<p>&nbsp;</p>\r
-\r
-<p># define &quot;StartEndLength&quot; hypothesis to cut an edge in several \r
- segments with increasing geometric length </p>\r
-\r
-<p class="whs2">algo.StartEndLength(1, \r
- 6)</p>\r
-\r
-<p>&nbsp;</p>\r
-\r
-<p># define &quot;Propagation&quot; hypothesis that propagates all other \r
- hypothesis on all edges on the opposite side in case of quadrangular faces</p>\r
-\r
-<p class="whs2">algo.Propagation()</p>\r
-\r
-<p>&nbsp;</p>\r
-\r
-<p># compute the mesh</p>\r
-\r
-<p class="whs2">hexa.Compute() </p>\r
-\r
 <p class="whs2">&nbsp;</p>\r
 \r
-<h4><a name=bookmark3>Average Length</a></h4>\r
-\r
-<p class="whs2">from geompy import \r
- *</p>\r
+<p class="whs3"># define &quot;NumberOfSegments&quot; \r
+ hypothesis to cut an edge in a fixed number of segments</p>\r
 \r
-<p class="whs2">import smesh</p>\r
+<p class="whs2">algo1D.NumberOfSegments(4)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs3"># create vertices</p>\r
-\r
-<p class="whs2">Point111 = MakeVertex( \r
- 0, &nbsp;0, &nbsp;0)</p>\r
-\r
-<p class="whs2">Point211 = MakeVertex(10, \r
- &nbsp;0, &nbsp;0)</p>\r
-\r
-<p class="whs2">Point121 = MakeVertex( \r
- 0, 10, &nbsp;0)</p>\r
-\r
-<p class="whs2">Point221 = MakeVertex(10, \r
- 10, &nbsp;0)</p>\r
-\r
-<p class="whs2">Point112 = MakeVertex( \r
- 0, &nbsp;0, 10)</p>\r
-\r
-<p class="whs2">Point212 = MakeVertex(10, \r
- &nbsp;0, 10)</p>\r
-\r
-<p class="whs2">Point122 = MakeVertex( \r
- 0, 10, 10)</p>\r
+<p class="whs3"># create a local hypothesis</p>\r
 \r
-<p class="whs2">Point222 = MakeVertex(10, \r
- 10, 10)</p>\r
+<p class="whs2">algo_local = hexa.Segment(EdgeX)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs3"># create edges</p>\r
-\r
-<p class="whs2">EdgeX111 = MakeEdge(Point111, \r
- Point211)</p>\r
+<p class="whs3"># define &quot;StartEndLength&quot; \r
+ hypothesis to cut an edge in several segments with increasing geometric \r
+ length</p>\r
 \r
-<p class="whs2">EdgeX121 = MakeEdge(Point121, \r
- Point221)</p>\r
-\r
-<p class="whs2">EdgeX112 = MakeEdge(Point112, \r
- Point212)</p>\r
-\r
-<p class="whs2">EdgeX122 = MakeEdge(Point122, \r
- Point222)</p>\r
-\r
-<p class="whs2">EdgeY11 = MakeEdge(Point111, \r
- Point121)</p>\r
-\r
-<p class="whs2">EdgeY21 = MakeEdge(Point211, \r
- Point221)</p>\r
-\r
-<p class="whs2">EdgeY12 = MakeEdge(Point112, \r
- Point122)</p>\r
-\r
-<p class="whs2">EdgeY22 = MakeEdge(Point212, \r
- Point222)</p>\r
+<p class="whs2">algo_local.StartEndLength(1, \r
+ 6)</p>\r
 \r
-<p class="whs2">EdgeZ111 = MakeEdge(Point111, \r
- Point112)</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2">EdgeZ211 = MakeEdge(Point211, \r
Point212)</p>\r
+<p class="whs3"># define &quot;Propagation&quot; \r
hypothesis that propagates all other hypothesis</p>\r
 \r
-<p class="whs2">EdgeZ121 = MakeEdge(Point121, \r
Point122)</p>\r
+<p class="whs3"># on all edges on the \r
opposite side in case of quadrangular faces</p>\r
 \r
-<p class="whs2">EdgeZ221 = MakeEdge(Point221, \r
- Point222)</p>\r
+<p class="whs2">algo_local.Propagation()</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs3"># create faces</p>\r
-\r
-<p class="whs2">FaceX11 = MakeQuad(EdgeY11, \r
- EdgeZ111, EdgeY12, EdgeZ121)</p>\r
-\r
-<p class="whs2">FaceX21 = MakeQuad(EdgeY21, \r
- EdgeZ211, EdgeY22, EdgeZ221)</p>\r
+<p class="whs3"># compute the mesh</p>\r
 \r
-<p class="whs2">FaceY111 = MakeQuad(EdgeX111, \r
- EdgeZ111, EdgeX112, EdgeZ211)</p>\r
+<p class="whs2">hexa.Compute() </p>\r
 \r
-<p class="whs2">FaceY121 = MakeQuad(EdgeX121, \r
- EdgeZ121, EdgeX122, EdgeZ221)</p>\r
+<h4><a name=bookmark3>Average Length</a></h4>\r
 \r
-<p class="whs2">FaceZ11 = MakeQuad(EdgeX111, \r
EdgeY11, EdgeX121, EdgeY21)</p>\r
+<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">from \r
geompy import *</span></p>\r
 \r
-<p class="whs2">FaceZ12 = MakeQuad(EdgeX112, \r
- EdgeY12, EdgeX122, EdgeY22)</p>\r
+<p class="whs2">import smesh</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs3"># create a solid</p>\r
+<p class="whs3"># create a box</p>\r
 \r
-<p class="whs2">Block = MakeHexa(FaceX11\r
FaceX21, FaceY111, FaceY121, FaceZ11, FaceZ12)</p>\r
+<p class="whs2">box = MakeBoxDXDYDZ(10.\r
10., 10.)</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs2">addToStudy(box, &quot;Box&quot;)</p>\r
 \r
-<p class="whs3"># create a compound</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2">box = MakeCompound([Block])</p>\r
+<p class="whs3"># get one edge of the \r
+ box to put local hypothesis on</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs2">p5 = MakeVertex(5., \r
+ 0., 0.)</p>\r
 \r
-<p class="whs3"># add in the study</p>\r
+<p class="whs2">EdgeX = GetEdgeNearPoint(box, \r
+ p5)</p>\r
 \r
-<p class="whs2">box_id = addToStudy(box, \r
&quot;Box compound&quot;)</p>\r
+<p class="whs2">addToStudyInFather(box, \r
EdgeX, &quot;Edge [0,0,0 - 10,0,0]&quot;)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
@@ -705,51 +379,47 @@ if (window.writeIntopicBar)
  mesh on the box</p>\r
 \r
 <p class="whs2">hexa = smesh.Mesh(box, \r
- &quot;Box compound : hexahedrical mesh&quot;)</p>\r
-\r
-<p class="whs2">algo = hexa.Segment()</p>\r
+ &quot;Box : hexahedrical mesh&quot;)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs3"># define &quot;NumberOfSegments&quot; \r
- hypothesis to cut an edge in a fixed number of segments</p>\r
-\r
-<p class="whs2">algo.NumberOfSegments(4)</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3"># set algorithms</p>\r
 \r
-<p class="whs3"># create a quadrangle \r
- 2D algorithm for faces</p>\r
+<p class="whs2">algo1D = hexa.Segment()</p>\r
 \r
 <p class="whs2">hexa.Quadrangle()</p>\r
 \r
+<p class="whs2">hexa.Hexahedron()</p>\r
+\r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs3"># create a hexahedron \r
3D algorithm for solids</p>\r
+<p class="whs3"># define &quot;NumberOfSegments&quot; \r
hypothesis to cut all edges in a fixed number of segments</p>\r
 \r
-<p class="whs2">hexa.Hexahedron()</p>\r
+<p class="whs2">algo1D.NumberOfSegments(4)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs3"># create a local hypothesis</p>\r
+<p class="whs3"># create a sub-mesh</p>\r
 \r
-<p class="whs2">algo = hexa.Segment(EdgeX111)</p>\r
+<p class="whs2">algo_local = hexa.Segment(EdgeX)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs3"># define &quot;LocalLength&quot; \r
  hypothesis to cut an edge in several segments with the same length</p>\r
 \r
-<p class="whs2">algo.LocalLength(2)</p>\r
+<p class="whs2">algo_local.LocalLength(2.)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs3"># define &quot;Propagation&quot; \r
- hypothesis that propagates all other hypothesis on all edges on<span style="font-family: 'Times New Roman', serif;"> \r
- the opposite side in case of quadrangular faces</span></p>\r
+ hypothesis that propagates all other hypothesis</p>\r
 \r
-<p class="whs2">algo.Propagation()</p>\r
+<p class="whs3"># on all edges on the \r
+ opposite side in case of quadrangular faces</p>\r
+\r
+<p class="whs2">algo_local.Propagation()</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
@@ -757,10 +427,6 @@ if (window.writeIntopicBar)
 \r
 <p class="whs2">hexa.Compute() </p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
-\r
 <h3>Defining 2D and 3D hypotheses</h3>\r
 \r
 <h4><a name=bookmark4>Maximum Element Area</a></h4>\r
@@ -768,8 +434,6 @@ if (window.writeIntopicBar)
 <p class="whs4"><span style="font-family: 'Lucida Console', monospace;">import \r
  smesh</span></p>\r
 \r
-<p class="whs4">import geompy</p>\r
-\r
 <p class="whs4">import salome</p>\r
 \r
 <p class="whs4">&nbsp;</p>\r
@@ -858,172 +522,60 @@ if (window.writeIntopicBar)
 \r
 <h4><a name=bookmark5>Maximum Element Volume</a></h4>\r
 \r
-<p>Attention! This script was written using old approach, based on direct usage of SMESH idl interface. To be updated for version 3.2.1 to use <b>smesh</b> package.\r
-<br>&nbsp;\r
-\r
 <p class="whs4"><span style="font-family: 'Lucida Console', monospace;">import \r
- salome</span></p>\r
-\r
-<p class="whs4">import geompy</p>\r
-\r
-<p class="whs4">import StdMeshers</p>\r
+ geompy</span></p>\r
 \r
-<p class="whs4">import NETGENPlugin</p>\r
+<p class="whs4">import smesh</p>\r
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs4">smesh = salome.lcc.FindOrLoadComponent(&quot;FactoryServer&quot;, \r
- &quot;SMESH&quot;)</p>\r
+<p class="whs5"># create a cylinder</p>\r
 \r
-<p class="whs4">smeshgui = salome.ImportComponentGUI(&quot;SMESH&quot;)</p>\r
+<p class="whs4">cyl = geompy.MakeCylinderRH(30., \r
+ 50.)</p>\r
 \r
-<p class="whs4">smeshgui.Init(salome.myStudyId);</p>\r
+<p class="whs4">geompy.addToStudy(cyl, \r
+ &quot;cyl&quot;)</p>\r
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5"># create a box</p>\r
+<p class="whs5"># create a mesh on \r
+ the cylinder</p>\r
 \r
-<p class="whs4">box = geompy.MakeCylinderRH(30, \r
- 50) #MakeBox(0., 0., 0., </p>\r
-\r
-<p class="whs4">100., 200., 300.)</p>\r
+<p class="whs4">tetra = smesh.Mesh(cyl, \r
+ &quot;Cylinder : tetrahedrical mesh&quot;)</p>\r
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5"># add the box in the \r
- study</p>\r
-\r
-<p class="whs4">idbox = geompy.addToStudy(box, \r
- &quot;box&quot;)</p>\r
-\r
-<p class="whs4">&nbsp;</p>\r
-\r
-<p class="whs5"># create a set of hypotheses</p>\r
-\r
-<p class="whs5">&nbsp;</p>\r
-\r
-<p class="whs5"># Number of Segments</p>\r
-\r
-<p class="whs4">numberOfSegments \r
- = 7</p>\r
-\r
-<p class="whs4">hypNbSeg = smesh.CreateHypothesis(&quot;NumberOfSegments&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs5"># assign algorithms</p>\r
 \r
-<p class="whs4">hypNbSeg.SetNumberOfSegments(numberOfSegments)</p>\r
+<p class="whs4">algo1D = tetra.Segment()</p>\r
 \r
-<p class="whs4">print hypNbSeg.GetName()</p>\r
+<p class="whs4">algo2D = tetra.Triangle()</p>\r
 \r
-<p class="whs4">print hypNbSeg.GetNumberOfSegments()</p>\r
-\r
-<p class="whs4">smeshgui.SetName(salome.ObjectToID(hypNbSeg), \r
- &quot;NumberOfSegments_7&quot;)</p>\r
+<p class="whs4">algo3D = tetra.Tetrahedron(smesh.NETGEN)</p>\r
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5"># Max Element Area</p>\r
-\r
-<p class="whs4">maxElementArea = \r
- 800</p>\r
-\r
-<p class="whs4">hypArea = smesh.CreateHypothesis(&quot;MaxElementArea&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs5"># assign 1D and 2D \r
+ hypotheses</p>\r
 \r
-<p class="whs4">hypArea.SetMaxElementArea(maxElementArea)</p>\r
+<p class="whs4">algo1D.NumberOfSegments(7)</p>\r
 \r
-<p class="whs4">print hypArea.GetName()</p>\r
-\r
-<p class="whs4">print hypArea.GetMaxElementArea()</p>\r
-\r
-<p class="whs4">smeshgui.SetName(salome.ObjectToID(hypArea), \r
- &quot;MaxElementArea_800&quot;)</p>\r
+<p class="whs4">algo2D.MaxElementArea(150.)</p>\r
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5"># Max Element Volume</p>\r
-\r
-<p class="whs4">maxElementVolume \r
- = 900</p>\r
-\r
-<p class="whs4">hypVolume = smesh.CreateHypothesis(&quot;MaxElementVolume&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
-\r
-<p class="whs4">hypVolume.SetMaxElementVolume(maxElementVolume)</p>\r
-\r
-<p class="whs4">print hypVolume.GetName()</p>\r
-\r
-<p class="whs4">print hypVolume.GetMaxElementVolume()</p>\r
-\r
-<p class="whs4">smeshgui.SetName(salome.ObjectToID(hypVolume), \r
- &quot;MaxElementVolume_900&quot;)</p>\r
-\r
-<p class="whs4">&nbsp;</p>\r
-\r
-<p class="whs5"># create a set of algorithms</p>\r
-\r
-<p class="whs5">&nbsp;</p>\r
-\r
-<p class="whs5"># Regular_1D</p>\r
-\r
-<p class="whs4">regular1D = smesh.CreateHypothesis(&quot;Regular_1D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
-\r
-<p class="whs4">smeshgui.SetName(salome.ObjectToID(regular1D), \r
- &quot;Wire Discretisation&quot;)</p>\r
-\r
-<p class="whs4">&nbsp;</p>\r
-\r
-<p class="whs5"># MEFISTO_2D</p>\r
-\r
-<p class="whs4">mefisto2D = smesh.CreateHypothesis(&quot;MEFISTO_2D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
-\r
-<p class="whs4">smeshgui.SetName(salome.ObjectToID(mefisto2D), \r
- &quot;MEFISTO_2D&quot;)</p>\r
-\r
-<p class="whs4">&nbsp;</p>\r
-\r
-<p class="whs5"># NETGEN_3D (Tetrahedron \r
- meshing algorithm)</p>\r
-\r
-<p class="whs4">tetra3D = smesh.CreateHypothesis(&quot;NETGEN_3D&quot;, \r
- &quot;libNETGENEngine.so&quot;)</p>\r
-\r
-<p class="whs4">smeshgui.SetName(salome.ObjectToID(tetra3D), \r
- &quot;NETGEN_3D&quot;)</p>\r
-\r
-<p class="whs4">&nbsp;</p>\r
-\r
-<p class="whs5"># initialize a mesh \r
- with the box</p>\r
-\r
-<p class="whs4">mesh = smesh.CreateMesh(box)</p>\r
-\r
-<p class="whs4">smeshgui.SetName(salome.ObjectToID(mesh), \r
- &quot;MeshBox&quot;)</p>\r
-\r
-<p class="whs4">&nbsp;</p>\r
-\r
-<p class="whs5"># add hypotheses and \r
- algorithms to the box</p>\r
-\r
-<p class="whs4">mesh.AddHypothesis(box,hypNbSeg)</p>\r
-\r
-<p class="whs4">mesh.AddHypothesis(box,hypArea)</p>\r
-\r
-<p class="whs4">mesh.AddHypothesis(box,hypVolume)</p>\r
-\r
-<p class="whs4">mesh.AddHypothesis(box,regular1D)</p>\r
-\r
-<p class="whs4">mesh.AddHypothesis(box,mefisto2D)</p>\r
+<p class="whs5"># assign Max Element \r
+ Volume hypothesis</p>\r
 \r
-<p class="whs4">mesh.AddHypothesis(box,tetra3D)</p>\r
+<p class="whs4">algo3D.MaxElementVolume(200.)</p>\r
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
 <p class="whs5"># compute the mesh</p>\r
 \r
-<p class="whs4">ret = smesh.Compute(mesh,box)</p>\r
+<p class="whs4">ret = tetra.Compute()</p>\r
 \r
 <p class="whs4">if ret == 0:</p>\r
 \r
@@ -1033,19 +585,12 @@ if (window.writeIntopicBar)
 <p class="whs4">else:</p>\r
 \r
 <p class="whs4">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;Computation succeded&quot;</p>\r
-\r
-<p class="whs4">salome.sg.updateObjBrowser(1) \r
- </p>\r
-\r
-<p class="whs4">&nbsp;</p>\r
+ &quot;Computation succeded&quot; </p>\r
 \r
 <h4><a name=bookmark6>Length from Edges</a></h4>\r
 \r
 <p class="whs2"><span style="font-family: 'Lucida Console', monospace;">import \r
- salome</span></p>\r
-\r
-<p class="whs2">import geompy</p>\r
+ geompy</span></p>\r
 \r
 <p class="whs2">import smesh</p>\r
 \r
@@ -1059,21 +604,18 @@ if (window.writeIntopicBar)
 <p class="whs2">sketcher2 = geompy.MakeSketcher(&quot;Sketcher:F \r
  20 20:TT 50 20:TT 50 50:TT 20 50:WW&quot;)</p>\r
 \r
-<p class="whs2">isPlanarFace = 1</p>\r
-\r
 <p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs3"># create a face from \r
  two wires</p>\r
 \r
-<p class="whs2">face1 = geompy.MakeFaces([sketcher1, \r
- sketcher2],isPlanarFace)</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs2">isPlanarFace = 1</p>\r
 \r
-<p class="whs3"># add object in the study</p>\r
+<p class="whs2">face1 = geompy.MakeFaces([sketcher1, \r
+ sketcher2], isPlanarFace)</p>\r
 \r
-<p class="whs2">id_face1 = geompy.addToStudy(face1,&quot;Face1&quot;)</p>\r
+<p class="whs2">geompy.addToStudy(face1, \r
+ &quot;Face1&quot;)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
@@ -1086,26 +628,24 @@ if (window.writeIntopicBar)
 \r
 <p class="whs3"># Define 1D meshing</p>\r
 \r
-<p class="whs2">algo = tria.Segment()</p>\r
+<p class="whs2">algo1D = tria.Segment()</p>\r
 \r
-<p class="whs2">algo.NumberOfSegments(2)</p>\r
+<p class="whs2">algo1D.NumberOfSegments(2)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs3"># create and assign the \r
  algorithm for 2D meshing with triangles</p>\r
 \r
-<p class="whs2">algo = tria.Triangle()</p>\r
+<p class="whs2">algo2D = tria.Triangle()</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs3"># create and assign &quot;LengthFromEdges&quot; \r
- hypothesis to build triangles </p>\r
-\r
-<p class="whs3"># based on the length \r
- of the edges taken from the wire</p>\r
+ hypothesis to build triangles<span style="font-family: 'Times New Roman', serif;"> \r
+ based on the length of the edges taken from the wire</span></p>\r
 \r
-<p class="whs2">algo.LengthFromEdges()</p>\r
+<p class="whs2">algo2D.LengthFromEdges()</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
@@ -1119,266 +659,218 @@ if (window.writeIntopicBar)
 \r
 <h4><a name=bookmark7>Propagation</a></h4>\r
 \r
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">from \r
geompy import *</span></p>\r
+<p class="whs2">from geompy import \r
*</p>\r
 \r
 <p class="whs2">import smesh</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs3"># create vertices</p>\r
-\r
-<p class="whs2">Point111 = MakeVertex( \r
- 0, &nbsp;0, &nbsp;0)</p>\r
+<p class="whs3"># create a box</p>\r
 \r
-<p class="whs2">Point211 = MakeVertex(10\r
&nbsp;0, &nbsp;0)</p>\r
+<p class="whs2">box = MakeBoxDXDYDZ(10.\r
10., 10.)</p>\r
 \r
-<p class="whs2">Point121 = MakeVertex( \r
- 0, 10, &nbsp;0)</p>\r
+<p class="whs2">addToStudy(box, &quot;Box&quot;)</p>\r
 \r
-<p class="whs2">Point221 = MakeVertex(10, \r
- 10, &nbsp;0)</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2">Point112 = MakeVertex( \r
0, &nbsp;0, 10)</p>\r
+<p class="whs3"># get one edge of the \r
box to put local hypothesis on</p>\r
 \r
-<p class="whs2">Point212 = MakeVertex(10\r
&nbsp;0, 10)</p>\r
+<p class="whs2">p5 = MakeVertex(5.\r
0., 0.)</p>\r
 \r
-<p class="whs2">Point122 = MakeVertex( \r
0, 10, 10)</p>\r
+<p class="whs2">EdgeX = GetEdgeNearPoint(box, \r
p5)</p>\r
 \r
-<p class="whs2">Point222 = MakeVertex(10\r
10, 10)</p>\r
+<p class="whs2">addToStudyInFather(box\r
EdgeX, &quot;Edge [0,0,0 - 10,0,0]&quot;)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs3"># create edges</p>\r
+<p class="whs3"># create a hexahedral \r
+ mesh on the box</p>\r
 \r
-<p class="whs2">EdgeX111 = MakeEdge(Point111, \r
- Point211)</p>\r
+<p class="whs2">hexa = smesh.Mesh(box, \r
+ &quot;Box : hexahedrical mesh&quot;)</p>\r
+\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2">EdgeX121 = MakeEdge(Point121, \r
Point221)</p>\r
+<p class="whs3"># set global algorithms \r
and hypotheses</p>\r
 \r
-<p class="whs2">EdgeX112 = MakeEdge(Point112, \r
- Point212)</p>\r
+<p class="whs2">algo1D = hexa.Segment()</p>\r
 \r
-<p class="whs2">EdgeX122 = MakeEdge(Point122, \r
- Point222)</p>\r
+<p class="whs2">hexa.Quadrangle()</p>\r
 \r
-<p class="whs2">EdgeY11 = MakeEdge(Point111, \r
- Point121)</p>\r
+<p class="whs2">hexa.Hexahedron()</p>\r
 \r
-<p class="whs2">EdgeY21 = MakeEdge(Point211, \r
- Point221)</p>\r
+<p class="whs2">algo1D.NumberOfSegments(4)</p>\r
 \r
-<p class="whs2">EdgeY12 = MakeEdge(Point112, \r
- Point122)</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2">EdgeY22 = MakeEdge(Point212, \r
Point222)</p>\r
+<p class="whs3"># create a sub-mesh with \r
local 1D hypothesis and propagation</p>\r
 \r
-<p class="whs2">EdgeZ111 = MakeEdge(Point111, \r
- Point112)</p>\r
+<p class="whs2">algo_local = hexa.Segment(EdgeX)</p>\r
 \r
-<p class="whs2">EdgeZ211 = MakeEdge(Point211, \r
- Point212)</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2">EdgeZ121 = MakeEdge(Point121, \r
Point122)</p>\r
+<p class="whs3"># define &quot;Arithmetic1D&quot; \r
hypothesis to cut an edge in several segments with increasing length</p>\r
 \r
-<p class="whs2">EdgeZ221 = MakeEdge(Point221, \r
Point222)</p>\r
+<p class="whs2">algo_local.Arithmetic1D(1, \r
4)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs3"># create faces</p>\r
+<p class="whs3"># define &quot;Propagation&quot; \r
+ hypothesis that propagates all other 1D hypotheses</p>\r
 \r
-<p class="whs2">FaceX11 = MakeQuad(EdgeY11, \r
EdgeZ111, EdgeY12, EdgeZ121)</p>\r
+<p class="whs3"># from all edges on the \r
opposite side of a face in case of quadrangular faces</p>\r
 \r
-<p class="whs2">FaceX21 = MakeQuad(EdgeY21, \r
- EdgeZ211, EdgeY22, EdgeZ221)</p>\r
+<p class="whs2">algo_local.Propagation()</p>\r
 \r
-<p class="whs2">FaceY111 = MakeQuad(EdgeX111, \r
- EdgeZ111, EdgeX112, EdgeZ211)</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2">FaceY121 = MakeQuad(EdgeX121, \r
- EdgeZ121, EdgeX122, EdgeZ221)</p>\r
+<p class="whs3"># compute the mesh</p>\r
 \r
-<p class="whs2">FaceZ11 = MakeQuad(EdgeX111, \r
EdgeY11, EdgeX121, EdgeY21)</p>\r
+<p><span style="font-family: 'Lucida Console', monospace;">hexa.Compute()</span> \r
+ </p>\r
 \r
-<p class="whs2">FaceZ12 = MakeQuad(EdgeX112, \r
- EdgeY12, EdgeX122, EdgeY22)</p>\r
+<h3><a name=bookmark8>Defining Meshing Algorithms</a></h3>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs4">import geompy</p>\r
 \r
-<p class="whs3"># create a solid</p>\r
+<p class="whs4">import smesh</p>\r
 \r
-<p class="whs2">box = MakeHexa(FaceX11, \r
- FaceX21, FaceY111, FaceY121, FaceZ11, FaceZ12)</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs6"># create a box</p>\r
 \r
-<p class="whs3"># add in the study</p>\r
+<p class="whs4">box = geompy.MakeBoxDXDYDZ(10., \r
+ 10., 10.)</p>\r
 \r
-<p class="whs2">box_id = addToStudy(box, \r
+<p class="whs4">geompy.addToStudy(box, \r
  &quot;Box&quot;)</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs3"># create a hexahedral \r
+<p class="whs6"># 1. Create a hexahedral \r
  mesh on the box</p>\r
 \r
-<p class="whs2">hexa = smesh.Mesh(box, \r
+<p class="whs4">hexa = smesh.Mesh(box, \r
  &quot;Box : hexahedrical mesh&quot;)</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs3"># create an 1D algorithm \r
+<p class="whs6"># create a Regular 1D algorithm \r
  for edges</p>\r
 \r
-<p class="whs2">algo = hexa.Segment()</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs3"># define &quot;NumberOfSegments&quot; \r
- hypothesis to cut an edge in a fixed number of segments</p>\r
+<p class="whs4">algo1D = hexa.Segment()</p>\r
 \r
-<p class="whs2">algo.NumberOfSegments(4)</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs3"># create a quadrangle \r
- 2D algorithm for faces</p>\r
-\r
-<p class="whs2">hexa.Quadrangle()</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs6"># create a quadrangle 2D \r
+ algorithm for faces</p>\r
 \r
-<p class="whs3"># create a hexahedron \r
- 3D algorithm for solids</p>\r
+<p class="whs4">algo2D = hexa.Quadrangle()</p>\r
 \r
-<p class="whs2">hexa.Hexahedron()</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs3"># create a local hypothesis</p>\r
+<p class="whs6"># create a hexahedron 3D \r
+ algorithm for solids</p>\r
 \r
-<p class="whs2">algo = hexa.Segment(EdgeX111)</p>\r
+<p class="whs4">algo3D = hexa.Hexahedron()</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs3"># define &quot;Arithmetic1D&quot; \r
- hypothesis to cut an edge<span style="font-family: 'Times New Roman', serif;"> \r
- in several segments with increasing length</span></p>\r
+<p class="whs6"># define hypotheses</p>\r
 \r
-<p class="whs2">algo.Arithmetic1D(1, \r
+<p class="whs4">algo1D.Arithmetic1D(1, \r
  4)</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs3"># define &quot;Propagation&quot; \r
- hypothesis that propagates all other 1D hypotheses</p>\r
-\r
-<p class="whs3"># from all edges on the \r
- opposite side of a face in case of quadrangular faces</p>\r
-\r
-<p class="whs2">algo.Propagation()</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs6"># compute the mesh</p>\r
 \r
-<p class="whs3"># compute the mesh</p>\r
+<p class="whs4">hexa.Compute()</p>\r
 \r
-<p class="whs2">hexa.Compute() &nbsp;</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
-<h3><a name=bookmark8>Defining Meshing Algorithms</a></h3>\r
+<p class="whs6"># 2. Create a tetrahedral \r
+ mesh on the box</p>\r
 \r
-<p>Attention! This script was written using old approach, based on direct usage of SMESH idl interface. To be updated for version 3.2.1 to use <b>smesh</b> package.\r
-<br>&nbsp;\r
+<p class="whs4">tetra = smesh.Mesh(box, \r
+ &quot;Box : tetrahedrical mesh&quot;)</p>\r
 \r
-<p class="whs4"><span style="font-family: 'Lucida Console', monospace;">import \r
- salome</span></p>\r
-\r
-<p class="whs4">import StdMeshers</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs4">import NETGENPlugin</p>\r
+<p class="whs6"># create a Regular 1D algorithm \r
+ for edges</p>\r
 \r
-<p class="whs4">&nbsp;</p>\r
+<p class="whs4">algo1D = tetra.Segment()</p>\r
 \r
-<p class="whs4">smesh = salome.lcc.FindOrLoadComponent(&quot;FactoryServer&quot;, \r
- &quot;SMESH&quot;)</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs4">smeshgui = salome.ImportComponentGUI(&quot;SMESH&quot;)</p>\r
+<p class="whs6"># create a Mefisto 2D algorithm \r
+ for faces</p>\r
 \r
-<p class="whs4">smeshgui.Init(salome.myStudyId);</p>\r
+<p class="whs4">algo2D = tetra.Triangle()</p>\r
 \r
 <p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs6"># create algorithms</p>\r
-\r
-<p class="whs4">print &quot;-------------------------- \r
- create Algorithms&quot;</p>\r
+<p class="whs6"># create a Netgen 3D algorithm \r
+ for solids</p>\r
 \r
-<p class="whs4">print &quot;-------------------------- \r
- Regular_1D (Wire discretisation)&quot;</p>\r
+<p class="whs4">algo3D = tetra.Tetrahedron(smesh.NETGEN)</p>\r
 \r
-<p class="whs4">regular1D = smesh.CreateHypothesis(&quot;Regular_1D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs4">smeshgui.SetName(salome.ObjectToID(regular1D), \r
- &quot;Wire Discretisation&quot;)</p>\r
+<p class="whs6"># define hypotheses</p>\r
 \r
-<p class="whs4">&nbsp;</p>\r
+<p class="whs4">algo1D.Arithmetic1D(1, \r
+ 4)</p>\r
 \r
-<p class="whs4">print &quot;-------------------------- \r
- MEFISTO_2D (Triangle meshing algorithm)&quot;</p>\r
+<p class="whs4">algo2D.LengthFromEdges()</p>\r
 \r
-<p class="whs4">mefisto2D = smesh.CreateHypothesis(&quot;MEFISTO_2D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs4">smeshgui.SetName(salome.ObjectToID(mefisto2D), \r
- &quot;MEFISTO_2D&quot;)</p>\r
+<p class="whs6"># compute the mesh</p>\r
 \r
-<p class="whs4">&nbsp;</p>\r
+<p class="whs4">tetra.Compute()</p>\r
 \r
-<p class="whs4">print &quot;-------------------------- \r
- Quadrangle_2D (Quadrangle meshing algorithm)&quot;</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs4">quad2D = smesh.CreateHypothesis( \r
&quot;Quadrangle_2D&quot;, &quot;libStdMeshersEngine.so&quot; )</p>\r
+<p class="whs6"># 3. Create a tetrahedral \r
mesh on the box with NETGEN_2D3D algorithm</p>\r
 \r
-<p class="whs4">smeshgui.SetName(salome.ObjectToID(quad2D)\r
- &quot;Quadrangle_2D&quot;)</p>\r
+<p class="whs4">tetraN = smesh.Mesh(box\r
+ &quot;Box : tetrahedrical mesh by NETGEN_2D3D&quot;)</p>\r
 \r
-<p class="whs4">&nbsp;</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs4">print &quot;-------------------------- \r
Hexa_3D (Hexahedron meshing algorithm)&quot;</p>\r
+<p class="whs6"># create a Netgen_2D3D \r
algorithm for solids</p>\r
 \r
-<p class="whs4">hexa3D = smesh.CreateHypothesis(&quot;Hexa_3D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs4">is3D = 1</p>\r
 \r
-<p class="whs4">smeshgui.SetName(salome.ObjectToID(hexa3D), \r
- &quot;HEXA_3D&quot;)</p>\r
+<p class="whs4">algo3D = tetraN.Netgen(is3D)</p>\r
 \r
-<p class="whs4">&nbsp;</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs4">print &quot;-------------------------- \r
- NETGEN_3D (Tetrahedron meshing algorithm)&quot;</p>\r
+<p class="whs6"># define hypotheses</p>\r
 \r
-<p class="whs4">netgen3D = smesh.CreateHypothesis(&quot;NETGEN_3D&quot;, \r
- &quot;libNETGENEngine.so&quot;)</p>\r
+<p class="whs4">n23_params = algo3D.Parameters()</p>\r
 \r
-<p class="whs4">smeshgui.SetName(salome.ObjectToID(netgen3D), \r
- &quot;NETGEN_3D&quot;)</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs4">salome.sg.updateObjBrowser(1)</p>\r
+<p class="whs6"># compute the mesh</p>\r
 \r
-<p class="whs6">&nbsp;</p>\r
+<p class="whs4">tetraN.Compute() \r
+ </p>\r
 \r
 <script type="text/javascript" language="javascript1.2">\r
 <!--\r
index 822a2cf..173e221 100755 (executable)
@@ -7,20 +7,23 @@
 <meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
 <meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com"><style type="text/css">\r
 <!--\r
-p.whs1 { margin-top:0pt; margin-bottom:0pt; font-family:'Lucida Console' , monospace; }\r
+p.whs1 { margin-top:0pt; margin-bottom:0pt; font-weight:bold; color:#ff0000; }\r
 p.whs2 { margin-top:0pt; margin-bottom:0pt; }\r
-img_whs3 { border:none; width:430px; height:391px; float:none; border-style:none; }\r
-img_whs4 { border:none; float:none; width:463px; height:417px; border-style:none; }\r
-img_whs5 { border:none; width:541px; height:417px; float:none; border-style:none; }\r
-img_whs6 { border:none; width:394px; height:425px; float:none; border-style:none; }\r
-img_whs7 { border:none; float:none; width:368px; height:379px; border-style:none; }\r
-img_whs8 { border:none; float:none; width:344px; height:381px; border-style:none; }\r
-img_whs9 { border:none; width:314px; height:351px; float:none; border-style:none; }\r
-img_whs10 { border:none; float:none; width:319px; height:351px; border-style:none; }\r
-img_whs11 { border:none; float:none; width:304px; height:352px; border-style:none; }\r
-img_whs12 { border:none; width:318px; height:355px; float:none; border-style:none; }\r
-img_whs13 { border:none; float:none; width:318px; height:355px; border-style:none; }\r
-img_whs14 { border:none; float:none; width:320px; height:354px; border-style:none; }\r
+p.whs3 { margin-top:0pt; margin-bottom:0pt; font-family:'Lucida Console' , monospace; }\r
+p.whs4 { margin-top:0pt; margin-bottom:0pt; font-family:'Times New Roman' , serif; }\r
+img_whs5 { border:none; width:430px; height:391px; float:none; border-style:none; }\r
+p.whs6 { margin-top:0pt; margin-bottom:0pt; color:#ff0000; font-weight:bold; }\r
+img_whs7 { border:none; float:none; width:463px; height:417px; border-style:none; }\r
+img_whs8 { border:none; width:541px; height:417px; float:none; border-style:none; }\r
+img_whs9 { border:none; width:394px; height:425px; float:none; border-style:none; }\r
+img_whs10 { border:none; float:none; width:368px; height:379px; border-style:none; }\r
+img_whs11 { border:none; float:none; width:344px; height:381px; border-style:none; }\r
+img_whs12 { border:none; width:314px; height:351px; float:none; border-style:none; }\r
+img_whs13 { border:none; float:none; width:319px; height:351px; border-style:none; }\r
+img_whs14 { border:none; float:none; width:304px; height:352px; border-style:none; }\r
+img_whs15 { border:none; width:318px; height:355px; float:none; border-style:none; }\r
+img_whs16 { border:none; float:none; width:318px; height:355px; border-style:none; }\r
+img_whs17 { border:none; float:none; width:320px; height:354px; border-style:none; }\r
 -->\r
 </style><script type="text/javascript" language="JavaScript">\r
 <!--\r
@@ -29,6 +32,9 @@ if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))
   var strNSS = "<style type='text/css'>";\r
   strNSS += "p.whs1 {margin-top:1pt;margin-bottom:1pt; }";\r
   strNSS += "p.whs2 {margin-top:1pt;margin-bottom:1pt; }";\r
+  strNSS += "p.whs3 {margin-top:1pt;margin-bottom:1pt; }";\r
+  strNSS += "p.whs4 {margin-top:1pt;margin-bottom:1pt; }";\r
+  strNSS += "p.whs6 {margin-top:1pt;margin-bottom:1pt; }";\r
   strNSS +="</style>";\r
   document.write(strNSS);\r
 }\r
@@ -97,874 +103,741 @@ if (window.writeIntopicBar)
 \r
 <h3><a name=bookmark>Create a Standalone Group</a></h3>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs1"># Attention! This script has been written \r
+ using the old approach basing on direct usage of SMESH idl interface.</p>\r
 \r
-<p class="whs1">import SMESH</p>\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to create a standalone group. </p>\r
 \r
-<p class="whs1">import SMESH_mechanic</p>\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs2">&nbsp;</p>\r
+\r
+<p class="whs3">import SMESH</p>\r
+\r
+<p class="whs3">import SMESH_mechanic</p>\r
 \r
-<p class="whs1">smesh &nbsp;= \r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">smesh &nbsp;= \r
  SMESH_mechanic.smesh</p>\r
 \r
-<p class="whs1">mesh &nbsp;&nbsp;= \r
+<p class="whs3">mesh &nbsp;&nbsp;= \r
  SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs1">salome = SMESH_mechanic.salome</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">salome = SMESH_mechanic.salome</p>\r
 \r
-<p class="whs1">aFilterMgr = smesh.CreateFilterManager()</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs4"># Get ids of all faces \r
+ with area &gt; 100 </p>\r
 \r
-<p class="whs2"># Criterion : AREA &gt; \r
- 100</p>\r
+<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
 \r
-<p class="whs1">aFunctor = aFilterMgr.CreateArea()</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
+<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
 \r
-<p class="whs1">aPredicate.SetNumFunctor( \r
+<p class="whs3">aPredicate.SetNumFunctor( \r
  aFunctor )</p>\r
 \r
-<p class="whs1">aPredicate.SetMargin( \r
+<p class="whs3">aPredicate.SetMargin( \r
  100 )</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
 \r
-<p class="whs1">aFilter.SetPredicate( \r
+<p class="whs3">aFilter.SetPredicate( \r
  aPredicate )</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">anIds = aFilter.GetElementsId( \r
+<p class="whs3">anIds = aFilter.GetElementsId( \r
  mesh )</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2"># print the result</p>\r
-\r
-<p class="whs1">print &quot;Criterion: \r
- Area &gt; 100 Nb = &quot;, len( anIds )</p>\r
-\r
-<p class="whs1">for i in range( \r
- len( anIds ) ):</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;print \r
- anIds[ i ]</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
 <p class="whs2"># create a group consisting \r
  of faces with area &gt; 100</p>\r
 \r
-<p class="whs1">aGroup = mesh.CreateGroup( \r
+<p class="whs3">aGroup = mesh.CreateGroup( \r
  SMESH.FACE, &quot;Area &gt; 100&quot; )</p>\r
 \r
-<p class="whs1">aGroup.Add( anIds \r
+<p class="whs3">aGroup.Add( anIds \r
  )</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
 <p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
  </p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2"><img src="pics/create_group.png" x-maintain-ratio="TRUE" width="430px" height="391px" border="0" class="img_whs3"></p>\r
+<p class="whs2"><img src="pics/create_group.png" x-maintain-ratio="TRUE" width="430px" height="391px" border="0" class="img_whs5"></p>\r
 \r
 <h3><a name=bookmark5>Create a Group on Geometry</a></h3>\r
 \r
-<p>Attention! This script was written using old approach, based on direct usage of SMESH idl interface. To be updated for version 3.2.1 to use <b>smesh</b> package.\r
-<br>&nbsp;\r
+<p class="whs3">import salome</p>\r
 \r
-<p class="whs1">import salome</p>\r
+<p class="whs3">import geompy</p>\r
 \r
-<p class="whs1">import geompy</p>\r
+<p class="whs3">import smesh</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">import SMESH</p>\r
+<p class="whs4"># create a box</p>\r
 \r
-<p class="whs1">import StdMeshers</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">smesh = salome.lcc.FindOrLoadComponent(&quot;FactoryServer&quot;, \r
- &quot;SMESH&quot;)</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs2"># create a box</p>\r
-\r
-<p class="whs1">box = geompy.MakeBox(0., \r
+<p class="whs3">box = geompy.MakeBox(0., \r
  0., 0., 100., 100., 100.)</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs2"># add the box to the study</p>\r
-\r
-<p class="whs1">idbox = geompy.addToStudy(box, \r
+<p class="whs3">geompy.addToStudy(box, \r
  &quot;box&quot;)</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2"># add the first face of \r
- the box to the study</p>\r
+<p class="whs4"># add the first face \r
of the box to the study</p>\r
 \r
-<p class="whs1">subShapeList = geompy.SubShapeAll(box, \r
+<p class="whs3">subShapeList = geompy.SubShapeAll(box, \r
  geompy.ShapeType[&quot;FACE&quot;])</p>\r
 \r
-<p class="whs1">face = subShapeList[0]</p>\r
-\r
-<p class="whs1">name = geompy.SubShapeName(face, \r
- box)</p>\r
-\r
-<p class="whs1">idface = geompy.addToStudyInFather(box, \r
- face, name)</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">face = subShapeList[0]</p>\r
 \r
-<p class="whs2"># create a hypothesis</p>\r
+<p class="whs3">geompy.addToStudyInFather(box, \r
+ face, &quot;face 1&quot;)</p>\r
 \r
-<p class="whs1">numberOfSegments \r
- = 7</p>\r
-\r
-<p class="whs1">hypNbSeg = smesh.CreateHypothesis(&quot;NumberOfSegments&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
-\r
-<p class="whs1">hypNbSeg.SetNumberOfSegments(numberOfSegments)</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2"># create algorithms</p>\r
-\r
-<p class="whs1">regular1D = smesh.CreateHypothesis(&quot;Regular_1D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
-\r
-<p class="whs1">quad2D = smesh.CreateHypothesis(&quot;Quadrangle_2D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs2"># initialize a mesh with \r
- the box</p>\r
-\r
-<p class="whs1">mesh = smesh.CreateMesh(box)</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs2"># add hypotheses and algorithms \r
- to the box</p>\r
-\r
-<p class="whs1">mesh.AddHypothesis(box,hypNbSeg)</p>\r
-\r
-<p class="whs1">mesh.AddHypothesis(box,regular1D)</p>\r
+<p class="whs4"># create group of edges \r
+ on the face</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(box,quad2D)</p>\r
+<p class="whs3">aGeomGroupE = geompy.CreateGroup(face, \r
+ geompy.ShapeType[&quot;EDGE&quot;])</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">geompy.AddObject(aGeomGroupE, \r
+ 3)</p>\r
 \r
-<p class="whs2"># compute the mesh</p>\r
+<p class="whs3">geompy.AddObject(aGeomGroupE, \r
+ 6)</p>\r
 \r
-<p class="whs1">ret = smesh.Compute(mesh,box)</p>\r
+<p class="whs3">geompy.AddObject(aGeomGroupE, \r
+ 8)</p>\r
 \r
-<p class="whs1">if ret == 0:</p>\r
+<p class="whs3">geompy.AddObject(aGeomGroupE, \r
+ 10)</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
&quot;probleme when computing the mesh&quot;</p>\r
+<p class="whs3">geompy.addToStudyInFather(face, \r
aGeomGroupE, &quot;Group of Edges&quot;)</p>\r
 \r
-<p class="whs1">else:</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
&quot;Computation succeded&quot;</p>\r
+<p class="whs4"># create quadrangle \r
2D mesh on the box</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">quadra = smesh.Mesh(box, \r
+ &quot;Box : quadrangle 2D mesh&quot;)</p>\r
 \r
-<p class="whs2"># create geometry groups \r
- on the face</p>\r
+<p class="whs3">algo1D = quadra.Segment()</p>\r
 \r
-<p class="whs1">aGeomGroup1 = geompy.CreateGroup(face, \r
- geompy.ShapeType[&quot;FACE&quot;])</p>\r
+<p class="whs3">quadra.Quadrangle()</p>\r
 \r
-<p class="whs1">geompy.AddObject(aGeomGroup1, \r
- 1)</p>\r
+<p class="whs3">algo1D.NumberOfSegments(7)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aGeomGroup2 = geompy.CreateGroup(face, \r
- geompy.ShapeType[&quot;EDGE&quot;])</p>\r
+<p class="whs4"># compute the mesh</p>\r
 \r
-<p class="whs1">geompy.AddObject(aGeomGroup2, \r
- 3)</p>\r
+<p class="whs3">quadra.Compute()</p>\r
 \r
-<p class="whs1">geompy.AddObject(aGeomGroup2, \r
- 6)</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">geompy.AddObject(aGeomGroup2, \r
8)</p>\r
+<p class="whs4"># create SMESH group \r
on the face with name &quot;SMESHGroup1&quot;</p>\r
 \r
-<p class="whs1">geompy.AddObject(aGeomGroup2\r
10)</p>\r
+<p class="whs3">aSmeshGroup1 = quadra.Group(face\r
&quot;SMESHGroup1&quot;)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">geompy.addToStudy(aGeomGroup1, \r
&quot;Group on Faces&quot;)</p>\r
+<p class="whs4"># create SMESH group \r
on &lt;aGeomGroupE&gt; with default name</p>\r
 \r
-<p class="whs1">geompy.addToStudy(aGeomGroup2, \r
- &quot;Group on Edges&quot;)</p>\r
+<p class="whs3">aSmeshGroup2 = quadra.Group(aGeomGroupE)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2"># create SMESH groups</p>\r
-\r
-<p class="whs1">aSmeshGroup1 = mesh.CreateGroupFromGEOM(SMESH.FACE, \r
- &quot;SMESHGroup1&quot;,</p>\r
-\r
-<p class="whs1">aGeomGroup1)</p>\r
+<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
+ </p>\r
 \r
-<p class="whs1">aSmeshGroup2 = mesh.CreateGroupFromGEOM(SMESH.EDGE, \r
- &quot;SMESHGroup2&quot;, aGeomGroup2)</p>\r
+<h3><a name=bookmark1>Edit a Group</a></h3>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs6"># Attention! This script has been written \r
+ using the old approach basing on direct usage of SMESH idl interface.</p>\r
 \r
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
&nbsp;</p>\r
+<p class="whs6"># For the moment smesh package doesn't \r
provide methods to edit a group. </p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs6"># In the next SALOME version the scripts \r
+ will be updated to use only the commands from smesh package.</p>\r
 \r
-<h3><a name=bookmark1>Edit a Group</a></h3>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">import SMESH</p>\r
+<p class="whs3">import SMESH</p>\r
 \r
-<p class="whs1">import SMESH_mechanic</p>\r
+<p class="whs3">import SMESH_mechanic</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">smesh &nbsp;= \r
+<p class="whs3">smesh &nbsp;= \r
  SMESH_mechanic.smesh</p>\r
 \r
-<p class="whs1">mesh &nbsp;&nbsp;= \r
+<p class="whs3">mesh &nbsp;&nbsp;= \r
  SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs1">salome = SMESH_mechanic.salome</p>\r
+<p class="whs3">salome = SMESH_mechanic.salome</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aFilterMgr = smesh.CreateFilterManager()</p>\r
+<p class="whs4"># Get ids of all faces \r
+ with area &gt; 35</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
 \r
-<p class="whs2"># Criterion : AREA &gt; \r
- 20</p>\r
+<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aFunctor = aFilterMgr.CreateArea()</p>\r
+<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
 \r
-<p class="whs1">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
+<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
 \r
-<p class="whs1">aPredicate.SetNumFunctor( \r
- aFunctor )</p>\r
+<p class="whs3">aPredicate.SetMargin(35.)</p>\r
 \r
-<p class="whs1">aPredicate.SetMargin( \r
- 30 )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
 \r
-<p class="whs1">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
 \r
-<p class="whs1">aFilter.SetPredicate( \r
- aPredicate )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
 \r
-<p class="whs1">anIds = aFilter.GetElementsId( \r
- mesh )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">print &quot;Criterion: \r
+ Area &gt; 35, Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs2"># create a group by adding \r
- elements with area &gt; 20</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aGroup = mesh.CreateGroup( \r
SMESH.FACE, &quot;Area &gt; 20&quot; )</p>\r
+<p class="whs4"># create a group by \r
adding elements with area &gt; 35</p>\r
 \r
-<p class="whs1">aGroup.Add( anIds \r
- )</p>\r
+<p class="whs3">aGroup = mesh.CreateGroup(SMESH.FACE, \r
&quot;Area &gt; 35&quot;)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aGroup.Add(anIds)</p>\r
 \r
-<p class="whs1">print &quot;Criterion: \r
- Area &gt; 20 Nb = &quot;, len( anIds )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">for i in range( \r
len( anIds ) ):</p>\r
+<p class="whs4"># Get ids of all faces \r
with area &gt; 40</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;print \r
- anIds[ i ]</p>\r
+<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
 \r
-<p class="whs2"># Criterion : AREA &gt; \r
- 60</p>\r
+<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">aPredicate.SetMargin(40.)</p>\r
 \r
-<p class="whs1">aFunctor = aFilterMgr.CreateArea()</p>\r
+<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
 \r
-<p class="whs1">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
+<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
 \r
-<p class="whs1">aPredicate.SetNumFunctor( \r
- aFunctor )</p>\r
+<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
 \r
-<p class="whs1">aPredicate.SetMargin( \r
60 )</p>\r
+<p class="whs3">print &quot;Criterion: \r
Area &gt; 40, Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs4"># create a group of \r
+ elements with area [35; 40] by removing elements with area &gt; 40 from \r
+ group aGroup</p>\r
 \r
-<p class="whs1">aFilter.SetPredicate( \r
- aPredicate )</p>\r
+<p class="whs3">aGroup.Remove(anIds)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">anIds = aFilter.GetElementsId( \r
- mesh )</p>\r
+<p class="whs4"># print the result</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">aGroupElemIDs = \r
+ aGroup.GetListOfID()</p>\r
 \r
-<p class="whs2"># create a group of elements \r
- with area [20; 60] by removing elements with area &gt; 60 from &nbsp;group \r
- aGroup </p>\r
+<p class="whs3">print &quot;Criterion: \r
+ 35 &lt; Area &lt; 40, Nb = &quot;, len(aGroupElemIDs)</p>\r
 \r
-<p class="whs1">aGroup.Remove(anIds)</p>\r
+<p class="whs3">j = 1</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">for i in range(len(aGroupElemIDs)):</p>\r
 \r
-<p class="whs2"># print the result</p>\r
+<p class="whs3">&nbsp;&nbsp;if \r
+ j &gt; 20: j = 1; print &quot;&quot;</p>\r
 \r
-<p class="whs1">aGroupElemIDs = \r
- aGroup.GetListOfID()</p>\r
+<p class="whs3">&nbsp;&nbsp;print \r
+ aGroupElemIDs[i],</p>\r
 \r
-<p class="whs1">print &quot;Criterion: \r
20 &lt; Area &lt; 60 = &quot;, len( aGroupElemIDs )</p>\r
+<p class="whs3">&nbsp;&nbsp;j \r
= j + 1</p>\r
 \r
-<p class="whs1">for i in range( \r
- len( aGroupElemIDs ) ):</p>\r
+<p class="whs3">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;print \r
- aGroupElemIDs[ i ]</p>\r
+<p class="whs3">print &quot;&quot;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
+<p class="whs3">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2"><img src="pics/editing_groups1.png" x-maintain-ratio="TRUE" width="463px" height="417px" border="0" class="img_whs4"> &nbsp;<img src="pics/editing_groups2.png" x-maintain-ratio="TRUE" width="541px" height="417px" border="0" class="img_whs5"></p>\r
+<p class="whs2"><img src="pics/editing_groups1.png" x-maintain-ratio="TRUE" width="463px" height="417px" border="0" class="img_whs7"> &nbsp;<img src="pics/editing_groups2.png" x-maintain-ratio="TRUE" width="541px" height="417px" border="0" class="img_whs8"></p>\r
 \r
 <h3><a name=bookmark2>Union of two groups</a></h3>\r
 \r
-<p class="whs1">import SMESH</p>\r
+<p class="whs1"># Attention! This script has been written \r
+ using the old approach basing on direct usage of SMESH idl interface.</p>\r
 \r
-<p class="whs1">import SMESH_mechanic</p>\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to create a union of two groups. </p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
 \r
-<p class="whs1">smesh &nbsp;= \r
- SMESH_mechanic.smesh</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">mesh &nbsp;&nbsp;= \r
- SMESH_mechanic.mesh</p>\r
+<p class="whs3"><span style="font-family: 'Lucida Console', monospace;">import \r
+ SMESH</span></p>\r
 \r
-<p class="whs1">salome = SMESH_mechanic.salome</p>\r
+<p class="whs3">import SMESH_mechanic</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aFilterMgr = smesh.CreateFilterManager()</p>\r
+<p class="whs3">smesh &nbsp;= \r
+ SMESH_mechanic.smesh</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">mesh &nbsp;&nbsp;= \r
+ SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs2"># Criterion : AREA &gt; \r
- 20</p>\r
+<p class="whs3">salome = SMESH_mechanic.salome</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aFunctor = aFilterMgr.CreateArea()</p>\r
+<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
 \r
-<p class="whs1">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aPredicate.SetNumFunctor( \r
aFunctor )</p>\r
+<p class="whs4"># Criterion : AREA \r
&gt; 20</p>\r
 \r
-<p class="whs1">aPredicate.SetMargin( \r
- 20 )</p>\r
+<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
 \r
-<p class="whs1">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
 \r
-<p class="whs1">aFilter.SetPredicate( \r
- aPredicate )</p>\r
+<p class="whs3">aPredicate.SetMargin(20.)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">anIds = aFilter.GetElementsId( \r
- mesh )</p>\r
+<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
 \r
-<p class="whs2"># create a group by adding \r
- elements with area &gt; 20</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aGroup1 = mesh.CreateGroup( \r
- SMESH.FACE, &quot;Area &gt; 20&quot; )</p>\r
+<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
 \r
-<p class="whs1">aGroup1.Add( anIds \r
- )</p>\r
+<p class="whs3">print &quot;Criterion: \r
Area &gt; 20, Nb = &quot;, len( anIds )</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">print &quot;Criterion: \r
Area &gt; 20 Nb = &quot;, len( anIds )</p>\r
+<p class="whs4"># create a group by \r
adding elements with area &gt; 20</p>\r
 \r
-<p class="whs1">for i in range( \r
len( anIds ) ):</p>\r
+<p class="whs3">aGroup1 = mesh.CreateGroup(SMESH.FACE, \r
&quot;Area &gt; 20&quot;)</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;print \r
- anIds[ i ]</p>\r
+<p class="whs3">aGroup1.Add(anIds)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2"># Criterion : AREA = 20</p>\r
+<p class="whs4"># Criterion : AREA \r
+ = 20</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
 \r
-<p class="whs1">aFunctor = aFilterMgr.CreateArea()</p>\r
+<p class="whs3">aPredicate = aFilterMgr.CreateEqualTo()</p>\r
 \r
-<p class="whs1">aPredicate = aFilterMgr.CreateEqualTo()</p>\r
+<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
 \r
-<p class="whs1">aPredicate.SetNumFunctor( \r
- aFunctor )</p>\r
+<p class="whs3">aPredicate.SetMargin(20.)</p>\r
 \r
-<p class="whs1">aPredicate.SetMargin( \r
- 20 )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
 \r
-<p class="whs1">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
 \r
-<p class="whs1">aFilter.SetPredicate( \r
- aPredicate )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
 \r
-<p class="whs1">anIds = aFilter.GetElementsId( \r
- mesh )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">print &quot;Criterion: \r
+ Area = 20, Nb = &quot;, len( anIds )</p>\r
 \r
-<p class="whs2"># create a group by adding \r
- elements with area &gt; 20</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aGroup2 = mesh.CreateGroup( \r
- SMESH.FACE, &quot;Area = 20&quot; )</p>\r
-\r
-<p class="whs1">aGroup2.Add( anIds \r
- )</p>\r
+<p class="whs4"># create a group by \r
+ adding elements with area = 20</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">print &quot;Criterion: \r
- Area = 20 Nb = &quot;, len( anIds )</p>\r
-\r
-<p class="whs1">for i in range( \r
- len( anIds ) ):</p>\r
+<p class="whs3">aGroup2 = mesh.CreateGroup( \r
+ SMESH.FACE, &quot;Area = 20&quot; )</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;print \r
- anIds[ i ]</p>\r
+<p class="whs3">aGroup2.Add(anIds)</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2"># create union group : \r
- area &gt;= 20</p>\r
+<p class="whs4"># create union group \r
area &gt;= 20</p>\r
 \r
-<p class="whs1">aGroup3 = mesh.UnionGroups(aGroup1, \r
+<p class="whs3">aGroup3 = mesh.UnionGroups(aGroup1, \r
  aGroup2, &quot;Area &gt;= 20&quot;)</p>\r
 \r
-<p class="whs1">print &quot;Criterion: \r
- Area &gt;= 20 Nb = &quot;, len( aGroup3.GetListOfID() )</p>\r
+<p class="whs3">print &quot;Criterion: \r
+ Area &gt;= 20, Nb = &quot;, len(aGroup3.GetListOfID())</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2"># Criterion : AREA &lt; \r
- 20</p>\r
+<p class="whs4"># Criterion : AREA \r
&lt; 20</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs1">aFunctor = aFilterMgr.CreateArea()</p>\r
-\r
-<p class="whs1">aPredicate = aFilterMgr.CreateLessThan()</p>\r
-\r
-<p class="whs1">aPredicate.SetNumFunctor( \r
- aFunctor )</p>\r
+<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
 \r
-<p class="whs1">aPredicate.SetMargin( \r
- 20 )</p>\r
+<p class="whs3">aPredicate = aFilterMgr.CreateLessThan()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
 \r
-<p class="whs1">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs3">aPredicate.SetMargin(20.)</p>\r
 \r
-<p class="whs1">aFilter.SetPredicate( \r
- aPredicate )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
 \r
-<p class="whs1">anIds = aFilter.GetElementsId( \r
- mesh )</p>\r
+<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2"># create a group by adding \r
- elements with area &lt; 20</p>\r
+<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
 \r
-<p class="whs1">aGroup4 = mesh.CreateGroup( \r
SMESH.FACE, &quot;Area &lt; 20&quot; )</p>\r
+<p class="whs3">print &quot;Criterion: \r
Area &lt; 20, Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs1">aGroup4.Add( anIds \r
- )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs4"># create a group by \r
+ adding elements with area &lt; 20</p>\r
 \r
-<p class="whs1">print &quot;Criterion: \r
Area &lt; 20 Nb = &quot;, len( anIds )</p>\r
+<p class="whs3">aGroup4 = mesh.CreateGroup(SMESH.FACE, \r
&quot;Area &lt; 20&quot;)</p>\r
 \r
-<p class="whs1">for i in range( \r
- len( anIds ) ):</p>\r
+<p class="whs3">aGroup4.Add(anIds)</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;print \r
- anIds[ i ]</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2">&nbsp;&nbsp;</p>\r
+<p class="whs4"># create union group \r
+ : area &gt;= 20 and area &lt; 20</p>\r
 \r
-<p class="whs2"># create union group : \r
- area &gt;= 20 and area &lt; 20</p>\r
-\r
-<p class="whs1">aGroup5 = mesh.UnionGroups(aGroup3, \r
+<p class="whs3">aGroup5 = mesh.UnionGroups(aGroup3, \r
  aGroup4, &quot;Any Area&quot;)</p>\r
 \r
-<p class="whs1">print &quot;Criterion: \r
- Any Area Nb = &quot;, len( aGroup5.GetListOfID() )</p>\r
+<p class="whs3">print &quot;Criterion: \r
+ Any Area, Nb = &quot;, len(aGroup5.GetListOfID())</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">salome.sg.updateObjBrowser(1) \r
+<p class="whs3">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1"><img src="pics/union_groups1.png" x-maintain-ratio="TRUE" width="394px" height="425px" border="0" class="img_whs6"></p>\r
+<p class="whs3"><img src="pics/union_groups1.png" x-maintain-ratio="TRUE" width="394px" height="425px" border="0" class="img_whs9"></p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1"><img src="pics/union_groups2.png" x-maintain-ratio="TRUE" width="368px" height="379px" border="0" class="img_whs7"> <img src="pics/union_groups3.png" x-maintain-ratio="TRUE" width="344px" height="381px" border="0" class="img_whs8"></p>\r
+<p class="whs3"><img src="pics/union_groups2.png" x-maintain-ratio="TRUE" width="368px" height="379px" border="0" class="img_whs10"> <img src="pics/union_groups3.png" x-maintain-ratio="TRUE" width="344px" height="381px" border="0" class="img_whs11"></p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
 <h3><a name=bookmark3>Intersection of two groups</a></h3>\r
 \r
-<p class="whs1">import SMESH</p>\r
+<p class="whs6"># Attention! This script has been written \r
+ using the old approach basing on direct usage of SMESH idl interface.</p>\r
 \r
-<p class="whs1">import SMESH_mechanic</p>\r
+<p class="whs6"># For the moment smesh package doesn't \r
+ provide methods to create an intersection of two groups. </p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs6"># In the next SALOME version the scripts \r
+ will be updated to use only the commands from smesh package.</p>\r
 \r
-<p class="whs1">smesh &nbsp;= \r
- SMESH_mechanic.smesh</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">mesh &nbsp;&nbsp;= \r
- SMESH_mechanic.mesh</p>\r
+<p class="whs3">import SMESH</p>\r
 \r
-<p class="whs1">salome = SMESH_mechanic.salome</p>\r
+<p class="whs3">import SMESH_mechanic</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aFilterMgr = smesh.CreateFilterManager()</p>\r
+<p class="whs3">smesh &nbsp;= \r
+ SMESH_mechanic.smesh</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">mesh &nbsp;&nbsp;= \r
+ SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs2"># Criterion : AREA &gt; \r
- 20</p>\r
+<p class="whs3">salome = SMESH_mechanic.salome</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aFunctor = aFilterMgr.CreateArea()</p>\r
+<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
 \r
-<p class="whs1">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aPredicate.SetNumFunctor( \r
aFunctor )</p>\r
+<p class="whs4"># Criterion : AREA \r
&gt; 20</p>\r
 \r
-<p class="whs1">aPredicate.SetMargin( \r
- 20 )</p>\r
+<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
 \r
-<p class="whs1">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
 \r
-<p class="whs1">aFilter.SetPredicate( \r
- aPredicate )</p>\r
+<p class="whs3">aPredicate.SetMargin(20.)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">anIds = aFilter.GetElementsId( \r
- mesh )</p>\r
+<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
 \r
-<p class="whs2"># create a group by adding \r
- elements with area &gt; 20</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aGroup1 = mesh.CreateGroup( \r
- SMESH.FACE, &quot;Area &gt; 20&quot; )</p>\r
+<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
 \r
-<p class="whs1">aGroup1.Add( anIds \r
- )</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">print &quot;Criterion: \r
- Area &gt; 20 Nb = &quot;, len( anIds )</p>\r
+<p class="whs3">print &quot;Criterion: \r
+ Area &gt; 20, Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs1">for i in range( \r
- len( anIds ) ):</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;print \r
- anIds[ i ]</p>\r
+<p class="whs4"># create a group by \r
+ adding elements with area &gt; 20</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aGroup1 = mesh.CreateGroup(SMESH.FACE, \r
+ &quot;Area &gt; 20&quot;)</p>\r
 \r
-<p class="whs2"># Criterion : AREA &lt; \r
- 60</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">aGroup1.Add(anIds)</p>\r
 \r
-<p class="whs1">aFunctor = aFilterMgr.CreateArea()</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aPredicate = aFilterMgr.CreateLessThan()</p>\r
+<p class="whs4"># Criterion : AREA \r
+ &lt; 60</p>\r
 \r
-<p class="whs1">aPredicate.SetNumFunctor( \r
- aFunctor )</p>\r
+<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
 \r
-<p class="whs1">aPredicate.SetMargin( \r
- 60 )</p>\r
+<p class="whs3">aPredicate = aFilterMgr.CreateLessThan()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
 \r
-<p class="whs1">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs3">aPredicate.SetMargin(60)</p>\r
 \r
-<p class="whs1">aFilter.SetPredicate( \r
- aPredicate )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
 \r
-<p class="whs1">anIds = aFilter.GetElementsId( \r
- mesh )</p>\r
+<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2"># create a group by adding \r
- elements with area &lt; 60</p>\r
+<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
 \r
-<p class="whs1">aGroup2 = mesh.CreateGroup( \r
- SMESH.FACE, &quot;Area &lt; 60&quot; )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aGroup2.Add( anIds \r
- )</p>\r
+<p class="whs3">print &quot;Criterion: \r
Area &lt; 60, Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">print &quot;Criterion: \r
Area &lt; 60 Nb = &quot;, len( anIds )</p>\r
+<p class="whs4"># create a group by \r
adding elements with area &lt; 60</p>\r
 \r
-<p class="whs1">for i in range( \r
len( anIds ) ):</p>\r
+<p class="whs3">aGroup2 = mesh.CreateGroup(SMESH.FACE, \r
&quot;Area &lt; 60&quot;)</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;print \r
- anIds[ i ]</p>\r
+<p class="whs3">aGroup2.Add(anIds)</p>\r
 \r
-<p class="whs2">&nbsp;&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2"># create an intersection \r
+<p class="whs4"># create an intersection \r
  of groups : 20 &lt; area &lt; 60</p>\r
 \r
-<p class="whs1">aGroup3 = mesh.IntersectGroups(aGroup1, \r
+<p class="whs3">aGroup3 = mesh.IntersectGroups(aGroup1, \r
  aGroup2, &quot;20 &lt; Area &lt; 60&quot;)</p>\r
 \r
-<p class="whs1">print &quot;Criterion: \r
- 20 &lt; Area &lt; 60 Nb = &quot;, len( aGroup3.GetListOfID() )</p>\r
+<p class="whs3">print &quot;Criterion: \r
+ 20 &lt; Area &lt; 60, Nb = &quot;, len(aGroup3.GetListOfID())</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
+<p class="whs3">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2"><img src="pics/intersect_groups1.png" x-maintain-ratio="TRUE" width="314px" height="351px" border="0" class="img_whs9"> &nbsp;<img src="pics/intersect_groups2.png" x-maintain-ratio="TRUE" width="319px" height="351px" border="0" class="img_whs10"> &nbsp;<img src="pics/intersect_groups3.png" x-maintain-ratio="TRUE" width="304px" height="352px" border="0" class="img_whs11"></p>\r
+<p class="whs2"><img src="pics/intersect_groups1.png" x-maintain-ratio="TRUE" width="314px" height="351px" border="0" class="img_whs12"> &nbsp;<img src="pics/intersect_groups2.png" x-maintain-ratio="TRUE" width="319px" height="351px" border="0" class="img_whs13"> &nbsp;<img src="pics/intersect_groups3.png" x-maintain-ratio="TRUE" width="304px" height="352px" border="0" class="img_whs14"></p>\r
 \r
 <h3><a name=bookmark4>Cut of two groups</a></h3>\r
 \r
-<p class="whs1">import SMESH</p>\r
+<p class="whs1"># Attention! This script has been written \r
+ using the old approach basing on direct usage of SMESH idl interface.</p>\r
 \r
-<p class="whs1">import SMESH_mechanic</p>\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to create a cut of two groups. </p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
 \r
-<p class="whs1">smesh &nbsp;= \r
- SMESH_mechanic.smesh</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">mesh &nbsp;&nbsp;= \r
- SMESH_mechanic.mesh</p>\r
+<p class="whs3">import SMESH</p>\r
 \r
-<p class="whs1">salome = SMESH_mechanic.salome</p>\r
+<p class="whs3">import SMESH_mechanic</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aFilterMgr = smesh.CreateFilterManager()</p>\r
+<p class="whs3">smesh &nbsp;= \r
+ SMESH_mechanic.smesh</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">mesh &nbsp;&nbsp;= \r
+ SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs2"># Criterion : AREA &gt; \r
- 20</p>\r
+<p class="whs3">salome = SMESH_mechanic.salome</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aFunctor = aFilterMgr.CreateArea()</p>\r
+<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
 \r
-<p class="whs1">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aPredicate.SetNumFunctor( \r
aFunctor )</p>\r
+<p class="whs4"># Criterion : AREA \r
&gt; 20</p>\r
 \r
-<p class="whs1">aPredicate.SetMargin( \r
- 20 )</p>\r
+<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
 \r
-<p class="whs1">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
 \r
-<p class="whs1">aFilter.SetPredicate( \r
- aPredicate )</p>\r
+<p class="whs3">aPredicate.SetMargin(20.)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">anIds = aFilter.GetElementsId( \r
- mesh )</p>\r
+<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
 \r
-<p class="whs2"># create a group by adding \r
- elements with area &gt; 20</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aGroupMain = mesh.CreateGroup( \r
- SMESH.FACE, &quot;Area &gt; 20&quot; )</p>\r
+<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
 \r
-<p class="whs1">aGroupMain.Add( \r
anIds )</p>\r
+<p class="whs3">print &quot;Criterion: \r
Area &gt; 20, Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">print &quot;Criterion: \r
Area &gt; 20 Nb = &quot;, len( anIds )</p>\r
+<p class="whs4"># create a group by \r
adding elements with area &gt; 20</p>\r
 \r
-<p class="whs1">for i in range( \r
len( anIds ) ):</p>\r
+<p class="whs3">aGroupMain = mesh.CreateGroup(SMESH.FACE, \r
&quot;Area &gt; 20&quot;)</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;print \r
- anIds[ i ]</p>\r
+<p class="whs3">aGroupMain.Add(anIds)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2"># Criterion : AREA &lt; \r
- 60</p>\r
+<p class="whs4"># Criterion : AREA \r
&lt; 60</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs1">aFunctor = aFilterMgr.CreateArea()</p>\r
-\r
-<p class="whs1">aPredicate = aFilterMgr.CreateLessThan()</p>\r
-\r
-<p class="whs1">aPredicate.SetNumFunctor( \r
- aFunctor )</p>\r
+<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
 \r
-<p class="whs1">aPredicate.SetMargin( \r
- 60 )</p>\r
+<p class="whs3">aPredicate = aFilterMgr.CreateLessThan()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
 \r
-<p class="whs1">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs3">aPredicate.SetMargin(60.)</p>\r
 \r
-<p class="whs1">aFilter.SetPredicate( \r
- aPredicate )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
 \r
-<p class="whs1">anIds = aFilter.GetElementsId( \r
- mesh )</p>\r
+<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2"># create a group by adding \r
- elements with area &lt; 60</p>\r
+<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
 \r
-<p class="whs1">aGroupTool = mesh.CreateGroup( \r
- SMESH.FACE, &quot;Area &lt; 60&quot; )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aGroupTool.Add( \r
anIds )</p>\r
+<p class="whs3">print &quot;Criterion: \r
Area &lt; 60, Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">print &quot;Criterion: \r
Area &lt; 60 Nb = &quot;, len( anIds )</p>\r
+<p class="whs4"># create a group by \r
adding elements with area &lt; 60</p>\r
 \r
-<p class="whs1">for i in range( \r
len( anIds ) ):</p>\r
+<p class="whs3">aGroupTool = mesh.CreateGroup(SMESH.FACE, \r
&quot;Area &lt; 60&quot;)</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;print \r
- anIds[ i ]</p>\r
+<p class="whs3">aGroupTool.Add(anIds)</p>\r
 \r
-<p class="whs2">&nbsp;&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2"># create an intersection \r
of groups : area &gt;= 60</p>\r
+<p class="whs4"># create a cut of groups \r
+ : area &gt;= 60</p>\r
 \r
-<p class="whs1">aGroupRes = mesh.CutGroups(aGroupMain, \r
+<p class="whs3">aGroupRes = mesh.CutGroups(aGroupMain, \r
  aGroupTool, &quot;Area &gt;= 60&quot;)</p>\r
 \r
-<p class="whs1">print &quot;Criterion: \r
- Area &gt;= 60 Nb = &quot;, len( aGroupRes.GetListOfID() )</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">print &quot;Criterion: \r
+ Area &gt;= 60, Nb = &quot;, len(aGroupRes.GetListOfID())</p>\r
 \r
-<p class="whs1">salome.sg.updateObjBrowser(1) \r
+<p class="whs3">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2"><img src="pics/cut_groups1.png" x-maintain-ratio="TRUE" width="318px" height="355px" border="0" class="img_whs12"> &nbsp;<img src="pics/cut_groups2.png" x-maintain-ratio="TRUE" width="318px" height="355px" border="0" class="img_whs13"> &nbsp;<img src="pics/cut_groups3.png" x-maintain-ratio="TRUE" width="320px" height="354px" border="0" class="img_whs14"></p>\r
+<p class="whs2"><img src="pics/cut_groups1.png" x-maintain-ratio="TRUE" width="318px" height="355px" border="0" class="img_whs15"> &nbsp;<img src="pics/cut_groups2.png" x-maintain-ratio="TRUE" width="318px" height="355px" border="0" class="img_whs16"> &nbsp;<img src="pics/cut_groups3.png" x-maintain-ratio="TRUE" width="320px" height="354px" border="0" class="img_whs17"></p>\r
 \r
 <script type="text/javascript" language="javascript1.2">\r
 <!--\r
index ab474a5..7338481 100755 (executable)
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">
-
-<html>
-
-<head>
-<title>Modifying Meshes</title>
-<meta http-equiv="content-type" content="text/html; charset=windows-1252">
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com"><style>
-<!--
-P { margin-top:0pt; margin-bottom:0pt; }
-LI.kadov-P {  }
--->
-</style><style type="text/css">
-<!--
-p.whs1 { margin-top:0pt; margin-bottom:0pt; font-family:'Lucida Console' , monospace; }
-p.whs2 { margin-top:0pt; margin-bottom:0pt; }
-p.whs3 { margin-top:0pt; margin-bottom:0pt; font-family:'Times New Roman' , serif; }
-h4.whs4 { margin-top:0pt; margin-bottom:0pt; }
-p.whs5 { margin-top:0.5pt; margin-bottom:0pt; font-family:'Lucida Console' , monospace; }
-p.whs6 { margin-top:0.5pt; margin-bottom:0pt; }
-p.whs7 { font-family:'Lucida Console' , monospace; }
-p.whs8 { font-family:'Times New Roman' , serif; }
-p.whs9 { margin-left:36px; font-family:'Lucida Console' , monospace; }
-p.whs10 { margin-left:36px; }
-p.whs11 { margin-left:192px; font-family:'Lucida Console' , monospace; }
-p.whs12 { margin-left:48px; font-family:'Lucida Console' , monospace; }
-p.whs13 { margin-left:40px; font-family:'Lucida Console' , monospace; }
--->
-</style><script type="text/javascript" language="JavaScript">
-<!--
-if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))
-{
-  var strNSS = "<style type='text/css'>";
-  strNSS += "p.whs1 {margin-top:1pt;margin-bottom:1pt; }";
-  strNSS += "p.whs2 {margin-top:1pt;margin-bottom:1pt; }";
-  strNSS += "p.whs3 {margin-top:1pt;margin-bottom:1pt; }";
-  strNSS += "h4.whs4 {margin-top:1pt;margin-bottom:1pt; }";
-  strNSS += "p.whs5 {margin-top:1pt;margin-bottom:1pt; }";
-  strNSS += "p.whs6 {margin-top:1pt;margin-bottom:1pt; }";
-  strNSS +="</style>";
-  document.write(strNSS);
-}
-//-->
-</script>
-<script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">
-<!--
-function reDo() {
-  if (innerWidth != origWidth || innerHeight != origHeight)
-     location.reload();
-}
-if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
-       origWidth = innerWidth;
-       origHeight = innerHeight;
-       onresize = reDo;
-}
-onerror = null; 
-//-->
-</script>
-<style type="text/css">
-<!--
-div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }
-p.WebHelpNavBar { text-align:right; }
--->
-</style><script type="text/javascript" language="javascript1.2" src="whmsg.js"></script>
-<script type="text/javascript" language="javascript" src="whver.js"></script>
-<script type="text/javascript" language="javascript1.2" src="whproxy.js"></script>
-<script type="text/javascript" language="javascript1.2" src="whutils.js"></script>
-<script type="text/javascript" language="javascript1.2" src="whtopic.js"></script>
-<script type="text/javascript" language="javascript1.2">
-<!--
-if (window.gbWhTopic)
-{
-       if (window.setRelStartPage)
-       {
-       addTocInfo("MESH module\nTUI Scripts\nModifying Meshes");
-addButton("show",BTN_IMG,"Show","","","","",0,0,"whd_show0.gif","whd_show2.gif","whd_show1.gif");
-addButton("hide",BTN_IMG,"Hide","","","","",0,0,"whd_hide0.gif","whd_hide2.gif","whd_hide1.gif");
-
-       }
-
-
-       if (window.setRelStartPage)
-       {
-       setRelStartPage("index.htm");
-
-               autoSync(1);
-               sendSyncInfo();
-               sendAveInfoOut();
-       }
-
-}
-else
-       if (window.gbIE4)
-               document.location.reload();
-//-->
-</script>
-</head>
-<body><script type="text/javascript" language="javascript1.2">
-<!--
-if (window.writeIntopicBar)
-       writeIntopicBar(4);
-//-->
-</script>
-<h1>Modifying Meshes</h1>
-
-<h3><a name=bookmark>Adding Nodes and Elements</a></h3>
-
-<h4>Add Node</h4>
-
-<p class="whs1">import SMESH</p>
-
-<p class="whs1">import SMESH_mechanic</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">smesh &nbsp;= 
- SMESH_mechanic.smesh</p>
-
-<p class="whs1">mesh &nbsp;&nbsp;= 
- SMESH_mechanic.mesh</p>
-
-<p class="whs1">salome = SMESH_mechanic.salome</p>
-
-<p class="whs2">&nbsp;</p>
-
-<p class="whs2"># add node</p>
-
-<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>
-
-<p class="whs1">if aMeshEditor.AddNode(50, 
- 10, 0) == 1:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;Node addition is OK!&quot;</p>
-
-<p class="whs1">else:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;KO node addition.&quot;</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;</p>
-
-<p class="whs1">salome.sg.updateObjBrowser(1) 
- </p>
-
-<p class="whs1">&nbsp;</p>
-
-<h4>Add Edge</h4>
-
-<p class="whs1">import SMESH</p>
-
-<p class="whs1">import SMESH_mechanic</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">smesh &nbsp;= 
- SMESH_mechanic.smesh</p>
-
-<p class="whs1">mesh &nbsp;&nbsp;= 
- SMESH_mechanic.mesh</p>
-
-<p class="whs1">salome = SMESH_mechanic.salome</p>
-
-<p class="whs2">&nbsp;</p>
-
-<p class="whs2"># add node</p>
-
-<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>
-
-<p class="whs1">if aMeshEditor.AddNode(50, 
- 10, 0) == 1:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;Node addition is OK!&quot;</p>
-
-<p class="whs1">else:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;KO node addition.&quot;</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs2"># add edge</p>
-
-<p class="whs1">LastNodeId = mesh.NbNodes()</p>
-
-<p class="whs1">if aMeshEditor.AddEdge([LastNodeId, 
- 38]) == 1:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;Edge addition is OK!&quot;</p>
-
-<p class="whs1">else:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;KO edge addition.&quot;</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">salome.sg.updateObjBrowser(1) 
- </p>
-
-<p class="whs1">&nbsp;</p>
-
-<h4>Add Triangle</h4>
-
-<p class="whs1">import SMESH</p>
-
-<p class="whs1">import SMESH_mechanic</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">smesh &nbsp;= 
- SMESH_mechanic.smesh</p>
-
-<p class="whs1">mesh &nbsp;&nbsp;= 
- SMESH_mechanic.mesh</p>
-
-<p class="whs1">salome = SMESH_mechanic.salome</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs2"># add node</p>
-
-<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>
-
-<p class="whs1">if aMeshEditor.AddNode(50, 
- 10, 0) == 1:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;Node addition is OK!&quot;</p>
-
-<p class="whs1">else:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;KO node addition.&quot;</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">LastNodeId = mesh.NbNodes()</p>
-
-<p class="whs2">&nbsp;</p>
-
-<p class="whs2"># add triangle</p>
-
-<p class="whs1">if aMeshEditor.AddFace([LastNodeId, 
- 38, 39]) == 1:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;Triangle addition is OK!&quot;</p>
-
-<p class="whs1">else:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;KO triangle addition.&quot;</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;</p>
-
-<p class="whs1">salome.sg.updateObjBrowser(1) 
- </p>
-
-<p class="whs1">&nbsp;</p>
-
-<h4>Add Quadrangle</h4>
-
-<p class="whs1">import SMESH</p>
-
-<p class="whs1">import SMESH_mechanic</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">smesh &nbsp;= 
- SMESH_mechanic.smesh</p>
-
-<p class="whs1">mesh &nbsp;&nbsp;= 
- SMESH_mechanic.mesh</p>
-
-<p class="whs1">salome = SMESH_mechanic.salome</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs2"># add node</p>
-
-<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>
-
-<p class="whs1">if aMeshEditor.AddNode(50, 
- 10, 0) == 1:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;Node addition is OK!&quot;</p>
-
-<p class="whs1">else:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;KO node addition.&quot;</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">LastNodeId = mesh.NbNodes()</p>
-
-<p class="whs2">&nbsp;</p>
-
-<p class="whs2"># add quadrangle</p>
-
-<p class="whs1">if aMeshEditor.AddNode(40, 
- 20, 0) == 1:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;Node addition is OK!&quot;</p>
-
-<p class="whs1">else:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;KO node addition.&quot;</p>
-
-<p class="whs1">if aMeshEditor.AddFace([mesh.NbNodes(), 
- LastNodeId, 38, 39]) == 1:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;Quadrangle addition is OK!&quot;</p>
-
-<p class="whs1">else:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;KO quadrangle addition.&quot;</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> 
- </p>
-
-<p class="whs2">&nbsp;</p>
-
-<h4>Add Tetrahedron</h4>
-
-<p class="whs1">import SMESH</p>
-
-<p class="whs1">import SMESH_mechanic</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">smesh &nbsp;= 
- SMESH_mechanic.smesh</p>
-
-<p class="whs1">mesh &nbsp;&nbsp;= 
- SMESH_mechanic.mesh</p>
-
-<p class="whs1">salome = SMESH_mechanic.salome</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs2"># add node</p>
-
-<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>
-
-<p class="whs1">if aMeshEditor.AddNode(50, 
- 10, 0) == 1:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;Node addition is OK!&quot;</p>
-
-<p class="whs1">else:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;KO node addition.&quot;</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">LastNodeId = mesh.NbNodes()</p>
-
-<p class="whs2">&nbsp;</p>
-
-<p class="whs2"># add tetrahedron</p>
-
-<p class="whs1">if aMeshEditor.AddVolume([LastNodeId, 
- 38, 39, 246]) == 1:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;Tetrahedron addition is OK!&quot;</p>
-
-<p class="whs1">else:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;KO tetrahedron addition.&quot;</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;</p>
-
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> 
- </p>
-
-<p class="whs2">&nbsp;</p>
-
-<h4>Add Hexahedron</h4>
-
-<p class="whs1">import SMESH</p>
-
-<p class="whs1">import SMESH_mechanic</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">smesh &nbsp;= 
- SMESH_mechanic.smesh</p>
-
-<p class="whs1">mesh &nbsp;&nbsp;= 
- SMESH_mechanic.mesh</p>
-
-<p class="whs1">salome = SMESH_mechanic.salome</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs2"># add nodes</p>
-
-<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>
-
-<p class="whs1">if aMeshEditor.AddNode(50, 
- 10, 0) == 1:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;Node addition is OK!&quot;</p>
-
-<p class="whs1">else:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;KO node addition.&quot;</p>
-
-<p class="whs1">aNodeId1 = mesh.NbNodes()</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">if aMeshEditor.AddNode(47, 
- 12, 0) == 1:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;Node addition is OK!&quot;</p>
-
-<p class="whs1">else:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;KO node addition.&quot;</p>
-
-<p class="whs1">aNodeId2 = mesh.NbNodes()</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">if aMeshEditor.AddNode(50, 
- 10, 10) == 1:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;Node addition is OK!&quot;</p>
-
-<p class="whs1">else:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;KO node addition.&quot;</p>
-
-<p class="whs1">aNodeId3 = mesh.NbNodes()</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">if aMeshEditor.AddNode(47, 
- 12, 10) == 1:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;Node addition is OK!&quot;</p>
-
-<p class="whs1">else:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;KO node addition.&quot;</p>
-
-<p class="whs1">aNodeId4 = mesh.NbNodes()</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs2"># add hexahedron</p>
-
-<p class="whs1">if aMeshEditor.AddVolume([aNodeId2, 
- aNodeId1, 38, 39, aNodeId4, aNodeId3, 245, 246]) == 1:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;Hexahedron addition is OK!&quot;</p>
-
-<p class="whs1">else:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;KO Hexahedron addition.&quot;</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;</p>
-
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> 
- </p>
-
-<p class="whs2">&nbsp;</p>
-
-<h4>Add Polygon</h4>
-
-<p class="whs1">import salome</p>
-
-<p class="whs1">import geompy</p>
-
-<p class="whs1">import math</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">import StdMeshers</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs2"># GEOM module </p>
-
-<p class="whs1">shape_mesh = geompy.MakeCylinderRH(13, 
- 77)</p>
-
-<p class="whs1">geompy.addToStudy(shape_mesh, 
- &quot;cylinder&quot;)</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs2"># SMESH module</p>
-
-<p class="whs1">smesh = salome.lcc.FindOrLoadComponent(&quot;FactoryServer&quot;, 
- &quot;SMESH&quot;)</p>
-
-<p class="whs1">smesh.SetCurrentStudy(salome.myStudy)</p>
-
-<p class="whs1">mesh = smesh.CreateMesh(shape_mesh)</p>
-
-<p class="whs1">MeshEditor = mesh.GetMeshEditor()</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs2"># a method to build a polygonal 
- mesh element with nb_vert angles:</p>
-
-<p class="whs1">def MakePolygon 
- (a_mesh, x0, y0, z0, radius, nb_vert):</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;node_start_id 
- = a_mesh.NbNodes() + 1</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;al 
- = 2.0 * math.pi / nb_vert</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;node_ids 
- = []</p>
-
-<p class="whs2">&nbsp;&nbsp;&nbsp;&nbsp;</p>
-
-<p class="whs2"># Create nodes for a polyhedron</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;for 
- ii in range(nb_vert):</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MeshEditor.AddNode(x0 
- + radius * math.cos(ii*al),</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y0 
- + radius * math.sin(ii*al),</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;z0)</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;node_ids.append(node_start_id 
- + ii)</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pass</p>
-
-<p class="whs2">&nbsp;&nbsp;&nbsp;&nbsp;</p>
-
-<p class="whs2"># Create a polygon</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;MeshEditor.AddPolygonalFace(node_ids)</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;return 
- 0</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs2"># Create three polygons</p>
-
-<p class="whs1">MakePolygon(mesh, 
- 0, 0, &nbsp;0, 
- 30, 13)</p>
-
-<p class="whs1">MakePolygon(mesh, 
- 0, 0, 10, 21, &nbsp;9)</p>
-
-<p class="whs1">MakePolygon(mesh, 
- 0, 0, 20, 13, &nbsp;6)</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">salome.sg.updateObjBrowser(1) 
- &nbsp;</p>
-
-<p class="whs1">&nbsp;</p>
-
-<h4>Add polyhedron</h4>
-
-<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">import 
- salome</span></p>
-
-<p class="whs1">import geompy</p>
-
-<p class="whs1">import math</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">#import SMESH</p>
-
-<p class="whs1">import StdMeshers</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs3"># GEOM</p>
-
-<p class="whs1">shape_mesh = geompy.MakeCylinderRH(13, 
- 77)</p>
-
-<p class="whs1">geompy.addToStudy(shape_mesh, 
- &quot;cylinder&quot;)</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs3"># SMESH</p>
-
-<p class="whs1">smesh = salome.lcc.FindOrLoadComponent(&quot;FactoryServer&quot;, 
- &quot;SMESH&quot;)</p>
-
-<p class="whs1">smesh.SetCurrentStudy(salome.myStudy)</p>
-
-<p class="whs1">mesh = smesh.CreateMesh(shape_mesh)</p>
-
-<p class="whs1">MeshEditor = mesh.GetMeshEditor()</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs3"># Now we are going 
- to create a 12-hedron:</p>
-
-<p class="whs3">&nbsp;</p>
-
-<p class="whs3"># Create nodes for 
- polyhedron</p>
-
-<p class="whs1">al = 2 * math.pi 
- / 5.0</p>
-
-<p class="whs1">cosal = math.cos(al)</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">aa = 13</p>
-
-<p class="whs1">rr = aa / (2.0 * 
- math.sin(al/2.0))</p>
-
-<p class="whs1">dr = 2.0 * rr * 
- cosal</p>
-
-<p class="whs1">r1 = rr + dr</p>
-
-<p class="whs1">dh = rr * math.sqrt(2.0 
- * (1.0 - cosal * (1.0 + 2.0 * cosal)))</p>
-
-<p class="whs1">hh = 2.0 * dh - 
- dr * (rr*(cosal - 1) + (rr + dr)*(math.cos(al/2) - 1)) / dh</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">for i in range(5):</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;MeshEditor.AddNode(rr*math.cos(i*al), 
- rr*math.sin(i*al), &nbsp;0) 
- <span style="font-family: 'Times New Roman', serif;"># 1,3,5,7, 9 # bottom</span></p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;MeshEditor.AddNode(r1*math.cos(i*al), 
- r1*math.sin(i*al), dh) <span style="font-family: 'Times New Roman', serif;"># 
- 2,4,6,8,10 # above bottom</span></p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">for i in range(5):</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;MeshEditor.AddNode(rr*math.cos(i*al 
- + al/2.0),</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rr*math.sin(i*al 
- + al/2.0), hh) # 11,13,15,17,19 <span style="font-family: 'Times New Roman', serif;"># 
- top</span></p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;MeshEditor.AddNode(r1*math.cos(i*al 
- + al/2.0),</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r1*math.sin(i*al 
- + al/2.0), hh - dh) # 12,14,16,18,20 <span style="font-family: 'Times New Roman', serif;"># 
- below top</span></p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs3"># Create a polyhedral 
- volume</p>
-
-<p class="whs1">MeshEditor.AddPolyhedralVolume([ 
- 1, &nbsp;3, &nbsp;5, 
- &nbsp;7, &nbsp;9, 
- &nbsp;<span style="font-family: 'Times New Roman', serif;"># 
- bottom</span></p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1, 
- &nbsp;2, 12, 
- &nbsp;4, &nbsp;3, 
- &nbsp;<span style="font-family: 'Times New Roman', serif;"># 
- .</span></p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3, 
- &nbsp;4, 14, 
- &nbsp;6, &nbsp;5, 
- &nbsp;<span style="font-family: 'Times New Roman', serif;"># 
- .</span></p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5, 
- &nbsp;6, 16, 
- &nbsp;8, &nbsp;7, 
- &nbsp;<span style="font-family: 'Times New Roman', serif;"># 
- . above bottom</span></p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7, 
- &nbsp;8, 18, 
- 10, &nbsp;9, 
- &nbsp;<span style="font-family: 'Times New Roman', serif;"># 
- .</span></p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;9, 
- 10, 20, &nbsp;2, 
- &nbsp;1, &nbsp;<span 
- style="font-family: 'Times New Roman', serif;"># 
- .</span></p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;11, 
- 12, &nbsp;4, 
- 14, 13, &nbsp;<span style="font-family: 'Times New Roman', serif;"># 
- -</span></p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;13, 
- 14, &nbsp;6, 
- 16, 15, &nbsp;<span style="font-family: 'Times New Roman', serif;"># 
- -</span></p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;15, 
- 16, &nbsp;8, 
- 18, 17, &nbsp;<span style="font-family: 'Times New Roman', serif;"># 
- - below top</span></p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;17, 
- 18, 10, 20, 19, &nbsp;<span style="font-family: 'Times New Roman', serif;"># 
- -</span></p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;19, 
- 20, &nbsp;2, 
- 12, 11, &nbsp;<span style="font-family: 'Times New Roman', serif;"># 
- -</span></p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;11, 
- 13, 15, 17, 19], <span style="font-family: 'Times New Roman', serif;"># 
- top</span></p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5,5,5,5,5,5,5,5,5,5,5,5])</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">salome.sg.updateObjBrowser(1) 
- &nbsp;</p>
-
-<p class="whs1">&nbsp;</p>
-
-<h3><a name=bookmark1>Removing Nodes and Elements</a></h3>
-
-<h4 class="whs4">Removing Nodes</h4>
-
-<p class="whs2">&nbsp;</p>
-
-<p class="whs1">import SMESH</p>
-
-<p class="whs1">import SMESH_mechanic</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">smesh &nbsp;= 
- SMESH_mechanic.smesh</p>
-
-<p class="whs1">mesh &nbsp;&nbsp;= 
- SMESH_mechanic.mesh</p>
-
-<p class="whs1">salome = SMESH_mechanic.salome</p>
-
-<p class="whs2">&nbsp;</p>
-
-<p class="whs2"># add node</p>
-
-<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>
-
-<p class="whs1">if aMeshEditor.RemoveNodes([246, 
- 255]) == 1:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;Node removing is OK!&quot;</p>
-
-<p class="whs1">else:</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
- &quot;KO node removing.&quot;</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;</p>
-
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> 
- </p>
-
-<p class="whs2">&nbsp;</p>
-
-<h4>Removing Elements</h4>
-
-<p class="whs1">import SMESH</p>
-
-<p class="whs1">import SMESH_mechanic</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">smesh &nbsp;= 
- SMESH_mechanic.smesh</p>
-
-<p class="whs1">mesh &nbsp;&nbsp;= 
- SMESH_mechanic.mesh</p>
-
-<p class="whs1">salome = SMESH_mechanic.salome</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">anEditor = mesh.GetMeshEditor()</p>
-
-<p class="whs1">anEditor.RemoveElements([850, 
- 859, 814])</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">salome.sg.updateObjBrowser(1) 
- </p>
-
-<p class="whs1">&nbsp;</p>
-
-<h3><a name=bookmark2>Renumbering Nodes and Elements</a></h3>
-
-<p class="whs5">import SMESH</p>
-
-<p class="whs5">import SMESH_mechanic</p>
-
-<p class="whs5">&nbsp;</p>
-
-<p class="whs5">mesh &nbsp;&nbsp;= 
- SMESH_mechanic.mesh</p>
-
-<p class="whs5">salome = SMESH_mechanic.salome</p>
-
-<p class="whs5">&nbsp;</p>
-
-<p class="whs5">anEditor = mesh.GetMeshEditor()</p>
-
-<p class="whs5">anEditor.RenumberNodes()</p>
-
-<p class="whs5">&nbsp;</p>
-
-<p class="whs6"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> 
- </p>
-
-<p class="whs6">&nbsp;</p>
-
-<p>&nbsp;</p>
-
-<h3><a name=bookmark3>Moving Nodes</a></h3>
-
-<p class="whs1">import SMESH</p>
-
-<p class="whs1">import SMESH_mechanic</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">smesh &nbsp;= 
- SMESH_mechanic.smesh</p>
-
-<p class="whs1">mesh &nbsp;&nbsp;= 
- SMESH_mechanic.mesh</p>
-
-<p class="whs1">salome = SMESH_mechanic.salome</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs2"># move node</p>
-
-<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>
-
-<p class="whs1">aMeshEditor.MoveNode(38, 
- 20, 10, 0)</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;</p>
-
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> 
- </p>
-
-<p class="whs2">&nbsp;</p>
-
-<h3><a name=bookmark4>Diagonal Inversion</a></h3>
-
-<p class="whs1">import SMESH</p>
-
-<p class="whs1">import SMESH_mechanic</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs1">smesh &nbsp;= 
- SMESH_mechanic.smesh</p>
-
-<p class="whs1">mesh &nbsp;&nbsp;= 
- SMESH_mechanic.mesh</p>
-
-<p class="whs1">salome = SMESH_mechanic.salome</p>
-
-<p class="whs1">&nbsp;</p>
-
-<p class="whs2"># inverse diagonal</p>
-
-<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>
-
-<p class="whs1">aMeshEditor.InverseDiag(700, 
- 642)</p>
-
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;</p>
-
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> 
- </p>
-
-<p class="whs2">&nbsp;</p>
-
-<h3><a name=bookmark5>Uniting two Triangles</a></h3>
-
-<p class="whs7">import SMESH</p>
-
-<p class="whs7">import SMESH_mechanic</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">smesh &nbsp;= 
- SMESH_mechanic.smesh</p>
-
-<p class="whs7">mesh &nbsp;&nbsp;= 
- SMESH_mechanic.mesh</p>
-
-<p class="whs7">salome = SMESH_mechanic.salome</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p># delete diagonal</p>
-
-<p class="whs7">aMeshEditor = mesh.GetMeshEditor()</p>
-
-<p class="whs7">aMeshEditor.DeleteDiag(700, 
- 642)</p>
-
-<p class="whs7">&nbsp;&nbsp;&nbsp;&nbsp;</p>
-
-<p><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> 
- </p>
-
-<p>&nbsp;</p>
-
-<h3><a name=bookmark6>Uniting a Set of Triangles</a></h3>
-
-<p class="whs7">import SMESH</p>
-
-<p class="whs7">import SMESH_mechanic</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">smesh &nbsp;= 
- SMESH_mechanic.smesh</p>
-
-<p class="whs7">mesh &nbsp;&nbsp;= 
- SMESH_mechanic.mesh</p>
-
-<p class="whs7">salome = SMESH_mechanic.salome</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p># unite a set of triangles</p>
-
-<p class="whs7">aFilterMgr = smesh.CreateFilterManager()</p>
-
-<p class="whs7">aFunctor = aFilterMgr.CreateMinimumAngle()</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">aMeshEditor = mesh.GetMeshEditor()</p>
-
-<p class="whs7">aMeshEditor.TriToQuad([1145, 
- 1147, 1159, 1135], aFunctor, 60)</p>
-
-<p class="whs7">&nbsp;&nbsp;&nbsp;&nbsp;</p>
-
-<p class="whs7">salome.sg.updateObjBrowser(1) 
- </p>
-
-<p class="whs7">&nbsp;</p>
-
-<h3><a name=bookmark12>Orientation</a></h3>
-
-<p class="whs7"><span style="font-family: 'Lucida Console', monospace;">import 
- salome</span></p>
-
-<p class="whs7">import geompy</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">import StdMeshers</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs8"># GEOM module</p>
-
-<p class="whs7">shape_mesh = geompy.MakeCylinderRH(13, 
- 77)</p>
-
-<p class="whs7">geompy.addToStudy(shape_mesh, 
- &quot;cylinder&quot;)</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs8"># SMESH module</p>
-
-<p class="whs7">smesh = salome.lcc.FindOrLoadComponent(&quot;FactoryServer&quot;, 
- &quot;SMESH&quot;)</p>
-
-<p class="whs7">smesh.SetCurrentStudy(salome.myStudy)</p>
-
-<p class="whs7">mesh = smesh.CreateMesh(shape_mesh)</p>
-
-<p class="whs7">MeshEditor = mesh.GetMeshEditor()</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs8"># build five quadrangles:</p>
-
-<p class="whs7">node_start_id = mesh.NbNodes() 
- + 1</p>
-
-<p class="whs7">dx = 10</p>
-
-<p class="whs7">dy = 20</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">MeshEditor.AddNode(0.0 
- * dx, 0, 0) # 1</p>
-
-<p class="whs7">MeshEditor.AddNode(1.0 
- * dx, 0, 0) # 2</p>
-
-<p class="whs7">MeshEditor.AddNode(2.0 
- * dx, 0, 0) # 3</p>
-
-<p class="whs7">MeshEditor.AddNode(3.0 
- * dx, 0, 0) # 4</p>
-
-<p class="whs7">MeshEditor.AddNode(4.0 
- * dx, 0, 0) # 5</p>
-
-<p class="whs7">MeshEditor.AddNode(5.0 
- * dx, 0, 0) # 6</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">MeshEditor.AddNode(0.0 
- * dx, dy, 0) # 7</p>
-
-<p class="whs7">MeshEditor.AddNode(1.0 
- * dx, dy, 0) # 8</p>
-
-<p class="whs7">MeshEditor.AddNode(2.0 
- * dx, dy, 0) # 9</p>
-
-<p class="whs7">MeshEditor.AddNode(3.0 
- * dx, dy, 0) # 10</p>
-
-<p class="whs7">MeshEditor.AddNode(4.0 
- * dx, dy, 0) # 11</p>
-
-<p class="whs7">MeshEditor.AddNode(5.0 
- * dx, dy, 0) # 12</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">MeshEditor.AddFace([1, 
- 2, &nbsp;8, &nbsp;7])</p>
-
-<p class="whs7">MeshEditor.AddFace([2, 
- 3, &nbsp;9, &nbsp;8])</p>
-
-<p class="whs7">MeshEditor.AddFace([3, 
- 4, 10, &nbsp;9])</p>
-
-<p class="whs7">MeshEditor.AddFace([4, 
- 5, 11, 10])</p>
-
-<p class="whs7">MeshEditor.AddFace([5, 
- 6, 12, 11])</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs8"># Change orientation 
- of the second and the fourth faces.</p>
-
-<p class="whs7">MeshEditor.Reorient([2, 
- 4])</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">salome.sg.updateObjBrowser(1) 
- &nbsp;</p>
-
-<p class="whs7">&nbsp;</p>
-
-<h3><a name=bookmark7>Cutting Quadrangles</a></h3>
-
-<p class="whs7">import SMESH</p>
-
-<p class="whs7">import SMESH_mechanic</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">smesh &nbsp;= 
- SMESH_mechanic.smesh</p>
-
-<p class="whs7">mesh &nbsp;&nbsp;= 
- SMESH_mechanic.mesh</p>
-
-<p class="whs7">salome = SMESH_mechanic.salome</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs8"># unite a set of triangles</p>
-
-<p class="whs7">aFilterMgr = smesh.CreateFilterManager()</p>
-
-<p class="whs7">aFunctor = aFilterMgr.CreateMinimumAngle()</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">aMeshEditor = mesh.GetMeshEditor()</p>
-
-<p class="whs7">aMeshEditor.QuadToTri([405, 
- 406], aFunctor)</p>
-
-<p class="whs7">&nbsp;&nbsp;&nbsp;&nbsp;</p>
-
-<p class="whs7">salome.sg.updateObjBrowser(1) 
- </p>
-
-<p class="whs8">&nbsp;</p>
-
-<h3><a name=bookmark8>Smoothing</a></h3>
-
-<p class="whs7">import SMESH</p>
-
-<p class="whs7">import SMESH_mechanic</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">smesh &nbsp;= 
- SMESH_mechanic.smesh</p>
-
-<p class="whs7">mesh &nbsp;&nbsp;= 
- SMESH_mechanic.mesh</p>
-
-<p class="whs7">salome = SMESH_mechanic.salome</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs8"># smooth</p>
-
-<p class="whs7">FacesSmooth = [911, 
- 931, 950, 864, 932]</p>
-
-<p class="whs7">GroupSmooth = mesh.CreateGroup(SMESH.FACE,&quot;Group 
- of faces (smooth)&quot;)</p>
-
-<p class="whs7">GroupSmooth.Add(FacesSmooth)</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">aMeshEditor = mesh.GetMeshEditor()</p>
-
-<p class="whs7">aMeshEditor.SmoothObject(GroupSmooth, 
- [], 20, 2, SMESH.SMESH_MeshEditor.CENTROIDAL_SMOOTH)</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">salome.sg.updateObjBrowser(1) 
- </p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">&nbsp;</p>
-
-<h3><a name=bookmark9>Extrusion</a></h3>
-
-<p class="whs7">import SMESH</p>
-
-<p class="whs7">import SMESH_mechanic</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">smesh &nbsp;= 
- SMESH_mechanic.smesh</p>
-
-<p class="whs7">mesh &nbsp;&nbsp;= 
- SMESH_mechanic.mesh</p>
-
-<p class="whs7">salome = SMESH_mechanic.salome</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs8"># extrusion of the group</p>
-
-<p class="whs7">point = SMESH.PointStruct(0, 
- 0, 5)</p>
-
-<p class="whs7">vector = SMESH.DirStruct(point)</p>
-
-<p class="whs7">FacesTriToQuad = [2381, 
- 2382, 2383, 2384, 2385, 2386, 2387, 2388, 2389, 2390, 2391, 2392, 2393, 
- 2394, 2395, 2396, 2397, 2398, 2399, 2400, 2401, 2402, 2403, 2404, 2405, 
- 2406, 2407, 2408, 2409, 2410, 2411, 2412, 2413, 2414, 2415, 2416, 2417, 
- 2418, 2419, 2420, 2421, 2422]</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">GroupTriToQuad = mesh.CreateGroup(SMESH.FACE,&quot;Group 
- of faces (quad)&quot;)</p>
-
-<p class="whs7">GroupTriToQuad.Add(FacesTriToQuad)</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">aMeshEditor = mesh.GetMeshEditor()</p>
-
-<p class="whs7">aMeshEditor.ExtrusionSweepObject(GroupTriToQuad, 
- vector, 5)</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs8"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> 
- </p>
-
-<p class="whs8">&nbsp;</p>
-
-<h3><a name=bookmark10>Extrusion along a Path</a></h3>
-
-<p class="whs7">import math</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">import salome</p>
-
-<p class="whs7">salome.salome_init()</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs8"># Geometry</p>
-
-<p class="whs7">import geompy</p>
-
-<p class="whs8">&nbsp;</p>
-
-<p class="whs8"># 1. Create points</p>
-
-<p class="whs7">points = [[0, 0], 
- [50, 30], [50, 110], [0, 150], [-80, 150], [-130, 70], [-130, -20]]</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">iv = 1</p>
-
-<p class="whs7">vertices = []</p>
-
-<p class="whs7">for point in points:</p>
-
-<p class="whs9">vert 
- = geompy.MakeVertex(point[0], point[1], 0)</p>
-
-<p class="whs9">geompy.addToStudy(vert, 
- &quot;Vertex_&quot; + `iv`)</p>
-
-<p class="whs9">vertices.append(vert)</p>
-
-<p class="whs9">iv 
- += 1</p>
-
-<p class="whs9">pass</p>
-
-<p class="whs8">&nbsp;</p>
-
-<p class="whs8"># 2. Create edges and 
- wires</p>
-
-<p class="whs7">Edge_straight = geompy.MakeEdge(vertices[0], 
- vertices[4])</p>
-
-<p class="whs7">Edge_bezierrr = geompy.MakeBezier(vertices)</p>
-
-<p class="whs7">Wire_polyline = geompy.MakePolyline(vertices)</p>
-
-<p class="whs7">Edge_Circle &nbsp;&nbsp;= 
- geompy.MakeCircleThreePnt(vertices[0], vertices[1], vertices[2])</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">geompy.addToStudy(Edge_straight, 
- &quot;Edge_straight&quot;)</p>
-
-<p class="whs7">geompy.addToStudy(Edge_bezierrr, 
- &quot;Edge_bezierrr&quot;)</p>
-
-<p class="whs7">geompy.addToStudy(Wire_polyline, 
- &quot;Wire_polyline&quot;)</p>
-
-<p class="whs7">geompy.addToStudy(Edge_Circle 
- &nbsp;, &quot;Edge_Circle&quot;)</p>
-
-<p class="whs8">&nbsp;</p>
-
-<p class="whs8"># 3. Explode wire on 
- edges, as they will be used for mesh extrusion</p>
-
-<p class="whs7">Wire_polyline_edges 
- = geompy.SubShapeAll(Wire_polyline, geompy.ShapeType[&quot;EDGE&quot;])</p>
-
-<p class="whs7">for ii in range(len(Wire_polyline_edges)):</p>
-
-<p class="whs9">geompy.addToStudyInFather(Wire_polyline, 
- Wire_polyline_edges[ii], &quot;Edge_&quot; + `ii + 1`)</p>
-
-<p class="whs9">pass</p>
-
-<p class="whs10">&nbsp;</p>
-
-<p class="whs8"># Mesh</p>
-
-<p class="whs7">import smesh</p>
-
-<p class="whs7">import SMESH</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">gen = smesh.smesh</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">smeshgui = salome.ImportComponentGUI(&quot;SMESH&quot;)</p>
-
-<p class="whs7">smeshgui.Init(salome.myStudyId)</p>
-
-<p class="whs8">&nbsp;</p>
-
-<p class="whs8"># 1D algorithm and three 
- 1D hypotheses</p>
-
-<p class="whs7">Wire_discretisation 
- = gen.CreateHypothesis('Regular_1D', 'libStdMeshersEngine.so')</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">Nb_Segments_3 = gen.CreateHypothesis('NumberOfSegments', 
- 'libStdMeshersEngine.so')</p>
-
-<p class="whs7">Nb_Segments_7 = gen.CreateHypothesis('NumberOfSegments', 
- 'libStdMeshersEngine.so')</p>
-
-<p class="whs7">Nb_Segments_8 = gen.CreateHypothesis('NumberOfSegments', 
- 'libStdMeshersEngine.so')</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">Nb_Segments_3.SetNumberOfSegments(3)</p>
-
-<p class="whs7">Nb_Segments_7.SetNumberOfSegments(7)</p>
-
-<p class="whs7">Nb_Segments_8.SetNumberOfSegments(8)</p>
-
-<p class="whs8">&nbsp;</p>
-
-<p class="whs8"># Mesh given shape with 
- given 1d hypothesis</p>
-
-<p class="whs7">def Mesh1D(shape1d, 
- hyp1d, name):</p>
-
-<p class="whs9">mesh1d_tool 
- = smesh.Mesh(shape1d)</p>
-
-<p class="whs9">mesh1d 
- = mesh1d_tool.GetMesh()</p>
-
-<p class="whs9">status 
- = mesh1d.AddHypothesis(shape1d, hyp1d)</p>
-
-<p class="whs9">status 
- = mesh1d.AddHypothesis(shape1d, Wire_discretisation)</p>
-
-<p class="whs9">isDone 
- = mesh1d_tool.Compute()</p>
-
-<p class="whs9">if 
- not isDone: print 'Mesh ', name, ': computation failed'</p>
-
-<p class="whs9">return 
- mesh1d</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs8"># Create mesh with six 
- nodes, seven edges and two quadrangle faces</p>
-
-<p class="whs7">def MakeQuadMesh2(mesh_name):</p>
-
-<p class="whs9">quad_1 
- = gen.CreateEmptyMesh()</p>
-
-<p class="whs9">smeshgui.SetName(salome.ObjectToID(quad_1), 
- mesh_name)</p>
-
-<p class="whs9">editor_1 
- = quad_1.GetMeshEditor()</p>
-
-<p class="whs10">&nbsp;</p>
-
-<p class="whs10"># six nodes</p>
-
-<p class="whs9">n1 
- = editor_1.AddNode(0, 20, 10)</p>
-
-<p class="whs9">n2 
- = editor_1.AddNode(0, 40, 10)</p>
-
-<p class="whs9">n3 
- = editor_1.AddNode(0, 40, 30)</p>
-
-<p class="whs9">n4 
- = editor_1.AddNode(0, 20, 30)</p>
-
-<p class="whs9">n5 
- = editor_1.AddNode(0, &nbsp;0, 
- 30)</p>
-
-<p class="whs9">n6 
- = editor_1.AddNode(0, &nbsp;0, 
- 10)</p>
-
-<p class="whs10">&nbsp;</p>
-
-<p class="whs10"># seven edges</p>
-
-<p class="whs9">editor_1.AddEdge([n1, 
- n2]) # 1</p>
-
-<p class="whs9">editor_1.AddEdge([n2, 
- n3]) # 2</p>
-
-<p class="whs9">editor_1.AddEdge([n3, 
- n4]) # 3</p>
-
-<p class="whs9">editor_1.AddEdge([n4, 
- n1]) # 4</p>
-
-<p class="whs9">editor_1.AddEdge([n4, 
- n5]) # 5</p>
-
-<p class="whs9">editor_1.AddEdge([n5, 
- n6]) # 6</p>
-
-<p class="whs9">editor_1.AddEdge([n6, 
- n1]) # 7</p>
-
-<p class="whs10">&nbsp;</p>
-
-<p class="whs10"># two quadrangle faces</p>
-
-<p class="whs9">editor_1.AddFace([n1, 
- n2, n3, n4]) # 8</p>
-
-<p class="whs9">editor_1.AddFace([n1, 
- n4, n5, n6]) # 9</p>
-
-<p class="whs9">return 
- [quad_1, editor_1, [1,2,3,4,5,6,7], [8,9]]</p>
-
-<p class="whs8">&nbsp;</p>
-
-<p class="whs8"># Path meshes</p>
-
-<p class="whs7">Edge_straight_mesh 
- = Mesh1D(Edge_straight, Nb_Segments_7, &quot;Edge_straight&quot;)</p>
-
-<p class="whs7">Edge_bezierrr_mesh 
- = Mesh1D(Edge_bezierrr, Nb_Segments_7, &quot;Edge_bezierrr&quot;)</p>
-
-<p class="whs7">Wire_polyline_mesh 
- = Mesh1D(Wire_polyline, Nb_Segments_3, &quot;Wire_polyline&quot;)</p>
-
-<p class="whs7">Edge_Circle_mesh &nbsp;&nbsp;= 
- Mesh1D(Edge_Circle &nbsp;, 
- Nb_Segments_8, &quot;Edge_Circle&quot;)</p>
-
-<p class="whs8">&nbsp;</p>
-
-<p class="whs8"># Initial meshes (to 
- be extruded)</p>
-
-<p class="whs7">[quad_1, editor_1, 
- ee_1, ff_1] = MakeQuadMesh2(&quot;quad_1&quot;)</p>
-
-<p class="whs7">[quad_2, editor_2, 
- ee_2, ff_2] = MakeQuadMesh2(&quot;quad_2&quot;)</p>
-
-<p class="whs7">[quad_3, editor_3, 
- ee_3, ff_3] = MakeQuadMesh2(&quot;quad_3&quot;)</p>
-
-<p class="whs7">[quad_4, editor_4, 
- ee_4, ff_4] = MakeQuadMesh2(&quot;quad_4&quot;)</p>
-
-<p class="whs7">[quad_5, editor_5, 
- ee_5, ff_5] = MakeQuadMesh2(&quot;quad_5&quot;)</p>
-
-<p class="whs7">[quad_6, editor_6, 
- ee_6, ff_6] = MakeQuadMesh2(&quot;quad_6&quot;)</p>
-
-<p class="whs7">[quad_7, editor_7, 
- ee_7, ff_7] = MakeQuadMesh2(&quot;quad_7&quot;)</p>
-
-<p class="whs8">&nbsp;</p>
-
-<p class="whs8"># ExtrusionAlongPath</p>
-
-<p class="whs8"># IDsOfElements, PathMesh, 
- PathShape, NodeStart,</p>
-
-<p class="whs8"># HasAngles, Angles, 
- HasRefPoint, RefPoint</p>
-
-<p class="whs8">&nbsp;</p>
-
-<p class="whs7">refPoint = SMESH.PointStruct(0, 
- 0, 0)</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">a10 = 10.0*math.pi/180.0</p>
-
-<p class="whs7">a45 = 45.0*math.pi/180.0</p>
-
-<p class="whs8">&nbsp;</p>
-
-<p class="whs8"># 1. Extrusion of two 
- mesh edges along straight path</p>
-
-<p class="whs7">error = editor_1.ExtrusionAlongPath([1,2], 
- Edge_straight_mesh, Edge_straight, 1,</p>
-
-<p class="whs11">&nbsp;&nbsp;&nbsp;&nbsp;0, 
- [], 0, refPoint)</p>
-
-<p class="whs8">&nbsp;</p>
-
-<p class="whs8"># 2. Extrusion of one 
- mesh edge along curved path</p>
-
-<p class="whs7">error = editor_2.ExtrusionAlongPath([2], 
- Edge_bezierrr_mesh, Edge_bezierrr, 1,</p>
-
-<p class="whs11">&nbsp;&nbsp;&nbsp;&nbsp;0, 
- [], 0, refPoint)</p>
-
-<p class="whs8">&nbsp;</p>
-
-<p class="whs8"># 3. Extrusion of one 
- mesh edge along curved path with angles usage</p>
-
-<p class="whs7">error = editor_3.ExtrusionAlongPath([2], 
- Edge_bezierrr_mesh, Edge_bezierrr, 1,</p>
-
-<p class="whs11">&nbsp;&nbsp;&nbsp;&nbsp;1, 
- [a45, a45, a45, 0, -a45, -a45, -a45], 0, refPoint)</p>
-
-<p class="whs8">&nbsp;</p>
-
-<p class="whs8"># 4. Extrusion of one 
- mesh edge along path, which is a part of meshed wire</p>
-
-<p class="whs7">error = editor_4.ExtrusionAlongPath([4], 
- Wire_polyline_mesh, Wire_polyline_edges[0], 1,</p>
-
-<p class="whs11">&nbsp;&nbsp;&nbsp;&nbsp;1, 
- [a10, a10, a10], 0, refPoint)</p>
-
-<p class="whs8">&nbsp;</p>
-
-<p class="whs8"># 5. Extrusion of two 
- mesh faces along path, which is a part of meshed wire</p>
-
-<p class="whs7">error = editor_5.ExtrusionAlongPath(ff_5 
- , Wire_polyline_mesh, Wire_polyline_edges[2], 4,</p>
-
-<p class="whs11">&nbsp;&nbsp;&nbsp;&nbsp;0, 
- [], 0, refPoint)</p>
-
-<p class="whs8">&nbsp;</p>
-
-<p class="whs8"># 6. Extrusion of two 
- mesh faces along closed path</p>
-
-<p class="whs7">error = editor_6.ExtrusionAlongPath(ff_6 
- , Edge_Circle_mesh, Edge_Circle, 1,</p>
-
-<p class="whs11">&nbsp;&nbsp;&nbsp;&nbsp;0, 
- [], 0, refPoint)</p>
-
-<p class="whs8">&nbsp;</p>
-
-<p class="whs8"># 7. Extrusion of two 
- mesh faces along closed path with angles usage</p>
-
-<p class="whs7">error = editor_7.ExtrusionAlongPath(ff_7, 
- Edge_Circle_mesh, Edge_Circle, 1,</p>
-
-<p class="whs11">&nbsp;&nbsp;&nbsp;&nbsp;1, 
- [a45, -a45, a45, -a45, a45, -a45, a45, -a45], 0, refPoint)</p>
-
-<p class="whs8">&nbsp;</p>
-
-<p class="whs7">if salome.sg.hasDesktop():</p>
-
-<p class="whs12">salome.sg.updateObjBrowser(1)</p>
-
-<p class="whs12">pass</p>
-
-<h3><a name=bookmark11>Revolution</a></h3>
-
-<p class="whs7">import SMESH</p>
-
-<p class="whs7">import SMESH_mechanic</p>
-
-<p class="whs7">import math</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">smesh &nbsp;= 
- SMESH_mechanic.smesh</p>
-
-<p class="whs7">mesh &nbsp;&nbsp;= 
- SMESH_mechanic.mesh</p>
-
-<p class="whs7">salome = SMESH_mechanic.salome</p>
-
-<p class="whs8">&nbsp;</p>
-
-<p class="whs8"># rotate a sweep object</p>
-
-<p class="whs7">FacesRotate = [492, 
- 493, 502, 503]</p>
-
-<p class="whs7">GroupRotate = mesh.CreateGroup(SMESH.FACE,&quot;Group 
- of faces (rotate)&quot;)</p>
-
-<p class="whs7">GroupRotate.Add(FacesRotate)</p>
-
-<p class="whs7">angle45 = &nbsp;45*math.pi/180</p>
-
-<p class="whs7">axisXYZ = SMESH.AxisStruct(-38.3128, 
- -73.3658, -23.321, -13.3402, -13.3265, 6.66632)</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">aMeshEditor = mesh.GetMeshEditor()</p>
-
-<p class="whs7">aMeshEditor.RotationSweepObject(GroupRotate, 
- axisXYZ, angle45, 4, 1e-5)</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs8"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> 
- </p>
-
-<p class="whs8">&nbsp;</p>
-
-<h3><a name=bookmark13>Pattern Mapping</a></h3>
-
-<p class="whs7">import salome</p>
-
-<p class="whs7">import geompy</p>
-
-<p class="whs7">import SMESH, smesh</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">geompy.init_geom(salome.myStudy)</p>
-
-<p class="whs7">smesh.smesh.SetCurrentStudy(salome.myStudy)</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs8"># define geometry</p>
-
-<p class="whs7">Box_1 = geompy.MakeBoxDXDYDZ(200, 
- 200, 200)</p>
-
-<p class="whs7">geompy.addToStudy(Box_1, 
- &quot;Box_1&quot;)</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">faces = geompy.SubShapeAll(Box_1, 
- geompy.ShapeType[&quot;FACE&quot;])</p>
-
-<p class="whs7">Face_1 = faces[0]</p>
-
-<p class="whs7">Face_2 = faces[1]</p>
-
-<p class="whs7">geompy.addToStudyInFather(Box_1, 
- Face_1, &quot;Face_1&quot;)</p>
-
-<p class="whs7">geompy.addToStudyInFather(Box_1, 
- Face_2, &quot;Face_2&quot;)</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs8"># build quadrangle mesh 
- 3x3 on Face_1</p>
-
-<p class="whs7">Mesh_1 = smesh.Mesh(Face_1)</p>
-
-<p class="whs7">Wire_discretisation 
- = Mesh_1.Segment()</p>
-
-<p class="whs7">Wire_discretisation.NumberOfSegments(3)</p>
-
-<p class="whs7">Mesh_1.Quadrangle()</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">isDone = Mesh_1.Compute()</p>
-
-<p class="whs7">if not isDone: print 
- 'Mesh Mesh_1 : computation failed'</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs8"># pattern the mesh</p>
-
-<p class="whs7">Mesh_2 = smesh.Mesh(Face_2)</p>
-
-<p class="whs7">Nb_Segments_1 = smesh.smesh.CreateHypothesis('NumberOfSegments', 
- 'libStdMeshersEngine.so')</p>
-
-<p class="whs7">Nb_Segments_1.SetNumberOfSegments(1)</p>
-
-<p class="whs7">status = Mesh_2.GetMesh().AddHypothesis(Face_2, 
- Nb_Segments_1)</p>
-
-<p class="whs7">status = Mesh_2.GetMesh().AddHypothesis(Face_2, 
- Wire_discretisation.GetAlgorithm())</p>
-
-<p class="whs7">Triangle_Mefisto = 
- Mesh_2.Triangle()</p>
-
-<p class="whs7">Max_Element_Area = 
- Triangle_Mefisto.MaxElementArea(240)</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs7">isDone = Mesh_2.Compute()</p>
-
-<p class="whs7">if not isDone: print 
- 'Mesh Mesh_2 : computation failed'</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs8"># create a pattern</p>
-
-<p class="whs7">pattern = smesh.smesh.GetPattern()</p>
-
-<p class="whs7">isDone = pattern.LoadFromFace(Mesh_2.GetMesh(), 
- Face_2, 0)</p>
-
-<p class="whs7">if (isDone != 1):</p>
-
-<p class="whs13">print 
- 'LoadFromFace :', pattern.GetErrorCode()</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs8"># apply the pattern to 
- a face of the first mesh</p>
-
-<p class="whs7">pattern.ApplyToMeshFaces(Mesh_1.GetMesh(), 
- [17], 0, 0)</p>
-
-<p class="whs7">isDone = pattern.MakeMesh(Mesh_1.GetMesh(), 
- 0, 0)</p>
-
-<p class="whs7">if (isDone != 1):</p>
-
-<p class="whs13">print 
- 'MakeMesh :', pattern.GetErrorCode()</p>
-
-<p class="whs7">&nbsp;</p>
-
-<p class="whs8"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> 
- </p>
-
-<script type="text/javascript" language="javascript1.2">
-<!--
-if (window.writeIntopicBar)
-       writeIntopicBar(0);
-//-->
-</script>
-</body>
-</html>
+<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
+\r
+<html>\r
+\r
+<head>\r
+<title>Modifying Meshes</title>\r
+<meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
+<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com"><style>\r
+<!--\r
+P { margin-top:0pt; margin-bottom:0pt; }\r
+LI.kadov-P {  }\r
+-->\r
+</style><style type="text/css">\r
+<!--\r
+p.whs1 { margin-top:0pt; margin-bottom:0pt; font-weight:bold; color:#ff0000; }\r
+p.whs2 { margin-top:0pt; margin-bottom:0pt; }\r
+p.whs3 { margin-top:0pt; margin-bottom:0pt; font-family:'Lucida Console' , monospace; }\r
+p.whs4 { margin-top:0pt; margin-bottom:0pt; font-family:'Times New Roman' , serif; }\r
+h4.whs5 { margin-top:0pt; margin-bottom:0pt; }\r
+p.whs6 { margin-top:0.5pt; margin-bottom:0pt; font-family:'Lucida Console' , monospace; }\r
+p.whs7 { margin-top:0.5pt; margin-bottom:0pt; }\r
+p.whs8 { margin-top:0.5pt; margin-bottom:0pt; font-family:'Times New Roman' , serif; }\r
+p.whs9 { font-family:'Lucida Console' , monospace; }\r
+p.whs10 { font-family:'Times New Roman' , serif; }\r
+p.whs11 { margin-left:36px; font-family:'Lucida Console' , monospace; }\r
+p.whs12 { margin-left:36px; }\r
+p.whs13 { margin-left:192px; font-family:'Lucida Console' , monospace; }\r
+p.whs14 { font-family:'Lucida Console' , monospace; margin-left:0px; }\r
+-->\r
+</style><script type="text/javascript" language="JavaScript">\r
+<!--\r
+if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))\r
+{\r
+  var strNSS = "<style type='text/css'>";\r
+  strNSS += "p.whs1 {margin-top:1pt;margin-bottom:1pt; }";\r
+  strNSS += "p.whs2 {margin-top:1pt;margin-bottom:1pt; }";\r
+  strNSS += "p.whs3 {margin-top:1pt;margin-bottom:1pt; }";\r
+  strNSS += "p.whs4 {margin-top:1pt;margin-bottom:1pt; }";\r
+  strNSS += "h4.whs5 {margin-top:1pt;margin-bottom:1pt; }";\r
+  strNSS += "p.whs6 {margin-top:1pt;margin-bottom:1pt; }";\r
+  strNSS += "p.whs7 {margin-top:1pt;margin-bottom:1pt; }";\r
+  strNSS += "p.whs8 {margin-top:1pt;margin-bottom:1pt; }";\r
+  strNSS += "p.whs14 {margin-left:1pt; }";\r
+  strNSS +="</style>";\r
+  document.write(strNSS);\r
+}\r
+//-->\r
+</script>\r
+<script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
+<!--\r
+function reDo() {\r
+  if (innerWidth != origWidth || innerHeight != origHeight)\r
+     location.reload();\r
+}\r
+if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
+       origWidth = innerWidth;\r
+       origHeight = innerHeight;\r
+       onresize = reDo;\r
+}\r
+onerror = null; \r
+//-->\r
+</script>\r
+<style type="text/css">\r
+<!--\r
+div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
+p.WebHelpNavBar { text-align:right; }\r
+-->\r
+</style><script type="text/javascript" language="javascript1.2" src="whmsg.js"></script>\r
+<script type="text/javascript" language="javascript" src="whver.js"></script>\r
+<script type="text/javascript" language="javascript1.2" src="whproxy.js"></script>\r
+<script type="text/javascript" language="javascript1.2" src="whutils.js"></script>\r
+<script type="text/javascript" language="javascript1.2" src="whtopic.js"></script>\r
+<script type="text/javascript" language="javascript1.2">\r
+<!--\r
+if (window.gbWhTopic)\r
+{\r
+       if (window.setRelStartPage)\r
+       {\r
+       addTocInfo("MESH module\nTUI Scripts\nModifying Meshes");\r
+addButton("show",BTN_IMG,"Show","","","","",0,0,"whd_show0.gif","whd_show2.gif","whd_show1.gif");\r
+addButton("hide",BTN_IMG,"Hide","","","","",0,0,"whd_hide0.gif","whd_hide2.gif","whd_hide1.gif");\r
+\r
+       }\r
+\r
+\r
+       if (window.setRelStartPage)\r
+       {\r
+       setRelStartPage("index.htm");\r
+\r
+               autoSync(1);\r
+               sendSyncInfo();\r
+               sendAveInfoOut();\r
+       }\r
+\r
+}\r
+else\r
+       if (window.gbIE4)\r
+               document.location.reload();\r
+//-->\r
+</script>\r
+</head>\r
+<body><script type="text/javascript" language="javascript1.2">\r
+<!--\r
+if (window.writeIntopicBar)\r
+       writeIntopicBar(4);\r
+//-->\r
+</script>\r
+<h1>Modifying Meshes</h1>\r
+\r
+<h3><a name=bookmark>Adding Nodes and Elements</a></h3>\r
+\r
+<p class="whs1"># Attention! The scripts for Adding nodes \r
+ and Elements &nbsp;have \r
+ been written using the old approach basing on direct usage of SMESH idl \r
+ interface.</p>\r
+\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to add nodes and elements. </p>\r
+\r
+<p class="whs2"><span style="font-weight: bold; color: #ff0000;"><font color=red ><B># \r
+ In the next SALOME version the scripts will be updated to use only the \r
+ commands from smesh package.</B></font></span></p>\r
+\r
+<h4>Add Node</h4>\r
+\r
+<p class="whs3"><span style="font-family: 'Lucida Console', monospace;">import \r
+ SMESH</span></p>\r
+\r
+<p class="whs3">import SMESH_mechanic</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">mesh = SMESH_mechanic.mesh</p>\r
+\r
+<p class="whs3">aMeshEditor = mesh.GetMeshEditor()</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs4"># add node</p>\r
+\r
+<p class="whs3">new_id = aMeshEditor.AddNode(50, \r
+ 10, 0)</p>\r
+\r
+<p class="whs3">print &quot;&quot;</p>\r
+\r
+<p class="whs3">if new_id == 0: \r
+ print &quot;KO node addition.&quot;</p>\r
+\r
+<p class="whs3">else: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print \r
+ &quot;New Node has been added with ID &quot;, new_id </p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<h4>Add Edge</h4>\r
+\r
+<p class="whs3"><span style="font-family: 'Lucida Console', monospace;">import \r
+ SMESH</span></p>\r
+\r
+<p class="whs3">import SMESH_mechanic</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">mesh = SMESH_mechanic.mesh</p>\r
+\r
+<p class="whs3">aMeshEditor = mesh.GetMeshEditor()</p>\r
+\r
+<p class="whs3">print &quot;&quot;</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs4"># add node</p>\r
+\r
+<p class="whs3">n1 = aMeshEditor.AddNode(50, \r
+ 10, 0)</p>\r
+\r
+<p class="whs3">if n1 == 0: print \r
+ &quot;KO node addition.&quot;</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs4"># add edge</p>\r
+\r
+<p class="whs3">e1 = aMeshEditor.AddEdge([n1, \r
+ 38])</p>\r
+\r
+<p class="whs3">if e1 == 0: print \r
+ &quot;KO edge addition.&quot;</p>\r
+\r
+<p class="whs3">else: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print \r
+ &quot;New Edge has been added with ID &quot;, e1 </p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<h4>Add Triangle</h4>\r
+\r
+<p class="whs3"><span style="font-family: 'Lucida Console', monospace;">import \r
+ SMESH</span></p>\r
+\r
+<p class="whs3">import SMESH_mechanic</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">mesh = SMESH_mechanic.mesh</p>\r
+\r
+<p class="whs3">aMeshEditor = mesh.GetMeshEditor()</p>\r
+\r
+<p class="whs3">print &quot;&quot;</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs4"># add node</p>\r
+\r
+<p class="whs3">n1 = aMeshEditor.AddNode(50, \r
+ 10, 0)</p>\r
+\r
+<p class="whs3">if n1 == 0: print \r
+ &quot;KO node addition.&quot;</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs4"># add triangle</p>\r
+\r
+<p class="whs3">t1 = aMeshEditor.AddFace([n1, \r
+ 38, 39])</p>\r
+\r
+<p class="whs3">if t1 == 0: print \r
+ &quot;KO triangle addition.&quot;</p>\r
+\r
+<p class="whs3">else: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print \r
+ &quot;New Triangle has been added with ID &quot;, t1 </p>\r
+\r
+<h4>Add Quadrangle</h4>\r
+\r
+<p class="whs3">import SMESH</p>\r
+\r
+<p class="whs3">import SMESH_mechanic</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">mesh = SMESH_mechanic.mesh</p>\r
+\r
+<p class="whs3">aMeshEditor = mesh.GetMeshEditor()</p>\r
+\r
+<p class="whs3">print &quot;&quot;</p>\r
+\r
+<p class="whs2">&nbsp;</p>\r
+\r
+<p class="whs2"># add node</p>\r
+\r
+<p class="whs3">n1 = aMeshEditor.AddNode(50, \r
+ 10, 0)</p>\r
+\r
+<p class="whs3">if n1 == 0: print \r
+ &quot;KO node addition.&quot;</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">n2 = aMeshEditor.AddNode(40, \r
+ 20, 0)</p>\r
+\r
+<p class="whs3">if n2 == 0: print \r
+ &quot;KO node addition.&quot;</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs2"># add quadrangle</p>\r
+\r
+<p class="whs3">q1 = aMeshEditor.AddFace([n2, \r
+ n1, 38, 39])</p>\r
+\r
+<p class="whs3">if q1 == 0: print \r
+ &quot;KO quadrangle addition.&quot;</p>\r
+\r
+<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">else: \r
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print \r
+ &quot;New Quadrangle has been added with ID &quot;, q1</span> </p>\r
+\r
+<h4>Add Tetrahedron</h4>\r
+\r
+<p class="whs3">import SMESH </p>\r
+\r
+<p class="whs3">import SMESH_mechanic</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">mesh = SMESH_mechanic.mesh</p>\r
+\r
+<p class="whs3">aMeshEditor = mesh.GetMeshEditor()</p>\r
+\r
+<p class="whs3">print &quot;&quot;</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs4"># add node</p>\r
+\r
+<p class="whs3">n1 = aMeshEditor.AddNode(50, \r
+ 10, 0)</p>\r
+\r
+<p class="whs3">if n1 == 0: print \r
+ &quot;KO node addition.&quot;</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs4"># add tetrahedron</p>\r
+\r
+<p class="whs3">t1 = aMeshEditor.AddVolume([n1, \r
+ 38, 39, 246])</p>\r
+\r
+<p class="whs3">if t1 == 0: print \r
+ &quot;KO tetrahedron addition.&quot;</p>\r
+\r
+<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">else: \r
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print \r
+ &quot;New Tetrahedron has been added with ID &quot;, t1</span> </p>\r
+\r
+<h4>Add Hexahedron</h4>\r
+\r
+<p class="whs3"><span style="font-family: 'Lucida Console', monospace;">import \r
+ SMESH</span></p>\r
+\r
+<p class="whs3">import SMESH_mechanic</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">mesh = SMESH_mechanic.mesh</p>\r
+\r
+<p class="whs3">aMeshEditor = mesh.GetMeshEditor()</p>\r
+\r
+<p class="whs3">print &quot;&quot;</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs4"># add nodes</p>\r
+\r
+<p class="whs3">nId1 = aMeshEditor.AddNode(50, \r
+ 10, 0)</p>\r
+\r
+<p class="whs3">nId2 = aMeshEditor.AddNode(47, \r
+ 12, 0)</p>\r
+\r
+<p class="whs3">nId3 = aMeshEditor.AddNode(50, \r
+ 10, 10)</p>\r
+\r
+<p class="whs3">nId4 = aMeshEditor.AddNode(47, \r
+ 12, 10)</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">if nId1 == 0 or \r
+ nId2 == 0 or nId3 == 0 or nId4 == 0: print &quot;KO node addition.&quot;</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs4"># add hexahedron</p>\r
+\r
+<p class="whs3">vId = aMeshEditor.AddVolume([nId2, \r
+ nId1, 38, 39, nId4, nId3, 245, 246])</p>\r
+\r
+<p class="whs3">if vId == 0: print \r
+ &quot;KO Hexahedron addition.&quot;</p>\r
+\r
+<p class="whs3">else: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print \r
+ &quot;New Hexahedron has been added with ID &quot;, vId </p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<h4>Add Polygon</h4>\r
+\r
+<p class="whs3"><span style="font-family: 'Lucida Console', monospace;">import \r
+ math</span></p>\r
+\r
+<p class="whs3">import salome</p>\r
+\r
+<p class="whs3">import smesh</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs4"># create an empty mesh \r
+ structure</p>\r
+\r
+<p class="whs3">gen = smesh.smesh</p>\r
+\r
+<p class="whs3">mesh = gen.CreateEmptyMesh()</p>\r
+\r
+<p class="whs3">MeshEditor = mesh.GetMeshEditor()</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs4"># a method to build \r
+ a polygonal mesh element with &lt;nb_vert&gt; angles:</p>\r
+\r
+<p class="whs3">def MakePolygon \r
+ (a_mesh, x0, y0, z0, radius, nb_vert):</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;al \r
+ = 2.0 * math.pi / nb_vert</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;node_ids \r
+ = []</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# \r
+ Create nodes for a polygon</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;for \r
+ ii in range(nb_vert):</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nid \r
+ = MeshEditor.AddNode(x0 + radius * math.cos(ii*al),</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y0 \r
+ + radius * math.sin(ii*al),</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;z0)</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;node_ids.append(nid)</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pass</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# \r
+ Create a polygon</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;return \r
+ MeshEditor.AddPolygonalFace(node_ids)</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs4"># Create three polygons</p>\r
+\r
+<p class="whs3">f1 = MakePolygon(mesh, \r
+ 0, 0, &nbsp;0, \r
+ 30, 13)</p>\r
+\r
+<p class="whs3">f2 = MakePolygon(mesh, \r
+ 0, 0, 10, 21, &nbsp;9)</p>\r
+\r
+<p class="whs3">f3 = MakePolygon(mesh, \r
+ 0, 0, 20, 13, &nbsp;6)</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">salome.sg.updateObjBrowser(1) \r
+ </p>\r
+\r
+<h4>Add Polyhedron</h4>\r
+\r
+<p class="whs3"><span style="font-family: 'Lucida Console', monospace;">import \r
+ salome</span></p>\r
+\r
+<p class="whs3">import math</p>\r
+\r
+<p class="whs3">import smesh</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs4"># create an empty mesh \r
+ structure</p>\r
+\r
+<p class="whs3">gen = smesh.smesh</p>\r
+\r
+<p class="whs3">mesh = gen.CreateEmptyMesh()</p>\r
+\r
+<p class="whs3">MeshEditor = mesh.GetMeshEditor()</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs4"># Create nodes for \r
+ 12-hedron with pentagonal faces</p>\r
+\r
+<p class="whs3">al = 2 * math.pi \r
+ / 5.0</p>\r
+\r
+<p class="whs3">cosal = math.cos(al)</p>\r
+\r
+<p class="whs3">aa = 13</p>\r
+\r
+<p class="whs3">rr = aa / (2.0 * \r
+ math.sin(al/2.0))</p>\r
+\r
+<p class="whs3">dr = 2.0 * rr * \r
+ cosal</p>\r
+\r
+<p class="whs3">r1 = rr + dr</p>\r
+\r
+<p class="whs3">dh = rr * math.sqrt(2.0 \r
+ * (1.0 - cosal * (1.0 + 2.0 * cosal)))</p>\r
+\r
+<p class="whs3">hh = 2.0 * dh - \r
+ dr * (rr*(cosal - 1) + (rr + dr)*(math.cos(al/2) - 1)) / dh</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">dd = [] <span style="font-family: 'Times New Roman', serif;"># \r
+ top</span></p>\r
+\r
+<p class="whs3">cc = [] <span style="font-family: 'Times New Roman', serif;"># \r
+ below top</span></p>\r
+\r
+<p class="whs3">bb = [] <span style="font-family: 'Times New Roman', serif;"># \r
+ above bottom</span></p>\r
+\r
+<p class="whs3">aa = [] <span style="font-family: 'Times New Roman', serif;"># \r
+ bottom</span></p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">for i in range(5):</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;cos_bot \r
+ = math.cos(i*al)</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;sin_bot \r
+ = math.sin(i*al)</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;<span \r
+ style="margin-top: 0pt;\r
+               margin-bottom: 0pt;\r
+               font-family: 'Lucida Console', monospace;">cos_top \r
+ = math.cos(i*al + al/2.0)</span></p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;sin_top \r
+ = math.sin(i*al + al/2.0)</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;nd \r
+ = MeshEditor.AddNode(rr * cos_top, rr * sin_top, hh &nbsp;&nbsp;&nbsp;&nbsp;) \r
+ <span style="font-family: 'Times New Roman', serif;"># top</span></p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;nc \r
+ = MeshEditor.AddNode(r1 * cos_top, r1 * sin_top, hh - dh) <span style="font-family: 'Times New Roman', serif;"># \r
+ below top</span></p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;nb \r
+ = MeshEditor.AddNode(r1 * cos_bot, r1 * sin_bot, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dh) \r
+ <span style="font-family: 'Times New Roman', serif;"># above bottom</span></p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;na \r
+ = MeshEditor.AddNode(rr * cos_bot, rr * sin_bot, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0) \r
+ <span style="font-family: 'Times New Roman', serif;"># bottom</span></p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;dd.append(nd) \r
+ <span style="font-family: 'Times New Roman', serif;"># top</span></p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;cc.append(nc) \r
+ <span style="font-family: 'Times New Roman', serif;"># below top</span></p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;bb.append(nb) \r
+ <span style="font-family: 'Times New Roman', serif;"># above bottom</span></p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;aa.append(na) \r
+ <span style="font-family: 'Times New Roman', serif;"># bottom</span></p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;pass</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs4"># Create a polyhedral \r
+ volume (12-hedron with pentagonal faces)</p>\r
+\r
+<p class="whs3">MeshEditor.AddPolyhedralVolume([dd[0], \r
+ dd[1], dd[2], dd[3], dd[4], &nbsp;<span style="font-family: 'Times New Roman', serif;"># \r
+ top</span></p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dd[0], \r
+ cc[0], bb[1], cc[1], dd[1], &nbsp;# \r
+ -</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dd[1], \r
+ cc[1], bb[2], cc[2], dd[2], &nbsp;# \r
+ -</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dd[2], \r
+ cc[2], bb[3], cc[3], dd[3], &nbsp;<span style="font-family: 'Times New Roman', serif;"># \r
+ - below top</span></p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dd[3], \r
+ cc[3], bb[4], cc[4], dd[4], &nbsp;# \r
+ -</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dd[4], \r
+ cc[4], bb[0], cc[0], dd[0], &nbsp;# \r
+ -</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aa[4], \r
+ bb[4], cc[4], bb[0], aa[0], &nbsp;# \r
+ .</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aa[3], \r
+ bb[3], cc[3], bb[4], aa[4], &nbsp;# \r
+ .</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aa[2], \r
+ bb[2], cc[2], bb[3], aa[3], &nbsp;<span style="font-family: 'Times New Roman', serif;"># \r
+ . above bottom</span></p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aa[1], \r
+ bb[1], cc[1], bb[2], aa[2], &nbsp;# \r
+ .</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aa[0], \r
+ bb[0], cc[0], bb[1], aa[1], &nbsp;# \r
+ .</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aa[0], \r
+ aa[1], aa[2], aa[3], aa[4]], <span style="font-family: 'Times New Roman', serif;"># \r
+ bottom</span></p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5,5,5,5,5,5,5,5,5,5,5,5])</p>\r
+\r
+<p class="whs3">salome.sg.updateObjBrowser(1) \r
+ </p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<h3><a name=bookmark1>Removing Nodes and Elements</a></h3>\r
+\r
+<p class="whs1"><span style="font-weight: bold; color: #ff0000;"><font color=red ><B># \r
+ Attention! This script has been written using the old approach basing \r
+ on direct usage of SMESH idl interface.</B></font></span></p>\r
+\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to remove nodes and elements. </p>\r
+\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
+\r
+<h4 class="whs5">&nbsp;</h4>\r
+\r
+<h4 class="whs5">Removing Nodes</h4>\r
+\r
+<p class="whs2">&nbsp;</p>\r
+\r
+<p class="whs3"><span style="font-family: 'Lucida Console', monospace;">import \r
+ SMESH_mechanic</span></p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">mesh = SMESH_mechanic.mesh</p>\r
+\r
+<p class="whs3">aMeshEditor = mesh.GetMeshEditor()</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs4"># remove nodes #246 \r
+ and #255</p>\r
+\r
+<p class="whs3">res = aMeshEditor.RemoveNodes([246, \r
+ 255])</p>\r
+\r
+<p class="whs3">if res == 1: print \r
+ &quot;Nodes removing is OK!&quot;</p>\r
+\r
+<p class="whs3">else: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print \r
+ &quot;KO nodes removing.&quot; </p>\r
+\r
+<p class="whs2">&nbsp;</p>\r
+\r
+<h4>Removing Elements</h4>\r
+\r
+<p class="whs3"><span style="font-family: 'Lucida Console', monospace;">import \r
+ SMESH_mechanic</span></p>\r
+\r
+<p class="whs3">mesh = SMESH_mechanic.mesh</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">anEditor = mesh.GetMeshEditor()</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs4"># remove three elements: \r
+ #850, #859 and #814</p>\r
+\r
+<p class="whs3">res = anEditor.RemoveElements([850, \r
+ 859, 814])</p>\r
+\r
+<p class="whs3">if res == 1: print \r
+ &quot;Elements removing is OK!&quot;</p>\r
+\r
+<p class="whs3">else: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print \r
+ &quot;KO Elements removing.&quot; &nbsp;</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<h3><a name=bookmark2>Renumbering Nodes and Elements</a></h3>\r
+\r
+<p class="whs1"><span style="font-weight: bold; color: #ff0000;"><font color=red ><B># \r
+ Attention! This script has been written using the old approach basing \r
+ on direct usage of SMESH idl interface.</B></font></span></p>\r
+\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to renumber nodes and elements. </p>\r
+\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
+\r
+<p class="whs6">&nbsp;</p>\r
+\r
+<p class="whs6">import SMESH_mechanic</p>\r
+\r
+<p class="whs6">&nbsp;</p>\r
+\r
+<p class="whs6">mesh = SMESH_mechanic.mesh</p>\r
+\r
+<p class="whs6">anEditor = mesh.GetMeshEditor()</p>\r
+\r
+<p class="whs7">&nbsp;</p>\r
+\r
+<p class="whs7"><span style="font-family: 'Lucida Console', monospace;">anEditor.RenumberNodes()</span> \r
+ </p>\r
+\r
+<h3><a name=bookmark3>Moving Nodes</a></h3>\r
+\r
+<p class="whs1"><span style="font-weight: bold; color: #ff0000;"><font color=red ><B># \r
+ Attention! This script has been written using the old approach basing \r
+ on direct usage of SMESH idl interface.</B></font></span></p>\r
+\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to move nodes. </p>\r
+\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">import SMESH</p>\r
+\r
+<p class="whs3">import SMESH_mechanic</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">mesh = SMESH_mechanic.mesh</p>\r
+\r
+<p class="whs3">aMeshEditor = mesh.GetMeshEditor()</p>\r
+\r
+<p class="whs2">&nbsp;</p>\r
+\r
+<p class="whs2"># move node #38</p>\r
+\r
+<p class="whs3">aMeshEditor.MoveNode(38, \r
+ 20., 10., 0.) </p>\r
+\r
+<p class="whs2">&nbsp;</p>\r
+\r
+<h3><a name=bookmark4>Diagonal Inversion</a></h3>\r
+\r
+<p class="whs1"><span style="font-weight: bold; color: #ff0000;"><font color=red ><B># \r
+ Attention! This script has been written using the old approach basing \r
+ on direct usage of SMESH idl interface.</B></font></span></p>\r
+\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to produce a diagonal inversion. </p>\r
+\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
+\r
+<p class="whs7">&nbsp;</p>\r
+\r
+<p class="whs6">import salome</p>\r
+\r
+<p class="whs6">import smesh</p>\r
+\r
+<p class="whs6">&nbsp;</p>\r
+\r
+<p class="whs8"># create an empty mesh \r
+ structure</p>\r
+\r
+<p class="whs6">gen = smesh.smesh</p>\r
+\r
+<p class="whs6">mesh = gen.CreateEmptyMesh()</p>\r
+\r
+<p class="whs6">aMeshEditor = mesh.GetMeshEditor()</p>\r
+\r
+<p class="whs6">&nbsp;</p>\r
+\r
+<p class="whs8"># create the following \r
+ mesh:</p>\r
+\r
+<p class="whs6"># .----.----.----.</p>\r
+\r
+<p class="whs6"># | &nbsp;&nbsp;/| \r
+ &nbsp;&nbsp;/| \r
+ &nbsp;&nbsp;/|</p>\r
+\r
+<p class="whs6"># | &nbsp;/ \r
+ | &nbsp;/ | &nbsp;/ \r
+ |</p>\r
+\r
+<p class="whs6"># | / &nbsp;| \r
+ / &nbsp;| / &nbsp;|</p>\r
+\r
+<p class="whs6"># |/ &nbsp;&nbsp;|/ \r
+ &nbsp;&nbsp;|/ \r
+ &nbsp;&nbsp;|</p>\r
+\r
+<p class="whs6"># .----.----.----.</p>\r
+\r
+<p class="whs6">&nbsp;</p>\r
+\r
+<p class="whs6">bb = [0, 0, 0, 0]</p>\r
+\r
+<p class="whs6">tt = [0, 0, 0, 0]</p>\r
+\r
+<p class="whs6">ff = [0, 0, 0, 0, \r
+ 0, 0]</p>\r
+\r
+<p class="whs6">&nbsp;</p>\r
+\r
+<p class="whs6">bb[0] = aMeshEditor.AddNode( \r
+ 0., 0., 0.)</p>\r
+\r
+<p class="whs6">bb[1] = aMeshEditor.AddNode(10., \r
+ 0., 0.)</p>\r
+\r
+<p class="whs6">bb[2] = aMeshEditor.AddNode(20., \r
+ 0., 0.)</p>\r
+\r
+<p class="whs6">bb[3] = aMeshEditor.AddNode(30., \r
+ 0., 0.)</p>\r
+\r
+<p class="whs6">&nbsp;</p>\r
+\r
+<p class="whs6">tt[0] = aMeshEditor.AddNode( \r
+ 0., 15., 0.)</p>\r
+\r
+<p class="whs6">tt[1] = aMeshEditor.AddNode(10., \r
+ 15., 0.)</p>\r
+\r
+<p class="whs6">tt[2] = aMeshEditor.AddNode(20., \r
+ 15., 0.)</p>\r
+\r
+<p class="whs6">tt[3] = aMeshEditor.AddNode(30., \r
+ 15., 0.)</p>\r
+\r
+<p class="whs6">&nbsp;</p>\r
+\r
+<p class="whs6">ff[0] = aMeshEditor.AddFace([bb[0], \r
+ bb[1], tt[1]])</p>\r
+\r
+<p class="whs6">ff[1] = aMeshEditor.AddFace([bb[0], \r
+ tt[1], tt[0]])</p>\r
+\r
+<p class="whs6">ff[2] = aMeshEditor.AddFace([bb[1], \r
+ bb[2], tt[2]])</p>\r
+\r
+<p class="whs6">ff[3] = aMeshEditor.AddFace([bb[1], \r
+ tt[2], tt[1]])</p>\r
+\r
+<p class="whs6">ff[4] = aMeshEditor.AddFace([bb[2], \r
+ bb[3], tt[3]])</p>\r
+\r
+<p class="whs6">ff[5] = aMeshEditor.AddFace([bb[2], \r
+ tt[3], tt[2]])</p>\r
+\r
+<p class="whs6">&nbsp;</p>\r
+\r
+<p class="whs8"># inverse the diagonal \r
+ bb[1] - tt[2]</p>\r
+\r
+<p class="whs6">print &quot;\nDiagonal \r
+ inversion ... &quot;,</p>\r
+\r
+<p class="whs6">res = aMeshEditor.InverseDiag(bb[1], \r
+ tt[2])</p>\r
+\r
+<p class="whs6">if not res: print \r
+ &quot;failed!&quot;</p>\r
+\r
+<p class="whs6">else: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print \r
+ &quot;done.&quot;</p>\r
+\r
+<p class="whs7">&nbsp;</p>\r
+\r
+<p class="whs7"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
+ </p>\r
+\r
+<h3><a name=bookmark5>Uniting two Triangles</a></h3>\r
+\r
+<p class="whs1"><span style="font-weight: bold; color: #ff0000;"><font color=red ><B># \r
+ Attention! This script has been written using the old approach basing \r
+ on direct usage of SMESH idl interface.</B></font></span></p>\r
+\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to unite two triangles. </p>\r
+\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
+\r
+<p>&nbsp;</p>\r
+\r
+<p class="whs9">import salome</p>\r
+\r
+<p class="whs9">import smesh</p>\r
+\r
+<p>&nbsp;</p>\r
+\r
+<p># create an empty mesh structure</p>\r
+\r
+<p class="whs9">gen = smesh.smesh</p>\r
+\r
+<p class="whs9">mesh = gen.CreateEmptyMesh()</p>\r
+\r
+<p class="whs9">aMeshEditor = mesh.GetMeshEditor()</p>\r
+\r
+<p>&nbsp;</p>\r
+\r
+<p># create the following mesh:</p>\r
+\r
+<p class="whs9"># .----.----.----.</p>\r
+\r
+<p class="whs9"># | &nbsp;&nbsp;/| \r
+ &nbsp;&nbsp;/| \r
+ &nbsp;&nbsp;/|</p>\r
+\r
+<p class="whs9"># | &nbsp;/ \r
+ | &nbsp;/ | &nbsp;/ \r
+ |</p>\r
+\r
+<p class="whs9"># | / &nbsp;| \r
+ / &nbsp;| / &nbsp;|</p>\r
+\r
+<p class="whs9"># |/ &nbsp;&nbsp;|/ \r
+ &nbsp;&nbsp;|/ \r
+ &nbsp;&nbsp;|</p>\r
+\r
+<p class="whs9"># .----.----.----.</p>\r
+\r
+<p>&nbsp;</p>\r
+\r
+<p class="whs9">bb = [0, 0, 0, 0]</p>\r
+\r
+<p class="whs9">tt = [0, 0, 0, 0]</p>\r
+\r
+<p class="whs9">ff = [0, 0, 0, 0, \r
+ 0, 0]</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">bb[0] = aMeshEditor.AddNode( \r
+ 0., 0., 0.)</p>\r
+\r
+<p class="whs9">bb[1] = aMeshEditor.AddNode(10., \r
+ 0., 0.)</p>\r
+\r
+<p class="whs9">bb[2] = aMeshEditor.AddNode(20., \r
+ 0., 0.)</p>\r
+\r
+<p class="whs9">bb[3] = aMeshEditor.AddNode(30., \r
+ 0., 0.)</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">tt[0] = aMeshEditor.AddNode( \r
+ 0., 15., 0.)</p>\r
+\r
+<p class="whs9">tt[1] = aMeshEditor.AddNode(10., \r
+ 15., 0.)</p>\r
+\r
+<p class="whs9">tt[2] = aMeshEditor.AddNode(20., \r
+ 15., 0.)</p>\r
+\r
+<p class="whs9">tt[3] = aMeshEditor.AddNode(30., \r
+ 15., 0.)</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">ff[0] = aMeshEditor.AddFace([bb[0], \r
+ bb[1], tt[1]])</p>\r
+\r
+<p class="whs9">ff[1] = aMeshEditor.AddFace([bb[0], \r
+ tt[1], tt[0]])</p>\r
+\r
+<p class="whs9">ff[2] = aMeshEditor.AddFace([bb[1], \r
+ bb[2], tt[2]])</p>\r
+\r
+<p class="whs9">ff[3] = aMeshEditor.AddFace([bb[1], \r
+ tt[2], tt[1]])</p>\r
+\r
+<p class="whs9">ff[4] = aMeshEditor.AddFace([bb[2], \r
+ bb[3], tt[3]])</p>\r
+\r
+<p class="whs9">ff[5] = aMeshEditor.AddFace([bb[2], \r
+ tt[3], tt[2]])</p>\r
+\r
+<p>&nbsp;</p>\r
+\r
+<p># delete the diagonal bb[1] - tt[2]</p>\r
+\r
+<p class="whs9">print &quot;\nUnite \r
+ two triangles ... &quot;,</p>\r
+\r
+<p class="whs9">res = aMeshEditor.DeleteDiag(bb[1], \r
+ tt[2])</p>\r
+\r
+<p class="whs9">if not res: print \r
+ &quot;failed!&quot;</p>\r
+\r
+<p class="whs9">else: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print \r
+ &quot;done.&quot;</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
+ </p>\r
+\r
+<h3><a name=bookmark6>Uniting a Set of Triangles</a></h3>\r
+\r
+<p class="whs1"><span style="font-weight: bold; color: #ff0000;"><font color=red ><B># \r
+ Attention! This script has been written using the old approach basing \r
+ on direct usage of SMESH idl interface.</B></font></span></p>\r
+\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to unite a set of triangles. </p>\r
+\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
+\r
+<p class="whs10">&nbsp;</p>\r
+\r
+<p class="whs9">import salome</p>\r
+\r
+<p class="whs9">import smesh</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10"># create an empty mesh \r
+ structure</p>\r
+\r
+<p class="whs9">gen = smesh.smesh</p>\r
+\r
+<p class="whs9">mesh = gen.CreateEmptyMesh()</p>\r
+\r
+<p class="whs9">aMeshEditor = mesh.GetMeshEditor()</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10"># create the following \r
+ mesh:</p>\r
+\r
+<p class="whs9"># .----.----.----.</p>\r
+\r
+<p class="whs9"># | &nbsp;&nbsp;/| \r
+ &nbsp;&nbsp;/| \r
+ &nbsp;&nbsp;/|</p>\r
+\r
+<p class="whs9"># | &nbsp;/ \r
+ | &nbsp;/ | &nbsp;/ \r
+ |</p>\r
+\r
+<p class="whs9"># | / &nbsp;| \r
+ / &nbsp;| / &nbsp;|</p>\r
+\r
+<p class="whs9"># |/ &nbsp;&nbsp;|/ \r
+ &nbsp;&nbsp;|/ \r
+ &nbsp;&nbsp;|</p>\r
+\r
+<p class="whs9"># .----.----.----.</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">bb = [0, 0, 0, 0]</p>\r
+\r
+<p class="whs9">tt = [0, 0, 0, 0]</p>\r
+\r
+<p class="whs9">ff = [0, 0, 0, 0, \r
+ 0, 0]</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">bb[0] = aMeshEditor.AddNode( \r
+ 0., 0., 0.)</p>\r
+\r
+<p class="whs9">bb[1] = aMeshEditor.AddNode(10., \r
+ 0., 0.)</p>\r
+\r
+<p class="whs9">bb[2] = aMeshEditor.AddNode(20., \r
+ 0., 0.)</p>\r
+\r
+<p class="whs9">bb[3] = aMeshEditor.AddNode(30., \r
+ 0., 0.)</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">tt[0] = aMeshEditor.AddNode( \r
+ 0., 15., 0.)</p>\r
+\r
+<p class="whs9">tt[1] = aMeshEditor.AddNode(10., \r
+ 15., 0.)</p>\r
+\r
+<p class="whs9">tt[2] = aMeshEditor.AddNode(20., \r
+ 15., 0.)</p>\r
+\r
+<p class="whs9">tt[3] = aMeshEditor.AddNode(30., \r
+ 15., 0.)</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">ff[0] = aMeshEditor.AddFace([bb[0], \r
+ bb[1], tt[1]])</p>\r
+\r
+<p class="whs9">ff[1] = aMeshEditor.AddFace([bb[0], \r
+ tt[1], tt[0]])</p>\r
+\r
+<p class="whs9">ff[2] = aMeshEditor.AddFace([bb[1], \r
+ bb[2], tt[2]])</p>\r
+\r
+<p class="whs9">ff[3] = aMeshEditor.AddFace([bb[1], \r
+ tt[2], tt[1]])</p>\r
+\r
+<p class="whs9">ff[4] = aMeshEditor.AddFace([bb[2], \r
+ bb[3], tt[3]])</p>\r
+\r
+<p class="whs9">ff[5] = aMeshEditor.AddFace([bb[2], \r
+ tt[3], tt[2]])</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10"># unite a set of triangles</p>\r
+\r
+<p class="whs9">aFilterMgr = smesh.smesh.CreateFilterManager()</p>\r
+\r
+<p class="whs9">aFunctor = aFilterMgr.CreateMinimumAngle()</p>\r
+\r
+<p class="whs9">print &quot;\nUnite \r
+ a set of triangles ... &quot;,</p>\r
+\r
+<p class="whs9">res = aMeshEditor.TriToQuad([ff[2], \r
+ ff[3], ff[4], ff[5]], aFunctor, 60.)</p>\r
+\r
+<p class="whs9">if not res: print \r
+ &quot;failed!&quot;</p>\r
+\r
+<p class="whs9">else: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print \r
+ &quot;done.&quot;</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">salome.sg.updateObjBrowser(1) \r
+ </p>\r
+\r
+<h3><a name=bookmark12>Orientation</a></h3>\r
+\r
+<p class="whs1"><span style="font-weight: bold; color: #ff0000;"><font color=red ><B># \r
+ Attention! This script has been written using the old approach basing \r
+ on direct usage of SMESH idl interface.</B></font></span></p>\r
+\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to change orientation. </p>\r
+\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">import salome</p>\r
+\r
+<p class="whs9">import smesh</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10"># SMESH module</p>\r
+\r
+<p class="whs9">gen = smesh.smesh</p>\r
+\r
+<p class="whs9">mesh = gen.CreateEmptyMesh()</p>\r
+\r
+<p class="whs9">MeshEditor = mesh.GetMeshEditor()</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10"># build five quadrangles:</p>\r
+\r
+<p class="whs9">dx = 10</p>\r
+\r
+<p class="whs9">dy = 20</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">n1 &nbsp;= \r
+ MeshEditor.AddNode(0.0 * dx, 0, 0)</p>\r
+\r
+<p class="whs9">n2 &nbsp;= \r
+ MeshEditor.AddNode(1.0 * dx, 0, 0)</p>\r
+\r
+<p class="whs9">n3 &nbsp;= \r
+ MeshEditor.AddNode(2.0 * dx, 0, 0)</p>\r
+\r
+<p class="whs9">n4 &nbsp;= \r
+ MeshEditor.AddNode(3.0 * dx, 0, 0)</p>\r
+\r
+<p class="whs9">n5 &nbsp;= \r
+ MeshEditor.AddNode(4.0 * dx, 0, 0)</p>\r
+\r
+<p class="whs9">n6 &nbsp;= \r
+ MeshEditor.AddNode(5.0 * dx, 0, 0)</p>\r
+\r
+<p class="whs9">n7 &nbsp;= \r
+ MeshEditor.AddNode(0.0 * dx, dy, 0)</p>\r
+\r
+<p class="whs9">n8 &nbsp;= \r
+ MeshEditor.AddNode(1.0 * dx, dy, 0)</p>\r
+\r
+<p class="whs9">n9 &nbsp;= \r
+ MeshEditor.AddNode(2.0 * dx, dy, 0)</p>\r
+\r
+<p class="whs9">n10 = MeshEditor.AddNode(3.0 \r
+ * dx, dy, 0)</p>\r
+\r
+<p class="whs9">n11 = MeshEditor.AddNode(4.0 \r
+ * dx, dy, 0)</p>\r
+\r
+<p class="whs9">n12 = MeshEditor.AddNode(5.0 \r
+ * dx, dy, 0)</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">f1 = MeshEditor.AddFace([n1, \r
+ n2, n8 , n7 ])</p>\r
+\r
+<p class="whs9">f2 = MeshEditor.AddFace([n2, \r
+ n3, n9 , n8 ])</p>\r
+\r
+<p class="whs9">f3 = MeshEditor.AddFace([n3, \r
+ n4, n10, n9 ])</p>\r
+\r
+<p class="whs9">f4 = MeshEditor.AddFace([n4, \r
+ n5, n11, n10])</p>\r
+\r
+<p class="whs9">f5 = MeshEditor.AddFace([n5, \r
+ n6, n12, n11])</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10"># Change the orientation \r
+ of the second and the fourth faces.</p>\r
+\r
+<p class="whs9">MeshEditor.Reorient([2, \r
+ 4])</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">salome.sg.updateObjBrowser(1) \r
+ </p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<h3><a name=bookmark7>Cutting Quadrangles</a></h3>\r
+\r
+<p class="whs1"><span style="font-weight: bold; color: #ff0000;"><font color=red ><B># \r
+ Attention! This script has been written using the old approach basing \r
+ on direct usage of SMESH idl interface.</B></font></span></p>\r
+\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to cut quadrangles. </p>\r
+\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">import SMESH</p>\r
+\r
+<p class="whs9">import SMESH_mechanic</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">smesh = SMESH_mechanic.smesh</p>\r
+\r
+<p class="whs9">mesh &nbsp;= \r
+ SMESH_mechanic.mesh</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10"># cut two quadrangles: \r
+ 405 and 406</p>\r
+\r
+<p class="whs9">aFilterMgr = smesh.CreateFilterManager()</p>\r
+\r
+<p class="whs9">aFunctor = aFilterMgr.CreateMinimumAngle()</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">aMeshEditor = mesh.GetMeshEditor()</p>\r
+\r
+<p class="whs9">aMeshEditor.QuadToTri([405, \r
+ 406], aFunctor) </p>\r
+\r
+<p class="whs10">&nbsp;</p>\r
+\r
+<h3><a name=bookmark8>Smoothing</a></h3>\r
+\r
+<p class="whs1"><span style="font-weight: bold; color: #ff0000;"><font color=red ><B># \r
+ Attention! This script has been written using the old approach basing \r
+ on direct usage of SMESH idl interface.</B></font></span></p>\r
+\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to perform smoothing. </p>\r
+\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
+\r
+<p class="whs1">&nbsp;</p>\r
+\r
+<p class="whs9">import salome</p>\r
+\r
+<p class="whs9">import geompy</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">import SMESH</p>\r
+\r
+<p class="whs9">import SMESH_mechanic</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">mesh = SMESH_mechanic.mesh</p>\r
+\r
+<p class="whs9">aMeshEditor = mesh.GetMeshEditor()</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10"># select the top face</p>\r
+\r
+<p class="whs9">faces = geompy.SubShapeAllSorted(SMESH_mechanic.shape_mesh, \r
+ geompy.ShapeType[&quot;FACE&quot;])</p>\r
+\r
+<p class="whs9">face = faces[3]</p>\r
+\r
+<p class="whs9">geompy.addToStudyInFather(SMESH_mechanic.shape_mesh, \r
+ face, &quot;face planar with hole&quot;)</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10"># create a group of faces \r
+ to be smoothed</p>\r
+\r
+<p class="whs9">GroupSmooth = mesh.CreateGroupFromGEOM(SMESH.FACE, \r
+ &quot;Group of faces (smooth)&quot;, face)</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10"># perform smoothing</p>\r
+\r
+<p class="whs10"># boolean SmoothObject(Object, \r
+ IDsOfFixedNodes, MaxNbOfIterations, MaxAspectRatio, Method)</p>\r
+\r
+<p class="whs9">res = aMeshEditor.SmoothObject(GroupSmooth, \r
+ [], 20, 2., SMESH.SMESH_MeshEditor.CENTROIDAL_SMOOTH)</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">print &quot;\nSmoothing \r
+ ... &quot;,</p>\r
+\r
+<p class="whs9">if not res: print \r
+ &quot;failed!&quot;</p>\r
+\r
+<p class="whs9">else: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print \r
+ &quot;done.&quot;</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">salome.sg.updateObjBrowser(1) \r
+ </p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<h3><a name=bookmark9>Extrusion</a></h3>\r
+\r
+<p class="whs1"><span style="font-weight: bold; color: #ff0000;"><font color=red ><B># \r
+ Attention! This script has been written using the old approach basing \r
+ on direct usage of SMESH idl interface.</B></font></span></p>\r
+\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to perform extrusion. </p>\r
+\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">import salome</p>\r
+\r
+<p class="whs9">import geompy</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">import SMESH</p>\r
+\r
+<p class="whs9">import SMESH_mechanic</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">mesh = SMESH_mechanic.mesh</p>\r
+\r
+<p class="whs9">aMeshEditor = mesh.GetMeshEditor()</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10"># select the top face</p>\r
+\r
+<p class="whs9">faces = geompy.SubShapeAllSorted(SMESH_mechanic.shape_mesh, \r
+ geompy.ShapeType[&quot;FACE&quot;])</p>\r
+\r
+<p class="whs9">face = faces[7]</p>\r
+\r
+<p class="whs9">geompy.addToStudyInFather(SMESH_mechanic.shape_mesh, \r
+ face, &quot;face circular top&quot;)</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10"># create a vector for \r
+ extrusion</p>\r
+\r
+<p class="whs9">point = SMESH.PointStruct(0., \r
+ 0., 5.)</p>\r
+\r
+<p class="whs9">vector = SMESH.DirStruct(point)</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10"># create a group to be \r
+ extruded</p>\r
+\r
+<p class="whs9">GroupTri = mesh.CreateGroupFromGEOM(SMESH.FACE, \r
+ &quot;Group of faces (extrusion)&quot;, face)</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10"># perform extrusion of \r
+ the group</p>\r
+\r
+<p class="whs9">aMeshEditor.ExtrusionSweepObject(GroupTri, \r
+ vector, 5)</p>\r
+\r
+<p class="whs10">&nbsp;</p>\r
+\r
+<p class="whs10"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
+ </p>\r
+\r
+<h3><a name=bookmark10>Extrusion along a Path</a></h3>\r
+\r
+<p class="whs1"><span style="font-weight: bold; color: #ff0000;"><font color=red ><B># \r
+ Attention! This script has been written using the old approach basing \r
+ on direct usage of SMESH idl interface.</B></font></span></p>\r
+\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to perform extrusion along a path. </p>\r
+\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">import math</p>\r
+\r
+<p class="whs9">import salome</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10"># Geometry</p>\r
+\r
+<p class="whs9">import geompy</p>\r
+\r
+<p class="whs10">&nbsp;</p>\r
+\r
+<p class="whs10"># 1. Create points</p>\r
+\r
+<p class="whs9">points = [[0, 0], \r
+ [50, 30], [50, 110], [0, 150], [-80, 150], [-130, 70], [-130, -20]]</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">iv = 1</p>\r
+\r
+<p class="whs9">vertices = []</p>\r
+\r
+<p class="whs9">for point in points:</p>\r
+\r
+<p class="whs11">vert \r
+ = geompy.MakeVertex(point[0], point[1], 0)</p>\r
+\r
+<p class="whs11">geompy.addToStudy(vert, \r
+ &quot;Vertex_&quot; + `iv`)</p>\r
+\r
+<p class="whs11">vertices.append(vert)</p>\r
+\r
+<p class="whs11">iv \r
+ += 1</p>\r
+\r
+<p class="whs11">pass</p>\r
+\r
+<p class="whs10">&nbsp;</p>\r
+\r
+<p class="whs10"># 2. Create edges and \r
+ wires</p>\r
+\r
+<p class="whs9">Edge_straight = geompy.MakeEdge(vertices[0], \r
+ vertices[4])</p>\r
+\r
+<p class="whs9">Edge_bezierrr = geompy.MakeBezier(vertices)</p>\r
+\r
+<p class="whs9">Wire_polyline = geompy.MakePolyline(vertices)</p>\r
+\r
+<p class="whs9">Edge_Circle &nbsp;&nbsp;= \r
+ geompy.MakeCircleThreePnt(vertices[0], vertices[1], vertices[2])</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">geompy.addToStudy(Edge_straight, \r
+ &quot;Edge_straight&quot;)</p>\r
+\r
+<p class="whs9">geompy.addToStudy(Edge_bezierrr, \r
+ &quot;Edge_bezierrr&quot;)</p>\r
+\r
+<p class="whs9">geompy.addToStudy(Wire_polyline, \r
+ &quot;Wire_polyline&quot;)</p>\r
+\r
+<p class="whs9">geompy.addToStudy(Edge_Circle \r
+ &nbsp;, &quot;Edge_Circle&quot;)</p>\r
+\r
+<p class="whs10">&nbsp;</p>\r
+\r
+<p class="whs10"># 3. Explode wire on \r
+ edges, as they will be used for mesh extrusion</p>\r
+\r
+<p class="whs9">Wire_polyline_edges \r
+ = geompy.SubShapeAll(Wire_polyline, geompy.ShapeType[&quot;EDGE&quot;])</p>\r
+\r
+<p class="whs9">for ii in range(len(Wire_polyline_edges)):</p>\r
+\r
+<p class="whs11">geompy.addToStudyInFather(Wire_polyline, \r
+ Wire_polyline_edges[ii], &quot;Edge_&quot; + `ii + 1`)</p>\r
+\r
+<p class="whs11">pass</p>\r
+\r
+<p class="whs12">&nbsp;</p>\r
+\r
+<p class="whs10"># Mesh</p>\r
+\r
+<p class="whs9">import smesh</p>\r
+\r
+<p class="whs9">import SMESH</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">gen = smesh.smesh</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">smeshgui = salome.ImportComponentGUI(&quot;SMESH&quot;)</p>\r
+\r
+<p class="whs9">smeshgui.Init(salome.myStudyId)</p>\r
+\r
+<p class="whs10">&nbsp;</p>\r
+\r
+<p class="whs10"># 1D algorithm and three \r
+ 1D hypotheses</p>\r
+\r
+<p class="whs9">Wire_discretisation \r
+ = gen.CreateHypothesis('Regular_1D', 'libStdMeshersEngine.so')</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">Nb_Segments_3 = gen.CreateHypothesis('NumberOfSegments', \r
+ 'libStdMeshersEngine.so')</p>\r
+\r
+<p class="whs9">Nb_Segments_7 = gen.CreateHypothesis('NumberOfSegments', \r
+ 'libStdMeshersEngine.so')</p>\r
+\r
+<p class="whs9">Nb_Segments_8 = gen.CreateHypothesis('NumberOfSegments', \r
+ 'libStdMeshersEngine.so')</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">Nb_Segments_3.SetNumberOfSegments(3)</p>\r
+\r
+<p class="whs9">Nb_Segments_7.SetNumberOfSegments(7)</p>\r
+\r
+<p class="whs9">Nb_Segments_8.SetNumberOfSegments(8)</p>\r
+\r
+<p class="whs10">&nbsp;</p>\r
+\r
+<p class="whs10"># Mesh given shape with \r
+ given 1d hypothesis</p>\r
+\r
+<p class="whs9">def Mesh1D(shape1d, \r
+ hyp1d, name):</p>\r
+\r
+<p class="whs11">mesh1d_tool \r
+ = smesh.Mesh(shape1d)</p>\r
+\r
+<p class="whs11">mesh1d \r
+ = mesh1d_tool.GetMesh()</p>\r
+\r
+<p class="whs11">status \r
+ = mesh1d.AddHypothesis(shape1d, hyp1d)</p>\r
+\r
+<p class="whs11">status \r
+ = mesh1d.AddHypothesis(shape1d, Wire_discretisation)</p>\r
+\r
+<p class="whs11">isDone \r
+ = mesh1d_tool.Compute()</p>\r
+\r
+<p class="whs11">if \r
+ not isDone: print 'Mesh ', name, ': computation failed'</p>\r
+\r
+<p class="whs11">return \r
+ mesh1d</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10"># Create a mesh with \r
+ six nodes, seven edges and two quadrangle faces</p>\r
+\r
+<p class="whs9">def MakeQuadMesh2(mesh_name):</p>\r
+\r
+<p class="whs11">quad_1 \r
+ = gen.CreateEmptyMesh()</p>\r
+\r
+<p class="whs11">smeshgui.SetName(salome.ObjectToID(quad_1), \r
+ mesh_name)</p>\r
+\r
+<p class="whs11">editor_1 \r
+ = quad_1.GetMeshEditor()</p>\r
+\r
+<p class="whs12">&nbsp;</p>\r
+\r
+<p class="whs12"># six nodes</p>\r
+\r
+<p class="whs11">n1 \r
+ = editor_1.AddNode(0, 20, 10)</p>\r
+\r
+<p class="whs11">n2 \r
+ = editor_1.AddNode(0, 40, 10)</p>\r
+\r
+<p class="whs11">n3 \r
+ = editor_1.AddNode(0, 40, 30)</p>\r
+\r
+<p class="whs11">n4 \r
+ = editor_1.AddNode(0, 20, 30)</p>\r
+\r
+<p class="whs11">n5 \r
+ = editor_1.AddNode(0, &nbsp;0, \r
+ 30)</p>\r
+\r
+<p class="whs11">n6 \r
+ = editor_1.AddNode(0, &nbsp;0, \r
+ 10)</p>\r
+\r
+<p class="whs12">&nbsp;</p>\r
+\r
+<p class="whs12"># seven edges</p>\r
+\r
+<p class="whs11">editor_1.AddEdge([n1, \r
+ n2]) # 1</p>\r
+\r
+<p class="whs11">editor_1.AddEdge([n2, \r
+ n3]) # 2</p>\r
+\r
+<p class="whs11">editor_1.AddEdge([n3, \r
+ n4]) # 3</p>\r
+\r
+<p class="whs11">editor_1.AddEdge([n4, \r
+ n1]) # 4</p>\r
+\r
+<p class="whs11">editor_1.AddEdge([n4, \r
+ n5]) # 5</p>\r
+\r
+<p class="whs11">editor_1.AddEdge([n5, \r
+ n6]) # 6</p>\r
+\r
+<p class="whs11">editor_1.AddEdge([n6, \r
+ n1]) # 7</p>\r
+\r
+<p class="whs12">&nbsp;</p>\r
+\r
+<p class="whs12"># two quadrangle faces</p>\r
+\r
+<p class="whs11">editor_1.AddFace([n1, \r
+ n2, n3, n4]) # 8</p>\r
+\r
+<p class="whs11">editor_1.AddFace([n1, \r
+ n4, n5, n6]) # 9</p>\r
+\r
+<p class="whs11">return \r
+ [quad_1, editor_1, [1,2,3,4,5,6,7], [8,9]]</p>\r
+\r
+<p class="whs10">&nbsp;</p>\r
+\r
+<p class="whs10"># Path meshes</p>\r
+\r
+<p class="whs9">Edge_straight_mesh \r
+ = Mesh1D(Edge_straight, Nb_Segments_7, &quot;Edge_straight&quot;)</p>\r
+\r
+<p class="whs9">Edge_bezierrr_mesh \r
+ = Mesh1D(Edge_bezierrr, Nb_Segments_7, &quot;Edge_bezierrr&quot;)</p>\r
+\r
+<p class="whs9">Wire_polyline_mesh \r
+ = Mesh1D(Wire_polyline, Nb_Segments_3, &quot;Wire_polyline&quot;)</p>\r
+\r
+<p class="whs9">Edge_Circle_mesh &nbsp;&nbsp;= \r
+ Mesh1D(Edge_Circle &nbsp;, \r
+ Nb_Segments_8, &quot;Edge_Circle&quot;)</p>\r
+\r
+<p class="whs10">&nbsp;</p>\r
+\r
+<p class="whs10"># Initial meshes (to \r
+ be extruded)</p>\r
+\r
+<p class="whs9">[quad_1, editor_1, \r
+ ee_1, ff_1] = MakeQuadMesh2(&quot;quad_1&quot;)</p>\r
+\r
+<p class="whs9">[quad_2, editor_2, \r
+ ee_2, ff_2] = MakeQuadMesh2(&quot;quad_2&quot;)</p>\r
+\r
+<p class="whs9">[quad_3, editor_3, \r
+ ee_3, ff_3] = MakeQuadMesh2(&quot;quad_3&quot;)</p>\r
+\r
+<p class="whs9">[quad_4, editor_4, \r
+ ee_4, ff_4] = MakeQuadMesh2(&quot;quad_4&quot;)</p>\r
+\r
+<p class="whs9">[quad_5, editor_5, \r
+ ee_5, ff_5] = MakeQuadMesh2(&quot;quad_5&quot;)</p>\r
+\r
+<p class="whs9">[quad_6, editor_6, \r
+ ee_6, ff_6] = MakeQuadMesh2(&quot;quad_6&quot;)</p>\r
+\r
+<p class="whs9">[quad_7, editor_7, \r
+ ee_7, ff_7] = MakeQuadMesh2(&quot;quad_7&quot;)</p>\r
+\r
+<p class="whs10">&nbsp;</p>\r
+\r
+<p class="whs10"># ExtrusionAlongPath</p>\r
+\r
+<p class="whs10"># IDsOfElements, PathMesh, \r
+ PathShape, NodeStart,</p>\r
+\r
+<p class="whs10"># HasAngles, Angles, \r
+ HasRefPoint, RefPoint</p>\r
+\r
+<p class="whs10">&nbsp;</p>\r
+\r
+<p class="whs9">refPoint = SMESH.PointStruct(0, \r
+ 0, 0)</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">a10 = 10.0*math.pi/180.0</p>\r
+\r
+<p class="whs9">a45 = 45.0*math.pi/180.0</p>\r
+\r
+<p class="whs10">&nbsp;</p>\r
+\r
+<p class="whs10"># 1. Extrusion of two \r
+ mesh edges along a straight path</p>\r
+\r
+<p class="whs9">error = editor_1.ExtrusionAlongPath([1,2], \r
+ Edge_straight_mesh, Edge_straight, 1,</p>\r
+\r
+<p class="whs13">&nbsp;&nbsp;&nbsp;&nbsp;0, \r
+ [], 0, refPoint)</p>\r
+\r
+<p class="whs10">&nbsp;</p>\r
+\r
+<p class="whs10"># 2. Extrusion of one \r
+ mesh edge along a curved path</p>\r
+\r
+<p class="whs9">error = editor_2.ExtrusionAlongPath([2], \r
+ Edge_bezierrr_mesh, Edge_bezierrr, 1,</p>\r
+\r
+<p class="whs13">&nbsp;&nbsp;&nbsp;&nbsp;0, \r
+ [], 0, refPoint)</p>\r
+\r
+<p class="whs10">&nbsp;</p>\r
+\r
+<p class="whs10"># 3. Extrusion of one \r
+ mesh edge along a curved path with usage of angles </p>\r
+\r
+<p class="whs9">error = editor_3.ExtrusionAlongPath([2], \r
+ Edge_bezierrr_mesh, Edge_bezierrr, 1,</p>\r
+\r
+<p class="whs13">&nbsp;&nbsp;&nbsp;&nbsp;1, \r
+ [a45, a45, a45, 0, -a45, -a45, -a45], 0, refPoint)</p>\r
+\r
+<p class="whs10">&nbsp;</p>\r
+\r
+<p class="whs10"># 4. Extrusion of one \r
+ mesh edge along the path, which is a part of a meshed wire</p>\r
+\r
+<p class="whs9">error = editor_4.ExtrusionAlongPath([4], \r
+ Wire_polyline_mesh, Wire_polyline_edges[0], 1,</p>\r
+\r
+<p class="whs13">&nbsp;&nbsp;&nbsp;&nbsp;1, \r
+ [a10, a10, a10], 0, refPoint)</p>\r
+\r
+<p class="whs10">&nbsp;</p>\r
+\r
+<p class="whs10"># 5. Extrusion of two \r
+ mesh faces along the path, which is a part of a meshed wire</p>\r
+\r
+<p class="whs9">error = editor_5.ExtrusionAlongPath(ff_5 \r
+ , Wire_polyline_mesh, Wire_polyline_edges[2], 4,</p>\r
+\r
+<p class="whs13">&nbsp;&nbsp;&nbsp;&nbsp;0, \r
+ [], 0, refPoint)</p>\r
+\r
+<p class="whs10">&nbsp;</p>\r
+\r
+<p class="whs10"># 6. Extrusion of two \r
+ mesh faces along a closed path</p>\r
+\r
+<p class="whs9">error = editor_6.ExtrusionAlongPath(ff_6 \r
+ , Edge_Circle_mesh, Edge_Circle, 1,</p>\r
+\r
+<p class="whs13">&nbsp;&nbsp;&nbsp;&nbsp;0, \r
+ [], 0, refPoint)</p>\r
+\r
+<p class="whs10">&nbsp;</p>\r
+\r
+<p class="whs10"># 7. Extrusion of two \r
+ mesh faces along a closed path with usage of angles </p>\r
+\r
+<p class="whs9">error = editor_7.ExtrusionAlongPath(ff_7, \r
+ Edge_Circle_mesh, Edge_Circle, 1,</p>\r
+\r
+<p class="whs13">&nbsp;&nbsp;&nbsp;&nbsp;1, \r
+ [a45, -a45, a45, -a45, a45, -a45, a45, -a45], 0, refPoint</p>\r
+\r
+<p class="whs13">&nbsp;</p>\r
+\r
+<p class="whs14">salome.sg.updateObjBrowser(1)</p>\r
+\r
+<h3><a name=bookmark11>Revolution</a></h3>\r
+\r
+<p class="whs1"><span style="font-weight: bold; color: #ff0000;"><font color=red ><B># \r
+ Attention! This script has been written using the old approach basing \r
+ on direct usage of SMESH idl interface.</B></font></span></p>\r
+\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to perform revolution. </p>\r
+\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
+\r
+<p class="whs1">&nbsp;</p>\r
+\r
+<p class="whs9">import math</p>\r
+\r
+<p class="whs9">import SMESH</p>\r
+\r
+<p class="whs9">import SMESH_mechanic</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">mesh = SMESH_mechanic.mesh</p>\r
+\r
+<p class="whs9">aMeshEditor = mesh.GetMeshEditor()</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10"># create a group of faces \r
+ to be revolved</p>\r
+\r
+<p class="whs9">FacesRotate = [492, \r
+ 493, 502, 503]</p>\r
+\r
+<p class="whs9">GroupRotate = mesh.CreateGroup(SMESH.FACE,&quot;Group \r
+ of faces (rotate)&quot;)</p>\r
+\r
+<p class="whs9">GroupRotate.Add(FacesRotate)</p>\r
+\r
+<p class="whs10">&nbsp;</p>\r
+\r
+<p class="whs10"># define revolution angle \r
+ and axis</p>\r
+\r
+<p class="whs9">angle45 = 45 * math.pi \r
+ / 180</p>\r
+\r
+<p class="whs9">axisXYZ = SMESH.AxisStruct(-38.3128, \r
+ -73.3658, -23.321, -13.3402, -13.3265, 6.66632)</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10"># perform revolution \r
+ of an object</p>\r
+\r
+<p class="whs9">aMeshEditor.RotationSweepObject(GroupRotate, \r
+ axisXYZ, angle45, 4, 1e-5) </p>\r
+\r
+<p class="whs10">&nbsp;</p>\r
+\r
+<h3><a name=bookmark13>Pattern Mapping</a></h3>\r
+\r
+<p class="whs1"><span style="font-weight: bold; color: #ff0000;"><font color=red ><B># \r
+ Attention! This script has been written using the old approach basing \r
+ on direct usage of SMESH idl interface.</B></font></span></p>\r
+\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to perform pattern mapping. </p>\r
+\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">import geompy</p>\r
+\r
+<p class="whs9">import smesh</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10"># define the geometry</p>\r
+\r
+<p class="whs9">Box_1 = geompy.MakeBoxDXDYDZ(200., \r
+ 200., 200.)</p>\r
+\r
+<p class="whs9">geompy.addToStudy(Box_1, \r
+ &quot;Box_1&quot;)</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">faces = geompy.SubShapeAll(Box_1, \r
+ geompy.ShapeType[&quot;FACE&quot;])</p>\r
+\r
+<p class="whs9">Face_1 = faces[0]</p>\r
+\r
+<p class="whs9">Face_2 = faces[1]</p>\r
+\r
+<p class="whs9">geompy.addToStudyInFather(Box_1, \r
+ Face_1, &quot;Face_1&quot;)</p>\r
+\r
+<p class="whs9">geompy.addToStudyInFather(Box_1, \r
+ Face_2, &quot;Face_2&quot;)</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10"># build a quadrangle \r
+ mesh 3x3 on Face_1</p>\r
+\r
+<p class="whs9">Mesh_1 = smesh.Mesh(Face_1)</p>\r
+\r
+<p class="whs9">algo1D = Mesh_1.Segment()</p>\r
+\r
+<p class="whs9">algo1D.NumberOfSegments(3)</p>\r
+\r
+<p class="whs9">Mesh_1.Quadrangle()</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs9">isDone = Mesh_1.Compute()</p>\r
+\r
+<p class="whs9">if not isDone: print \r
+ 'Mesh Mesh_1 : computation failed'</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10"># build a triangle mesh \r
+ on Face_2</p>\r
+\r
+<p class="whs9">Mesh_2 = smesh.Mesh(Face_2)</p>\r
+\r
+<p class="whs9">algo1D = Mesh_2.Segment()</p>\r
+\r
+<p class="whs9">algo1D.NumberOfSegments(1)</p>\r
+\r
+<p class="whs9">algo2D = Mesh_2.Triangle()</p>\r
+\r
+<p class="whs9">algo2D.MaxElementArea(240)</p>\r
+\r
+<p class="whs9">isDone = Mesh_2.Compute()</p>\r
+\r
+<p class="whs9">if not isDone: print \r
+ 'Mesh Mesh_2 : computation failed'</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10"># create a pattern</p>\r
+\r
+<p class="whs9">pattern = smesh.smesh.GetPattern()</p>\r
+\r
+<p class="whs9">isDone = pattern.LoadFromFace(Mesh_2.GetMesh(), \r
+ Face_2, 0)</p>\r
+\r
+<p class="whs9">if (isDone != 1): \r
+ print 'LoadFromFace :', pattern.GetErrorCode()</p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10"># apply the pattern to \r
+ a face of the first mesh</p>\r
+\r
+<p class="whs9">pattern.ApplyToMeshFaces(Mesh_1.GetMesh(), \r
+ [17], 0, 0)</p>\r
+\r
+<p class="whs9">isDone = pattern.MakeMesh(Mesh_1.GetMesh(), \r
+ 0, 0)</p>\r
+\r
+<p class="whs9">if (isDone != 1): \r
+ print 'MakeMesh :', pattern.GetErrorCode() </p>\r
+\r
+<p class="whs9">&nbsp;</p>\r
+\r
+<p class="whs10">&nbsp;</p>\r
+\r
+<script type="text/javascript" language="javascript1.2">\r
+<!--\r
+if (window.writeIntopicBar)\r
+       writeIntopicBar(0);\r
+//-->\r
+</script>\r
+</body>\r
+</html>\r
index 2af9421..bc5dd72 100755 (executable)
@@ -7,9 +7,10 @@
 <meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
 <meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com"><style type="text/css">\r
 <!--\r
-p.whs1 { margin-top:0pt; margin-bottom:0pt; font-family:'Lucida Console' , monospace; }\r
+p.whs1 { margin-top:0pt; margin-bottom:0pt; font-weight:bold; color:#ff0000; }\r
 p.whs2 { margin-top:0pt; margin-bottom:0pt; }\r
-p.whs3 { margin-top:0pt; margin-bottom:0pt; font-family:'Times New Roman' , serif; }\r
+p.whs3 { margin-top:0pt; margin-bottom:0pt; font-family:'Lucida Console' , monospace; }\r
+p.whs4 { margin-top:0pt; margin-bottom:0pt; font-family:'Times New Roman' , serif; }\r
 -->\r
 </style><script type="text/javascript" language="JavaScript">\r
 <!--\r
@@ -19,6 +20,7 @@ if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))
   strNSS += "p.whs1 {margin-top:1pt;margin-bottom:1pt; }";\r
   strNSS += "p.whs2 {margin-top:1pt;margin-bottom:1pt; }";\r
   strNSS += "p.whs3 {margin-top:1pt;margin-bottom:1pt; }";\r
+  strNSS += "p.whs4 {margin-top:1pt;margin-bottom:1pt; }";\r
   strNSS +="</style>";\r
   document.write(strNSS);\r
 }\r
@@ -87,1578 +89,1576 @@ if (window.writeIntopicBar)
 \r
 <h3><a name=bookmark>Free Borders</a></h3>\r
 \r
-<p>Attention! This script was written using old approach, based on direct usage of SMESH idl interface. To be updated for version 3.2.1 to use <b>smesh</b> package.\r
-<br>&nbsp;\r
+<p class="whs1"># Attention! This script has been written \r
+ using the old approach basing on direct usage of SMESH idl interface.</p>\r
 \r
-<p class="whs1">import salome</p>\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to check free borders. </p>\r
 \r
-<p class="whs1">import geompy</p>\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
 \r
-<p class="whs1">import SMESH</p>\r
+<p class="whs2">&nbsp;</p>\r
+\r
+<p class="whs3">import salome</p>\r
 \r
-<p class="whs1">import StdMeshers</p>\r
+<p class="whs3">import geompy</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">smesh = salome.lcc.FindOrLoadComponent(&quot;FactoryServer&quot;, \r
- &quot;SMESH&quot;)</p>\r
+<p class="whs3">import smesh</p>\r
 \r
-<p class="whs1">smesh.SetCurrentStudy(salome.myStudy)</p>\r
+<p class="whs3">import SMESH</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2"># create a box without \r
- one plane</p>\r
+<p class="whs2"># create open shell: a \r
box without one plane</p>\r
 \r
-<p class="whs1">box = geompy.MakeBox(0., \r
+<p class="whs3">box = geompy.MakeBox(0., \r
  0., 0., 20., 20., 15.)</p>\r
 \r
-<p class="whs1">subShapeList = geompy.SubShapeAll(box, \r
+<p class="whs3">FaceList = geompy.SubShapeAll(box, \r
  geompy.ShapeType[&quot;FACE&quot;])</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">FaceList &nbsp;= \r
- []</p>\r
-\r
-<p class="whs1">for i in range( \r
- 5 ):</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;FaceList.append( \r
- subShapeList[ i ] )</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">aComp = geompy.MakeCompound( \r
- FaceList )</p>\r
-\r
-<p class="whs1">aBox = geompy.Sew( \r
- aComp, 1. )</p>\r
+<p class="whs3">FaceList.remove(FaceList[5])</p>\r
 \r
-<p class="whs1">idbox = geompy.addToStudy( \r
- aBox, &quot;box&quot; )</p>\r
+<p class="whs3">box = geompy.MakeShell(FaceList)</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;</p>\r
+<p class="whs3">idbox = geompy.addToStudy(box, \r
+ &quot;box&quot;)</p>\r
 \r
-<p class="whs1">aBox &nbsp;= \r
- salome.IDToObject( idbox )</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs2"># create a mesh</p>\r
 \r
-<p class="whs1">hyp1 = smesh.CreateHypothesis(&quot;NumberOfSegments&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
-\r
-<p class="whs1">hyp1.SetNumberOfSegments(5)</p>\r
-\r
-<p class="whs1">hyp2 = smesh.CreateHypothesis(&quot;MaxElementArea&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs3">tria = smesh.Mesh(box, \r
+ &quot;Mesh_free_borders&quot;)</p>\r
 \r
-<p class="whs1">hyp2.SetMaxElementArea(20)</p>\r
+<p class="whs3">algo = tria.Segment()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">algo.NumberOfSegments(5)</p>\r
 \r
-<p class="whs1">algo1 = smesh.CreateHypothesis(&quot;Regular_1D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs3">algo = tria.Triangle()</p>\r
 \r
-<p class="whs1">algo2 = smesh.CreateHypothesis(&quot;MEFISTO_2D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs3">algo.MaxElementArea(20.)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">tria.Compute()</p>\r
 \r
-<p class="whs1">mesh = smesh.CreateMesh(aBox)</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(aBox,hyp1)</p>\r
+<p class="whs3">mesh = tria.GetMesh()</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(aBox,hyp2)</p>\r
+<p class="whs3">gen = smesh.smesh</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(aBox,algo1)</p>\r
-\r
-<p class="whs1">mesh.AddHypothesis(aBox,algo2)</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs2"># criterion : free borders</p>\r
 \r
-<p class="whs1">smesh.Compute(mesh,aBox)</p>\r
+<p class="whs3">aFilterMgr = gen.CreateFilterManager()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aPredicate = aFilterMgr.CreateFreeBorders()</p>\r
 \r
-<p class="whs1">smeshgui = salome.ImportComponentGUI(&quot;SMESH&quot;)</p>\r
+<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
 \r
-<p class="whs1">smeshgui.Init(salome.myStudyId);</p>\r
+<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
 \r
-<p class="whs1">smeshgui.SetName( \r
- salome.ObjectToID( mesh ), &quot;Mesh_freebord&quot; );</p>\r
+<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2"># criterion : free borders</p>\r
+<p class="whs2"># print the result</p>\r
 \r
-<p class="whs1">aFilterMgr = smesh.CreateFilterManager()</p>\r
+<p class="whs3">print &quot;Criterion: \r
+ Free borders Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs1">aPredicate = aFilterMgr.CreateFreeBorders()</p>\r
+<p class="whs3">j = 1</p>\r
 \r
-<p class="whs1">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs3">for i in range(len(anIds)):</p>\r
 \r
-<p class="whs1">aFilter.SetPredicate( \r
aPredicate )</p>\r
+<p class="whs3">&nbsp;&nbsp;if \r
j &gt; 20: j = 1; print &quot;&quot;</p>\r
 \r
-<p class="whs1">anIds = aFilter.GetElementsId( \r
mesh )</p>\r
+<p class="whs3">&nbsp;&nbsp;print \r
anIds[i],</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">&nbsp;&nbsp;j \r
+ = j + 1</p>\r
 \r
-<p class="whs2"># print the result</p>\r
+<p class="whs3">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs1">print &quot;Criterion: \r
- Free borders Nb = &quot;, len( anIds )</p>\r
-\r
-<p class="whs1">for i in range( \r
- len( anIds ) ):</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;print \r
- anIds[ i ]</p>\r
+<p class="whs3">print &quot;&quot;</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs2"># create a group</p>\r
 \r
-<p class="whs1">aGroup = mesh.CreateGroup( \r
- SMESH.EDGE, &quot;Free borders&quot; )</p>\r
+<p class="whs3">aGroup = mesh.CreateGroup(SMESH.EDGE, \r
+ &quot;Free borders&quot;)</p>\r
+\r
+<p class="whs3">aGroup.Add(anIds)</p>\r
 \r
-<p class="whs1">aGroup.Add( anIds \r
- )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
 <p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
  </p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
-\r
 <h3><a name=bookmark1>Borders at Multiconnection</a></h3>\r
 \r
-<p>Attention! This script was written using old approach, based on direct usage of SMESH idl interface. To be updated for version 3.2.1 to use <b>smesh</b> package.\r
-<br>&nbsp;\r
+<p class="whs1"><span style="font-weight: bold; color: #ff0000;"><font color=red ><B># \r
+ Attention! This script has been written using the old approach basing \r
+ on direct usage of SMESH idl interface.</B></font></span></p>\r
 \r
-<p class="whs1">import salome</p>\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to check borders at multiconnection. </p>\r
 \r
-<p class="whs1">import geompy</p>\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
 \r
-<p class="whs1">import SMESH</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">import StdMeshers</p>\r
+<p class="whs3">import salome</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">import geompy</p>\r
 \r
-<p class="whs1">smesh = salome.lcc.FindOrLoadComponent(&quot;FactoryServer&quot;, \r
- &quot;SMESH&quot;)</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">smesh.SetCurrentStudy(salome.myStudy)</p>\r
+<p class="whs3">import smesh</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">import SMESH</p>\r
 \r
-<p class="whs2"># create a box without \r
- one plane</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs4"># create open shell: \r
+ a box without one plane</p>\r
 \r
-<p class="whs1">box = geompy.MakeBox(0., \r
+<p class="whs3">box = geompy.MakeBox(0., \r
  0., 0., 20., 20., 15.)</p>\r
 \r
-<p class="whs1">subShapeList = geompy.SubShapeAll(box, \r
+<p class="whs3">FaceList = geompy.SubShapeAll(box, \r
  geompy.ShapeType[&quot;FACE&quot;])</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">FaceList &nbsp;= \r
- []</p>\r
-\r
-<p class="whs1">for i in range( \r
- 5 ):</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;FaceList.append( \r
- subShapeList[ i ] )</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">FaceList.remove(FaceList[5])</p>\r
 \r
-<p class="whs1">aComp = geompy.MakeCompound( \r
- FaceList )</p>\r
+<p class="whs3">box = geompy.MakeShell(FaceList)</p>\r
 \r
-<p class="whs1">aBox = geompy.Sew( \r
aComp, 1. )</p>\r
+<p class="whs3">idbox = geompy.addToStudy(box, \r
&quot;box&quot;)</p>\r
 \r
-<p class="whs1">idbox = geompy.addToStudy( \r
- aBox, &quot;box&quot; )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;</p>\r
+<p class="whs4"># create a mesh</p>\r
 \r
-<p class="whs1">aBox &nbsp;= \r
salome.IDToObject( idbox )</p>\r
+<p class="whs3">tria = smesh.Mesh(box, \r
&quot;Mesh_borders_at_multi-connections&quot;)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">algo = tria.Segment()</p>\r
 \r
-<p class="whs2"># create a mesh</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs1">hyp1 = smesh.CreateHypothesis(&quot;NumberOfSegments&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs3">algo.NumberOfSegments(5)</p>\r
 \r
-<p class="whs1">hyp1.SetNumberOfSegments(5)</p>\r
+<p class="whs3">algo = tria.Triangle()</p>\r
 \r
-<p class="whs1">hyp2 = smesh.CreateHypothesis(&quot;MaxElementArea&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs3">algo.MaxElementArea(20.)</p>\r
 \r
-<p class="whs1">hyp2.SetMaxElementArea(20)</p>\r
+<p class="whs3">tria.Compute()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">mesh = tria.GetMesh()</p>\r
 \r
-<p class="whs1">algo1 = smesh.CreateHypothesis(&quot;Regular_1D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs3">gen = smesh.smesh</p>\r
 \r
-<p class="whs1">algo2 = smesh.CreateHypothesis(&quot;MEFISTO_2D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs4"># Criterion : Borders \r
+ at multi-connection</p>\r
 \r
-<p class="whs1">mesh = smesh.CreateMesh(aBox)</p>\r
+<p class="whs3">nb_conn = 2</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(aBox,hyp1)</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(aBox,hyp2)</p>\r
+<p class="whs3">aFilterMgr = gen.CreateFilterManager()</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(aBox,algo1)</p>\r
+<p class="whs3">aFunctor = aFilterMgr.CreateMultiConnection()</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(aBox,algo2)</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aPredicate = aFilterMgr.CreateEqualTo()</p>\r
 \r
-<p class="whs1">smesh.Compute(mesh,aBox)</p>\r
+<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aPredicate.SetMargin(nb_conn)</p>\r
 \r
-<p class="whs1">smeshgui = salome.ImportComponentGUI(&quot;SMESH&quot;)</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">smeshgui.Init(salome.myStudyId);</p>\r
+<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
 \r
-<p class="whs1">smeshgui.SetName( \r
- salome.ObjectToID( mesh ), &quot;Mesh_borders_at_multi-connections&quot; \r
- );</p>\r
+<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2"># Criterion : Borders at \r
- multi-connection</p>\r
+<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
 \r
-<p class="whs1">aFilterMgr = smesh.CreateFilterManager()</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aFunctor = aFilterMgr.CreateMultiConnection()</p>\r
+<p class="whs4"># print the result</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">print &quot;Criterion: \r
+ Borders at multi-connections Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs1">aPredicate = aFilterMgr.CreateEqualTo()</p>\r
+<p class="whs3">j = 1</p>\r
 \r
-<p class="whs1">aPredicate.SetNumFunctor( \r
- aFunctor )</p>\r
+<p class="whs3">for i in range(len(anIds)):</p>\r
 \r
-<p class="whs1">aPredicate.SetMargin( \r
2 )</p>\r
+<p class="whs3">&nbsp;&nbsp;if \r
j &gt; 20: j = 1; print &quot;&quot;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;&nbsp;print \r
+ anIds[i],</p>\r
 \r
-<p class="whs1">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs3">&nbsp;&nbsp;j \r
+ = j + 1</p>\r
 \r
-<p class="whs1">aFilter.SetPredicate( \r
- aPredicate )</p>\r
+<p class="whs3">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">print &quot;&quot;</p>\r
 \r
-<p class="whs1">anIds = aFilter.GetElementsId( \r
- mesh )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs4"># create a group</p>\r
 \r
-<p class="whs2"># print the result</p>\r
-\r
-<p class="whs1">print &quot;Criterion: \r
- Borders at multi-connections Nb = &quot;, len( anIds )</p>\r
+<p class="whs3">aGroup = mesh.CreateGroup(SMESH.EDGE, \r
+ &quot;Borders at multi-connections&quot;)</p>\r
 \r
-<p class="whs1">for i in range( \r
- len( anIds ) ):</p>\r
+<p class="whs3">aGroup.Add(anIds)</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;print \r
- anIds[ i ]</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs2"># create a group</p>\r
-\r
-<p class="whs1">aGroup = mesh.CreateGroup( \r
- SMESH.EDGE, &quot;Borders at multi-connections&quot; )</p>\r
-\r
-<p class="whs1">aGroup.Add( anIds \r
- )</p>\r
-\r
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
+<p class="whs3">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
-\r
 <h3><a name=bookmark2>Length 1D</a></h3>\r
 \r
-<p>Attention! This script was written using old approach, based on direct usage of SMESH idl interface. To be updated for version 3.2.1 to use <b>smesh</b> package.\r
-<br>&nbsp;\r
+<p class="whs1"><span style="font-weight: bold; color: #ff0000;"><font color=red ><B># \r
+ Attention! This script has been written using the old approach basing \r
+ on direct usage of SMESH idl interface.</B></font></span></p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to check length 1D. </p>\r
 \r
-<p class="whs1">import salome</p>\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
 \r
-<p class="whs1">import geompy</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs1">import SMESH</p>\r
+<p class="whs3">import salome</p>\r
 \r
-<p class="whs1">import StdMeshers</p>\r
+<p class="whs3">import geompy</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">smesh = salome.lcc.FindOrLoadComponent(&quot;FactoryServer&quot;, \r
- &quot;SMESH&quot;)</p>\r
+<p class="whs3">import smesh</p>\r
 \r
-<p class="whs1">smesh.SetCurrentStudy(salome.myStudy)</p>\r
+<p class="whs3">import SMESH</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2"># create a box without \r
- one plane</p>\r
+<p class="whs2"># create open shell: a \r
box without one plane</p>\r
 \r
-<p class="whs1">box = geompy.MakeBox(0., \r
+<p class="whs3">box = geompy.MakeBox(0., \r
  0., 0., 20., 20., 15.)</p>\r
 \r
-<p class="whs1">subShapeList = geompy.SubShapeAll(box, \r
+<p class="whs3">FaceList = geompy.SubShapeAll(box, \r
  geompy.ShapeType[&quot;FACE&quot;])</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">FaceList &nbsp;= \r
- []</p>\r
-\r
-<p class="whs1">for i in range( \r
- 5 ):</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;FaceList.append( \r
- subShapeList[ i ] )</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">FaceList.remove(FaceList[5])</p>\r
 \r
-<p class="whs1">aComp = geompy.MakeCompound( \r
- FaceList )</p>\r
+<p class="whs3">box = geompy.MakeShell(FaceList)</p>\r
 \r
-<p class="whs1">aBox = geompy.Sew( \r
aComp, 1. )</p>\r
+<p class="whs3">idbox = geompy.addToStudy(box, \r
&quot;box&quot;)</p>\r
 \r
-<p class="whs1">idbox = geompy.addToStudy( \r
- aBox, &quot;box&quot; )</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;</p>\r
-\r
-<p class="whs1">aBox &nbsp;= \r
- salome.IDToObject( idbox )</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs2"># create a mesh</p>\r
 \r
-<p class="whs1">hyp1 = smesh.CreateHypothesis(&quot;NumberOfSegments&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
-\r
-<p class="whs1">hyp1.SetNumberOfSegments(5)</p>\r
-\r
-<p class="whs1">hyp2 = smesh.CreateHypothesis(&quot;MaxElementArea&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
-\r
-<p class="whs1">hyp2.SetMaxElementArea(20)</p>\r
+<p class="whs3">tria = smesh.Mesh(box, \r
+ &quot;Mesh_Length_1D&quot;)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">algo = tria.Segment()</p>\r
 \r
-<p class="whs1">algo1 = smesh.CreateHypothesis(&quot;Regular_1D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs3">algo.NumberOfSegments(5)</p>\r
 \r
-<p class="whs1">algo2 = smesh.CreateHypothesis(&quot;MEFISTO_2D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs3">algo = tria.Triangle()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">algo.MaxElementArea(20.)</p>\r
 \r
-<p class="whs1">mesh = smesh.CreateMesh(aBox)</p>\r
+<p class="whs3">tria.Compute()</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(aBox,hyp1)</p>\r
+<p class="whs3">mesh = tria.GetMesh()</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(aBox,hyp2)</p>\r
+<p class="whs3">gen = smesh.smesh</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(aBox,algo1)</p>\r
-\r
-<p class="whs1">mesh.AddHypothesis(aBox,algo2)</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs2"># Criterion : Length &gt; \r
+ 3.</p>\r
 \r
-<p class="whs1">smesh.Compute(mesh,aBox)</p>\r
+<p class="whs3">length_margin = \r
+ 3.</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">smeshgui = salome.ImportComponentGUI(&quot;SMESH&quot;)</p>\r
+<p class="whs3">aFilterMgr = gen.CreateFilterManager()</p>\r
 \r
-<p class="whs1">smeshgui.Init(salome.myStudyId);</p>\r
+<p class="whs3">aFunctor = aFilterMgr.CreateLength()</p>\r
 \r
-<p class="whs1">smeshgui.SetName( \r
- salome.ObjectToID( mesh ), &quot;Mesh&quot; );</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
 \r
-<p class="whs2"># Criterion : Length &gt; \r
- 3</p>\r
+<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
 \r
-<p class="whs1">aFilterMgr = smesh.CreateFilterManager()</p>\r
+<p class="whs3">aPredicate.SetMargin(length_margin)</p>\r
 \r
-<p class="whs1">aFunctor = aFilterMgr.CreateLength()</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
 \r
-<p class="whs1">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
+<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
 \r
-<p class="whs1">aPredicate.SetNumFunctor( \r
- aFunctor )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aPredicate.SetMargin( \r
- 3 )</p>\r
+<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs1">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs2"># print the result</p>\r
 \r
-<p class="whs1">aFilter.SetPredicate( \r
aPredicate )</p>\r
+<p class="whs3">print &quot;Criterion: \r
Edges length &gt; &quot;, length_margin, &quot; Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">j = 1</p>\r
 \r
-<p class="whs1">anIds = aFilter.GetElementsId( \r
- mesh )</p>\r
+<p class="whs3">for i in range(len(anIds)):</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">&nbsp;&nbsp;if \r
+ j &gt; 20: j = 1; print &quot;&quot;</p>\r
 \r
-<p class="whs2"># print the result</p>\r
+<p class="whs3">&nbsp;&nbsp;print \r
+ anIds[i],</p>\r
 \r
-<p class="whs1">print &quot;Criterion: \r
Edges length &gt; 3 Nb = &quot;, len( anIds )</p>\r
+<p class="whs3">&nbsp;&nbsp;j \r
= j + 1</p>\r
 \r
-<p class="whs1">for i in range( \r
- len( anIds ) ):</p>\r
+<p class="whs3">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;print \r
- anIds[ i ]</p>\r
+<p class="whs3">print &quot;&quot;</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs2"># create a group</p>\r
 \r
-<p class="whs1">aGroup = mesh.CreateGroup( \r
SMESH.EDGE, &quot;Edges with legth &gt; 3&quot; )</p>\r
+<p class="whs3">aGroup = mesh.CreateGroup(SMESH.EDGE, \r
&quot;Edges with length &gt; &quot; + `length_margin`)</p>\r
 \r
-<p class="whs1">aGroup.Add( anIds \r
- )</p>\r
+<p class="whs3">aGroup.Add(anIds)</p>\r
 \r
-<p class="whs1">salome.sg.updateObjBrowser(1)</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
+ </p>\r
 \r
 <h3><a name=bookmark3>Free Edges</a></h3>\r
 \r
-<p>Attention! This script was written using old approach, based on direct usage of SMESH idl interface. To be updated for version 3.2.1 to use <b>smesh</b> package.\r
-<br>&nbsp;\r
+<p class="whs1"><span style="font-weight: bold; color: #ff0000;"><font color=red ><B># \r
+ Attention! This script has been written using the old approach basing \r
+ on direct usage of SMESH idl interface.</B></font></span></p>\r
+\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to check free edges. </p>\r
 \r
-<p class="whs1">import SMESH</p>\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
 \r
-<p class="whs1">import SMESH_mechanic</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">import SMESH</p>\r
 \r
-<p class="whs1">smesh &nbsp;= \r
+<p class="whs3">import SMESH_mechanic</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">smesh &nbsp;= \r
  SMESH_mechanic.smesh</p>\r
 \r
-<p class="whs1">mesh &nbsp;&nbsp;= \r
+<p class="whs3">mesh &nbsp;&nbsp;= \r
  SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs1">salome = SMESH_mechanic.salome</p>\r
+<p class="whs3">salome = SMESH_mechanic.salome</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aFilterMgr = smesh.CreateFilterManager()</p>\r
+<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2"># Criterion : AREA &gt; \r
30</p>\r
+<p class="whs4"># Remove some elements \r
to obtain free edges</p>\r
 \r
-<p class="whs1">aFunctor = aFilterMgr.CreateArea()</p>\r
+<p class="whs4"># Criterion : AREA \r
+ &gt; 95.</p>\r
 \r
-<p class="whs1">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
+<p class="whs3">area_margin = 95.</p>\r
 \r
-<p class="whs1">aPredicate.SetNumFunctor( \r
- aFunctor )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aPredicate.SetMargin( \r
- 95 )</p>\r
+<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
 \r
-<p class="whs1">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
 \r
-<p class="whs1">aFilter.SetPredicate( \r
- aPredicate )</p>\r
+<p class="whs3">aPredicate.SetMargin(area_margin)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">anIds = aFilter.GetElementsId( \r
- mesh )</p>\r
+<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
 \r
-<p class="whs1">anEditor = mesh.GetMeshEditor()</p>\r
+<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
 \r
-<p class="whs1">anEditor.RemoveElements(anIds)</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
 \r
-<p class="whs2"># Criterion : Free Edges</p>\r
+<p class="whs3">anEditor = mesh.GetMeshEditor()</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">anEditor.RemoveElements(anIds)</p>\r
 \r
-<p class="whs1">aPredicate = aFilterMgr.CreateFreeEdges()</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aPredicate.SetMesh( \r
mesh )</p>\r
+<p class="whs4"># Criterion : Free \r
Edges</p>\r
 \r
-<p class="whs1">aBorders = aPredicate.GetBorders()</p>\r
+<p class="whs3">aPredicate = aFilterMgr.CreateFreeEdges()</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">aPredicate.SetMesh(mesh)</p>\r
 \r
-<p class="whs2"># create groups</p>\r
+<p class="whs3">aBorders = aPredicate.GetBorders()</p>\r
 \r
-<p class="whs1">aGroupF = mesh.CreateGroup( \r
- SMESH.FACE, &quot;Faces with free edges&quot; )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aGroupN = mesh.CreateGroup( \r
- SMESH.NODE, &quot;Nodes on free edges&quot; )</p>\r
+<p class="whs4"># create groups</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">aGroupF = mesh.CreateGroup(SMESH.FACE, \r
+ &quot;Faces with free edges&quot;)</p>\r
 \r
-<p class="whs2"># fill groups with elements\r
corresponding to the criterion</p>\r
+<p class="whs3">aGroupN = mesh.CreateGroup(SMESH.NODE\r
&quot;Nodes on free edges&quot;)</p>\r
 \r
-<p class="whs1">print &quot;&quot;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">print &quot;Criterion: \r
Free edges Nb = &quot;, len( aBorders )</p>\r
+<p class="whs4"># fill groups with \r
elements, corresponding to the criterion</p>\r
 \r
-<p class="whs1">for i in range( \r
- len( aBorders ) ):</p>\r
+<p class="whs3">print &quot;&quot;</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;aBorder \r
= aBorders[ i ]</p>\r
+<p class="whs3">print &quot;Criterion: \r
Free edges Nb = &quot;, len(aBorders)</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;print \r
+<p class="whs3">for i in range(len(aBorders)):</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;aBorder \r
+ = aBorders[i]</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;print \r
  &quot;Face # &quot;, aBorder.myElemId, &quot; : Edge between nodes (&quot;,</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;print \r
+<p class="whs3">&nbsp;&nbsp;print \r
  aBorder.myPnt1, &quot;, &quot;, aBorder.myPnt2, &quot;)&quot;</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;aGroupF.Add( \r
- [aBorder.myElemId] )</p>\r
+<p class="whs3">&nbsp;&nbsp;<span \r
+ style="margin-top: 0pt;\r
+               margin-bottom: 0pt;\r
+               font-family: 'Lucida Console', monospace;">aGroupF.Add([aBorder.myElemId])</span></p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;aGroupN.Add( \r
[aBorder.myPnt1, aBorder.myPnt2] )</p>\r
+<p class="whs3">&nbsp;&nbsp;aGroupN.Add([aBorder.myPnt1, \r
aBorder.myPnt2])</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
+<p class="whs3">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
 <h3><a name=bookmark4>Length 2D</a></h3>\r
 \r
-<p>Attention! This script was written using old approach, based on direct usage of SMESH idl interface. To be updated for version 3.2.1 to use <b>smesh</b> package.\r
-<br>&nbsp;\r
+<p class="whs1"><span><font color=red ><B><span style="font-weight: bold; color: #ff0000;"><font color=red ><B># \r
+ Attention! This script has been written using the old approach basing \r
+ on direct usage of SMESH idl interface.</B></font></span></B></font></span></p>\r
 \r
-<p class="whs1">import salome</p>\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to check length 2D. </p>\r
 \r
-<p class="whs1">import geompy</p>\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
 \r
-<p class="whs1">import SMESH</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">import StdMeshers</p>\r
+<p class="whs3">import salome</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">import geompy</p>\r
 \r
-<p class="whs1">smesh = salome.lcc.FindOrLoadComponent(&quot;FactoryServer&quot;, \r
- &quot;SMESH&quot;)</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">smesh.SetCurrentStudy(salome.myStudy)</p>\r
+<p class="whs3">import smesh</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">import SMESH</p>\r
 \r
-<p class="whs2"># create a box without \r
- one plane</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs4"># create open shell: \r
+ a box without one plane</p>\r
 \r
-<p class="whs1">box = geompy.MakeBox(0., \r
+<p class="whs3">box = geompy.MakeBox(0., \r
  0., 0., 20., 20., 15.)</p>\r
 \r
-<p class="whs1">subShapeList = geompy.SubShapeAll(box, \r
+<p class="whs3">FaceList = geompy.SubShapeAll(box, \r
  geompy.ShapeType[&quot;FACE&quot;])</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">FaceList.remove(FaceList[5])</p>\r
 \r
-<p class="whs1">FaceList &nbsp;= \r
- []</p>\r
+<p class="whs3">box = geompy.MakeShell(FaceList)</p>\r
 \r
-<p class="whs1">for i in range( \r
5 ):</p>\r
+<p class="whs3">idbox = geompy.addToStudy(box, \r
&quot;box&quot;)</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;FaceList.append( \r
- subShapeList[ i ] )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs4"># create a mesh</p>\r
 \r
-<p class="whs1">aComp = geompy.MakeCompound( \r
FaceList )</p>\r
+<p class="whs3">tria = smesh.Mesh(box, \r
&quot;Mesh_Length_2D&quot;)</p>\r
 \r
-<p class="whs1">aBox = geompy.Sew( \r
- aComp, 1. )</p>\r
+<p class="whs3">algo = tria.Segment()</p>\r
 \r
-<p class="whs1">idbox = geompy.addToStudy( \r
- aBox, &quot;box&quot; )</p>\r
+<p class="whs3">algo.NumberOfSegments(5)</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;</p>\r
+<p class="whs3">algo = tria.Triangle()</p>\r
 \r
-<p class="whs1">aBox &nbsp;= \r
- salome.IDToObject( idbox )</p>\r
+<p class="whs3">algo.MaxElementArea(20.)</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">tria.Compute()</p>\r
 \r
-<p class="whs2"># create a mesh</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">mesh = tria.GetMesh()</p>\r
 \r
-<p class="whs1">hyp1 = smesh.CreateHypothesis(&quot;NumberOfSegments&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs3">gen = smesh.smesh</p>\r
 \r
-<p class="whs1">hyp1.SetNumberOfSegments(5)</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">hyp2 = smesh.CreateHypothesis(&quot;MaxElementArea&quot;, \r
&quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs4"># Criterion : Length \r
2D &gt; 5.7</p>\r
 \r
-<p class="whs1">hyp2.SetMaxElementArea(20)</p>\r
+<p class="whs3">length_margin = \r
+ 5.7</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">algo1 = smesh.CreateHypothesis(&quot;Regular_1D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs3">aFilterMgr = gen.CreateFilterManager()</p>\r
 \r
-<p class="whs1">algo2 = smesh.CreateHypothesis(&quot;MEFISTO_2D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs3">aFunctor = aFilterMgr.CreateLength2D()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">mesh = smesh.CreateMesh(aBox)</p>\r
+<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(aBox,hyp1)</p>\r
+<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(aBox,hyp2)</p>\r
+<p class="whs3">aPredicate.SetMargin(length_margin)</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(aBox,algo1)</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(aBox,algo2)</p>\r
+<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
 \r
-<p class="whs1">smesh.Compute(mesh,aBox)</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
 \r
-<p class="whs1">smeshgui = salome.ImportComponentGUI(&quot;SMESH&quot;)</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">smeshgui.Init(salome.myStudyId);</p>\r
+<p class="whs4"># print the result</p>\r
 \r
-<p class="whs1">smeshgui.SetName( \r
salome.ObjectToID( mesh ), &quot;Mesh&quot; );</p>\r
+<p class="whs3">print &quot;Criterion: \r
Edges length 2D &gt; &quot;, length_margin, &quot; Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">j = 1</p>\r
 \r
-<p class="whs2"># Criterion : Length 2D \r
- &gt; 5</p>\r
+<p class="whs3">for i in range(len(anIds)):</p>\r
 \r
-<p class="whs1">aFilterMgr = smesh.CreateFilterManager()</p>\r
+<p class="whs3">&nbsp;&nbsp;if \r
+ j &gt; 20: j = 1; print &quot;&quot;</p>\r
 \r
-<p class="whs1">aFunctor = aFilterMgr.CreateLength2D()</p>\r
+<p class="whs3">&nbsp;&nbsp;print \r
+ anIds[i],</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;&nbsp;j \r
+ = j + 1</p>\r
 \r
-<p class="whs1">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
+<p class="whs3">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs1">aPredicate.SetNumFunctor( \r
- aFunctor )</p>\r
+<p class="whs3">print &quot;&quot;</p>\r
 \r
-<p class="whs1">aPredicate.SetMargin( \r
- 5 )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs4"># create a group</p>\r
 \r
-<p class="whs1">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs3">aGroup = mesh.CreateGroup(SMESH.FACE, \r
+ &quot;Faces with length 2D &gt; &quot; + `length_margin`)</p>\r
 \r
-<p class="whs1">aFilter.SetPredicate( \r
- aPredicate )</p>\r
+<p class="whs3">aGroup.Add(anIds)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">anIds = aFilter.GetElementsId( \r
mesh )</p>\r
+<p class="whs3">salome.sg.updateObjBrowser(1) \r
+ </p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2"># print the result</p>\r
+<h3><a name=bookmark5>Borders at Multiconnection 2D</a></h3>\r
 \r
-<p class="whs1">print &quot;Criterion: \r
- Edges length 2D &gt; 5 Nb = &quot;, len( anIds )</p>\r
+<p class="whs1"><span style="font-weight: bold; color: #ff0000;"><font color=red ><B><span \r
+ style="font-weight: bold; color: #ff0000;"><font color=red ><B># Attention! This script has \r
+ been written using the old approach basing on direct usage of SMESH idl \r
+ interface.</B></font></span></B></font></span></p>\r
 \r
-<p class="whs1">for i in range( \r
len( anIds ) ):</p>\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
methods to check borders at multiconnection 2D. </p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;print \r
anIds[ i ]</p>\r
+<p class="whs1"># In the next SALOME version the scripts will \r
be updated to use only the commands from smesh package.</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2"># create a group</p>\r
+<p class="whs3">import salome</p>\r
 \r
-<p class="whs1">aGroup = mesh.CreateGroup( \r
- SMESH.FACE, &quot;Edges with legth 2D &gt; 5&quot; )</p>\r
+<p class="whs3">import geompy</p>\r
 \r
-<p class="whs1">aGroup.Add( anIds \r
- )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
- &nbsp;</p>\r
+<p class="whs3">import smesh</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">import SMESH</p>\r
 \r
-<h3><a name=bookmark5>Borders at Multiconnection 2D</a></h3>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p>Attention! This script was written using old approach, based on direct usage of SMESH idl interface. To be updated for version 3.2.1 to use <b>smesh</b> package.\r
-<br>&nbsp;\r
+<p class="whs4"># create a compound \r
+ of two glued boxes</p>\r
 \r
-<p class="whs1">import salome</p>\r
+<p class="whs3">box1 = geompy.MakeBox(0., \r
+ 0., 0., 20., 20., 15.)</p>\r
 \r
-<p class="whs1">import geompy</p>\r
+<p class="whs3">box2 = geompy.MakeTranslation(box1, \r
+ 0., 20., 0)</p>\r
 \r
-<p class="whs1">import SMESH</p>\r
+<p class="whs3">comp = geompy.MakeCompound([box1, \r
+ box2])</p>\r
 \r
-<p class="whs1">import StdMeshers</p>\r
+<p class="whs3">box = geompy.MakeGlueFaces(comp, \r
+ 0.000001)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">idbox = geompy.addToStudy(box, \r
+ &quot;box&quot;)</p>\r
 \r
-<p class="whs1">smesh = salome.lcc.FindOrLoadComponent(&quot;FactoryServer&quot;, \r
- &quot;SMESH&quot;)</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">smesh.SetCurrentStudy(salome.myStudy)</p>\r
+<p class="whs4"># create a mesh</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">tria = smesh.Mesh(box, \r
+ &quot;Box compound : 2D triangle mesh&quot;)</p>\r
 \r
-<p class="whs2"># create a box without \r
- one plane</p>\r
+<p class="whs3">algo = tria.Segment()</p>\r
 \r
-<p class="whs1">box = geompy.MakeBox(0., \r
- 0., 0., 20., 20., 15.)</p>\r
+<p class="whs3">algo.NumberOfSegments(5)</p>\r
 \r
-<p class="whs1">subShapeList = geompy.SubShapeAll(box, \r
- geompy.ShapeType[&quot;FACE&quot;])</p>\r
+<p class="whs3">algo = tria.Triangle()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">algo.MaxElementArea(20.)</p>\r
 \r
-<p class="whs1">FaceList &nbsp;= \r
- []</p>\r
+<p class="whs3">tria.Compute()</p>\r
 \r
-<p class="whs1">for i in range( \r
- 5 ):</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;FaceList.append( \r
- subShapeList[ i ] )</p>\r
+<p class="whs3">mesh = tria.GetMesh()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">gen = smesh.smesh</p>\r
 \r
-<p class="whs1">aComp = geompy.MakeCompound( \r
- FaceList )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aBox = geompy.Sew( \r
aComp, 1. )</p>\r
+<p class="whs4"># Criterion : MULTI-CONNECTION \r
2D = 3</p>\r
 \r
-<p class="whs1">idbox = geompy.addToStudy( \r
- aBox, &quot;box&quot; )</p>\r
+<p class="whs3">nb_conn = 3</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aBox &nbsp;= \r
- salome.IDToObject( idbox )</p>\r
+<p class="whs3">aFilterMgr = gen.CreateFilterManager()</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">aFunctor = aFilterMgr.CreateMultiConnection2D()</p>\r
 \r
-<p class="whs2"># create a mesh</p>\r
-\r
-<p class="whs1">hyp1 = smesh.CreateHypothesis(&quot;NumberOfSegments&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">hyp1.SetNumberOfSegments(5)</p>\r
+<p class="whs3">aPredicate = aFilterMgr.CreateEqualTo()</p>\r
 \r
-<p class="whs1">hyp2 = smesh.CreateHypothesis(&quot;MaxElementArea&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
 \r
-<p class="whs1">hyp2.SetMaxElementArea(20)</p>\r
+<p class="whs3">aPredicate.SetMargin(nb_conn)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">algo1 = smesh.CreateHypothesis(&quot;Regular_1D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
 \r
-<p class="whs1">algo2 = smesh.CreateHypothesis(&quot;MEFISTO_2D&quot;, \r
- &quot;libStdMeshersEngine.so&quot;)</p>\r
+<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">mesh = smesh.CreateMesh(aBox)</p>\r
+<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(aBox,hyp1)</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(aBox,hyp2)</p>\r
+<p class="whs4"># print the result</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(aBox,algo1)</p>\r
+<p class="whs3">print &quot;Criterion: \r
+ Borders at multi-connection 2D = &quot;, nb_conn, &quot; Nb = &quot;, \r
+ len(anIds)</p>\r
 \r
-<p class="whs1">mesh.AddHypothesis(aBox,algo2)</p>\r
+<p class="whs3">j = 1</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">for i in range(len(anIds)):</p>\r
 \r
-<p class="whs1">smesh.Compute(mesh,aBox)</p>\r
+<p class="whs3">&nbsp;&nbsp;if \r
+ j &gt; 20: j = 1; print &quot;&quot;</p>\r
 \r
-<p class="whs1">smeshgui = salome.ImportComponentGUI(&quot;SMESH&quot;)</p>\r
+<p class="whs3">&nbsp;&nbsp;print \r
+ anIds[i],</p>\r
 \r
-<p class="whs1">smeshgui.Init(salome.myStudyId);</p>\r
+<p class="whs3">&nbsp;&nbsp;j \r
+ = j + 1</p>\r
 \r
-<p class="whs1">smeshgui.SetName( \r
- salome.ObjectToID( mesh ), &quot;Mesh&quot; );</p>\r
+<p class="whs3">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">print &quot;&quot;</p>\r
 \r
-<p class="whs2"># Criterion : MULTI-CONNECTION \r
- 2D = 2</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aFilterMgr = smesh.CreateFilterManager()</p>\r
+<p class="whs4"># create a group</p>\r
 \r
-<p class="whs1">aFunctor = aFilterMgr.CreateMultiConnection2D()</p>\r
+<p class="whs3">aGroup = mesh.CreateGroup(SMESH.FACE, \r
+ &quot;Borders at multi-connection 2D = &quot; + `nb_conn`)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aGroup.Add(anIds)</p>\r
 \r
-<p class="whs1">aPredicate = aFilterMgr.CreateEqualTo()</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aPredicate.SetNumFunctor( \r
aFunctor )</p>\r
+<p class="whs3">salome.sg.updateObjBrowser(1) \r
+ </p>\r
 \r
-<p class="whs1">aPredicate.SetMargin( \r
- 2 )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<h3><a name=bookmark6>Area</a></h3>\r
 \r
-<p class="whs1">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs1"><span style="font-weight: bold; color: #ff0000;"><font color=red ><B><span \r
+ style="font-weight: bold; color: #ff0000;"><font color=red ><B># Attention! This script has \r
+ been written using the old approach basing on direct usage of SMESH idl \r
+ interface.</B></font></span></B></font></span></p>\r
 \r
-<p class="whs1">aFilter.SetPredicate( \r
aPredicate )</p>\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
methods to check area. </p>\r
 \r
-<p class="whs1">anIds = aFilter.GetElementsId( \r
mesh )</p>\r
+<p class="whs1"># In the next SALOME version the scripts will \r
be updated to use only the commands from smesh package.</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2"># print the result</p>\r
+<p class="whs3">import SMESH</p>\r
+\r
+<p class="whs3">import SMESH_mechanic</p>\r
 \r
-<p class="whs1">print &quot;Criterion: \r
- Borders at multi-connection 2D = 2 Nb = &quot;, len( anIds )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">for i in range( \r
- len( anIds ) ):</p>\r
+<p class="whs3">smesh &nbsp;= \r
+ SMESH_mechanic.smesh</p>\r
+\r
+<p class="whs3">mesh &nbsp;&nbsp;= \r
+ SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;print \r
- anIds[ i ]</p>\r
+<p class="whs3">salome = SMESH_mechanic.salome</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs2"># create a group</p>\r
+<p class="whs2"># Criterion : AREA &gt; \r
+ 100.</p>\r
 \r
-<p class="whs1">aGroup = mesh.CreateGroup( \r
- SMESH.FACE, &quot;Borders at multi-connection 2D = 2&quot; )</p>\r
+<p class="whs3">area_margin = 100.</p>\r
 \r
-<p class="whs1">aGroup.Add( anIds \r
- )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
- </p>\r
+<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
 \r
-<h3><a name=bookmark6>Area</a></h3>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p>Attention! This script was written using old approach, based on direct usage of SMESH idl interface. To be updated for version 3.2.1 to use <b>smesh</b> package.\r
-<br>&nbsp;\r
+<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
 \r
-<p class="whs1">import SMESH</p>\r
+<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
 \r
-<p class="whs1">import SMESH_mechanic</p>\r
+<p class="whs3">aPredicate.SetMargin(area_margin)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">smesh &nbsp;= \r
- SMESH_mechanic.smesh</p>\r
+<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
 \r
-<p class="whs1">mesh &nbsp;&nbsp;= \r
- SMESH_mechanic.mesh</p>\r
+<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
 \r
-<p class="whs1">salome = SMESH_mechanic.salome</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
 \r
-<p class="whs1">aFilterMgr = smesh.CreateFilterManager()</p>\r
+<p class="whs2">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs2"># print the result</p>\r
 \r
-<p class="whs2"># Criterion : AREA &gt; \r
100</p>\r
+<p class="whs3">print &quot;Criterion: \r
Area &gt; &quot;, area_margin, &quot; Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">j = 1</p>\r
 \r
-<p class="whs1">aFunctor = aFilterMgr.CreateArea()</p>\r
+<p class="whs3">for i in range(len(anIds)):</p>\r
 \r
-<p class="whs1">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
+<p class="whs3">&nbsp;&nbsp;if \r
+ j &gt; 20: j = 1; print &quot;&quot;</p>\r
 \r
-<p class="whs1">aPredicate.SetNumFunctor( \r
- aFunctor )</p>\r
+<p class="whs3">&nbsp;&nbsp;print \r
+ anIds[i],</p>\r
 \r
-<p class="whs1">aPredicate.SetMargin( \r
100 )</p>\r
+<p class="whs3">&nbsp;&nbsp;j \r
= j + 1</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs1">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs3">print &quot;&quot;</p>\r
 \r
-<p class="whs1">aFilter.SetPredicate( \r
- aPredicate )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs2"># create a group</p>\r
 \r
-<p class="whs1">anIds = aFilter.GetElementsId( \r
mesh )</p>\r
+<p class="whs3">aGroup = mesh.CreateGroup(SMESH.FACE, \r
&quot;Area &gt; &quot; + `area_margin`)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aGroup.Add(anIds)</p>\r
 \r
-<p class="whs2"># print the result</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">print &quot;Criterion: \r
Area &gt; 100 Nb = &quot;, len( anIds )</p>\r
+<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
+ </p>\r
 \r
-<p class="whs1">for i in range( \r
- len( anIds ) ):</p>\r
+<h3><a name=bookmark7>Taper</a></h3>\r
 \r
-<p class="whs1">&nbsp;&nbsp;print \r
- anIds[ i ]</p>\r
+<p class="whs1"><span style="font-weight: bold; color: #ff0000;"><font color=red ><B><span \r
+ style="font-weight: bold; color: #ff0000;"><font color=red ><B># Attention! This script has \r
+ been written using the old approach basing on direct usage of SMESH idl \r
+ interface.</B></font></span></B></font></span></p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to check taper. </p>\r
 \r
-<p class="whs2"># create a group</p>\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
 \r
-<p class="whs1">aGroup = mesh.CreateGroup( \r
- SMESH.FACE, &quot;Area &gt; 100&quot; )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aGroup.Add( anIds \r
- )</p>\r
+<p class="whs3">import SMESH</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">import SMESH_mechanic</p>\r
 \r
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
- </p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">smesh &nbsp;= \r
+ SMESH_mechanic.smesh</p>\r
 \r
-<h3><a name=bookmark7>Taper</a></h3>\r
+<p class="whs3">mesh &nbsp;&nbsp;= \r
+ SMESH_mechanic.mesh</p>\r
 \r
-<p>Attention! This script was written using old approach, based on direct usage of SMESH idl interface. To be updated for version 3.2.1 to use <b>smesh</b> package.\r
-<br>&nbsp;\r
+<p class="whs3">salome = SMESH_mechanic.salome</p>\r
 \r
-<p class="whs1">import SMESH</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">import SMESH_mechanic</p>\r
+<p class="whs4"># Criterion : Taper \r
+ &gt; 3e-20</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">taper_margin = 3e-20</p>\r
 \r
-<p class="whs1">smesh &nbsp;= \r
- SMESH_mechanic.smesh</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">mesh &nbsp;&nbsp;= \r
- SMESH_mechanic.mesh</p>\r
+<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
 \r
-<p class="whs1">salome = SMESH_mechanic.salome</p>\r
+<p class="whs3">aFunctor = aFilterMgr.CreateTaper()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aFilterMgr = smesh.CreateFilterManager()</p>\r
+<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
 \r
-<p class="whs2"># Criterion : Taper &gt; \r
- 3e-20</p>\r
+<p class="whs3">aPredicate.SetMargin(taper_margin)</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aFunctor = aFilterMgr.CreateTaper()</p>\r
+<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
 \r
-<p class="whs1">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
+<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
 \r
-<p class="whs1">aPredicate.SetNumFunctor( \r
- aFunctor )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aPredicate.SetMargin( \r
- 3e-20 )</p>\r
+<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs4"># print the result</p>\r
 \r
-<p class="whs1">aFilter.SetPredicate( \r
aPredicate )</p>\r
+<p class="whs3">print &quot;Criterion: \r
Taper &gt; &quot;, taper_margin, &quot; Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">j = 1</p>\r
 \r
-<p class="whs1">anIds = aFilter.GetElementsId( \r
- mesh )</p>\r
+<p class="whs3">for i in range(len(anIds)):</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">&nbsp;&nbsp;if \r
+ j &gt; 20: j = 1; print &quot;&quot;</p>\r
 \r
-<p class="whs2"># print the result</p>\r
+<p class="whs3">&nbsp;&nbsp;print \r
+ anIds[i],</p>\r
 \r
-<p class="whs1">print &quot;Criterion: \r
Taper &gt; 3e-20 Nb = &quot;, len( anIds )</p>\r
+<p class="whs3">&nbsp;&nbsp;j \r
= j + 1</p>\r
 \r
-<p class="whs1">for i in range( \r
- len( anIds ) ):</p>\r
+<p class="whs3">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;print \r
- anIds[ i ]</p>\r
+<p class="whs3">print &quot;&quot;</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2"># create a group</p>\r
+<p class="whs4"># create a group</p>\r
 \r
-<p class="whs1">aGroup = mesh.CreateGroup( \r
SMESH.FACE, &quot;Taper &gt; 3e-20&quot; )</p>\r
+<p class="whs3">aGroup = mesh.CreateGroup(SMESH.FACE, \r
&quot;Taper &gt; &quot; + `taper_margin`)</p>\r
 \r
-<p class="whs1">aGroup.Add( anIds \r
- )</p>\r
+<p class="whs3">aGroup.Add(anIds)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
+<p class="whs3">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
-\r
 <h3><a name=bookmark8>Aspect Ratio</a></h3>\r
 \r
-<p>Attention! This script was written using old approach, based on direct usage of SMESH idl interface. To be updated for version 3.2.1 to use <b>smesh</b> package.\r
-<br>&nbsp;\r
+<p class="whs1"><span style="font-weight: bold; color: #ff0000;"><font color=red ><B><span \r
+ style="font-weight: bold; color: #ff0000;"><font color=red ><B># Attention! This script has \r
+ been written using the old approach basing on direct usage of SMESH idl \r
+ interface.</B></font></span></B></font></span></p>\r
 \r
-<p class="whs1">import SMESH</p>\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to check aspect ratio. </p>\r
 \r
-<p class="whs1">import SMESH_mechanic</p>\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">smesh &nbsp;= \r
+<p class="whs3">import SMESH</p>\r
+\r
+<p class="whs3">import SMESH_mechanic</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">smesh &nbsp;= \r
  SMESH_mechanic.smesh</p>\r
 \r
-<p class="whs1">mesh &nbsp;&nbsp;= \r
+<p class="whs3">mesh &nbsp;&nbsp;= \r
  SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs1">salome = SMESH_mechanic.salome</p>\r
+<p class="whs3">salome = SMESH_mechanic.salome</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aFilterMgr = smesh.CreateFilterManager()</p>\r
+<p class="whs4"># Criterion : ASPECT \r
+ RATIO &gt; 1.8</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">ar_margin = 1.8</p>\r
 \r
-<p class="whs2"># Criterion : ASPECT RATIO \r
- &gt; 1.4</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
 \r
-<p class="whs1">aFunctor = aFilterMgr.CreateAspectRatio()</p>\r
+<p class="whs3">aFunctor = aFilterMgr.CreateAspectRatio()</p>\r
 \r
-<p class="whs1">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aPredicate.SetNumFunctor( \r
- aFunctor )</p>\r
+<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
 \r
-<p class="whs1">aPredicate.SetMargin( \r
- 1.4 )</p>\r
+<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aPredicate.SetMargin(ar_margin)</p>\r
 \r
-<p class="whs1">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aFilter.SetPredicate( \r
- aPredicate )</p>\r
+<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
 \r
-<p class="whs1">anIds = aFilter.GetElementsId( \r
- mesh )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
 \r
-<p class="whs2"># print the result</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">print &quot;Criterion: \r
- Aspect Ratio &gt; 1.4 Nb = &quot;, len( anIds )</p>\r
+<p class="whs4"># print the result</p>\r
 \r
-<p class="whs1">for i in range( \r
len( anIds ) ):</p>\r
+<p class="whs3">print &quot;Criterion: \r
Aspect Ratio &gt; &quot;, ar_margin, &quot; Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;print \r
- anIds[ i ]</p>\r
+<p class="whs3">j = 1</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">for i in range(len(anIds)):</p>\r
 \r
-<p class="whs2"># create a group</p>\r
+<p class="whs3">&nbsp;&nbsp;if \r
+ j &gt; 20: j = 1; print &quot;&quot;</p>\r
+\r
+<p class="whs3">&nbsp;&nbsp;print \r
+ anIds[i],</p>\r
 \r
-<p class="whs1">aGroup = mesh.CreateGroup( \r
SMESH.FACE, &quot;Aspect Ratio &gt; 1.4&quot; )</p>\r
+<p class="whs3">&nbsp;&nbsp;j \r
= j + 1</p>\r
 \r
-<p class="whs1">aGroup.Add( anIds \r
- )</p>\r
+<p class="whs3">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">print &quot;&quot;</p>\r
 \r
-<p class="whs1">salome.sg.updateObjBrowser(1) \r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs4"># create a group</p>\r
+\r
+<p class="whs3">aGroup = mesh.CreateGroup(SMESH.FACE, \r
+ &quot;Aspect Ratio &gt; &quot; + `ar_margin`)</p>\r
+\r
+<p class="whs3">aGroup.Add(anIds)</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
 <h3><a name=bookmark9>Minimum Angle</a></h3>\r
 \r
-<p>Attention! This script was written using old approach, based on direct usage of SMESH idl interface. To be updated for version 3.2.1 to use <b>smesh</b> package.\r
-<br>&nbsp;\r
+<p class="whs1"><span style="font-weight: bold; color: #ff0000;"><font color=red ><B><span \r
+ style="font-weight: bold; color: #ff0000;"><font color=red ><B># Attention! This script has \r
+ been written using the old approach basing on direct usage of SMESH idl \r
+ interface.</B></font></span></B></font></span></p>\r
+\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to check minimum angle. </p>\r
+\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">import SMESH</p>\r
+<p class="whs3">import SMESH</p>\r
 \r
-<p class="whs1">import SMESH_mechanic</p>\r
+<p class="whs3">import SMESH_mechanic</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">smesh &nbsp;= \r
+<p class="whs3">smesh &nbsp;= \r
  SMESH_mechanic.smesh</p>\r
 \r
-<p class="whs1">mesh &nbsp;&nbsp;= \r
+<p class="whs3">mesh &nbsp;&nbsp;= \r
  SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs1">salome = SMESH_mechanic.salome</p>\r
+<p class="whs3">salome = SMESH_mechanic.salome</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aFilterMgr = smesh.CreateFilterManager()</p>\r
+<p class="whs4"># Criterion : MINIMUM \r
+ ANGLE &lt; 35.</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">min_angle = 35.</p>\r
 \r
-<p class="whs3"># Criterion : MINIMUM \r
- ANGLE &lt; 70</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
 \r
-<p class="whs1">aFunctor = aFilterMgr.CreateMinimumAngle()</p>\r
+<p class="whs3">aFunctor = aFilterMgr.CreateMinimumAngle()</p>\r
 \r
-<p class="whs1">aPredicate = aFilterMgr.CreateLessThan()</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aPredicate.SetNumFunctor( \r
- aFunctor )</p>\r
+<p class="whs3">aPredicate = aFilterMgr.CreateLessThan()</p>\r
 \r
-<p class="whs1">aPredicate.SetMargin( \r
- 70 )</p>\r
+<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aPredicate.SetMargin(min_angle)</p>\r
 \r
-<p class="whs1">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">aFilter.SetPredicate( \r
- aPredicate )</p>\r
+<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
 \r
-<p class="whs1">anIds = aFilter.GetElementsId( \r
- mesh )</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
 \r
-<p class="whs3"># print the result</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">print &quot;Criterion: \r
- Minimum Angle &lt; 70 Nb = &quot;, len( anIds )</p>\r
+<p class="whs4"># print the result</p>\r
 \r
-<p class="whs1">for i in range( \r
len( anIds ) ):</p>\r
+<p class="whs3">print &quot;Criterion: \r
Minimum Angle &lt; &quot;, min_angle, &quot; Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;print \r
- anIds[ i ]</p>\r
+<p class="whs3">j = 1</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">for i in range(len(anIds)):</p>\r
 \r
-<p class="whs3"># create a group</p>\r
+<p class="whs3">&nbsp;&nbsp;if \r
+ j &gt; 20: j = 1; print &quot;&quot;</p>\r
 \r
-<p class="whs1">aGroup = mesh.CreateGroup( \r
SMESH.FACE, &quot;Minimum Angle &lt; 70&quot; )</p>\r
+<p class="whs3">&nbsp;&nbsp;print \r
anIds[i],</p>\r
 \r
-<p class="whs1">aGroup.Add( anIds \r
)</p>\r
+<p class="whs3">&nbsp;&nbsp;j \r
= j + 1</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs1">salome.sg.updateObjBrowser(1) \r
+<p class="whs3">print &quot;&quot;</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs4"># create a group</p>\r
+\r
+<p class="whs3">aGroup = mesh.CreateGroup(SMESH.FACE, \r
+ &quot;Minimum Angle &lt; &quot; + `min_angle`)</p>\r
+\r
+<p class="whs3">aGroup.Add(anIds)</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
 <h3><a name=bookmark10>Warping</a></h3>\r
 \r
-<p>Attention! This script was written using old approach, based on direct usage of SMESH idl interface. To be updated for version 3.2.1 to use <b>smesh</b> package.\r
-<br>&nbsp;\r
+<p class="whs1"><span style="font-weight: bold; color: #ff0000;"><font color=red ><B><span \r
+ style="font-weight: bold; color: #ff0000;"><font color=red ><B># Attention! This script has \r
+ been written using the old approach basing on direct usage of SMESH idl \r
+ interface.</B></font></span></B></font></span></p>\r
+\r
+<p class="whs1"># For the moment smesh package doesn't provide \r
+ methods to check warping. </p>\r
 \r
-<p class="whs1">import SMESH</p>\r
+<p class="whs1"># In the next SALOME version the scripts will \r
+ be updated to use only the commands from smesh package.</p>\r
 \r
-<p class="whs1">import SMESH_mechanic</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs3">import SMESH</p>\r
 \r
-<p class="whs1">smesh &nbsp;= \r
+<p class="whs3">import SMESH_mechanic</p>\r
+\r
+<p class="whs3">&nbsp;</p>\r
+\r
+<p class="whs3">smesh &nbsp;= \r
  SMESH_mechanic.smesh</p>\r