]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix of bug 0020420: Bad links in Documentation
authorouv <ouv@opencascade.com>
Tue, 14 Jul 2009 12:04:10 +0000 (12:04 +0000)
committerouv <ouv@opencascade.com>
Tue, 14 Jul 2009 12:04:10 +0000 (12:04 +0000)
doc/salome/gui/SMESH/input/tui_notebook_smesh.doc [new file with mode: 0644]

diff --git a/doc/salome/gui/SMESH/input/tui_notebook_smesh.doc b/doc/salome/gui/SMESH/input/tui_notebook_smesh.doc
new file mode 100644 (file)
index 0000000..0494092
--- /dev/null
@@ -0,0 +1,47 @@
+/*!
+
+\page tui_notebook_smesh_page Using SALOME NoteBook
+
+\anchor tui_notebook_smesh
+
+\code
+import geompy
+import smesh
+import salome_notebook
+
+# set variables
+notebook = salome_notebook.notebook
+notebook.set("Length", 100)
+notebook.set("Width", 200)
+notebook.set("Offset", 50)
+
+notebook.set("NbSegments", 7)
+notebook.set("MaxElementArea", 800)
+notebook.set("MaxElementVolume", 900)
+
+# create a box
+box = geompy.MakeBoxDXDYDZ("Length", "Width", 300)
+idbox = geompy.addToStudy(box, "Box")
+
+# create a mesh
+tetra = smesh.Mesh(box, "MeshBox")
+
+algo1D = tetra.Segment()
+algo1D.NumberOfSegments("NbSegments")
+
+algo2D = tetra.Triangle()
+algo2D.MaxElementArea("MaxElementArea")
+
+algo3D = tetra.Tetrahedron(smesh.NETGEN)
+algo3D.MaxElementVolume("MaxElementVolume")
+
+# compute the mesh
+ret = tetra.Compute()
+
+# translate the mesh
+point = smesh.PointStructStr("Offset", 0., 0.)
+vector = smesh.DirStructStr(point) 
+tetra.TranslateObject(tetra, vector, 0)
+\endcode
+
+*/