-<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
-\r
-<html>\r
-\r
-<head>\r
-<title>Constructing 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 type="text/css">\r
-<!--\r
-p.whs1 { margin-top:0pt; margin-bottom:0pt; }\r
-p.whs2 { margin-top:0pt; margin-bottom:0pt; font-family:'Lucida Console' , monospace; }\r
-p.whs3 { margin-top:0pt; margin-bottom:0pt; font-family:'Times New Roman' , serif; }\r
-p.whs4 { font-family:'Lucida Console' , monospace; margin-top:0px; margin-bottom:0px; }\r
-p.whs5 { margin-top:0px; margin-bottom:0px; font-family:'Times New Roman' , serif; }\r
-p.whs6 { margin-top:0px; margin-bottom:0px; }\r
-p.whs7 { margin-top:0px; margin-bottom:0px; font-family:'Lucida Console' , monospace; }\r
--->\r
-</style><script type="text/javascript" language="JavaScript">\r
-<!--\r
-if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))\r
-{\r
- var strNSS = "<style type='text/css'>";\r
- strNSS += "p.whs1 {margin-top:1pt;margin-bottom:1pt; }";\r
- strNSS += "p.whs2 {margin-top:1pt;margin-bottom:1pt; }";\r
- strNSS += "p.whs3 {margin-top:1pt;margin-bottom:1pt; }";\r
- strNSS += "p.whs4 {margin-top:1pt;margin-bottom:1pt; }";\r
- strNSS += "p.whs5 {margin-top:1pt;margin-bottom:1pt; }";\r
- strNSS += "p.whs6 {margin-top:1pt;margin-bottom:1pt; }";\r
- strNSS += "p.whs7 {margin-top:1pt;margin-bottom:1pt; }";\r
- strNSS +="</style>";\r
- document.write(strNSS);\r
-}\r
-//-->\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\nCreating 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>Creating Meshes</h1>\r
-\r
-<p class="whs1">First of all see <a href="smesh.py_introduction.htm">Example \r
- of 3d mesh generation</a>, which is an example of good python script style \r
- for Mesh module. </p>\r
-\r
-<p class="whs1">Other examples of python \r
- scripts will be also updated soon to use smesh package instead of direct \r
- usage of idl interface. </p>\r
-\r
-<h3><a name=bookmark>Construction of a Mesh</a></h3>\r
-\r
-<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">import \r
- geompy</span></p>\r
-\r
-<p class="whs2">import smesh</p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs3"># create a box</p>\r
-\r
-<p class="whs2">box = geompy.MakeBox(0., \r
- 0., 0., 100., 200., 300.)</p>\r
-\r
-<p class="whs2">idbox = geompy.addToStudy(box, \r
- "box")</p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs3"># create a mesh</p>\r
-\r
-<p class="whs2">tetra = smesh.Mesh(box, \r
- "MeshBox")</p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs2">algo1D = tetra.Segment()</p>\r
-\r
-<p class="whs2">algo1D.NumberOfSegments(7)</p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs2">algo2D = tetra.Triangle()</p>\r
-\r
-<p class="whs2">algo2D.MaxElementArea(800.)</p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs2">algo3D = tetra.Tetrahedron(smesh.NETGEN)</p>\r
-\r
-<p class="whs2">algo3D.MaxElementVolume(900.)</p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs3"># compute the mesh</p>\r
-\r
-<p class="whs2">ret = tetra.Compute()</p>\r
-\r
-<p class="whs2">if ret == 0:</p>\r
-\r
-<p class="whs2"> print \r
- "problem when computing the mesh"</p>\r
-\r
-<p class="whs2">else:</p>\r
-\r
-<p class="whs2"> print \r
- "mesh computed"</p>\r
-\r
-<p class="whs2"> pass \r
- </p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<p class="whs2"> </p>\r
-\r
-<h3><a name=bookmark1>Construction of a Submesh</a></h3>\r
-\r
-<p class="whs4"><span style="font-family: 'Lucida Console', monospace;">from \r
- geompy import *</span></p>\r
-\r
-<p class="whs4">import smesh</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs5"># create a box</p>\r
-\r
-<p class="whs4">box = MakeBoxDXDYDZ(10., 10., 10.)</p>\r
-\r
-<p class="whs4">addToStudy(box, "Box")</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs5"># select one edge of \r
- the box for definition of a local hypothesis</p>\r
-\r
-<p class="whs4">p5 = MakeVertex(5., 0., 0.)</p>\r
-\r
-<p class="whs4">EdgeX = GetEdgeNearPoint(box, p5)</p>\r
-\r
-<p class="whs4">addToStudyInFather(box, EdgeX, "Edge \r
- [0,0,0 - 10,0,0]")</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs5"># create a hexahedral \r
- mesh on the box</p>\r
-\r
-<p class="whs4">quadra = smesh.Mesh(box, "Box : quadrangle \r
- 2D mesh")</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs5"># create a regular \r
- 1D algorithm for the faces</p>\r
-\r
-<p class="whs4">algo1D = quadra.Segment()</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs5"># define "NumberOfSegments" \r
- hypothesis to cut</p>\r
-\r
-<p class="whs5"># all the edges in \r
- a fixed number of segments</p>\r
-\r
-<p class="whs4">algo1D.NumberOfSegments(4)</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs5"># create a quadrangle \r
- 2D algorithm for the faces</p>\r
-\r
-<p class="whs4">quadra.Quadrangle()</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs5"># construct a submesh \r
- on the edge with a local hypothesis</p>\r
-\r
-<p class="whs4">algo_local = quadra.Segment(EdgeX)</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs5"># define "Arithmetic1D" \r
- hypothesis to cut the edge<span style="margin-top: 0px;\r
- margin-bottom: 0px;\r
- font-family: 'Times New Roman', serif;"> \r
- in several segments with increasing arithmetic length</span></p>\r
-\r
-<p class="whs4">algo_local.Arithmetic1D(1, 4)</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs5"># define "Propagation" \r
- hypothesis that propagates all other hypotheses</p>\r
-\r
-<p class="whs5"># on all edges of the \r
- opposite side in case of quadrangular faces</p>\r
-\r
-<p class="whs4">algo_local.Propagation()</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs5"># compute the mesh</p>\r
-\r
-<p class="whs4">quadra.Compute() </p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<h3><a name=bookmark2>Editing of a mesh</a></h3>\r
-\r
-<p class="whs4"><span style="font-family: 'Lucida Console', monospace;">import \r
- geompy</span></p>\r
-\r
-<p class="whs4">import smesh</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs4">def PrintMeshInfo(theMesh):</p>\r
-\r
-<p class="whs4"> aMesh \r
- = theMesh.GetMesh()</p>\r
-\r
-<p class="whs4"> print \r
- "Information about mesh:"</p>\r
-\r
-<p class="whs4"> print \r
- "Number of nodes : \r
- ", aMesh.NbNodes()</p>\r
-\r
-<p class="whs4"> print \r
- "Number of edges : \r
- ", aMesh.NbEdges()</p>\r
-\r
-<p class="whs4"> print \r
- "Number of faces : \r
- ", aMesh.NbFaces()</p>\r
-\r
-<p class="whs4"> print \r
- "Number of volumes : \r
- ", aMesh.NbVolumes()</p>\r
-\r
-<p class="whs4"> pass</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs5"># create a box</p>\r
-\r
-<p class="whs4">box = geompy.MakeBox(0., 0., 0., 20., \r
- 20., 20.)</p>\r
-\r
-<p class="whs4">geompy.addToStudy(box, "box")</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs5"># select one edge of \r
- the box for definition of a local hypothesis</p>\r
-\r
-<p class="whs4">subShapeList = geompy.SubShapeAll(box, \r
- geompy.ShapeType["EDGE"])</p>\r
-\r
-<p class="whs4">edge = subShapeList[0]</p>\r
-\r
-<p class="whs4">name = geompy.SubShapeName(edge, box)</p>\r
-\r
-<p class="whs4">geompy.addToStudyInFather(box, edge, name)</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs5"># create a mesh</p>\r
-\r
-<p class="whs4">tria = smesh.Mesh(box, "Mesh 2D")</p>\r
-\r
-<p class="whs4">algo1D = tria.Segment()</p>\r
-\r
-<p class="whs4">hyp1 = algo1D.NumberOfSegments(3)</p>\r
-\r
-<p class="whs4">algo2D = tria.Triangle()</p>\r
-\r
-<p class="whs4">hyp2 = algo2D.MaxElementArea(10.)</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs5"># create a sub-mesh</p>\r
-\r
-<p class="whs4">algo_local = tria.Segment(edge)</p>\r
-\r
-<p class="whs4">hyp3 = algo_local.Arithmetic1D(1, 6)</p>\r
-\r
-<p class="whs4">hyp4 = algo_local.Propagation()</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs5"># compute the mesh</p>\r
-\r
-<p class="whs4">tria.Compute()</p>\r
-\r
-<p class="whs4">PrintMeshInfo(tria)</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs5"># remove a local hypothesis</p>\r
-\r
-<p class="whs4">mesh = tria.GetMesh()</p>\r
-\r
-<p class="whs4">mesh.RemoveHypothesis(edge, hyp4)</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs5"># compute the mesh</p>\r
-\r
-<p class="whs4">tria.Compute()</p>\r
-\r
-<p class="whs4">PrintMeshInfo(tria)</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs5"># change the value \r
- of the 2D hypothesis</p>\r
-\r
-<p class="whs4">hyp2.SetMaxElementArea(2.)</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs5"># compute the mesh</p>\r
-\r
-<p class="whs4">tria.Compute()</p>\r
-\r
-<p class="whs4">PrintMeshInfo(tria) </p>\r
-\r
-<p class="whs6"> </p>\r
-\r
-<h3><a name=bookmark3>Export of a Mesh</a></h3>\r
-\r
-<p class="whs7">import geompy</p>\r
-\r
-<p class="whs7">import smesh</p>\r
-\r
-<p class="whs6"> </p>\r
-\r
-<p class="whs6"># create a box</p>\r
-\r
-<p class="whs7">box = geompy.MakeBox(0., \r
- 0., 0., 100., 200., 300.)</p>\r
-\r
-<p class="whs7">idbox = geompy.addToStudy(box, \r
- "box")</p>\r
-\r
-<p class="whs6"> </p>\r
-\r
-<p class="whs6"># create a mesh</p>\r
-\r
-<p class="whs7">tetra = smesh.Mesh(box, \r
- "MeshBox")</p>\r
-\r
-<p class="whs6"> </p>\r
-\r
-<p class="whs7">algo1D = tetra.Segment()</p>\r
-\r
-<p class="whs7">algo1D.NumberOfSegments(7)</p>\r
-\r
-<p class="whs7"> </p>\r
-\r
-<p class="whs7">algo2D = tetra.Triangle()</p>\r
-\r
-<p class="whs7">algo2D.MaxElementArea(800.)</p>\r
-\r
-<p class="whs7"> </p>\r
-\r
-<p class="whs7">algo3D = tetra.Tetrahedron(smesh.NETGEN)</p>\r
-\r
-<p class="whs7">algo3D.MaxElementVolume(900.)</p>\r
-\r
-<p class="whs6"> </p>\r
-\r
-<p class="whs6"># compute the mesh</p>\r
-\r
-<p class="whs7">tetra.Compute()</p>\r
-\r
-<p class="whs6"> </p>\r
-\r
-<p class="whs6"># export the mesh in a \r
- MED file</p>\r
-\r
-<p class="whs7">tetra.ExportMED("/tmp/meshMED.med", \r
- 0) </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>Constructing 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 type="text/css">
+<!--
+p.whs1 { margin-top:0pt; margin-bottom:0pt; }
+p.whs2 { margin-top:0pt; margin-bottom:0pt; font-family:'Lucida Console' , monospace; }
+p.whs3 { margin-top:0pt; margin-bottom:0pt; font-family:'Times New Roman' , serif; }
+p.whs4 { font-family:'Lucida Console' , monospace; margin-top:0px; margin-bottom:0px; }
+p.whs5 { margin-top:0px; margin-bottom:0px; font-family:'Times New Roman' , serif; }
+p.whs6 { margin-top:0px; margin-bottom:0px; }
+p.whs7 { margin-top:0px; margin-bottom:0px; 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 += "p.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 += "p.whs7 {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\nCreating 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>Creating Meshes</h1>
+
+<p class="whs1">First of all see <a href="smesh.py_introduction.htm">Example
+ of 3d mesh generation</a>, which is an example of good python script style
+ for Mesh module. </p>
+
+<p class="whs1">Other examples of python
+ scripts will be also updated soon to use smesh package instead of direct
+ usage of idl interface. </p>
+
+<h3><a name=bookmark>Construction of a Mesh</a></h3>
+
+<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">import
+ geompy</span></p>
+
+<p class="whs2">import smesh</p>
+
+<p class="whs2"> </p>
+
+<p class="whs3"># create a box</p>
+
+<p class="whs2">box = geompy.MakeBox(0.,
+ 0., 0., 100., 200., 300.)</p>
+
+<p class="whs2">idbox = geompy.addToStudy(box,
+ "box")</p>
+
+<p class="whs2"> </p>
+
+<p class="whs3"># create a mesh</p>
+
+<p class="whs2">tetra = smesh.Mesh(box,
+ "MeshBox")</p>
+
+<p class="whs2"> </p>
+
+<p class="whs2">algo1D = tetra.Segment()</p>
+
+<p class="whs2">algo1D.NumberOfSegments(7)</p>
+
+<p class="whs2"> </p>
+
+<p class="whs2">algo2D = tetra.Triangle()</p>
+
+<p class="whs2">algo2D.MaxElementArea(800.)</p>
+
+<p class="whs2"> </p>
+
+<p class="whs2">algo3D = tetra.Tetrahedron(smesh.NETGEN)</p>
+
+<p class="whs2">algo3D.MaxElementVolume(900.)</p>
+
+<p class="whs2"> </p>
+
+<p class="whs3"># compute the mesh</p>
+
+<p class="whs2">ret = tetra.Compute()</p>
+
+<p class="whs2">if ret == 0:</p>
+
+<p class="whs2"> print
+ "problem when computing the mesh"</p>
+
+<p class="whs2">else:</p>
+
+<p class="whs2"> print
+ "mesh computed"</p>
+
+<p class="whs2"> pass
+ </p>
+
+<p class="whs2"> </p>
+
+<p class="whs2"> </p>
+
+<h3><a name=bookmark1>Construction of a Submesh</a></h3>
+
+<p class="whs4"><span style="font-family: 'Lucida Console', monospace;">from
+ geompy import *</span></p>
+
+<p class="whs4">import smesh</p>
+
+<p class="whs4"> </p>
+
+<p class="whs5"># create a box</p>
+
+<p class="whs4">box = MakeBoxDXDYDZ(10., 10., 10.)</p>
+
+<p class="whs4">addToStudy(box, "Box")</p>
+
+<p class="whs4"> </p>
+
+<p class="whs5"># select one edge of
+ the box for definition of a local hypothesis</p>
+
+<p class="whs4">p5 = MakeVertex(5., 0., 0.)</p>
+
+<p class="whs4">EdgeX = GetEdgeNearPoint(box, p5)</p>
+
+<p class="whs4">addToStudyInFather(box, EdgeX, "Edge
+ [0,0,0 - 10,0,0]")</p>
+
+<p class="whs4"> </p>
+
+<p class="whs5"># create a hexahedral
+ mesh on the box</p>
+
+<p class="whs4">quadra = smesh.Mesh(box, "Box : quadrangle
+ 2D mesh")</p>
+
+<p class="whs4"> </p>
+
+<p class="whs5"># create a regular
+ 1D algorithm for the faces</p>
+
+<p class="whs4">algo1D = quadra.Segment()</p>
+
+<p class="whs4"> </p>
+
+<p class="whs5"># define "NumberOfSegments"
+ hypothesis to cut</p>
+
+<p class="whs5"># all the edges in
+ a fixed number of segments</p>
+
+<p class="whs4">algo1D.NumberOfSegments(4)</p>
+
+<p class="whs4"> </p>
+
+<p class="whs5"># create a quadrangle
+ 2D algorithm for the faces</p>
+
+<p class="whs4">quadra.Quadrangle()</p>
+
+<p class="whs4"> </p>
+
+<p class="whs5"># construct a submesh
+ on the edge with a local hypothesis</p>
+
+<p class="whs4">algo_local = quadra.Segment(EdgeX)</p>
+
+<p class="whs4"> </p>
+
+<p class="whs5"># define "Arithmetic1D"
+ hypothesis to cut the edge<span style="margin-top: 0px;
+ margin-bottom: 0px;
+ font-family: 'Times New Roman', serif;">
+ in several segments with increasing arithmetic length</span></p>
+
+<p class="whs4">algo_local.Arithmetic1D(1, 4)</p>
+
+<p class="whs4"> </p>
+
+<p class="whs5"># define "Propagation"
+ hypothesis that propagates all other hypotheses</p>
+
+<p class="whs5"># on all edges of the
+ opposite side in case of quadrangular faces</p>
+
+<p class="whs4">algo_local.Propagation()</p>
+
+<p class="whs4"> </p>
+
+<p class="whs5"># compute the mesh</p>
+
+<p class="whs4">quadra.Compute() </p>
+
+<p class="whs4"> </p>
+
+<h3><a name=bookmark2>Editing of a mesh</a></h3>
+
+<p class="whs4"><span style="font-family: 'Lucida Console', monospace;">import
+ geompy</span></p>
+
+<p class="whs4">import smesh</p>
+
+<p class="whs4"> </p>
+
+<p class="whs4">def PrintMeshInfo(theMesh):</p>
+
+<p class="whs4"> aMesh
+ = theMesh.GetMesh()</p>
+
+<p class="whs4"> print
+ "Information about mesh:"</p>
+
+<p class="whs4"> print
+ "Number of nodes :
+ ", aMesh.NbNodes()</p>
+
+<p class="whs4"> print
+ "Number of edges :
+ ", aMesh.NbEdges()</p>
+
+<p class="whs4"> print
+ "Number of faces :
+ ", aMesh.NbFaces()</p>
+
+<p class="whs4"> print
+ "Number of volumes :
+ ", aMesh.NbVolumes()</p>
+
+<p class="whs4"> pass</p>
+
+<p class="whs4"> </p>
+
+<p class="whs5"># create a box</p>
+
+<p class="whs4">box = geompy.MakeBox(0., 0., 0., 20.,
+ 20., 20.)</p>
+
+<p class="whs4">geompy.addToStudy(box, "box")</p>
+
+<p class="whs4"> </p>
+
+<p class="whs5"># select one edge of
+ the box for definition of a local hypothesis</p>
+
+<p class="whs4">subShapeList = geompy.SubShapeAll(box,
+ geompy.ShapeType["EDGE"])</p>
+
+<p class="whs4">edge = subShapeList[0]</p>
+
+<p class="whs4">name = geompy.SubShapeName(edge, box)</p>
+
+<p class="whs4">geompy.addToStudyInFather(box, edge, name)</p>
+
+<p class="whs4"> </p>
+
+<p class="whs5"># create a mesh</p>
+
+<p class="whs4">tria = smesh.Mesh(box, "Mesh 2D")</p>
+
+<p class="whs4">algo1D = tria.Segment()</p>
+
+<p class="whs4">hyp1 = algo1D.NumberOfSegments(3)</p>
+
+<p class="whs4">algo2D = tria.Triangle()</p>
+
+<p class="whs4">hyp2 = algo2D.MaxElementArea(10.)</p>
+
+<p class="whs4"> </p>
+
+<p class="whs5"># create a sub-mesh</p>
+
+<p class="whs4">algo_local = tria.Segment(edge)</p>
+
+<p class="whs4">hyp3 = algo_local.Arithmetic1D(1, 6)</p>
+
+<p class="whs4">hyp4 = algo_local.Propagation()</p>
+
+<p class="whs4"> </p>
+
+<p class="whs5"># compute the mesh</p>
+
+<p class="whs4">tria.Compute()</p>
+
+<p class="whs4">PrintMeshInfo(tria)</p>
+
+<p class="whs4"> </p>
+
+<p class="whs5"># remove a local hypothesis</p>
+
+<p class="whs4">mesh = tria.GetMesh()</p>
+
+<p class="whs4">mesh.RemoveHypothesis(edge, hyp4)</p>
+
+<p class="whs4"> </p>
+
+<p class="whs5"># compute the mesh</p>
+
+<p class="whs4">tria.Compute()</p>
+
+<p class="whs4">PrintMeshInfo(tria)</p>
+
+<p class="whs4"> </p>
+
+<p class="whs5"># change the value
+ of the 2D hypothesis</p>
+
+<p class="whs4">hyp2.SetMaxElementArea(2.)</p>
+
+<p class="whs4"> </p>
+
+<p class="whs5"># compute the mesh</p>
+
+<p class="whs4">tria.Compute()</p>
+
+<p class="whs4">PrintMeshInfo(tria) </p>
+
+<p class="whs6"> </p>
+
+<h3><a name=bookmark3>Export of a Mesh</a></h3>
+
+<p class="whs7">import geompy</p>
+
+<p class="whs7">import smesh</p>
+
+<p class="whs6"> </p>
+
+<p class="whs6"># create a box</p>
+
+<p class="whs7">box = geompy.MakeBox(0.,
+ 0., 0., 100., 200., 300.)</p>
+
+<p class="whs7">idbox = geompy.addToStudy(box,
+ "box")</p>
+
+<p class="whs6"> </p>
+
+<p class="whs6"># create a mesh</p>
+
+<p class="whs7">tetra = smesh.Mesh(box,
+ "MeshBox")</p>
+
+<p class="whs6"> </p>
+
+<p class="whs7">algo1D = tetra.Segment()</p>
+
+<p class="whs7">algo1D.NumberOfSegments(7)</p>
+
+<p class="whs7"> </p>
+
+<p class="whs7">algo2D = tetra.Triangle()</p>
+
+<p class="whs7">algo2D.MaxElementArea(800.)</p>
+
+<p class="whs7"> </p>
+
+<p class="whs7">algo3D = tetra.Tetrahedron(smesh.NETGEN)</p>
+
+<p class="whs7">algo3D.MaxElementVolume(900.)</p>
+
+<p class="whs6"> </p>
+
+<p class="whs6"># compute the mesh</p>
+
+<p class="whs7">tetra.Compute()</p>
+
+<p class="whs6"> </p>
+
+<p class="whs6"># export the mesh in a
+ MED file</p>
+
+<p class="whs7">tetra.ExportMED("/tmp/meshMED.med",
+ 0) </p>
+
+<script type="text/javascript" language="javascript1.2">
+<!--
+if (window.writeIntopicBar)
+ writeIntopicBar(0);
+//-->
+</script>
+</body>
+</html>