diff --git a/build_cmake b/build_cmake
index 01bb2ac7f..30eeb733d 100755
--- a/build_cmake
+++ b/build_cmake
@@ -21,7 +21,7 @@
CURRENT_DIR=`pwd`
CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
cd ${CONF_DIR}
-python $KERNEL_ROOT_DIR/salome_adm/cmake_files/am2cmake.py --smesh
+python $KERNEL_ROOT_DIR/salome_adm/cmake_files/deprecated/am2cmake.py --smesh
status=$?
cd ${CURRENT_DIR}
exit $status
diff --git a/build_cmake.bat b/build_cmake.bat
index 890adcdff..38e8e726b 100644
--- a/build_cmake.bat
+++ b/build_cmake.bat
@@ -17,4 +17,4 @@
@REM See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
@REM
-%PYTHONBIN% %KERNEL_ROOT_DIR%\salome_adm\cmake_files\am2cmake.py --smesh
+%PYTHONBIN% %KERNEL_ROOT_DIR%\salome_adm\cmake_files\deprecated\am2cmake.py --smesh
diff --git a/doc/salome/examples/Makefile.am b/doc/salome/examples/Makefile.am
index 930edd9fc..6a5904b91 100644
--- a/doc/salome/examples/Makefile.am
+++ b/doc/salome/examples/Makefile.am
@@ -26,16 +26,34 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am
pyexamplesdir = $(docdir)/examples/SMESH
-BAD_TESTS =
+BAD_TESTS = \
+ 3dmesh.py \
+ creating_meshes_ex01.py \
+ creating_meshes_ex03.py \
+ creating_meshes_ex05.py \
+ defining_hypotheses_ex06.py \
+ defining_hypotheses_ex09.py \
+ defining_hypotheses_ex17.py \
+ filters_ex02.py \
+ filters_ex08.py \
+ filters_ex23.py \
+ filters_ex24.py \
+ filters_ex25.py \
+ filters_ex32.py \
+ filters_ex35.py \
+ generate_flat_elements.py \
+ modifying_meshes_ex26.py \
+ notebook_smesh.py \
+ quality_controls_ex06.py \
+ quality_controls_ex20.py \
+ quality_controls_ex21.py \
+ quality_controls_ex22.py \
+ viewing_meshes_ex01.py
GOOD_TESTS = \
- 3dmesh.py \
cartesian_algo.py \
- creating_meshes_ex01.py \
creating_meshes_ex02.py \
- creating_meshes_ex03.py \
creating_meshes_ex04.py \
- creating_meshes_ex05.py \
creating_meshes_ex06.py \
creating_meshes_ex07.py \
creating_meshes_ex08.py \
@@ -44,10 +62,8 @@ GOOD_TESTS = \
defining_hypotheses_ex03.py \
defining_hypotheses_ex04.py \
defining_hypotheses_ex05.py \
- defining_hypotheses_ex06.py \
defining_hypotheses_ex07.py \
defining_hypotheses_ex08.py \
- defining_hypotheses_ex09.py \
defining_hypotheses_ex10.py \
defining_hypotheses_ex11.py \
defining_hypotheses_ex12.py \
@@ -55,15 +71,12 @@ GOOD_TESTS = \
defining_hypotheses_ex14.py \
defining_hypotheses_ex15.py \
defining_hypotheses_ex16.py \
- defining_hypotheses_ex17.py \
filters_ex01.py \
- filters_ex02.py \
filters_ex03.py \
filters_ex04.py \
filters_ex05.py \
filters_ex06.py \
filters_ex07.py \
- filters_ex08.py \
filters_ex09.py \
filters_ex10.py \
filters_ex11.py \
@@ -78,21 +91,15 @@ GOOD_TESTS = \
filters_ex20.py \
filters_ex21.py \
filters_ex22.py \
- filters_ex23.py \
- filters_ex24.py \
- filters_ex25.py \
filters_ex26.py \
filters_ex27.py \
filters_ex28.py \
filters_ex29.py \
filters_ex30.py \
filters_ex31.py \
- filters_ex32.py \
filters_ex33.py \
filters_ex34.py \
- filters_ex35.py \
filters_ex36.py \
- generate_flat_elements.py \
grouping_elements_ex01.py \
grouping_elements_ex02.py \
grouping_elements_ex03.py \
@@ -128,15 +135,12 @@ GOOD_TESTS = \
modifying_meshes_ex23.py \
modifying_meshes_ex24.py \
modifying_meshes_ex25.py \
- modifying_meshes_ex26.py \
- notebook_smesh.py \
prism_3d_algo.py \
quality_controls_ex01.py \
quality_controls_ex02.py \
quality_controls_ex03.py \
quality_controls_ex04.py \
quality_controls_ex05.py \
- quality_controls_ex06.py \
quality_controls_ex07.py \
quality_controls_ex08.py \
quality_controls_ex09.py \
@@ -150,9 +154,6 @@ GOOD_TESTS = \
quality_controls_ex17.py \
quality_controls_ex18.py \
quality_controls_ex19.py \
- quality_controls_ex20.py \
- quality_controls_ex21.py \
- quality_controls_ex22.py \
transforming_meshes_ex01.py \
transforming_meshes_ex02.py \
transforming_meshes_ex03.py \
@@ -167,14 +168,13 @@ GOOD_TESTS = \
transforming_meshes_ex12.py \
transforming_meshes_ex13.py \
use_existing_faces.py \
- viewing_meshes_ex01.py \
viewing_meshes_ex02.py
pyexamples_SCRIPTS = $(BAD_TESTS) $(GOOD_TESTS)
EXTRA_DIST += $(pyexamples_SCRIPTS) testme.py
-check-local:
+installcheck-local:
@for f in $(GOOD_TESTS) ; do \
- python $(top_srcdir)/doc/salome/examples/testme.py $(top_srcdir)/doc/salome/examples/$$f || exit 1; \
+ env SMESH_ROOT_DIR=$(prefix) python -B $(top_srcdir)/doc/salome/examples/testme.py $(top_srcdir)/doc/salome/examples/$$f || exit 1; \
done
diff --git a/doc/salome/examples/filters_ex13.py b/doc/salome/examples/filters_ex13.py
index d5415e20a..e20937d1b 100644
--- a/doc/salome/examples/filters_ex13.py
+++ b/doc/salome/examples/filters_ex13.py
@@ -3,7 +3,7 @@
# create mesh
from SMESH_mechanic import *
# remove some faces to have faces with bare borders
-mesh.RemoveElements( mesh.GetElementsByType(FACE)[0:5] )
+mesh.RemoveElements( mesh.GetElementsByType(smesh.FACE)[0:5] )
# get all faces bare borders
filter = smesh.GetFilter(smesh.FACE, smesh.FT_BareBorderFace)
ids = mesh.GetIdsFromFilter(filter)
diff --git a/doc/salome/examples/filters_ex14.py b/doc/salome/examples/filters_ex14.py
index 45c356cdf..01ea27ab9 100644
--- a/doc/salome/examples/filters_ex14.py
+++ b/doc/salome/examples/filters_ex14.py
@@ -2,7 +2,7 @@
# create mesh
from SMESH_mechanic import *
-faceID = mesh.GetElementsByType(FACE)[0]
+faceID = mesh.GetElementsByType(smesh.FACE)[0]
# get all faces co-planar to the first face with tolerance 5 degrees
filter = smesh.GetFilter(smesh.FACE, smesh.FT_CoplanarFaces,faceID,Tolerance=5.0)
ids = mesh.GetIdsFromFilter(filter)
diff --git a/doc/salome/examples/filters_ex31.py b/doc/salome/examples/filters_ex31.py
index a20f7d708..4a2acbfa8 100644
--- a/doc/salome/examples/filters_ex31.py
+++ b/doc/salome/examples/filters_ex31.py
@@ -3,9 +3,9 @@
# create mesh
from SMESH_mechanic import *
# get nodes with identifiers [5-10] and [15-30]
-criterion1 = smesh.GetCriterion(smesh.NODE, smesh.FT_RangeOfIds, Treshold="5-10",\
+criterion1 = smesh.GetCriterion(smesh.NODE, smesh.FT_RangeOfIds, Threshold="5-10",\
BinaryOp=smesh.FT_LogicalOR)
-criterion2 = smesh.GetCriterion(smesh.NODE, smesh.FT_RangeOfIds, Treshold="15-30")
+criterion2 = smesh.GetCriterion(smesh.NODE, smesh.FT_RangeOfIds, Threshold="15-30")
filter = smesh.CreateFilterManager().CreateFilter()
filter.SetCriteria([criterion1,criterion2])
ids = mesh.GetIdsFromFilter(filter)
diff --git a/doc/salome/examples/modifying_meshes_ex10.py b/doc/salome/examples/modifying_meshes_ex10.py
index 7f36728c1..1d1af1942 100644
--- a/doc/salome/examples/modifying_meshes_ex10.py
+++ b/doc/salome/examples/modifying_meshes_ex10.py
@@ -1,6 +1,7 @@
# Add Polyhedron
import salome
+import smesh
import math
# create an empty mesh structure
@@ -39,18 +40,18 @@ for i in range(5):
pass
# Create a polyhedral volume (12-hedron with pentagonal faces)
-MeshEditor.AddPolyhedralVolume([dd[0], dd[1], dd[2], dd[3], dd[4], # top
- dd[0], cc[0], bb[1], cc[1], dd[1], # -
- dd[1], cc[1], bb[2], cc[2], dd[2], # -
- dd[2], cc[2], bb[3], cc[3], dd[3], # - below top
- dd[3], cc[3], bb[4], cc[4], dd[4], # -
- dd[4], cc[4], bb[0], cc[0], dd[0], # -
- aa[4], bb[4], cc[4], bb[0], aa[0], # .
- aa[3], bb[3], cc[3], bb[4], aa[4], # .
- aa[2], bb[2], cc[2], bb[3], aa[3], # . above bottom
- aa[1], bb[1], cc[1], bb[2], aa[2], # .
- aa[0], bb[0], cc[0], bb[1], aa[1], # .
- aa[0], aa[1], aa[2], aa[3], aa[4]], # bottom
- [5,5,5,5,5,5,5,5,5,5,5,5])
+mesh.GetMeshEditor().AddPolyhedralVolume([dd[0], dd[1], dd[2], dd[3], dd[4], # top
+ dd[0], cc[0], bb[1], cc[1], dd[1], # -
+ dd[1], cc[1], bb[2], cc[2], dd[2], # -
+ dd[2], cc[2], bb[3], cc[3], dd[3], # - below top
+ dd[3], cc[3], bb[4], cc[4], dd[4], # -
+ dd[4], cc[4], bb[0], cc[0], dd[0], # -
+ aa[4], bb[4], cc[4], bb[0], aa[0], # .
+ aa[3], bb[3], cc[3], bb[4], aa[4], # .
+ aa[2], bb[2], cc[2], bb[3], aa[3], # . above bottom
+ aa[1], bb[1], cc[1], bb[2], aa[2], # .
+ aa[0], bb[0], cc[0], bb[1], aa[1], # .
+ aa[0], aa[1], aa[2], aa[3], aa[4]], # bottom
+ [5,5,5,5,5,5,5,5,5,5,5,5])
salome.sg.updateObjBrowser(1)
diff --git a/doc/salome/examples/quality_controls_ex01.py b/doc/salome/examples/quality_controls_ex01.py
index ed4dc244e..f411d2e61 100644
--- a/doc/salome/examples/quality_controls_ex01.py
+++ b/doc/salome/examples/quality_controls_ex01.py
@@ -35,7 +35,7 @@ for i in range(len(anIds)):
print ""
# create a group
-aGroup = mesh.CreateGroup(SMESH.EDGE, "Free borders")
+aGroup = mesh.GetMesh().CreateGroup(smesh.EDGE, "Free borders")
aGroup.Add(anIds)
salome.sg.updateObjBrowser(1)
diff --git a/doc/salome/examples/quality_controls_ex02.py b/doc/salome/examples/quality_controls_ex02.py
index 7b1f55e6f..5373c4d6f 100644
--- a/doc/salome/examples/quality_controls_ex02.py
+++ b/doc/salome/examples/quality_controls_ex02.py
@@ -38,7 +38,7 @@ for i in range(len(anIds)):
print ""
# create a group
-aGroup = mesh.CreateGroup(SMESH.EDGE, "Borders at multi-connections")
+aGroup = mesh.GetMesh().CreateGroup(smesh.EDGE, "Borders at multi-connections")
aGroup.Add(anIds)
salome.sg.updateObjBrowser(1)
diff --git a/doc/salome/examples/quality_controls_ex03.py b/doc/salome/examples/quality_controls_ex03.py
index 8cb409866..eaa607b94 100644
--- a/doc/salome/examples/quality_controls_ex03.py
+++ b/doc/salome/examples/quality_controls_ex03.py
@@ -37,7 +37,7 @@ for i in range(len(anIds)):
print ""
# create a group
-aGroup = mesh.CreateGroup(SMESH.EDGE, "Edges with length > " + `length_margin`)
+aGroup = mesh.GetMesh().CreateGroup(smesh.EDGE, "Edges with length > " + `length_margin`)
aGroup.Add(anIds)
salome.sg.updateObjBrowser(1)
diff --git a/doc/salome/examples/testme.py b/doc/salome/examples/testme.py
index b1328b596..c870ab656 100755
--- a/doc/salome/examples/testme.py
+++ b/doc/salome/examples/testme.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-import unittest, sys
+import unittest, sys, os
class SalomeSession(object):
def __init__(self, script):
@@ -10,11 +10,10 @@ class SalomeSession(object):
sys.argv += ["--modules=GEOM,MED,SMESH"]
sys.argv += ["--execute=%s" % script]
clt, d = runSalome.main()
- self.port = d['port']
return
def __del__(self):
- port = self.port
+ port = os.getenv('NSPORT')
import killSalomeWithPort
killSalomeWithPort.killMyPort(port)
return
diff --git a/doc/salome/examples/transforming_meshes_ex04.py b/doc/salome/examples/transforming_meshes_ex04.py
index ea7c72f54..0bfea6188 100644
--- a/doc/salome/examples/transforming_meshes_ex04.py
+++ b/doc/salome/examples/transforming_meshes_ex04.py
@@ -8,6 +8,6 @@ smesh = SMESH_mechanic.smesh
mesh = SMESH_mechanic.mesh
# create a symmetrical copy of the mesh mirrored through a point
-axis = SMESH.AxisStruct(0, 0, 0, 0, 0, 0)
+axis = smesh.AxisStruct(0, 0, 0, 0, 0, 0)
mesh.Mirror([], axis, smesh.POINT, 1)
diff --git a/doc/salome/examples/transforming_meshes_ex11.py b/doc/salome/examples/transforming_meshes_ex11.py
index 55fbe8f28..f94aafeda 100644
--- a/doc/salome/examples/transforming_meshes_ex11.py
+++ b/doc/salome/examples/transforming_meshes_ex11.py
@@ -1,10 +1,18 @@
# Duplicate nodes
import salome
+import geompy
import smesh
-import SMESH_test1
-mesh = SMESH_test1.mesh
+# Create a box
+
+box = geompy.MakeBox(0., 0., 0., 100., 200., 300.)
+
+# Define hexa mesh on a box
+mesh = smesh.Mesh(box, "Mesh")
+mesh.Segment().NumberOfSegments(7)
+mesh.Quadrangle()
+mesh.Hexahedron()
# Compute mesh
mesh.Compute()
@@ -13,53 +21,53 @@ mesh.Compute()
# Nodes to duplicate
nodes1 = mesh.CreateEmptyGroup( smesh.NODE, 'nodes1' )
-nodes1.Add( [ 289, 278, 302, 285 ] )
+nodes1.Add( [ 119, 125, 131, 137 ] )
# Group of faces to replace nodes with new ones
faces1 = mesh.CreateEmptyGroup( smesh.FACE, 'faces1' )
-faces1.Add( [ 519, 556, 557 ] )
+faces1.Add( [ 144, 151, 158 ] )
# Duplicate nodes
print "\nMesh before the first nodes duplication:"
-print "Nodes : ", mesh.NbNodes()
-print "Edges : ", mesh.NbEdges()
-print "Triangles : ", mesh.NbTriangles()
+print "Nodes : ", mesh.NbNodes()
+print "Edges : ", mesh.NbEdges()
+print "Quadrangles : ", mesh.NbQuadrangles()
groupOfCreatedNodes = mesh.DoubleNodeGroup(nodes1, faces1, theMakeGroup=True)
print "New nodes:", groupOfCreatedNodes.GetIDs()
print "\nMesh after the first nodes duplication:"
-print "Nodes : ", mesh.NbNodes()
-print "Edges : ", mesh.NbEdges()
-print "Triangles : ", mesh.NbTriangles()
+print "Nodes : ", mesh.NbNodes()
+print "Edges : ", mesh.NbEdges()
+print "Quadrangles : ", mesh.NbQuadrangles()
# With the duplication of border elements
# Edges to duplicate
edges = mesh.CreateEmptyGroup( smesh.EDGE, 'edges' )
-edges.Add( [ 29, 30, 31 ] )
+edges.Add( [ 32, 33, 34 ] )
# Nodes not to duplicate
nodes2 = mesh.CreateEmptyGroup( smesh.NODE, 'nodes2' )
-nodes2.Add( [ 32, 5 ] )
+nodes2.Add( [ 35, 38 ] )
# Group of faces to replace nodes with new ones
faces2 = mesh.CreateEmptyGroup( smesh.FACE, 'faces2' )
-faces2.Add( [ 576, 578, 580 ] )
+faces2.Add( [ 141, 148, 155 ] )
# Duplicate nodes
print "\nMesh before the second nodes duplication:"
-print "Nodes : ", mesh.NbNodes()
-print "Edges : ", mesh.NbEdges()
-print "Triangles : ", mesh.NbTriangles()
+print "Nodes : ", mesh.NbNodes()
+print "Edges : ", mesh.NbEdges()
+print "Quadrangles : ", mesh.NbQuadrangles()
groupOfNewEdges = mesh.DoubleNodeElemGroup( edges, nodes2, faces2, theMakeGroup=True )
print "New edges:", groupOfNewEdges.GetIDs()
print "\nMesh after the second nodes duplication:"
-print "Nodes : ", mesh.NbNodes()
-print "Edges : ", mesh.NbEdges()
-print "Triangles : ", mesh.NbTriangles()
+print "Nodes : ", mesh.NbNodes()
+print "Edges : ", mesh.NbEdges()
+print "Quadrangles : ", mesh.NbQuadrangles()
# Update object browser
if salome.sg.hasDesktop():
diff --git a/doc/salome/examples/viewing_meshes_ex02.py b/doc/salome/examples/viewing_meshes_ex02.py
index de345e8a3..cd096ca76 100644
--- a/doc/salome/examples/viewing_meshes_ex02.py
+++ b/doc/salome/examples/viewing_meshes_ex02.py
@@ -8,7 +8,7 @@ import SMESH
box = geompy.MakeBoxDXDYDZ(100,100,100)
# Create a mesh
-mesh = Mesh(box,"Mesh")
+mesh = smesh.Mesh(box,"Mesh")
mesh.AutomaticHexahedralization()
mesh.Compute()
diff --git a/doc/salome/gui/SMESH/doxyfile.in b/doc/salome/gui/SMESH/doxyfile.in
index a6a5fc1f1..6b27a0c76 100755
--- a/doc/salome/gui/SMESH/doxyfile.in
+++ b/doc/salome/gui/SMESH/doxyfile.in
@@ -42,7 +42,7 @@ INPUT = @srcdir@/input @top_srcdir@/src/Tools/padder/doc/input
FILE_PATTERNS = *.doc
EXCLUDE =
IMAGE_PATH = @srcdir@/images @top_srcdir@/src/Tools/padder/doc/images
-EXAMPLE_PATH = @top_srcdir@/src/SMESH_SWIG @top_srcdir@/doc/salome/examples
+EXAMPLE_PATH = @top_srcdir@/doc/salome/examples @top_srcdir@/src/SMESH_SWIG
#---------------------------------------------------------------------------
#HTML related options
@@ -80,3 +80,8 @@ GENERATE_RTF = NO
TAGFILES = smeshpy_doc.tag=../SMESH/smeshpy_doc #rnv: 07.04.2011 Workaround for the doxygen 1.7.3:
#because it wrongly defines location of the html files for search.
SEARCHENGINE = YES
+
+#---------------------------------------------------------------------------
+#Custom commands
+#---------------------------------------------------------------------------
+ALIASES += tui_script{1}="\include \1 Download this script"
diff --git a/doc/salome/gui/SMESH/input/smeshpy_interface.doc b/doc/salome/gui/SMESH/input/smeshpy_interface.doc
index 699e5c981..72d4585e1 100644
--- a/doc/salome/gui/SMESH/input/smeshpy_interface.doc
+++ b/doc/salome/gui/SMESH/input/smeshpy_interface.doc
@@ -36,8 +36,7 @@ An example below demonstrates usage of the Python API for 3d mesh generation.
\anchor example_3d_mesh
Example of 3d mesh generation:
-\include 3dmesh.py
-Download this script
+\tui_script{3dmesh.py}
Examples of Python scripts for Mesh operations are available by
the following links:
diff --git a/doc/salome/gui/SMESH/input/tui_cartesian_algo.doc b/doc/salome/gui/SMESH/input/tui_cartesian_algo.doc
index 4cc1ec654..dccf68a5f 100644
--- a/doc/salome/gui/SMESH/input/tui_cartesian_algo.doc
+++ b/doc/salome/gui/SMESH/input/tui_cartesian_algo.doc
@@ -1,7 +1,6 @@
/*!
\page tui_cartesian_algo Usage of Body Fitting algorithm
-\include cartesian_algo.py
-Download this script
+\tui_script{cartesian_algo.py}
*/
diff --git a/doc/salome/gui/SMESH/input/tui_creating_meshes.doc b/doc/salome/gui/SMESH/input/tui_creating_meshes.doc
index bdeeb8a7a..d7edad332 100644
--- a/doc/salome/gui/SMESH/input/tui_creating_meshes.doc
+++ b/doc/salome/gui/SMESH/input/tui_creating_meshes.doc
@@ -7,52 +7,44 @@
Construction of a Mesh
-\include creating_meshes_ex01.py
-Download this script
+\tui_script{creating_meshes_ex01.py}
\anchor tui_construction_submesh
Construction of a Submesh
-\include creating_meshes_ex02.py
-Download this script
+\tui_script{creating_meshes_ex02.py}
Change priority of submeshes in Mesh
-\include creating_meshes_ex03.py
-Download this script
+\tui_script{creating_meshes_ex03.py}
\anchor tui_editing_mesh
Editing of a mesh
-\include creating_meshes_ex04.py
-Download this script
+\tui_script{creating_meshes_ex04.py}
\anchor tui_export_mesh
Export of a Mesh
-\include creating_meshes_ex05.py
-Download this script
+\tui_script{creating_meshes_ex05.py}
How to mesh a cylinder with hexahedrons?
Here you can see an example of python script, creating a hexahedral
mesh on a cylinder. And a picture below the source code of the script,
demonstrating the resulting mesh.
-\include creating_meshes_ex06.py
-Download this script
+\tui_script{creating_meshes_ex06.py}
\image html mesh_cylinder_hexa.png
\anchor tui_building_compound
Building a compound of meshes
-\include creating_meshes_ex07.py
-Download this script
+\tui_script{creating_meshes_ex07.py}
\anchor tui_copy_mesh
Mesh Copying
-\include creating_meshes_ex08.py
-Download this script
+\tui_script{creating_meshes_ex08.py}
*/
diff --git a/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc b/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc
index 3f3124db3..71abf33b6 100644
--- a/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc
+++ b/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc
@@ -44,102 +44,84 @@ This page provides example codes of \ref tui_defining_meshing_algos
\anchor tui_1d_arithmetic
Arithmetic 1D
-\include defining_hypotheses_ex01.py
-Download this script
+\tui_script{defining_hypotheses_ex01.py}
\anchor tui_deflection_1d
Deflection 1D and Number of Segments
-\include defining_hypotheses_ex02.py
-Download this script
+\tui_script{defining_hypotheses_ex02.py}
\anchor tui_start_and_end_length
Start and End Length
-\include defining_hypotheses_ex03.py
-Download this script
+\tui_script{defining_hypotheses_ex03.py}
\anchor tui_average_length
Local Length
-\include defining_hypotheses_ex04.py
-Download this script
+\tui_script{defining_hypotheses_ex04.py}
Defining 2D and 3D hypotheses
\anchor tui_max_element_area
Maximum Element Area
-\include defining_hypotheses_ex05.py
-Download this script
+\tui_script{defining_hypotheses_ex05.py}
\anchor tui_max_element_volume
Maximum Element Volume
-\include defining_hypotheses_ex06.py
-Download this script
+\tui_script{defining_hypotheses_ex06.py}
\anchor tui_length_from_edges
Length from Edges
-\include defining_hypotheses_ex07.py
-Download this script
+\tui_script{defining_hypotheses_ex07.py}
Defining Additional Hypotheses
\anchor tui_propagation
Propagation
-\include defining_hypotheses_ex08.py
-Download this script
+\tui_script{defining_hypotheses_ex08.py}
\anchor tui_defining_meshing_algos
Defining Meshing Algorithms
-\include defining_hypotheses_ex09.py
-Download this script
+\tui_script{defining_hypotheses_ex09.py}
\anchor tui_projection
Projection Algorithms
-\include defining_hypotheses_ex10.py
-Download this script
+\tui_script{defining_hypotheses_ex10.py}
Projection 1D2D
-\include defining_hypotheses_ex11.py
-Download this script
+\tui_script{defining_hypotheses_ex11.py}
\anchor tui_fixed_points
1D Mesh with Fixed Points example
-\include defining_hypotheses_ex12.py
-Download this script
+\tui_script{defining_hypotheses_ex12.py}
\anchor tui_radial_quadrangle
Radial Quadrangle 1D2D example
-\include defining_hypotheses_ex13.py
-Download this script
+\tui_script{defining_hypotheses_ex13.py}
\anchor tui_quadrangle_parameters
Quadrangle Parameters example 1 (meshing a face with 3 edges)
-\include defining_hypotheses_ex14.py
-Download this script
+\tui_script{defining_hypotheses_ex14.py}
Quadrangle Parameters example 2 (using different types)
-\include defining_hypotheses_ex15.py
-Download this script
+\tui_script{defining_hypotheses_ex15.py}
\anchor tui_import
"Use Existing Elements" example
-\include defining_hypotheses_ex16.py
-Download this script
+\tui_script{defining_hypotheses_ex16.py}
\anchor tui_viscous_layers
Viscous layers construction
-
-\include defining_hypotheses_ex17.py
-Download this script
+\tui_script{defining_hypotheses_ex17.py}
*/
diff --git a/doc/salome/gui/SMESH/input/tui_filters.doc b/doc/salome/gui/SMESH/input/tui_filters.doc
index 2540f52b8..eaf5d2803 100755
--- a/doc/salome/gui/SMESH/input/tui_filters.doc
+++ b/doc/salome/gui/SMESH/input/tui_filters.doc
@@ -27,8 +27,7 @@ Filter 2D mesh elements (faces) according to the aspect ratio value:
- functor type should be \a smesh.FT_AspectRatio
- threshold is floating point value (aspect ratio)
-\include filters_ex01.py
-Download this script
+\tui_script{filters_ex01.py}
\sa \ref tui_aspect_ratio
@@ -39,8 +38,7 @@ Filter 3D mesh elements (volumes) according to the aspect ratio value:
- functor type is \a smesh.FT_AspectRatio3D
- threshold is floating point value (aspect ratio)
-\include filters_ex02.py
-Download this script
+\tui_script{filters_ex02.py}
\sa \ref tui_aspect_ratio_3d
@@ -51,8 +49,7 @@ Filter 2D mesh elements (faces) according to the warping angle value:
- functor type is \a smesh.FT_Warping
- threshold is floating point value (warping angle)
-\include filters_ex03.py
-Download this script
+\tui_script{filters_ex03.py}
\sa \ref tui_warping
@@ -63,8 +60,7 @@ Filter 2D mesh elements (faces) according to the minimum angle value:
- functor type is \a smesh.FT_MinimumAngle
- threshold is floating point value (minimum angle)
-\include filters_ex04.py
-Download this script
+\tui_script{filters_ex04.py}
\sa \ref tui_minimum_angle
@@ -75,8 +71,7 @@ Filter 2D mesh elements (faces) according to the taper value:
- functor type is \a smesh.FT_Taper
- threshold is floating point value (taper)
-\include filters_ex05.py
-Download this script
+\tui_script{filters_ex05.py}
\sa \ref tui_taper
@@ -87,8 +82,7 @@ Filter 2D mesh elements (faces) according to the skew value:
- functor type is \a smesh.FT_Skew
- threshold is floating point value (skew)
-\include filters_ex06.py
-Download this script
+\tui_script{filters_ex06.py}
\sa \ref tui_skew
@@ -99,8 +93,7 @@ Filter 2D mesh elements (faces) according to the area value:
- functor type is \a smesh.FT_Area
- threshold is floating point value (area)
-\include filters_ex07.py
-Download this script
+\tui_script{filters_ex07.py}
\sa \ref tui_area
@@ -111,8 +104,7 @@ Filter 3D mesh elements (volumes) according to the volume value:
- functor type is \a smesh.FT_Volume3D
- threshold is floating point value (volume)
-\include filters_ex08.py
-Download this script
+\tui_script{filters_ex08.py}
\sa \ref tui_volume
@@ -123,8 +115,7 @@ Filter 1D mesh elements (edges) which represent free borders of a mesh:
- functor type is \a smesh.FT_FreeBorders
- threshold value is not required
-\include filters_ex09.py
-Download this script
+\tui_script{filters_ex09.py}
\sa \ref tui_free_borders
@@ -136,8 +127,7 @@ element of mesh only:
- functor type is \a smesh.FT_FreeEdges
- threshold value is not required
-\include filters_ex10.py
-Download this script
+\tui_script{filters_ex10.py}
\sa \ref tui_free_edges
@@ -148,8 +138,7 @@ Filter free nodes:
- functor type is \a smesh.FT_FreeNodes
- threshold value is not required
-\include filters_ex11.py
-Download this script
+\tui_script{filters_ex11.py}
\sa \ref tui_free_nodes
@@ -160,8 +149,7 @@ Filter free faces:
- functor type is \a smesh.FT_FreeFaces
- threshold value is not required
-\include filters_ex12.py
-Download this script
+\tui_script{filters_ex12.py}
\sa \ref tui_free_faces
@@ -172,8 +160,7 @@ Filter faces with bare borders:
- functor type is \a smesh.FT_BareBorderFace
- threshold value is not required
-\include filters_ex13.py
-Download this script
+\tui_script{filters_ex13.py}
\sa \ref tui_bare_border_faces
@@ -185,8 +172,7 @@ Filter faces with bare borders:
- threshold value is the face ID
- tolerance is in degrees
-\include filters_ex14.py
-Download this script
+\tui_script{filters_ex14.py}
\section filter_over_constrained_faces Over-constrained faces
@@ -195,8 +181,7 @@ Filter over-constrained faces:
- functor type is \a smesh.FT_OverConstrainedFace
- threshold value is not required
-\include filters_ex15.py
-Download this script
+\tui_script{filters_ex15.py}
\sa \ref tui_over_constrained_faces
@@ -208,8 +193,7 @@ filter mesh elements basing on the same set of nodes:
smesh.FT_EqualFaces or \a smesh.FT_EqualVolumes,
- threshold value is not required
-\include filters_ex16.py
-Download this script
+\tui_script{filters_ex16.py}
\section tui_double_nodes_control Double nodes
@@ -220,8 +204,7 @@ filters mesh nodes which are coincident with other nodes (within a given toleran
- threshold value is not required
- default tolerance is 1.0e-7
-\include filters_ex17.py
-Download this script
+\tui_script{filters_ex17.py}
\section filter_borders_multiconnection Borders at multi-connection
@@ -232,8 +215,7 @@ connections (faces belonging the border edges)
- functor type is \a smesh.FT_MultiConnection
- threshold is integer value (number of connections)
-\include filters_ex18.py
-Download this script
+\tui_script{filters_ex18.py}
\sa \ref tui_borders_at_multiconnection
@@ -245,8 +227,7 @@ to the specified number of mesh elements
- functor type is \a smesh.FT_MultiConnection2D
- threshold is integer value (number of connections)
-\include filters_ex19.py
-Download this script
+\tui_script{filters_ex19.py}
\sa \ref tui_borders_at_multiconnection_2d
@@ -257,8 +238,7 @@ Filter 1D mesh elements (edges) according to the edge length value:
- functor type should be \a smesh.FT_Length
- threshold is floating point value (length)
-\include filters_ex20.py
-Download this script
+\tui_script{filters_ex20.py}
\sa \ref tui_length_1d
@@ -270,8 +250,7 @@ value of its edges:
- functor type should be \a smesh.FT_Length2D
- threshold is floating point value (edge length)
-\include filters_ex21.py
-Download this script
+\tui_script{filters_ex21.py}
\sa \ref tui_length_2d
@@ -283,8 +262,7 @@ value of its edges and diagonals:
- functor type should be \a smesh.FT_MaxElementLength2D
- threshold is floating point value (edge/diagonal length)
-\include filters_ex22.py
-Download this script
+\tui_script{filters_ex22.py}
\sa \ref tui_max_element_length_2d
@@ -296,8 +274,7 @@ value of its edges and diagonals:
- functor type should be \a smesh.FT_MaxElementLength3D
- threshold is floating point value (edge/diagonal length)
-\include filters_ex23.py
-Download this script
+\tui_script{filters_ex23.py}
\sa \ref tui_max_element_length_3d
@@ -308,8 +285,7 @@ Filter 3D mesh elements with bare borders:
- functor type is \a smesh.FT_BareBorderVolume
- threshold value is not required
-\include filters_ex24.py
-Download this script
+\tui_script{filters_ex24.py}
\sa \ref tui_bare_border_volumes
@@ -320,8 +296,7 @@ Filter over-constrained volumes:
- functor type is \a smesh.FT_OverConstrainedVolume
- threshold value is not required
-\include filters_ex25.py
-Download this script
+\tui_script{filters_ex25.py}
\sa \ref tui_over_constrained_faces
@@ -333,8 +308,7 @@ shape defined by threshold value:
- functor type should be \a smesh.FT_BelongToGeom
- threshold is geometrical object
-\include filters_ex26.py
-Download this script
+\tui_script{filters_ex26.py}
\section filter_lying_on_geom Lying on Geom
@@ -344,8 +318,7 @@ shape defined by threshold value:
- functor type should be \a smesh.FT_LyingOnGeom
- threshold is geometrical object
-\include filters_ex27.py
-Download this script
+\tui_script{filters_ex27.py}
\section filter_belong_to_plane Belong to Plane
@@ -356,8 +329,7 @@ plane defined by threshold value with the given tolerance:
- threshold is geometrical object (plane)
- default tolerance is 1.0e-7
-\include filters_ex28.py
-Download this script
+\tui_script{filters_ex28.py}
\section filter_belong_to_cylinder Belong to Cylinder
@@ -368,8 +340,7 @@ cylindrical face defined by threshold value with the given tolerance:
- threshold is geometrical object (cylindrical face)
- default tolerance is 1.0e-7
-\include filters_ex29.py
-Download this script
+\tui_script{filters_ex29.py}
\section filter_belong_to_surface Belong to Surface
@@ -380,8 +351,7 @@ arbitrary surface defined by threshold value with the given tolerance:
- threshold is geometrical object (arbitrary surface)
- default tolerance is 1.0e-7
-\include filters_ex30.py
-Download this script
+\tui_script{filters_ex30.py}
\section filter_range_of_ids Range of IDs
@@ -391,8 +361,7 @@ specified identifiers range:
- functor type is \a smesh.FT_RangeOfIds
- threshold is string listing required IDs and/or ranges of IDs, e.g."1,2,3,50-60,63,67,70-78"
-\include filters_ex31.py
-Download this script
+\tui_script{filters_ex31.py}
\section filter_bad_oriented_volume Badly oriented volume
@@ -402,8 +371,7 @@ the point of view of MED convention.
- functor type is \a smesh.FT_BadOrientedVolume
- threshold is not required
-\include filters_ex32.py
-Download this script
+\tui_script{filters_ex32.py}
\section filter_linear_or_quadratic Linear / quadratic
@@ -414,8 +382,7 @@ Filter linear / quadratic mesh elements:
- if unary operator is set to smesh.FT_LogicalNOT, the quadratic
elements are selected, otherwise (by default) linear elements are selected
-\include filters_ex33.py
-Download this script
+\tui_script{filters_ex33.py}
\section filter_group_color Group color
@@ -424,8 +391,7 @@ Filter mesh entities, belonging to the group with the color defined by the thres
- functor type is \a smesh.FT_GroupColor
- threshold should be of SALOMEDS.Color type
-\include filters_ex34.py
-Download this script
+\tui_script{filters_ex34.py}
\section filter_geom_type Geometry type
@@ -436,8 +402,7 @@ entity type.
- functor type should be \a smesh.FT_ElemGeomType
- threshold is of smesh.GeometryType value
-\include filters_ex35.py
-Download this script
+\tui_script{filters_ex35.py}
\section combining_filters How to combine filters with Criterion structures?
@@ -445,8 +410,7 @@ Filters can be combined by making use of "criteria".
Example :
-\include filters_ex36.py
-Download this script
+\tui_script{filters_ex36.py}
*/
diff --git a/doc/salome/gui/SMESH/input/tui_generate_flat_elements.doc b/doc/salome/gui/SMESH/input/tui_generate_flat_elements.doc
index 36e13d304..7284a76b5 100644
--- a/doc/salome/gui/SMESH/input/tui_generate_flat_elements.doc
+++ b/doc/salome/gui/SMESH/input/tui_generate_flat_elements.doc
@@ -17,8 +17,7 @@ by flat elements.
\n This example represents an iron cable (a thin cylinder) in a concrete bloc (a big cylinder).
The big cylinder is defined by two geometric volumes.
-\include generate_flat_elements.py
-Download this script
+\tui_script{generate_flat_elements.py}
\n Here, the 4 groups of volumes [Solid_1_1, Solid_2_1, Solid_3_1, Solid_4_1] constitute a partition of the mesh.
The flat elements on group boundaries and on faces are built with the
diff --git a/doc/salome/gui/SMESH/input/tui_grouping_elements.doc b/doc/salome/gui/SMESH/input/tui_grouping_elements.doc
index d3113ab2c..a264f2542 100644
--- a/doc/salome/gui/SMESH/input/tui_grouping_elements.doc
+++ b/doc/salome/gui/SMESH/input/tui_grouping_elements.doc
@@ -5,29 +5,25 @@
\anchor tui_create_standalone_group
Create a Standalone Group
-\include grouping_elements_ex01.py
-Download this script
+\tui_script{grouping_elements_ex01.py}
\image html create_group.png
\anchor tui_create_group_on_geometry
Create a Group on Geometry
-\include grouping_elements_ex02.py
-Download this script
+\tui_script{grouping_elements_ex02.py}
\anchor tui_create_group_on_filter
Create a Group on Filter
-\include grouping_elements_ex03.py
-Download this script
+\tui_script{grouping_elements_ex03.py}
\anchor tui_edit_group
Edit a Group
-\include grouping_elements_ex04.py
-Download this script
+\tui_script{grouping_elements_ex04.py}
\image html editing_groups1.png
@@ -36,8 +32,7 @@
\anchor tui_union_of_groups
Union of groups
-\include grouping_elements_ex05.py
-Download this script
+\tui_script{grouping_elements_ex05.py}
\image html union_groups1.png
@@ -48,8 +43,7 @@
\anchor tui_intersection_of_groups
Intersection of groups
-\include grouping_elements_ex06.py
-Download this script
+\tui_script{grouping_elements_ex06.py}
\image html intersect_groups1.png
@@ -60,8 +54,7 @@
\anchor tui_cut_of_groups
Cut of groups
-\include grouping_elements_ex07.py
-Download this script
+\tui_script{grouping_elements_ex07.py}
\image html cut_groups1.png
@@ -72,8 +65,7 @@
\anchor tui_create_dim_group
Creating groups of entities from existing groups of superior dimensions
-\include grouping_elements_ex08.py
-Download this script
+\tui_script{grouping_elements_ex08.py}
\image html dimgroup_tui1.png
Source groups of faces
diff --git a/doc/salome/gui/SMESH/input/tui_measurements.doc b/doc/salome/gui/SMESH/input/tui_measurements.doc
index 8ca283fc3..4d25c7358 100644
--- a/doc/salome/gui/SMESH/input/tui_measurements.doc
+++ b/doc/salome/gui/SMESH/input/tui_measurements.doc
@@ -3,11 +3,9 @@
\page tui_measurements_page Measurements
\section tui_min_distance Minimum Distance
-\include measurements_ex01.py
-Download this script
+\tui_script{measurements_ex01.py}
\section tui_bounding_box Bounding Box
-\include measurements_ex02.py
-Download this script
+\tui_script{measurements_ex02.py}
*/
diff --git a/doc/salome/gui/SMESH/input/tui_modifying_meshes.doc b/doc/salome/gui/SMESH/input/tui_modifying_meshes.doc
index e7844327c..7ceb5ebf7 100644
--- a/doc/salome/gui/SMESH/input/tui_modifying_meshes.doc
+++ b/doc/salome/gui/SMESH/input/tui_modifying_meshes.doc
@@ -9,62 +9,52 @@
\anchor tui_add_node
Add Node
-\include modifying_meshes_ex01.py
-Download this script
+\tui_script{modifying_meshes_ex01.py}
\anchor tui_add_0DElement
Add 0D Element
-\include modifying_meshes_ex02.py
-Download this script
+\tui_script{modifying_meshes_ex02.py}
\anchor tui_add_0DElement_on_all_nodes
Add 0D Element on Element Nodes
-\include modifying_meshes_ex03.py
-Download this script
+\tui_script{modifying_meshes_ex03.py}
\anchor tui_add_edge
Add Edge
-\include modifying_meshes_ex04.py
-Download this script
+\tui_script{modifying_meshes_ex04.py}
\anchor tui_add_triangle
Add Triangle
-\include modifying_meshes_ex05.py
-Download this script
+\tui_script{modifying_meshes_ex05.py}
\anchor tui_add_quadrangle
Add Quadrangle
-\include modifying_meshes_ex06.py
-Download this script
+\tui_script{modifying_meshes_ex06.py}
\anchor tui_add_tetrahedron
Add Tetrahedron
-\include modifying_meshes_ex07.py
-Download this script
+\tui_script{modifying_meshes_ex07.py}
\anchor tui_add_hexahedron
Add Hexahedron
-\include modifying_meshes_ex08.py
-Download this script
+\tui_script{modifying_meshes_ex08.py}
\anchor tui_add_polygon
Add Polygon
-\include modifying_meshes_ex09.py
-Download this script
+\tui_script{modifying_meshes_ex09.py}
\anchor tui_add_polyhedron
Add Polyhedron
-\include modifying_meshes_ex10.py
-Download this script
+\tui_script{modifying_meshes_ex10.py}
\anchor tui_removing_nodes_and_elements
@@ -73,97 +63,81 @@
\anchor tui_removing_nodes
Removing Nodes
-\include modifying_meshes_ex11.py
-Download this script
+\tui_script{modifying_meshes_ex11.py}
\anchor tui_removing_elements
Removing Elements
-\include modifying_meshes_ex12.py
-Download this script
+\tui_script{modifying_meshes_ex12.py}
\anchor tui_removing_orphan_nodes
Removing Orphan Nodes
-\include modifying_meshes_ex13.py
-Download this script
+\tui_script{modifying_meshes_ex13.py}
\anchor tui_renumbering_nodes_and_elements
Renumbering Nodes and Elements
-\include modifying_meshes_ex14.py
-Download this script
+\tui_script{modifying_meshes_ex14.py}
\anchor tui_moving_nodes
Moving Nodes
-\include modifying_meshes_ex15.py
-Download this script
+\tui_script{modifying_meshes_ex15.py}
\anchor tui_diagonal_inversion
Diagonal Inversion
-\include modifying_meshes_ex16.py
-Download this script
+\tui_script{modifying_meshes_ex16.py}
\anchor tui_uniting_two_triangles
Uniting two Triangles
-\include modifying_meshes_ex17.py
-Download this script
+\tui_script{modifying_meshes_ex17.py}
\anchor tui_uniting_set_of_triangles
Uniting a Set of Triangles
-\include modifying_meshes_ex18.py
-Download this script
+\tui_script{modifying_meshes_ex18.py}
\anchor tui_orientation
Orientation
-\include modifying_meshes_ex19.py
-Download this script
+\tui_script{modifying_meshes_ex19.py}
\anchor tui_cutting_quadrangles
Cutting Quadrangles
-\include modifying_meshes_ex20.py
-Download this script
+\tui_script{modifying_meshes_ex20.py}
\anchor tui_smoothing
Smoothing
-\include modifying_meshes_ex21.py
-Download this script
+\tui_script{modifying_meshes_ex21.py}
\anchor tui_extrusion
Extrusion
-\include modifying_meshes_ex22.py
-Download this script
+\tui_script{modifying_meshes_ex22.py}
\anchor tui_extrusion_along_path
Extrusion along a Path
-\include modifying_meshes_ex23.py
-Download this script
+\tui_script{modifying_meshes_ex23.py}
\anchor tui_revolution
Revolution
-\include modifying_meshes_ex24.py
-Download this script
+\tui_script{modifying_meshes_ex24.py}
\anchor tui_pattern_mapping
Pattern Mapping
-\include modifying_meshes_ex25.py
-Download this script
+\tui_script{modifying_meshes_ex25.py}
\anchor tui_quadratic
Convert mesh to/from quadratic
-\include modifying_meshes_ex26.py
-Download this script
+\tui_script{modifying_meshes_ex26.py}
*/
diff --git a/doc/salome/gui/SMESH/input/tui_notebook_smesh.doc b/doc/salome/gui/SMESH/input/tui_notebook_smesh.doc
index 340359069..7f34deca9 100644
--- a/doc/salome/gui/SMESH/input/tui_notebook_smesh.doc
+++ b/doc/salome/gui/SMESH/input/tui_notebook_smesh.doc
@@ -3,7 +3,6 @@
\page tui_notebook_smesh_page Using SALOME NoteBook
\anchor tui_notebook_smesh
-\include notebook_smesh.py
-Download this script
+\tui_script{notebook_smesh.py}
*/
diff --git a/doc/salome/gui/SMESH/input/tui_prism_3d_algo.doc b/doc/salome/gui/SMESH/input/tui_prism_3d_algo.doc
index d0234a7ab..6ba5e25d3 100644
--- a/doc/salome/gui/SMESH/input/tui_prism_3d_algo.doc
+++ b/doc/salome/gui/SMESH/input/tui_prism_3d_algo.doc
@@ -1,8 +1,7 @@
/*!
\page tui_prism_3d_algo Use 3D extrusion meshing algorithm
-\include prism_3d_algo.py
-Download this script
+\tui_script{prism_3d_algo.py}
The result geometry and mesh is shown below
\image html prism_tui_sample.png
diff --git a/doc/salome/gui/SMESH/input/tui_quality_controls.doc b/doc/salome/gui/SMESH/input/tui_quality_controls.doc
index e09389d3f..be849962c 100644
--- a/doc/salome/gui/SMESH/input/tui_quality_controls.doc
+++ b/doc/salome/gui/SMESH/input/tui_quality_controls.doc
@@ -3,91 +3,69 @@
\page tui_quality_controls_page Quality Controls
\section tui_free_borders Free Borders
-\include quality_controls_ex01.py
-Download this script
+\tui_script{quality_controls_ex01.py}
\section tui_borders_at_multiconnection Borders at Multiconnection
-\include quality_controls_ex02.py
-Download this script
+\tui_script{quality_controls_ex02.py}
\section tui_length_1d Length 1D
-\include quality_controls_ex03.py
-Download this script
+\tui_script{quality_controls_ex03.py}
\section tui_free_edges Free Edges
-\include quality_controls_ex04.py
-Download this script
+\tui_script{quality_controls_ex04.py}
\section tui_free_nodes Free Nodes
-\include quality_controls_ex05.py
-Download this script
+\tui_script{quality_controls_ex05.py}
\section tui_free_faces Free Faces
-\include quality_controls_ex06.py
-Download this script
+\tui_script{quality_controls_ex06.py}
\section tui_bare_border_faces Bare border faces
-\include quality_controls_ex07.py
-Download this script
+\tui_script{quality_controls_ex07.py}
\section tui_bare_border_volumes Bare border volumes
-\include quality_controls_ex08.py
-Download this script
+\tui_script{quality_controls_ex08.py}
\section tui_over_constrained_faces Over-constrained faces
-\include quality_controls_ex09.py
-Download this script
+\tui_script{quality_controls_ex09.py}
\section tui_over_constrained_volumes Over-constrained volumes
-\include quality_controls_ex10.py
-Download this script
+\tui_script{quality_controls_ex10.py}
\section tui_length_2d Length 2D
-\include quality_controls_ex11.py
-Download this script
+\tui_script{quality_controls_ex11.py}
\section tui_borders_at_multiconnection_2d Borders at Multiconnection 2D
-\include quality_controls_ex12.py
-Download this script
+\tui_script{quality_controls_ex12.py}
\section tui_area Area
-\include quality_controls_ex13.py
-Download this script
+\tui_script{quality_controls_ex13.py}
\section tui_taper Taper
-\include quality_controls_ex14.py
-Download this script
+\tui_script{quality_controls_ex14.py}
\section tui_aspect_ratio Aspect Ratio
-\include quality_controls_ex15.py
-Download this script
+\tui_script{quality_controls_ex15.py}
\section tui_minimum_angle Minimum Angle
-\include quality_controls_ex16.py
-Download this script
+\tui_script{quality_controls_ex16.py}
\section tui_warping Warping
-\include quality_controls_ex17.py
-Download this script
+\tui_script{quality_controls_ex17.py}
\section tui_skew Skew
-\include quality_controls_ex18.py
-Download this script
+\tui_script{quality_controls_ex18.py}
\section tui_max_element_length_2d Element Diameter 2D
-\include quality_controls_ex19.py
-Download this script
+\tui_script{quality_controls_ex19.py}
\section tui_aspect_ratio_3d Aspect Ratio 3D
-\include quality_controls_ex20.py
-Download this script
+\tui_script{quality_controls_ex20.py}
\section tui_volume Volume
-\include quality_controls_ex21.py
-Download this script
+\tui_script{quality_controls_ex21.py}
\section tui_max_element_length_3d Element Diameter 3D
-\include quality_controls_ex22.py
-Download this script
+\tui_script{quality_controls_ex22.py}
*/
diff --git a/doc/salome/gui/SMESH/input/tui_transforming_meshes.doc b/doc/salome/gui/SMESH/input/tui_transforming_meshes.doc
index 3b77fab34..303b7cec4 100644
--- a/doc/salome/gui/SMESH/input/tui_transforming_meshes.doc
+++ b/doc/salome/gui/SMESH/input/tui_transforming_meshes.doc
@@ -7,81 +7,68 @@
\anchor tui_translation
Translation
-\include transforming_meshes_ex01.py
-Download this script
+\tui_script{transforming_meshes_ex01.py}
\anchor tui_rotation
Rotation
-\include transforming_meshes_ex02.py
-Download this script
+\tui_script{transforming_meshes_ex02.py}
\anchor tui_scale
Scale
-\include transforming_meshes_ex03.py
-Download this script
+\tui_script{transforming_meshes_ex03.py}
\anchor tui_symmetry
Symmetry
-\include transforming_meshes_ex04.py
-Download this script
+\tui_script{transforming_meshes_ex04.py}
\anchor tui_merging_nodes
Merging Nodes
-\include transforming_meshes_ex05.py
-Download this script
+\tui_script{transforming_meshes_ex05.py}
\anchor tui_merging_elements
Merging Elements
-\include transforming_meshes_ex06.py
-Download this script
+\tui_script{transforming_meshes_ex06.py}
Sewing Meshes
\anchor tui_sew_meshes_border_to_side
Sew Meshes Border to Side
-\include transforming_meshes_ex07.py
-Download this script
+\tui_script{transforming_meshes_ex07.py}
\anchor tui_sew_conform_free_borders
Sew Conform Free Borders
-\include transforming_meshes_ex08.py
-Download this script
+\tui_script{transforming_meshes_ex08.py}
\anchor tui_sew_free_borders
Sew Free Borders
-\include transforming_meshes_ex09.py
-Download this script
+\tui_script{transforming_meshes_ex09.py}
\anchor tui_sew_side_elements
Sew Side Elements
-\include transforming_meshes_ex10.py
-Download this script
+\tui_script{transforming_meshes_ex10.py}
\anchor tui_duplicate_nodes
Duplicate nodes
-\include transforming_meshes_ex11.py
-Download this script
+\tui_script{transforming_meshes_ex11.py}
\anchor tui_make_2dmesh_from_3d
Create boundary elements
-\include transforming_meshes_ex12.py
-Download this script
+\tui_script{transforming_meshes_ex12.py}
\anchor tui_reorient_faces
Reorient faces by vector
-\include transforming_meshes_ex13.py
-Download this script
+\tui_script{transforming_meshes_ex13.py}
*/
diff --git a/doc/salome/gui/SMESH/input/tui_use_existing_faces.doc b/doc/salome/gui/SMESH/input/tui_use_existing_faces.doc
index 46dfe1e05..ddc56cb83 100644
--- a/doc/salome/gui/SMESH/input/tui_use_existing_faces.doc
+++ b/doc/salome/gui/SMESH/input/tui_use_existing_faces.doc
@@ -6,8 +6,7 @@ This sample demonstrates how to use Use existing faces algorithm,
which is actulally just a stub allowing to use your own 2D algoritm
implemented in Python.
-\include use_existing_faces.py
-Download this script
+\tui_script{use_existing_faces.py}
Resulting mesh:
\image html use_existing_face_sample_mesh.png
diff --git a/doc/salome/gui/SMESH/input/tui_viewing_meshes.doc b/doc/salome/gui/SMESH/input/tui_viewing_meshes.doc
index 06586ffea..2f3c4b404 100644
--- a/doc/salome/gui/SMESH/input/tui_viewing_meshes.doc
+++ b/doc/salome/gui/SMESH/input/tui_viewing_meshes.doc
@@ -5,13 +5,11 @@
\anchor tui_viewing_mesh_infos
Viewing Mesh Infos
-\include viewing_meshes_ex01.py
-Download this script
+\tui_script{viewing_meshes_ex01.py}
\anchor tui_find_element_by_point
Find Element by Point
-\include viewing_meshes_ex02.py
-Download this script
+\tui_script{viewing_meshes_ex02.py}
*/
diff --git a/src/DriverGMF/DriverGMF_Read.cxx b/src/DriverGMF/DriverGMF_Read.cxx
index 9cf599fee..e3fc5d76b 100644
--- a/src/DriverGMF/DriverGMF_Read.cxx
+++ b/src/DriverGMF/DriverGMF_Read.cxx
@@ -107,113 +107,214 @@ Driver_Mesh::Status DriverGMF_Read::Perform()
// Read elements
- int iN[28];
+ int iN[28]; // 28 - nb nodes in HEX27 (+ 1 for safety :)
+
+ /* Read extra vertices for quadratic edges */
+ std::vector quadNodesAtEdges;
+ int nbQuadEdges = 0;
+ if ( (nbQuadEdges = GmfStatKwd(meshID, GmfExtraVerticesAtEdges)) )
+ {
+ quadNodesAtEdges.reserve( nbQuadEdges );
+ GmfGotoKwd(meshID, GmfExtraVerticesAtEdges);
+ for ( int i = 1; i <= nbQuadEdges; ++i )
+ {
+ GmfGetLin(meshID, GmfExtraVerticesAtEdges, &iN[0], &iN[1], &iN[2]);
+ quadNodesAtEdges.push_back(iN[2]);
+ }
+ }
/* Read edges */
const int edgeIDShift = myMesh->GetMeshInfo().NbElements();
if ( int nbEdges = GmfStatKwd(meshID, GmfEdges))
{
+ const bool readQuadNodes = ( nbQuadEdges == nbEdges );
GmfGotoKwd(meshID, GmfEdges);
for ( int i = 1; i <= nbEdges; ++i )
{
GmfGetLin(meshID, GmfEdges, &iN[0], &iN[1], &ref);
- if ( !myMesh->AddEdgeWithID( iN[0], iN[1], edgeIDShift + i ))
- status = storeBadNodeIds( "GmfEdges",i, 2, iN[0], iN[1] );
+ if ( readQuadNodes )
+ {
+ const int midN = quadNodesAtEdges[i-1];
+ if ( !myMesh->AddEdgeWithID( iN[0], iN[1], midN, edgeIDShift + i ))
+ status = storeBadNodeIds( "GmfEdges + GmfExtraVerticesAtEdges",i, 3, iN[0],iN[1],midN);
+ }
+ else
+ {
+ if ( !myMesh->AddEdgeWithID( iN[0], iN[1], edgeIDShift + i ))
+ status = storeBadNodeIds( "GmfEdges",i, 2, iN[0], iN[1] );
+ }
}
}
- /* Read quadratic edges */
- const int edge2IDShift = myMesh->GetMeshInfo().NbElements();
- if ( int nbEdges = GmfStatKwd(meshID, GmfEdgesP2))
+ // the vector of extra vertices at edges won't be used anymore so it is cleared
+ quadNodesAtEdges.clear();
+
+ /* Read extra vertices for quadratic triangles */
+ std::vector< std::vector > quadNodesAtTriangles;
+ int nbQuadTria = 0;
+ if ( (nbQuadTria = GmfStatKwd(meshID, GmfExtraVerticesAtTriangles)) )
{
- GmfGotoKwd(meshID, GmfEdgesP2);
- for ( int i = 1; i <= nbEdges; ++i )
+ GmfGotoKwd(meshID, GmfExtraVerticesAtTriangles);
+ quadNodesAtTriangles.reserve( nbQuadTria );
+ std::vector nodes(4);
+ for ( int i = 1; i <= nbQuadTria; ++i )
{
- GmfGetLin(meshID, GmfEdgesP2, &iN[0], &iN[1], &iN[2], &ref);
- if ( !myMesh->AddEdgeWithID( iN[0], iN[1], iN[2], edge2IDShift + i ))
- status = storeBadNodeIds( "GmfEdgesP2",i, 3, iN[0], iN[1], iN[2] );
+ GmfGetLin(meshID, GmfExtraVerticesAtTriangles,
+ &iN[0], &iN[1], &iN[2], &iN[3], &iN[4],
+ &iN[5]); // iN[5] - preview TRIA7
+ nodes.clear();
+ nodes.push_back(iN[2]);
+ nodes.push_back(iN[3]);
+ nodes.push_back(iN[4]);
+ nodes.push_back(iN[5]);
+ nodes.resize( iN[1] );
+
+ quadNodesAtTriangles.push_back(nodes);
}
}
+
/* Read triangles */
const int triaIDShift = myMesh->GetMeshInfo().NbElements();
if ( int nbTria = GmfStatKwd(meshID, GmfTriangles))
{
+ const bool readQuadNodes = (nbQuadTria == nbTria);
GmfGotoKwd(meshID, GmfTriangles);
for ( int i = 1; i <= nbTria; ++i )
{
GmfGetLin(meshID, GmfTriangles, &iN[0], &iN[1], &iN[2], &ref);
- if ( !myMesh->AddFaceWithID( iN[0], iN[1], iN[2], triaIDShift + i ))
- status = storeBadNodeIds( "GmfTriangles",i, 3, iN[0], iN[1], iN[2] );
+ if ( readQuadNodes )
+ {
+ const std::vector& midN = quadNodesAtTriangles[ i-1 ];
+ if ( !myMesh->AddFaceWithID( iN[0],iN[1],iN[2], midN[0],midN[1],midN[2], triaIDShift + i ))
+ status = storeBadNodeIds( "GmfTriangles + GmfExtraVerticesAtTriangles",i, 6,
+ iN[0],iN[1],iN[2], midN[0],midN[1],midN[2] );
+ }
+ else
+ {
+ if ( !myMesh->AddFaceWithID( iN[0], iN[1], iN[2], triaIDShift + i ))
+ status = storeBadNodeIds( "GmfTriangles",i, 3, iN[0], iN[1], iN[2] );
+ }
}
}
- /* Read quadratic triangles */
- const int tria2IDShift = myMesh->GetMeshInfo().NbElements();
- if ( int nbTria = GmfStatKwd(meshID, GmfTrianglesP2))
+ // the vector of extra vertices at triangles won't be used anymore so it is cleared
+ quadNodesAtTriangles.clear();
+
+ /* Read extra vertices for quadratic quadrangles */
+ std::vector< std::vector > quadNodesAtQuadrilaterals;
+ int nbQuadQuad = 0;
+ if ( (nbQuadQuad = GmfStatKwd(meshID, GmfExtraVerticesAtQuadrilaterals)) )
{
- GmfGotoKwd(meshID, GmfTrianglesP2);
- for ( int i = 1; i <= nbTria; ++i )
+ GmfGotoKwd(meshID, GmfExtraVerticesAtQuadrilaterals);
+ quadNodesAtQuadrilaterals.reserve( nbQuadQuad );
+ std::vector nodes( 5 );
+ for ( int i = 1; i <= nbQuadQuad; ++i )
{
- GmfGetLin(meshID, GmfTrianglesP2,
- &iN[0], &iN[1], &iN[2], &iN[3], &iN[4], &iN[5], &ref);
- if ( !myMesh->AddFaceWithID( iN[0],iN[1],iN[2],iN[3],iN[4],iN[5],
- tria2IDShift + i ))
- status = storeBadNodeIds( "GmfTrianglesP2",i, 6, iN[0],iN[1],iN[2],iN[3],iN[4],iN[5] );
+ GmfGetLin(meshID, GmfExtraVerticesAtQuadrilaterals,
+ &iN[0], &iN[1], &iN[2], &iN[3], &iN[4], &iN[5], &iN[6]);
+ nodes.clear();
+ nodes.push_back(iN[2]);
+ nodes.push_back(iN[3]);
+ nodes.push_back(iN[4]);
+ nodes.push_back(iN[5]);
+ nodes.push_back(iN[6]);
+ nodes.resize( iN[1] );
+
+ quadNodesAtQuadrilaterals.push_back(nodes);
}
}
- /* Read quadrangles */
+
+ /* Read quadrangles */
const int quadIDShift = myMesh->GetMeshInfo().NbElements();
if ( int nbQuad = GmfStatKwd(meshID, GmfQuadrilaterals))
{
+ const bool readQuadNodes = (nbQuadQuad == nbQuad);
GmfGotoKwd(meshID, GmfQuadrilaterals);
for ( int i = 1; i <= nbQuad; ++i )
{
GmfGetLin(meshID, GmfQuadrilaterals, &iN[0], &iN[1], &iN[2], &iN[3], &ref);
- if ( !myMesh->AddFaceWithID( iN[0], iN[1], iN[2], iN[3], quadIDShift + i ))
- status = storeBadNodeIds( "GmfQuadrilaterals",i, 4, iN[0], iN[1],iN[2], iN[3] );
+ if ( readQuadNodes )
+ {
+ const std::vector& midN = quadNodesAtQuadrilaterals[ i-1 ];
+ if ( midN.size() == 4 )
+ {
+ if ( !myMesh->AddFaceWithID( iN[0], iN[1], iN[2], iN[3],
+ midN[0], midN[1], midN[2], midN[3],
+ quadIDShift + i ))
+ status = storeBadNodeIds( "GmfQuadrilaterals + GmfExtraVerticesAtQuadrilaterals",i, 8,
+ iN[0], iN[1],iN[2], iN[3],
+ midN[0], midN[1], midN[2], midN[3]);
+ }
+ else
+ {
+ if ( !myMesh->AddFaceWithID( iN[0], iN[1], iN[2], iN[3],
+ midN[0], midN[1], midN[2], midN[3], midN[4],
+ quadIDShift + i ))
+ status = storeBadNodeIds( "GmfQuadrilaterals + GmfExtraVerticesAtQuadrilaterals",i, 9,
+ iN[0], iN[1],iN[2], iN[3],
+ midN[0], midN[1], midN[2], midN[3], midN[4]);
+ }
+ }
+ else
+ {
+ if ( !myMesh->AddFaceWithID( iN[0], iN[1], iN[2], iN[3], quadIDShift + i ))
+ status = storeBadNodeIds( "GmfQuadrilaterals",i, 4, iN[0], iN[1],iN[2], iN[3] );
+ }
}
}
- /* Read bi-quadratic quadrangles */
- const int quad2IDShift = myMesh->GetMeshInfo().NbElements();
- if ( int nbQuad = GmfStatKwd(meshID, GmfQuadrilateralsQ2))
+ // the vector of extra vertices at quadrilaterals won't be used anymore so it is cleared
+ quadNodesAtQuadrilaterals.clear();
+
+ /* Read extra vertices for quadratic tetrahedra */
+ std::vector< std::vector > quadNodesAtTetrahedra;
+ int nbQuadTetra = 0;
+ if ( (nbQuadTetra = GmfStatKwd(meshID, GmfExtraVerticesAtTetrahedra)) )
{
- GmfGotoKwd(meshID, GmfQuadrilateralsQ2);
- for ( int i = 1; i <= nbQuad; ++i )
+ GmfGotoKwd(meshID, GmfExtraVerticesAtTetrahedra);
+ quadNodesAtTetrahedra.reserve( nbQuadTetra );
+ std::vector nodes( 6 );
+ for ( int i = 1; i <= nbQuadTetra; ++i )
{
- GmfGetLin(meshID, GmfQuadrilateralsQ2,
- &iN[0], &iN[1], &iN[2], &iN[3], &iN[4], &iN[5], &iN[6], &iN[7], &iN[8], &ref);
- if ( !myMesh->AddFaceWithID( iN[0],iN[1],iN[2],iN[3],iN[4],iN[5],iN[6],iN[7],iN[8],
- quad2IDShift + i ))
- status = storeBadNodeIds( "GmfQuadrilateralsQ2",i,
- 9, iN[0],iN[1],iN[2],iN[3],iN[4],iN[5],iN[6],iN[7],iN[8] );
+ GmfGetLin(meshID, GmfExtraVerticesAtTetrahedra,
+ &iN[0], &iN[1], &iN[2], &iN[3], &iN[4], &iN[5], &iN[6], &iN[7]);
+ nodes.clear();
+ nodes.push_back(iN[2]);
+ nodes.push_back(iN[3]);
+ nodes.push_back(iN[4]);
+ nodes.push_back(iN[5]);
+ nodes.push_back(iN[6]);
+ nodes.push_back(iN[7]);
+ nodes.resize( iN[1] );
+
+ quadNodesAtTetrahedra.push_back(nodes);
}
}
+
/* Read terahedra */
const int tetIDShift = myMesh->GetMeshInfo().NbElements();
if ( int nbTet = GmfStatKwd(meshID, GmfTetrahedra))
{
+ const bool readQuadNodes = (nbQuadTetra == nbTet);
GmfGotoKwd(meshID, GmfTetrahedra);
for ( int i = 1; i <= nbTet; ++i )
{
GmfGetLin(meshID, GmfTetrahedra, &iN[0], &iN[1], &iN[2], &iN[3], &ref);
- if ( !myMesh->AddVolumeWithID( iN[0], iN[2], iN[1], iN[3], tetIDShift + i ))
- status = storeBadNodeIds( "GmfTetrahedra",i, 4, iN[0], iN[1],iN[2], iN[3] );
- }
- }
- /* Read quadratic terahedra */
- const int tet2IDShift = myMesh->GetMeshInfo().NbElements();
- if ( int nbTet = GmfStatKwd(meshID, GmfTetrahedraP2))
- {
- GmfGotoKwd(meshID, GmfTetrahedraP2);
- for ( int i = 1; i <= nbTet; ++i )
- {
- GmfGetLin(meshID, GmfTetrahedraP2, &iN[0], &iN[1], &iN[2],
- &iN[3], &iN[4], &iN[5], &iN[6], &iN[7], &iN[8], &iN[9], &ref);
- if ( !myMesh->AddVolumeWithID( iN[0],iN[2],iN[1],iN[3],
- iN[6],iN[5],iN[4],
- iN[7],iN[9],iN[8], tet2IDShift + i ))
- status = storeBadNodeIds( "GmfTetrahedraP2",i, 10, iN[0],iN[1],iN[2],iN[3],
- iN[4],iN[5],iN[6],iN[7],iN[8],iN[9] );
+ if ( readQuadNodes )
+ {
+ const std::vector& midN = quadNodesAtTetrahedra[ i-1 ];
+ if ( !myMesh->AddVolumeWithID( iN[0], iN[2], iN[1], iN[3],
+ midN[2], midN[1], midN[0], midN[3], midN[5], midN[4], tetIDShift + i ))
+ status = storeBadNodeIds( "GmfTetrahedra + GmfExtraVerticesAtTetrahedra",i, 10, iN[0], iN[2], iN[1], iN[3],
+ midN[2], midN[1], midN[0], midN[3], midN[5], midN[4] );
+ }
+ else
+ {
+ if ( !myMesh->AddVolumeWithID( iN[0], iN[2], iN[1], iN[3], tetIDShift + i ) )
+ status = storeBadNodeIds( "GmfTetrahedra" ,i, 4, iN[0], iN[2], iN[1], iN[3] );
+ }
}
}
+ // the vector of extra vertices at tetrahedra won't be used anymore so it is cleared
+ quadNodesAtTetrahedra.clear();
+
/* Read pyramids */
const int pyrIDShift = myMesh->GetMeshInfo().NbElements();
if ( int nbPyr = GmfStatKwd(meshID, GmfPyramids))
@@ -226,42 +327,115 @@ Driver_Mesh::Status DriverGMF_Read::Perform()
status = storeBadNodeIds( "GmfPyramids",i, 5, iN[0], iN[1],iN[2], iN[3], iN[4] );
}
}
+
+ /* Read extra vertices for quadratic hexahedra */
+ std::vector< std::vector > quadNodesAtHexahedra;
+ int nbQuadHexa = 0;
+ if ( (nbQuadHexa = GmfStatKwd(meshID, GmfExtraVerticesAtHexahedra)) )
+ {
+ GmfGotoKwd(meshID, GmfExtraVerticesAtHexahedra);
+ quadNodesAtHexahedra.reserve( nbQuadHexa );
+ std::vector nodes( 19 );
+ for ( int i = 1; i <= nbQuadHexa; ++i )
+ {
+ GmfGetLin(meshID, GmfExtraVerticesAtHexahedra, &iN[0], &iN[1], // Hexa Id, Nb of extra vertices
+ &iN[2], &iN[3], &iN[4], &iN[5],
+ &iN[6], &iN[7], &iN[8], &iN[9],
+ &iN[10], &iN[11], &iN[12], &iN[13], // HEXA20
+ &iN[14],
+ &iN[15], &iN[16], &iN[17], &iN[18],
+ &iN[19],
+ &iN[20]); // HEXA27
+ nodes.clear();
+ nodes.push_back(iN[2]);
+ nodes.push_back(iN[3]);
+ nodes.push_back(iN[4]);
+ nodes.push_back(iN[5]);
+ nodes.push_back(iN[6]);
+ nodes.push_back(iN[7]);
+ nodes.push_back(iN[8]);
+ nodes.push_back(iN[9]);
+ nodes.push_back(iN[10]);
+ nodes.push_back(iN[11]);
+ nodes.push_back(iN[12]);
+ nodes.push_back(iN[13]);
+ nodes.push_back(iN[14]);
+ nodes.push_back(iN[15]);
+ nodes.push_back(iN[16]);
+ nodes.push_back(iN[17]);
+ nodes.push_back(iN[18]);
+ nodes.push_back(iN[19]);
+ nodes.push_back(iN[20]);
+ nodes.resize( iN[1] );
+
+ quadNodesAtHexahedra.push_back(nodes);
+ }
+ }
+
/* Read hexahedra */
const int hexIDShift = myMesh->GetMeshInfo().NbElements();
if ( int nbHex = GmfStatKwd(meshID, GmfHexahedra))
{
+ const bool readQuadNodes = (nbQuadHexa == nbHex);
GmfGotoKwd(meshID, GmfHexahedra);
for ( int i = 1; i <= nbHex; ++i )
{
- GmfGetLin(meshID, GmfHexahedra,
- &iN[0], &iN[1], &iN[2], &iN[3], &iN[4], &iN[5], &iN[6], &iN[7], &ref);
- if ( !myMesh->AddVolumeWithID( iN[0], iN[3], iN[2], iN[1], iN[4], iN[7], iN[6], iN[5],
- hexIDShift + i))
- status = storeBadNodeIds( "GmfHexahedra",i,
- 8, iN[0], iN[1],iN[2], iN[3], iN[4], iN[7], iN[6], iN[5] );
- }
- }
- /* Read tri-quadratic hexahedra */
- const int hex2IDShift = myMesh->GetMeshInfo().NbElements();
- if ( int nbHex = GmfStatKwd(meshID, GmfHexahedraQ2))
- {
- GmfGotoKwd(meshID, GmfHexahedraQ2);
- for ( int i = 1; i <= nbHex; ++i )
- {
- GmfGetLin(meshID, GmfHexahedraQ2, &iN[0], &iN[1], &iN[2], &iN[3], &iN[4], &iN[5],
- &iN[6], &iN[7], &iN[8],&iN[9],&iN[10],&iN[11],&iN[12],&iN[13],&iN[14],
- &iN[15],&iN[16],&iN[17],&iN[18],&iN[19],&iN[20],&iN[21],&iN[22],&iN[23],
- &iN[24],&iN[25],&iN[26], &ref);
- if ( !myMesh->AddVolumeWithID( iN[0],iN[3],iN[2],iN[1],iN[4],iN[7],iN[6],iN[5],iN[11],iN[10],
- iN[9],iN[8],iN[12],iN[15],iN[14], iN[13],iN[19],iN[18],iN[17],
- iN[16],iN[20],iN[24],iN[23],iN[22],iN[21], iN[25],iN[26],
- hex2IDShift + i ))
- status = storeBadNodeIds( "GmfHexahedraQ2",i, 27,
- iN[0],iN[3],iN[2],iN[1],iN[4], iN[7],iN[6],iN[5],iN[11],iN[10],
- iN[9],iN[8],iN[12],iN[15],iN[14], iN[13],iN[19],iN[18],iN[17],
- iN[16],iN[20],iN[24],iN[23],iN[22],iN[21], iN[25],iN[26]);
+ GmfGetLin(meshID, GmfHexahedra, &iN[0], &iN[1], &iN[2], &iN[3],
+ &iN[4], &iN[5], &iN[6], &iN[7],&ref);
+ if ( readQuadNodes )
+ {
+ const std::vector& midN = quadNodesAtHexahedra[ i-1 ];
+ if ( midN.size() == 12 ) // HEXA20
+ {
+ if ( !myMesh->AddVolumeWithID( iN[0], iN[3], iN[2], iN[1],
+ iN[4], iN[7], iN[6], iN[5],
+ midN[3], midN[2], midN[1], midN[0],
+ midN[7], midN[6], midN[5], midN[4],
+ midN[8], midN[11], midN[10], midN[9],
+ tetIDShift + i ))
+ status = storeBadNodeIds( "GmfHexahedra + GmfExtraVerticesAtHexahedra",i, 20,
+ iN[0], iN[3], iN[2], iN[1],
+ iN[4], iN[7], iN[6], iN[5],
+ midN[3], midN[2], midN[1], midN[0],
+ midN[7], midN[6], midN[5], midN[4],
+ midN[8], midN[11], midN[10], midN[9]);
+ }
+ else // HEXA27
+ {
+ if ( !myMesh->AddVolumeWithID( iN[0], iN[3], iN[2], iN[1],
+ iN[4], iN[7], iN[6], iN[5],
+ midN[3], midN[2], midN[1], midN[0],
+ midN[7], midN[6], midN[5], midN[4],
+ midN[8], midN[11], midN[10], midN[9],
+ midN[12],
+ midN[16], midN[15], midN[14], midN[13],
+ midN[17],
+ midN[18],
+ tetIDShift + i ))
+ status = storeBadNodeIds( "GmfHexahedra + GmfExtraVerticesAtHexahedra",i, 27,
+ iN[0], iN[3], iN[2], iN[1],
+ iN[4], iN[7], iN[6], iN[5],
+ midN[3], midN[2], midN[1], midN[0],
+ midN[7], midN[6], midN[5], midN[4],
+ midN[8], midN[11], midN[10], midN[9],
+ midN[12],
+ midN[16], midN[15], midN[14], midN[13],
+ midN[17],
+ midN[18]);
+ }
+ }
+ else
+ {
+ if ( !myMesh->AddVolumeWithID( iN[0], iN[3], iN[2], iN[1],
+ iN[4], iN[7], iN[6], iN[5], hexIDShift + i ) )
+ status = storeBadNodeIds( "GmfHexahedra" ,i, 8, iN[0], iN[3], iN[2], iN[1],
+ iN[4], iN[7], iN[6], iN[5] );
+ }
}
}
+ // the vector of extra vertices at tetrahedra won't be used anymore so it is cleared
+ quadNodesAtHexahedra.clear();
+
/* Read prism */
const int prismIDShift = myMesh->GetMeshInfo().NbElements();
if ( int nbPrism = GmfStatKwd(meshID, GmfPrisms))
diff --git a/src/DriverGMF/DriverGMF_Write.cxx b/src/DriverGMF/DriverGMF_Write.cxx
index 926f7f4c3..432551e79 100644
--- a/src/DriverGMF/DriverGMF_Write.cxx
+++ b/src/DriverGMF/DriverGMF_Write.cxx
@@ -49,6 +49,16 @@ extern "C"
const SMDS_MeshElement* elem = elemIt->next(); \
GmfSetLin(meshID, GmfKwd,
+#define BEGIN_EXTRA_VERTICES_WRITE( SMDSEntity, GmfKwd, elem, nbVertices ) \
+ elemIt = myMesh->elementEntityIterator( SMDSEntity ); \
+ if ( elemIt->more() ) \
+ { \
+ GmfSetKwd(meshID, GmfKwd, myMesh->GetMeshInfo().NbEntities( SMDSEntity )); \
+ for ( int gmfID = 1; elemIt->more(); ++gmfID ) \
+ { \
+ const SMDS_MeshElement* elem = elemIt->next(); \
+ GmfSetLin(meshID, GmfKwd, gmfID, nbVertices,
+
#define END_ELEM_WRITE( elem ) \
elem->getshapeId() ); \
}} \
@@ -58,6 +68,10 @@ extern "C"
e2id.insert( e2id.end(), make_pair( elem, gmfID )); \
}} \
+#define END_EXTRA_VERTICES_WRITE() \
+ ); \
+ }} \
+
DriverGMF_Write::DriverGMF_Write():
Driver_SMESHDS_Mesh(), _exportRequiredGroups( true )
@@ -67,6 +81,12 @@ DriverGMF_Write::~DriverGMF_Write()
{
}
+//================================================================================
+/*!
+ * \brief Reads a GMF file
+ */
+//================================================================================
+
Driver_Mesh::Status DriverGMF_Write::Perform()
{
Kernel_Utils::Localizer loc;
@@ -110,14 +130,17 @@ Driver_Mesh::Status DriverGMF_Write::Perform()
node2IdMap[ edge->GetNode( 0 )],
node2IdMap[ edge->GetNode( 1 )],
END_ELEM_WRITE_ADD_TO_MAP( edge, edge2IDMap );
-
+
// quadratic edges
- BEGIN_ELEM_WRITE( SMDSEntity_Quad_Edge, GmfEdgesP2, edge )
+ BEGIN_ELEM_WRITE( SMDSEntity_Quad_Edge, GmfEdges, edge )
node2IdMap[ edge->GetNode( 0 )],
node2IdMap[ edge->GetNode( 1 )],
- node2IdMap[ edge->GetNode( 2 )],
END_ELEM_WRITE( edge );
-
+
+ BEGIN_EXTRA_VERTICES_WRITE( SMDSEntity_Quad_Edge, GmfExtraVerticesAtEdges, edge, 1 )
+ node2IdMap[ edge->GetNode( 2 )]
+ END_EXTRA_VERTICES_WRITE();
+
// triangles
TElem2IDMap tria2IDMap;
BEGIN_ELEM_WRITE( SMDSEntity_Triangle, GmfTriangles, tria )
@@ -125,17 +148,20 @@ Driver_Mesh::Status DriverGMF_Write::Perform()
node2IdMap[ tria->GetNode( 1 )],
node2IdMap[ tria->GetNode( 2 )],
END_ELEM_WRITE_ADD_TO_MAP( tria, tria2IDMap );
-
+
// quadratic triangles
- BEGIN_ELEM_WRITE( SMDSEntity_Quad_Triangle, GmfTrianglesP2, tria )
+ BEGIN_ELEM_WRITE( SMDSEntity_Quad_Triangle, GmfTriangles, tria )
node2IdMap[ tria->GetNode( 0 )],
node2IdMap[ tria->GetNode( 1 )],
node2IdMap[ tria->GetNode( 2 )],
+ END_ELEM_WRITE( tria );
+
+ BEGIN_EXTRA_VERTICES_WRITE( SMDSEntity_Quad_Triangle, GmfExtraVerticesAtTriangles, tria, 3 )
node2IdMap[ tria->GetNode( 3 )],
node2IdMap[ tria->GetNode( 4 )],
- node2IdMap[ tria->GetNode( 5 )],
- END_ELEM_WRITE( tria );
-
+ node2IdMap[ tria->GetNode( 5 )]
+ END_EXTRA_VERTICES_WRITE();
+
// quadrangles
TElem2IDMap quad2IDMap;
BEGIN_ELEM_WRITE( SMDSEntity_Quadrangle, GmfQuadrilaterals, quad )
@@ -145,19 +171,37 @@ Driver_Mesh::Status DriverGMF_Write::Perform()
node2IdMap[ quad->GetNode( 3 )],
END_ELEM_WRITE_ADD_TO_MAP( quad, quad2IDMap );
- // bi-quadratic quadrangles
- BEGIN_ELEM_WRITE( SMDSEntity_BiQuad_Quadrangle, GmfQuadrilateralsQ2, quad )
+ // quadratic quadrangles
+ BEGIN_ELEM_WRITE( SMDSEntity_Quad_Quadrangle, GmfQuadrilaterals, quad )
node2IdMap[ quad->GetNode( 0 )],
- node2IdMap[ quad->GetNode( 3 )],
- node2IdMap[ quad->GetNode( 2 )],
node2IdMap[ quad->GetNode( 1 )],
- node2IdMap[ quad->GetNode( 7 )],
- node2IdMap[ quad->GetNode( 6 )],
- node2IdMap[ quad->GetNode( 5 )],
- node2IdMap[ quad->GetNode( 4 )],
- node2IdMap[ quad->GetNode( 8 )],
+ node2IdMap[ quad->GetNode( 2 )],
+ node2IdMap[ quad->GetNode( 3 )],
END_ELEM_WRITE( quad );
-
+
+ BEGIN_EXTRA_VERTICES_WRITE( SMDSEntity_Quad_Quadrangle, GmfExtraVerticesAtQuadrilaterals, quad, 4 )
+ node2IdMap[ quad->GetNode( 4 )],
+ node2IdMap[ quad->GetNode( 5 )],
+ node2IdMap[ quad->GetNode( 6 )],
+ node2IdMap[ quad->GetNode( 7 )]
+ END_EXTRA_VERTICES_WRITE();
+
+ // bi-quadratic quadrangles
+ BEGIN_ELEM_WRITE( SMDSEntity_BiQuad_Quadrangle, GmfQuadrilaterals, quad )
+ node2IdMap[ quad->GetNode( 0 )],
+ node2IdMap[ quad->GetNode( 1 )],
+ node2IdMap[ quad->GetNode( 2 )],
+ node2IdMap[ quad->GetNode( 3 )],
+ END_ELEM_WRITE( quad );
+
+ BEGIN_EXTRA_VERTICES_WRITE( SMDSEntity_BiQuad_Quadrangle, GmfExtraVerticesAtQuadrilaterals, quad, 5 )
+ node2IdMap[ quad->GetNode( 4 )],
+ node2IdMap[ quad->GetNode( 5 )],
+ node2IdMap[ quad->GetNode( 6 )],
+ node2IdMap[ quad->GetNode( 7 )],
+ node2IdMap[ quad->GetNode( 8 )]
+ END_EXTRA_VERTICES_WRITE();
+
// terahedra
BEGIN_ELEM_WRITE( SMDSEntity_Tetra, GmfTetrahedra, tetra )
node2IdMap[ tetra->GetNode( 0 )],
@@ -165,20 +209,23 @@ Driver_Mesh::Status DriverGMF_Write::Perform()
node2IdMap[ tetra->GetNode( 1 )],
node2IdMap[ tetra->GetNode( 3 )],
END_ELEM_WRITE( tetra );
-
+
// quadratic terahedra
- BEGIN_ELEM_WRITE( SMDSEntity_Quad_Tetra, GmfTetrahedraP2, tetra )
+ BEGIN_ELEM_WRITE( SMDSEntity_Quad_Tetra, GmfTetrahedra, tetra )
node2IdMap[ tetra->GetNode( 0 )],
node2IdMap[ tetra->GetNode( 2 )],
node2IdMap[ tetra->GetNode( 1 )],
node2IdMap[ tetra->GetNode( 3 )],
+ END_ELEM_WRITE( tetra );
+
+ BEGIN_EXTRA_VERTICES_WRITE( SMDSEntity_Quad_Tetra, GmfExtraVerticesAtTetrahedra, tetra, 6 )
node2IdMap[ tetra->GetNode( 6 )],
node2IdMap[ tetra->GetNode( 5 )],
node2IdMap[ tetra->GetNode( 4 )],
node2IdMap[ tetra->GetNode( 7 )],
node2IdMap[ tetra->GetNode( 9 )],
- node2IdMap[ tetra->GetNode( 8 )],
- END_ELEM_WRITE( tetra );
+ node2IdMap[ tetra->GetNode( 8 )]
+ END_EXTRA_VERTICES_WRITE();
// pyramids
BEGIN_ELEM_WRITE( SMDSEntity_Pyramid, GmfPyramids, pyra )
@@ -201,8 +248,8 @@ Driver_Mesh::Status DriverGMF_Write::Perform()
node2IdMap[ hexa->GetNode( 5 )],
END_ELEM_WRITE( hexa );
- // tri-quadratic hexahedra
- BEGIN_ELEM_WRITE( SMDSEntity_TriQuad_Hexa, GmfHexahedraQ2, hexa )
+ // quadratic hexahedra
+ BEGIN_ELEM_WRITE( SMDSEntity_Quad_Hexa, GmfHexahedra, hexa )
node2IdMap[ hexa->GetNode( 0 )],
node2IdMap[ hexa->GetNode( 3 )],
node2IdMap[ hexa->GetNode( 2 )],
@@ -211,26 +258,56 @@ Driver_Mesh::Status DriverGMF_Write::Perform()
node2IdMap[ hexa->GetNode( 7 )],
node2IdMap[ hexa->GetNode( 6 )],
node2IdMap[ hexa->GetNode( 5 )],
+ END_ELEM_WRITE( hexa );
+
+ BEGIN_EXTRA_VERTICES_WRITE( SMDSEntity_Quad_Hexa, GmfExtraVerticesAtHexahedra, hexa, 12 )
node2IdMap[ hexa->GetNode( 11 )],
node2IdMap[ hexa->GetNode( 10 )],
node2IdMap[ hexa->GetNode( 9 )],
node2IdMap[ hexa->GetNode( 8 )],
- node2IdMap[ hexa->GetNode( 12 )],
node2IdMap[ hexa->GetNode( 15 )],
node2IdMap[ hexa->GetNode( 14 )],
node2IdMap[ hexa->GetNode( 13 )],
+ node2IdMap[ hexa->GetNode( 12 )],
+ node2IdMap[ hexa->GetNode( 16 )],
+ node2IdMap[ hexa->GetNode( 19 )],
+ node2IdMap[ hexa->GetNode( 18 )],
+ node2IdMap[ hexa->GetNode( 17 )]
+ END_EXTRA_VERTICES_WRITE();
+
+ // tri-quadratic hexahedra
+ BEGIN_ELEM_WRITE( SMDSEntity_TriQuad_Hexa, GmfHexahedra, hexa )
+ node2IdMap[ hexa->GetNode( 0 )],
+ node2IdMap[ hexa->GetNode( 3 )],
+ node2IdMap[ hexa->GetNode( 2 )],
+ node2IdMap[ hexa->GetNode( 1 )],
+ node2IdMap[ hexa->GetNode( 4 )],
+ node2IdMap[ hexa->GetNode( 7 )],
+ node2IdMap[ hexa->GetNode( 6 )],
+ node2IdMap[ hexa->GetNode( 5 )],
+ END_ELEM_WRITE( hexa );
+
+ BEGIN_EXTRA_VERTICES_WRITE( SMDSEntity_TriQuad_Hexa, GmfExtraVerticesAtHexahedra, hexa, 19 )
+ node2IdMap[ hexa->GetNode( 11 )],
+ node2IdMap[ hexa->GetNode( 10 )],
+ node2IdMap[ hexa->GetNode( 9 )],
+ node2IdMap[ hexa->GetNode( 8 )],
+ node2IdMap[ hexa->GetNode( 15 )],
+ node2IdMap[ hexa->GetNode( 14 )],
+ node2IdMap[ hexa->GetNode( 13 )],
+ node2IdMap[ hexa->GetNode( 12 )],
+ node2IdMap[ hexa->GetNode( 16 )],
node2IdMap[ hexa->GetNode( 19 )],
node2IdMap[ hexa->GetNode( 18 )],
node2IdMap[ hexa->GetNode( 17 )],
- node2IdMap[ hexa->GetNode( 16 )],
node2IdMap[ hexa->GetNode( 20 )],
node2IdMap[ hexa->GetNode( 24 )],
node2IdMap[ hexa->GetNode( 23 )],
node2IdMap[ hexa->GetNode( 22 )],
node2IdMap[ hexa->GetNode( 21 )],
node2IdMap[ hexa->GetNode( 25 )],
- node2IdMap[ hexa->GetNode( 26 )],
- END_ELEM_WRITE( hexa );
+ node2IdMap[ hexa->GetNode( 26 )]
+ END_EXTRA_VERTICES_WRITE();
// prism
BEGIN_ELEM_WRITE( SMDSEntity_Penta, GmfPrisms, prism )
diff --git a/src/SMDS/SMDS_Downward.cxx b/src/SMDS/SMDS_Downward.cxx
index 67ff05ffc..20a7c81d9 100644
--- a/src/SMDS/SMDS_Downward.cxx
+++ b/src/SMDS/SMDS_Downward.cxx
@@ -1362,6 +1362,7 @@ void SMDS_DownPyramid::getOrderedNodesOfFace(int cellId, std::vector&
set tofind;
int ids[16] = { 0, 1, 2, 3, 0, 3, 4, 3, 2, 4, 2, 1, 4, 1, 0, 4 };
+ // Quadrangular face
tofind.clear();
for (int i = 0; i < 4; i++)
tofind.insert(nodes[ids[i]]);
@@ -1371,6 +1372,7 @@ void SMDS_DownPyramid::getOrderedNodesOfFace(int cellId, std::vector&
orderedNodes[i] = nodes[ids[i]];
return;
}
+ // Triangular faces
for (int k = 0; k < 4; k++)
{
tofind.clear();
@@ -1489,6 +1491,7 @@ SMDS_DownQuadPyramid::~SMDS_DownQuadPyramid()
void SMDS_DownQuadPyramid::getOrderedNodesOfFace(int cellId, std::vector& orderedNodes)
{
+// MESSAGE("SMDS_DownQuadPyramid::getOrderedNodesOfFace cellId = " << cellId);
set setNodes;
setNodes.clear();
for (int i = 0; i < orderedNodes.size(); i++)
@@ -1503,8 +1506,9 @@ void SMDS_DownQuadPyramid::getOrderedNodesOfFace(int cellId, std::vector_mesh->fromVtkToSmds(_vtkCellIds[cellId]));
- MESSAGE(orderedNodes[0] << " " << orderedNodes[1] << " " << orderedNodes[2]);
+ MESSAGE(orderedNodes[0] << " " << orderedNodes[1] << " " << orderedNodes[2] << " " << orderedNodes[3]);
MESSAGE(nodes[0] << " " << nodes[1] << " " << nodes[2] << " " << nodes[3]);
}
@@ -1661,6 +1666,7 @@ void SMDS_DownPenta::getOrderedNodesOfFace(int cellId, std::vector& o
//int ids[18] = { 0, 2, 1, 3, 4, 5, 0, 1, 4, 3, 1, 2, 5, 4, 2, 0, 3, 5 };
int ids[18] = { 0, 1, 2, 3, 5, 4, 0, 3, 4, 1, 1, 4, 5, 2, 2, 5, 3, 0 };
+ // Triangular faces
for (int k = 0; k < 2; k++)
{
tofind.clear();
@@ -1673,6 +1679,7 @@ void SMDS_DownPenta::getOrderedNodesOfFace(int cellId, std::vector& o
return;
}
}
+ // Quadrangular faces
for (int k = 0; k < 3; k++)
{
tofind.clear();
@@ -1810,6 +1817,7 @@ void SMDS_DownQuadPenta::getOrderedNodesOfFace(int cellId, std::vector
#include
#include
+#include
#include
#include
#include
@@ -73,6 +74,98 @@
using namespace std;
+//================================================================================
+/*!
+ * \brief Returns \a true if two algorithms (described by \a this and the given
+ * algo data) are compatible by their output and input types of elements.
+ */
+//================================================================================
+
+bool SMESH_Algo::Features::IsCompatible( const SMESH_Algo::Features& algo2 ) const
+{
+ if ( _dim > algo2._dim ) return algo2.IsCompatible( *this );
+ // algo2 is of highter dimension
+ if ( _outElemTypes.empty() || algo2._inElemTypes.empty() )
+ return false;
+ bool compatible = true;
+ set::const_iterator myOutType = _outElemTypes.begin();
+ for ( ; myOutType != _outElemTypes.end() && compatible; ++myOutType )
+ compatible = algo2._inElemTypes.count( *myOutType );
+ return compatible;
+}
+
+//================================================================================
+/*!
+ * \brief Return Data of the algorithm
+ */
+//================================================================================
+
+const SMESH_Algo::Features& SMESH_Algo::GetFeatures( const std::string& algoType )
+{
+ static map< string, SMESH_Algo::Features > theFeaturesByName;
+ if ( theFeaturesByName.empty() )
+ {
+ // Read Plugin.xml files
+ vector< string > xmlPaths = SMESH_Gen::GetPluginXMLPaths();
+ LDOMParser xmlParser;
+ for ( size_t iXML = 0; iXML < xmlPaths.size(); ++iXML )
+ {
+ bool error = xmlParser.parse( xmlPaths[iXML].c_str() );
+ if ( error )
+ {
+ TCollection_AsciiString data;
+ INFOS( xmlParser.GetError(data) );
+ continue;
+ }
+ //
+ //
+ LDOM_Document xmlDoc = xmlParser.getDocument();
+ LDOM_NodeList algoNodeList = xmlDoc.getElementsByTagName( "algorithm" );
+ for ( int i = 0; i < algoNodeList.getLength(); ++i )
+ {
+ LDOM_Node algoNode = algoNodeList.item( i );
+ LDOM_Element& algoElem = (LDOM_Element&) algoNode;
+ TCollection_AsciiString algoType = algoElem.getAttribute("type");
+ TCollection_AsciiString input = algoElem.getAttribute("input");
+ TCollection_AsciiString output = algoElem.getAttribute("output");
+ TCollection_AsciiString dim = algoElem.getAttribute("dim");
+ TCollection_AsciiString label = algoElem.getAttribute("label-id");
+ if ( algoType.IsEmpty() ) continue;
+
+ Features & data = theFeaturesByName[ algoType.ToCString() ];
+ data._dim = dim.IntegerValue();
+ data._label = label.ToCString();
+ for ( int isInput = 0; isInput < 2; ++isInput )
+ {
+ TCollection_AsciiString& typeStr = isInput ? input : output;
+ set& typeSet = isInput ? data._inElemTypes : data._outElemTypes;
+ int beg = 1, end;
+ while ( beg <= typeStr.Length() )
+ {
+ while ( beg < typeStr.Length() && !isalpha( typeStr.Value( beg ) ))
+ ++beg;
+ end = beg;
+ while ( end < typeStr.Length() && isalpha( typeStr.Value( end + 1 ) ))
+ ++end;
+ if ( end > beg )
+ {
+ TCollection_AsciiString typeName = typeStr.SubString( beg, end );
+ if ( typeName == "EDGE" ) typeSet.insert( SMDSGeom_EDGE );
+ else if ( typeName == "TRIA" ) typeSet.insert( SMDSGeom_TRIANGLE );
+ else if ( typeName == "QUAD" ) typeSet.insert( SMDSGeom_QUADRANGLE );
+ }
+ beg = end + 1;
+ }
+ }
+ }
+ }
+ }
+ return theFeaturesByName[ algoType ];
+}
+
//=============================================================================
/*!
*
@@ -252,120 +345,13 @@ bool SMESH_Algo::FaceNormal(const SMDS_MeshElement* F, gp_XYZ& normal, bool norm
return ok;
}
-//================================================================================
-/*!
- * \brief Find out elements orientation on a geometrical face
- * \param theFace - The face correctly oriented in the shape being meshed
- * \param theMeshDS - The mesh data structure
- * \retval bool - true if the face normal and the normal of first element
- * in the correspoding submesh point in different directions
+/*
+ * Moved to SMESH_MesherHelper
*/
-//================================================================================
-
-bool SMESH_Algo::IsReversedSubMesh (const TopoDS_Face& theFace,
- SMESHDS_Mesh* theMeshDS)
-{
- if ( theFace.IsNull() || !theMeshDS )
- return false;
-
- // find out orientation of a meshed face
- int faceID = theMeshDS->ShapeToIndex( theFace );
- TopoDS_Shape aMeshedFace = theMeshDS->IndexToShape( faceID );
- bool isReversed = ( theFace.Orientation() != aMeshedFace.Orientation() );
-
- const SMESHDS_SubMesh * aSubMeshDSFace = theMeshDS->MeshElements( faceID );
- if ( !aSubMeshDSFace )
- return isReversed;
-
- // find element with node located on face and get its normal
- const SMDS_FacePosition* facePos = 0;
- int vertexID = 0;
- gp_Pnt nPnt[3];
- gp_Vec Ne;
- bool normalOK = false;
- SMDS_ElemIteratorPtr iteratorElem = aSubMeshDSFace->GetElements();
- while ( iteratorElem->more() ) // loop on elements on theFace
- {
- const SMDS_MeshElement* elem = iteratorElem->next();
- if ( elem && elem->NbNodes() > 2 ) {
- SMDS_ElemIteratorPtr nodesIt = elem->nodesIterator();
- const SMDS_FacePosition* fPos = 0;
- int i = 0, vID = 0;
- while ( nodesIt->more() ) { // loop on nodes
- const SMDS_MeshNode* node
- = static_cast(nodesIt->next());
- if ( i == 3 ) i = 2;
- nPnt[ i++ ].SetCoord( node->X(), node->Y(), node->Z() );
- // check position
- const SMDS_PositionPtr& pos = node->GetPosition();
- if ( !pos ) continue;
- if ( pos->GetTypeOfPosition() == SMDS_TOP_FACE ) {
- fPos = dynamic_cast< const SMDS_FacePosition* >( pos );
- }
- else if ( pos->GetTypeOfPosition() == SMDS_TOP_VERTEX ) {
- vID = node->getshapeId();
- }
- }
- if ( fPos || ( !normalOK && vID )) {
- // compute normal
- gp_Vec v01( nPnt[0], nPnt[1] ), v02( nPnt[0], nPnt[2] );
- if ( v01.SquareMagnitude() > RealSmall() &&
- v02.SquareMagnitude() > RealSmall() )
- {
- Ne = v01 ^ v02;
- normalOK = ( Ne.SquareMagnitude() > RealSmall() );
- }
- // we need position on theFace or at least on vertex
- if ( normalOK ) {
- vertexID = vID;
- if ((facePos = fPos))
- break;
- }
- }
- }
- }
- if ( !normalOK )
- return isReversed;
-
- // node position on face
- double u,v;
- if ( facePos ) {
- u = facePos->GetUParameter();
- v = facePos->GetVParameter();
- }
- else if ( vertexID ) {
- TopoDS_Shape V = theMeshDS->IndexToShape( vertexID );
- if ( V.IsNull() || V.ShapeType() != TopAbs_VERTEX )
- return isReversed;
- gp_Pnt2d uv = BRep_Tool::Parameters( TopoDS::Vertex( V ), theFace );
- u = uv.X();
- v = uv.Y();
- }
- else
- {
- return isReversed;
- }
-
- // face normal at node position
- TopLoc_Location loc;
- Handle(Geom_Surface) surf = BRep_Tool::Surface( theFace, loc );
- // if ( surf.IsNull() || surf->Continuity() < GeomAbs_C1 )
- // some surfaces not detected as GeomAbs_C1 are nevertheless correct for meshing
- if ( surf.IsNull() || surf->Continuity() < GeomAbs_C0 )
- {
- if (!surf.IsNull())
- MESSAGE("surf->Continuity() < GeomAbs_C1 " << (surf->Continuity() < GeomAbs_C1));
- return isReversed;
- }
- gp_Vec d1u, d1v;
- surf->D1( u, v, nPnt[0], d1u, d1v );
- gp_Vec Nf = (d1u ^ d1v).Transformed( loc );
-
- if ( theFace.Orientation() == TopAbs_REVERSED )
- Nf.Reverse();
-
- return Ne * Nf < 0.;
-}
+// bool SMESH_Algo::IsReversedSubMesh (const TopoDS_Face& theFace,
+// SMESHDS_Mesh* theMeshDS)
+// {
+// }
//================================================================================
/*!
diff --git a/src/SMESH/SMESH_Algo.hxx b/src/SMESH/SMESH_Algo.hxx
index 76f6de979..8a9fad6c9 100644
--- a/src/SMESH/SMESH_Algo.hxx
+++ b/src/SMESH/SMESH_Algo.hxx
@@ -30,9 +30,10 @@
#include "SMESH_SMESH.hxx"
-#include "SMESH_Hypothesis.hxx"
-#include "SMESH_ComputeError.hxx"
+#include "SMDSAbs_ElementType.hxx"
#include "SMESH_Comment.hxx"
+#include "SMESH_ComputeError.hxx"
+#include "SMESH_Hypothesis.hxx"
#include
#include
@@ -42,6 +43,7 @@
#include
#include
#include