diff --git a/doc/salome/gui/SMESH/constructing_meshes.htm b/doc/salome/gui/SMESH/constructing_meshes.htm index ca895c640..d460c302f 100755 --- a/doc/salome/gui/SMESH/constructing_meshes.htm +++ b/doc/salome/gui/SMESH/constructing_meshes.htm @@ -89,8 +89,14 @@ if (window.writeIntopicBar)
At first see Example of 3d mesh generation, using smesh package. +
Other examples of python scripts will be also updated soon to use smesh package instead of direct usage of idl interface. +
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 smesh package.
+
+
import salome
import geompy
@@ -417,6 +423,9 @@ if (window.writeIntopicBar)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 smesh package.
+
+
import
@@ -548,6 +557,9 @@ if (window.writeIntopicBar)
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 smesh package.
+ import
diff --git a/doc/salome/gui/SMESH/defining_hypotheses_tui.htm b/doc/salome/gui/SMESH/defining_hypotheses_tui.htm
index 9ef8f93c3..3fe7884bd 100755
--- a/doc/salome/gui/SMESH/defining_hypotheses_tui.htm
+++ b/doc/salome/gui/SMESH/defining_hypotheses_tui.htm
@@ -858,6 +858,9 @@ if (window.writeIntopicBar)
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 smesh package.
+ import
salome 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 smesh package.
+ import
salome 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 smesh package.
+ import salome import geompy 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 smesh package.
+ import salome import geompy 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 smesh package.
+ import salome import geompy 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 smesh package.
+ import salome import geompy 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 smesh package.
+ import salome 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 smesh package.
+ import SMESH import SMESH_mechanic 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 smesh package.
+ import salome import geompy 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 smesh package.
+ import salome import geompy 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 smesh package.
+ import SMESH import SMESH_mechanic 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 smesh package.
+ import SMESH import SMESH_mechanic 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 smesh package.
+ import SMESH import SMESH_mechanic 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 smesh package.
+ import SMESH 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 smesh package.
+ import SMESH import SMESH_mechanic 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 smesh package.
+ import SMESH import SMESH_mechanic 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 smesh package.
+ import SMESH import SMESH_mechanic_tetra Package smesh provides a standard API for meshes creation and edition.
+ Below you can see an example of package smesh usage for 3d mesh generation.
+
+
+Python package smesh defines several classes, destined for easy and clear mesh creation and edition.
+
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 smesh package.
+ import salome import geompyExport of a Mesh
+
+
Maximum Element Volume
+
+
Defining Meshing Algorithms
+
+
Create a Group on Geometry
+
+
Pattern Mapping
+
+
Free Borders
+
+
Borders at Multiconnection
+
+
Length 1D
+
+
Free Edges
+
+
Length 2D
+
+
Borders at Multiconnection 2D
+
+
Area
+
+
Taper
+
+
Aspect Ratio
+
+
Minimum Angle
+
+
Warping
+
+
Skew
+
+
Aspect Ratio 3D
+
+
Introduction to MESH module python interface
+
+Example of 3d mesh generation with NETGEN
+
+
from geompy import *
+
+
import smesh
+
+
# Geometry
+
# ========
+
+
# an assembly of a box, a cylinder and a truncated cone meshed with tetrahedral.
+
+
# Define values
+
# -------------
+
+
name = "ex21_lamp"
+
+
cote = 60
+
+
section = 20
+
size = 200
+
+
radius_1 = 80
+
radius_2 = 40
+
height = 100
+
+
# Build a box
+
# -----------
+
+
box = MakeBox(-cote, -cote, -cote, +cote, +cote, +cote)
+
+
# Build a cylinder
+
# ----------------
+
+
pt1 = MakeVertex(0, 0, cote/3)
+
di1 = MakeVectorDXDYDZ(0, 0, 1)
+
cyl = MakeCylinder(pt1, di1, section, size)
+
+
# Build a truncated cone
+
# ----------------------
+
+
pt2 = MakeVertex(0, 0, size)
+
cone = MakeCone(pt2, di1, radius_1, radius_2, height)
+
+
# Fuse
+
# ----
+
+
box_cyl = MakeFuse(box, cyl)
+
piece = MakeFuse(box_cyl, cone)
+
+
# Add in study
+
# ------------
+
+
addToStudy(piece, name)
+
+
# Create a group of faces
+
# -----------------------
+
+
group = CreateGroup(piece, ShapeType["FACE"])
+
+
group_name = name + "_grp"
+
addToStudy(group, group_name)
+
group.SetName(group_name)
+
+
# Add faces in the group
+
# ----------------------
+
+
faces = SubShapeAllIDs(piece, ShapeType["FACE"])
+
+
UnionIDs(group, faces)
+
+
# Create a mesh
+
# =============
+
+
# Define a mesh on a geometry
+
# ---------------------------
+
+
tetra = smesh.Mesh(piece, name)
+
+
# Define 1D hypothesis
+
# --------------------
+
+
algo1d = tetra.Segment()
+
algo1d.LocalLength(10)
+
+
# Define 2D hypothesis
+
# --------------------
+
+
algo2d = tetra.Triangle()
+
algo2d.LengthFromEdges()
+
+
# Define 3D hypothesis
+
# --------------------
+
+
algo3d = tetra.Tetrahedron(smesh.NETGEN)
+
algo3d.MaxElementVolume(100)
+
+
# Compute the mesh
+
# ----------------
+
+
tetra.Compute()
+
+
# Create a groupe of faces
+
# ------------------------
+
+
tetra.Group(group)
+
+
+
+
diff --git a/doc/salome/gui/SMESH/smeshpy_doc/namespacesmesh.html b/doc/salome/gui/SMESH/smeshpy_doc/namespacesmesh.html
index 5b3964358..130b8881f 100644
--- a/doc/salome/gui/SMESH/smeshpy_doc/namespacesmesh.html
+++ b/doc/salome/gui/SMESH/smeshpy_doc/namespacesmesh.html
@@ -7,6 +7,9 @@
Package smesh
diff --git a/doc/salome/gui/SMESH/viewing_meshes.htm b/doc/salome/gui/SMESH/viewing_meshes.htm
index b32bcc84a..a04fe708b 100755
--- a/doc/salome/gui/SMESH/viewing_meshes.htm
+++ b/doc/salome/gui/SMESH/viewing_meshes.htm
@@ -85,6 +85,9 @@ if (window.writeIntopicBar)
Data Structures
Viewing Mesh Infos
+
+
+
diff --git a/doc/salome/gui/SMESH/whxdata/whtdata0.xml b/doc/salome/gui/SMESH/whxdata/whtdata0.xml
index 3777dc98d..7f9178dda 100755
--- a/doc/salome/gui/SMESH/whxdata/whtdata0.xml
+++ b/doc/salome/gui/SMESH/whxdata/whtdata0.xml
@@ -80,6 +80,7 @@