Update table of contents: add reference to Python documentation.

This commit is contained in:
mkr 2006-08-22 08:14:01 +00:00
parent 9ab6519add
commit b9ed9fd014
11 changed files with 3577 additions and 3286 deletions

View File

@ -93,7 +93,7 @@ if (window.writeIntopicBar)
</script>
<h1>Creating Meshes</h1>
<p class="whs1">First of all see <a href="smesh_py_introduction.htm">Example
<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>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,270 @@
<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">
<html>
<head>
<title>smesh.py_introduction</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; }
-->
</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 +="</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\nIntroduction to MESH module python interface");
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>Introduction to MESH module python interface</h1>
<p class="whs1">Package smesh provides
a standard API for creation and edition of meshes . </p>
<p class="whs1">Below you can see an example
of usage of the package smesh for 3d mesh generation. </p>
<p class="whs1">&nbsp;&nbsp;</p>
<p class="whs1">Example of 3d mesh generation
with NETGEN</p>
<p class="whs1">from geompy import * </p>
<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">import
smesh</span> </p>
<p class="whs1"># Geometry </p>
<p class="whs1"># an assembly of a box,
a cylinder and a truncated cone meshed with tetrahedral. </p>
<p class="whs1">&nbsp;</p>
<p class="whs1"># Define values </p>
<p class="whs2">name = &quot;ex21_lamp&quot;
</p>
<p class="whs2">cote = 60 </p>
<p class="whs2">section = 20 </p>
<p class="whs2">size = 200 </p>
<p class="whs2">radius_1 = 80 </p>
<p class="whs2">radius_2 = 40 </p>
<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">height
= 100</span> </p>
<p class="whs1">&nbsp;</p>
<p class="whs1"># Build a box </p>
<p class="whs2">box = MakeBox(-cote,
-cote, -cote, +cote, +cote, +cote) </p>
<p class="whs1">&nbsp;</p>
<p class="whs1"># Build a cylinder </p>
<p class="whs2">pt1 = MakeVertex(0,
0, cote/3) </p>
<p class="whs2">di1 = MakeVectorDXDYDZ(0,
0, 1) </p>
<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">cyl
= MakeCylinder(pt1, di1, section, size)</span> </p>
<p class="whs1">&nbsp;</p>
<p class="whs1"># Build a truncated cone
</p>
<p class="whs2">pt2 = MakeVertex(0,
0, size) </p>
<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">cone
= MakeCone(pt2, di1, radius_1, radius_2, height)</span> </p>
<p class="whs1">&nbsp;</p>
<p class="whs1"># Fuse </p>
<p class="whs2">box_cyl = MakeFuse(box,
cyl) </p>
<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">piece
= MakeFuse(box_cyl, cone)</span> </p>
<p class="whs1">&nbsp;</p>
<p class="whs1"># Add in study </p>
<p class="whs2">addToStudy(piece,
name) </p>
<p class="whs1">&nbsp;</p>
<p class="whs1"># Create a group of faces
</p>
<p class="whs2">group = CreateGroup(piece,
ShapeType[&quot;FACE&quot;]) </p>
<p class="whs2">group_name = name
+ &quot;_grp&quot; </p>
<p class="whs2">addToStudy(group,
group_name) </p>
<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">group.SetName(group_name)</span>
</p>
<p class="whs1">&nbsp;</p>
<p class="whs1"># Add faces in the group
</p>
<p class="whs2">faces = SubShapeAllIDs(piece,
ShapeType[&quot;FACE&quot;]) </p>
<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">UnionIDs(group,
faces)</span> </p>
<p class="whs1">&nbsp;</p>
<p class="whs1"># Create a mesh </p>
<p class="whs1">&nbsp;</p>
<p class="whs1"># Define a mesh on a geometry
</p>
<p class="whs2">tetra = smesh.Mesh(piece,
name) </p>
<p class="whs1">&nbsp;</p>
<p class="whs1"># Define 1D hypothesis
</p>
<p class="whs2">algo1d = tetra.Segment()
</p>
<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">algo1d.LocalLength(10)</span>
</p>
<p class="whs1">&nbsp;</p>
<p class="whs1"># Define 2D hypothesis
</p>
<p class="whs2">algo2d = tetra.Triangle()
</p>
<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">algo2d.LengthFromEdges()</span>
</p>
<p class="whs1">&nbsp;</p>
<p class="whs1"># Define 3D hypothesis
</p>
<p class="whs2">algo3d = tetra.Tetrahedron(smesh.NETGEN)
</p>
<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">algo3d.MaxElementVolume(100)</span>
</p>
<p class="whs1">&nbsp;</p>
<p class="whs1"># Compute the mesh </p>
<p class="whs2">tetra.Compute()
</p>
<p class="whs1">&nbsp;</p>
<p class="whs1"># Create a groupe of faces
</p>
<p class="whs2">tetra.Group(group)
</p>
<script type="text/javascript" language="javascript1.2">
<!--
if (window.writeIntopicBar)
writeIntopicBar(0);
//-->
</script>
</body>
</html>

