]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix for bug PAL12557(V3_2_0b2: SMESH documentation for scripts not up to date).
authormzn <mzn@opencascade.com>
Mon, 30 Oct 2006 08:50:24 +0000 (08:50 +0000)
committermzn <mzn@opencascade.com>
Mon, 30 Oct 2006 08:50:24 +0000 (08:50 +0000)
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 144d565306daff4dc3cbc1ad97e1e94b6d40a016..d067e6fb6e8a69dd6e69ac9953ccfc1f3a4022e0 100755 (executable)
@@ -432,9 +432,11 @@ if (window.writeIntopicBar)
 <h4><a name=bookmark4>Maximum Element Area</a></h4>\r
 \r
 <p class="whs4"><span style="font-family: 'Lucida Console', monospace;">import \r
- smesh</span></p>\r
+ geompy</span></p>\r
+\r
+<p class="whs4">import smesh</p>\r
 \r
-<p class="whs4">import salome</p>\r
+<p class="whs4">import salome </p>\r
 \r
 <p class="whs4">&nbsp;</p>\r
 \r
@@ -855,9 +857,8 @@ if (window.writeIntopicBar)
 <p class="whs6"># create a Netgen_2D3D \r
  algorithm for solids</p>\r
 \r
-<p class="whs4">is3D = 1</p>\r
-\r
-<p class="whs4">algo3D = tetraN.Netgen(is3D)</p>\r
+<p class="whs4">algo3D = tetraN.Tetrahedron(smesh.FULL_NETGEN) \r
+ </p>\r
 \r
 <p class="whs6">&nbsp;</p>\r
 \r
index 173e22108bcb93052bedf0a92f2f3e08c557caf3..cab59599f3a9af95db3ff5c14d2f7905b1930e8f 100755 (executable)
@@ -7,23 +7,21 @@
 <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-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
-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
+p.whs1 { margin-top:0pt; margin-bottom:0pt; font-family:'Lucida Console' , monospace; }\r
+p.whs2 { margin-top:0pt; margin-bottom:0pt; font-family:'Times New Roman' , serif; }\r
+p.whs3 { margin-top:0pt; margin-bottom:0pt; }\r
+img_whs4 { border:none; width:430px; height:391px; float:none; border-style:none; }\r
+img_whs5 { border:none; float:none; width:463px; height:417px; border-style:none; }\r
+img_whs6 { border:none; width:541px; height:417px; float:none; border-style:none; }\r
+img_whs7 { border:none; width:394px; height:425px; float:none; border-style:none; }\r
+img_whs8 { border:none; float:none; width:368px; height:379px; border-style:none; }\r
+img_whs9 { border:none; float:none; width:344px; height:381px; border-style:none; }\r
+img_whs10 { border:none; width:314px; height:351px; float:none; border-style:none; }\r
+img_whs11 { border:none; float:none; width:319px; height:351px; border-style:none; }\r
+img_whs12 { border:none; float:none; width:304px; height:352px; border-style:none; }\r
+img_whs13 { border:none; width:318px; height:355px; float:none; border-style:none; }\r
+img_whs14 { border:none; float:none; width:318px; height:355px; border-style:none; }\r
+img_whs15 { border:none; float:none; width:320px; height:354px; border-style:none; }\r
 -->\r
 </style><script type="text/javascript" language="JavaScript">\r
 <!--\r
@@ -33,8 +31,6 @@ 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 += "p.whs6 {margin-top:1pt;margin-bottom:1pt; }";\r
   strNSS +="</style>";\r
   document.write(strNSS);\r
 }\r
@@ -103,741 +99,558 @@ if (window.writeIntopicBar)
 \r
 <h3><a name=bookmark>Create a Standalone Group</a></h3>\r
 \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
+<p class="whs1">import SMESH_mechanic</p>\r
 \r
-<p class="whs1"># For the moment smesh package doesn't provide \r
- methods to create a standalone group. </p>\r
+<p class="whs1">&nbsp;</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="whs2">&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">smesh &nbsp;= \r
+<p class="whs1">smesh &nbsp;= \r
  SMESH_mechanic.smesh</p>\r
 \r
-<p class="whs3">mesh &nbsp;&nbsp;= \r
+<p class="whs1">mesh &nbsp;&nbsp;= \r
  SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs3">salome = SMESH_mechanic.salome</p>\r
+<p class="whs1">salome = SMESH_mechanic.salome</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># Get ids of all faces \r
+<p class="whs2"># Get ids of all faces \r
  with area &gt; 100 </p>\r
 \r
-<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
-\r
-<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
-\r
-<p class="whs3">aPredicate.SetNumFunctor( \r
- aFunctor )</p>\r
+<p class="whs1">aFilter = smesh.GetFilter(smesh.FACE, \r
+ smesh.FT_Area, smesh.FT_MoreThan, 100.)</p>\r
 \r
-<p class="whs3">aPredicate.SetMargin( \r
- 100 )</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
-\r
-<p class="whs3">aFilter.SetPredicate( \r
- aPredicate )</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">anIds = aFilter.GetElementsId( \r
- mesh )</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter) \r
+ </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs2"># create a group consisting \r
+<p class="whs3"># create a group consisting \r
  of faces with area &gt; 100</p>\r
 \r
-<p class="whs3">aGroup = mesh.CreateGroup( \r
- SMESH.FACE, &quot;Area &gt; 100&quot; )</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aGroup.Add( anIds \r
- )</p>\r
+<p class="whs1">aGroup = mesh.MakeGroupByIds(&quot;Area \r
&gt; 100&quot;, smesh.FACE, anIds)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
+<p class="whs3"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
  </p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">&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_whs5"></p>\r
+<p class="whs3"><img src="pics/create_group.png" x-maintain-ratio="TRUE" width="430px" height="391px" border="0" class="img_whs4"></p>\r
 \r
 <h3><a name=bookmark5>Create a Group on Geometry</a></h3>\r
 \r
-<p class="whs3">import salome</p>\r
+<p class="whs1">import salome</p>\r
 \r
-<p class="whs3">import geompy</p>\r
+<p class="whs1">import geompy</p>\r
 \r
-<p class="whs3">import smesh</p>\r
+<p class="whs1">import smesh</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create a box</p>\r
+<p class="whs2"># create a box</p>\r
 \r
