]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
PAL11898: Improve docs for Extrusion Along a Path.
authorjfa <jfa@opencascade.com>
Thu, 6 Jul 2006 11:20:58 +0000 (11:20 +0000)
committerjfa <jfa@opencascade.com>
Thu, 6 Jul 2006 11:20:58 +0000 (11:20 +0000)
19 files changed:
doc/salome/gui/SMESH/extrusion_along_a_path.htm
doc/salome/gui/SMESH/image102.gif [deleted file]
doc/salome/gui/SMESH/image104.gif [deleted file]
doc/salome/gui/SMESH/modifying_meshes.htm
doc/salome/gui/SMESH/pics/a-extusionalongapath2.png [deleted file]
doc/salome/gui/SMESH/pics/circle_angles_after.png [new file with mode: 0644]
doc/salome/gui/SMESH/pics/circle_simple_after.png [new file with mode: 0644]
doc/salome/gui/SMESH/pics/circle_simple_before.png [new file with mode: 0644]
doc/salome/gui/SMESH/pics/curvi_angles_after.png [new file with mode: 0644]
doc/salome/gui/SMESH/pics/curvi_simple_after.png [new file with mode: 0644]
doc/salome/gui/SMESH/pics/curvi_simple_before.png [new file with mode: 0644]
doc/salome/gui/SMESH/pics/edge_wire_3d_after.png [new file with mode: 0644]
doc/salome/gui/SMESH/pics/edge_wire_3d_before.png [new file with mode: 0644]
doc/salome/gui/SMESH/pics/edge_wire_after.png [new file with mode: 0644]
doc/salome/gui/SMESH/pics/edge_wire_before.png [new file with mode: 0644]
doc/salome/gui/SMESH/pics/extrusion1.png [new file with mode: 0644]
doc/salome/gui/SMESH/pics/mesh_for_extr_along_path.png [new file with mode: 0644]
doc/salome/gui/SMESH/pics/straight_after.png [new file with mode: 0644]
doc/salome/gui/SMESH/pics/straight_before.png [new file with mode: 0644]