View File

@ -1,208 +0,0 @@
<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">
<html>
<head>
<title>Introduction to MESH module python interface</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; font-family:'Lucida Console' , monospace; }
p.whs2 { margin-top:0pt; margin-bottom:0pt; }
p.whs3 { font-family:'Lucida Console' , monospace; margin-top:0px; margin-bottom:0px; }
p.whs4 { margin-top:0px; margin-bottom:0px; }
p.whs5 { margin-top:0px; margin-bottom:0px; font-family:'Times New Roman' , serif; }
-->
</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 +="</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\nIntroduction to MESH module python interface");
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>Introduction to MESH module python interface</h1>
<p><a href="smeshpy_doc/namespacesmesh.html">Package smesh</a> provides a standard API for meshes creation and edition.
<p>Below you can see an example of package <b>smesh</b> usage for 3d mesh generation.
<p>&nbsp;
<h3><a name=bookmark>Example of 3d mesh generation with NETGEN</a></h3>
<br>from geompy import *
<br>
<br>import smesh
<br>
<br># Geometry
<br># ========
<br>
<br># an assembly of a box, a cylinder and a truncated cone meshed with tetrahedral.
<br>
<br># Define values
<br># -------------
<br>
<br>name = "ex21_lamp"
<br>
<br>cote = 60
<br>
<br>section = 20
<br>size = 200
<br>
<br>radius_1 = 80
<br>radius_2 = 40
<br>height = 100
<br>
<br># Build a box
<br># -----------
<br>
<br>box = MakeBox(-cote, -cote, -cote, +cote, +cote, +cote)
<br>
<br># Build a cylinder
<br># ----------------
<br>
<br>pt1 = MakeVertex(0, 0, cote/3)
<br>di1 = MakeVectorDXDYDZ(0, 0, 1)
<br>cyl = MakeCylinder(pt1, di1, section, size)
<br>
<br># Build a truncated cone
<br># ----------------------
<br>
<br>pt2 = MakeVertex(0, 0, size)
<br>cone = MakeCone(pt2, di1, radius_1, radius_2, height)
<br>
<br># Fuse
<br># ----
<br>
<br>box_cyl = MakeFuse(box, cyl)
<br>piece = MakeFuse(box_cyl, cone)
<br>
<br># Add in study
<br># ------------
<br>
<br>addToStudy(piece, name)
<br>
<br># Create a group of faces
<br># -----------------------
<br>
<br>group = CreateGroup(piece, ShapeType["FACE"])
<br>
<br>group_name = name + "_grp"
<br>addToStudy(group, group_name)
<br>group.SetName(group_name)
<br>
<br># Add faces in the group
<br># ----------------------
<br>
<br>faces = SubShapeAllIDs(piece, ShapeType["FACE"])
<br>
<br>UnionIDs(group, faces)
<br>
<br># Create a mesh
<br># =============
<br>
<br># Define a mesh on a geometry
<br># ---------------------------
<br>
<br>tetra = smesh.Mesh(piece, name)
<br>
<br># Define 1D hypothesis
<br># --------------------
<br>
<br>algo1d = tetra.Segment()
<br>algo1d.LocalLength(10)
<br>
<br># Define 2D hypothesis
<br># --------------------
<br>
<br>algo2d = tetra.Triangle()
<br>algo2d.LengthFromEdges()
<br>
<br># Define 3D hypothesis
<br># --------------------
<br>
<br>algo3d = tetra.Tetrahedron(smesh.NETGEN)
<br>algo3d.MaxElementVolume(100)
<br>
<br># Compute the mesh
<br># ----------------
<br>
<br>tetra.Compute()
<br>
<br># Create a groupe of faces
<br># ------------------------
<br>
<br>tetra.Group(group)
<script type="text/javascript" language="javascript1.2">
<!--
if (window.writeIntopicBar)
writeIntopicBar(0);
//-->
</script>
</body>
</html>

View File