-<p class="whs3">box = geompy.MakeBox(0., \r
+<p class="whs1">box = geompy.MakeBox(0., \r
  0., 0., 100., 100., 100.)</p>\r
 \r
-<p class="whs3">geompy.addToStudy(box, \r
+<p class="whs1">geompy.addToStudy(box, \r
  &quot;box&quot;)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># add the first face \r
+<p class="whs2"># add the first face \r
  of the box to the study</p>\r
 \r
-<p class="whs3">subShapeList = geompy.SubShapeAll(box, \r
geompy.ShapeType[&quot;FACE&quot;])</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">subShapeList \r
= geompy.SubShapeAll(box, geompy.ShapeType[&quot;FACE&quot;])</span></p>\r
 \r
-<p class="whs3">face = subShapeList[0]</p>\r
+<p class="whs1">face = subShapeList[0]</p>\r
 \r
-<p class="whs3">geompy.addToStudyInFather(box, \r
- face, &quot;face 1&quot;)</p>\r
+<p class="whs1">geompy.addToStudyInFather(box, \r
+ face, &quot;face 1&quot;) </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create group of edges \r
+<p class="whs2"># create group of edges \r
  on the face</p>\r
 \r
-<p class="whs3">aGeomGroupE = geompy.CreateGroup(face, \r
geompy.ShapeType[&quot;EDGE&quot;])</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aGeomGroupE \r
= geompy.CreateGroup(face, geompy.ShapeType[&quot;EDGE&quot;])</span></p>\r
 \r
-<p class="whs3">geompy.AddObject(aGeomGroupE, \r
+<p class="whs1">geompy.AddObject(aGeomGroupE, \r
  3)</p>\r
 \r
-<p class="whs3">geompy.AddObject(aGeomGroupE, \r
+<p class="whs1">geompy.AddObject(aGeomGroupE, \r
  6)</p>\r
 \r
-<p class="whs3">geompy.AddObject(aGeomGroupE, \r
+<p class="whs1">geompy.AddObject(aGeomGroupE, \r
  8)</p>\r
 \r
-<p class="whs3">geompy.AddObject(aGeomGroupE, \r
+<p class="whs1">geompy.AddObject(aGeomGroupE, \r
  10)</p>\r
 \r
-<p class="whs3">geompy.addToStudyInFather(face, \r
+<p class="whs1">geompy.addToStudyInFather(face, \r
  aGeomGroupE, &quot;Group of Edges&quot;)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create quadrangle \r
+<p class="whs2"># create quadrangle \r
  2D mesh on the box</p>\r
 \r
-<p class="whs3">quadra = smesh.Mesh(box, \r
&quot;Box : quadrangle 2D mesh&quot;)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">quadra \r
= smesh.Mesh(box, &quot;Box : quadrangle 2D mesh&quot;)</span></p>\r
 \r
-<p class="whs3">algo1D = quadra.Segment()</p>\r
+<p class="whs1">algo1D = quadra.Segment()</p>\r
 \r
-<p class="whs3">quadra.Quadrangle()</p>\r
+<p class="whs1">quadra.Quadrangle()</p>\r
 \r
-<p class="whs3">algo1D.NumberOfSegments(7)</p>\r
+<p class="whs1">algo1D.NumberOfSegments(7) \r
+ </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># compute the mesh</p>\r
+<p class="whs2"># compute the mesh</p>\r
 \r
-<p class="whs3">quadra.Compute()</p>\r
+<p class="whs1">quadra.Compute()</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create SMESH group \r
+<p class="whs2"># create SMESH group \r
  on the face with name &quot;SMESHGroup1&quot;</p>\r
 \r
-<p class="whs3">aSmeshGroup1 = quadra.Group(face, \r
&quot;SMESHGroup1&quot;)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aSmeshGroup1 \r
= quadra.GroupOnGeom(face, &quot;SMESHGroup1&quot;)</span></p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create SMESH group \r
+<p class="whs2"># create SMESH group \r
  on &lt;aGeomGroupE&gt; with default name</p>\r
 \r
-<p class="whs3">aSmeshGroup2 = quadra.Group(aGeomGroupE)</p>\r
+<p class="whs1">aSmeshGroup2 = quadra.GroupOnGeom(aGeomGroupE) \r
+ </p>\r
 \r
-<p class="whs2">&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"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
  </p>\r
 \r
 <h3><a name=bookmark1>Edit a Group</a></h3>\r
 \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="whs6"># For the moment smesh package doesn't \r
- provide methods to edit a group. </p>\r
+<p class="whs1">import SMESH_mechanic</p>\r
 \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
+<p class="whs1">&nbsp;</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">smesh &nbsp;= \r
+<p class="whs1">smesh &nbsp;= \r
  SMESH_mechanic.smesh</p>\r
 \r
-<p class="whs3">mesh &nbsp;&nbsp;= \r
+<p class="whs1">mesh &nbsp;&nbsp;= \r
  SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs3">salome = SMESH_mechanic.salome</p>\r
+<p class="whs1">salome = SMESH_mechanic.salome</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># Get ids of all faces \r
+<p class="whs2"># Get ids of all faces \r
  with area &gt; 35</p>\r
 \r
-<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
-\r
-<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
-\r
-<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
+<p class="whs1">aFilter = smesh.GetFilter(smesh.FACE, \r
+ smesh.FT_Area, smesh.FT_MoreThan, 35.)</p>\r
 \r
-<p class="whs3">aPredicate.SetMargin(35.)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
-\r
-<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter) \r
+ </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">print &quot;Criterion: \r
+<p class="whs1">print &quot;Criterion: \r
  Area &gt; 35, Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create a group by \r
+<p class="whs2"># create a group by \r
  adding elements with area &gt; 35</p>\r
 \r
-<p class="whs3">aGroup = mesh.CreateGroup(SMESH.FACE, \r
&quot;Area &gt; 35&quot;)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aGroup \r
= mesh.CreateEmptyGroup(smesh.FACE, &quot;Area &gt; 35&quot;)</span></p>\r
 \r
-<p class="whs3">aGroup.Add(anIds)</p>\r
+<p class="whs1">aGroup.Add(anIds) \r
+ </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># Get ids of all faces \r
+<p class="whs2"># Get ids of all faces \r
  with area &gt; 40</p>\r
 \r
-<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
-\r
-<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
+<p class="whs1">aFilter = smesh.GetFilter(smesh.FACE, \r
+ smesh.FT_Area, smesh.FT_MoreThan, 40.)</p>\r
 \r
-<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aPredicate.SetMargin(40.)</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter)</p>\r
 \r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
+<p class="whs1">print &quot;Criterion: \r
+ Area &gt; 40, Nb = &quot;, len(anIds) </p>\r
 \r
-<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">print &quot;Criterion: \r
- Area &gt; 40, Nb = &quot;, len(anIds)</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs4"># create a group of \r
+<p class="whs2"># 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="whs3">aGroup.Remove(anIds)</p>\r
+<p class="whs1">aGroup.Remove(anIds) \r
+ </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># print the result</p>\r
+<p class="whs2"># print the result</p>\r
 \r
-<p class="whs3">aGroupElemIDs = \r
+<p class="whs1">aGroupElemIDs = \r
  aGroup.GetListOfID()</p>\r
 \r
-<p class="whs3">print &quot;Criterion: \r
+<p class="whs1">&nbsp;</p>\r
+\r
+<p class="whs1">print &quot;Criterion: \r
  35 &lt; Area &lt; 40, Nb = &quot;, len(aGroupElemIDs)</p>\r
 \r
-<p class="whs3">j = 1</p>\r
+<p class="whs1">j = 1</p>\r
 \r
-<p class="whs3">for i in range(len(aGroupElemIDs)):</p>\r
+<p class="whs1">for i in range(len(aGroupElemIDs)):</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;if \r
+<p class="whs1">&nbsp;&nbsp;if \r
  j &gt; 20: j = 1; print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;print \r
+<p class="whs1">&nbsp;&nbsp;print \r
  aGroupElemIDs[i],</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;j \r
+<p class="whs1">&nbsp;&nbsp;j \r
  = j + 1</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;pass</p>\r
+<p class="whs1">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs3">print &quot;&quot;</p>\r
+<p class="whs1">print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">salome.sg.updateObjBrowser(1) \r
+<p class="whs1">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">&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_whs7"> &nbsp;<img src="pics/editing_groups2.png" x-maintain-ratio="TRUE" width="541px" height="417px" border="0" class="img_whs8"></p>\r
+<p class="whs3"><img src="pics/editing_groups1.png" x-maintain-ratio="TRUE" width="463px" height="417px" border="0" class="img_whs5"> &nbsp;<img src="pics/editing_groups2.png" x-maintain-ratio="TRUE" width="541px" height="417px" border="0" class="img_whs6"></p>\r
 \r
 <h3><a name=bookmark2>Union of two groups</a></h3>\r
 \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"># For the moment smesh package doesn't provide \r
- methods to create a union of two groups. </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"><span style="font-family: 'Lucida Console', monospace;">import \r
- SMESH</span></p>\r
-\r
-<p class="whs3">import SMESH_mechanic</p>\r
+<p class="whs1">import SMESH_mechanic</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">smesh &nbsp;= \r
+<p class="whs1">smesh &nbsp;= \r
  SMESH_mechanic.smesh</p>\r
 \r
-<p class="whs3">mesh &nbsp;&nbsp;= \r
+<p class="whs1">mesh &nbsp;&nbsp;= \r
  SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs3">salome = SMESH_mechanic.salome</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
+<p class="whs1">salome = SMESH_mechanic.salome</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># Criterion : AREA \r
+<p class="whs2"># Criterion : AREA \r
  &gt; 20</p>\r
 \r
-<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
-\r
-<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
+<p class="whs1">aFilter = smesh.GetFilter(smesh.FACE, \r
+ smesh.FT_Area, smesh.FT_MoreThan, 20.)</p>\r
 \r
-<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aPredicate.SetMargin(20.)</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
+<p class="whs1">print &quot;Criterion: \r
+ Area &gt; 20, Nb = &quot;, len( anIds ) </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
-\r
-<p class="whs3">print &quot;Criterion: \r
- Area &gt; 20, Nb = &quot;, len( anIds )</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs4"># create a group by \r
+<p class="whs2"># create a group by \r
  adding elements with area &gt; 20</p>\r
 \r
-<p class="whs3">aGroup1 = mesh.CreateGroup(SMESH.FACE, \r
+<p class="whs1">aGroup1 = mesh.CreateGroup(SMESH.FACE, \r
  &quot;Area &gt; 20&quot;)</p>\r
 \r
-<p class="whs3">aGroup1.Add(anIds)</p>\r
+<p class="whs1">aGroup1.Add(anIds)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># Criterion : AREA \r
+<p class="whs2"># Criterion : AREA \r
  = 20</p>\r
 \r
-<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
-\r
-<p class="whs3">aPredicate = aFilterMgr.CreateEqualTo()</p>\r
-\r
-<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
-\r
-<p class="whs3">aPredicate.SetMargin(20.)</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aFilter \r
+ = smesh.GetFilter(smesh.FACE, smesh.FT_Area, smesh.FT_EqualTo, 20.)</span></p>\r
 \r
-<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">print &quot;Criterion: \r
- Area = 20, Nb = &quot;, len( anIds )</p>\r
+<p class="whs1">print &quot;Criterion: \r
+ Area = 20, Nb = &quot;, len( anIds ) </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create a group by \r
+<p class="whs2"># create a group by \r
  adding elements with area = 20</p>\r
 \r
-<p class="whs3">aGroup2 = mesh.CreateGroup( \r
SMESH.FACE, &quot;Area = 20&quot; )</p>\r
+<p class="whs1">aGroup2 = mesh.CreateEmptyGroup( \r
smesh.FACE, &quot;Area = 20&quot; )</p>\r
 \r
-<p class="whs3">aGroup2.Add(anIds)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">aGroup2.Add(anIds)</p>\r
+\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create union group \r
+<p class="whs2"># create union group \r
  : area &gt;= 20</p>\r
 \r
-<p class="whs3">aGroup3 = mesh.UnionGroups(aGroup1, \r
aGroup2, &quot;Area &gt;= 20&quot;)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aGroup3 \r
= mesh.UnionGroups(aGroup1, aGroup2, &quot;Area &gt;= 20&quot;)</span></p>\r
 \r
-<p class="whs3">print &quot;Criterion: \r
+<p class="whs1">print &quot;Criterion: \r
  Area &gt;= 20, Nb = &quot;, len(aGroup3.GetListOfID())</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># Criterion : AREA \r
+<p class="whs2"># Criterion : AREA \r
  &lt; 20</p>\r
 \r
-<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
-\r
-<p class="whs3">aPredicate = aFilterMgr.CreateLessThan()</p>\r
-\r
-<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aFilter \r
+ = smesh.GetFilter(smesh.FACE, smesh.FT_Area, smesh.FT_LessThan, 20.)</span></p>\r
 \r
-<p class="whs3">aPredicate.SetMargin(20.)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter)</p>\r
 \r
-<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
-\r
-<p class="whs3">print &quot;Criterion: \r
+<p class="whs1">print &quot;Criterion: \r
  Area &lt; 20, Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create a group by \r
+<p class="whs2"># create a group by \r
  adding elements with area &lt; 20</p>\r
 \r
-<p class="whs3">aGroup4 = mesh.CreateGroup(SMESH.FACE, \r
&quot;Area &lt; 20&quot;)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aGroup4 \r
= mesh.CreateEmptyGroup(smesh.FACE, &quot;Area &lt; 20&quot;)</span></p>\r
 \r
-<p class="whs3">aGroup4.Add(anIds)</p>\r
+<p class="whs1">aGroup4.Add(anIds)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create union group \r
+<p class="whs2"># create union group \r
  : area &gt;= 20 and area &lt; 20</p>\r
 \r
-<p class="whs3">aGroup5 = mesh.UnionGroups(aGroup3, \r
aGroup4, &quot;Any Area&quot;)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aGroup5 \r
= mesh.UnionGroups(aGroup3, aGroup4, &quot;Any Area&quot;)</span></p>\r
 \r
-<p class="whs3">print &quot;Criterion: \r
+<p class="whs1">print &quot;Criterion: \r
  Any Area, Nb = &quot;, len(aGroup5.GetListOfID())</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">salome.sg.updateObjBrowser(1) \r
+<p class="whs1">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \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
+<p class="whs1"><img src="pics/union_groups1.png" x-maintain-ratio="TRUE" width="394px" height="425px" border="0" class="img_whs7"></p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \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
+<p class="whs1"><img src="pics/union_groups2.png" x-maintain-ratio="TRUE" width="368px" height="379px" border="0" class="img_whs8"> <img src="pics/union_groups3.png" x-maintain-ratio="TRUE" width="344px" height="381px" border="0" class="img_whs9"></p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
 <h3><a name=bookmark3>Intersection of two groups</a></h3>\r
 \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="whs6"># For the moment smesh package doesn't \r
- provide methods to create an intersection of two groups. </p>\r
-\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="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">import SMESH</p>\r
-\r
-<p class="whs3">import SMESH_mechanic</p>\r
+<p class="whs1">import SMESH_mechanic</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">smesh &nbsp;= \r
+<p class="whs1">smesh &nbsp;= \r
  SMESH_mechanic.smesh</p>\r
 \r
-<p class="whs3">mesh &nbsp;&nbsp;= \r
+<p class="whs1">mesh &nbsp;&nbsp;= \r
  SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs3">salome = SMESH_mechanic.salome</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
+<p class="whs1">salome = SMESH_mechanic.salome</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># Criterion : AREA \r
+<p class="whs2"># Criterion : AREA \r
  &gt; 20</p>\r
 \r
-<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
-\r
-<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
+<p class="whs1">aFilter = smesh.GetFilter(smesh.FACE, \r
+ smesh.FT_Area, smesh.FT_MoreThan, 20.)</p>\r
 \r
-<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aPredicate.SetMargin(20.)</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
+<p class="whs1">print &quot;Criterion: \r
+ Area &gt; 20, Nb = &quot;, len(anIds) </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">print &quot;Criterion: \r
- Area &gt; 20, Nb = &quot;, len(anIds)</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs4"># create a group by \r
+<p class="whs2"># create a group by \r
  adding elements with area &gt; 20</p>\r
 \r
-<p class="whs3">aGroup1 = mesh.CreateGroup(SMESH.FACE, \r
+<p class="whs1">aGroup1 = mesh.CreateGroup(SMESH.FACE, \r
  &quot;Area &gt; 20&quot;)</p>\r
 \r
-<p class="whs3">aGroup1.Add(anIds)</p>\r
+<p class="whs1">aGroup1.Add(anIds)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># Criterion : AREA \r
+<p class="whs2"># Criterion : AREA \r
  &lt; 60</p>\r
 \r
-<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
-\r
-<p class="whs3">aPredicate = aFilterMgr.CreateLessThan()</p>\r
-\r
-<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
-\r
-<p class="whs3">aPredicate.SetMargin(60)</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
-\r
-<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
+<p class="whs1">aFilter = smesh.GetFilter(smesh.FACE, \r
+ smesh.FT_Area, smesh.FT_LessThan, 60.)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">print &quot;Criterion: \r
- Area &lt; 60, Nb = &quot;, len(anIds)</p>\r
+<p class="whs1">print &quot;Criterion: \r
+ Area &lt; 60, Nb = &quot;, len(anIds) </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create a group by \r
+<p class="whs2"># create a group by \r
  adding elements with area &lt; 60</p>\r
 \r
-<p class="whs3">aGroup2 = mesh.CreateGroup(SMESH.FACE, \r
+<p class="whs1">aGroup2 = mesh.CreateGroup(SMESH.FACE, \r
  &quot;Area &lt; 60&quot;)</p>\r
 \r
-<p class="whs3">aGroup2.Add(anIds)</p>\r
+<p class="whs1">aGroup2.Add(anIds)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create an intersection \r
+<p class="whs2"># create an intersection \r
  of groups : 20 &lt; area &lt; 60</p>\r
 \r
-<p class="whs3">aGroup3 = mesh.IntersectGroups(aGroup1, \r
aGroup2, &quot;20 &lt; Area &lt; 60&quot;)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aGroup3 \r
= mesh.IntersectGroups(aGroup1, aGroup2, &quot;20 &lt; Area &lt; 60&quot;)</span></p>\r
 \r
-<p class="whs3">print &quot;Criterion: \r
+<p class="whs1">print &quot;Criterion: \r
  20 &lt; Area &lt; 60, Nb = &quot;, len(aGroup3.GetListOfID())</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">salome.sg.updateObjBrowser(1) \r
+<p class="whs1">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">&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_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
+<p class="whs3"><img src="pics/intersect_groups1.png" x-maintain-ratio="TRUE" width="314px" height="351px" border="0" class="img_whs10"> &nbsp;<img src="pics/intersect_groups2.png" x-maintain-ratio="TRUE" width="319px" height="351px" border="0" class="img_whs11"> &nbsp;<img src="pics/intersect_groups3.png" x-maintain-ratio="TRUE" width="304px" height="352px" border="0" class="img_whs12"></p>\r
 \r
 <h3><a name=bookmark4>Cut of two groups</a></h3>\r
 \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
+<p class="whs1">import SMESH_mechanic</p>\r
 \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"># 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
+<p class="whs1">&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">smesh &nbsp;= \r
+<p class="whs1">smesh &nbsp;= \r
  SMESH_mechanic.smesh</p>\r
 \r
-<p class="whs3">mesh &nbsp;&nbsp;= \r
+<p class="whs1">mesh &nbsp;&nbsp;= \r
  SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs3">salome = SMESH_mechanic.salome</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">salome = SMESH_mechanic.salome</p>\r
 \r
-<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs4"># Criterion : AREA \r
+<p class="whs2"># Criterion : AREA \r
  &gt; 20</p>\r
 \r
-<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
-\r
-<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
-\r
-<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
-\r
-<p class="whs3">aPredicate.SetMargin(20.)</p>\r
+<p class="whs1">aFilter = smesh.GetFilter(smesh.FACE, \r
+ smesh.FT_Area, smesh.FT_MoreThan, 20.)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
-\r
-<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter)</p>\r
 \r
-<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">print &quot;Criterion: \r
- Area &gt; 20, Nb = &quot;, len(anIds)</p>\r
+<p class="whs1">print &quot;Criterion: \r
+ Area &gt; 20, Nb = &quot;, len(anIds) </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create a group by \r
+<p class="whs2"># create a group by \r
  adding elements with area &gt; 20</p>\r
 \r
-<p class="whs3">aGroupMain = mesh.CreateGroup(SMESH.FACE, \r
- &quot;Area &gt; 20&quot;)</p>\r
-\r
-<p class="whs3">aGroupMain.Add(anIds)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aGroupMain \r
+ = mesh.MakeGroupByIds(&quot;Area &gt; 20&quot;, smesh.FACE, anIds)</span></p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># Criterion : AREA \r
+<p class="whs2"># Criterion : AREA \r
  &lt; 60</p>\r
 \r
-<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
-\r
-<p class="whs3">aPredicate = aFilterMgr.CreateLessThan()</p>\r
+<p class="whs1">aFilter = smesh.GetFilter(smesh.FACE, \r
+ smesh.FT_Area, smesh.FT_LessThan, 60.)</p>\r
 \r
-<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aPredicate.SetMargin(60.)</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
+<p class="whs1">print &quot;Criterion: \r
+ Area &lt; 60, Nb = &quot;, len(anIds) </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">print &quot;Criterion: \r
- Area &lt; 60, Nb = &quot;, len(anIds)</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs4"># create a group by \r
+<p class="whs2"># create a group by \r
  adding elements with area &lt; 60</p>\r
 \r
-<p class="whs3">aGroupTool = mesh.CreateGroup(SMESH.FACE, \r
- &quot;Area &lt; 60&quot;)</p>\r
-\r
-<p class="whs3">aGroupTool.Add(anIds)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aGroupTool \r
+ = mesh.MakeGroupByIds(&quot;Area &lt; 60&quot;, smesh.FACE, anIds)</span></p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create a cut of groups \r
+<p class="whs2"># create a cut of groups \r
  : area &gt;= 60</p>\r
 \r
-<p class="whs3">aGroupRes = mesh.CutGroups(aGroupMain, \r
aGroupTool, &quot;Area &gt;= 60&quot;)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aGroupRes \r
= mesh.CutGroups(aGroupMain, aGroupTool, &quot;Area &gt;= 60&quot;)</span></p>\r
 \r
-<p class="whs3">print &quot;Criterion: \r
+<p class="whs1">print &quot;Criterion: \r
  Area &gt;= 60, Nb = &quot;, len(aGroupRes.GetListOfID())</p>\r
 \r
-<p class="whs3">salome.sg.updateObjBrowser(1) \r
+<p class="whs1">&nbsp;</p>\r
+\r
+<p class="whs1">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&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_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
+<p class="whs3"><img src="pics/cut_groups1.png" x-maintain-ratio="TRUE" width="318px" height="355px" border="0" class="img_whs13"> &nbsp;<img src="pics/cut_groups2.png" x-maintain-ratio="TRUE" width="318px" height="355px" border="0" class="img_whs14"> &nbsp;<img src="pics/cut_groups3.png" x-maintain-ratio="TRUE" width="320px" height="354px" border="0" class="img_whs15"></p>\r
 \r
 <script type="text/javascript" language="javascript1.2">\r
 <!--\r
index 7338481cc7988230bddd341e78141dcff8d21d44..a166ae9329f6da236ac41cc8a3a2d6fc4707cc55 100755 (executable)
@@ -12,20 +12,19 @@ LI.kadov-P {  }
 -->\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
+p.whs1 { margin-top:0pt; margin-bottom:0pt; font-family:'Lucida Console' , monospace; }\r
+p.whs2 { margin-top:0pt; margin-bottom:0pt; font-family:'Times New Roman' , serif; }\r
+p.whs3 { margin-top:0pt; margin-bottom:0pt; }\r
+h4.whs4 { margin-top:0pt; margin-bottom:0pt; }\r
+p.whs5 { margin-top:0.5pt; margin-bottom:0pt; font-family:'Lucida Console' , monospace; }\r
+p.whs6 { margin-top:0.5pt; margin-bottom:0pt; }\r
+p.whs7 { margin-top:0.5pt; margin-bottom:0pt; font-family:'Times New Roman' , serif; }\r
+p.whs8 { font-family:'Lucida Console' , monospace; }\r
+p.whs9 { font-family:'Times New Roman' , serif; }\r
+p.whs10 { margin-left:36px; font-family:'Lucida Console' , monospace; }\r
+p.whs11 { margin-left:36px; }\r
+p.whs12 { margin-left:0px; font-family:'Times New Roman' , serif; }\r
+p.whs13 { font-family:'Lucida Console' , monospace; margin-left:0px; }\r
 -->\r
 </style><script type="text/javascript" language="JavaScript">\r
 <!--\r
@@ -35,12 +34,12 @@ 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 += "h4.whs5 {margin-top:1pt;margin-bottom:1pt; }";\r
+  strNSS += "h4.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 += "p.whs8 {margin-top:1pt;margin-bottom:1pt; }";\r
-  strNSS += "p.whs14 {margin-left:1pt; }";\r
+  strNSS += "p.whs12 {margin-left:1pt; }";\r
+  strNSS += "p.whs13 {margin-left:1pt; }";\r
   strNSS +="</style>";\r
   document.write(strNSS);\r
 }\r
@@ -109,1817 +108,1542 @@ if (window.writeIntopicBar)
 \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
+<p class="whs1">import SMESH_mechanic</p>\r
 \r
-<p class="whs3">mesh = SMESH_mechanic.mesh</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aMeshEditor = mesh.GetMeshEditor()</p>\r
+<p class="whs1">mesh = SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># add node</p>\r
+<p class="whs2"># add node</p>\r
 \r
-<p class="whs3">new_id = aMeshEditor.AddNode(50, \r
10, 0)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">new_id \r
= mesh.AddNode(50, 10, 0)</span></p>\r
 \r
-<p class="whs3">print &quot;&quot;</p>\r
+<p class="whs1">print &quot;&quot;</p>\r
 \r
-<p class="whs3">if new_id == 0: \r
+<p class="whs1">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
+<p class="whs1">else: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print \r
+ &quot;New Node has been added with ID &quot;, new_id &nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&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
+<p class="whs1">import SMESH_mechanic</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">mesh = SMESH_mechanic.mesh</p>\r
+<p class="whs1">mesh = SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs3">aMeshEditor = mesh.GetMeshEditor()</p>\r
+<p class="whs1">print &quot;&quot;</p>\r
 \r
-<p class="whs3">print &quot;&quot;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs2"># add node</p>\r
 \r
-<p class="whs4"># add node</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">n1 \r
+ = mesh.AddNode(50, 10, 0)</span></p>\r
 \r
-<p class="whs3">n1 = aMeshEditor.AddNode(50, \r
10, 0)</p>\r
+<p class="whs1">if n1 == 0: print \r
&quot;KO node addition.&quot; </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
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># add edge</p>\r
+<p class="whs2"># add edge</p>\r
 \r
-<p class="whs3">e1 = aMeshEditor.AddEdge([n1, \r
38])</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">e1 \r
= mesh.AddEdge([n1, 38])</span></p>\r
 \r
-<p class="whs3">if e1 == 0: print \r
+<p class="whs1">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
+<p class="whs1">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
+<p class="whs1">import SMESH_mechanic</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
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aMeshEditor = mesh.GetMeshEditor()</p>\r
+<p class="whs1">mesh = SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs3">print &quot;&quot;</p>\r
+<p class="whs1">print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># add node</p>\r
+<p class="whs2"># add node</p>\r
 \r
-<p class="whs3">n1 = aMeshEditor.AddNode(50, \r
+<p class="whs1">n1 = mesh.AddNode(50, \r
  10, 0)</p>\r
 \r
-<p class="whs3">if n1 == 0: print \r
+<p class="whs1">if n1 == 0: print \r
  &quot;KO node addition.&quot;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># add triangle</p>\r
+<p class="whs2"># add triangle</p>\r
 \r
-<p class="whs3">t1 = aMeshEditor.AddFace([n1, \r
+<p class="whs1">t1 = mesh.AddFace([n1, \r
  38, 39])</p>\r
 \r
-<p class="whs3">if t1 == 0: print \r
+<p class="whs1">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
+<p class="whs1">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
+<p class="whs1">import SMESH_mechanic</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">mesh = SMESH_mechanic.mesh</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aMeshEditor = mesh.GetMeshEditor()</p>\r
+<p class="whs1">mesh = SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs3">print &quot;&quot;</p>\r
+<p class="whs1">print &quot;&quot;</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs2"># add node</p>\r
+<p class="whs3"># add node</p>\r
 \r
-<p class="whs3">n1 = aMeshEditor.AddNode(50, \r
+<p class="whs1">n1 = mesh.AddNode(50, \r
  10, 0)</p>\r
 \r
-<p class="whs3">if n1 == 0: print \r
+<p class="whs1">if n1 == 0: print \r
  &quot;KO node addition.&quot;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">n2 = aMeshEditor.AddNode(40, \r
+<p class="whs1">n2 = mesh.AddNode(40, \r
  20, 0)</p>\r
 \r
-<p class="whs3">if n2 == 0: print \r
+<p class="whs1">if n2 == 0: print \r
  &quot;KO node addition.&quot;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs2"># add quadrangle</p>\r
+<p class="whs3"># add quadrangle</p>\r
 \r
-<p class="whs3">q1 = aMeshEditor.AddFace([n2, \r
+<p class="whs1">q1 = mesh.AddFace([n2, \r
  n1, 38, 39])</p>\r
 \r
-<p class="whs3">if q1 == 0: print \r
+<p class="whs1">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
+<p class="whs3"><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
+<p class="whs1">import SMESH_mechanic</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">mesh = SMESH_mechanic.mesh</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aMeshEditor = mesh.GetMeshEditor()</p>\r
+<p class="whs1">mesh = SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs3">print &quot;&quot;</p>\r
+<p class="whs1">print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># add node</p>\r
+<p class="whs2"># add node</p>\r
 \r
-<p class="whs3">n1 = aMeshEditor.AddNode(50, \r
+<p class="whs1">n1 = mesh.AddNode(50, \r
  10, 0)</p>\r
 \r
-<p class="whs3">if n1 == 0: print \r
+<p class="whs1">if n1 == 0: print \r
  &quot;KO node addition.&quot;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># add tetrahedron</p>\r
+<p class="whs2"># add tetrahedron</p>\r
 \r
-<p class="whs3">t1 = aMeshEditor.AddVolume([n1, \r
+<p class="whs1">t1 = mesh.AddVolume([n1, \r
  38, 39, 246])</p>\r
 \r
-<p class="whs3">if t1 == 0: print \r
+<p class="whs1">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
+<p class="whs3"><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
+<p class="whs1">import SMESH_mechanic</p>\r
 \r
-<p class="whs3">mesh = SMESH_mechanic.mesh</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aMeshEditor = mesh.GetMeshEditor()</p>\r
+<p class="whs1">mesh = SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs3">print &quot;&quot;</p>\r
+<p class="whs1">print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># add nodes</p>\r
+<p class="whs2"># add nodes</p>\r
 \r
-<p class="whs3">nId1 = aMeshEditor.AddNode(50, \r
+<p class="whs1">nId1 = mesh.AddNode(50, \r
  10, 0)</p>\r
 \r
-<p class="whs3">nId2 = aMeshEditor.AddNode(47, \r
+<p class="whs1">nId2 = mesh.AddNode(47, \r
  12, 0)</p>\r
 \r
-<p class="whs3">nId3 = aMeshEditor.AddNode(50, \r
+<p class="whs1">nId3 = mesh.AddNode(50, \r
  10, 10)</p>\r
 \r
-<p class="whs3">nId4 = aMeshEditor.AddNode(47, \r
+<p class="whs1">nId4 = mesh.AddNode(47, \r
  12, 10)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">if nId1 == 0 or \r
+<p class="whs1">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
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># add hexahedron</p>\r
+<p class="whs2"># add hexahedron</p>\r
 \r
-<p class="whs3">vId = aMeshEditor.AddVolume([nId2, \r
+<p class="whs1">vId = mesh.AddVolume([nId2, \r
  nId1, 38, 39, nId4, nId3, 245, 246])</p>\r
 \r
-<p class="whs3">if vId == 0: print \r
+<p class="whs1">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
+<p class="whs1">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
+<p class="whs1">&nbsp;</p>\r
 \r
 <h4>Add Polygon</h4>\r
 \r
-<p class="whs3"><span style="font-family: 'Lucida Console', monospace;">import \r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">import \r
  math</span></p>\r
 \r
-<p class="whs3">import salome</p>\r
+<p class="whs1">import salome</p>\r
 \r
-<p class="whs3">import smesh</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">import smesh</p>\r
 \r
-<p class="whs4"># create an empty mesh \r
- structure</p>\r
-\r
-<p class="whs3">gen = smesh.smesh</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">mesh = gen.CreateEmptyMesh()</p>\r
+<p class="whs2"># create an empty mesh \r
+ structure</p>\r
 \r
-<p class="whs3">MeshEditor = mesh.GetMeshEditor()</p>\r
+<p class="whs1">mesh = smesh.Mesh() \r
+ </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># a method to build \r
+<p class="whs2"># a method to build \r
  a polygonal mesh element with &lt;nb_vert&gt; angles:</p>\r
 \r
-<p class="whs3">def MakePolygon \r
+<p class="whs1">def MakePolygon \r
  (a_mesh, x0, y0, z0, radius, nb_vert):</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;al \r
+<p class="whs1">&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 class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;node_ids \r
  = []</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# \r
+<p class="whs2">&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
+<p class="whs1">&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
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nid \r
+ = mesh.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
+<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;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
+<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;z0)</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;node_ids.append(nid)</p>\r
+<p class="whs1">&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
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# \r
+<p class="whs2">&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
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;return \r
mesh.AddPolygonalFace(node_ids)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># Create three polygons</p>\r
+<p class="whs2"># Create three polygons</p>\r
 \r
-<p class="whs3">f1 = MakePolygon(mesh, \r
+<p class="whs1">f1 = MakePolygon(mesh, \r
  0, 0, &nbsp;0, \r
  30, 13)</p>\r
 \r
-<p class="whs3">f2 = MakePolygon(mesh, \r
+<p class="whs1">f2 = MakePolygon(mesh, \r
  0, 0, 10, 21, &nbsp;9)</p>\r
 \r
-<p class="whs3">f3 = MakePolygon(mesh, \r
+<p class="whs1">f3 = MakePolygon(mesh, \r
  0, 0, 20, 13, &nbsp;6)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">salome.sg.updateObjBrowser(1) \r
+<p class="whs1">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
+<p class="whs1"><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
+<p class="whs1">import math</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create an empty mesh \r
+<p class="whs2"># 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
+<p class="whs1">mesh = smesh.Mesh() \r
+ &nbsp;</p>\r
 \r
-<p class="whs3">MeshEditor = mesh.GetMeshEditor()</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># Create nodes for \r
+<p class="whs2"># Create nodes for \r
  12-hedron with pentagonal faces</p>\r
 \r
-<p class="whs3">al = 2 * math.pi \r
+<p class="whs1">al = 2 * math.pi \r
  / 5.0</p>\r
 \r
-<p class="whs3">cosal = math.cos(al)</p>\r
+<p class="whs1">cosal = math.cos(al)</p>\r
 \r
-<p class="whs3">aa = 13</p>\r
+<p class="whs1">aa = 13</p>\r
 \r
-<p class="whs3">rr = aa / (2.0 * \r
+<p class="whs1">rr = aa / (2.0 * \r
  math.sin(al/2.0))</p>\r
 \r
-<p class="whs3">dr = 2.0 * rr * \r
+<p class="whs1">dr = 2.0 * rr * \r
  cosal</p>\r
 \r
-<p class="whs3">r1 = rr + dr</p>\r
+<p class="whs1">r1 = rr + dr</p>\r
 \r
-<p class="whs3">dh = rr * math.sqrt(2.0 \r
+<p class="whs1">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
+<p class="whs1">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
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">dd = [] <span style="font-family: 'Times New Roman', serif;"># \r
+<p class="whs1">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
+<p class="whs1">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
+<p class="whs1">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
+<p class="whs1">aa = [] <span style="font-family: 'Times New Roman', serif;"># \r
  bottom</span></p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">for i in range(5):</p>\r
+<p class="whs1">for i in range(5):</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;cos_bot \r
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;cos_bot \r
  = math.cos(i*al)</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;sin_bot \r
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;sin_bot \r
  = math.sin(i*al)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;<span \r
+<p class="whs1">&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
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;sin_top \r
  = math.sin(i*al + al/2.0)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&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
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;nd \r
+ = mesh.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
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;nc \r
+ = mesh.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
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;nb \r
+ = mesh.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
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;na \r
+ = mesh.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
+<p class="whs1">&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
+<p class="whs1">&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
+<p class="whs1">&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
+<p class="whs1">&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
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;&nbsp;&nbsp;pass</p>\r
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># Create a polyhedral \r
+<p class="whs2"># Create a polyhedral \r
  volume (12-hedron with pentagonal faces)</p>\r
 \r
-<p class="whs3">MeshEditor.AddPolyhedralVolume([dd[0], \r
+<p class="whs1">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
+<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;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
+<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;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
+<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;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
+<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;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
+<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;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
+<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;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
+<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;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
+<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;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
+<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;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
+<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;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
+<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;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
+<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>\r
 \r
-<p class="whs3">salome.sg.updateObjBrowser(1) \r
+<p class="whs1">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&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
+<h4 class="whs4">Removing Nodes</h4>\r
 \r
-<h4 class="whs5">Removing Nodes</h4>\r
-\r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs3"><span style="font-family: 'Lucida Console', monospace;">import \r
+<p class="whs1"><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
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aMeshEditor = mesh.GetMeshEditor()</p>\r
+<p class="whs1">mesh = SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># remove nodes #246 \r
+<p class="whs2"># remove nodes #246 \r
  and #255</p>\r
 \r
-<p class="whs3">res = aMeshEditor.RemoveNodes([246, \r
+<p class="whs1">res = mesh.RemoveNodes([246, \r
  255])</p>\r
 \r
-<p class="whs3">if res == 1: print \r
+<p class="whs1">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
+<p class="whs1">else: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print \r
  &quot;KO nodes removing.&quot; </p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">&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
+<p class="whs1">import SMESH_mechanic</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">anEditor = mesh.GetMeshEditor()</p>\r
+<p class="whs1">mesh = SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># remove three elements: \r
+<p class="whs2"># remove three elements: \r
  #850, #859 and #814</p>\r
 \r
-<p class="whs3">res = anEditor.RemoveElements([850, \r
+<p class="whs1">res = mesh.RemoveElements([850, \r
  859, 814])</p>\r
 \r
-<p class="whs3">if res == 1: print \r
+<p class="whs1">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
+<p class="whs1">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
+<p class="whs1">&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
+<p class="whs5">import SMESH_mechanic</p>\r
 \r
-<p class="whs1"># For the moment smesh package doesn't provide \r
- methods to renumber nodes and elements. </p>\r
+<p class="whs5">&nbsp;</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
+<p class="whs5">mesh = SMESH_mechanic.mesh</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 class="whs6"><span style="font-family: 'Lucida Console', monospace;">mesh.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
+<p class="whs1">import SMESH_mechanic</p>\r
 \r
-<p class="whs3">import SMESH</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">import SMESH_mechanic</p>\r
+<p class="whs1">mesh = SMESH_mechanic.mesh</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
+<p class="whs3"># move node #38</p>\r
 \r
-<p class="whs3">aMeshEditor.MoveNode(38, \r
+<p class="whs1">mesh.MoveNode(38, \r
  20., 10., 0.) </p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs3">&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
+<p class="whs5">import salome</p>\r
 \r
-<p class="whs6">import smesh</p>\r
+<p class="whs5">import smesh</p>\r
 \r
-<p class="whs6">&nbsp;</p>\r
+<p class="whs5">&nbsp;</p>\r
 \r
-<p class="whs8"># create an empty mesh \r
+<p class="whs7"># 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
+<p class="whs5">mesh = smesh.Mesh() \r
+ </p>\r
 \r
-<p class="whs6">&nbsp;</p>\r
+<p class="whs5">&nbsp;</p>\r
 \r
-<p class="whs8"># create the following \r
+<p class="whs7"># create the following \r
  mesh:</p>\r
 \r
-<p class="whs6"># .----.----.----.</p>\r
+<p class="whs5"># .----.----.----.</p>\r
 \r
-<p class="whs6"># | &nbsp;&nbsp;/| \r
+<p class="whs5"># | &nbsp;&nbsp;/| \r
  &nbsp;&nbsp;/| \r
  &nbsp;&nbsp;/|</p>\r
 \r
-<p class="whs6"># | &nbsp;/ \r
+<p class="whs5"># | &nbsp;/ \r
  | &nbsp;/ | &nbsp;/ \r
  |</p>\r
 \r
-<p class="whs6"># | / &nbsp;| \r
+<p class="whs5"># | / &nbsp;| \r
  / &nbsp;| / &nbsp;|</p>\r
 \r
-<p class="whs6"># |/ &nbsp;&nbsp;|/ \r
+<p class="whs5"># |/ &nbsp;&nbsp;|/ \r
  &nbsp;&nbsp;|/ \r
  &nbsp;&nbsp;|</p>\r
 \r
-<p class="whs6"># .----.----.----.</p>\r
+<p class="whs5"># .----.----.----.</p>\r
 \r
-<p class="whs6">&nbsp;</p>\r
+<p class="whs5">&nbsp;</p>\r
 \r
-<p class="whs6">bb = [0, 0, 0, 0]</p>\r
+<p class="whs5">bb = [0, 0, 0, 0]</p>\r
 \r
-<p class="whs6">tt = [0, 0, 0, 0]</p>\r
+<p class="whs5">tt = [0, 0, 0, 0]</p>\r
 \r
-<p class="whs6">ff = [0, 0, 0, 0, \r
+<p class="whs5">ff = [0, 0, 0, 0, \r
  0, 0]</p>\r
 \r
-<p class="whs6">&nbsp;</p>\r
+<p class="whs5">&nbsp;</p>\r
 \r
-<p class="whs6">bb[0] = aMeshEditor.AddNode( \r
+<p class="whs5">bb[0] = mesh.AddNode( \r
  0., 0., 0.)</p>\r
 \r
-<p class="whs6">bb[1] = aMeshEditor.AddNode(10., \r
+<p class="whs5">bb[1] = mesh.AddNode(10., \r
  0., 0.)</p>\r
 \r
-<p class="whs6">bb[2] = aMeshEditor.AddNode(20., \r
+<p class="whs5">bb[2] = mesh.AddNode(20., \r
  0., 0.)</p>\r
 \r
-<p class="whs6">bb[3] = aMeshEditor.AddNode(30., \r
+<p class="whs5">bb[3] = mesh.AddNode(30., \r
  0., 0.)</p>\r
 \r
-<p class="whs6">&nbsp;</p>\r
+<p class="whs5">&nbsp;</p>\r
 \r
-<p class="whs6">tt[0] = aMeshEditor.AddNode( \r
+<p class="whs5">tt[0] = mesh.AddNode( \r
  0., 15., 0.)</p>\r
 \r
-<p class="whs6">tt[1] = aMeshEditor.AddNode(10., \r
+<p class="whs5">tt[1] = mesh.AddNode(10., \r
  15., 0.)</p>\r
 \r
-<p class="whs6">tt[2] = aMeshEditor.AddNode(20., \r
+<p class="whs5">tt[2] = mesh.AddNode(20., \r
  15., 0.)</p>\r
 \r
-<p class="whs6">tt[3] = aMeshEditor.AddNode(30., \r
+<p class="whs5">tt[3] = mesh.AddNode(30., \r
  15., 0.)</p>\r
 \r
-<p class="whs6">&nbsp;</p>\r
+<p class="whs5">&nbsp;</p>\r
 \r
-<p class="whs6">ff[0] = aMeshEditor.AddFace([bb[0], \r
+<p class="whs5">ff[0] = mesh.AddFace([bb[0], \r
  bb[1], tt[1]])</p>\r
 \r
-<p class="whs6">ff[1] = aMeshEditor.AddFace([bb[0], \r
+<p class="whs5">ff[1] = mesh.AddFace([bb[0], \r
  tt[1], tt[0]])</p>\r
 \r
-<p class="whs6">ff[2] = aMeshEditor.AddFace([bb[1], \r
+<p class="whs5">ff[2] = mesh.AddFace([bb[1], \r
  bb[2], tt[2]])</p>\r
 \r
-<p class="whs6">ff[3] = aMeshEditor.AddFace([bb[1], \r
+<p class="whs5">ff[3] = mesh.AddFace([bb[1], \r
  tt[2], tt[1]])</p>\r
 \r
-<p class="whs6">ff[4] = aMeshEditor.AddFace([bb[2], \r
+<p class="whs5">ff[4] = mesh.AddFace([bb[2], \r
  bb[3], tt[3]])</p>\r
 \r
-<p class="whs6">ff[5] = aMeshEditor.AddFace([bb[2], \r
+<p class="whs5">ff[5] = mesh.AddFace([bb[2], \r
  tt[3], tt[2]])</p>\r
 \r
-<p class="whs6">&nbsp;</p>\r
+<p class="whs5">&nbsp;</p>\r
 \r
-<p class="whs8"># inverse the diagonal \r
+<p class="whs7"># inverse the diagonal \r
  bb[1] - tt[2]</p>\r
 \r
-<p class="whs6">print &quot;\nDiagonal \r
+<p class="whs5">print &quot;\nDiagonal \r
  inversion ... &quot;,</p>\r
 \r
-<p class="whs6">res = aMeshEditor.InverseDiag(bb[1], \r
+<p class="whs5">res = mesh.InverseDiag(bb[1], \r
  tt[2])</p>\r
 \r
-<p class="whs6">if not res: print \r
+<p class="whs5">if not res: print \r
  &quot;failed!&quot;</p>\r
 \r
-<p class="whs6">else: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print \r
+<p class="whs5">else: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print \r
  &quot;done.&quot;</p>\r
 \r
-<p class="whs7">&nbsp;</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs7"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
+<p class="whs6"><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
+<p class="whs8">import salome</p>\r
 \r
-<p class="whs9">import smesh</p>\r
+<p class="whs8">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
+<p class="whs8">mesh = smesh.Mesh() \r
+ </p>\r
 \r
 <p>&nbsp;</p>\r
 \r
 <p># create the following mesh:</p>\r
 \r
-<p class="whs9"># .----.----.----.</p>\r
+<p class="whs8"># .----.----.----.</p>\r
 \r
-<p class="whs9"># | &nbsp;&nbsp;/| \r
+<p class="whs8"># | &nbsp;&nbsp;/| \r
  &nbsp;&nbsp;/| \r
  &nbsp;&nbsp;/|</p>\r
 \r
-<p class="whs9"># | &nbsp;/ \r
+<p class="whs8"># | &nbsp;/ \r
  | &nbsp;/ | &nbsp;/ \r
  |</p>\r
 \r
-<p class="whs9"># | / &nbsp;| \r
+<p class="whs8"># | / &nbsp;| \r
  / &nbsp;| / &nbsp;|</p>\r
 \r
-<p class="whs9"># |/ &nbsp;&nbsp;|/ \r
+<p class="whs8"># |/ &nbsp;&nbsp;|/ \r
  &nbsp;&nbsp;|/ \r
  &nbsp;&nbsp;|</p>\r
 \r
-<p class="whs9"># .----.----.----.</p>\r
+<p class="whs8"># .----.----.----.</p>\r
 \r
 <p>&nbsp;</p>\r
 \r
-<p class="whs9">bb = [0, 0, 0, 0]</p>\r
+<p class="whs8">bb = [0, 0, 0, 0]</p>\r
 \r
-<p class="whs9">tt = [0, 0, 0, 0]</p>\r
+<p class="whs8">tt = [0, 0, 0, 0]</p>\r
 \r
-<p class="whs9">ff = [0, 0, 0, 0, \r
+<p class="whs8">ff = [0, 0, 0, 0, \r
  0, 0]</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">bb[0] = aMeshEditor.AddNode( \r
0., 0., 0.)</p>\r
+<p class="whs8"><span style="font-family: 'Lucida Console', monospace;">bb[0] \r
= mesh.AddNode( 0., 0., 0.)</span></p>\r
 \r
-<p class="whs9">bb[1] = aMeshEditor.AddNode(10., \r
+<p class="whs8">bb[1] = mesh.AddNode(10., \r
  0., 0.)</p>\r
 \r
-<p class="whs9">bb[2] = aMeshEditor.AddNode(20., \r
+<p class="whs8">bb[2] = mesh.AddNode(20., \r
  0., 0.)</p>\r
 \r
-<p class="whs9">bb[3] = aMeshEditor.AddNode(30., \r
+<p class="whs8">bb[3] = mesh.AddNode(30., \r
  0., 0.)</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">tt[0] = aMeshEditor.AddNode( \r
+<p class="whs8">tt[0] = mesh.AddNode( \r
  0., 15., 0.)</p>\r
 \r
-<p class="whs9">tt[1] = aMeshEditor.AddNode(10., \r
+<p class="whs8">tt[1] = mesh.AddNode(10., \r
  15., 0.)</p>\r
 \r
-<p class="whs9">tt[2] = aMeshEditor.AddNode(20., \r
+<p class="whs8">tt[2] = mesh.AddNode(20., \r
  15., 0.)</p>\r
 \r
-<p class="whs9">tt[3] = aMeshEditor.AddNode(30., \r
+<p class="whs8">tt[3] = mesh.AddNode(30., \r
  15., 0.)</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">ff[0] = aMeshEditor.AddFace([bb[0], \r
+<p class="whs8">ff[0] = mesh.AddFace([bb[0], \r
  bb[1], tt[1]])</p>\r
 \r
-<p class="whs9">ff[1] = aMeshEditor.AddFace([bb[0], \r
+<p class="whs8">ff[1] = mesh.AddFace([bb[0], \r
  tt[1], tt[0]])</p>\r
 \r
-<p class="whs9">ff[2] = aMeshEditor.AddFace([bb[1], \r
+<p class="whs8">ff[2] = mesh.AddFace([bb[1], \r
  bb[2], tt[2]])</p>\r
 \r
-<p class="whs9">ff[3] = aMeshEditor.AddFace([bb[1], \r
+<p class="whs8">ff[3] = mesh.AddFace([bb[1], \r
  tt[2], tt[1]])</p>\r
 \r
-<p class="whs9">ff[4] = aMeshEditor.AddFace([bb[2], \r
+<p class="whs8">ff[4] = mesh.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
+<p class="whs8">ff[5] = mesh.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
+<p class="whs8">print &quot;\nUnite \r
  two triangles ... &quot;,</p>\r
 \r
-<p class="whs9">res = aMeshEditor.DeleteDiag(bb[1], \r
+<p class="whs8">res = mesh.DeleteDiag(bb[1], \r
  tt[2])</p>\r
 \r
-<p class="whs9">if not res: print \r
+<p class="whs8">if not res: print \r
  &quot;failed!&quot;</p>\r
 \r
-<p class="whs9">else: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print \r
+<p class="whs8">else: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print \r
  &quot;done.&quot;</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&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
+<p class="whs8">import salome</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
+<p class="whs8">import smesh</p>\r
 \r
-<p class="whs10">&nbsp;</p>\r
+<p class="whs8">&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
+<p class="whs9"># 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
+<p class="whs8">mesh = smesh.Mesh() \r
+ </p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs10"># create the following \r
+<p class="whs9"># create the following \r
  mesh:</p>\r
 \r
-<p class="whs9"># .----.----.----.</p>\r
+<p class="whs8"># .----.----.----.</p>\r
 \r
-<p class="whs9"># | &nbsp;&nbsp;/| \r
+<p class="whs8"># | &nbsp;&nbsp;/| \r
  &nbsp;&nbsp;/| \r
  &nbsp;&nbsp;/|</p>\r
 \r
-<p class="whs9"># | &nbsp;/ \r
+<p class="whs8"># | &nbsp;/ \r
  | &nbsp;/ | &nbsp;/ \r
  |</p>\r
 \r
-<p class="whs9"># | / &nbsp;| \r
+<p class="whs8"># | / &nbsp;| \r
  / &nbsp;| / &nbsp;|</p>\r
 \r
-<p class="whs9"># |/ &nbsp;&nbsp;|/ \r
+<p class="whs8"># |/ &nbsp;&nbsp;|/ \r
  &nbsp;&nbsp;|/ \r
  &nbsp;&nbsp;|</p>\r
 \r
-<p class="whs9"># .----.----.----.</p>\r
+<p class="whs8"># .----.----.----.</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">bb = [0, 0, 0, 0]</p>\r
+<p class="whs8">bb = [0, 0, 0, 0]</p>\r
 \r
-<p class="whs9">tt = [0, 0, 0, 0]</p>\r
+<p class="whs8">tt = [0, 0, 0, 0]</p>\r
 \r
-<p class="whs9">ff = [0, 0, 0, 0, \r
+<p class="whs8">ff = [0, 0, 0, 0, \r
  0, 0]</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">bb[0] = aMeshEditor.AddNode( \r
0., 0., 0.)</p>\r
+<p class="whs8"><span style="font-family: 'Lucida Console', monospace;">bb[0] \r
= mesh.AddNode( 0., 0., 0.)</span></p>\r
 \r
-<p class="whs9">bb[1] = aMeshEditor.AddNode(10., \r
+<p class="whs8">bb[1] = mesh.AddNode(10., \r
  0., 0.)</p>\r
 \r
-<p class="whs9">bb[2] = aMeshEditor.AddNode(20., \r
+<p class="whs8">bb[2] = mesh.AddNode(20., \r
  0., 0.)</p>\r
 \r
-<p class="whs9">bb[3] = aMeshEditor.AddNode(30., \r
+<p class="whs8">bb[3] = mesh.AddNode(30., \r
  0., 0.)</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">tt[0] = aMeshEditor.AddNode( \r
+<p class="whs8">tt[0] = mesh.AddNode( \r
  0., 15., 0.)</p>\r
 \r
-<p class="whs9">tt[1] = aMeshEditor.AddNode(10., \r
+<p class="whs8">tt[1] = mesh.AddNode(10., \r
  15., 0.)</p>\r
 \r
-<p class="whs9">tt[2] = aMeshEditor.AddNode(20., \r
+<p class="whs8">tt[2] = mesh.AddNode(20., \r
  15., 0.)</p>\r
 \r
-<p class="whs9">tt[3] = aMeshEditor.AddNode(30., \r
+<p class="whs8">tt[3] = mesh.AddNode(30., \r
  15., 0.)</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">ff[0] = aMeshEditor.AddFace([bb[0], \r
+<p class="whs8">ff[0] = mesh.AddFace([bb[0], \r
  bb[1], tt[1]])</p>\r
 \r
-<p class="whs9">ff[1] = aMeshEditor.AddFace([bb[0], \r
+<p class="whs8">ff[1] = mesh.AddFace([bb[0], \r
  tt[1], tt[0]])</p>\r
 \r
-<p class="whs9">ff[2] = aMeshEditor.AddFace([bb[1], \r
+<p class="whs8">ff[2] = mesh.AddFace([bb[1], \r
  bb[2], tt[2]])</p>\r
 \r
-<p class="whs9">ff[3] = aMeshEditor.AddFace([bb[1], \r
+<p class="whs8">ff[3] = mesh.AddFace([bb[1], \r
  tt[2], tt[1]])</p>\r
 \r
-<p class="whs9">ff[4] = aMeshEditor.AddFace([bb[2], \r
+<p class="whs8">ff[4] = mesh.AddFace([bb[2], \r
  bb[3], tt[3]])</p>\r
 \r
-<p class="whs9">ff[5] = aMeshEditor.AddFace([bb[2], \r
+<p class="whs8">ff[5] = mesh.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
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">aFilterMgr = smesh.smesh.CreateFilterManager()</p>\r
+<p class="whs9"># unite a set of triangles</p>\r
 \r
-<p class="whs9">aFunctor = aFilterMgr.CreateMinimumAngle()</p>\r
+<p class="whs8"><span style="font-family: 'Lucida Console', monospace;">print \r
+ &quot;\nUnite a set of triangles ... &quot;,</span></p>\r
 \r
-<p class="whs9">print &quot;\nUnite \r
a set of triangles ... &quot;,</p>\r
+<p class="whs8">res = mesh.TriToQuad([ff[2], \r
ff[3], ff[4], ff[5]], smesh.FT_MinimumAngle, 60.)</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
+<p class="whs8">if not res: print \r
  &quot;failed!&quot;</p>\r
 \r
-<p class="whs9">else: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print \r
+<p class="whs8">else: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print \r
  &quot;done.&quot;</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">salome.sg.updateObjBrowser(1) \r
- </p>\r
+<p class="whs8">salome.sg.updateObjBrowser(1) \r
&nbsp;</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
+<p class="whs8">import salome</p>\r
 \r
-<p class="whs10"># SMESH module</p>\r
+<p class="whs8">import smesh</p>\r
 \r
-<p class="whs9">gen = smesh.smesh</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">mesh = gen.CreateEmptyMesh()</p>\r
+<p># create an empty mesh structure</p>\r
 \r
-<p class="whs9">MeshEditor = mesh.GetMeshEditor()</p>\r
+<p class="whs8">mesh = smesh.Mesh() \r
+ </p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs10"># build five quadrangles:</p>\r
+<p class="whs9"># build five quadrangles:</p>\r
 \r
-<p class="whs9">dx = 10</p>\r
+<p class="whs8">dx = 10</p>\r
 \r
-<p class="whs9">dy = 20</p>\r
+<p class="whs8">dy = 20</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">n1 &nbsp;= \r
- MeshEditor.AddNode(0.0 * dx, 0, 0)</p>\r
+<p class="whs8"><span style="font-family: 'Lucida Console', monospace;">n1 \r
+ &nbsp;= mesh.AddNode(0.0 \r
+ * dx, 0, 0)</span></p>\r
 \r
-<p class="whs9">n2 &nbsp;= \r
MeshEditor.AddNode(1.0 * dx, 0, 0)</p>\r
+<p class="whs8">n2 &nbsp;= \r
mesh.AddNode(1.0 * dx, 0, 0)</p>\r
 \r
-<p class="whs9">n3 &nbsp;= \r
MeshEditor.AddNode(2.0 * dx, 0, 0)</p>\r
+<p class="whs8">n3 &nbsp;= \r
mesh.AddNode(2.0 * dx, 0, 0)</p>\r
 \r
-<p class="whs9">n4 &nbsp;= \r
MeshEditor.AddNode(3.0 * dx, 0, 0)</p>\r
+<p class="whs8">n4 &nbsp;= \r
mesh.AddNode(3.0 * dx, 0, 0)</p>\r
 \r
-<p class="whs9">n5 &nbsp;= \r
MeshEditor.AddNode(4.0 * dx, 0, 0)</p>\r
+<p class="whs8">n5 &nbsp;= \r
mesh.AddNode(4.0 * dx, 0, 0)</p>\r
 \r
-<p class="whs9">n6 &nbsp;= \r
MeshEditor.AddNode(5.0 * dx, 0, 0)</p>\r
+<p class="whs8">n6 &nbsp;= \r
mesh.AddNode(5.0 * dx, 0, 0)</p>\r
 \r
-<p class="whs9">n7 &nbsp;= \r
MeshEditor.AddNode(0.0 * dx, dy, 0)</p>\r
+<p class="whs8">n7 &nbsp;= \r
mesh.AddNode(0.0 * dx, dy, 0)</p>\r
 \r
-<p class="whs9">n8 &nbsp;= \r
MeshEditor.AddNode(1.0 * dx, dy, 0)</p>\r
+<p class="whs8">n8 &nbsp;= \r
mesh.AddNode(1.0 * dx, dy, 0)</p>\r
 \r
-<p class="whs9">n9 &nbsp;= \r
MeshEditor.AddNode(2.0 * dx, dy, 0)</p>\r
+<p class="whs8">n9 &nbsp;= \r
mesh.AddNode(2.0 * dx, dy, 0)</p>\r
 \r
-<p class="whs9">n10 = MeshEditor.AddNode(3.0 \r
+<p class="whs8">n10 = mesh.AddNode(3.0 \r
  * dx, dy, 0)</p>\r
 \r
-<p class="whs9">n11 = MeshEditor.AddNode(4.0 \r
+<p class="whs8">n11 = mesh.AddNode(4.0 \r
  * dx, dy, 0)</p>\r
 \r
-<p class="whs9">n12 = MeshEditor.AddNode(5.0 \r
+<p class="whs8">n12 = mesh.AddNode(5.0 \r
  * dx, dy, 0)</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">f1 = MeshEditor.AddFace([n1, \r
+<p class="whs8">f1 = mesh.AddFace([n1, \r
  n2, n8 , n7 ])</p>\r
 \r
-<p class="whs9">f2 = MeshEditor.AddFace([n2, \r
+<p class="whs8">f2 = mesh.AddFace([n2, \r
  n3, n9 , n8 ])</p>\r
 \r
-<p class="whs9">f3 = MeshEditor.AddFace([n3, \r
+<p class="whs8">f3 = mesh.AddFace([n3, \r
  n4, n10, n9 ])</p>\r
 \r
-<p class="whs9">f4 = MeshEditor.AddFace([n4, \r
+<p class="whs8">f4 = mesh.AddFace([n4, \r
  n5, n11, n10])</p>\r
 \r
-<p class="whs9">f5 = MeshEditor.AddFace([n5, \r
- n6, n12, n11])</p>\r
+<p class="whs8">f5 = mesh.AddFace([n5, \r
+ n6, n12, n11]) </p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs10"># Change the orientation \r
+<p class="whs9"># Change the orientation \r
  of the second and the fourth faces.</p>\r
 \r
-<p class="whs9">MeshEditor.Reorient([2, \r
+<p class="whs8">mesh.Reorient([2, \r
  4])</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">salome.sg.updateObjBrowser(1) \r
+<p class="whs8">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&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
+<p class="whs8">import SMESH_mechanic</p>\r
 \r
-<p class="whs1"># For the moment smesh package doesn't provide \r
- methods to cut quadrangles. </p>\r
+<p class="whs8">&nbsp;</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
+<p class="whs8">smesh = SMESH_mechanic.smesh</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
+<p class="whs8">mesh &nbsp;= \r
  SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs10"># cut two quadrangles: \r
+<p class="whs9"># 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
+<p class="whs8">mesh.QuadToTri([405, \r
+ 406], smesh.FT_MinimumAngle) &nbsp;</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
+<p class="whs8">import salome</p>\r
 \r
-<p class="whs9">import geompy</p>\r
+<p class="whs8">import geompy</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">import SMESH</p>\r
+<p class="whs8">import SMESH_mechanic</p>\r
 \r
-<p class="whs9">import SMESH_mechanic</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8"><span style="font-family: 'Lucida Console', monospace;">smesh \r
+ = SMESH_mechanic.smesh</span></p>\r
 \r
-<p class="whs9">mesh = SMESH_mechanic.mesh</p>\r
+<p class="whs8">mesh = SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs9">aMeshEditor = mesh.GetMeshEditor()</p>\r
-\r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs10"># select the top face</p>\r
+<p class="whs9"># 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
+<p class="whs8"><span style="font-family: 'Lucida Console', monospace;">faces \r
= geompy.SubShapeAllSorted(SMESH_mechanic.shape_mesh, geompy.ShapeType[&quot;FACE&quot;])</span></p>\r
 \r
-<p class="whs9">face = faces[3]</p>\r
+<p class="whs8">face = faces[3]</p>\r
 \r
-<p class="whs9">geompy.addToStudyInFather(SMESH_mechanic.shape_mesh, \r
+<p class="whs8">geompy.addToStudyInFather(SMESH_mechanic.shape_mesh, \r
  face, &quot;face planar with hole&quot;)</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs10"># create a group of faces \r
- to be smoothed</p>\r
+<p class="whs8"># create a group of \r
faces to be smoothed</p>\r
 \r
-<p class="whs9">GroupSmooth = mesh.CreateGroupFromGEOM(SMESH.FACE\r
- &quot;Group of faces (smooth)&quot;, face)</p>\r
+<p class="whs8">GroupSmooth = mesh.GroupOnGeom(face\r
+ &quot;Group of faces (smooth)&quot;, smesh.FACE)</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs10"># perform smoothing</p>\r
+<p class="whs8"># perform smoothing</p>\r
 \r
-<p class="whs10"># boolean SmoothObject(Object, \r
- IDsOfFixedNodes, MaxNbOfIterations, MaxAspectRatio, Method)</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">res = aMeshEditor.SmoothObject(GroupSmooth\r
[], 20, 2., SMESH.SMESH_MeshEditor.CENTROIDAL_SMOOTH)</p>\r
+<p class="whs8"># boolean SmoothObject(Object\r
IDsOfFixedNodes, MaxNbOfIterations, MaxAspectRatio, Method)</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">res = mesh.SmoothObject(GroupSmooth, \r
+ [], 20, 2., smesh.CENTROIDAL_SMOOTH)</p>\r
 \r
-<p class="whs9">print &quot;\nSmoothing \r
+<p class="whs8">print &quot;\nSmoothing \r
  ... &quot;,</p>\r
 \r
-<p class="whs9">if not res: print \r
+<p class="whs8">if not res: print \r
  &quot;failed!&quot;</p>\r
 \r
-<p class="whs9">else: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print \r
+<p class="whs8">else: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print \r
  &quot;done.&quot;</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">salome.sg.updateObjBrowser(1) \r
+<p class="whs8">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&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
+<p class="whs8">import salome</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
+<p class="whs8">import geompy</p>\r
 \r
-<p class="whs9">import SMESH</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">import SMESH_mechanic</p>\r
+<p class="whs8">import SMESH_mechanic</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">mesh = SMESH_mechanic.mesh</p>\r
+<p class="whs8"><span style="font-family: 'Lucida Console', monospace;">smesh \r
+ = SMESH_mechanic.smesh</span></p>\r
 \r
-<p class="whs9">aMeshEditor = mesh.GetMeshEditor()</p>\r
+<p class="whs8">mesh = SMESH_mechanic.mesh \r
+ </p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs10"># select the top face</p>\r
+<p class="whs9"># select the top face</p>\r
 \r
-<p class="whs9">faces = geompy.SubShapeAllSorted(SMESH_mechanic.shape_mesh, \r
+<p class="whs8">faces = geompy.SubShapeAllSorted(SMESH_mechanic.shape_mesh, \r
  geompy.ShapeType[&quot;FACE&quot;])</p>\r
 \r
-<p class="whs9">face = faces[7]</p>\r
+<p class="whs8">face = faces[7]</p>\r
 \r
-<p class="whs9">geompy.addToStudyInFather(SMESH_mechanic.shape_mesh, \r
+<p class="whs8">geompy.addToStudyInFather(SMESH_mechanic.shape_mesh, \r
  face, &quot;face circular top&quot;)</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs10"># create a vector for \r
- extrusion</p>\r
+<p class="whs8"># create a vector \r
for extrusion</p>\r
 \r
-<p class="whs9">point = SMESH.PointStruct(0., \r
+<p class="whs8">point = smesh.PointStruct(0., \r
  0., 5.)</p>\r
 \r
-<p class="whs9">vector = SMESH.DirStruct(point)</p>\r
+<p class="whs8">vector = smesh.DirStruct(point)</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs10"># create a group to be \r
- extruded</p>\r
+<p class="whs8"># create a group to \r
be extruded</p>\r
 \r
-<p class="whs9">GroupTri = mesh.CreateGroupFromGEOM(SMESH.FACE\r
- &quot;Group of faces (extrusion)&quot;, face)</p>\r
+<p class="whs8">GroupTri = mesh.GroupOnGeom(face\r
+ &quot;Group of faces (extrusion)&quot;, smesh.FACE)</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs10"># perform extrusion of \r
- the group</p>\r
+<p class="whs8"># perform extrusion \r
of the group</p>\r
 \r
-<p class="whs9">aMeshEditor.ExtrusionSweepObject(GroupTri, \r
+<p class="whs8">mesh.ExtrusionSweepObject(GroupTri, \r
  vector, 5)</p>\r
 \r
-<p class="whs10">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs10"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
+<p class="whs9"><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
+<p class="whs8">import math</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
+<p class="whs8">import salome</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">import math</p>\r
+<p class="whs9"># Geometry</p>\r
 \r
-<p class="whs9">import salome</p>\r
+<p class="whs8">import geompy</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
+<p class="whs9"># 1. Create points</p>\r
 \r
-<p class="whs10"># 1. Create points</p>\r
-\r
-<p class="whs9">points = [[0, 0], \r
+<p class="whs8">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
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">iv = 1</p>\r
+<p class="whs8">iv = 1</p>\r
 \r
-<p class="whs9">vertices = []</p>\r
+<p class="whs8">vertices = []</p>\r
 \r
-<p class="whs9">for point in points:</p>\r
+<p class="whs8">for point in points:</p>\r
 \r
-<p class="whs11">vert \r
+<p class="whs10">vert \r
  = geompy.MakeVertex(point[0], point[1], 0)</p>\r
 \r
-<p class="whs11">geompy.addToStudy(vert, \r
+<p class="whs10">geompy.addToStudy(vert, \r
  &quot;Vertex_&quot; + `iv`)</p>\r
 \r
-<p class="whs11">vertices.append(vert)</p>\r
+<p class="whs10">vertices.append(vert)</p>\r
 \r
-<p class="whs11">iv \r
+<p class="whs10">iv \r
  += 1</p>\r
 \r
-<p class="whs11">pass</p>\r
+<p class="whs10">pass</p>\r
 \r
-<p class="whs10">&nbsp;</p>\r
+<p class="whs9">&nbsp;</p>\r
 \r
-<p class="whs10"># 2. Create edges and \r
+<p class="whs9"># 2. Create edges and \r
  wires</p>\r
 \r
-<p class="whs9">Edge_straight = geompy.MakeEdge(vertices[0], \r
+<p class="whs8">Edge_straight = geompy.MakeEdge(vertices[0], \r
  vertices[4])</p>\r
 \r
-<p class="whs9">Edge_bezierrr = geompy.MakeBezier(vertices)</p>\r
+<p class="whs8">Edge_bezierrr = geompy.MakeBezier(vertices)</p>\r
 \r
-<p class="whs9">Wire_polyline = geompy.MakePolyline(vertices)</p>\r
+<p class="whs8">Wire_polyline = geompy.MakePolyline(vertices)</p>\r
 \r
-<p class="whs9">Edge_Circle &nbsp;&nbsp;= \r
+<p class="whs8">Edge_Circle &nbsp;&nbsp;= \r
  geompy.MakeCircleThreePnt(vertices[0], vertices[1], vertices[2])</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">geompy.addToStudy(Edge_straight, \r
+<p class="whs8">geompy.addToStudy(Edge_straight, \r
  &quot;Edge_straight&quot;)</p>\r
 \r
-<p class="whs9">geompy.addToStudy(Edge_bezierrr, \r
+<p class="whs8">geompy.addToStudy(Edge_bezierrr, \r
  &quot;Edge_bezierrr&quot;)</p>\r
 \r
-<p class="whs9">geompy.addToStudy(Wire_polyline, \r
+<p class="whs8">geompy.addToStudy(Wire_polyline, \r
  &quot;Wire_polyline&quot;)</p>\r
 \r
-<p class="whs9">geompy.addToStudy(Edge_Circle \r
+<p class="whs8">geompy.addToStudy(Edge_Circle \r
  &nbsp;, &quot;Edge_Circle&quot;)</p>\r
 \r
-<p class="whs10">&nbsp;</p>\r
+<p class="whs9">&nbsp;</p>\r
 \r
-<p class="whs10"># 3. Explode wire on \r
+<p class="whs9"># 3. Explode wire on \r
  edges, as they will be used for mesh extrusion</p>\r
 \r
-<p class="whs9">Wire_polyline_edges \r
+<p class="whs8">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
+<p class="whs8">for ii in range(len(Wire_polyline_edges)):</p>\r
 \r
-<p class="whs11">geompy.addToStudyInFather(Wire_polyline, \r
+<p class="whs10">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
+<p class="whs10">pass</p>\r
 \r
-<p class="whs9">smeshgui.Init(salome.myStudyId)</p>\r
+<p class="whs11">&nbsp;</p>\r
 \r
-<p class="whs10">&nbsp;</p>\r
+<p class="whs9"># Mesh</p>\r
 \r
-<p class="whs10"># 1D algorithm and three \r
- 1D hypotheses</p>\r
+<p class="whs8">import smesh</p>\r
 \r
-<p class="whs9">Wire_discretisation \r
- = gen.CreateHypothesis('Regular_1D', 'libStdMeshersEngine.so')</p>\r
+<p class="whs8">&nbsp;</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
+<p class="whs12"># Mesh \r
+ the given shape with the given 1d hypothesis</p>\r
 \r
-<p class="whs10"># Mesh given shape with \r
given 1d hypothesis</p>\r
+<p class="whs13">def \r
Mesh1D(shape1d, nbSeg, name):</p>\r
 \r
-<p class="whs9">def Mesh1D(shape1d, \r
hyp1d, name):</p>\r
+<p class="whs13">&nbsp;&nbsp;mesh1d_tool \r
= smesh.Mesh(shape1d, name)</p>\r
 \r
-<p class="whs11">mesh1d_tool \r
- = smesh.Mesh(shape1d)</p>\r
+<p class="whs13">&nbsp;&nbsp;algo \r
+ = mesh1d_tool.Segment()</p>\r
 \r
-<p class="whs11">mesh1d \r
= mesh1d_tool.GetMesh()</p>\r
+<p class="whs13">&nbsp;&nbsp;hyp \r
&nbsp;= algo.NumberOfSegments(nbSeg)</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
+<p class="whs13">&nbsp;&nbsp;isDone \r
  = mesh1d_tool.Compute()</p>\r
 \r
-<p class="whs11">if \r
+<p class="whs13">&nbsp;&nbsp;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
+<p class="whs13">&nbsp;&nbsp;return \r
+ mesh1d_tool</p>\r
 \r
-<p class="whs9">def MakeQuadMesh2(mesh_name):</p>\r
+<p class="whs12"># Create \r
+ a mesh with six nodes, seven edges and two quadrangle faces</p>\r
 \r
-<p class="whs11">quad_1 \r
= gen.CreateEmptyMesh()</p>\r
+<p class="whs13">def \r
MakeQuadMesh2(mesh_name):</p>\r
 \r
-<p class="whs11">smeshgui.SetName(salome.ObjectToID(quad_1), \r
- mesh_name)</p>\r
+<p class="whs13">&nbsp;&nbsp;quad_1 \r
= smesh.Mesh(name = mesh_name)</p>\r
 \r
-<p class="whs11">editor_1 \r
- = quad_1.GetMeshEditor()</p>\r
+<p class="whs13">&nbsp;&nbsp;</p>\r
 \r
-<p class="whs12">&nbsp;</p>\r
+<p class="whs13">&nbsp;&nbsp;<span \r
+ style="font-family: 'Times New Roman', serif;"># \r
+ six nodes</span></p>\r
 \r
-<p class="whs12"># six nodes</p>\r
+<p class="whs13">&nbsp;&nbsp;n1 \r
+ = quad_1.AddNode(0, 20, 10)</p>\r
 \r
-<p class="whs11">n1 \r
- = editor_1.AddNode(0, 20, 10)</p>\r
+<p class="whs13">&nbsp;&nbsp;n2 \r
+ = quad_1.AddNode(0, 40, 10)</p>\r
 \r
-<p class="whs11">n2 \r
- = editor_1.AddNode(0, 40, 10)</p>\r
+<p class="whs13">&nbsp;&nbsp;n3 \r
+ = quad_1.AddNode(0, 40, 30)</p>\r
 \r
-<p class="whs11">n3 \r
- = editor_1.AddNode(0, 40, 30)</p>\r
+<p class="whs13">&nbsp;&nbsp;n4 \r
+ = quad_1.AddNode(0, 20, 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
+<p class="whs13">&nbsp;&nbsp;n5 \r
+ = quad_1.AddNode(0, &nbsp;0, \r
  30)</p>\r
 \r
-<p class="whs11">n6 \r
- = editor_1.AddNode(0, &nbsp;0, \r
+<p class="whs13">&nbsp;&nbsp;n6 \r
+ = quad_1.AddNode(0, &nbsp;0, \r
  10)</p>\r
 \r
-<p class="whs12">&nbsp;</p>\r
+<p class="whs13">&nbsp;&nbsp;</p>\r
 \r
-<p class="whs12"># seven edges</p>\r
+<p class="whs13">&nbsp;&nbsp;<span \r
+ style="font-family: 'Times New Roman', serif;"># \r
+ seven edges</span></p>\r
 \r
-<p class="whs11">editor_1.AddEdge([n1, \r
+<p class="whs13">&nbsp;&nbsp;quad_1.AddEdge([n1, \r
  n2]) # 1</p>\r
 \r
-<p class="whs11">editor_1.AddEdge([n2, \r
+<p class="whs13">&nbsp;&nbsp;quad_1.AddEdge([n2, \r
  n3]) # 2</p>\r
 \r
-<p class="whs11">editor_1.AddEdge([n3, \r
+<p class="whs13">&nbsp;&nbsp;quad_1.AddEdge([n3, \r
  n4]) # 3</p>\r
 \r
-<p class="whs11">editor_1.AddEdge([n4, \r
+<p class="whs13">&nbsp;&nbsp;quad_1.AddEdge([n4, \r
  n1]) # 4</p>\r
 \r
-<p class="whs11">editor_1.AddEdge([n4, \r
+<p class="whs13">&nbsp;&nbsp;quad_1.AddEdge([n4, \r
  n5]) # 5</p>\r
 \r
-<p class="whs11">editor_1.AddEdge([n5, \r
+<p class="whs13">&nbsp;&nbsp;quad_1.AddEdge([n5, \r
  n6]) # 6</p>\r
 \r
-<p class="whs11">editor_1.AddEdge([n6, \r
+<p class="whs13">&nbsp;&nbsp;quad_1.AddEdge([n6, \r
  n1]) # 7</p>\r
 \r
-<p class="whs12">&nbsp;</p>\r
+<p class="whs13">&nbsp;</p>\r
 \r
-<p class="whs12"># two quadrangle faces</p>\r
+<p class="whs13">&nbsp;&nbsp;<span \r
+ style="font-family: 'Times New Roman', serif;"># \r
+ two quadrangle faces</span></p>\r
 \r
-<p class="whs11">editor_1.AddFace([n1, \r
+<p class="whs13">&nbsp;&nbsp;quad_1.AddFace([n1, \r
  n2, n3, n4]) # 8</p>\r
 \r
-<p class="whs11">editor_1.AddFace([n1, \r
+<p class="whs13">&nbsp;&nbsp;quad_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
+<p class="whs13">&nbsp;&nbsp;return \r
+ [quad_1, [1,2,3,4,5,6,7], [8,9]]</p>\r
 \r
-<p class="whs10">&nbsp;</p>\r
+<p class="whs13">&nbsp;</p>\r
 \r
-<p class="whs10"># Path meshes</p>\r
+<p class="whs12"># Path \r
+ meshes</p>\r
 \r
-<p class="whs9">Edge_straight_mesh \r
- = Mesh1D(Edge_straight, Nb_Segments_7, &quot;Edge_straight&quot;)</p>\r
+<p class="whs13">Edge_straight_mesh \r
+ = Mesh1D(Edge_straight, 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
+<p class="whs13">Edge_bezierrr_mesh \r
+ = Mesh1D(Edge_bezierrr, 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
+<p class="whs13">Wire_polyline_mesh \r
+ = Mesh1D(Wire_polyline, 3, &quot;Wire_polyline&quot;)</p>\r
 \r
-<p class="whs9">Edge_Circle_mesh &nbsp;&nbsp;= \r
+<p class="whs13">Edge_Circle_mesh \r
+ &nbsp;&nbsp;= \r
  Mesh1D(Edge_Circle &nbsp;, \r
Nb_Segments_8, &quot;Edge_Circle&quot;)</p>\r
+ 8, &quot;Edge_Circle&quot;)</p>\r
 \r
-<p class="whs10">&nbsp;</p>\r
+<p class="whs13">&nbsp;</p>\r
 \r
-<p class="whs10"># Initial meshes (to \r
- be extruded)</p>\r
+<p class="whs12"># Initial \r
meshes (to be extruded)</p>\r
 \r
-<p class="whs9">[quad_1, editor_1, \r
+<p class="whs13">[quad_1, \r
  ee_1, ff_1] = MakeQuadMesh2(&quot;quad_1&quot;)</p>\r
 \r
-<p class="whs9">[quad_2, editor_2, \r
+<p class="whs13">[quad_2, \r
  ee_2, ff_2] = MakeQuadMesh2(&quot;quad_2&quot;)</p>\r
 \r
-<p class="whs9">[quad_3, editor_3, \r
+<p class="whs13">[quad_3, \r
  ee_3, ff_3] = MakeQuadMesh2(&quot;quad_3&quot;)</p>\r
 \r
-<p class="whs9">[quad_4, editor_4, \r
+<p class="whs13">[quad_4, \r
  ee_4, ff_4] = MakeQuadMesh2(&quot;quad_4&quot;)</p>\r
 \r
-<p class="whs9">[quad_5, editor_5, \r
+<p class="whs13">[quad_5, \r
  ee_5, ff_5] = MakeQuadMesh2(&quot;quad_5&quot;)</p>\r
 \r
-<p class="whs9">[quad_6, editor_6, \r
+<p class="whs13">[quad_6, \r
  ee_6, ff_6] = MakeQuadMesh2(&quot;quad_6&quot;)</p>\r
 \r
-<p class="whs9">[quad_7, editor_7, \r
+<p class="whs13">[quad_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
+<p class="whs13">&nbsp;</p>\r
 \r
-<p class="whs10"># IDsOfElements, PathMesh, \r
- PathShape, NodeStart,</p>\r
+<p class="whs12"># ExtrusionAlongPath</p>\r
 \r
-<p class="whs10"># HasAngles, Angles, \r
HasRefPoint, RefPoint</p>\r
+<p class="whs12"># IDsOfElements, \r
PathMesh, PathShape, NodeStart,</p>\r
 \r
-<p class="whs10">&nbsp;</p>\r
+<p class="whs12"># HasAngles, \r
+ Angles, HasRefPoint, RefPoint</p>\r
 \r
-<p class="whs9">refPoint = SMESH.PointStruct(0, \r
- 0, 0)</p>\r
+<p class="whs13">refPoint \r
= smesh.PointStruct(0, 0, 0)</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs13">a10 \r
+ = 10.0*math.pi/180.0</p>\r
 \r
-<p class="whs9">a10 = 10.0*math.pi/180.0</p>\r
+<p class="whs13">a45 \r
+ = 45.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
+<p class="whs13">&nbsp;</p>\r
 \r
-<p class="whs10"># 1. Extrusion of two \r
- mesh edges along a straight path</p>\r
+<p class="whs12"># 1. \r
Extrusion of two 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
+<p class="whs13">error \r
+ = quad_1.ExtrusionAlongPath([1,2], Edge_straight_mesh, Edge_straight, \r
+ 1,</p>\r
 \r
-<p class="whs13">&nbsp;&nbsp;&nbsp;&nbsp;0, \r
+<p class="whs13">&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;&nbsp;0, \r
  [], 0, refPoint)</p>\r
 \r
-<p class="whs10">&nbsp;</p>\r
+<p class="whs13">&nbsp;</p>\r
 \r
-<p class="whs10"># 2. Extrusion of one \r
- mesh edge along a curved path</p>\r
+<p class="whs12"># 2. \r
Extrusion of one 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
+<p class="whs13">error \r
= quad_2.ExtrusionAlongPath([2], Edge_bezierrr_mesh, Edge_bezierrr, 1,</p>\r
 \r
-<p class="whs13">&nbsp;&nbsp;&nbsp;&nbsp;0, \r
+<p class="whs13">&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;&nbsp;0, \r
  [], 0, refPoint)</p>\r
 \r
-<p class="whs10">&nbsp;</p>\r
+<p class="whs13">&nbsp;</p>\r
 \r
-<p class="whs10"># 3. Extrusion of one \r
mesh edge along a curved path with usage of angles </p>\r
+<p class="whs12"># 3. \r
Extrusion of one 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
+<p class="whs13">error \r
= quad_3.ExtrusionAlongPath([2], Edge_bezierrr_mesh, Edge_bezierrr, 1,</p>\r
 \r
-<p class="whs13">&nbsp;&nbsp;&nbsp;&nbsp;1, \r
+<p class="whs13">&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;&nbsp;1, \r
  [a45, a45, a45, 0, -a45, -a45, -a45], 0, refPoint)</p>\r
 \r
-<p class="whs10">&nbsp;</p>\r
+<p class="whs13">&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
+<p class="whs12"># 4. \r
+ Extrusion of one mesh edge along the path, which is a part of a meshed \r
+ wire</p>\r
 \r
-<p class="whs9">error = editor_4.ExtrusionAlongPath([4], \r
- Wire_polyline_mesh, Wire_polyline_edges[0], 1,</p>\r
+<p class="whs13">error \r
+ = quad_4.ExtrusionAlongPath([4], Wire_polyline_mesh, Wire_polyline_edges[0], \r
+ 1,</p>\r
 \r
-<p class="whs13">&nbsp;&nbsp;&nbsp;&nbsp;1, \r
+<p class="whs13">&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;&nbsp;1, \r
  [a10, a10, a10], 0, refPoint)</p>\r
 \r
-<p class="whs10">&nbsp;</p>\r
+<p class="whs13">&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
+<p class="whs12"># 5. \r
+ Extrusion of two mesh faces along the path, which is a part of a meshed \r
+ wire</p>\r
 \r
-<p class="whs9">error = editor_5.ExtrusionAlongPath(ff_5 \r
- , Wire_polyline_mesh, Wire_polyline_edges[2], 4,</p>\r
+<p class="whs13">error \r
+ = quad_5.ExtrusionAlongPath(ff_5 , Wire_polyline_mesh, Wire_polyline_edges[2], \r
+ 4,</p>\r
 \r
-<p class="whs13">&nbsp;&nbsp;&nbsp;&nbsp;0, \r
+<p class="whs13">&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;&nbsp;0, \r
  [], 0, refPoint)</p>\r
 \r
-<p class="whs10">&nbsp;</p>\r
+<p class="whs13">&nbsp;</p>\r
 \r
-<p class="whs10"># 6. Extrusion of two \r
- mesh faces along a closed path</p>\r
+<p class="whs12"># 6. \r
Extrusion of two 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
+<p class="whs13">error \r
= quad_6.ExtrusionAlongPath(ff_6 , Edge_Circle_mesh, Edge_Circle, 1,</p>\r
 \r
-<p class="whs13">&nbsp;&nbsp;&nbsp;&nbsp;0, \r
+<p class="whs13">&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;&nbsp;0, \r
  [], 0, refPoint)</p>\r
 \r
-<p class="whs10">&nbsp;</p>\r
+<p class="whs13">&nbsp;</p>\r
 \r
-<p class="whs10"># 7. Extrusion of two \r
mesh faces along a closed path with usage of angles </p>\r
+<p class="whs12"># 7. \r
Extrusion of two 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
+<p class="whs13">error \r
= quad_7.ExtrusionAlongPath(ff_7, 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
+<p class="whs13">&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;&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
+<p class="whs13">salome.sg.updateObjBrowser(1) \r
+ </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
+<p class="whs8">import math</p>\r
 \r
-<p class="whs9">import math</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">import SMESH</p>\r
+<p class="whs8">import SMESH_mechanic</p>\r
 \r
-<p class="whs9">import SMESH_mechanic</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8"><span style="font-family: 'Lucida Console', monospace;">mesh \r
+ &nbsp;= SMESH_mechanic.mesh</span></p>\r
 \r
-<p class="whs9">mesh = SMESH_mechanic.mesh</p>\r
+<p class="whs8">smesh = SMESH_mechanic.smesh</p>\r
 \r
-<p class="whs9">aMeshEditor = mesh.GetMeshEditor()</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
-\r
-<p class="whs10"># create a group of faces \r
+<p class="whs9"># create a group of faces \r
  to be revolved</p>\r
 \r
-<p class="whs9">FacesRotate = [492, \r
+<p class="whs8">FacesRotate = [492, \r
  493, 502, 503]</p>\r
 \r
-<p class="whs9">GroupRotate = mesh.CreateGroup(SMESH.FACE,&quot;Group \r
+<p class="whs8">GroupRotate = mesh.CreateGroup(SMESH.FACE,&quot;Group \r
  of faces (rotate)&quot;)</p>\r
 \r
-<p class="whs9">GroupRotate.Add(FacesRotate)</p>\r
+<p class="whs8">GroupRotate.Add(FacesRotate)</p>\r
 \r
-<p class="whs10">&nbsp;</p>\r
+<p class="whs9">&nbsp;</p>\r
 \r
-<p class="whs10"># define revolution angle \r
+<p class="whs9"># define revolution angle \r
  and axis</p>\r
 \r
-<p class="whs9">angle45 = 45 * math.pi \r
+<p class="whs8">angle45 = 45 * math.pi \r
  / 180</p>\r
 \r
-<p class="whs9">axisXYZ = SMESH.AxisStruct(-38.3128, \r
+<p class="whs8">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
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs10"># perform revolution \r
+<p class="whs9"># perform revolution \r
  of an object</p>\r
 \r
-<p class="whs9">aMeshEditor.RotationSweepObject(GroupRotate, \r
+<p class="whs8">mesh.RotationSweepObject(GroupRotate, \r
  axisXYZ, angle45, 4, 1e-5) </p>\r
 \r
-<p class="whs10">&nbsp;</p>\r
+<p class="whs9">&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
+<p class="whs8">import geompy</p>\r
 \r
-<p class="whs9">import geompy</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs9">import smesh</p>\r
+<p class="whs8">import smesh</p>\r
 \r
-<p class="whs9">&nbsp;</p>\r
+<p class="whs8">&nbsp;</p>\r
 \r
-<p class="whs10"># define the geometry</p>\r
+<p class="whs8"># define the geometry</p>\r
 \r
 <p class="whs9">Box_1 = geompy.MakeBoxDXDYDZ(200., \r
  200., 200.)</p>\r
@@ -1936,6 +1660,8 @@ if (window.writeIntopicBar)
 \r
 <p class="whs9">Face_2 = faces[1]</p>\r
 \r
+<p class="whs9">&nbsp;</p>\r
+\r
 <p class="whs9">geompy.addToStudyInFather(Box_1, \r
  Face_1, &quot;Face_1&quot;)</p>\r
 \r
@@ -1944,7 +1670,7 @@ if (window.writeIntopicBar)
 \r
 <p class="whs9">&nbsp;</p>\r
 \r
-<p class="whs10"># build a quadrangle \r
+<p class="whs8"># build a quadrangle \r
  mesh 3x3 on Face_1</p>\r
 \r
 <p class="whs9">Mesh_1 = smesh.Mesh(Face_1)</p>\r
@@ -1964,11 +1690,13 @@ if (window.writeIntopicBar)
 \r
 <p class="whs9">&nbsp;</p>\r
 \r
-<p class="whs10"># build a triangle mesh \r
- on Face_2</p>\r
+<p class="whs8"># build a triangle \r
mesh on Face_2</p>\r
 \r
 <p class="whs9">Mesh_2 = smesh.Mesh(Face_2)</p>\r
 \r
+<p class="whs9">&nbsp;</p>\r
+\r
 <p class="whs9">algo1D = Mesh_2.Segment()</p>\r
 \r
 <p class="whs9">algo1D.NumberOfSegments(1)</p>\r
@@ -1977,6 +1705,8 @@ if (window.writeIntopicBar)
 \r
 <p class="whs9">algo2D.MaxElementArea(240)</p>\r
 \r
+<p class="whs9">&nbsp;</p>\r
+\r
 <p class="whs9">isDone = Mesh_2.Compute()</p>\r
 \r
 <p class="whs9">if not isDone: print \r
@@ -1984,33 +1714,33 @@ if (window.writeIntopicBar)
 \r
 <p class="whs9">&nbsp;</p>\r
 \r
-<p class="whs10"># create a pattern</p>\r
+<p class="whs8"># create a pattern</p>\r
 \r
-<p class="whs9">pattern = smesh.smesh.GetPattern()</p>\r
+<p class="whs9">pattern = smesh.GetPattern()</p>\r
+\r
+<p class="whs9">&nbsp;</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
+<p class="whs9">if (isDone != 1): print \r
+ '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
+<p class="whs8"># apply the pattern \r
to 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">&nbsp;</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
+<p class="whs9">if (isDone != 1): print \r
+ 'MakeMesh :', pattern.GetErrorCode() &nbsp;</p>\r
 \r
 <script type="text/javascript" language="javascript1.2">\r
 <!--\r
index bc5dd720ba22f48aec9748286ff2d55369a726de..6285ac3db11e99ca92866bf9fc82cdbef988811e 100755 (executable)
@@ -7,10 +7,9 @@
 <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-weight:bold; color:#ff0000; }\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 { 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
+p.whs3 { margin-top:0pt; margin-bottom:0pt; font-family:'Times New Roman' , serif; }\r
 -->\r
 </style><script type="text/javascript" language="JavaScript">\r
 <!--\r
@@ -20,7 +19,6 @@ 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
@@ -89,1579 +87,1178 @@ if (window.writeIntopicBar)
 \r
 <h3><a name=bookmark>Free Borders</a></h3>\r
 \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
+<p class="whs1">import salome</p>\r
 \r
-<p class="whs1"># For the moment smesh package doesn't provide \r
- methods to check free borders. </p>\r
+<p class="whs1">import geompy</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
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs3">import salome</p>\r
-\r
-<p class="whs3">import geompy</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">import smesh</p>\r
-\r
-<p class="whs3">import SMESH</p>\r
+<p class="whs1">import smesh</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs2"># create open shell: a \r
  box without one plane</p>\r
 \r
-<p class="whs3">box = geompy.MakeBox(0., \r
0., 0., 20., 20., 15.)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">box \r
= geompy.MakeBox(0., 0., 0., 20., 20., 15.)</span></p>\r
 \r
-<p class="whs3">FaceList = geompy.SubShapeAll(box, \r
+<p class="whs1">FaceList = geompy.SubShapeAll(box, \r
  geompy.ShapeType[&quot;FACE&quot;])</p>\r
 \r
-<p class="whs3">FaceList.remove(FaceList[5])</p>\r
+<p class="whs1">FaceList.remove(FaceList[5])</p>\r
 \r
-<p class="whs3">box = geompy.MakeShell(FaceList)</p>\r
+<p class="whs1">box = geompy.MakeShell(FaceList)</p>\r
 \r
-<p class="whs3">idbox = geompy.addToStudy(box, \r
+<p class="whs1">idbox = geompy.addToStudy(box, \r
  &quot;box&quot;)</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
 <p class="whs2"># create a mesh</p>\r
 \r
-<p class="whs3">tria = smesh.Mesh(box, \r
- &quot;Mesh_free_borders&quot;)</p>\r
-\r
-<p class="whs3">algo = tria.Segment()</p>\r
-\r
-<p class="whs3">algo.NumberOfSegments(5)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">mesh \r
+ = smesh.Mesh(box, &quot;Mesh_free_borders&quot;)</span></p>\r
 \r
-<p class="whs3">algo = tria.Triangle()</p>\r
+<p class="whs1">algo = mesh.Segment()</p>\r
 \r
-<p class="whs3">algo.MaxElementArea(20.)</p>\r
+<p class="whs1">algo.NumberOfSegments(5)</p>\r
 \r
-<p class="whs3">tria.Compute()</p>\r
+<p class="whs1">algo = mesh.Triangle()</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">mesh = tria.GetMesh()</p>\r
+<p class="whs1">algo.MaxElementArea(20.)</p>\r
 \r
-<p class="whs3">gen = smesh.smesh</p>\r
+<p class="whs1">mesh.Compute() </p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
 <p class="whs2"># criterion : free borders</p>\r
 \r
-<p class="whs3">aFilterMgr = gen.CreateFilterManager()</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aFilter \r
+ = smesh.GetFilter(smesh.EDGE, smesh.FT_FreeBorders)</span><span style="margin-top: 0pt;\r
+       margin-bottom: 0pt;\r
+       font-family: 'Lucida Console', monospace;"> </span></p>\r
 \r
-<p class="whs3">aPredicate = aFilterMgr.CreateFreeBorders()</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter)</p>\r
 \r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
-\r
-<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
-\r
-<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs2"># print the result</p>\r
 \r
-<p class="whs3">print &quot;Criterion: \r
+<p class="whs1">print &quot;Criterion: \r
  Free borders Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs3">j = 1</p>\r
+<p class="whs1">j = 1</p>\r
 \r
-<p class="whs3">for i in range(len(anIds)):</p>\r
+<p class="whs1">for i in range(len(anIds)):</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;if \r
+<p class="whs1">&nbsp;&nbsp;if \r
  j &gt; 20: j = 1; print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;print \r
+<p class="whs1">&nbsp;&nbsp;print \r
  anIds[i],</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;j \r
+<p class="whs1">&nbsp;&nbsp;j \r
  = j + 1</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;pass</p>\r
+<p class="whs1">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs3">print &quot;&quot;</p>\r
+<p class="whs1">print &quot;&quot;</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs2"># create a group</p>\r
 \r
-<p class="whs3">aGroup = mesh.CreateGroup(SMESH.EDGE, \r
+<p class="whs1">aGroup = mesh.CreateGroup(SMESH.EDGE, \r
  &quot;Free borders&quot;)</p>\r
 \r
-<p class="whs3">aGroup.Add(anIds)</p>\r
+<p class="whs1">aGroup.Add(anIds)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
 <p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
  </p>\r
 \r
 <h3><a name=bookmark1>Borders at Multiconnection</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 check borders at multiconnection. </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 salome</p>\r
+<p class="whs1">import salome</p>\r
 \r
-<p class="whs3">import geompy</p>\r
+<p class="whs1">import geompy</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">import smesh</p>\r
+<p class="whs1">import smesh</p>\r
 \r
-<p class="whs3">import SMESH</p>\r
+<p class="whs1">import SMESH</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create open shell: \r
+<p class="whs3"># create open shell: \r
  a box without one plane</p>\r
 \r
-<p class="whs3">box = geompy.MakeBox(0., \r
+<p class="whs1">box = geompy.MakeBox(0., \r
  0., 0., 20., 20., 15.)</p>\r
 \r
-<p class="whs3">FaceList = geompy.SubShapeAll(box, \r
+<p class="whs1">FaceList = geompy.SubShapeAll(box, \r
  geompy.ShapeType[&quot;FACE&quot;])</p>\r
 \r
-<p class="whs3">FaceList.remove(FaceList[5])</p>\r
+<p class="whs1">FaceList.remove(FaceList[5])</p>\r
 \r
-<p class="whs3">box = geompy.MakeShell(FaceList)</p>\r
+<p class="whs1">box = geompy.MakeShell(FaceList)</p>\r
 \r
-<p class="whs3">idbox = geompy.addToStudy(box, \r
+<p class="whs1">idbox = geompy.addToStudy(box, \r
  &quot;box&quot;)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs4"># create a mesh</p>\r
-\r
-<p class="whs3">tria = smesh.Mesh(box, \r
- &quot;Mesh_borders_at_multi-connections&quot;)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">algo = tria.Segment()</p>\r
+<p class="whs3"># create a mesh</p>\r
 \r
-<p class="whs3">algo.NumberOfSegments(5)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">mesh \r
+ = smesh.Mesh(box, &quot;Mesh_borders_at_multi-connections&quot;)</span></p>\r
 \r
-<p class="whs3">algo = tria.Triangle()</p>\r
+<p class="whs1">algo = mesh.Segment()</p>\r
 \r
-<p class="whs3">algo.MaxElementArea(20.)</p>\r
+<p class="whs1">algo.NumberOfSegments(5)</p>\r
 \r
-<p class="whs3">tria.Compute()</p>\r
+<p class="whs1">algo = mesh.Triangle()</p>\r
 \r
-<p class="whs3">mesh = tria.GetMesh()</p>\r
+<p class="whs1">algo.MaxElementArea(20.)</p>\r
 \r
-<p class="whs3">gen = smesh.smesh</p>\r
+<p class="whs1">mesh.Compute() </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># Criterion : Borders \r
+<p class="whs3"># Criterion : Borders \r
  at multi-connection</p>\r
 \r
-<p class="whs3">nb_conn = 2</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilterMgr = gen.CreateFilterManager()</p>\r
-\r
-<p class="whs3">aFunctor = aFilterMgr.CreateMultiConnection()</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aPredicate = aFilterMgr.CreateEqualTo()</p>\r
-\r
-<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
+<p class="whs1">nb_conn = 2</p>\r
 \r
-<p class="whs3">aPredicate.SetMargin(nb_conn)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aFilter \r
+ = smesh.GetFilter(smesh.EDGE, smesh.FT_MultiConnection, smesh.FT_EqualTo, \r
+ nb_conn)</span></p>\r
 \r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter)</p>\r
 \r
-<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
+<p class="whs3"># print the result</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs4"># print the result</p>\r
-\r
-<p class="whs3">print &quot;Criterion: \r
+<p class="whs1">print &quot;Criterion: \r
  Borders at multi-connections Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs3">j = 1</p>\r
+<p class="whs1">j = 1</p>\r
 \r
-<p class="whs3">for i in range(len(anIds)):</p>\r
+<p class="whs1">for i in range(len(anIds)):</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;if \r
+<p class="whs1">&nbsp;&nbsp;if \r
  j &gt; 20: j = 1; print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;print \r
+<p class="whs1">&nbsp;&nbsp;print \r
  anIds[i],</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;j \r
+<p class="whs1">&nbsp;&nbsp;j \r
  = j + 1</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;pass</p>\r
+<p class="whs1">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs3">print &quot;&quot;</p>\r
+<p class="whs1">print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create a group</p>\r
+<p class="whs3"># create a group</p>\r
 \r
-<p class="whs3">aGroup = mesh.CreateGroup(SMESH.EDGE, \r
+<p class="whs1">aGroup = mesh.CreateGroup(SMESH.EDGE, \r
  &quot;Borders at multi-connections&quot;)</p>\r
 \r
-<p class="whs3">aGroup.Add(anIds)</p>\r
+<p class="whs1">aGroup.Add(anIds)</p>\r
 \r
-<p class="whs3">salome.sg.updateObjBrowser(1) \r
+<p class="whs1">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
 <h3><a name=bookmark2>Length 1D</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 check length 1D. </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
+<p class="whs1">import salome</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs3">import salome</p>\r
-\r
-<p class="whs3">import geompy</p>\r
+<p class="whs1">import geompy</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">import smesh</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">import SMESH</p>\r
+<p class="whs1">import smesh</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs2"># create open shell: a \r
  box without one plane</p>\r
 \r
-<p class="whs3">box = geompy.MakeBox(0., \r
+<p class="whs1">box = geompy.MakeBox(0., \r
  0., 0., 20., 20., 15.)</p>\r
 \r
-<p class="whs3">FaceList = geompy.SubShapeAll(box, \r
+<p class="whs1">FaceList = geompy.SubShapeAll(box, \r
  geompy.ShapeType[&quot;FACE&quot;])</p>\r
 \r
-<p class="whs3">FaceList.remove(FaceList[5])</p>\r
+<p class="whs1">FaceList.remove(FaceList[5])</p>\r
 \r
-<p class="whs3">box = geompy.MakeShell(FaceList)</p>\r
+<p class="whs1">box = geompy.MakeShell(FaceList)</p>\r
 \r
-<p class="whs3">idbox = geompy.addToStudy(box, \r
+<p class="whs1">idbox = geompy.addToStudy(box, \r
  &quot;box&quot;)</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs2"># create a mesh</p>\r
 \r
-<p class="whs3">tria = smesh.Mesh(box, \r
- &quot;Mesh_Length_1D&quot;)</p>\r
-\r
-<p class="whs3">algo = tria.Segment()</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">mesh \r
+ = smesh.Mesh(box, &quot;Mesh_Length_1D&quot;)</span></p>\r
 \r
-<p class="whs3">algo.NumberOfSegments(5)</p>\r
+<p class="whs1">algo = mesh.Segment()</p>\r
 \r
-<p class="whs3">algo = tria.Triangle()</p>\r
+<p class="whs1">algo.NumberOfSegments(5)</p>\r
 \r
-<p class="whs3">algo.MaxElementArea(20.)</p>\r
+<p class="whs1">algo = mesh.Triangle()</p>\r
 \r
-<p class="whs3">tria.Compute()</p>\r
+<p class="whs1">algo.MaxElementArea(20.)</p>\r
 \r
-<p class="whs3">mesh = tria.GetMesh()</p>\r
-\r
-<p class="whs3">gen = smesh.smesh</p>\r
+<p class="whs1">mesh.Compute() </p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs2"># Criterion : Length &gt; \r
  3.</p>\r
 \r
-<p class="whs3">length_margin = \r
+<p class="whs1">length_margin = \r
  3.</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilterMgr = gen.CreateFilterManager()</p>\r
-\r
-<p class="whs3">aFunctor = aFilterMgr.CreateLength()</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
-\r
-<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
-\r
-<p class="whs3">aPredicate.SetMargin(length_margin)</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aFilter \r
+ = smesh.GetFilter(smesh.EDGE, smesh.FT_Length, smesh.FT_MoreThan, length_margin)</span></p>\r
 \r
-<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter) \r
+ </p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs2"># print the result</p>\r
 \r
-<p class="whs3">print &quot;Criterion: \r
+<p class="whs1">print &quot;Criterion: \r
  Edges length &gt; &quot;, length_margin, &quot; Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs3">j = 1</p>\r
+<p class="whs1">j = 1</p>\r
 \r
-<p class="whs3">for i in range(len(anIds)):</p>\r
+<p class="whs1">for i in range(len(anIds)):</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;if \r
+<p class="whs1">&nbsp;&nbsp;if \r
  j &gt; 20: j = 1; print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;print \r
+<p class="whs1">&nbsp;&nbsp;print \r
  anIds[i],</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;j \r
+<p class="whs1">&nbsp;&nbsp;j \r
  = j + 1</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;pass</p>\r
+<p class="whs1">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs3">print &quot;&quot;</p>\r
+<p class="whs1">print &quot;&quot;</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs2"># create a group</p>\r
 \r
-<p class="whs3">aGroup = mesh.CreateGroup(SMESH.EDGE, \r
+<p class="whs1">aGroup = mesh.CreateGroup(SMESH.EDGE, \r
  &quot;Edges with length &gt; &quot; + `length_margin`)</p>\r
 \r
-<p class="whs3">aGroup.Add(anIds)</p>\r
+<p class="whs1">aGroup.Add(anIds)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \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 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
+<p class="whs1">import SMESH_mechanic</p>\r
 \r
-<p class="whs1"># For the moment smesh package doesn't provide \r
- methods to check free edges. </p>\r
+<p class="whs1">&nbsp;</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">smesh &nbsp;= \r
+<p class="whs1">smesh &nbsp;= \r
  SMESH_mechanic.smesh</p>\r
 \r
-<p class="whs3">mesh &nbsp;&nbsp;= \r
+<p class="whs1">mesh &nbsp;&nbsp;= \r
  SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs3">salome = SMESH_mechanic.salome</p>\r
+<p class="whs1">salome = SMESH_mechanic.salome</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
+<p class="whs1">aFilterMgr = smesh.CreateFilterManager()</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># Remove some elements \r
+<p class="whs3"># Remove some elements \r
  to obtain free edges</p>\r
 \r
-<p class="whs4"># Criterion : AREA \r
+<p class="whs3"># Criterion : AREA \r
  &gt; 95.</p>\r
 \r
-<p class="whs3">area_margin = 95.</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
-\r
-<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
-\r
-<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
+<p class="whs1">area_margin = 95.</p>\r
 \r
-<p class="whs3">aPredicate.SetMargin(area_margin)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aFilter \r
+ = smesh.GetFilter(smesh.FACE, smesh.FT_Area, smesh.FT_MoreThan, area_margin)</span></p>\r
 \r
-<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter)</p>\r
 \r
-<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">anEditor = mesh.GetMeshEditor()</p>\r
+<p class="whs1">mesh.RemoveElements(anIds)</p>\r
 \r
-<p class="whs3">anEditor.RemoveElements(anIds)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs4"># Criterion : Free \r
+<p class="whs3"># Criterion : Free \r
  Edges</p>\r
 \r
-<p class="whs3">aPredicate = aFilterMgr.CreateFreeEdges()</p>\r
-\r
-<p class="whs3">aPredicate.SetMesh(mesh)</p>\r
-\r
-<p class="whs3">aBorders = aPredicate.GetBorders()</p>\r
+<p class="whs1">aBorders = mesh.GetFreeBorders() \r
+ </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create groups</p>\r
+<p class="whs3"># create groups</p>\r
 \r
-<p class="whs3">aGroupF = mesh.CreateGroup(SMESH.FACE, \r
+<p class="whs1">aGroupF = mesh.CreateGroup(SMESH.FACE, \r
  &quot;Faces with free edges&quot;)</p>\r
 \r
-<p class="whs3">aGroupN = mesh.CreateGroup(SMESH.NODE, \r
+<p class="whs1">aGroupN = mesh.CreateGroup(SMESH.NODE, \r
  &quot;Nodes on free edges&quot;)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># fill groups with \r
+<p class="whs3"># fill groups with \r
  elements, corresponding to the criterion</p>\r
 \r
-<p class="whs3">print &quot;&quot;</p>\r
+<p class="whs1">print &quot;&quot;</p>\r
 \r
-<p class="whs3">print &quot;Criterion: \r
+<p class="whs1">print &quot;Criterion: \r
  Free edges Nb = &quot;, len(aBorders)</p>\r
 \r
-<p class="whs3">for i in range(len(aBorders)):</p>\r
+<p class="whs1">for i in range(len(aBorders)):</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;aBorder \r
+<p class="whs1">&nbsp;&nbsp;aBorder \r
  = aBorders[i]</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;print \r
+<p class="whs1">&nbsp;&nbsp;print \r
  &quot;Face # &quot;, aBorder.myElemId, &quot; : Edge between nodes (&quot;,</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;print \r
+<p class="whs1">&nbsp;&nbsp;print \r
  aBorder.myPnt1, &quot;, &quot;, aBorder.myPnt2, &quot;)&quot;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;<span \r
+<p class="whs1">&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="whs3">&nbsp;&nbsp;aGroupN.Add([aBorder.myPnt1, \r
+<p class="whs1">&nbsp;&nbsp;aGroupN.Add([aBorder.myPnt1, \r
  aBorder.myPnt2])</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">salome.sg.updateObjBrowser(1) \r
+<p class="whs1">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
 <h3><a name=bookmark4>Length 2D</a></h3>\r
 \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"># For the moment smesh package doesn't provide \r
- methods to check length 2D. </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 salome</p>\r
-\r
-<p class="whs3">import geompy</p>\r
+<p class="whs1">import salome</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">import geompy</p>\r
 \r
-<p class="whs3">import smesh</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">import SMESH</p>\r
+<p class="whs1">import smesh</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create open shell: \r
+<p class="whs3"># create open shell: \r
  a box without one plane</p>\r
 \r
-<p class="whs3">box = geompy.MakeBox(0., \r
+<p class="whs1">box = geompy.MakeBox(0., \r
  0., 0., 20., 20., 15.)</p>\r
 \r
-<p class="whs3">FaceList = geompy.SubShapeAll(box, \r
+<p class="whs1">FaceList = geompy.SubShapeAll(box, \r
  geompy.ShapeType[&quot;FACE&quot;])</p>\r
 \r
-<p class="whs3">FaceList.remove(FaceList[5])</p>\r
+<p class="whs1">FaceList.remove(FaceList[5])</p>\r
 \r
-<p class="whs3">box = geompy.MakeShell(FaceList)</p>\r
+<p class="whs1">box = geompy.MakeShell(FaceList)</p>\r
 \r
-<p class="whs3">idbox = geompy.addToStudy(box, \r
+<p class="whs1">idbox = geompy.addToStudy(box, \r
  &quot;box&quot;)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs4"># create a mesh</p>\r
-\r
-<p class="whs3">tria = smesh.Mesh(box, \r
- &quot;Mesh_Length_2D&quot;)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">algo = tria.Segment()</p>\r
+<p class="whs3"># create a mesh</p>\r
 \r
-<p class="whs3">algo.NumberOfSegments(5)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">mesh \r
+ = smesh.Mesh(box, &quot;Mesh_Length_2D&quot;)</span></p>\r
 \r
-<p class="whs3">algo = tria.Triangle()</p>\r
+<p class="whs1">algo = mesh.Segment()</p>\r
 \r
-<p class="whs3">algo.MaxElementArea(20.)</p>\r
+<p class="whs1">algo.NumberOfSegments(5)</p>\r
 \r
-<p class="whs3">tria.Compute()</p>\r
+<p class="whs1">algo = mesh.Triangle()</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">algo.MaxElementArea(20.)</p>\r
 \r
-<p class="whs3">mesh = tria.GetMesh()</p>\r
+<p class="whs1">mesh.Compute()</p>\r
 \r
-<p class="whs3">gen = smesh.smesh</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs4"># Criterion : Length \r
+<p class="whs3"># Criterion : Length \r
  2D &gt; 5.7</p>\r
 \r
-<p class="whs3">length_margin = \r
+<p class="whs1">length_margin = \r
  5.7</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilterMgr = gen.CreateFilterManager()</p>\r
-\r
-<p class="whs3">aFunctor = aFilterMgr.CreateLength2D()</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
-\r
-<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aFilter \r
+ = smesh.GetFilter(smesh.FACE, smesh.FT_Length2D, smesh.FT_MoreThan, length_margin)</span></p>\r
 \r
-<p class="whs3">aPredicate.SetMargin(length_margin)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter)</p>\r
 \r
-<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs3"># print the result</p>\r
 \r
-<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs4"># print the result</p>\r
-\r
-<p class="whs3">print &quot;Criterion: \r
+<p class="whs1">print &quot;Criterion: \r
  Edges length 2D &gt; &quot;, length_margin, &quot; Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs3">j = 1</p>\r
+<p class="whs1">j = 1</p>\r
 \r
-<p class="whs3">for i in range(len(anIds)):</p>\r
+<p class="whs1">for i in range(len(anIds)):</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;if \r
+<p class="whs1">&nbsp;&nbsp;if \r
  j &gt; 20: j = 1; print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;print \r
+<p class="whs1">&nbsp;&nbsp;print \r
  anIds[i],</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;j \r
+<p class="whs1">&nbsp;&nbsp;j \r
  = j + 1</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;pass</p>\r
+<p class="whs1">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs3">print &quot;&quot;</p>\r
+<p class="whs1">print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create a group</p>\r
+<p class="whs3"># create a group</p>\r
 \r
-<p class="whs3">aGroup = mesh.CreateGroup(SMESH.FACE, \r
- &quot;Faces with length 2D &gt; &quot; + `length_margin`)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aGroup \r
+ = mesh.CreateEmptyGroup(smesh.FACE, &quot;Faces with length 2D &gt; &quot; \r
+ + `length_margin`)</span></p>\r
 \r
-<p class="whs3">aGroup.Add(anIds)</p>\r
+<p class="whs1">aGroup.Add(anIds)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">salome.sg.updateObjBrowser(1) \r
+<p class="whs1">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
 <h3><a name=bookmark5>Borders at Multiconnection 2D</a></h3>\r
 \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 borders at multiconnection 2D. </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
+<p class="whs1">import salome</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">import geompy</p>\r
 \r
-<p class="whs3">import salome</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">import geompy</p>\r
+<p class="whs1">import smesh</p>\r
 \r
 <p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs3">import smesh</p>\r
-\r
-<p class="whs3">import SMESH</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs4"># create a compound \r
+<p class="whs3"># create a compound \r
  of two glued boxes</p>\r
 \r
-<p class="whs3">box1 = geompy.MakeBox(0., \r
+<p class="whs1">box1 = geompy.MakeBox(0., \r
  0., 0., 20., 20., 15.)</p>\r
 \r
-<p class="whs3">box2 = geompy.MakeTranslation(box1, \r
+<p class="whs1">box2 = geompy.MakeTranslation(box1, \r
  0., 20., 0)</p>\r
 \r
-<p class="whs3">comp = geompy.MakeCompound([box1, \r
+<p class="whs1">comp = geompy.MakeCompound([box1, \r
  box2])</p>\r
 \r
-<p class="whs3">box = geompy.MakeGlueFaces(comp, \r
+<p class="whs1">box = geompy.MakeGlueFaces(comp, \r
  0.000001)</p>\r
 \r
-<p class="whs3">idbox = geompy.addToStudy(box, \r
+<p class="whs1">idbox = geompy.addToStudy(box, \r
  &quot;box&quot;)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs4"># create a mesh</p>\r
-\r
-<p class="whs3">tria = smesh.Mesh(box, \r
- &quot;Box compound : 2D triangle mesh&quot;)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">algo = tria.Segment()</p>\r
+<p class="whs3"># create a mesh</p>\r
 \r
-<p class="whs3">algo.NumberOfSegments(5)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">mesh \r
+ = smesh.Mesh(box, &quot;Box compound : 2D triangle mesh&quot;)</span></p>\r
 \r
-<p class="whs3">algo = tria.Triangle()</p>\r
+<p class="whs1">algo = mesh.Segment()</p>\r
 \r
-<p class="whs3">algo.MaxElementArea(20.)</p>\r
+<p class="whs1">algo.NumberOfSegments(5)</p>\r
 \r
-<p class="whs3">tria.Compute()</p>\r
+<p class="whs1">algo = mesh.Triangle()</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">mesh = tria.GetMesh()</p>\r
+<p class="whs1">algo.MaxElementArea(20.)</p>\r
 \r
-<p class="whs3">gen = smesh.smesh</p>\r
+<p class="whs1">mesh.Compute() </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># Criterion : MULTI-CONNECTION \r
+<p class="whs3"># Criterion : MULTI-CONNECTION \r
  2D = 3</p>\r
 \r
-<p class="whs3">nb_conn = 3</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilterMgr = gen.CreateFilterManager()</p>\r
-\r
-<p class="whs3">aFunctor = aFilterMgr.CreateMultiConnection2D()</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aPredicate = aFilterMgr.CreateEqualTo()</p>\r
-\r
-<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
+<p class="whs1">nb_conn = 3</p>\r
 \r
-<p class="whs3">aPredicate.SetMargin(nb_conn)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
-\r
-<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aFilter \r
+ = smesh.GetFilter(smesh.FACE, smesh.FT_MultiConnection2D, smesh.FT_EqualTo, \r
+ nb_conn)</span></p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter) \r
+ </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># print the result</p>\r
+<p class="whs3"># print the result</p>\r
 \r
-<p class="whs3">print &quot;Criterion: \r
+<p class="whs1">print &quot;Criterion: \r
  Borders at multi-connection 2D = &quot;, nb_conn, &quot; Nb = &quot;, \r
  len(anIds)</p>\r
 \r
-<p class="whs3">j = 1</p>\r
+<p class="whs1">j = 1</p>\r
 \r
-<p class="whs3">for i in range(len(anIds)):</p>\r
+<p class="whs1">for i in range(len(anIds)):</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;if \r
+<p class="whs1">&nbsp;&nbsp;if \r
  j &gt; 20: j = 1; print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;print \r
+<p class="whs1">&nbsp;&nbsp;print \r
  anIds[i],</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;j \r
+<p class="whs1">&nbsp;&nbsp;j \r
  = j + 1</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;pass</p>\r
+<p class="whs1">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs3">print &quot;&quot;</p>\r
+<p class="whs1">print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create a group</p>\r
+<p class="whs3"># create a group</p>\r
 \r
-<p class="whs3">aGroup = mesh.CreateGroup(SMESH.FACE, \r
- &quot;Borders at multi-connection 2D = &quot; + `nb_conn`)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aGroup \r
+ = mesh.CreateEmptyGroup(smesh.FACE, &quot;Borders at multi-connection \r
+ 2D = &quot; + `nb_conn`)</span></p>\r
 \r
-<p class="whs3">aGroup.Add(anIds)</p>\r
+<p class="whs1">aGroup.Add(anIds)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">salome.sg.updateObjBrowser(1) \r
+<p class="whs1">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
 <h3><a name=bookmark6>Area</a></h3>\r
 \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 area. </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
+<p class="whs1">import SMESH_mechanic</p>\r
 \r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs3">import SMESH</p>\r
-\r
-<p class="whs3">import SMESH_mechanic</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">smesh &nbsp;= \r
+<p class="whs1">smesh &nbsp;= \r
  SMESH_mechanic.smesh</p>\r
 \r
-<p class="whs3">mesh &nbsp;&nbsp;= \r
+<p class="whs1">mesh &nbsp;&nbsp;= \r
  SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs3">salome = SMESH_mechanic.salome</p>\r
+<p class="whs1">salome = SMESH_mechanic.salome</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs2"># Criterion : AREA &gt; \r
  100.</p>\r
 \r
-<p class="whs3">area_margin = 100.</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
-\r
-<p class="whs3">aFunctor = aFilterMgr.CreateArea()</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
-\r
-<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
-\r
-<p class="whs3">aPredicate.SetMargin(area_margin)</p>\r
+<p class="whs1">area_margin = 100.</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
+<p class="whs1">aFilter = smesh.GetFilter(smesh.FACE, \r
+ smesh.FT_Area, smesh.FT_MoreThan, area_margin)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter) \r
+ </p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs2"># print the result</p>\r
 \r
-<p class="whs3">print &quot;Criterion: \r
+<p class="whs1">print &quot;Criterion: \r
  Area &gt; &quot;, area_margin, &quot; Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs3">j = 1</p>\r
+<p class="whs1">j = 1</p>\r
 \r
-<p class="whs3">for i in range(len(anIds)):</p>\r
+<p class="whs1">for i in range(len(anIds)):</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;if \r
+<p class="whs1">&nbsp;&nbsp;if \r
  j &gt; 20: j = 1; print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;print \r
+<p class="whs1">&nbsp;&nbsp;print \r
  anIds[i],</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;j \r
+<p class="whs1">&nbsp;&nbsp;j \r
  = j + 1</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;pass</p>\r
+<p class="whs1">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs3">print &quot;&quot;</p>\r
+<p class="whs1">print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
 <p class="whs2"># create a group</p>\r
 \r
-<p class="whs3">aGroup = mesh.CreateGroup(SMESH.FACE, \r
+<p class="whs1">aGroup = mesh.CreateEmptyGroup(smesh.FACE, \r
  &quot;Area &gt; &quot; + `area_margin`)</p>\r
 \r
-<p class="whs3">aGroup.Add(anIds)</p>\r
+<p class="whs1">aGroup.Add(anIds)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
 <p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
- </p>\r
&nbsp;</p>\r
 \r
 <h3><a name=bookmark7>Taper</a></h3>\r
 \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 taper. </p>\r
+<p class="whs1">import SMESH_mechanic</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
+<p class="whs1">&nbsp;</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">smesh &nbsp;= \r
+<p class="whs1">smesh &nbsp;= \r
  SMESH_mechanic.smesh</p>\r
 \r
-<p class="whs3">mesh &nbsp;&nbsp;= \r
+<p class="whs1">mesh &nbsp;&nbsp;= \r
  SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs3">salome = SMESH_mechanic.salome</p>\r
+<p class="whs1">salome = SMESH_mechanic.salome</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># Criterion : Taper \r
+<p class="whs3"># Criterion : Taper \r
  &gt; 3e-20</p>\r
 \r
-<p class="whs3">taper_margin = 3e-20</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
-\r
-<p class="whs3">aFunctor = aFilterMgr.CreateTaper()</p>\r
+<p class="whs1">taper_margin = 3e-20</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
-\r
-<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
-\r
-<p class="whs3">aPredicate.SetMargin(taper_margin)</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs1">aFilter = smesh.GetFilter(smesh.FACE, \r
+ smesh.FT_Taper, smesh.FT_MoreThan, taper_margin)</p>\r
 \r
-<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter) \r
+ </p>\r
 \r
-<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs3"># print the result</p>\r
 \r
-<p class="whs4"># print the result</p>\r
-\r
-<p class="whs3">print &quot;Criterion: \r
+<p class="whs1">print &quot;Criterion: \r
  Taper &gt; &quot;, taper_margin, &quot; Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs3">j = 1</p>\r
+<p class="whs1">j = 1</p>\r
 \r
-<p class="whs3">for i in range(len(anIds)):</p>\r
+<p class="whs1">for i in range(len(anIds)):</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;if \r
+<p class="whs1">&nbsp;&nbsp;if \r
  j &gt; 20: j = 1; print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;print \r
+<p class="whs1">&nbsp;&nbsp;print \r
  anIds[i],</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;j \r
+<p class="whs1">&nbsp;&nbsp;j \r
  = j + 1</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;pass</p>\r
+<p class="whs1">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs3">print &quot;&quot;</p>\r
+<p class="whs1">print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create a group</p>\r
+<p class="whs3"># create a group</p>\r
 \r
-<p class="whs3">aGroup = mesh.CreateGroup(SMESH.FACE, \r
&quot;Taper &gt; &quot; + `taper_margin`)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aGroup \r
= mesh.CreateEmptyGroup(smesh.FACE, &quot;Taper &gt; &quot; + `taper_margin`)</span></p>\r
 \r
-<p class="whs3">aGroup.Add(anIds)</p>\r
+<p class="whs1">aGroup.Add(anIds)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">salome.sg.updateObjBrowser(1) \r
- </p>\r
+<p class="whs1">salome.sg.updateObjBrowser(1) \r
&nbsp;</p>\r
 \r
 <h3><a name=bookmark8>Aspect Ratio</a></h3>\r
 \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 aspect ratio. </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
+<p class="whs1">import SMESH_mechanic</p>\r
 \r
-<p class="whs3">import SMESH</p>\r
+<p class="whs1">&nbsp;</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
+<p class="whs1">smesh &nbsp;= \r
  SMESH_mechanic.smesh</p>\r
 \r
-<p class="whs3">mesh &nbsp;&nbsp;= \r
+<p class="whs1">mesh &nbsp;&nbsp;= \r
  SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs3">salome = SMESH_mechanic.salome</p>\r
+<p class="whs1">salome = SMESH_mechanic.salome</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># Criterion : ASPECT \r
+<p class="whs3"># Criterion : ASPECT \r
  RATIO &gt; 1.8</p>\r
 \r
-<p class="whs3">ar_margin = 1.8</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
-\r
-<p class="whs3">aFunctor = aFilterMgr.CreateAspectRatio()</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
+<p class="whs1">ar_margin = 1.8</p>\r
 \r
-<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aPredicate.SetMargin(ar_margin)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aFilter \r
+ = smesh.GetFilter(smesh.FACE, smesh.FT_AspectRatio, smesh.FT_MoreThan, \r
+ ar_margin)</span></p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
-\r
-<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter) \r
+ </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># print the result</p>\r
+<p class="whs3"># print the result</p>\r
 \r
-<p class="whs3">print &quot;Criterion: \r
+<p class="whs1">print &quot;Criterion: \r
  Aspect Ratio &gt; &quot;, ar_margin, &quot; Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs3">j = 1</p>\r
+<p class="whs1">j = 1</p>\r
 \r
-<p class="whs3">for i in range(len(anIds)):</p>\r
+<p class="whs1">for i in range(len(anIds)):</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;if \r
+<p class="whs1">&nbsp;&nbsp;if \r
  j &gt; 20: j = 1; print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;print \r
+<p class="whs1">&nbsp;&nbsp;print \r
  anIds[i],</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;j \r
+<p class="whs1">&nbsp;&nbsp;j \r
  = j + 1</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;pass</p>\r
+<p class="whs1">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs3">print &quot;&quot;</p>\r
+<p class="whs1">print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create a group</p>\r
+<p class="whs3"># create a group</p>\r
 \r
-<p class="whs3">aGroup = mesh.CreateGroup(SMESH.FACE, \r
&quot;Aspect Ratio &gt; &quot; + `ar_margin`)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aGroup \r
= mesh.CreateEmptyGroup(smesh.FACE, &quot;Aspect Ratio &gt; &quot; + `ar_margin`)</span></p>\r
 \r
-<p class="whs3">aGroup.Add(anIds)</p>\r
+<p class="whs1">aGroup.Add(anIds)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">salome.sg.updateObjBrowser(1) \r
+<p class="whs1">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
 <h3><a name=bookmark9>Minimum Angle</a></h3>\r
 \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="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">import SMESH</p>\r
-\r
-<p class="whs3">import SMESH_mechanic</p>\r
+<p class="whs1">import SMESH_mechanic</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">smesh &nbsp;= \r
+<p class="whs1">smesh &nbsp;= \r
  SMESH_mechanic.smesh</p>\r
 \r
-<p class="whs3">mesh &nbsp;&nbsp;= \r
+<p class="whs1">mesh &nbsp;&nbsp;= \r
  SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs3">salome = SMESH_mechanic.salome</p>\r
+<p class="whs1">salome = SMESH_mechanic.salome</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># Criterion : MINIMUM \r
+<p class="whs3"># Criterion : MINIMUM \r
  ANGLE &lt; 35.</p>\r
 \r
-<p class="whs3">min_angle = 35.</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
-\r
-<p class="whs3">aFunctor = aFilterMgr.CreateMinimumAngle()</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aPredicate = aFilterMgr.CreateLessThan()</p>\r
-\r
-<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
-\r
-<p class="whs3">aPredicate.SetMargin(min_angle)</p>\r
+<p class="whs1">min_angle = 35.</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
+<p class="whs1">aFilter = smesh.GetFilter(smesh.FACE, \r
+ smesh.FT_MinimumAngle, smesh.FT_LessThan, min_angle)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter) \r
+ </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># print the result</p>\r
+<p class="whs3"># print the result</p>\r
 \r
-<p class="whs3">print &quot;Criterion: \r
+<p class="whs1">print &quot;Criterion: \r
  Minimum Angle &lt; &quot;, min_angle, &quot; Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs3">j = 1</p>\r
+<p class="whs1">j = 1</p>\r
 \r
-<p class="whs3">for i in range(len(anIds)):</p>\r
+<p class="whs1">for i in range(len(anIds)):</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;if \r
+<p class="whs1">&nbsp;&nbsp;if \r
  j &gt; 20: j = 1; print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;print \r
+<p class="whs1">&nbsp;&nbsp;print \r
  anIds[i],</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;j \r
+<p class="whs1">&nbsp;&nbsp;j \r
  = j + 1</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;pass</p>\r
+<p class="whs1">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs3">print &quot;&quot;</p>\r
+<p class="whs1">print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create a group</p>\r
+<p class="whs3"># create a group</p>\r
 \r
-<p class="whs3">aGroup = mesh.CreateGroup(SMESH.FACE, \r
- &quot;Minimum Angle &lt; &quot; + `min_angle`)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aGroup \r
+ = mesh.CreateEmptyGroup(smesh.FACE, &quot;Minimum Angle &lt; &quot; + \r
+ `min_angle`)</span></p>\r
 \r
-<p class="whs3">aGroup.Add(anIds)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">aGroup.Add(anIds)</p>\r
+\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">salome.sg.updateObjBrowser(1) \r
+<p class="whs1">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
 <h3><a name=bookmark10>Warping</a></h3>\r
 \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"># In the next SALOME version the scripts will \r
- be updated to use only the commands from smesh package.</p>\r
+<p class="whs1">import SMESH_mechanic</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
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">smesh &nbsp;= \r
+<p class="whs1">smesh &nbsp;= \r
  SMESH_mechanic.smesh</p>\r
 \r
-<p class="whs3">mesh &nbsp;&nbsp;= \r
+<p class="whs1">mesh &nbsp;&nbsp;= \r
  SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs3">salome = SMESH_mechanic.salome</p>\r
+<p class="whs1">salome = SMESH_mechanic.salome</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># Criterion : WARP \r
+<p class="whs3"># Criterion : WARP \r
  ANGLE &gt; 1e-15</p>\r
 \r
-<p class="whs3">wa_margin = 1e-15</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
-\r
-<p class="whs3">aFunctor = aFilterMgr.CreateWarping()</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
-\r
-<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
+<p class="whs1">wa_margin = 1e-15</p>\r
 \r
-<p class="whs3">aPredicate.SetMargin(wa_margin)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs1">aFilter = smesh.GetFilter(smesh.FACE, \r
+ smesh.FT_Warping, smesh.FT_MoreThan, wa_margin)</p>\r
 \r
-<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter) \r
+ </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># print the result</p>\r
+<p class="whs3"># print the result</p>\r
 \r
-<p class="whs3">print &quot;Criterion: \r
+<p class="whs1">print &quot;Criterion: \r
  Warp &gt; &quot;, wa_margin, &quot; Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs3">j = 1</p>\r
+<p class="whs1">j = 1</p>\r
 \r
-<p class="whs3">for i in range(len(anIds)):</p>\r
+<p class="whs1">for i in range(len(anIds)):</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;if \r
+<p class="whs1">&nbsp;&nbsp;if \r
  j &gt; 20: j = 1; print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;print \r
+<p class="whs1">&nbsp;&nbsp;print \r
  anIds[i],</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;j \r
+<p class="whs1">&nbsp;&nbsp;j \r
  = j + 1</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;pass</p>\r
+<p class="whs1">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs3">print &quot;&quot;</p>\r
+<p class="whs1">print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create a group</p>\r
+<p class="whs3"># create a group</p>\r
 \r
-<p class="whs3">aGroup = mesh.CreateGroup(SMESH.FACE, \r
+<p class="whs1">aGroup = mesh.CreateEmptyGroup(smesh.FACE, \r
  &quot;Warp &gt; &quot; + `wa_margin`)</p>\r
 \r
-<p class="whs3">aGroup.Add(anIds)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">aGroup.Add(anIds)</p>\r
 \r
-<p class="whs3">salome.sg.updateObjBrowser(1) \r
+<p class="whs1">&nbsp;</p>\r
+\r
+<p class="whs1">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
 <h3><a name=bookmark12>Skew</a></h3>\r
 \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 skew. </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
+<p class="whs1">import SMESH_mechanic</p>\r
 \r
-<p class="whs3">import SMESH</p>\r
+<p class="whs1">&nbsp;</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
+<p class="whs1">smesh &nbsp;= \r
  SMESH_mechanic.smesh</p>\r
 \r
-<p class="whs3">mesh &nbsp;&nbsp;= \r
+<p class="whs1">mesh &nbsp;&nbsp;= \r
  SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs3">salome = SMESH_mechanic.salome</p>\r
+<p class="whs1">salome = SMESH_mechanic.salome</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># Criterion : Skew \r
+<p class="whs3"># Criterion : Skew \r
  &gt; 38.</p>\r
 \r
-<p class="whs3">skew_margin = 38.</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
-\r
-<p class="whs3">aFunctor = aFilterMgr.CreateSkew()</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
+<p class="whs1">skew_margin = 38.</p>\r
 \r
-<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aPredicate.SetMargin(skew_margin)</p>\r
+<p class="whs1">aFilter = smesh.GetFilter(smesh.FACE, \r
+ smesh.FT_Skew, smesh.FT_MoreThan, skew_margin)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
-\r
-<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># print the result</p>\r
+<p class="whs3"># print the result</p>\r
 \r
-<p class="whs3">print &quot;Criterion: \r
+<p class="whs1">print &quot;Criterion: \r
  Skew &gt; &quot;, skew_margin, &quot; Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs3">j = 1</p>\r
+<p class="whs1">j = 1</p>\r
 \r
-<p class="whs3">for i in range(len(anIds)):</p>\r
+<p class="whs1">for i in range(len(anIds)):</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;if \r
+<p class="whs1">&nbsp;&nbsp;if \r
  j &gt; 20: j = 1; print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;print \r
+<p class="whs1">&nbsp;&nbsp;print \r
  anIds[i],</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;j \r
+<p class="whs1">&nbsp;&nbsp;j \r
  = j + 1</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;pass</p>\r
+<p class="whs1">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs3">print &quot;&quot;</p>\r
+<p class="whs1">print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create a group</p>\r
+<p class="whs3"># create a group</p>\r
 \r
-<p class="whs3">aGroup = mesh.CreateGroup(SMESH.FACE, \r
&quot;Skew &gt; &quot; + `skew_margin`)</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">aGroup \r
= mesh.CreateEmptyGroup(smesh.FACE, &quot;Skew &gt; &quot; + `skew_margin`)</span></p>\r
 \r
-<p class="whs3">aGroup.Add(anIds)</p>\r
+<p class="whs1">aGroup.Add(anIds)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">salome.sg.updateObjBrowser(1) \r
+<p class="whs1">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
 <h3><a name=bookmark11>Aspect Ratio 3D</a></h3>\r
 \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 aspect ratio 3D. </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_tetra</p>\r
+<p class="whs1">import SMESH_mechanic_tetra \r
+ </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">smesh &nbsp;= \r
+<p class="whs1">smesh &nbsp;= \r
  SMESH_mechanic_tetra.smesh</p>\r
 \r
-<p class="whs3">mesh &nbsp;&nbsp;= \r
+<p class="whs1">mesh &nbsp;&nbsp;= \r
  SMESH_mechanic_tetra.mesh</p>\r
 \r
-<p class="whs3">salome = SMESH_mechanic_tetra.salome</p>\r
+<p class="whs1">salome = SMESH_mechanic_tetra.salome</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># Criterion : ASPECT \r
+<p class="whs3"># Criterion : ASPECT \r
  RATIO 3D &gt; 4.5</p>\r
 \r
-<p class="whs3">ar_margin = 4.5</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
-\r
-<p class="whs3">aFunctor = aFilterMgr.CreateAspectRatio3D()</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aPredicate = aFilterMgr.CreateMoreThan()</p>\r
-\r
-<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
-\r
-<p class="whs3">aPredicate.SetMargin(ar_margin)</p>\r
+<p class="whs1">ar_margin = 4.5</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
+<p class="whs1">aFilter = smesh.GetFilter(smesh.VOLUME, \r
+ smesh.FT_AspectRatio3D, smesh.FT_MoreThan, ar_margin)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter) \r
+ </p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># print the result</p>\r
+<p class="whs3"># print the result</p>\r
 \r
-<p class="whs3">print &quot;Criterion: \r
+<p class="whs1">print &quot;Criterion: \r
  Aspect Ratio 3D &gt; &quot;, ar_margin, &quot; Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs3">j = 1</p>\r
+<p class="whs1">j = 1</p>\r
 \r
-<p class="whs3">for i in range(len(anIds)):</p>\r
+<p class="whs1">for i in range(len(anIds)):</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;if \r
+<p class="whs1">&nbsp;&nbsp;if \r
  j &gt; 20: j = 1; print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;print \r
+<p class="whs1">&nbsp;&nbsp;print \r
  anIds[i],</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;j \r
+<p class="whs1">&nbsp;&nbsp;j \r
  = j + 1</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;pass</p>\r
+<p class="whs1">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs3">print &quot;&quot;</p>\r
+<p class="whs1">print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs4"># create a group</p>\r
+<p class="whs3"># create a group</p>\r
 \r
-<p class="whs3">aGroup = mesh.CreateGroup(SMESH.VOLUME, \r
+<p class="whs1">aGroup = mesh.CreateEmptyGroup(smesh.VOLUME, \r
  &quot;Aspect Ratio 3D &gt; &quot; + `ar_margin`)</p>\r
 \r
-<p class="whs3">aGroup.Add(anIds)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">aGroup.Add(anIds)</p>\r
+\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">salome.sg.updateObjBrowser(1) \r
+<p class="whs1">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
 <h3><a name=Volume>Volume</a></h3>\r
 \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 volume. </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="whs2">&nbsp;</p>\r
-\r
-<p class="whs3">import SMESH</p>\r
-\r
-<p class="whs3">import SMESH_mechanic_tetra</p>\r
+<p class="whs1">import SMESH_mechanic_tetra</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">smesh &nbsp;= \r
+<p class="whs1">smesh &nbsp;= \r
  SMESH_mechanic_tetra.smesh</p>\r
 \r
-<p class="whs3">mesh &nbsp;&nbsp;= \r
+<p class="whs1">mesh &nbsp;&nbsp;= \r
  SMESH_mechanic_tetra.mesh</p>\r
 \r
-<p class="whs3">salome = SMESH_mechanic_tetra.salome</p>\r
+<p class="whs1">salome = SMESH_mechanic_tetra.salome</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs2"># Criterion : VOLUME &lt; \r
  7.</p>\r
 \r
-<p class="whs3">volume_margin = \r
+<p class="whs1">volume_margin = \r
  7.</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilterMgr = smesh.CreateFilterManager()</p>\r
-\r
-<p class="whs3">aFunctor = aFilterMgr.CreateVolume3D()</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aPredicate = aFilterMgr.CreateLessThan()</p>\r
-\r
-<p class="whs3">aPredicate.SetNumFunctor(aFunctor)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">aPredicate.SetMargin(volume_margin)</p>\r
+<p class="whs1">aFilter = smesh.GetFilter(smesh.VOLUME, \r
+ smesh.FT_Volume3D, smesh.FT_LessThan, volume_margin)</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">aFilter = aFilterMgr.CreateFilter()</p>\r
-\r
-<p class="whs3">aFilter.SetPredicate(aPredicate)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3">anIds = aFilter.GetElementsId(mesh)</p>\r
+<p class="whs1">anIds = mesh.GetIdsFromFilter(aFilter) \r
+ </p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs2"># print the result</p>\r
 \r
-<p class="whs3">print &quot;&quot;</p>\r
+<p class="whs1">print &quot;&quot;</p>\r
 \r
-<p class="whs3">print &quot;Criterion: \r
+<p class="whs1">print &quot;Criterion: \r
  Volume &lt; &quot;, volume_margin, &quot; Nb = &quot;, len(anIds)</p>\r
 \r
-<p class="whs3">j = 1</p>\r
+<p class="whs1">j = 1</p>\r
 \r
-<p class="whs3">for i in range(len(anIds)):</p>\r
+<p class="whs1">for i in range(len(anIds)):</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;if \r
+<p class="whs1">&nbsp;&nbsp;if \r
  j &gt; 20: j = 1; print &quot;&quot;</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;print \r
+<p class="whs1">&nbsp;&nbsp;print \r
  anIds[i],</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;j \r
+<p class="whs1">&nbsp;&nbsp;j \r
  = j + 1</p>\r
 \r
-<p class="whs3">&nbsp;&nbsp;pass</p>\r
+<p class="whs1">&nbsp;&nbsp;pass</p>\r
 \r
-<p class="whs3">print &quot;&quot;</p>\r
+<p class="whs1">print &quot;&quot;</p>\r
 \r
 <p class="whs2">&nbsp;</p>\r
 \r
 <p class="whs2"># create a group</p>\r
 \r
-<p class="whs3">aGroup = mesh.CreateGroup(SMESH.VOLUME, \r
+<p class="whs1">aGroup = mesh.CreateEmptyGroup(smesh.VOLUME, \r
  &quot;Volume &lt; &quot; + `volume_margin`)</p>\r
 \r
-<p class="whs3">aGroup.Add(anIds)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs1">aGroup.Add(anIds)</p>\r
 \r
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
- </p>\r
+<p class="whs2">&nbsp;</p>\r
+\r
+<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1) \r
+ </span>&nbsp;</p>\r
 \r
 <script type="text/javascript" language="javascript1.2">\r
 <!--\r
index f70f20b44b33aae9b04949a0ec8e588303e252eb..f425f345bcc4ac6784c222a3356e28efc38015be 100755 (executable)
 h3.whs1 { margin-top:0pt; margin-bottom:0pt; }\r
 h4.whs2 { margin-top:0pt; margin-bottom:0pt; }\r
 p.whs3 { font-family:'Lucida Console' , monospace; margin-top:0pt; margin-bottom:0pt; }\r
-p.whs4 { margin-top:0pt; margin-bottom:0pt; font-weight:bold; color:#ff0000; }\r
-p.whs5 { margin-top:0pt; margin-bottom:0pt; font-family:'Lucida Console' , monospace; }\r
-p.whs6 { margin-top:0pt; margin-bottom:0pt; font-family:'Times New Roman' , serif; }\r
-p.whs7 { margin-top:0pt; margin-bottom:0pt; }\r
+p.whs4 { margin-top:0pt; margin-bottom:0pt; font-family:'Lucida Console' , monospace; }\r
+p.whs5 { margin-top:0pt; margin-bottom:0pt; font-family:'Times New Roman' , serif; }\r
+p.whs6 { margin-top:0pt; margin-bottom:0pt; }\r
 -->\r
 </style><script type="text/javascript" language="JavaScript">\r
 <!--\r
@@ -26,7 +25,6 @@ if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))
   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
@@ -101,777 +99,654 @@ if (window.writeIntopicBar)
 \r
 <p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs4"><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
+<p class="whs4">import SMESH_mechanic</p>\r
 \r
-<p class="whs4"># For the moment smesh package doesn't provide \r
- methods to translate meshes. </p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs4"># In the next SALOME version the scripts will \r
be updated to use only the commands from smesh package.</p>\r
+<p class="whs4"><span style="font-family: 'Lucida Console', monospace;">smesh \r
= SMESH_mechanic.smesh </span></p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
-\r
-<p class="whs5">import SMESH</p>\r
-\r
-<p class="whs5">import SMESH_mechanic</p>\r
-\r
-<p class="whs5">&nbsp;</p>\r
-\r
-<p class="whs5">mesh = SMESH_mechanic.mesh</p>\r
-\r
-<p class="whs5">anEditor = mesh.GetMeshEditor()</p>\r
+<p class="whs4">mesh = SMESH_mechanic.mesh \r
+ </p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs6"># define translation \r
+<p class="whs5"># define translation \r
  vector</p>\r
 \r
-<p class="whs5">point = SMESH.PointStruct(-150., \r
-150., 0.)</p>\r
+<p class="whs4"><span style="font-family: 'Lucida Console', monospace;">point \r
= smesh.PointStruct(-150., -150., 0.)</span></p>\r
 \r
-<p class="whs5">vector = SMESH.DirStruct(point)</p>\r
-\r
-<p class="whs5">&nbsp;</p>\r
-\r
-<p class="whs6"># translate a mesh</p>\r
-\r
-<p class="whs5">doCopy = 1</p>\r
+<p class="whs4">vector =smesh.DirStruct(point) \r
+ </p>\r
 \r
-<p class="whs5">anEditor.TranslateObject(mesh, \r
- vector, doCopy) </p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs7">&nbsp;</p>\r
+<p class="whs5"># translate a mesh</p>\r
 \r
-<h4 class="whs2"><a name=bookmark1>Rotation</a></h4>\r
+<p class="whs4">doCopy = 1</p>\r
 \r
-<p class="whs3">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs4"><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
+<p class="whs4">mesh.Translate([], \r
+ vector, doCopy) &nbsp;</p>\r
 \r
-<p class="whs4"># For the moment smesh package doesn't provide \r
- methods to rotate meshes. </p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs4"># In the next SALOME version the scripts will \r
- be updated to use only the commands from smesh package.</p>\r
+<h4 class="whs2"><a name=bookmark1>Rotation</a></h4>\r
 \r
 <p class="whs3">&nbsp;</p>\r
 \r
 <p class="whs3">import math</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
+<p class="whs3"><span style="font-family: 'Lucida Console', monospace;">smesh \r
+ = SMESH_mechanic.smesh</span></p>\r
 \r
-<p class="whs3">anEditor = mesh.GetMeshEditor()</p>\r
+<p class="whs3">mesh = SMESH_mechanic.mesh </p>\r
 \r
 <p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs6"># define rotation axis \r
+<p class="whs5"># define rotation axis \r
  and angle</p>\r
 \r
-<p class="whs3">axisXYZ = SMESH.AxisStruct(0., 0., 0., \r
+<p class="whs3">axisXYZ = smesh.AxisStruct(0., 0., 0., \r
  5., 5., 20.)</p>\r
 \r
 <p class="whs3">angle270 = 1.5 * math.pi</p>\r
 \r
 <p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs6"># rotate a mesh</p>\r
+<p class="whs5"># rotate a mesh</p>\r
 \r
-<p class="whs3">anEditor.RotateObject(mesh, axisXYZ, angle270\r
1) </p>\r
+<p class="whs4">mesh.Rotate([]\r
axisXYZ, angle270, 1) &nbsp;</p>\r
 \r
-<p class="whs7">&nbsp;</p>\r
+<p class="whs6">&nbsp;</p>\r
 \r
 <h4 class="whs2"><a name=bookmark2>Symmetry</a></h4>\r
 \r
 <p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs4"><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="whs4"># For the moment smesh package doesn't provide \r
- methods to create symmetrical copies of meshes. </p>\r
-\r
-<p class="whs4"># 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 math</p>\r
 \r
-<p class="whs3">import SMESH</p>\r
+<p class="whs3">&nbsp;</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
+<p class="whs3"><span style="font-family: 'Lucida Console', monospace;">smesh \r
+ = SMESH_mechanic.smesh</span></p>\r
 \r
-<p class="whs3">anEditor = mesh.GetMeshEditor()</p>\r
+<p class="whs3">mesh = SMESH_mechanic.mesh </p>\r
 \r
 <p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs6"># create a symmetrical \r
+<p class="whs5"># create a symmetrical \r
  copy of the mesh mirrored through a point</p>\r
 \r
 <p class="whs3">axis = SMESH.AxisStruct(0, 0, 0, 0, 0, \r
  0)</p>\r
 \r
-<p class="whs3">anEditor.MirrorObject(mesh, axis, SMESH.SMESH_MeshEditor.POINT, \r
- 1) </p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<h4 class="whs2"><a name=bookmark3>Merging \r
- Nodes</a></h4>\r
-\r
 <p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs4"><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="whs4"># For the moment smesh package doesn't provide \r
- methods to merge nodes. </p>\r
-\r
-<p class="whs4"># In the next SALOME version the scripts will \r
- be updated to use only the commands from smesh package.</p>\r
+<p class="whs3">mesh.Mirror([], axis, smesh.POINT, 1) \r
+ </p>\r
 \r
 <p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs5">import SMESH_mechanic</p>\r
-\r
-<p class="whs5">mesh = SMESH_mechanic.mesh</p>\r
-\r
-<p class="whs5">&nbsp;</p>\r
-\r
-<p class="whs5">aMeshEditor = mesh.GetMeshEditor()</p>\r
-\r
-<p class="whs5">&nbsp;</p>\r
-\r
-<p class="whs6"># merge nodes</p>\r
+<h4 class="whs2"><a name=bookmark3>Merging \r
+ Nodes</a></h4>\r
 \r
-<p class="whs5">Tolerance = 25.0</p>\r
+<p class="whs3">&nbsp;</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">import SMESH_mechanic</p>\r
 \r
-<p class="whs5">GroupsOfNodes = \r
- aMeshEditor.FindCoincidentNodes(Tolerance)</p>\r
+<p class="whs4">mesh = SMESH_mechanic.mesh</p>\r
 \r
-<p class="whs7"><span style="font-family: 'Lucida Console', monospace;">aMeshEditor.MergeNodes(GroupsOfNodes)</span> \r
- </p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs7">&nbsp;</p>\r
+<p class="whs5"># merge nodes</p>\r
 \r
-<h4><a name=bookmark8>Merging Elements</a></h4>\r
+<p class="whs4">Tolerance = 25.0</p>\r
 \r
-<p class="whs4"><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
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs4"># For the moment smesh package doesn't provide \r
methods to merge elements. </p>\r
+<p class="whs4">GroupsOfNodes = \r
&nbsp;mesh.FindCoincidentNodes(Tolerance)</p>\r
 \r
-<p class="whs4"># In the next SALOME version the scripts will \r
be updated to use only the commands from smesh package.</p>\r
+<p class="whs4">mesh.MergeNodes(GroupsOfNodes) \r
&nbsp;</p>\r
 \r
 <p class="whs6">&nbsp;</p>\r
 \r
-<p class="whs5">import salome</p>\r
+<h4><a name=bookmark8>Merging Elements</a></h4>\r
 \r
-<p class="whs5">import geompy</p>\r
+<p class="whs4">import salome</p>\r
 \r
-<p class="whs5">import smesh</p>\r
+<p class="whs4">import geompy</p>\r
 \r
-<p class="whs5">import SMESH</p>\r
+<p class="whs4">import smesh</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs6"># create a face to \r
+<p class="whs5"># create a face to \r
  be meshed</p>\r
 \r
-<p class="whs5">px = geompy.MakeVertex(100., \r
+<p class="whs4">px = geompy.MakeVertex(100., \r
  0. &nbsp;, 0. \r
  &nbsp;)</p>\r
 \r
-<p class="whs5">py = geompy.MakeVertex(0. \r
+<p class="whs4">py = geompy.MakeVertex(0. \r
  &nbsp;, 100., \r
  0. &nbsp;)</p>\r
 \r
-<p class="whs5">pz = geompy.MakeVertex(0. \r
+<p class="whs4">pz = geompy.MakeVertex(0. \r
  &nbsp;, 0. &nbsp;, \r
  100.)</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">vxy = geompy.MakeVector(px, \r
+<p class="whs4">vxy = geompy.MakeVector(px, \r
  py)</p>\r
 \r
-<p class="whs5">arc = geompy.MakeArc(py, \r
+<p class="whs4">arc = geompy.MakeArc(py, \r
  pz, px)</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">wire = geompy.MakeWire([vxy, \r
+<p class="whs4">wire = geompy.MakeWire([vxy, \r
  arc])</p>\r
 \r
-<p class="whs5">isPlanarFace = 1</p>\r
+<p class="whs4">isPlanarFace = 1</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">face1 = geompy.MakeFace(wire, \r
+<p class="whs4">face1 = geompy.MakeFace(wire, \r
  isPlanarFace)</p>\r
 \r
-<p class="whs5">id_face1 = geompy.addToStudy(face1, \r
+<p class="whs4">id_face1 = geompy.addToStudy(face1, \r
  &quot;Face1&quot;)</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs6"># create a circle to \r
+<p class="whs5"># create a circle to \r
  be an extrusion path</p>\r
 \r
-<p class="whs5">px1 = geompy.MakeVertex( \r
+<p class="whs4">px1 = geompy.MakeVertex( \r
  100., &nbsp;100., \r
  &nbsp;0.)</p>\r
 \r
-<p class="whs5">py1 = geompy.MakeVertex(-100., \r
+<p class="whs4">py1 = geompy.MakeVertex(-100., \r
  -100., &nbsp;0.)</p>\r
 \r
-<p class="whs5">pz1 = geompy.MakeVertex( \r
+<p class="whs4">pz1 = geompy.MakeVertex( \r
  &nbsp;&nbsp;0., \r
  &nbsp;&nbsp;&nbsp;0., \r
  50.)</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">circle = geompy.MakeCircleThreePnt(py1, \r
+<p class="whs4">circle = geompy.MakeCircleThreePnt(py1, \r
  pz1, px1)</p>\r
 \r
-<p class="whs5">id_circle = geompy.addToStudy(circle, \r
+<p class="whs4">id_circle = geompy.addToStudy(circle, \r
  &quot;Path&quot;)</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs6"># create a 2D mesh \r
+<p class="whs5"># create a 2D mesh \r
  on the face</p>\r
 \r
-<p class="whs5">trias = smesh.Mesh(face1, \r
+<p class="whs4">trias = smesh.Mesh(face1, \r
  &quot;Face : 2D mesh&quot;)</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
-\r
-<p class="whs5">algo1D = trias.Segment()</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">algo1D.NumberOfSegments(6)</p>\r
+<p class="whs4">algo1D = trias.Segment()</p>\r
 \r
-<p class="whs5">algo2D = trias.Triangle()</p>\r
+<p class="whs4">algo1D.NumberOfSegments(6)</p>\r
 \r
-<p class="whs5">algo2D.LengthFromEdges()</p>\r
+<p class="whs4">algo2D = trias.Triangle()</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">algo2D.LengthFromEdges()</p>\r
 \r
-<p class="whs5">trias.Compute()</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">tri_mesh = trias.GetMesh()</p>\r
+<p class="whs4">trias.Compute()</p>\r
 \r
-<p class="whs6">&nbsp;</p>\r
+<p class="whs5">&nbsp;</p>\r
 \r
-<p class="whs6"># create a path mesh</p>\r
+<p class="whs5"># create a path mesh</p>\r
 \r
-<p class="whs5">circlemesh = smesh.Mesh(circle, \r
+<p class="whs4">circlemesh = smesh.Mesh(circle, \r
  &quot;Path mesh&quot;)</p>\r
 \r
-<p class="whs5">algo = circlemesh.Segment()</p>\r
+<p class="whs4">algo = circlemesh.Segment()</p>\r
 \r
-<p class="whs5">algo.NumberOfSegments(10)</p>\r
+<p class="whs4">algo.NumberOfSegments(10)</p>\r
 \r
-<p class="whs5">circlemesh.Compute()</p>\r
+<p class="whs4">circlemesh.Compute()</p>\r
 \r
-<p class="whs6">&nbsp;</p>\r
+<p class="whs5">&nbsp;</p>\r
 \r
-<p class="whs6"># extrusion of the \r
+<p class="whs5"># extrusion of the \r
  mesh</p>\r
 \r
-<p class="whs5">aMeshEditor = tri_mesh.GetMeshEditor()</p>\r
+<p class="whs4"><span style="font-family: 'Lucida Console', monospace;">trias.ExtrusionAlongPath([], \r
+ circlemesh, circle,</span></p>\r
 \r
-<p class="whs5">aMeshEditor.ExtrusionAlongPathObject(tri_mesh\r
circlemesh.GetMesh(), circle,</p>\r
+<p class="whs4">&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\r
0, [], 0, smesh.PointStruct(0, 0, 0))</p>\r
 \r
-<p class="whs5">&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;&nbsp;&nbsp;&nbsp;&nbsp;1, \r
- 0, [], 0, SMESH.PointStruct(0, 0, 0))</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs6"># merge nodes</p>\r
+<p class="whs5"># merge nodes</p>\r
 \r
-<p class="whs5">print &quot;Number \r
- of nodes before MergeNodes:&quot;, tri_mesh.NbNodes()</p>\r
+<p class="whs4">print &quot;Number \r
+ of nodes before MergeNodes:&quot;, </p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">trias.NbNodes()</p>\r
 \r
-<p class="whs5">tolerance = 0.001</p>\r
+<p class="whs4">tolerance = 0.001</p>\r
 \r
-<p class="whs5">array_of_nodes_groups \r
- = aMeshEditor.FindCoincidentNodes(tolerance)</p>\r
+<p class="whs4">array_of_nodes_groups \r
+ = trias.FindCoincidentNodes(tolerance)</p>\r
 \r
-<p class="whs5">aMeshEditor.MergeNodes(array_of_nodes_groups)</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">trias.MergeNodes(array_of_nodes_groups)</p>\r
 \r
-<p class="whs5">print &quot;Number \r
- of nodes after MergeNodes:&quot;, tri_mesh.NbNodes()</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">print &quot;&quot;</p>\r
+<p class="whs4">print &quot;Number \r
+ of nodes after MergeNodes:&quot;, trias.NbNodes()</p>\r
 \r
-<p class="whs5">print &quot;Number \r
+<p class="whs4">print &quot;&quot;</p>\r
+\r
+<p class="whs4">print &quot;Number \r
  of elements before MergeEqualElements:&quot;</p>\r
 \r
-<p class="whs5">print &quot;Edges \r
+<p class="whs4">print &quot;Edges \r
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: \r
- &quot;, tri_mesh.NbEdges()</p>\r
+ &quot;, trias.NbEdges()</p>\r
 \r
-<p class="whs5">print &quot;Triangles \r
+<p class="whs4">print &quot;Triangles \r
  &nbsp;: &quot;, \r
- tri_mesh.NbTriangles()</p>\r
+ trias.NbTriangles()</p>\r
 \r
-<p class="whs5">print &quot;Quadrangles: \r
- &quot;, tri_mesh.NbQuadrangles()</p>\r
+<p class="whs4">print &quot;Quadrangles: \r
+ &quot;, trias.NbQuadrangles()</p>\r
 \r
-<p class="whs5">print &quot;Volumes \r
+<p class="whs4">print &quot;Volumes \r
  &nbsp;&nbsp;&nbsp;: \r
- &quot;, tri_mesh.NbVolumes()</p>\r
+ &quot;, trias.NbVolumes()</p>\r
 \r
-<p class="whs6">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs6"># merge elements</p>\r
+<p class="whs5"># merge elements</p>\r
 \r
-<p class="whs5">aMeshEditor.MergeEqualElements()</p>\r
+<p class="whs4">trias.MergeEqualElements()</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
-\r
-<p class="whs5">print &quot;Number \r
+<p class="whs4">print &quot;Number \r
  of elements after MergeEqualElements:&quot;</p>\r
 \r
-<p class="whs5">print &quot;Edges \r
+<p class="whs4">print &quot;Edges \r
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: \r
- &quot;, tri_mesh.NbEdges()</p>\r
+ &quot;, trias.NbEdges()</p>\r
 \r
-<p class="whs5">print &quot;Triangles \r
+<p class="whs4">print &quot;Triangles \r
  &nbsp;: &quot;, \r
- tri_mesh.NbTriangles()</p>\r
+ trias.NbTriangles()</p>\r
 \r
-<p class="whs5">print &quot;Quadrangles: \r
- &quot;, tri_mesh.NbQuadrangles()</p>\r
+<p class="whs4">print &quot;Quadrangles: \r
+ &quot;, trias.NbQuadrangles()</p>\r
 \r
-<p class="whs5">print &quot;Volumes \r
+<p class="whs4">print &quot;Volumes \r
  &nbsp;&nbsp;&nbsp;: \r
- &quot;, tri_mesh.NbVolumes()</p>\r
+ &quot;, trias.NbVolumes()</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">salome.sg.updateObjBrowser(1) \r
+<p class="whs4">salome.sg.updateObjBrowser(1) \r
  </p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
 <h3>Sewing Meshes</h3>\r
 \r
 <h4><a name=bookmark4>Sew Meshes Border to Border</a></h4>\r
 \r
-<p class="whs4"><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="whs4"># For the moment smesh package doesn't provide \r
- methods to sew meshes border to border. </p>\r
+<p class="whs4">import geompy</p>\r
 \r
-<p class="whs4"># In the next SALOME version the scripts will \r
- be updated to use only the commands from smesh package.</p>\r
+<p class="whs4">import smesh</p>\r
 \r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs5">import geompy</p>\r
-\r
-<p class="whs5">import smesh</p>\r
-\r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs6"># create two faces \r
+<p class="whs5"># create two faces \r
  of a box</p>\r
 \r
-<p class="whs5">box1 = geompy.MakeBox(0., \r
+<p class="whs4">box1 = geompy.MakeBox(0., \r
  0., -10., 30., 20., 25.)</p>\r
 \r
-<p class="whs5">facesList1 = geompy.SubShapeAll(box1, \r
+<p class="whs4">facesList1 = geompy.SubShapeAll(box1, \r
  geompy.ShapeType[&quot;FACE&quot;])</p>\r
 \r
-<p class="whs5">face1 = facesList1[2]</p>\r
+<p class="whs4">face1 = facesList1[2]</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">box2 = geompy.MakeBox(0., \r
+<p class="whs4">box2 = geompy.MakeBox(0., \r
  5., 0., 20., 20., 15.)</p>\r
 \r
-<p class="whs5">facesList2 = geompy.SubShapeAll(box2, \r
+<p class="whs4">facesList2 = geompy.SubShapeAll(box2, \r
  geompy.ShapeType[&quot;FACE&quot;])</p>\r
 \r
-<p class="whs5">face2 = facesList2[1]</p>\r
+<p class="whs4">face2 = facesList2[1]</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">edgesList = geompy.SubShapeAll(face2, \r
+<p class="whs4">edgesList = geompy.SubShapeAll(face2, \r
  geompy.ShapeType[&quot;EDGE&quot;])</p>\r
 \r
-<p class="whs5">edge1 = edgesList[2]</p>\r
+<p class="whs4">edge1 = edgesList[2]</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">aComp = geompy.MakeCompound([face1, \r
+<p class="whs4">aComp = geompy.MakeCompound([face1, \r
  face2])</p>\r
 \r
-<p class="whs5">geompy.addToStudy(aComp, \r
+<p class="whs4">geompy.addToStudy(aComp, \r
  &quot;Two faces&quot;)</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs6"># create a mesh on \r
+<p class="whs5"># create a mesh on \r
  two faces</p>\r
 \r
-<p class="whs5">mesh = smesh.Mesh(aComp, \r
+<p class="whs4">mesh = smesh.Mesh(aComp, \r
  &quot;Two faces : quadrangle mesh&quot;)</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">algo1D = mesh.Segment()</p>\r
+<p class="whs4">algo1D = mesh.Segment()</p>\r
 \r
-<p class="whs5">algo1D.NumberOfSegments(9)</p>\r
+<p class="whs4">algo1D.NumberOfSegments(9)</p>\r
 \r
-<p class="whs5">algo2D = mesh.Quadrangle()</p>\r
+<p class="whs4">algo2D = mesh.Quadrangle()</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">algo_local = mesh.Segment(edge1)</p>\r
+<p class="whs4">algo_local = mesh.Segment(edge1)</p>\r
 \r
-<p class="whs5">algo_local.Arithmetic1D(1, \r
+<p class="whs4">algo_local.Arithmetic1D(1, \r
  4)</p>\r
 \r
-<p class="whs5">algo_local.Propagation()</p>\r
+<p class="whs4">algo_local.Propagation()</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">mesh.Compute()</p>\r
+<p class="whs4">mesh.Compute()</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">anEditor = mesh.GetMesh().GetMeshEditor()</p>\r
+<p class="whs5"># sew border to side</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
-\r
-<p class="whs6"># sew border to side</p>\r
-\r
-<p class="whs6"># FirstNodeIDOnFreeBorder, \r
+<p class="whs5"># FirstNodeIDOnFreeBorder, \r
  SecondNodeIDOnFreeBorder, LastNodeIDOnFreeBorder,</p>\r
 \r
-<p class="whs6"># FirstNodeIDOnSide, \r
+<p class="whs5"># FirstNodeIDOnSide, \r
  LastNodeIDOnSide,</p>\r
 \r
-<p class="whs6"># CreatePolygons, CreatePolyedrs</p>\r
+<p class="whs5"># CreatePolygons, CreatePolyedrs</p>\r
 \r
-<p class="whs5">anEditor.SewBorderToSide(5, \r
+<p class="whs4">mesh.SewBorderToSide(5, \r
  45, 6, 113, 109, 0, 0) </p>\r
 \r
 <h4><a name=bookmark5>Sew Conform Free Borders</a></h4>\r
 \r
-<p class="whs4"><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="whs4"># For the moment smesh package doesn't provide \r
- methods to sew conform free borders. </p>\r
-\r
-<p class="whs4"># In the next SALOME version the scripts will \r
- be updated to use only the commands from smesh package.</p>\r
-\r
-<p class="whs5">&nbsp;</p>\r
-\r
-<p class="whs5">import geompy</p>\r
+<p class="whs4">import geompy</p>\r
 \r
-<p class="whs5">import smesh</p>\r
+<p class="whs4">import smesh</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs6"># create two faces \r
+<p class="whs5"># create two faces \r
  of the box</p>\r
 \r
-<p class="whs5">box1 = geompy.MakeBox(0., \r
+<p class="whs4">box1 = geompy.MakeBox(0., \r
  0., -10., 20., 20., 15.)</p>\r
 \r
-<p class="whs5">facesList1 = geompy.SubShapeAll(box1, \r
+<p class="whs4">facesList1 = geompy.SubShapeAll(box1, \r
  geompy.ShapeType[&quot;FACE&quot;])</p>\r
 \r
-<p class="whs5">face1 = facesList1[2]</p>\r
+<p class="whs4">face1 = facesList1[2]</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">box2 = geompy.MakeBox(0., \r
+<p class="whs4">box2 = geompy.MakeBox(0., \r
  5., 0., 20., 20., 15.)</p>\r
 \r
-<p class="whs5">facesList2 = geompy.SubShapeAll(box2, \r
+<p class="whs4">facesList2 = geompy.SubShapeAll(box2, \r
  geompy.ShapeType[&quot;FACE&quot;])</p>\r
 \r
-<p class="whs5">face2 = facesList2[1]</p>\r
+<p class="whs4">face2 = facesList2[1]</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">edgesList = geompy.SubShapeAll(face2, \r
+<p class="whs4">edgesList = geompy.SubShapeAll(face2, \r
  geompy.ShapeType[&quot;EDGE&quot;])</p>\r
 \r
-<p class="whs5">edge1 = edgesList[2]</p>\r
+<p class="whs4">edge1 = edgesList[2]</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">aComp = geompy.MakeCompound([face1, \r
+<p class="whs4">aComp = geompy.MakeCompound([face1, \r
  face2])</p>\r
 \r
-<p class="whs5">geompy.addToStudy(aComp, \r
+<p class="whs4">geompy.addToStudy(aComp, \r
  &quot;Two faces&quot;)</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs6"># create a mesh on \r
+<p class="whs5"># create a mesh on \r
  two faces</p>\r
 \r
-<p class="whs5">mesh = smesh.Mesh(aComp, \r
+<p class="whs4">mesh = smesh.Mesh(aComp, \r
  &quot;Two faces : quadrangle mesh&quot;)</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">algo1D = mesh.Segment()</p>\r
+<p class="whs4">algo1D = mesh.Segment()</p>\r
 \r
-<p class="whs5">algo1D.NumberOfSegments(9)</p>\r
+<p class="whs4">algo1D.NumberOfSegments(9)</p>\r
 \r
-<p class="whs5">algo2D = mesh.Quadrangle()</p>\r
+<p class="whs4">algo2D = mesh.Quadrangle()</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">algo_local = mesh.Segment(edge1)</p>\r
+<p class="whs4">algo_local = mesh.Segment(edge1)</p>\r
 \r
-<p class="whs5">algo_local.Arithmetic1D(1, \r
+<p class="whs4">algo_local.Arithmetic1D(1, \r
  4)</p>\r
 \r
-<p class="whs5">algo_local.Propagation()</p>\r
+<p class="whs4">algo_local.Propagation()</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">mesh.Compute()</p>\r
+<p class="whs4">mesh.Compute()</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
-\r
-<p class="whs5">anEditor = mesh.GetMesh().GetMeshEditor()</p>\r
-\r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs6"># sew conform free \r
+<p class="whs5"># sew conform free \r
  borders</p>\r
 \r
-<p class="whs6"># FirstNodeID1, SecondNodeID1, \r
+<p class="whs5"># FirstNodeID1, SecondNodeID1, \r
  LastNodeID1, FirstNodeID2, SecondNodeID2</p>\r
 \r
-<p class="whs5">anEditor.SewConformFreeBorders(5, \r
- 45, 6, 3, 24) </p>\r
+<p class="whs4">mesh.SewConformFreeBorders(5, \r
+ 45, 6, 3, 24) &nbsp;</p>\r
 \r
 <h4><a name=bookmark6>Sew Free Borders</a></h4>\r
 \r
-<p class="whs4"><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="whs4"># For the moment smesh package doesn't provide \r
- methods to sew free borders. </p>\r
-\r
-<p class="whs4"># 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="whs5">import geompy</p>\r
+<p class="whs4">import geompy</p>\r
 \r
-<p class="whs5">import smesh</p>\r
+<p class="whs4">import smesh</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs6"># create two faces \r
+<p class="whs5"># create two faces \r
  of the box</p>\r
 \r
-<p class="whs5">box1 = geompy.MakeBox(0., \r
+<p class="whs4">box1 = geompy.MakeBox(0., \r
  0., 0., 20., 20., 15.)</p>\r
 \r
-<p class="whs5">facesList1 = geompy.SubShapeAll(box1, \r
+<p class="whs4">facesList1 = geompy.SubShapeAll(box1, \r
  geompy.ShapeType[&quot;FACE&quot;])</p>\r
 \r
-<p class="whs5">face1 = facesList1[2]</p>\r
+<p class="whs4">face1 = facesList1[2]</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">box2 = geompy.MakeBox(0., \r
+<p class="whs4">box2 = geompy.MakeBox(0., \r
  5., 0., 20., 20., 15.)</p>\r
 \r
-<p class="whs5">facesList2 = geompy.SubShapeAll(box2, \r
+<p class="whs4">facesList2 = geompy.SubShapeAll(box2, \r
  geompy.ShapeType[&quot;FACE&quot;])</p>\r
 \r
-<p class="whs5">face2 = facesList2[1]</p>\r
+<p class="whs4">face2 = facesList2[1]</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">edgesList = geompy.SubShapeAll(face2, \r
+<p class="whs4">edgesList = geompy.SubShapeAll(face2, \r
  geompy.ShapeType[&quot;EDGE&quot;])</p>\r
 \r
-<p class="whs5">edge1 = edgesList[2]</p>\r
+<p class="whs4">edge1 = edgesList[2]</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">aComp = geompy.MakeCompound([face1, \r
+<p class="whs4">aComp = geompy.MakeCompound([face1, \r
  face2])</p>\r
 \r
-<p class="whs5">geompy.addToStudy(aComp, \r
+<p class="whs4">geompy.addToStudy(aComp, \r
  &quot;Two faces&quot;)</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs6"># create a mesh on \r
+<p class="whs5"># create a mesh on \r
  two faces</p>\r
 \r
-<p class="whs5">mesh = smesh.Mesh(aComp, \r
+<p class="whs4">mesh = smesh.Mesh(aComp, \r
  &quot;Two faces : quadrangle mesh&quot;)</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">algo1D = mesh.Segment()</p>\r
+<p class="whs4">algo1D = mesh.Segment()</p>\r
 \r
-<p class="whs5">algo1D.NumberOfSegments(4)</p>\r
+<p class="whs4">algo1D.NumberOfSegments(4)</p>\r
 \r
-<p class="whs5">algo2D = mesh.Quadrangle()</p>\r
+<p class="whs4">algo2D = mesh.Quadrangle()</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">algo_local = mesh.Segment(edge1)</p>\r
+<p class="whs4">algo_local = mesh.Segment(edge1)</p>\r
 \r
-<p class="whs5">algo_local.Arithmetic1D(1, \r
+<p class="whs4">algo_local.Arithmetic1D(1, \r
  4)</p>\r
 \r
-<p class="whs5">algo_local.Propagation()</p>\r
+<p class="whs4">algo_local.Propagation()</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">mesh.Compute()</p>\r
+<p class="whs4">mesh.Compute()</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs6"># sew free borders</p>\r
+<p class="whs5"># sew free borders</p>\r
 \r
-<p class="whs6"># FirstNodeID1, SecondNodeID1, \r
+<p class="whs5"># FirstNodeID1, SecondNodeID1, \r
  LastNodeID1,</p>\r
 \r
-<p class="whs6"># FirstNodeID2, SecondNodeID2, \r
+<p class="whs5"># FirstNodeID2, SecondNodeID2, \r
  LastNodeID2, CreatePolygons, CreatePolyedrs</p>\r
 \r
-<p class="whs5">anEditor = mesh.GetMesh().GetMeshEditor()</p>\r
-\r
-<p class="whs7"><span style="font-family: 'Lucida Console', monospace;">anEditor.SewFreeBorders(6, \r
- 21, 5, 1, 12, 3, 0, 0)</span> </p>\r
+<p class="whs6">mesh.SewFreeBorders(6, \r
+ 21, 5, 1, 12, 3, 0, 0) </p>\r
 \r
 <h4><a name=bookmark7>Sew Side Elements</a></h4>\r
 \r
-<p class="whs4"><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="whs4"># For the moment smesh package doesn't provide \r
- methods to sew side elements. </p>\r
-\r
-<p class="whs4"># In the next SALOME version the scripts will \r
- be updated to use only the commands from smesh package.</p>\r
+<p class="whs4">import geompy</p>\r
 \r
-<p class="whs5">import geompy</p>\r
+<p class="whs4">import smesh</p>\r
 \r
-<p class="whs5">import smesh</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
-\r
-<p class="whs6"># create two boxes</p>\r
+<p class="whs5"># create two boxes</p>\r
 \r
-<p class="whs5">box1 = geompy.MakeBox(0., \r
+<p class="whs4">box1 = geompy.MakeBox(0., \r
  &nbsp;0., 0., \r
  10., 10., 10.)</p>\r
 \r
-<p class="whs5">box2 = geompy.MakeBox(0., \r
+<p class="whs4">box2 = geompy.MakeBox(0., \r
  15., 0., 20., 25., 10.)</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">EdgesList = geompy.SubShapeAll(box2, \r
+<p class="whs4">EdgesList = geompy.SubShapeAll(box2, \r
  geompy.ShapeType[&quot;EDGE&quot;])</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">aComp = geompy.MakeCompound([box1, \r
+<p class="whs4">aComp = geompy.MakeCompound([box1, \r
  box2])</p>\r
 \r
-<p class="whs5">geompy.addToStudy(aComp, \r
+<p class="whs4">geompy.addToStudy(aComp, \r
  &quot;Two boxes&quot;)</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs6"># create a mesh on \r
+<p class="whs5"># create a mesh on \r
  two boxes</p>\r
 \r
-<p class="whs5">mesh = smesh.Mesh(aComp, \r
+<p class="whs4">mesh = smesh.Mesh(aComp, \r
  &quot;Two faces : quadrangle mesh&quot;)</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
-\r
-<p class="whs5">algo1D = mesh.Segment()</p>\r
-\r
-<p class="whs5">algo1D.NumberOfSegments(2)</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">algo2D = mesh.Quadrangle()</p>\r
+<p class="whs4">algo1D = mesh.Segment()</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">algo1D.NumberOfSegments(2)</p>\r
 \r
-<p class="whs5">algo_local = mesh.Segment(EdgesList[8])</p>\r
+<p class="whs4">algo2D = mesh.Quadrangle()</p>\r
 \r
-<p class="whs5">algo_local.NumberOfSegments(4)</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">algo_local.Propagation()</p>\r
+<p class="whs4">algo_local = mesh.Segment(EdgesList[8])</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">algo_local.NumberOfSegments(4)</p>\r
 \r
-<p class="whs5">mesh.Compute()</p>\r
+<p class="whs4">algo_local.Propagation()</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs5">anEditor = mesh.GetMesh().GetMeshEditor()</p>\r
+<p class="whs4">mesh.Compute()</p>\r
 \r
-<p class="whs5">&nbsp;</p>\r
+<p class="whs4">&nbsp;</p>\r
 \r
-<p class="whs6"># sew side elements</p>\r
+<p class="whs5"># sew side elements</p>\r
 \r
-<p class="whs6"># IDsOfSide1Elements, \r
+<p class="whs5"># IDsOfSide1Elements, \r
  IDsOfSide2Elements,</p>\r
 \r
-<p class="whs6"># NodeID1OfSide1ToMerge, \r
+<p class="whs5"># NodeID1OfSide1ToMerge, \r
  NodeID1OfSide2ToMerge, NodeID2OfSide1ToMerge, NodeID2OfSide2ToMerge</p>\r
 \r
-<p class="whs5">anEditor.SewSideElements([69, \r
- 70, 71, 72], [91, 92, 89, 90], 8, 38, 23, 58)</p>\r
+<p class="whs4">mesh.SewSideElements([69, \r
+ 70, 71, 72], [91, 92, 89, 90], 8, 38, 23, 58) </p>\r
 \r
 <script type="text/javascript" language="javascript1.2">\r
 <!--\r
index 27b788e3019edf427042eef00397d0d76b822adc..922b7f56d882d1b3c1625489e3f5a70224d12902 100755 (executable)
@@ -131,52 +131,51 @@ if (window.writeIntopicBar)
 \r
 <p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs2"># print informations \r
+<p class="whs2"># print information \r
  about the mesh</p>\r
 \r
-<p class="whs1">mesh = tetra.GetMesh()</p>\r
-\r
-<p class="whs1">print &quot;Information about mesh:&quot;</p>\r
+<p class="whs1">print &quot;Information about mesh:&quot; \r
+ </p>\r
 \r
 <p class="whs1">print &quot;Number of nodes &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: \r
- &quot;, mesh.NbNodes()</p>\r
+ &quot;, tetra.NbNodes()</p>\r
 \r
 <p class="whs1">print &quot;Number of edges &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: \r
- &quot;, mesh.NbEdges()</p>\r
+ &quot;, tetra.NbEdges()</p>\r
 \r
 <p class="whs1">print &quot;Number of faces &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: \r
- &quot;, mesh.NbFaces()</p>\r
+ &quot;, tetra.NbFaces()</p>\r
 \r
 <p class="whs1">print &quot; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;triangles \r
  &nbsp;&nbsp;: \r
- &quot;, mesh.NbTriangles()</p>\r
+ &quot;, tetra.NbTriangles()</p>\r
 \r
 <p class="whs1">print &quot; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;quadrangles \r
- : &quot;, mesh.NbQuadrangles()</p>\r
+ : &quot;, tetra.NbQuadrangles()</p>\r
 \r
 <p class="whs1">print &quot; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polygons \r
  &nbsp;&nbsp;&nbsp;: \r
- &quot;, mesh.NbPolygons()</p>\r
+ &quot;, tetra.NbPolygons()</p>\r
 \r
 <p class="whs1">print &quot;Number of volumes &nbsp;&nbsp;&nbsp;&nbsp;: \r
- &quot;, mesh.NbVolumes()</p>\r
+ &quot;, tetra.NbVolumes()</p>\r
 \r
 <p class="whs1">print &quot; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tetrahedrons: \r
- &quot;, mesh.NbTetras()</p>\r
+ &quot;, tetra.NbTetras()</p>\r
 \r
 <p class="whs1">print &quot; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hexahedrons \r
- : &quot;, mesh.NbHexas()</p>\r
+ : &quot;, tetra.NbHexas()</p>\r
 \r
 <p class="whs1">print &quot; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;prisms \r
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: \r
- &quot;, mesh.NbPrisms()</p>\r
+ &quot;, tetra.NbPrisms()</p>\r
 \r
 <p class="whs1">print &quot; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pyramids \r
  &nbsp;&nbsp;&nbsp;: \r
- &quot;, mesh.NbPyramids()</p>\r
+ &quot;, tetra.NbPyramids()</p>\r
 \r
 <p class="whs1">print &quot; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polyhedrons \r
- : &quot;, mesh.NbPolyhedrons() </p>\r
+ : &quot;, tetra.NbPolyhedrons() &nbsp;</p>\r
 \r
 <script type="text/javascript" language="javascript1.2">\r
 <!--\r