index 2058125a00cc5543c40e2264c1ce90feda3c6f76..74b811ab66187d910b19977886ae809aca8ad120 100755 (executable)
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<head>\r
-<title>Extrusion along a path</title>\r
-<meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
-<link rel="stylesheet" href="default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">\r
-<!--\r
-if (navigator.appName !="Netscape")\r
-{   document.write("<link rel='stylesheet' href='default.css'>");}\r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-table.whs1 { x-cell-content-align:top; width:100%; border-spacing:0px; }\r
-col.whs2 { width:50%; }\r
-tr.whs3 { x-cell-content-align:top; }\r
-td.whs4 { width:50%; padding-right:10px; padding-left:10px; border-right-style:none; border-left-style:none; border-top-style:none; border-bottom-style:none; }\r
-img_whs5 { border:none; width:335px; height:323px; border-style:none; }\r
-td.whs6 { width:50%; padding-right:10px; padding-left:10px; border-top-style:none; border-bottom-style:none; border-right-style:none; }\r
-img_whs7 { border:none; width:350px; height:323px; border-style:none; }\r
-p.whs8 { margin-left:40px; }\r
-img_whs9 { border:none; width:27px; height:24px; border-style:none; }\r
-img_whs10 { border:none; width:434px; height:541px; float:none; border-style:none; }\r
-ul.whs11 { list-style:disc; }\r
-p.whs12 { margin-left:84px; }\r
-img_whs13 { border:none; width:26px; height:25px; border-style:none; }\r
-img_whs14 { border:none; width:29px; height:28px; border-style:none; }\r
--->\r
-</style><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
-<!--\r
-function reDo() {\r
-  if (innerWidth != origWidth || innerHeight != origHeight)\r
-     location.reload();\r
-}\r
-if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
-       origWidth = innerWidth;\r
-       origHeight = innerHeight;\r
-       onresize = reDo;\r
-}\r
-onerror = null; \r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
-p.WebHelpNavBar { text-align:right; }\r
--->\r
-</style><script type="text/javascript" language="javascript1.2" src="whmsg.js"></script>\r
-<script type="text/javascript" language="javascript" src="whver.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="whproxy.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="whutils.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="whtopic.js"></script>\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.gbWhTopic)\r
-{\r
-       if (window.setRelStartPage)\r
-       {\r
-       addTocInfo("MESH module\nModifying meshes\nExtrusion along a path");\r
-addButton("show",BTN_IMG,"Show","","","","",0,0,"whd_show0.gif","whd_show2.gif","whd_show1.gif");\r
-addButton("hide",BTN_IMG,"Hide","","","","",0,0,"whd_hide0.gif","whd_hide2.gif","whd_hide1.gif");\r
-\r
-       }\r
-\r
-\r
-       if (window.setRelStartPage)\r
-       {\r
-       setRelStartPage("index.htm");\r
-\r
-               autoSync(1);\r
-               sendSyncInfo();\r
-               sendAveInfoOut();\r
-       }\r
-\r
-}\r
-else\r
-       if (window.gbIE4)\r
-               document.location.reload();\r
-//-->\r
-</script>\r
-</head>\r
-<body><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
-       writeIntopicBar(4);\r
-//-->\r
-</script>\r
-<h1>Extrusion along a path</h1>\r
-\r
-<p>In principle, Extrusion along a path works in the same way as Extrusion, \r
- the main difference is that we define not a vector, but a path of extrusion \r
- which must be a meshed edge or wire. To get an idea of how this algorithm \r
- works, let's see the left image, where we have a 1D circle edge and &nbsp;a \r
- 2D hexagon to be extruded along this path (in the picture they are angular \r
- because we show the wireframe of the mesh). And now let's see the right \r
- image, showing the result of the operation. &nbsp;</p>\r
-\r
-<p>&nbsp;</p>\r
-\r
-<table x-use-null-cells cellspacing="0" width="100%" class="whs1">\r
-<col class="whs2">\r
-<col class="whs2">\r
-\r
-<tr valign="top" class="whs3">\r
-<td width="50%" class="whs4">\r
-<p><img src="image102.gif" width="335px" height="323px" border="0" class="img_whs5"></td>\r
-<td width="50%" class="whs6">\r
-<p><img src="image104.gif" width="350px" height="323px" border="0" class="img_whs7"></td></tr>\r
-</table>\r
-\r
-<p>&nbsp;</p>\r
-\r
-<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>\r
-\r
-<p>&nbsp;</p>\r
-\r
-<p class=TODO>To use Extrusion along a path:</p>\r
-\r
-<p class="whs8">1. From the <span style="font-weight: bold;"><B>Modification \r
- </B></span>menu choose the <span style="font-weight: bold;"><B>Extrusion along \r
- a path </B></span>item or click <img src="image101.gif" width="27px" height="24px" border="0" class="img_whs9"> button in the toolbar. The \r
- following dialog box will appear:</p>\r
-\r
-<p class="whs8">&nbsp;</p>\r
-\r
-<p class=TODO\r
-       style="margin-left: 80px;"><img src="pics/a-extusionalongapath2.png" x-maintain-ratio="TRUE" width="434px" height="541px" border="0" class="img_whs10"></p>\r
-\r
-<p class="whs8">&nbsp;</p>\r
-\r
-<p class="whs8">2. In the dialog box you should &nbsp;</p>\r
-\r
-<ul type="disc" class="whs11">\r
-       \r
-       <li class=kadov-p><p class="whs12">select the type of \r
- elements which will be extruded (1D or 2D),</p></li>\r
-       \r
-       <li class=kadov-p><p class="whs12">specify the IDs of \r
- the elements which will be extruded by selecting them in the 3D viewer \r
- or <span style="font-weight: bold;"><B>Select the whole mesh, submesh or \r
- grou</B></span>p,</p></li>\r
-       \r
-       <li class=kadov-p><p class="whs12">specify the path along \r
- which the elements will be extruded, for this you should specify the <span \r
- style="font-weight: bold;"><B>Mesh</B></span>, the <span style="font-weight: bold;"><B>Shape</B></span>, \r
- and the <span style="font-weight: bold;"><B>Start point</B></span> for the extrusion. \r
- </p></li>\r
-</ul>\r
-\r
-<p class="whs8">&nbsp;</p>\r
-\r
-<p class="whs8">3. There are two optional parameters, which \r
- can be very useful.</p>\r
-\r
-<ul type="disc" class="whs11">\r
-       \r
-       <li class=kadov-p><p class="whs12">If the path of extrusion \r
- is curvilinear, at each iteration the extruded shape is rotated to keep \r
- its initial angularity to the curve. By default, the <span style="font-weight: bold;"><B>Base \r
- point</B></span> around which the shape is rotated is the mass center of the \r
- shape, however, you can specify any point as the <span style="font-weight: bold;"><B>Base \r
- Point</B></span> and the shape will be rotated with respect to this point.</p></li>\r
-       \r
-       <li class=kadov-p><p class="whs12">The shape can also \r
- be rotated around the path to get the resulting mesh in a helical fashion. \r
- At the picture above we see both &quot;oblique-angled&quot; and &quot;right-angled&quot; \r
- mesh elements because <span style="font-weight: bold;"><B>Rotation Angles</B></span> \r
- have not been set for all iterations. You set the values of the angles \r
- at the right and add them to the list of angles at the left by pressing \r
- the <img src="image105.gif" width="26px" height="25px" border="0" class="img_whs13"> button and remove the values from the list by pressing \r
- the <img src="image106.gif" width="29px" height="28px" border="0" class="img_whs14"> button. </p></li>\r
-</ul>\r
-\r
-<p class="whs8">4. Click the <span style="font-weight: bold;"><B>Apply \r
- </B></span>or <span style="font-weight: bold;"><B>OK </B></span>button.</p>\r
-\r
-<p class="whs8">&nbsp;</p>\r
-\r
-<p>&nbsp;<span style="font-weight: bold;"><B>See \r
- Also</B></span> a sample TUI Script of an <a href="modifying_meshes.htm#bookmark10">Extrusion \r
- along a Path</a> operation. &nbsp;</p>\r
-\r
-<p>&nbsp;</p>\r
-\r
-<p>&nbsp;</p>\r
-\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
-       writeIntopicBar(0);\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">
+
+<html>
+
+<head>
+<title>Extrusion along a path</title>
+<meta http-equiv="content-type" content="text/html; charset=windows-1252">
+<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">
+<link rel="stylesheet" href="default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">
+<!--
+if (navigator.appName !="Netscape")
+{   document.write("<link rel='stylesheet' href='default.css'>");}
+//-->
+</script>
+<style type="text/css">
+<!--
+img_whs1 { border:none; width:27px; height:24px; border-style:none; }
+img_whs2 { border:none; width:387px; height:334px; float:none; border-style:none; }
+ul.whs3 { list-style:disc; }
+table.whs4 { x-cell-content-align:top; width:100%; border-spacing:0px; }
+col.whs5 { width:50%; }
+tr.whs6 { x-cell-content-align:top; }
+td.whs7 { width:50%; padding-right:10px; padding-left:10px; border-right-style:none; border-left-style:none; border-top-style:none; border-bottom-style:none; }
+p.whs8 { margin-left:0px; margin-right:53px; }
+img_whs9 { border:none; width:389px; height:334px; float:none; border-style:none; }
+td.whs10 { width:50%; padding-right:10px; padding-left:10px; border-top-style:none; border-bottom-style:none; border-right-style:none; }
+p.whs11 { margin-left:0px; }
+p.whs12 { margin-left:40px; }
+col.whs13 { width:33.333%; }
+td.whs14 { width:33.333%; padding-right:10px; padding-left:10px; border-bottom-style:none; border-right-style:none; border-left-style:none; border-top-style:none; }
+td.whs15 { width:33.333%; padding-right:10px; padding-left:10px; border-bottom-style:none; border-right-style:none; border-top-style:none; }
+td.whs16 { width:33.333%; padding-right:10px; padding-left:10px; border-bottom-style:none; border-top-style:none; border-right-style:none; }
+td.whs17 { width:33.333%; padding-right:10px; padding-left:10px; border-right-style:none; border-left-style:none; border-bottom-style:none; }
+td.whs18 { width:33.333%; padding-right:10px; padding-left:10px; border-right-style:none; border-bottom-style:none; }
+td.whs19 { width:33.333%; padding-right:10px; padding-left:10px; border-bottom-style:none; border-right-style:none; }
+p.whs20 { font-weight:bold; margin-left:0px; }
+p.whs21 { font-weight:bold; }
+img_whs22 { border:none; width:441px; height:541px; float:none; border-style:none; }
+p.whs23 { margin-left:84px; }
+p.whs24 { margin-left:156px; }
+p.whs25 { margin-left:156px; font-weight:bold; }
+img_whs26 { border:none; width:26px; height:25px; border-style:none; }
+img_whs27 { border:none; width:29px; height:28px; border-style:none; }
+-->
+</style><script type="text/javascript" language="JavaScript">
+<!--
+if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))
+{
+  var strNSS = "<style type='text/css'>";
+  strNSS += "p.whs8 {margin-left:1pt; }";
+  strNSS += "p.whs11 {margin-left:1pt; }";
+  strNSS += "p.whs20 {margin-left:1pt; }";
+  strNSS +="</style>";
+  document.write(strNSS);
+}
+//-->
+</script>
+<script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">
+<!--
+function reDo() {
+  if (innerWidth != origWidth || innerHeight != origHeight)
+     location.reload();
+}
+if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
+       origWidth = innerWidth;
+       origHeight = innerHeight;
+       onresize = reDo;
+}
+onerror = null; 
+//-->
+</script>
+<style type="text/css">
+<!--
+div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }
+p.WebHelpNavBar { text-align:right; }
+-->
+</style><script type="text/javascript" language="javascript1.2" src="whmsg.js"></script>
+<script type="text/javascript" language="javascript" src="whver.js"></script>
+<script type="text/javascript" language="javascript1.2" src="whproxy.js"></script>
+<script type="text/javascript" language="javascript1.2" src="whutils.js"></script>
+<script type="text/javascript" language="javascript1.2" src="whtopic.js"></script>
+<script type="text/javascript" language="javascript1.2">
+<!--
+if (window.gbWhTopic)
+{
+       if (window.setRelStartPage)
+       {
+       addTocInfo("MESH module\nModifying meshes\nExtrusion along a path");
+addButton("show",BTN_IMG,"Show","","","","",0,0,"whd_show0.gif","whd_show2.gif","whd_show1.gif");
+addButton("hide",BTN_IMG,"Hide","","","","",0,0,"whd_hide0.gif","whd_hide2.gif","whd_hide1.gif");
+
+       }
+
+
+       if (window.setRelStartPage)
+       {
+       setRelStartPage("index.htm");
+
+               autoSync(1);
+               sendSyncInfo();
+               sendAveInfoOut();
+       }
+
+}
+else
+       if (window.gbIE4)
+               document.location.reload();
+//-->
+</script>
+</head>
+<body><script type="text/javascript" language="javascript1.2">
+<!--
+if (window.writeIntopicBar)
+       writeIntopicBar(4);
+//-->
+</script>
+<h1><img src="image101.gif" width="27px" height="24px" border="0" class="img_whs1">Extrusion along a path</h1>
+
+<p>In principle, <span style="font-weight: bold;"><B>Extrusion along a path</B></span> 
+ works in the same way as <span style="font-weight: bold;"><B>Extrusion</B></span>, 
+ the main difference is that we define not a vector, but a path of extrusion 
+ which must be a meshed edge. To get an idea of how this algorithm works, 
+ examine several examples, starting from the most simple case of extrusion 
+ along a straight edge. In all examples the same mesh will be extruded 
+ along different paths and with different parameters. This sample 2D mesh 
+ has two quadrangle faces and seven edges. Look at the picture, where white 
+ digits are the node numbers and green are the element numbers:</p>
+
+<p><span style="margin-left: 40px;"><img src="pics/mesh_for_extr_along_path.png" x-maintain-ratio="TRUE" width="387px" height="334px" border="0" class="img_whs2"> .</span></p>
+
+<p>&nbsp;</p>
+
+<ul type="disc" class="whs3">
+       
+       <li class=kadov-p><p><span style="font-weight: bold;"><B>Extrusion along 
+ a straight edge</B></span> (not using base point or angles)</p></li>
+</ul>
+
+<table x-use-null-cells cellspacing="0" width="100%" class="whs4">
+<col class="whs5">
+<col class="whs5">
+
+<tr valign="top" class="whs6">
+<td width="50%" class="whs7">
+<p class="whs8"><img src="pics/straight_before.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td>
+<td width="50%" class="whs10">
+<p class="whs11"><img src="pics/straight_after.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td></tr>
+</table>
+
+<p class="whs12">&nbsp;&nbsp;&nbsp;</p>
+
+<p class="whs12">The left image shows a 1D path mesh, built 
+ on a linear edge, and the initial 2D mesh. The right image shows the result 
+ of extrusion of two edges (#1 and #2) of the initial mesh along the path. 
+ Node #1 of path mesh has been selected as <span style="font-weight: bold;"><B>Start 
+ node</B></span>.</p>
+
+<p class="whs12">&nbsp;</p>
+
+<ul type="disc" class="whs3">
+       
+       <li class=kadov-p><p><span style="font-weight: bold;"><B>Extrusion along 
+ a curvilinear edge</B></span> (with and without angles)</p></li>
+</ul>
+
+<table x-use-null-cells cellspacing="0" width="100%" class="whs4">
+<col class="whs13">
+<col class="whs13">
+<col class="whs13">
+
+<tr valign="top" class="whs6">
+<td width="33.333%" class="whs14">
+<p><img src="pics/curvi_simple_before.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td>
+<td width="33.333%" class="whs15">
+<p><img src="pics/curvi_simple_after.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td>
+<td width="33.333%" class="whs16">
+<p><img src="pics/curvi_angles_after.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td></tr>
+
+<tr valign="top" class="whs6">
+<td width="33.333%" class="whs17">
+<p>The left image shows a 1D path mesh, built on curvilinear edge, and 
+ the initial &nbsp;2D 
+ mesh.</td>
+<td width="33.333%" class="whs18">
+<p>The central image shows the result of extrusion of one edge (#2) of 
+ the initial mesh along the path. &nbsp;Node 
+ #1 of path mesh has been selected as <span style="font-weight: bold;"><B>Start 
+ node</B></span>.</td>
+<td width="33.333%" class="whs19">
+<p>The same, but using angles {45, 45, 45, 0, -45, -45, -45}</td></tr>
+</table>
+
+<p class="whs11">&nbsp;</p>
+
+<ul type="disc" class="whs3">
+       
+       <li class=kadov-p><p class="whs11"><span style="font-weight: bold;"><B>Extrusion 
+ along a sub-mesh.</B></span></p></li>
+</ul>
+
+<table x-use-null-cells cellspacing="0" width="100%" class="whs4">
+<col class="whs5">
+<col class="whs5">
+
+<tr valign="top" class="whs6">
+<td width="50%" class="whs7">
+<p><img src="pics/edge_wire_before.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td>
+<td width="50%" class="whs10">
+<p><img src="pics/edge_wire_after.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td></tr>
+</table>
+
+<p class="whs12">&nbsp;</p>
+
+<p class="whs12">In this example the path mesh has been built 
+ on a wire (polyline with six edges). The first edge of the wire was used 
+ as <span style="font-weight: bold;"><B>Shape (edge)</B></span>, node #1 as <span 
+ style="font-weight: bold;"><B>Start node</B></span>. The angles have been defined 
+ as {10, 10, 10}. The middle edge (#4) of the initial mesh has been extruded.</p>
+
+<p class="whs12">&nbsp;</p>
+
+<ul type="disc" class="whs3">
+       
+       <li class=kadov-p><p class="whs20">Extrusion 
+ of 2d elements along a sub-mesh.</p></li>
+</ul>
+
+<table x-use-null-cells cellspacing="0" width="100%" class="whs4">
+<col class="whs5">
+<col class="whs5">
+
+<tr valign="top" class="whs6">
+<td width="50%" class="whs7">
+<p><img src="pics/edge_wire_3d_before.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td>
+<td width="50%" class="whs10">
+<p><img src="pics/edge_wire_3d_after.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td></tr>
+</table>
+
+<p class="whs12">&nbsp;</p>
+
+<p class="whs12">This extrusion bases on the same path mesh 
+ as in the previous example but the third edge of the wire was set as <span 
+ style="font-weight: bold;"><B>Shape (edge)</B></span> and node #4 as <span style="font-weight: bold;"><B>Start 
+ node</B></span>. Please note, that the extrusion has been done in direction 
+ from node #4 to node #3, i.e. against the wire direction. In this example 
+ both faces of the initial mesh have been extruded.</p>
+
+<p class="whs12">&nbsp;</p>
+
+<ul type="disc" class="whs3">
+       
+       <li class=kadov-p><p class="whs21">Extrusion of 2d elements 
+ along a closed path.</p></li>
+</ul>
+
+<table x-use-null-cells cellspacing="0" width="100%" class="whs4">
+<col class="whs13">
+<col class="whs13">
+<col class="whs13">
+
+<tr valign="top" class="whs6">
+<td width="33.333%" class="whs14">
+<p><img src="pics/circle_simple_before.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td>
+<td width="33.333%" class="whs15">
+<p><img src="pics/circle_simple_after.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td>
+<td width="33.333%" class="whs16">
+<p><img src="pics/circle_angles_after.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td></tr>
+
+<tr valign="top" class="whs6">
+<td width="33.333%" class="whs17">
+<p>The left image shows a path mesh built on a closed edge (circle).</td>
+<td width="33.333%" class="whs18">
+<p>The central image shows the result of extrusion of both faces of the 
+ initial mesh. Note, that no sewing has been done, so, there are six coincident 
+ nodes and two coincident faces in the resulting mesh.</td>
+<td width="33.333%" class="whs19">
+<p>The same, but using angles {45, -45, 45, -45, 45, -45, 45, -45}</td></tr>
+</table>
+
+<p class="whs12">&nbsp;</p>
+
+<p>&nbsp;</p>
+
+<p class=TODO>To use Extrusion along a path:</p>
+
+<p class="whs12">1. From the <span style="font-weight: bold;"><B>Modification 
+ </B></span>menu choose the <span style="font-weight: bold;"><B>Extrusion along 
+ a path </B></span>item or click <img src="image101.gif" width="27px" height="24px" border="0" class="img_whs1"> button in the toolbar. The 
+ following dialog box will appear:</p>
+
+<p class="whs12">&nbsp;</p>
+
+<p class=TODO
+       style="margin-left: 80px;"><img src="pics/extrusion1.png" x-maintain-ratio="TRUE" width="441px" height="541px" border="0" class="img_whs22"></p>
+
+<p class="whs12">&nbsp;</p>
+
+<p class="whs12">2. In the dialog box you should &nbsp;</p>
+
+<ul type="disc" class="whs3">
+       
+       <li class=kadov-p><p class="whs23">select the type of 
+ elements which will be extruded (1D or 2D),</p></li>
+       
+       <li class=kadov-p><p class="whs23">specify the <span style="font-weight: bold;"><B>IDs 
+ of the elements</B></span> which will be extruded by selecting them in the 
+ 3D viewer or <span style="font-weight: bold;"><B>Select the whole mesh, submesh 
+ or group</B></span>,</p></li>
+       
+       <li class=kadov-p><p class="whs23">define the <span style="font-weight: bold;"><B>Path</B></span> 
+ along which the elements will be extruded, </p></li>
+</ul>
+
+<p class="whs24">Path definition consists of several elements 
+ </p>
+
+<ul type="disc" class="whs3">
+       
+       <li class=kadov-p><p class="whs25">Mesh 
+ - <span style="font-weight: normal;">containing a 1D sub-mesh on the edge, 
+ along which proceeds the extrusion.</span></p></li>
+       
+       <li class=kadov-p><p class="whs25">Shape 
+ (edge) - <span style="font-weight: normal;">as the mesh can be complex, 
+ the edge is used to define the sub-mesh for the path.</span></p></li>
+       
+       <li class=kadov-p><p class="whs25">Start 
+ node - <span style="font-weight: normal;">&nbsp;the 
+ first or the last node on the edge. It is used to define the direction 
+ of extrusion.</span></p></li>
+</ul>
+
+<p class="whs12">&nbsp;</p>
+
+<p class="whs12">3. There are two optional parameters, which 
+ can be very useful.</p>
+
+<ul type="disc" class="whs3">
+       
+       <li class=kadov-p><p class="whs23">If the path of extrusion 
+ is curvilinear, at each iteration the extruded shape is rotated to keep 
+ its initial angularity to the curve. By default, the <span style="font-weight: bold;"><B>Base 
+ Point</B></span> around which the shape is rotated is the mass center of the 
+ shape, however, you can specify any point as the <span style="font-weight: bold;"><B>Base 
+ Point</B></span> and the shape will be rotated with respect to this point.</p></li>
+       
+       <li class=kadov-p><p class="whs23">The shape can also 
+ be rotated around the path to get the resulting mesh in a helical fashion. 
+ You can set the values of angles at the right, add them to the list of 
+ angles at the left by pressing the <img src="image105.gif" width="26px" height="25px" border="0" class="img_whs26"> button and remove them 
+ from the list by pressing the <img src="image106.gif" width="29px" height="28px" border="0" class="img_whs27"> button. </p></li>
+</ul>
+
+<p class="whs12">4. Click the <span style="font-weight: bold;"><B>Apply 
+ </B></span>or <span style="font-weight: bold;"><B>OK </B></span>button. Mesh edges 
+ will be extruded into faces, faces into volumes. The external surface 
+ of the resulting 3d mesh (if faces have been extruded) is covered with 
+ faces, and corners with edges. If the path is closed, the resulting mesh 
+ can contain duplicated nodes and faces, because no sewing is done.</p>
+
+<p class="whs12">&nbsp;</p>
+
+<p>&nbsp;<span style="font-weight: bold;"><B>See 
+ Also</B></span> a sample TUI Script of an <a href="modifying_meshes.htm#bookmark10">Extrusion 
+ along a Path</a> operation. &nbsp;</p>
+
+<p>&nbsp;</p>
+
+<p>&nbsp;</p>
+
+<script type="text/javascript" language="javascript1.2">
+<!--
+if (window.writeIntopicBar)
+       writeIntopicBar(0);
+//-->
+</script>
+</body>
+</html>
diff --git a/doc/salome/gui/SMESH/image102.gif b/doc/salome/gui/SMESH/image102.gif
deleted file mode 100755 (executable)
index be6a582..0000000
Binary files a/doc/salome/gui/SMESH/image102.gif and /dev/null differ
diff --git a/doc/salome/gui/SMESH/image104.gif b/doc/salome/gui/SMESH/image104.gif
deleted file mode 100755 (executable)
index 3c33fee..0000000
Binary files a/doc/salome/gui/SMESH/image104.gif and /dev/null differ
index 8708a02b0c5606a2cff4e908b99a768cbb2a2902..ab474a53d7e72ae77b2b419c44839f8b0e554270 100755 (executable)
-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<head>\r
-<title>Modifying Meshes</title>\r
-<meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
-<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com"><style>\r
-<!--\r
-P { margin-top:0pt; margin-bottom:0pt; }\r
-LI.kadov-P {  }\r
--->\r
-</style><style type="text/css">\r
-<!--\r
-p.whs1 { margin-top:0pt; margin-bottom:0pt; font-family:'Lucida Console' , monospace; }\r
-p.whs2 { margin-top:0pt; margin-bottom:0pt; }\r
-p.whs3 { margin-top:0pt; margin-bottom:0pt; font-family:'Times New Roman' , serif; }\r
-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 { font-family:'Lucida Console' , monospace; }\r
-p.whs8 { font-family:'Times New Roman' , serif; }\r
-p.whs9 { margin-left:40px; font-family:'Lucida Console' , monospace; }\r
--->\r
-</style><script type="text/javascript" language="JavaScript">\r
-<!--\r
-if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))\r
-{\r
-  var strNSS = "<style type='text/css'>";\r
-  strNSS += "p.whs1 {margin-top:1pt;margin-bottom:1pt; }";\r
-  strNSS += "p.whs2 {margin-top:1pt;margin-bottom:1pt; }";\r
-  strNSS += "p.whs3 {margin-top:1pt;margin-bottom:1pt; }";\r
-  strNSS += "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 +="</style>";\r
-  document.write(strNSS);\r
-}\r
-//-->\r
-</script>\r
-<script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
-<!--\r
-function reDo() {\r
-  if (innerWidth != origWidth || innerHeight != origHeight)\r
-     location.reload();\r
-}\r
-if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
-       origWidth = innerWidth;\r
-       origHeight = innerHeight;\r
-       onresize = reDo;\r
-}\r
-onerror = null; \r
-//-->\r
-</script>\r
-<style type="text/css">\r
-<!--\r
-div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
-p.WebHelpNavBar { text-align:right; }\r
--->\r
-</style><script type="text/javascript" language="javascript1.2" src="whmsg.js"></script>\r
-<script type="text/javascript" language="javascript" src="whver.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="whproxy.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="whutils.js"></script>\r
-<script type="text/javascript" language="javascript1.2" src="whtopic.js"></script>\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.gbWhTopic)\r
-{\r
-       if (window.setRelStartPage)\r
-       {\r
-       addTocInfo("MESH module\nTUI Scripts\nModifying Meshes");\r
-addButton("show",BTN_IMG,"Show","","","","",0,0,"whd_show0.gif","whd_show2.gif","whd_show1.gif");\r
-addButton("hide",BTN_IMG,"Hide","","","","",0,0,"whd_hide0.gif","whd_hide2.gif","whd_hide1.gif");\r
-\r
-       }\r
-\r
-\r
-       if (window.setRelStartPage)\r
-       {\r
-       setRelStartPage("index.htm");\r
-\r
-               autoSync(1);\r
-               sendSyncInfo();\r
-               sendAveInfoOut();\r
-       }\r
-\r
-}\r
-else\r
-       if (window.gbIE4)\r
-               document.location.reload();\r
-//-->\r
-</script>\r
-</head>\r
-<body><script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
-       writeIntopicBar(4);\r
-//-->\r
-</script>\r
-<h1>Modifying Meshes</h1>\r
-\r
-<h3><a name=bookmark>Adding Nodes and Elements</a></h3>\r
-\r
-<h4>Add Node</h4>\r
-\r
-<p class="whs1">import SMESH</p>\r
-\r
-<p class="whs1">import SMESH_mechanic</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">smesh &nbsp;= \r
- SMESH_mechanic.smesh</p>\r
-\r
-<p class="whs1">mesh &nbsp;&nbsp;= \r
- SMESH_mechanic.mesh</p>\r
-\r
-<p class="whs1">salome = SMESH_mechanic.salome</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs2"># add node</p>\r
-\r
-<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>\r
-\r
-<p class="whs1">if aMeshEditor.AddNode(50, \r
- 10, 0) == 1:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;Node addition is OK!&quot;</p>\r
-\r
-<p class="whs1">else:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;KO node addition.&quot;</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;</p>\r
-\r
-<p class="whs1">salome.sg.updateObjBrowser(1) \r
- </p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<h4>Add Edge</h4>\r
-\r
-<p class="whs1">import SMESH</p>\r
-\r
-<p class="whs1">import SMESH_mechanic</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">smesh &nbsp;= \r
- SMESH_mechanic.smesh</p>\r
-\r
-<p class="whs1">mesh &nbsp;&nbsp;= \r
- SMESH_mechanic.mesh</p>\r
-\r
-<p class="whs1">salome = SMESH_mechanic.salome</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs2"># add node</p>\r
-\r
-<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>\r
-\r
-<p class="whs1">if aMeshEditor.AddNode(50, \r
- 10, 0) == 1:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;Node addition is OK!&quot;</p>\r
-\r
-<p class="whs1">else:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;KO node addition.&quot;</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs2"># add edge</p>\r
-\r
-<p class="whs1">LastNodeId = mesh.NbNodes()</p>\r
-\r
-<p class="whs1">if aMeshEditor.AddEdge([LastNodeId, \r
- 38]) == 1:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;Edge addition is OK!&quot;</p>\r
-\r
-<p class="whs1">else:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;KO edge addition.&quot;</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">salome.sg.updateObjBrowser(1) \r
- </p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<h4>Add Triangle</h4>\r
-\r
-<p class="whs1">import SMESH</p>\r
-\r
-<p class="whs1">import SMESH_mechanic</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">smesh &nbsp;= \r
- SMESH_mechanic.smesh</p>\r
-\r
-<p class="whs1">mesh &nbsp;&nbsp;= \r
- SMESH_mechanic.mesh</p>\r
-\r
-<p class="whs1">salome = SMESH_mechanic.salome</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs2"># add node</p>\r
-\r
-<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>\r
-\r
-<p class="whs1">if aMeshEditor.AddNode(50, \r
- 10, 0) == 1:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;Node addition is OK!&quot;</p>\r
-\r
-<p class="whs1">else:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;KO node addition.&quot;</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">LastNodeId = mesh.NbNodes()</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs2"># add triangle</p>\r
-\r
-<p class="whs1">if aMeshEditor.AddFace([LastNodeId, \r
- 38, 39]) == 1:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;Triangle addition is OK!&quot;</p>\r
-\r
-<p class="whs1">else:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;KO triangle addition.&quot;</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;</p>\r
-\r
-<p class="whs1">salome.sg.updateObjBrowser(1) \r
- </p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<h4>Add Quadrangle</h4>\r
-\r
-<p class="whs1">import SMESH</p>\r
-\r
-<p class="whs1">import SMESH_mechanic</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">smesh &nbsp;= \r
- SMESH_mechanic.smesh</p>\r
-\r
-<p class="whs1">mesh &nbsp;&nbsp;= \r
- SMESH_mechanic.mesh</p>\r
-\r
-<p class="whs1">salome = SMESH_mechanic.salome</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs2"># add node</p>\r
-\r
-<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>\r
-\r
-<p class="whs1">if aMeshEditor.AddNode(50, \r
- 10, 0) == 1:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;Node addition is OK!&quot;</p>\r
-\r
-<p class="whs1">else:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;KO node addition.&quot;</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">LastNodeId = mesh.NbNodes()</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs2"># add quadrangle</p>\r
-\r
-<p class="whs1">if aMeshEditor.AddNode(40, \r
- 20, 0) == 1:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;Node addition is OK!&quot;</p>\r
-\r
-<p class="whs1">else:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;KO node addition.&quot;</p>\r
-\r
-<p class="whs1">if aMeshEditor.AddFace([mesh.NbNodes(), \r
- LastNodeId, 38, 39]) == 1:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;Quadrangle addition is OK!&quot;</p>\r
-\r
-<p class="whs1">else:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;KO quadrangle addition.&quot;</p>\r
-\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
-<p class="whs2">&nbsp;</p>\r
-\r
-<h4>Add Tetrahedron</h4>\r
-\r
-<p class="whs1">import SMESH</p>\r
-\r
-<p class="whs1">import SMESH_mechanic</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">smesh &nbsp;= \r
- SMESH_mechanic.smesh</p>\r
-\r
-<p class="whs1">mesh &nbsp;&nbsp;= \r
- SMESH_mechanic.mesh</p>\r
-\r
-<p class="whs1">salome = SMESH_mechanic.salome</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs2"># add node</p>\r
-\r
-<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>\r
-\r
-<p class="whs1">if aMeshEditor.AddNode(50, \r
- 10, 0) == 1:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;Node addition is OK!&quot;</p>\r
-\r
-<p class="whs1">else:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;KO node addition.&quot;</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">LastNodeId = mesh.NbNodes()</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs2"># add tetrahedron</p>\r
-\r
-<p class="whs1">if aMeshEditor.AddVolume([LastNodeId, \r
- 38, 39, 246]) == 1:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;Tetrahedron addition is OK!&quot;</p>\r
-\r
-<p class="whs1">else:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;KO tetrahedron addition.&quot;</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;</p>\r
-\r
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
- </p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
-\r
-<h4>Add Hexahedron</h4>\r
-\r
-<p class="whs1">import SMESH</p>\r
-\r
-<p class="whs1">import SMESH_mechanic</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">smesh &nbsp;= \r
- SMESH_mechanic.smesh</p>\r
-\r
-<p class="whs1">mesh &nbsp;&nbsp;= \r
- SMESH_mechanic.mesh</p>\r
-\r
-<p class="whs1">salome = SMESH_mechanic.salome</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs2"># add nodes</p>\r
-\r
-<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>\r
-\r
-<p class="whs1">if aMeshEditor.AddNode(50, \r
- 10, 0) == 1:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;Node addition is OK!&quot;</p>\r
-\r
-<p class="whs1">else:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;KO node addition.&quot;</p>\r
-\r
-<p class="whs1">aNodeId1 = mesh.NbNodes()</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">if aMeshEditor.AddNode(47, \r
- 12, 0) == 1:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;Node addition is OK!&quot;</p>\r
-\r
-<p class="whs1">else:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;KO node addition.&quot;</p>\r
-\r
-<p class="whs1">aNodeId2 = mesh.NbNodes()</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">if aMeshEditor.AddNode(50, \r
- 10, 10) == 1:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;Node addition is OK!&quot;</p>\r
-\r
-<p class="whs1">else:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;KO node addition.&quot;</p>\r
-\r
-<p class="whs1">aNodeId3 = mesh.NbNodes()</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">if aMeshEditor.AddNode(47, \r
- 12, 10) == 1:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;Node addition is OK!&quot;</p>\r
-\r
-<p class="whs1">else:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;KO node addition.&quot;</p>\r
-\r
-<p class="whs1">aNodeId4 = mesh.NbNodes()</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs2"># add hexahedron</p>\r
-\r
-<p class="whs1">if aMeshEditor.AddVolume([aNodeId2, \r
- aNodeId1, 38, 39, aNodeId4, aNodeId3, 245, 246]) == 1:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;Hexahedron addition is OK!&quot;</p>\r
-\r
-<p class="whs1">else:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;KO Hexahedron addition.&quot;</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;</p>\r
-\r
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
- </p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
-\r
-<h4>Add Polygon</h4>\r
-\r
-<p class="whs1">import salome</p>\r
-\r
-<p class="whs1">import geompy</p>\r
-\r
-<p class="whs1">import math</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">import StdMeshers</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs2"># GEOM module </p>\r
-\r
-<p class="whs1">shape_mesh = geompy.MakeCylinderRH(13, \r
- 77)</p>\r
-\r
-<p class="whs1">geompy.addToStudy(shape_mesh, \r
- &quot;cylinder&quot;)</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs2"># SMESH module</p>\r
-\r
-<p class="whs1">smesh = salome.lcc.FindOrLoadComponent(&quot;FactoryServer&quot;, \r
- &quot;SMESH&quot;)</p>\r
-\r
-<p class="whs1">smesh.SetCurrentStudy(salome.myStudy)</p>\r
-\r
-<p class="whs1">mesh = smesh.CreateMesh(shape_mesh)</p>\r
-\r
-<p class="whs1">MeshEditor = mesh.GetMeshEditor()</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs2"># a method to build a polygonal \r
- mesh element with nb_vert angles:</p>\r
-\r
-<p class="whs1">def MakePolygon \r
- (a_mesh, x0, y0, z0, radius, nb_vert):</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;node_start_id \r
- = a_mesh.NbNodes() + 1</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;al \r
- = 2.0 * math.pi / nb_vert</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;node_ids \r
- = []</p>\r
-\r
-<p class="whs2">&nbsp;&nbsp;&nbsp;&nbsp;</p>\r
-\r
-<p class="whs2"># Create nodes for a polyhedron</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;for \r
- ii in range(nb_vert):</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MeshEditor.AddNode(x0 \r
- + radius * math.cos(ii*al),</p>\r
-\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;y0 \r
- + radius * math.sin(ii*al),</p>\r
-\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;z0)</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;node_ids.append(node_start_id \r
- + ii)</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pass</p>\r
-\r
-<p class="whs2">&nbsp;&nbsp;&nbsp;&nbsp;</p>\r
-\r
-<p class="whs2"># Create a polygon</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;MeshEditor.AddPolygonalFace(node_ids)</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;return \r
- 0</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs2"># Create three polygons</p>\r
-\r
-<p class="whs1">MakePolygon(mesh, \r
- 0, 0, &nbsp;0, \r
- 30, 13)</p>\r
-\r
-<p class="whs1">MakePolygon(mesh, \r
- 0, 0, 10, 21, &nbsp;9)</p>\r
-\r
-<p class="whs1">MakePolygon(mesh, \r
- 0, 0, 20, 13, &nbsp;6)</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">salome.sg.updateObjBrowser(1) \r
- &nbsp;</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<h4>Add polyhedron</h4>\r
-\r
-<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">import \r
- salome</span></p>\r
-\r
-<p class="whs1">import geompy</p>\r
-\r
-<p class="whs1">import math</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">#import SMESH</p>\r
-\r
-<p class="whs1">import StdMeshers</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs3"># GEOM</p>\r
-\r
-<p class="whs1">shape_mesh = geompy.MakeCylinderRH(13, \r
- 77)</p>\r
-\r
-<p class="whs1">geompy.addToStudy(shape_mesh, \r
- &quot;cylinder&quot;)</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs3"># SMESH</p>\r
-\r
-<p class="whs1">smesh = salome.lcc.FindOrLoadComponent(&quot;FactoryServer&quot;, \r
- &quot;SMESH&quot;)</p>\r
-\r
-<p class="whs1">smesh.SetCurrentStudy(salome.myStudy)</p>\r
-\r
-<p class="whs1">mesh = smesh.CreateMesh(shape_mesh)</p>\r
-\r
-<p class="whs1">MeshEditor = mesh.GetMeshEditor()</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs3"># Now we are going \r
- to create a 12-hedron:</p>\r
-\r
-<p class="whs3">&nbsp;</p>\r
-\r
-<p class="whs3"># Create nodes for \r
- polyhedron</p>\r
-\r
-<p class="whs1">al = 2 * math.pi \r
- / 5.0</p>\r
-\r
-<p class="whs1">cosal = math.cos(al)</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">aa = 13</p>\r
-\r
-<p class="whs1">rr = aa / (2.0 * \r
- math.sin(al/2.0))</p>\r
-\r
-<p class="whs1">dr = 2.0 * rr * \r
- cosal</p>\r
-\r
-<p class="whs1">r1 = rr + dr</p>\r
-\r
-<p class="whs1">dh = rr * math.sqrt(2.0 \r
- * (1.0 - cosal * (1.0 + 2.0 * cosal)))</p>\r
-\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="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">for i in range(5):</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;MeshEditor.AddNode(rr*math.cos(i*al), \r
- rr*math.sin(i*al), &nbsp;0) \r
- <span style="font-family: 'Times New Roman', serif;"># 1,3,5,7, 9 # bottom</span></p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;MeshEditor.AddNode(r1*math.cos(i*al), \r
- r1*math.sin(i*al), dh) <span style="font-family: 'Times New Roman', serif;"># \r
- 2,4,6,8,10 # above bottom</span></p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">for i in range(5):</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;MeshEditor.AddNode(rr*math.cos(i*al \r
- + al/2.0),</p>\r
-\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;rr*math.sin(i*al \r
- + al/2.0), hh) # 11,13,15,17,19 <span style="font-family: 'Times New Roman', serif;"># \r
- top</span></p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;MeshEditor.AddNode(r1*math.cos(i*al \r
- + al/2.0),</p>\r
-\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;r1*math.sin(i*al \r
- + al/2.0), hh - dh) # 12,14,16,18,20 <span style="font-family: 'Times New Roman', serif;"># \r
- below top</span></p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs3"># Create a polyhedral \r
- volume</p>\r
-\r
-<p class="whs1">MeshEditor.AddPolyhedralVolume([ \r
- 1, &nbsp;3, &nbsp;5, \r
- &nbsp;7, &nbsp;9, \r
- &nbsp;<span style="font-family: 'Times New Roman', serif;"># \r
- bottom</span></p>\r
-\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;1, \r
- &nbsp;2, 12, \r
- &nbsp;4, &nbsp;3, \r
- &nbsp;<span style="font-family: 'Times New Roman', serif;"># \r
- .</span></p>\r
-\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;3, \r
- &nbsp;4, 14, \r
- &nbsp;6, &nbsp;5, \r
- &nbsp;<span style="font-family: 'Times New Roman', serif;"># \r
- .</span></p>\r
-\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;5, \r
- &nbsp;6, 16, \r
- &nbsp;8, &nbsp;7, \r
- &nbsp;<span style="font-family: 'Times New Roman', serif;"># \r
- . above bottom</span></p>\r
-\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;7, \r
- &nbsp;8, 18, \r
- 10, &nbsp;9, \r
- &nbsp;<span style="font-family: 'Times New Roman', serif;"># \r
- .</span></p>\r
-\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;9, \r
- 10, 20, &nbsp;2, \r
- &nbsp;1, &nbsp;<span \r
- style="font-family: 'Times New Roman', serif;"># \r
- .</span></p>\r
-\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;11, \r
- 12, &nbsp;4, \r
- 14, 13, &nbsp;<span style="font-family: 'Times New Roman', serif;"># \r
- -</span></p>\r
-\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;13, \r
- 14, &nbsp;6, \r
- 16, 15, &nbsp;<span style="font-family: 'Times New Roman', serif;"># \r
- -</span></p>\r
-\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;15, \r
- 16, &nbsp;8, \r
- 18, 17, &nbsp;<span style="font-family: 'Times New Roman', serif;"># \r
- - below top</span></p>\r
-\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;17, \r
- 18, 10, 20, 19, &nbsp;<span style="font-family: 'Times New Roman', serif;"># \r
- -</span></p>\r
-\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;19, \r
- 20, &nbsp;2, \r
- 12, 11, &nbsp;<span style="font-family: 'Times New Roman', serif;"># \r
- -</span></p>\r
-\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;11, \r
- 13, 15, 17, 19], <span style="font-family: 'Times New Roman', serif;"># \r
- top</span></p>\r
-\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="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">salome.sg.updateObjBrowser(1) \r
- &nbsp;</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<h3><a name=bookmark1>Removing Nodes and Elements</a></h3>\r
-\r
-<h4 class="whs4">Removing Nodes</h4>\r
-\r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs1">import SMESH</p>\r
-\r
-<p class="whs1">import SMESH_mechanic</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">smesh &nbsp;= \r
- SMESH_mechanic.smesh</p>\r
-\r
-<p class="whs1">mesh &nbsp;&nbsp;= \r
- SMESH_mechanic.mesh</p>\r
-\r
-<p class="whs1">salome = SMESH_mechanic.salome</p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
-\r
-<p class="whs2"># add node</p>\r
-\r
-<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>\r
-\r
-<p class="whs1">if aMeshEditor.RemoveNodes([246, \r
- 255]) == 1:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;Node removing is OK!&quot;</p>\r
-\r
-<p class="whs1">else:</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;KO node removing.&quot;</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;</p>\r
-\r
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
- </p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
-\r
-<h4>Removing Elements</h4>\r
-\r
-<p class="whs1">import SMESH</p>\r
-\r
-<p class="whs1">import SMESH_mechanic</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">smesh &nbsp;= \r
- SMESH_mechanic.smesh</p>\r
-\r
-<p class="whs1">mesh &nbsp;&nbsp;= \r
- SMESH_mechanic.mesh</p>\r
-\r
-<p class="whs1">salome = SMESH_mechanic.salome</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">anEditor = mesh.GetMeshEditor()</p>\r
-\r
-<p class="whs1">anEditor.RemoveElements([850, \r
- 859, 814])</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">salome.sg.updateObjBrowser(1) \r
- </p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<h3><a name=bookmark2>Renumbering Nodes and Elements</a></h3>\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 &nbsp;&nbsp;= \r
- SMESH_mechanic.mesh</p>\r
-\r
-<p class="whs5">salome = SMESH_mechanic.salome</p>\r
-\r
-<p class="whs5">&nbsp;</p>\r
-\r
-<p class="whs5">anEditor = mesh.GetMeshEditor()</p>\r
-\r
-<p class="whs5">anEditor.RenumberNodes()</p>\r
-\r
-<p class="whs5">&nbsp;</p>\r
-\r
-<p class="whs6"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
- </p>\r
-\r
-<p class="whs6">&nbsp;</p>\r
-\r
-<p>&nbsp;</p>\r
-\r
-<h3><a name=bookmark3>Moving Nodes</a></h3>\r
-\r
-<p class="whs1">import SMESH</p>\r
-\r
-<p class="whs1">import SMESH_mechanic</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">smesh &nbsp;= \r
- SMESH_mechanic.smesh</p>\r
-\r
-<p class="whs1">mesh &nbsp;&nbsp;= \r
- SMESH_mechanic.mesh</p>\r
-\r
-<p class="whs1">salome = SMESH_mechanic.salome</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs2"># move node</p>\r
-\r
-<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>\r
-\r
-<p class="whs1">aMeshEditor.MoveNode(38, \r
- 20, 10, 0)</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;</p>\r
-\r
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
- </p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
-\r
-<h3><a name=bookmark4>Diagonal Inversion</a></h3>\r
-\r
-<p class="whs1">import SMESH</p>\r
-\r
-<p class="whs1">import SMESH_mechanic</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs1">smesh &nbsp;= \r
- SMESH_mechanic.smesh</p>\r
-\r
-<p class="whs1">mesh &nbsp;&nbsp;= \r
- SMESH_mechanic.mesh</p>\r
-\r
-<p class="whs1">salome = SMESH_mechanic.salome</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
-\r
-<p class="whs2"># inverse diagonal</p>\r
-\r
-<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>\r
-\r
-<p class="whs1">aMeshEditor.InverseDiag(700, \r
- 642)</p>\r
-\r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;</p>\r
-\r
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
- </p>\r
-\r
-<p class="whs2">&nbsp;</p>\r
-\r
-<h3><a name=bookmark5>Uniting two Triangles</a></h3>\r
-\r
-<p class="whs7">import SMESH</p>\r
-\r
-<p class="whs7">import SMESH_mechanic</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">smesh &nbsp;= \r
- SMESH_mechanic.smesh</p>\r
-\r
-<p class="whs7">mesh &nbsp;&nbsp;= \r
- SMESH_mechanic.mesh</p>\r
-\r
-<p class="whs7">salome = SMESH_mechanic.salome</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p># delete diagonal</p>\r
-\r
-<p class="whs7">aMeshEditor = mesh.GetMeshEditor()</p>\r
-\r
-<p class="whs7">aMeshEditor.DeleteDiag(700, \r
- 642)</p>\r
-\r
-<p class="whs7">&nbsp;&nbsp;&nbsp;&nbsp;</p>\r
-\r
-<p><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
- </p>\r
-\r
-<p>&nbsp;</p>\r
-\r
-<h3><a name=bookmark6>Uniting a Set of Triangles</a></h3>\r
-\r
-<p class="whs7">import SMESH</p>\r
-\r
-<p class="whs7">import SMESH_mechanic</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">smesh &nbsp;= \r
- SMESH_mechanic.smesh</p>\r
-\r
-<p class="whs7">mesh &nbsp;&nbsp;= \r
- SMESH_mechanic.mesh</p>\r
-\r
-<p class="whs7">salome = SMESH_mechanic.salome</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p># unite a set of triangles</p>\r
-\r
-<p class="whs7">aFilterMgr = smesh.CreateFilterManager()</p>\r
-\r
-<p class="whs7">aFunctor = aFilterMgr.CreateMinimumAngle()</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">aMeshEditor = mesh.GetMeshEditor()</p>\r
-\r
-<p class="whs7">aMeshEditor.TriToQuad([1145, \r
- 1147, 1159, 1135], aFunctor, 60)</p>\r
-\r
-<p class="whs7">&nbsp;&nbsp;&nbsp;&nbsp;</p>\r
-\r
-<p class="whs7">salome.sg.updateObjBrowser(1) \r
- </p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<h3><a name=bookmark12>Orientation</a></h3>\r
-\r
-<p class="whs7"><span style="font-family: 'Lucida Console', monospace;">import \r
- salome</span></p>\r
-\r
-<p class="whs7">import geompy</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">import StdMeshers</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs8"># GEOM module</p>\r
-\r
-<p class="whs7">shape_mesh = geompy.MakeCylinderRH(13, \r
- 77)</p>\r
-\r
-<p class="whs7">geompy.addToStudy(shape_mesh, \r
- &quot;cylinder&quot;)</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs8"># SMESH module</p>\r
-\r
-<p class="whs7">smesh = salome.lcc.FindOrLoadComponent(&quot;FactoryServer&quot;, \r
- &quot;SMESH&quot;)</p>\r
-\r
-<p class="whs7">smesh.SetCurrentStudy(salome.myStudy)</p>\r
-\r
-<p class="whs7">mesh = smesh.CreateMesh(shape_mesh)</p>\r
-\r
-<p class="whs7">MeshEditor = mesh.GetMeshEditor()</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs8"># build five quadrangles:</p>\r
-\r
-<p class="whs7">node_start_id = mesh.NbNodes() \r
- + 1</p>\r
-\r
-<p class="whs7">dx = 10</p>\r
-\r
-<p class="whs7">dy = 20</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">MeshEditor.AddNode(0.0 \r
- * dx, 0, 0) # 1</p>\r
-\r
-<p class="whs7">MeshEditor.AddNode(1.0 \r
- * dx, 0, 0) # 2</p>\r
-\r
-<p class="whs7">MeshEditor.AddNode(2.0 \r
- * dx, 0, 0) # 3</p>\r
-\r
-<p class="whs7">MeshEditor.AddNode(3.0 \r
- * dx, 0, 0) # 4</p>\r
-\r
-<p class="whs7">MeshEditor.AddNode(4.0 \r
- * dx, 0, 0) # 5</p>\r
-\r
-<p class="whs7">MeshEditor.AddNode(5.0 \r
- * dx, 0, 0) # 6</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">MeshEditor.AddNode(0.0 \r
- * dx, dy, 0) # 7</p>\r
-\r
-<p class="whs7">MeshEditor.AddNode(1.0 \r
- * dx, dy, 0) # 8</p>\r
-\r
-<p class="whs7">MeshEditor.AddNode(2.0 \r
- * dx, dy, 0) # 9</p>\r
-\r
-<p class="whs7">MeshEditor.AddNode(3.0 \r
- * dx, dy, 0) # 10</p>\r
-\r
-<p class="whs7">MeshEditor.AddNode(4.0 \r
- * dx, dy, 0) # 11</p>\r
-\r
-<p class="whs7">MeshEditor.AddNode(5.0 \r
- * dx, dy, 0) # 12</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">MeshEditor.AddFace([1, \r
- 2, &nbsp;8, &nbsp;7])</p>\r
-\r
-<p class="whs7">MeshEditor.AddFace([2, \r
- 3, &nbsp;9, &nbsp;8])</p>\r
-\r
-<p class="whs7">MeshEditor.AddFace([3, \r
- 4, 10, &nbsp;9])</p>\r
-\r
-<p class="whs7">MeshEditor.AddFace([4, \r
- 5, 11, 10])</p>\r
-\r
-<p class="whs7">MeshEditor.AddFace([5, \r
- 6, 12, 11])</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs8"># Change orientation \r
- of the second and the fourth faces.</p>\r
-\r
-<p class="whs7">MeshEditor.Reorient([2, \r
- 4])</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">salome.sg.updateObjBrowser(1) \r
- &nbsp;</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<h3><a name=bookmark7>Cutting Quadrangles</a></h3>\r
-\r
-<p class="whs7">import SMESH</p>\r
-\r
-<p class="whs7">import SMESH_mechanic</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">smesh &nbsp;= \r
- SMESH_mechanic.smesh</p>\r
-\r
-<p class="whs7">mesh &nbsp;&nbsp;= \r
- SMESH_mechanic.mesh</p>\r
-\r
-<p class="whs7">salome = SMESH_mechanic.salome</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs8"># unite a set of triangles</p>\r
-\r
-<p class="whs7">aFilterMgr = smesh.CreateFilterManager()</p>\r
-\r
-<p class="whs7">aFunctor = aFilterMgr.CreateMinimumAngle()</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">aMeshEditor = mesh.GetMeshEditor()</p>\r
-\r
-<p class="whs7">aMeshEditor.QuadToTri([405, \r
- 406], aFunctor)</p>\r
-\r
-<p class="whs7">&nbsp;&nbsp;&nbsp;&nbsp;</p>\r
-\r
-<p class="whs7">salome.sg.updateObjBrowser(1) \r
- </p>\r
-\r
-<p class="whs8">&nbsp;</p>\r
-\r
-<h3><a name=bookmark8>Smoothing</a></h3>\r
-\r
-<p class="whs7">import SMESH</p>\r
-\r
-<p class="whs7">import SMESH_mechanic</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">smesh &nbsp;= \r
- SMESH_mechanic.smesh</p>\r
-\r
-<p class="whs7">mesh &nbsp;&nbsp;= \r
- SMESH_mechanic.mesh</p>\r
-\r
-<p class="whs7">salome = SMESH_mechanic.salome</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs8"># smooth</p>\r
-\r
-<p class="whs7">FacesSmooth = [911, \r
- 931, 950, 864, 932]</p>\r
-\r
-<p class="whs7">GroupSmooth = mesh.CreateGroup(SMESH.FACE,&quot;Group \r
- of faces (smooth)&quot;)</p>\r
-\r
-<p class="whs7">GroupSmooth.Add(FacesSmooth)</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">aMeshEditor = mesh.GetMeshEditor()</p>\r
-\r
-<p class="whs7">aMeshEditor.SmoothObject(GroupSmooth, \r
- [], 20, 2, SMESH.SMESH_MeshEditor.CENTROIDAL_SMOOTH)</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">salome.sg.updateObjBrowser(1) \r
- </p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<h3><a name=bookmark9>Extrusion</a></h3>\r
-\r
-<p class="whs8">import SMESH</p>\r
-\r
-<p class="whs8">import SMESH_mechanic</p>\r
-\r
-<p class="whs8">&nbsp;</p>\r
-\r
-<p class="whs8">smesh &nbsp;= \r
- SMESH_mechanic.smesh</p>\r
-\r
-<p class="whs8">mesh &nbsp;&nbsp;= \r
- SMESH_mechanic.mesh</p>\r
-\r
-<p class="whs8">salome = SMESH_mechanic.salome</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs8"># extrusion of the group</p>\r
-\r
-<p class="whs8">point = SMESH.PointStruct(0, \r
- 0, 5)</p>\r
-\r
-<p class="whs8">vector = SMESH.DirStruct(point)</p>\r
-\r
-<p class="whs8">FacesTriToQuad = [2381, \r
- 2382, 2383, 2384, 2385, 2386, 2387, 2388, 2389, 2390, 2391, 2392, 2393, \r
- 2394, 2395, 2396, 2397, 2398, 2399, 2400, 2401, 2402, 2403, 2404, 2405, \r
- 2406, 2407, 2408, 2409, 2410, 2411, 2412, 2413, 2414, 2415, 2416, 2417, \r
- 2418, 2419, 2420, 2421, 2422]</p>\r
-\r
-<p class="whs8">&nbsp;</p>\r
-\r
-<p class="whs8">GroupTriToQuad = mesh.CreateGroup(SMESH.FACE,&quot;Group \r
- of faces (quad)&quot;)</p>\r
-\r
-<p class="whs8">GroupTriToQuad.Add(FacesTriToQuad)</p>\r
-\r
-<p class="whs8">&nbsp;</p>\r
-\r
-<p class="whs8">aMeshEditor = mesh.GetMeshEditor()</p>\r
-\r
-<p class="whs8">aMeshEditor.ExtrusionSweepObject(GroupTriToQuad, \r
- vector, 5)</p>\r
-\r
-<p class="whs8">&nbsp;</p>\r
-\r
-<p class="whs8">salome.sg.updateObjBrowser(1) \r
- </p>\r
-\r
-<p class="whs8">&nbsp;</p>\r
-\r
-<h3><a name=bookmark10>Extrusion along a Path</a></h3>\r
-\r
-<p class="whs7">import geompy</p>\r
-\r
-<p class="whs7">import smesh</p>\r
-\r
-<p class="whs7">import salome</p>\r
-\r
-<p class="whs7">import SMESH</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs8"># create a face to be \r
- meshed</p>\r
-\r
-<p class="whs7">px = geompy.MakeVertex(100., \r
- 0. &nbsp;, 0. \r
- &nbsp;)</p>\r
-\r
-<p class="whs7">py = geompy.MakeVertex(0. \r
- &nbsp;, 100., \r
- 0. &nbsp;)</p>\r
-\r
-<p class="whs7">pz = geompy.MakeVertex(0. \r
- &nbsp;, 0. &nbsp;, \r
- 100.)</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">vxy = geompy.MakeVector(px, \r
- py)</p>\r
-\r
-<p class="whs7">arc = geompy.MakeArc(py, \r
- pz, px)</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">wire = geompy.MakeWire([vxy, \r
- arc])</p>\r
-\r
-<p class="whs7">isPlanarFace = 1</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">face1 = geompy.MakeFace(wire, \r
- isPlanarFace)</p>\r
-\r
-<p class="whs7">id_face1 = geompy.addToStudy(face1, \r
- &quot;Face1&quot;)</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs8"># create a 2D mesh on \r
- the face</p>\r
-\r
-<p class="whs7">trias = smesh.Mesh(face1, \r
- &quot;Face : 2D mesh&quot;)</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">algo = trias.Segment()</p>\r
-\r
-<p class="whs7">algo.NumberOfSegments(6)</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">algo = trias.Triangle()</p>\r
-\r
-<p class="whs7">algo.LengthFromEdges()</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">trias.Compute()</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs8"># create a path mesh</p>\r
-\r
-<p class="whs7">px1 = geompy.MakeVertex(100., \r
- 100. &nbsp;, \r
- 0. &nbsp;)</p>\r
-\r
-<p class="whs7">py1 = geompy.MakeVertex(-100. \r
- &nbsp;, -100., \r
- 0. &nbsp;)</p>\r
-\r
-<p class="whs7">pz1 = geompy.MakeVertex(0. \r
- &nbsp;, 0. &nbsp;, \r
- 50.)</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">circle = geompy.MakeCircleThreePnt(py1, \r
- pz1, px1)</p>\r
-\r
-<p class="whs7">id_circle = geompy.addToStudy(circle, \r
- &quot;Path&quot;)</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">circlemesh = smesh.Mesh(circle, \r
- &quot;Path mesh&quot;)</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">algo = circlemesh.Segment()</p>\r
-\r
-<p class="whs7">algo.NumberOfSegments(10)</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">circlemesh.Compute()</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs8"># extrusion of the mesh</p>\r
-\r
-<p class="whs8"># The mesh &quot;trias&quot; \r
- will be extruded along another mesh, which is a sub-mesh of &quot;circlemesh&quot;,</p>\r
-\r
-<p class="whs8"><span style="font-family: 'Times New Roman', serif;"># \r
- corresponding to geometry &quot;circle&quot;. In this particular case \r
- the path mesh will be the whole &quot;circlemesh&quot;</span></p>\r
-\r
-<p class="whs8">&nbsp;</p>\r
-\r
-<p class="whs7">aMeshEditor = trias.GetMesh().GetMeshEditor()</p>\r
-\r
-<p class="whs7">aMeshEditor.ExtrusionAlongPathObject(trias.GetMesh(), \r
- circlemesh.GetMesh(), circle, 1, 0, [], 0, SMESH.PointStruct(0, 0, 0))</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs8"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
- </p>\r
-\r
-<h3><a name=bookmark11>Revolution</a></h3>\r
-\r
-<p class="whs7">import SMESH</p>\r
-\r
-<p class="whs7">import SMESH_mechanic</p>\r
-\r
-<p class="whs7">import math</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">smesh &nbsp;= \r
- SMESH_mechanic.smesh</p>\r
-\r
-<p class="whs7">mesh &nbsp;&nbsp;= \r
- SMESH_mechanic.mesh</p>\r
-\r
-<p class="whs7">salome = SMESH_mechanic.salome</p>\r
-\r
-<p class="whs8">&nbsp;</p>\r
-\r
-<p class="whs8"># rotate a sweep object</p>\r
-\r
-<p class="whs7">FacesRotate = [492, \r
- 493, 502, 503]</p>\r
-\r
-<p class="whs7">GroupRotate = mesh.CreateGroup(SMESH.FACE,&quot;Group \r
- of faces (rotate)&quot;)</p>\r
-\r
-<p class="whs7">GroupRotate.Add(FacesRotate)</p>\r
-\r
-<p class="whs7">angle45 = &nbsp;45*math.pi/180</p>\r
-\r
-<p class="whs7">axisXYZ = SMESH.AxisStruct(-38.3128, \r
- -73.3658, -23.321, -13.3402, -13.3265, 6.66632)</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">aMeshEditor = mesh.GetMeshEditor()</p>\r
-\r
-<p class="whs7">aMeshEditor.RotationSweepObject(GroupRotate, \r
- axisXYZ, angle45, 4, 1e-5)</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs8"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
- </p>\r
-\r
-<p class="whs8">&nbsp;</p>\r
-\r
-<h3><a name=bookmark13>Pattern Mapping</a></h3>\r
-\r
-<p>Attention! This script was written using old approach, based on direct usage of SMESH idl interface. To be updated for version 3.2.1 to use <b>smesh</b> package.\r
-<br>&nbsp;\r
-\r
-<p class="whs7">import salome</p>\r
-\r
-<p class="whs7">import geompy</p>\r
-\r
-<p class="whs7">import SMESH, smesh</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">geompy.init_geom(salome.myStudy)</p>\r
-\r
-<p class="whs7">smesh.smesh.SetCurrentStudy(salome.myStudy)</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs8"># define geometry</p>\r
-\r
-<p class="whs7">Box_1 = geompy.MakeBoxDXDYDZ(200, \r
- 200, 200)</p>\r
-\r
-<p class="whs7">geompy.addToStudy(Box_1, \r
- &quot;Box_1&quot;)</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">faces = geompy.SubShapeAll(Box_1, \r
- geompy.ShapeType[&quot;FACE&quot;])</p>\r
-\r
-<p class="whs7">Face_1 = faces[0]</p>\r
-\r
-<p class="whs7">Face_2 = faces[1]</p>\r
-\r
-<p class="whs7">geompy.addToStudyInFather(Box_1, \r
- Face_1, &quot;Face_1&quot;)</p>\r
-\r
-<p class="whs7">geompy.addToStudyInFather(Box_1, \r
- Face_2, &quot;Face_2&quot;)</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs8"># build quadrangle mesh \r
- 3x3 on Face_1</p>\r
-\r
-<p class="whs7">Mesh_1 = smesh.Mesh(Face_1)</p>\r
-\r
-<p class="whs7">Wire_discretisation \r
- = Mesh_1.Segment()</p>\r
-\r
-<p class="whs7">Wire_discretisation.NumberOfSegments(3)</p>\r
-\r
-<p class="whs7">Mesh_1.Quadrangle()</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">isDone = Mesh_1.Compute()</p>\r
-\r
-<p class="whs7">if not isDone: print \r
- 'Mesh Mesh_1 : computation failed'</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs8"># pattern the mesh</p>\r
-\r
-<p class="whs7">Mesh_2 = smesh.Mesh(Face_2)</p>\r
-\r
-<p class="whs7">Nb_Segments_1 = smesh.smesh.CreateHypothesis('NumberOfSegments', \r
- 'libStdMeshersEngine.so')</p>\r
-\r
-<p class="whs7">Nb_Segments_1.SetNumberOfSegments(1)</p>\r
-\r
-<p class="whs7">status = Mesh_2.GetMesh().AddHypothesis(Face_2, \r
- Nb_Segments_1)</p>\r
-\r
-<p class="whs7">status = Mesh_2.GetMesh().AddHypothesis(Face_2, \r
- Wire_discretisation.GetAlgorithm())</p>\r
-\r
-<p class="whs7">Triangle_Mefisto = \r
- Mesh_2.Triangle()</p>\r
-\r
-<p class="whs7">Max_Element_Area = \r
- Triangle_Mefisto.MaxElementArea(240)</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs7">isDone = Mesh_2.Compute()</p>\r
-\r
-<p class="whs7">if not isDone: print \r
- 'Mesh Mesh_2 : computation failed'</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs8"># create a pattern</p>\r
-\r
-<p class="whs7">pattern = smesh.smesh.GetPattern()</p>\r
-\r
-<p class="whs7">isDone = pattern.LoadFromFace(Mesh_2.GetMesh(), \r
- Face_2, 0)</p>\r
-\r
-<p class="whs7">if (isDone != 1):</p>\r
-\r
-<p class="whs9">print \r
- 'LoadFromFace :', pattern.GetErrorCode()</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs8"># apply the pattern to \r
- a face of the first mesh</p>\r
-\r
-<p class="whs7">pattern.ApplyToMeshFaces(Mesh_1.GetMesh(), \r
- [17], 0, 0)</p>\r
-\r
-<p class="whs7">isDone = pattern.MakeMesh(Mesh_1.GetMesh(), \r
- 0, 0)</p>\r
-\r
-<p class="whs7">if (isDone != 1):</p>\r
-\r
-<p class="whs9">print \r
- 'MakeMesh :', pattern.GetErrorCode()</p>\r
-\r
-<p class="whs7">&nbsp;</p>\r
-\r
-<p class="whs8"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
- </p>\r
-\r
-<script type="text/javascript" language="javascript1.2">\r
-<!--\r
-if (window.writeIntopicBar)\r
-       writeIntopicBar(0);\r
-//-->\r
-</script>\r
-</body>\r
-</html>\r
+<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">
+
+<html>
+
+<head>
+<title>Modifying Meshes</title>
+<meta http-equiv="content-type" content="text/html; charset=windows-1252">
+<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com"><style>
+<!--
+P { margin-top:0pt; margin-bottom:0pt; }
+LI.kadov-P {  }
+-->
+</style><style type="text/css">
+<!--
+p.whs1 { margin-top:0pt; margin-bottom:0pt; font-family:'Lucida Console' , monospace; }
+p.whs2 { margin-top:0pt; margin-bottom:0pt; }
+p.whs3 { margin-top:0pt; margin-bottom:0pt; font-family:'Times New Roman' , serif; }
+h4.whs4 { margin-top:0pt; margin-bottom:0pt; }
+p.whs5 { margin-top:0.5pt; margin-bottom:0pt; font-family:'Lucida Console' , monospace; }
+p.whs6 { margin-top:0.5pt; margin-bottom:0pt; }
+p.whs7 { font-family:'Lucida Console' , monospace; }
+p.whs8 { font-family:'Times New Roman' , serif; }
+p.whs9 { margin-left:36px; font-family:'Lucida Console' , monospace; }
+p.whs10 { margin-left:36px; }
+p.whs11 { margin-left:192px; font-family:'Lucida Console' , monospace; }
+p.whs12 { margin-left:48px; font-family:'Lucida Console' , monospace; }
+p.whs13 { margin-left:40px; font-family:'Lucida Console' , monospace; }
+-->
+</style><script type="text/javascript" language="JavaScript">
+<!--
+if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))
+{
+  var strNSS = "<style type='text/css'>";
+  strNSS += "p.whs1 {margin-top:1pt;margin-bottom:1pt; }";
+  strNSS += "p.whs2 {margin-top:1pt;margin-bottom:1pt; }";
+  strNSS += "p.whs3 {margin-top:1pt;margin-bottom:1pt; }";
+  strNSS += "h4.whs4 {margin-top:1pt;margin-bottom:1pt; }";
+  strNSS += "p.whs5 {margin-top:1pt;margin-bottom:1pt; }";
+  strNSS += "p.whs6 {margin-top:1pt;margin-bottom:1pt; }";
+  strNSS +="</style>";
+  document.write(strNSS);
+}
+//-->
+</script>
+<script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">
+<!--
+function reDo() {
+  if (innerWidth != origWidth || innerHeight != origHeight)
+     location.reload();
+}
+if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
+       origWidth = innerWidth;
+       origHeight = innerHeight;
+       onresize = reDo;
+}
+onerror = null; 
+//-->
+</script>
+<style type="text/css">
+<!--
+div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }
+p.WebHelpNavBar { text-align:right; }
+-->
+</style><script type="text/javascript" language="javascript1.2" src="whmsg.js"></script>
+<script type="text/javascript" language="javascript" src="whver.js"></script>
+<script type="text/javascript" language="javascript1.2" src="whproxy.js"></script>
+<script type="text/javascript" language="javascript1.2" src="whutils.js"></script>
+<script type="text/javascript" language="javascript1.2" src="whtopic.js"></script>
+<script type="text/javascript" language="javascript1.2">
+<!--
+if (window.gbWhTopic)
+{
+       if (window.setRelStartPage)
+       {
+       addTocInfo("MESH module\nTUI Scripts\nModifying Meshes");
+addButton("show",BTN_IMG,"Show","","","","",0,0,"whd_show0.gif","whd_show2.gif","whd_show1.gif");
+addButton("hide",BTN_IMG,"Hide","","","","",0,0,"whd_hide0.gif","whd_hide2.gif","whd_hide1.gif");
+
+       }
+
+
+       if (window.setRelStartPage)
+       {
+       setRelStartPage("index.htm");
+
+               autoSync(1);
+               sendSyncInfo();
+               sendAveInfoOut();
+       }
+
+}
+else
+       if (window.gbIE4)
+               document.location.reload();
+//-->
+</script>
+</head>
+<body><script type="text/javascript" language="javascript1.2">
+<!--
+if (window.writeIntopicBar)
+       writeIntopicBar(4);
+//-->
+</script>
+<h1>Modifying Meshes</h1>
+
+<h3><a name=bookmark>Adding Nodes and Elements</a></h3>
+
+<h4>Add Node</h4>
+
+<p class="whs1">import SMESH</p>
+
+<p class="whs1">import SMESH_mechanic</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">smesh &nbsp;= 
+ SMESH_mechanic.smesh</p>
+
+<p class="whs1">mesh &nbsp;&nbsp;= 
+ SMESH_mechanic.mesh</p>
+
+<p class="whs1">salome = SMESH_mechanic.salome</p>
+
+<p class="whs2">&nbsp;</p>
+
+<p class="whs2"># add node</p>
+
+<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>
+
+<p class="whs1">if aMeshEditor.AddNode(50, 
+ 10, 0) == 1:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;Node addition is OK!&quot;</p>
+
+<p class="whs1">else:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;KO node addition.&quot;</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;</p>
+
+<p class="whs1">salome.sg.updateObjBrowser(1) 
+ </p>
+
+<p class="whs1">&nbsp;</p>
+
+<h4>Add Edge</h4>
+
+<p class="whs1">import SMESH</p>
+
+<p class="whs1">import SMESH_mechanic</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">smesh &nbsp;= 
+ SMESH_mechanic.smesh</p>
+
+<p class="whs1">mesh &nbsp;&nbsp;= 
+ SMESH_mechanic.mesh</p>
+
+<p class="whs1">salome = SMESH_mechanic.salome</p>
+
+<p class="whs2">&nbsp;</p>
+
+<p class="whs2"># add node</p>
+
+<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>
+
+<p class="whs1">if aMeshEditor.AddNode(50, 
+ 10, 0) == 1:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;Node addition is OK!&quot;</p>
+
+<p class="whs1">else:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;KO node addition.&quot;</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs2"># add edge</p>
+
+<p class="whs1">LastNodeId = mesh.NbNodes()</p>
+
+<p class="whs1">if aMeshEditor.AddEdge([LastNodeId, 
+ 38]) == 1:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;Edge addition is OK!&quot;</p>
+
+<p class="whs1">else:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;KO edge addition.&quot;</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">salome.sg.updateObjBrowser(1) 
+ </p>
+
+<p class="whs1">&nbsp;</p>
+
+<h4>Add Triangle</h4>
+
+<p class="whs1">import SMESH</p>
+
+<p class="whs1">import SMESH_mechanic</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">smesh &nbsp;= 
+ SMESH_mechanic.smesh</p>
+
+<p class="whs1">mesh &nbsp;&nbsp;= 
+ SMESH_mechanic.mesh</p>
+
+<p class="whs1">salome = SMESH_mechanic.salome</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs2"># add node</p>
+
+<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>
+
+<p class="whs1">if aMeshEditor.AddNode(50, 
+ 10, 0) == 1:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;Node addition is OK!&quot;</p>
+
+<p class="whs1">else:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;KO node addition.&quot;</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">LastNodeId = mesh.NbNodes()</p>
+
+<p class="whs2">&nbsp;</p>
+
+<p class="whs2"># add triangle</p>
+
+<p class="whs1">if aMeshEditor.AddFace([LastNodeId, 
+ 38, 39]) == 1:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;Triangle addition is OK!&quot;</p>
+
+<p class="whs1">else:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;KO triangle addition.&quot;</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;</p>
+
+<p class="whs1">salome.sg.updateObjBrowser(1) 
+ </p>
+
+<p class="whs1">&nbsp;</p>
+
+<h4>Add Quadrangle</h4>
+
+<p class="whs1">import SMESH</p>
+
+<p class="whs1">import SMESH_mechanic</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">smesh &nbsp;= 
+ SMESH_mechanic.smesh</p>
+
+<p class="whs1">mesh &nbsp;&nbsp;= 
+ SMESH_mechanic.mesh</p>
+
+<p class="whs1">salome = SMESH_mechanic.salome</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs2"># add node</p>
+
+<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>
+
+<p class="whs1">if aMeshEditor.AddNode(50, 
+ 10, 0) == 1:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;Node addition is OK!&quot;</p>
+
+<p class="whs1">else:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;KO node addition.&quot;</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">LastNodeId = mesh.NbNodes()</p>
+
+<p class="whs2">&nbsp;</p>
+
+<p class="whs2"># add quadrangle</p>
+
+<p class="whs1">if aMeshEditor.AddNode(40, 
+ 20, 0) == 1:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;Node addition is OK!&quot;</p>
+
+<p class="whs1">else:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;KO node addition.&quot;</p>
+
+<p class="whs1">if aMeshEditor.AddFace([mesh.NbNodes(), 
+ LastNodeId, 38, 39]) == 1:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;Quadrangle addition is OK!&quot;</p>
+
+<p class="whs1">else:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;KO quadrangle addition.&quot;</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> 
+ </p>
+
+<p class="whs2">&nbsp;</p>
+
+<h4>Add Tetrahedron</h4>
+
+<p class="whs1">import SMESH</p>
+
+<p class="whs1">import SMESH_mechanic</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">smesh &nbsp;= 
+ SMESH_mechanic.smesh</p>
+
+<p class="whs1">mesh &nbsp;&nbsp;= 
+ SMESH_mechanic.mesh</p>
+
+<p class="whs1">salome = SMESH_mechanic.salome</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs2"># add node</p>
+
+<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>
+
+<p class="whs1">if aMeshEditor.AddNode(50, 
+ 10, 0) == 1:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;Node addition is OK!&quot;</p>
+
+<p class="whs1">else:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;KO node addition.&quot;</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">LastNodeId = mesh.NbNodes()</p>
+
+<p class="whs2">&nbsp;</p>
+
+<p class="whs2"># add tetrahedron</p>
+
+<p class="whs1">if aMeshEditor.AddVolume([LastNodeId, 
+ 38, 39, 246]) == 1:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;Tetrahedron addition is OK!&quot;</p>
+
+<p class="whs1">else:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;KO tetrahedron addition.&quot;</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;</p>
+
+<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> 
+ </p>
+
+<p class="whs2">&nbsp;</p>
+
+<h4>Add Hexahedron</h4>
+
+<p class="whs1">import SMESH</p>
+
+<p class="whs1">import SMESH_mechanic</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">smesh &nbsp;= 
+ SMESH_mechanic.smesh</p>
+
+<p class="whs1">mesh &nbsp;&nbsp;= 
+ SMESH_mechanic.mesh</p>
+
+<p class="whs1">salome = SMESH_mechanic.salome</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs2"># add nodes</p>
+
+<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>
+
+<p class="whs1">if aMeshEditor.AddNode(50, 
+ 10, 0) == 1:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;Node addition is OK!&quot;</p>
+
+<p class="whs1">else:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;KO node addition.&quot;</p>
+
+<p class="whs1">aNodeId1 = mesh.NbNodes()</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">if aMeshEditor.AddNode(47, 
+ 12, 0) == 1:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;Node addition is OK!&quot;</p>
+
+<p class="whs1">else:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;KO node addition.&quot;</p>
+
+<p class="whs1">aNodeId2 = mesh.NbNodes()</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">if aMeshEditor.AddNode(50, 
+ 10, 10) == 1:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;Node addition is OK!&quot;</p>
+
+<p class="whs1">else:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;KO node addition.&quot;</p>
+
+<p class="whs1">aNodeId3 = mesh.NbNodes()</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">if aMeshEditor.AddNode(47, 
+ 12, 10) == 1:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;Node addition is OK!&quot;</p>
+
+<p class="whs1">else:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;KO node addition.&quot;</p>
+
+<p class="whs1">aNodeId4 = mesh.NbNodes()</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs2"># add hexahedron</p>
+
+<p class="whs1">if aMeshEditor.AddVolume([aNodeId2, 
+ aNodeId1, 38, 39, aNodeId4, aNodeId3, 245, 246]) == 1:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;Hexahedron addition is OK!&quot;</p>
+
+<p class="whs1">else:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;KO Hexahedron addition.&quot;</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;</p>
+
+<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> 
+ </p>
+
+<p class="whs2">&nbsp;</p>
+
+<h4>Add Polygon</h4>
+
+<p class="whs1">import salome</p>
+
+<p class="whs1">import geompy</p>
+
+<p class="whs1">import math</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">import StdMeshers</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs2"># GEOM module </p>
+
+<p class="whs1">shape_mesh = geompy.MakeCylinderRH(13, 
+ 77)</p>
+
+<p class="whs1">geompy.addToStudy(shape_mesh, 
+ &quot;cylinder&quot;)</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs2"># SMESH module</p>
+
+<p class="whs1">smesh = salome.lcc.FindOrLoadComponent(&quot;FactoryServer&quot;, 
+ &quot;SMESH&quot;)</p>
+
+<p class="whs1">smesh.SetCurrentStudy(salome.myStudy)</p>
+
+<p class="whs1">mesh = smesh.CreateMesh(shape_mesh)</p>
+
+<p class="whs1">MeshEditor = mesh.GetMeshEditor()</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs2"># a method to build a polygonal 
+ mesh element with nb_vert angles:</p>
+
+<p class="whs1">def MakePolygon 
+ (a_mesh, x0, y0, z0, radius, nb_vert):</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;node_start_id 
+ = a_mesh.NbNodes() + 1</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;al 
+ = 2.0 * math.pi / nb_vert</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;node_ids 
+ = []</p>
+
+<p class="whs2">&nbsp;&nbsp;&nbsp;&nbsp;</p>
+
+<p class="whs2"># Create nodes for a polyhedron</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;for 
+ ii in range(nb_vert):</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MeshEditor.AddNode(x0 
+ + radius * math.cos(ii*al),</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y0 
+ + radius * math.sin(ii*al),</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;z0)</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;node_ids.append(node_start_id 
+ + ii)</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pass</p>
+
+<p class="whs2">&nbsp;&nbsp;&nbsp;&nbsp;</p>
+
+<p class="whs2"># Create a polygon</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;MeshEditor.AddPolygonalFace(node_ids)</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;return 
+ 0</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs2"># Create three polygons</p>
+
+<p class="whs1">MakePolygon(mesh, 
+ 0, 0, &nbsp;0, 
+ 30, 13)</p>
+
+<p class="whs1">MakePolygon(mesh, 
+ 0, 0, 10, 21, &nbsp;9)</p>
+
+<p class="whs1">MakePolygon(mesh, 
+ 0, 0, 20, 13, &nbsp;6)</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">salome.sg.updateObjBrowser(1) 
+ &nbsp;</p>
+
+<p class="whs1">&nbsp;</p>
+
+<h4>Add polyhedron</h4>
+
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">import 
+ salome</span></p>
+
+<p class="whs1">import geompy</p>
+
+<p class="whs1">import math</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">#import SMESH</p>
+
+<p class="whs1">import StdMeshers</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs3"># GEOM</p>
+
+<p class="whs1">shape_mesh = geompy.MakeCylinderRH(13, 
+ 77)</p>
+
+<p class="whs1">geompy.addToStudy(shape_mesh, 
+ &quot;cylinder&quot;)</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs3"># SMESH</p>
+
+<p class="whs1">smesh = salome.lcc.FindOrLoadComponent(&quot;FactoryServer&quot;, 
+ &quot;SMESH&quot;)</p>
+
+<p class="whs1">smesh.SetCurrentStudy(salome.myStudy)</p>
+
+<p class="whs1">mesh = smesh.CreateMesh(shape_mesh)</p>
+
+<p class="whs1">MeshEditor = mesh.GetMeshEditor()</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs3"># Now we are going 
+ to create a 12-hedron:</p>
+
+<p class="whs3">&nbsp;</p>
+
+<p class="whs3"># Create nodes for 
+ polyhedron</p>
+
+<p class="whs1">al = 2 * math.pi 
+ / 5.0</p>
+
+<p class="whs1">cosal = math.cos(al)</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">aa = 13</p>
+
+<p class="whs1">rr = aa / (2.0 * 
+ math.sin(al/2.0))</p>
+
+<p class="whs1">dr = 2.0 * rr * 
+ cosal</p>
+
+<p class="whs1">r1 = rr + dr</p>
+
+<p class="whs1">dh = rr * math.sqrt(2.0 
+ * (1.0 - cosal * (1.0 + 2.0 * cosal)))</p>
+
+<p class="whs1">hh = 2.0 * dh - 
+ dr * (rr*(cosal - 1) + (rr + dr)*(math.cos(al/2) - 1)) / dh</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">for i in range(5):</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;MeshEditor.AddNode(rr*math.cos(i*al), 
+ rr*math.sin(i*al), &nbsp;0) 
+ <span style="font-family: 'Times New Roman', serif;"># 1,3,5,7, 9 # bottom</span></p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;MeshEditor.AddNode(r1*math.cos(i*al), 
+ r1*math.sin(i*al), dh) <span style="font-family: 'Times New Roman', serif;"># 
+ 2,4,6,8,10 # above bottom</span></p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">for i in range(5):</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;MeshEditor.AddNode(rr*math.cos(i*al 
+ + al/2.0),</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rr*math.sin(i*al 
+ + al/2.0), hh) # 11,13,15,17,19 <span style="font-family: 'Times New Roman', serif;"># 
+ top</span></p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;MeshEditor.AddNode(r1*math.cos(i*al 
+ + al/2.0),</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r1*math.sin(i*al 
+ + al/2.0), hh - dh) # 12,14,16,18,20 <span style="font-family: 'Times New Roman', serif;"># 
+ below top</span></p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs3"># Create a polyhedral 
+ volume</p>
+
+<p class="whs1">MeshEditor.AddPolyhedralVolume([ 
+ 1, &nbsp;3, &nbsp;5, 
+ &nbsp;7, &nbsp;9, 
+ &nbsp;<span style="font-family: 'Times New Roman', serif;"># 
+ bottom</span></p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1, 
+ &nbsp;2, 12, 
+ &nbsp;4, &nbsp;3, 
+ &nbsp;<span style="font-family: 'Times New Roman', serif;"># 
+ .</span></p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3, 
+ &nbsp;4, 14, 
+ &nbsp;6, &nbsp;5, 
+ &nbsp;<span style="font-family: 'Times New Roman', serif;"># 
+ .</span></p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5, 
+ &nbsp;6, 16, 
+ &nbsp;8, &nbsp;7, 
+ &nbsp;<span style="font-family: 'Times New Roman', serif;"># 
+ . above bottom</span></p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7, 
+ &nbsp;8, 18, 
+ 10, &nbsp;9, 
+ &nbsp;<span style="font-family: 'Times New Roman', serif;"># 
+ .</span></p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;9, 
+ 10, 20, &nbsp;2, 
+ &nbsp;1, &nbsp;<span 
+ style="font-family: 'Times New Roman', serif;"># 
+ .</span></p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;11, 
+ 12, &nbsp;4, 
+ 14, 13, &nbsp;<span style="font-family: 'Times New Roman', serif;"># 
+ -</span></p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;13, 
+ 14, &nbsp;6, 
+ 16, 15, &nbsp;<span style="font-family: 'Times New Roman', serif;"># 
+ -</span></p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;15, 
+ 16, &nbsp;8, 
+ 18, 17, &nbsp;<span style="font-family: 'Times New Roman', serif;"># 
+ - below top</span></p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;17, 
+ 18, 10, 20, 19, &nbsp;<span style="font-family: 'Times New Roman', serif;"># 
+ -</span></p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;19, 
+ 20, &nbsp;2, 
+ 12, 11, &nbsp;<span style="font-family: 'Times New Roman', serif;"># 
+ -</span></p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;11, 
+ 13, 15, 17, 19], <span style="font-family: 'Times New Roman', serif;"># 
+ top</span></p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5,5,5,5,5,5,5,5,5,5,5,5])</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">salome.sg.updateObjBrowser(1) 
+ &nbsp;</p>
+
+<p class="whs1">&nbsp;</p>
+
+<h3><a name=bookmark1>Removing Nodes and Elements</a></h3>
+
+<h4 class="whs4">Removing Nodes</h4>
+
+<p class="whs2">&nbsp;</p>
+
+<p class="whs1">import SMESH</p>
+
+<p class="whs1">import SMESH_mechanic</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">smesh &nbsp;= 
+ SMESH_mechanic.smesh</p>
+
+<p class="whs1">mesh &nbsp;&nbsp;= 
+ SMESH_mechanic.mesh</p>
+
+<p class="whs1">salome = SMESH_mechanic.salome</p>
+
+<p class="whs2">&nbsp;</p>
+
+<p class="whs2"># add node</p>
+
+<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>
+
+<p class="whs1">if aMeshEditor.RemoveNodes([246, 
+ 255]) == 1:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;Node removing is OK!&quot;</p>
+
+<p class="whs1">else:</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print 
+ &quot;KO node removing.&quot;</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;</p>
+
+<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> 
+ </p>
+
+<p class="whs2">&nbsp;</p>
+
+<h4>Removing Elements</h4>
+
+<p class="whs1">import SMESH</p>
+
+<p class="whs1">import SMESH_mechanic</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">smesh &nbsp;= 
+ SMESH_mechanic.smesh</p>
+
+<p class="whs1">mesh &nbsp;&nbsp;= 
+ SMESH_mechanic.mesh</p>
+
+<p class="whs1">salome = SMESH_mechanic.salome</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">anEditor = mesh.GetMeshEditor()</p>
+
+<p class="whs1">anEditor.RemoveElements([850, 
+ 859, 814])</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">salome.sg.updateObjBrowser(1) 
+ </p>
+
+<p class="whs1">&nbsp;</p>
+
+<h3><a name=bookmark2>Renumbering Nodes and Elements</a></h3>
+
+<p class="whs5">import SMESH</p>
+
+<p class="whs5">import SMESH_mechanic</p>
+
+<p class="whs5">&nbsp;</p>
+
+<p class="whs5">mesh &nbsp;&nbsp;= 
+ SMESH_mechanic.mesh</p>
+
+<p class="whs5">salome = SMESH_mechanic.salome</p>
+
+<p class="whs5">&nbsp;</p>
+
+<p class="whs5">anEditor = mesh.GetMeshEditor()</p>
+
+<p class="whs5">anEditor.RenumberNodes()</p>
+
+<p class="whs5">&nbsp;</p>
+
+<p class="whs6"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> 
+ </p>
+
+<p class="whs6">&nbsp;</p>
+
+<p>&nbsp;</p>
+
+<h3><a name=bookmark3>Moving Nodes</a></h3>
+
+<p class="whs1">import SMESH</p>
+
+<p class="whs1">import SMESH_mechanic</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">smesh &nbsp;= 
+ SMESH_mechanic.smesh</p>
+
+<p class="whs1">mesh &nbsp;&nbsp;= 
+ SMESH_mechanic.mesh</p>
+
+<p class="whs1">salome = SMESH_mechanic.salome</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs2"># move node</p>
+
+<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>
+
+<p class="whs1">aMeshEditor.MoveNode(38, 
+ 20, 10, 0)</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;</p>
+
+<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> 
+ </p>
+
+<p class="whs2">&nbsp;</p>
+
+<h3><a name=bookmark4>Diagonal Inversion</a></h3>
+
+<p class="whs1">import SMESH</p>
+
+<p class="whs1">import SMESH_mechanic</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs1">smesh &nbsp;= 
+ SMESH_mechanic.smesh</p>
+
+<p class="whs1">mesh &nbsp;&nbsp;= 
+ SMESH_mechanic.mesh</p>
+
+<p class="whs1">salome = SMESH_mechanic.salome</p>
+
+<p class="whs1">&nbsp;</p>
+
+<p class="whs2"># inverse diagonal</p>
+
+<p class="whs1">aMeshEditor = mesh.GetMeshEditor()</p>
+
+<p class="whs1">aMeshEditor.InverseDiag(700, 
+ 642)</p>
+
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;</p>
+
+<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> 
+ </p>
+
+<p class="whs2">&nbsp;</p>
+
+<h3><a name=bookmark5>Uniting two Triangles</a></h3>
+
+<p class="whs7">import SMESH</p>
+
+<p class="whs7">import SMESH_mechanic</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">smesh &nbsp;= 
+ SMESH_mechanic.smesh</p>
+
+<p class="whs7">mesh &nbsp;&nbsp;= 
+ SMESH_mechanic.mesh</p>
+
+<p class="whs7">salome = SMESH_mechanic.salome</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p># delete diagonal</p>
+
+<p class="whs7">aMeshEditor = mesh.GetMeshEditor()</p>
+
+<p class="whs7">aMeshEditor.DeleteDiag(700, 
+ 642)</p>
+
+<p class="whs7">&nbsp;&nbsp;&nbsp;&nbsp;</p>
+
+<p><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> 
+ </p>
+
+<p>&nbsp;</p>
+
+<h3><a name=bookmark6>Uniting a Set of Triangles</a></h3>
+
+<p class="whs7">import SMESH</p>
+
+<p class="whs7">import SMESH_mechanic</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">smesh &nbsp;= 
+ SMESH_mechanic.smesh</p>
+
+<p class="whs7">mesh &nbsp;&nbsp;= 
+ SMESH_mechanic.mesh</p>
+
+<p class="whs7">salome = SMESH_mechanic.salome</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p># unite a set of triangles</p>
+
+<p class="whs7">aFilterMgr = smesh.CreateFilterManager()</p>
+
+<p class="whs7">aFunctor = aFilterMgr.CreateMinimumAngle()</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">aMeshEditor = mesh.GetMeshEditor()</p>
+
+<p class="whs7">aMeshEditor.TriToQuad([1145, 
+ 1147, 1159, 1135], aFunctor, 60)</p>
+
+<p class="whs7">&nbsp;&nbsp;&nbsp;&nbsp;</p>
+
+<p class="whs7">salome.sg.updateObjBrowser(1) 
+ </p>
+
+<p class="whs7">&nbsp;</p>
+
+<h3><a name=bookmark12>Orientation</a></h3>
+
+<p class="whs7"><span style="font-family: 'Lucida Console', monospace;">import 
+ salome</span></p>
+
+<p class="whs7">import geompy</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">import StdMeshers</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs8"># GEOM module</p>
+
+<p class="whs7">shape_mesh = geompy.MakeCylinderRH(13, 
+ 77)</p>
+
+<p class="whs7">geompy.addToStudy(shape_mesh, 
+ &quot;cylinder&quot;)</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs8"># SMESH module</p>
+
+<p class="whs7">smesh = salome.lcc.FindOrLoadComponent(&quot;FactoryServer&quot;, 
+ &quot;SMESH&quot;)</p>
+
+<p class="whs7">smesh.SetCurrentStudy(salome.myStudy)</p>
+
+<p class="whs7">mesh = smesh.CreateMesh(shape_mesh)</p>
+
+<p class="whs7">MeshEditor = mesh.GetMeshEditor()</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs8"># build five quadrangles:</p>
+
+<p class="whs7">node_start_id = mesh.NbNodes() 
+ + 1</p>
+
+<p class="whs7">dx = 10</p>
+
+<p class="whs7">dy = 20</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">MeshEditor.AddNode(0.0 
+ * dx, 0, 0) # 1</p>
+
+<p class="whs7">MeshEditor.AddNode(1.0 
+ * dx, 0, 0) # 2</p>
+
+<p class="whs7">MeshEditor.AddNode(2.0 
+ * dx, 0, 0) # 3</p>
+
+<p class="whs7">MeshEditor.AddNode(3.0 
+ * dx, 0, 0) # 4</p>
+
+<p class="whs7">MeshEditor.AddNode(4.0 
+ * dx, 0, 0) # 5</p>
+
+<p class="whs7">MeshEditor.AddNode(5.0 
+ * dx, 0, 0) # 6</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">MeshEditor.AddNode(0.0 
+ * dx, dy, 0) # 7</p>
+
+<p class="whs7">MeshEditor.AddNode(1.0 
+ * dx, dy, 0) # 8</p>
+
+<p class="whs7">MeshEditor.AddNode(2.0 
+ * dx, dy, 0) # 9</p>
+
+<p class="whs7">MeshEditor.AddNode(3.0 
+ * dx, dy, 0) # 10</p>
+
+<p class="whs7">MeshEditor.AddNode(4.0 
+ * dx, dy, 0) # 11</p>
+
+<p class="whs7">MeshEditor.AddNode(5.0 
+ * dx, dy, 0) # 12</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">MeshEditor.AddFace([1, 
+ 2, &nbsp;8, &nbsp;7])</p>
+
+<p class="whs7">MeshEditor.AddFace([2, 
+ 3, &nbsp;9, &nbsp;8])</p>
+
+<p class="whs7">MeshEditor.AddFace([3, 
+ 4, 10, &nbsp;9])</p>
+
+<p class="whs7">MeshEditor.AddFace([4, 
+ 5, 11, 10])</p>
+
+<p class="whs7">MeshEditor.AddFace([5, 
+ 6, 12, 11])</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs8"># Change orientation 
+ of the second and the fourth faces.</p>
+
+<p class="whs7">MeshEditor.Reorient([2, 
+ 4])</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">salome.sg.updateObjBrowser(1) 
+ &nbsp;</p>
+
+<p class="whs7">&nbsp;</p>
+
+<h3><a name=bookmark7>Cutting Quadrangles</a></h3>
+
+<p class="whs7">import SMESH</p>
+
+<p class="whs7">import SMESH_mechanic</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">smesh &nbsp;= 
+ SMESH_mechanic.smesh</p>
+
+<p class="whs7">mesh &nbsp;&nbsp;= 
+ SMESH_mechanic.mesh</p>
+
+<p class="whs7">salome = SMESH_mechanic.salome</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs8"># unite a set of triangles</p>
+
+<p class="whs7">aFilterMgr = smesh.CreateFilterManager()</p>
+
+<p class="whs7">aFunctor = aFilterMgr.CreateMinimumAngle()</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">aMeshEditor = mesh.GetMeshEditor()</p>
+
+<p class="whs7">aMeshEditor.QuadToTri([405, 
+ 406], aFunctor)</p>
+
+<p class="whs7">&nbsp;&nbsp;&nbsp;&nbsp;</p>
+
+<p class="whs7">salome.sg.updateObjBrowser(1) 
+ </p>
+
+<p class="whs8">&nbsp;</p>
+
+<h3><a name=bookmark8>Smoothing</a></h3>
+
+<p class="whs7">import SMESH</p>
+
+<p class="whs7">import SMESH_mechanic</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">smesh &nbsp;= 
+ SMESH_mechanic.smesh</p>
+
+<p class="whs7">mesh &nbsp;&nbsp;= 
+ SMESH_mechanic.mesh</p>
+
+<p class="whs7">salome = SMESH_mechanic.salome</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs8"># smooth</p>
+
+<p class="whs7">FacesSmooth = [911, 
+ 931, 950, 864, 932]</p>
+
+<p class="whs7">GroupSmooth = mesh.CreateGroup(SMESH.FACE,&quot;Group 
+ of faces (smooth)&quot;)</p>
+
+<p class="whs7">GroupSmooth.Add(FacesSmooth)</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">aMeshEditor = mesh.GetMeshEditor()</p>
+
+<p class="whs7">aMeshEditor.SmoothObject(GroupSmooth, 
+ [], 20, 2, SMESH.SMESH_MeshEditor.CENTROIDAL_SMOOTH)</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">salome.sg.updateObjBrowser(1) 
+ </p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">&nbsp;</p>
+
+<h3><a name=bookmark9>Extrusion</a></h3>
+
+<p class="whs7">import SMESH</p>
+
+<p class="whs7">import SMESH_mechanic</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">smesh &nbsp;= 
+ SMESH_mechanic.smesh</p>
+
+<p class="whs7">mesh &nbsp;&nbsp;= 
+ SMESH_mechanic.mesh</p>
+
+<p class="whs7">salome = SMESH_mechanic.salome</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs8"># extrusion of the group</p>
+
+<p class="whs7">point = SMESH.PointStruct(0, 
+ 0, 5)</p>
+
+<p class="whs7">vector = SMESH.DirStruct(point)</p>
+
+<p class="whs7">FacesTriToQuad = [2381, 
+ 2382, 2383, 2384, 2385, 2386, 2387, 2388, 2389, 2390, 2391, 2392, 2393, 
+ 2394, 2395, 2396, 2397, 2398, 2399, 2400, 2401, 2402, 2403, 2404, 2405, 
+ 2406, 2407, 2408, 2409, 2410, 2411, 2412, 2413, 2414, 2415, 2416, 2417, 
+ 2418, 2419, 2420, 2421, 2422]</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">GroupTriToQuad = mesh.CreateGroup(SMESH.FACE,&quot;Group 
+ of faces (quad)&quot;)</p>
+
+<p class="whs7">GroupTriToQuad.Add(FacesTriToQuad)</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">aMeshEditor = mesh.GetMeshEditor()</p>
+
+<p class="whs7">aMeshEditor.ExtrusionSweepObject(GroupTriToQuad, 
+ vector, 5)</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs8"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> 
+ </p>
+
+<p class="whs8">&nbsp;</p>
+
+<h3><a name=bookmark10>Extrusion along a Path</a></h3>
+
+<p class="whs7">import math</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">import salome</p>
+
+<p class="whs7">salome.salome_init()</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs8"># Geometry</p>
+
+<p class="whs7">import geompy</p>
+
+<p class="whs8">&nbsp;</p>
+
+<p class="whs8"># 1. Create points</p>
+
+<p class="whs7">points = [[0, 0], 
+ [50, 30], [50, 110], [0, 150], [-80, 150], [-130, 70], [-130, -20]]</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">iv = 1</p>
+
+<p class="whs7">vertices = []</p>
+
+<p class="whs7">for point in points:</p>
+
+<p class="whs9">vert 
+ = geompy.MakeVertex(point[0], point[1], 0)</p>
+
+<p class="whs9">geompy.addToStudy(vert, 
+ &quot;Vertex_&quot; + `iv`)</p>
+
+<p class="whs9">vertices.append(vert)</p>
+
+<p class="whs9">iv 
+ += 1</p>
+
+<p class="whs9">pass</p>
+
+<p class="whs8">&nbsp;</p>
+
+<p class="whs8"># 2. Create edges and 
+ wires</p>
+
+<p class="whs7">Edge_straight = geompy.MakeEdge(vertices[0], 
+ vertices[4])</p>
+
+<p class="whs7">Edge_bezierrr = geompy.MakeBezier(vertices)</p>
+
+<p class="whs7">Wire_polyline = geompy.MakePolyline(vertices)</p>
+
+<p class="whs7">Edge_Circle &nbsp;&nbsp;= 
+ geompy.MakeCircleThreePnt(vertices[0], vertices[1], vertices[2])</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">geompy.addToStudy(Edge_straight, 
+ &quot;Edge_straight&quot;)</p>
+
+<p class="whs7">geompy.addToStudy(Edge_bezierrr, 
+ &quot;Edge_bezierrr&quot;)</p>
+
+<p class="whs7">geompy.addToStudy(Wire_polyline, 
+ &quot;Wire_polyline&quot;)</p>
+
+<p class="whs7">geompy.addToStudy(Edge_Circle 
+ &nbsp;, &quot;Edge_Circle&quot;)</p>
+
+<p class="whs8">&nbsp;</p>
+
+<p class="whs8"># 3. Explode wire on 
+ edges, as they will be used for mesh extrusion</p>
+
+<p class="whs7">Wire_polyline_edges 
+ = geompy.SubShapeAll(Wire_polyline, geompy.ShapeType[&quot;EDGE&quot;])</p>
+
+<p class="whs7">for ii in range(len(Wire_polyline_edges)):</p>
+
+<p class="whs9">geompy.addToStudyInFather(Wire_polyline, 
+ Wire_polyline_edges[ii], &quot;Edge_&quot; + `ii + 1`)</p>
+
+<p class="whs9">pass</p>
+
+<p class="whs10">&nbsp;</p>
+
+<p class="whs8"># Mesh</p>
+
+<p class="whs7">import smesh</p>
+
+<p class="whs7">import SMESH</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">gen = smesh.smesh</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">smeshgui = salome.ImportComponentGUI(&quot;SMESH&quot;)</p>
+
+<p class="whs7">smeshgui.Init(salome.myStudyId)</p>
+
+<p class="whs8">&nbsp;</p>
+
+<p class="whs8"># 1D algorithm and three 
+ 1D hypotheses</p>
+
+<p class="whs7">Wire_discretisation 
+ = gen.CreateHypothesis('Regular_1D', 'libStdMeshersEngine.so')</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">Nb_Segments_3 = gen.CreateHypothesis('NumberOfSegments', 
+ 'libStdMeshersEngine.so')</p>
+
+<p class="whs7">Nb_Segments_7 = gen.CreateHypothesis('NumberOfSegments', 
+ 'libStdMeshersEngine.so')</p>
+
+<p class="whs7">Nb_Segments_8 = gen.CreateHypothesis('NumberOfSegments', 
+ 'libStdMeshersEngine.so')</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">Nb_Segments_3.SetNumberOfSegments(3)</p>
+
+<p class="whs7">Nb_Segments_7.SetNumberOfSegments(7)</p>
+
+<p class="whs7">Nb_Segments_8.SetNumberOfSegments(8)</p>
+
+<p class="whs8">&nbsp;</p>
+
+<p class="whs8"># Mesh given shape with 
+ given 1d hypothesis</p>
+
+<p class="whs7">def Mesh1D(shape1d, 
+ hyp1d, name):</p>
+
+<p class="whs9">mesh1d_tool 
+ = smesh.Mesh(shape1d)</p>
+
+<p class="whs9">mesh1d 
+ = mesh1d_tool.GetMesh()</p>
+
+<p class="whs9">status 
+ = mesh1d.AddHypothesis(shape1d, hyp1d)</p>
+
+<p class="whs9">status 
+ = mesh1d.AddHypothesis(shape1d, Wire_discretisation)</p>
+
+<p class="whs9">isDone 
+ = mesh1d_tool.Compute()</p>
+
+<p class="whs9">if 
+ not isDone: print 'Mesh ', name, ': computation failed'</p>
+
+<p class="whs9">return 
+ mesh1d</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs8"># Create mesh with six 
+ nodes, seven edges and two quadrangle faces</p>
+
+<p class="whs7">def MakeQuadMesh2(mesh_name):</p>
+
+<p class="whs9">quad_1 
+ = gen.CreateEmptyMesh()</p>
+
+<p class="whs9">smeshgui.SetName(salome.ObjectToID(quad_1), 
+ mesh_name)</p>
+
+<p class="whs9">editor_1 
+ = quad_1.GetMeshEditor()</p>
+
+<p class="whs10">&nbsp;</p>
+
+<p class="whs10"># six nodes</p>
+
+<p class="whs9">n1 
+ = editor_1.AddNode(0, 20, 10)</p>
+
+<p class="whs9">n2 
+ = editor_1.AddNode(0, 40, 10)</p>
+
+<p class="whs9">n3 
+ = editor_1.AddNode(0, 40, 30)</p>
+
+<p class="whs9">n4 
+ = editor_1.AddNode(0, 20, 30)</p>
+
+<p class="whs9">n5 
+ = editor_1.AddNode(0, &nbsp;0, 
+ 30)</p>
+
+<p class="whs9">n6 
+ = editor_1.AddNode(0, &nbsp;0, 
+ 10)</p>
+
+<p class="whs10">&nbsp;</p>
+
+<p class="whs10"># seven edges</p>
+
+<p class="whs9">editor_1.AddEdge([n1, 
+ n2]) # 1</p>
+
+<p class="whs9">editor_1.AddEdge([n2, 
+ n3]) # 2</p>
+
+<p class="whs9">editor_1.AddEdge([n3, 
+ n4]) # 3</p>
+
+<p class="whs9">editor_1.AddEdge([n4, 
+ n1]) # 4</p>
+
+<p class="whs9">editor_1.AddEdge([n4, 
+ n5]) # 5</p>
+
+<p class="whs9">editor_1.AddEdge([n5, 
+ n6]) # 6</p>
+
+<p class="whs9">editor_1.AddEdge([n6, 
+ n1]) # 7</p>
+
+<p class="whs10">&nbsp;</p>
+
+<p class="whs10"># two quadrangle faces</p>
+
+<p class="whs9">editor_1.AddFace([n1, 
+ n2, n3, n4]) # 8</p>
+
+<p class="whs9">editor_1.AddFace([n1, 
+ n4, n5, n6]) # 9</p>
+
+<p class="whs9">return 
+ [quad_1, editor_1, [1,2,3,4,5,6,7], [8,9]]</p>
+
+<p class="whs8">&nbsp;</p>
+
+<p class="whs8"># Path meshes</p>
+
+<p class="whs7">Edge_straight_mesh 
+ = Mesh1D(Edge_straight, Nb_Segments_7, &quot;Edge_straight&quot;)</p>
+
+<p class="whs7">Edge_bezierrr_mesh 
+ = Mesh1D(Edge_bezierrr, Nb_Segments_7, &quot;Edge_bezierrr&quot;)</p>
+
+<p class="whs7">Wire_polyline_mesh 
+ = Mesh1D(Wire_polyline, Nb_Segments_3, &quot;Wire_polyline&quot;)</p>
+
+<p class="whs7">Edge_Circle_mesh &nbsp;&nbsp;= 
+ Mesh1D(Edge_Circle &nbsp;, 
+ Nb_Segments_8, &quot;Edge_Circle&quot;)</p>
+
+<p class="whs8">&nbsp;</p>
+
+<p class="whs8"># Initial meshes (to 
+ be extruded)</p>
+
+<p class="whs7">[quad_1, editor_1, 
+ ee_1, ff_1] = MakeQuadMesh2(&quot;quad_1&quot;)</p>
+
+<p class="whs7">[quad_2, editor_2, 
+ ee_2, ff_2] = MakeQuadMesh2(&quot;quad_2&quot;)</p>
+
+<p class="whs7">[quad_3, editor_3, 
+ ee_3, ff_3] = MakeQuadMesh2(&quot;quad_3&quot;)</p>
+
+<p class="whs7">[quad_4, editor_4, 
+ ee_4, ff_4] = MakeQuadMesh2(&quot;quad_4&quot;)</p>
+
+<p class="whs7">[quad_5, editor_5, 
+ ee_5, ff_5] = MakeQuadMesh2(&quot;quad_5&quot;)</p>
+
+<p class="whs7">[quad_6, editor_6, 
+ ee_6, ff_6] = MakeQuadMesh2(&quot;quad_6&quot;)</p>
+
+<p class="whs7">[quad_7, editor_7, 
+ ee_7, ff_7] = MakeQuadMesh2(&quot;quad_7&quot;)</p>
+
+<p class="whs8">&nbsp;</p>
+
+<p class="whs8"># ExtrusionAlongPath</p>
+
+<p class="whs8"># IDsOfElements, PathMesh, 
+ PathShape, NodeStart,</p>
+
+<p class="whs8"># HasAngles, Angles, 
+ HasRefPoint, RefPoint</p>
+
+<p class="whs8">&nbsp;</p>
+
+<p class="whs7">refPoint = SMESH.PointStruct(0, 
+ 0, 0)</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">a10 = 10.0*math.pi/180.0</p>
+
+<p class="whs7">a45 = 45.0*math.pi/180.0</p>
+
+<p class="whs8">&nbsp;</p>
+
+<p class="whs8"># 1. Extrusion of two 
+ mesh edges along straight path</p>
+
+<p class="whs7">error = editor_1.ExtrusionAlongPath([1,2], 
+ Edge_straight_mesh, Edge_straight, 1,</p>
+
+<p class="whs11">&nbsp;&nbsp;&nbsp;&nbsp;0, 
+ [], 0, refPoint)</p>
+
+<p class="whs8">&nbsp;</p>
+
+<p class="whs8"># 2. Extrusion of one 
+ mesh edge along curved path</p>
+
+<p class="whs7">error = editor_2.ExtrusionAlongPath([2], 
+ Edge_bezierrr_mesh, Edge_bezierrr, 1,</p>
+
+<p class="whs11">&nbsp;&nbsp;&nbsp;&nbsp;0, 
+ [], 0, refPoint)</p>
+
+<p class="whs8">&nbsp;</p>
+
+<p class="whs8"># 3. Extrusion of one 
+ mesh edge along curved path with angles usage</p>
+
+<p class="whs7">error = editor_3.ExtrusionAlongPath([2], 
+ Edge_bezierrr_mesh, Edge_bezierrr, 1,</p>
+
+<p class="whs11">&nbsp;&nbsp;&nbsp;&nbsp;1, 
+ [a45, a45, a45, 0, -a45, -a45, -a45], 0, refPoint)</p>
+
+<p class="whs8">&nbsp;</p>
+
+<p class="whs8"># 4. Extrusion of one 
+ mesh edge along path, which is a part of meshed wire</p>
+
+<p class="whs7">error = editor_4.ExtrusionAlongPath([4], 
+ Wire_polyline_mesh, Wire_polyline_edges[0], 1,</p>
+
+<p class="whs11">&nbsp;&nbsp;&nbsp;&nbsp;1, 
+ [a10, a10, a10], 0, refPoint)</p>
+
+<p class="whs8">&nbsp;</p>
+
+<p class="whs8"># 5. Extrusion of two 
+ mesh faces along path, which is a part of meshed wire</p>
+
+<p class="whs7">error = editor_5.ExtrusionAlongPath(ff_5 
+ , Wire_polyline_mesh, Wire_polyline_edges[2], 4,</p>
+
+<p class="whs11">&nbsp;&nbsp;&nbsp;&nbsp;0, 
+ [], 0, refPoint)</p>
+
+<p class="whs8">&nbsp;</p>
+
+<p class="whs8"># 6. Extrusion of two 
+ mesh faces along closed path</p>
+
+<p class="whs7">error = editor_6.ExtrusionAlongPath(ff_6 
+ , Edge_Circle_mesh, Edge_Circle, 1,</p>
+
+<p class="whs11">&nbsp;&nbsp;&nbsp;&nbsp;0, 
+ [], 0, refPoint)</p>
+
+<p class="whs8">&nbsp;</p>
+
+<p class="whs8"># 7. Extrusion of two 
+ mesh faces along closed path with angles usage</p>
+
+<p class="whs7">error = editor_7.ExtrusionAlongPath(ff_7, 
+ Edge_Circle_mesh, Edge_Circle, 1,</p>
+
+<p class="whs11">&nbsp;&nbsp;&nbsp;&nbsp;1, 
+ [a45, -a45, a45, -a45, a45, -a45, a45, -a45], 0, refPoint)</p>
+
+<p class="whs8">&nbsp;</p>
+
+<p class="whs7">if salome.sg.hasDesktop():</p>
+
+<p class="whs12">salome.sg.updateObjBrowser(1)</p>
+
+<p class="whs12">pass</p>
+
+<h3><a name=bookmark11>Revolution</a></h3>
+
+<p class="whs7">import SMESH</p>
+
+<p class="whs7">import SMESH_mechanic</p>
+
+<p class="whs7">import math</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">smesh &nbsp;= 
+ SMESH_mechanic.smesh</p>
+
+<p class="whs7">mesh &nbsp;&nbsp;= 
+ SMESH_mechanic.mesh</p>
+
+<p class="whs7">salome = SMESH_mechanic.salome</p>
+
+<p class="whs8">&nbsp;</p>
+
+<p class="whs8"># rotate a sweep object</p>
+
+<p class="whs7">FacesRotate = [492, 
+ 493, 502, 503]</p>
+
+<p class="whs7">GroupRotate = mesh.CreateGroup(SMESH.FACE,&quot;Group 
+ of faces (rotate)&quot;)</p>
+
+<p class="whs7">GroupRotate.Add(FacesRotate)</p>
+
+<p class="whs7">angle45 = &nbsp;45*math.pi/180</p>
+
+<p class="whs7">axisXYZ = SMESH.AxisStruct(-38.3128, 
+ -73.3658, -23.321, -13.3402, -13.3265, 6.66632)</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">aMeshEditor = mesh.GetMeshEditor()</p>
+
+<p class="whs7">aMeshEditor.RotationSweepObject(GroupRotate, 
+ axisXYZ, angle45, 4, 1e-5)</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs8"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> 
+ </p>
+
+<p class="whs8">&nbsp;</p>
+
+<h3><a name=bookmark13>Pattern Mapping</a></h3>
+
+<p class="whs7">import salome</p>
+
+<p class="whs7">import geompy</p>
+
+<p class="whs7">import SMESH, smesh</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">geompy.init_geom(salome.myStudy)</p>
+
+<p class="whs7">smesh.smesh.SetCurrentStudy(salome.myStudy)</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs8"># define geometry</p>
+
+<p class="whs7">Box_1 = geompy.MakeBoxDXDYDZ(200, 
+ 200, 200)</p>
+
+<p class="whs7">geompy.addToStudy(Box_1, 
+ &quot;Box_1&quot;)</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">faces = geompy.SubShapeAll(Box_1, 
+ geompy.ShapeType[&quot;FACE&quot;])</p>
+
+<p class="whs7">Face_1 = faces[0]</p>
+
+<p class="whs7">Face_2 = faces[1]</p>
+
+<p class="whs7">geompy.addToStudyInFather(Box_1, 
+ Face_1, &quot;Face_1&quot;)</p>
+
+<p class="whs7">geompy.addToStudyInFather(Box_1, 
+ Face_2, &quot;Face_2&quot;)</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs8"># build quadrangle mesh 
+ 3x3 on Face_1</p>
+
+<p class="whs7">Mesh_1 = smesh.Mesh(Face_1)</p>
+
+<p class="whs7">Wire_discretisation 
+ = Mesh_1.Segment()</p>
+
+<p class="whs7">Wire_discretisation.NumberOfSegments(3)</p>
+
+<p class="whs7">Mesh_1.Quadrangle()</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">isDone = Mesh_1.Compute()</p>
+
+<p class="whs7">if not isDone: print 
+ 'Mesh Mesh_1 : computation failed'</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs8"># pattern the mesh</p>
+
+<p class="whs7">Mesh_2 = smesh.Mesh(Face_2)</p>
+
+<p class="whs7">Nb_Segments_1 = smesh.smesh.CreateHypothesis('NumberOfSegments', 
+ 'libStdMeshersEngine.so')</p>
+
+<p class="whs7">Nb_Segments_1.SetNumberOfSegments(1)</p>
+
+<p class="whs7">status = Mesh_2.GetMesh().AddHypothesis(Face_2, 
+ Nb_Segments_1)</p>
+
+<p class="whs7">status = Mesh_2.GetMesh().AddHypothesis(Face_2, 
+ Wire_discretisation.GetAlgorithm())</p>
+
+<p class="whs7">Triangle_Mefisto = 
+ Mesh_2.Triangle()</p>
+
+<p class="whs7">Max_Element_Area = 
+ Triangle_Mefisto.MaxElementArea(240)</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs7">isDone = Mesh_2.Compute()</p>
+
+<p class="whs7">if not isDone: print 
+ 'Mesh Mesh_2 : computation failed'</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs8"># create a pattern</p>
+
+<p class="whs7">pattern = smesh.smesh.GetPattern()</p>
+
+<p class="whs7">isDone = pattern.LoadFromFace(Mesh_2.GetMesh(), 
+ Face_2, 0)</p>
+
+<p class="whs7">if (isDone != 1):</p>
+
+<p class="whs13">print 
+ 'LoadFromFace :', pattern.GetErrorCode()</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs8"># apply the pattern to 
+ a face of the first mesh</p>
+
+<p class="whs7">pattern.ApplyToMeshFaces(Mesh_1.GetMesh(), 
+ [17], 0, 0)</p>
+
+<p class="whs7">isDone = pattern.MakeMesh(Mesh_1.GetMesh(), 
+ 0, 0)</p>
+
+<p class="whs7">if (isDone != 1):</p>
+
+<p class="whs13">print 
+ 'MakeMesh :', pattern.GetErrorCode()</p>
+
+<p class="whs7">&nbsp;</p>
+
+<p class="whs8"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> 
+ </p>
+
+<script type="text/javascript" language="javascript1.2">
+<!--
+if (window.writeIntopicBar)
+       writeIntopicBar(0);
+//-->
+</script>
+</body>
+</html>
diff --git a/doc/salome/gui/SMESH/pics/a-extusionalongapath2.png b/doc/salome/gui/SMESH/pics/a-extusionalongapath2.png
deleted file mode 100755 (executable)
index f120fc3..0000000
Binary files a/doc/salome/gui/SMESH/pics/a-extusionalongapath2.png and /dev/null differ
diff --git a/doc/salome/gui/SMESH/pics/circle_angles_after.png b/doc/salome/gui/SMESH/pics/circle_angles_after.png
new file mode 100644 (file)
index 0000000..f4c606b
Binary files /dev/null and b/doc/salome/gui/SMESH/pics/circle_angles_after.png differ
diff --git a/doc/salome/gui/SMESH/pics/circle_simple_after.png b/doc/salome/gui/SMESH/pics/circle_simple_after.png
new file mode 100644 (file)
index 0000000..99f65b5
Binary files /dev/null and b/doc/salome/gui/SMESH/pics/circle_simple_after.png differ
diff --git a/doc/salome/gui/SMESH/pics/circle_simple_before.png b/doc/salome/gui/SMESH/pics/circle_simple_before.png
new file mode 100644 (file)
index 0000000..95b9037
Binary files /dev/null and b/doc/salome/gui/SMESH/pics/circle_simple_before.png differ
diff --git a/doc/salome/gui/SMESH/pics/curvi_angles_after.png b/doc/salome/gui/SMESH/pics/curvi_angles_after.png
new file mode 100644 (file)
index 0000000..9d06262
Binary files /dev/null and b/doc/salome/gui/SMESH/pics/curvi_angles_after.png differ
diff --git a/doc/salome/gui/SMESH/pics/curvi_simple_after.png b/doc/salome/gui/SMESH/pics/curvi_simple_after.png
new file mode 100644 (file)
index 0000000..ae1d98f
Binary files /dev/null and b/doc/salome/gui/SMESH/pics/curvi_simple_after.png differ
diff --git a/doc/salome/gui/SMESH/pics/curvi_simple_before.png b/doc/salome/gui/SMESH/pics/curvi_simple_before.png
new file mode 100644 (file)
index 0000000..a0bbf73
Binary files /dev/null and b/doc/salome/gui/SMESH/pics/curvi_simple_before.png differ
diff --git a/doc/salome/gui/SMESH/pics/edge_wire_3d_after.png b/doc/salome/gui/SMESH/pics/edge_wire_3d_after.png
new file mode 100644 (file)
index 0000000..3fab598
Binary files /dev/null and b/doc/salome/gui/SMESH/pics/edge_wire_3d_after.png differ
diff --git a/doc/salome/gui/SMESH/pics/edge_wire_3d_before.png b/doc/salome/gui/SMESH/pics/edge_wire_3d_before.png
new file mode 100644 (file)
index 0000000..28f9868
Binary files /dev/null and b/doc/salome/gui/SMESH/pics/edge_wire_3d_before.png differ
diff --git a/doc/salome/gui/SMESH/pics/edge_wire_after.png b/doc/salome/gui/SMESH/pics/edge_wire_after.png
new file mode 100644 (file)
index 0000000..408480e
Binary files /dev/null and b/doc/salome/gui/SMESH/pics/edge_wire_after.png differ
diff --git a/doc/salome/gui/SMESH/pics/edge_wire_before.png b/doc/salome/gui/SMESH/pics/edge_wire_before.png
new file mode 100644 (file)
index 0000000..186528e
Binary files /dev/null and b/doc/salome/gui/SMESH/pics/edge_wire_before.png differ
diff --git a/doc/salome/gui/SMESH/pics/extrusion1.png b/doc/salome/gui/SMESH/pics/extrusion1.png
new file mode 100644 (file)
index 0000000..b7b1559
Binary files /dev/null and b/doc/salome/gui/SMESH/pics/extrusion1.png differ
diff --git a/doc/salome/gui/SMESH/pics/mesh_for_extr_along_path.png b/doc/salome/gui/SMESH/pics/mesh_for_extr_along_path.png
new file mode 100644 (file)
index 0000000..4ee52eb
Binary files /dev/null and b/doc/salome/gui/SMESH/pics/mesh_for_extr_along_path.png differ
diff --git a/doc/salome/gui/SMESH/pics/straight_after.png b/doc/salome/gui/SMESH/pics/straight_after.png
new file mode 100644 (file)
index 0000000..4572fea
Binary files /dev/null and b/doc/salome/gui/SMESH/pics/straight_after.png differ
diff --git a/doc/salome/gui/SMESH/pics/straight_before.png b/doc/salome/gui/SMESH/pics/straight_before.png
new file mode 100644 (file)
index 0000000..200aad8
Binary files /dev/null and b/doc/salome/gui/SMESH/pics/straight_before.png differ