@ -19,6 +19,7 @@ aTE("Borders at multi-connection","borders_at_multi-connection.htm");
aTE("Borders at multiconnection 2D","borders_at_multiconnection_2d.htm");
aTE("Clipping","clipping.htm");
aTE("Constructing Meshes","constructing_meshes.htm");
aTE("Convert to/from Quadratic Mesh","convert_to_from_quadratic_mesh.htm");
aTE("Defining hypotheses TUI","defining_hypotheses_tui.htm");
aTE("Deleting Groups","deleting_groups.htm");
aTE("Display Entity","display_entity.htm");
@ -73,11 +74,14 @@ aTE("Length","length.htm");
aTE("Merge Elements","merge_elements.htm");
aTE("mesh","mesh.htm");
aTE("Modifying Meshes","modifying_meshes.htm");
aTE("SALOME - SMESH - v.version: Package smesh","namespacesmesh.html");
aTE("Netgen 2D and 3D hypotheses","netgen_2d_and_3d_hypotheses.htm");
aTE("Pattern mapping","pattern_mapping.htm");
aTE("Presentation","presentation.htm");
aTE("Quality Controls","quality_controls.htm");
aTE("Revolution","revolution.htm");
aTE("Selection filter library","selection_filter_library.htm");
aTE("smesh.py_introduction","smesh.py_introduction.htm");
aTE("Transforming Meshes","transforming_meshes.htm");
aTE("Transparency","transparency.htm");
aTE("Viewing Meshes","viewing_meshes.htm");

File diff suppressed because it is too large Load Diff

View File

@ -8,19 +8,21 @@
<script language="javascript" src="whtdata.js"></script>
<script language="javascript">
<!--
aTE(1,78,"MESH module");
aTE(1,81,"MESH module");
aTE(2,0,"Introduction to Mesh","mesh.htm");
aTE(2,0,"Running MESH module","files/running_smesh_module.htm");
aTE(1,12,"Creating meshes");
aTE(2,0,"Introduction to MESH module python interface","smesh.py_introduction.htm");
aTE(1,13,"Creating meshes");
aTE(2,0,"About meshes","files/about_meshes.htm");
aTE(2,0,"Importing and exporting meshes","files/importing_and_exporting_meshes.htm");
aTE(2,0,"Constructing meshes","files/constructing_meshes.htm");
aTE(2,0,"Defining meshing algorithms","files/about_meshing_algorithms.htm");
aTE(1,5,"Defining hypotheses");
aTE(1,6,"Defining hypotheses");
aTE(2,0,"About Hypotheses","files/about_hypotheses.htm");
aTE(2,0,"1D Meshing Hypotheses","files/arithmetic_1d.htm");
aTE(2,0,"2D Meshing Hypotheses","files/max._element_area_hypothesis.htm");
aTE(2,0,"Max Element Volume hypothesis","files/max._element_volume_hypothsis.htm");
aTE(2,0,"Netgen 2D and 3D hypotheses","netgen_2d_and_3d_hypotheses.htm");
aTE(2,0,"Additional Hypotheses","files/non_conform_mesh_allowed_hypothesis.htm");
aTE(2,0,"Constructing submeshes","files/constructing_submeshes.htm");
aTE(2,0,"Editing Meshes","files/reassigning_hypotheses_and_algorithms.htm");
@ -56,7 +58,7 @@
aTE(2,0,"Constructing groups of specific elements","files/constructing_groups_of_specific_elements.htm");
aTE(2,0,"Deleting Groups","deleting_groups.htm");
aTE(2,0,"Selection filter library","selection_filter_library.htm");
aTE(1,22,"Modifying meshes");
aTE(1,23,"Modifying meshes");
aTE(2,0,"Adding nodes and elements","files/adding_nodes_and_elements.htm");
aTE(2,0,"Adding quadratic elements","adding_quadratic_nodes_and_elements.htm");
aTE(2,0,"Removing nodes and elements","files/removing_nodes_and_elements.htm");
@ -79,12 +81,12 @@
aTE(2,0,"Extrusion along a path","extrusion_along_a_path.htm");
aTE(2,0,"Revolution","revolution.htm");
aTE(2,0,"Pattern mapping","pattern_mapping.htm");
aTE(2,0,"Python interface smesh.py","smeshpy_doc/namespacesmesh.html");
aTE(2,0,"Convert to/from Quadratic Mesh","convert_to_from_quadratic_mesh.htm");
aTE(2,0,"Access to Mesh module functionality from Python (using smesh.py)" ,"smeshpy_doc/namespacesmesh.html");
aTE(1,7,"TUI Scripts");
aTE(2,0,"Introduction to MESH module python interface","smesh_py_introduction.htm");
aTE(2,0,"Creating Meshes","constructing_meshes.htm");
aTE(2,0,"Defining Hypotheses","defining_hypotheses_tui.htm");
aTE(2,0,"Viewing Meshes","viewing_meshes.htm");
aTE(2,0,"Defining Hypotheses","defining_hypotheses_tui.htm");
aTE(2,0,"Quality Controls","quality_controls.htm");
aTE(2,0,"Grouping Elements","grouping_elements.htm");
aTE(2,0,"Modifying Meshes","modifying_meshes.htm");

View File

@ -7,6 +7,7 @@
<topic name="Borders at multiconnection 2D" url="borders_at_multiconnection_2d.htm" />
<topic name="Clipping" url="clipping.htm" />
<topic name="Constructing Meshes" url="constructing_meshes.htm" />
<topic name="Convert to/from Quadratic Mesh" url="convert_to_from_quadratic_mesh.htm" />
<topic name="Defining hypotheses TUI" url="defining_hypotheses_tui.htm" />
<topic name="Deleting Groups" url="deleting_groups.htm" />
<topic name="Display Entity" url="display_entity.htm" />
@ -61,11 +62,14 @@
<topic name="Merge Elements" url="merge_elements.htm" />
<topic name="mesh" url="mesh.htm" />
<topic name="Modifying Meshes" url="modifying_meshes.htm" />
<topic name="SALOME - SMESH - v.version: Package smesh" url="namespacesmesh.html" />
<topic name="Netgen 2D and 3D hypotheses" url="netgen_2d_and_3d_hypotheses.htm" />
<topic name="Pattern mapping" url="pattern_mapping.htm" />
<topic name="Presentation" url="presentation.htm" />
<topic name="Quality Controls" url="quality_controls.htm" />
<topic name="Revolution" url="revolution.htm" />
<topic name="Selection filter library" url="selection_filter_library.htm" />
<topic name="smesh.py_introduction" url="smesh.py_introduction.htm" />
<topic name="Transforming Meshes" url="transforming_meshes.htm" />
<topic name="Transparency" url="transparency.htm" />
<topic name="Viewing Meshes" url="viewing_meshes.htm" />

View File

@ -1,7 +1,7 @@
<?xml version='1.0' encoding='windows-1252' ?>
<fts>
<chunkinfo url="whfwdata0.xml" first="0" last="zoom"/>
<chunkinfo url="whfwdata0.xml" first="_grp" last="zoom"/>
<tchunkinfo first="0" last="69" url="whftdata0.xml" />
<tchunkinfo first="0" last="73" url="whftdata0.xml" />
</fts>

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,7 @@
<book name="MESH module" >
<item name="Introduction to Mesh" url="mesh.htm" />
<item name="Running MESH module" url="files/running_smesh_module.htm" />
<item name="Introduction to MESH module python interface" url="smesh.py_introduction.htm" />
<book name="Creating meshes" >
<item name="About meshes" url="files/about_meshes.htm" />
<item name="Importing and exporting meshes" url="files/importing_and_exporting_meshes.htm" />
@ -13,6 +14,7 @@
<item name="1D Meshing Hypotheses" url="files/arithmetic_1d.htm" />
<item name="2D Meshing Hypotheses" url="files/max._element_area_hypothesis.htm" />
<item name="Max Element Volume hypothesis" url="files/max._element_volume_hypothsis.htm" />
<item name="Netgen 2D and 3D hypotheses" url="netgen_2d_and_3d_hypotheses.htm" />
<item name="Additional Hypotheses" url="files/non_conform_mesh_allowed_hypothesis.htm" />
</book>
<item name="Constructing submeshes" url="files/constructing_submeshes.htm" />
@ -77,13 +79,13 @@
<item name="Extrusion along a path" url="extrusion_along_a_path.htm" />
<item name="Revolution" url="revolution.htm" />
<item name="Pattern mapping" url="pattern_mapping.htm" />
<item name="Convert to/from Quadratic Mesh" url="convert_to_from_quadratic_mesh.htm" />
</book>
<item name="Python interface smesh.py" url="smeshpy_doc/namespacesmesh.html" />
<item name="Access to Mesh module functionality from Python (using smesh.py)" url="smeshpy_doc/namespacesmesh.html" />
<book name="TUI Scripts" >
<item name="Introduction to MESH module python interface" url="smesh_py_introduction.htm" />
<item name="Creating Meshes" url="constructing_meshes.htm" />
<item name="Defining Hypotheses" url="defining_hypotheses_tui.htm" />
<item name="Viewing Meshes" url="viewing_meshes.htm" />
<item name="Defining Hypotheses" url="defining_hypotheses_tui.htm" />
<item name="Quality Controls" url="quality_controls.htm" />
<item name="Grouping Elements" url="grouping_elements.htm" />
<item name="Modifying Meshes" url="modifying_meshes.htm" />