merge V7_7_BR

This commit is contained in:
Paul RASCLE 2016-02-01 15:23:06 +01:00
commit 193c49c877
303 changed files with 16075 additions and 6685 deletions

View File

@ -28,8 +28,8 @@ CMAKE_POLICY(SET CMP0003 NEW)
STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7)
SET(${PROJECT_NAME_UC}_MINOR_VERSION 6)
SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
SET(${PROJECT_NAME_UC}_MINOR_VERSION 7)
SET(${PROJECT_NAME_UC}_PATCH_VERSION 1)
SET(${PROJECT_NAME_UC}_VERSION
${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
SET(${PROJECT_NAME_UC}_VERSION_DEV 0)
@ -121,7 +121,9 @@ IF(SALOME_BUILD_GUI)
IF(EXISTS ${GUI_ROOT_DIR})
LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files")
FIND_PACKAGE(SalomeGUI)
FULL_GUI(TRUE) #check whether GUI builded in full mode and with CORBA
SALOME_GUI_WITH_CORBA() #check whether GUI builded with CORBA
SALOME_GUI_MODE(SALOME_USE_VTKVIEWER SALOME_USE_SALOMEOBJECT
OPTIONAL SALOME_USE_PLOT2DVIEWER SALOME_USE_PYCONSOLE)
##
## Prerequisites From GUI:
##

View File

@ -165,6 +165,7 @@ SET(GOOD_TESTS
transforming_meshes_ex13.py
use_existing_faces.py
viewing_meshes_ex02.py
split_biquad.py
)
SET(EXAMPLES_TESTS ${BAD_TESTS} ${GOOD_TESTS} testme.py)

View File

@ -0,0 +1,37 @@
# Split bi-quadratic to linear
import salome
salome.salome_init()
from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy)
from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy)
# make a shape consisting of two quadranges
OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
OY1 = geompy.MakeTranslation( OY, 1, 0, 0 )
OY2 = geompy.MakeTranslation( OY, 2, 0, 0 )
q1 = geompy.MakeQuad2Edges( OY, OY1 )
q2 = geompy.MakeQuad2Edges( OY1, OY2 )
shape = geompy.Partition( [q1,q2], theName='shape' )
ff = geompy.SubShapeAll( shape, geompy.ShapeType["FACE"], theName="quad" )
# mesh one quadrange with quadrangless and the other with triangles
mesh = smesh.Mesh( shape )
mesh.Segment().NumberOfSegments(1)
mesh.Quadrangle()
mesh.Triangle( ff[1] )
mesh.Compute()
# make group of quadrangles and extrude them into a hexahedron
quadGroup = mesh.Group( ff[0], "quads")
mesh.ExtrusionSweepObject2D( quadGroup, [0,0,1], 1 )
# make the mesh bi-quadratic
mesh.ConvertToQuadratic( theToBiQuad=True )
# split all elements into linear ones
mesh.SplitBiQuadraticIntoLinear()

View File

@ -1,16 +1,11 @@
# Translation
import SMESH_mechanic
import SMESH
smesh = SMESH_mechanic.smesh
mesh = SMESH_mechanic.mesh
# define translation vector
point = SMESH.PointStruct(-150., -150., 0.)
vector =SMESH.DirStruct(point)
vector = [-150., -150., 0.]
# translate a mesh
doCopy = 1
mesh.Translate([], vector, doCopy)
# make a translated copy of all elements of the mesh
mesh.TranslateObject(mesh, vector, Copy=True)

View File

@ -1,10 +1,14 @@
# Merging Nodes
import SMESH_mechanic
import SMESH_mechanic, SMESH
mesh = SMESH_mechanic.mesh
# merge nodes
Tolerance = 25.0
Tolerance = 4.0
# prevent nodes located on geom edges from removal during merge:
# create a group including all nodes on edges
allSegs = mesh.MakeGroup( "all segments", SMESH.EDGE, SMESH.FT_ElemGeomType,'=', SMESH.Geom_EDGE )
GroupsOfNodes = mesh.FindCoincidentNodes(Tolerance)
mesh.MergeNodes(GroupsOfNodes)
mesh.MergeNodes(GroupsOfNodes, NodesToKeep=allSegs)

View File

@ -11,35 +11,40 @@ import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy)
# create two faces of the box
box1 = geompy.MakeBox(0., 0., 0., 20., 20., 15.)
facesList1 = geompy.SubShapeAll(box1, geompy.ShapeType["FACE"])
face1 = facesList1[2]
# make two not sewed quadranges
OY0 = geompy.MakeVectorDXDYDZ(0, 1, 0)
OY1 = geompy.MakeTranslation( OY0, 1, 0, 0, theName="OY1" )
OY2 = geompy.MakeTranslation( OY0, 1.01, 0, 0, theName="OY2" )
OY3 = geompy.MakeTranslation( OY0, 2, 0, 0 )
q1 = geompy.MakeQuad2Edges( OY0, OY1 )
q2 = geompy.MakeQuad2Edges( OY2, OY3 )
box2 = geompy.MakeBox(0., 5., 0., 20., 20., 15.)
facesList2 = geompy.SubShapeAll(box2, geompy.ShapeType["FACE"])
face2 = facesList2[1]
edgesList = geompy.SubShapeAll(face2, geompy.ShapeType["EDGE"])
edge1 = edgesList[2]
aComp = geompy.MakeCompound([face1, face2])
geompy.addToStudy(aComp, "Two faces")
# create a mesh on two faces
mesh = smesh.Mesh(aComp, "Two faces : quadrangle mesh")
algo1D = mesh.Segment()
algo1D.NumberOfSegments(4)
algo2D = mesh.Quadrangle()
algo_local = mesh.Segment(edge1)
algo_local.Arithmetic1D(1, 4)
algo_local.Propagation()
shape = geompy.MakeCompound( [q1,q2], theName='shape' )
# make a non-uniform quadrangle mesh on two faces
mesh = smesh.Mesh(shape, "Two faces : quadrangle mesh")
mesh.Segment().Arithmetic1D( 0.1, 0.4 )
mesh.Segment(q1).NumberOfSegments( 5 )
mesh.Quadrangle()
mesh.Compute()
# sew free borders
# FirstNodeID1, SecondNodeID1, LastNodeID1,
# FirstNodeID2, SecondNodeID2, LastNodeID2, CreatePolygons, CreatePolyedrs
mesh.SewFreeBorders(6, 21, 5, 1, 12, 3, 0, 0)
segs1 = mesh.GetSubMeshElementsId( OY1 ) # mesh segments generated on borders
segs2 = mesh.GetSubMeshElementsId( OY2 )
FirstNodeID1 = mesh.GetElemNode( segs1[0], 0 )
SecondNodeID1 = mesh.GetElemNode( segs1[0], 1 )
LastNodeID1 = mesh.GetElemNode( segs1[-1], 1 )
FirstNodeID2 = mesh.GetElemNode( segs2[0], 0 )
SecondNodeID2 = mesh.GetElemNode( segs2[0], 1 )
LastNodeID2 = mesh.GetElemNode( segs2[-1], 1 )
CreatePolygons = True
CreatePolyedrs = False
res = mesh.SewFreeBorders(FirstNodeID1, SecondNodeID1, LastNodeID1,
FirstNodeID2, SecondNodeID2, LastNodeID2,
CreatePolygons, CreatePolyedrs )
print res
print "nb polygons:", mesh.NbPolygons()

View File

@ -20,7 +20,7 @@ aComp = geompy.MakeCompound([box1, box2])
geompy.addToStudy(aComp, "Two boxes")
# create a mesh on two boxes
mesh = smesh.Mesh(aComp, "Two faces : quadrangle mesh")
mesh = smesh.Mesh(aComp, "Sew Side Elements")
algo1D = mesh.Segment()
algo1D.NumberOfSegments(2)
@ -33,6 +33,31 @@ algo_local.Propagation()
mesh.Compute()
# sew side elements
# IDsOfSide1Elements, IDsOfSide2Elements,
# NodeID1OfSide1ToMerge, NodeID1OfSide2ToMerge, NodeID2OfSide1ToMerge, NodeID2OfSide2ToMerge
mesh.SewSideElements([69, 70, 71, 72], [91, 92, 89, 90], 8, 38, 23, 58)
# find elements to sew
face1 = geompy.GetFaceNearPoint( aComp, geompy.MakeVertex( 5, 10, 5 ))
IDsOfSide1Elements = mesh.GetSubMeshElementsId( face1 )
print "side faces 1:",IDsOfSide1Elements
face1Translated = geompy.MakeTranslation( face1, 0,5,0 )
faceFilter = smesh.GetFilter( SMESH.FACE, SMESH.FT_BelongToGeom,'=', face1Translated )
IDsOfSide2Elements = mesh.GetIdsFromFilter( faceFilter )
print "side faces 2:",IDsOfSide2Elements
# find corresponding nodes on sides
edge1 = geompy.GetEdgeNearPoint( aComp, geompy.MakeVertex( 0, 10, 5 ))
segs1 = mesh.GetSubMeshElementsId( edge1 ) # mesh segments generated on edge1
NodeID1OfSide1ToMerge = mesh.GetElemNode( segs1[0], 0 )
NodeID2OfSide1ToMerge = mesh.GetElemNode( segs1[0], 1 )
print "nodes of side1:", [NodeID1OfSide1ToMerge,NodeID2OfSide1ToMerge]
edge2 = geompy.GetEdgeNearPoint( aComp, geompy.MakeVertex( 0, 15, 5 ))
segs2 = mesh.GetSubMeshElementsId( edge2 ) # mesh segments generated on edge2
NodeID1OfSide2ToMerge = mesh.GetElemNode( segs2[0], 0 )
NodeID2OfSide2ToMerge = mesh.GetElemNode( segs2[0], 1 )
print "nodes of side2:", [NodeID1OfSide2ToMerge,NodeID2OfSide2ToMerge]
res = mesh.SewSideElements(IDsOfSide1Elements, IDsOfSide2Elements,
NodeID1OfSide1ToMerge, NodeID1OfSide2ToMerge,
NodeID2OfSide1ToMerge, NodeID2OfSide2ToMerge)
print res

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

BIN
doc/salome/gui/SMESH/images/free_borders1.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
doc/salome/gui/SMESH/images/image152.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 25 KiB

BIN
doc/salome/gui/SMESH/images/image88.jpg Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

BIN
doc/salome/gui/SMESH/images/mergeelems.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 13 KiB

BIN
doc/salome/gui/SMESH/images/mergenodes.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 28 KiB

BIN
doc/salome/gui/SMESH/images/merging_nodes1.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

BIN
doc/salome/gui/SMESH/images/merging_nodes2.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
doc/salome/gui/SMESH/images/sewing1.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 24 KiB

BIN
doc/salome/gui/SMESH/images/sewing2.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 28 KiB

BIN
doc/salome/gui/SMESH/images/sewing3.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 31 KiB

BIN
doc/salome/gui/SMESH/images/sewing4.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 945 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

View File

@ -5,31 +5,31 @@
Basic 1D hypothesis specifies:
<ul>
<li>how \ref a1d_algos_anchor "Wire Discretization" should divide the edge;</li>
<li>how \ref a1d_algos_anchor "Composite Side Discretization" should divide the group of C1-continues edges.</li>
<li>how \ref a1d_algos_anchor "Composite Side Discretization" should divide the group of C1-continuous edges.</li>
</ul>
By type of nodes distribution the 1D hypotheses can be categorized as follows:
1D hypotheses can be categorized by type of nodes distribution as follows:
<ul>
<li>Uniform distribution
<li>Uniform distribution:
<ul>
<li>\ref average_length_anchor "Local Length"</li>
<li>\ref max_length_anchor "Max Size"</li>
<li>\ref number_of_segments_anchor "Number of segments" with Equidistant distribution</li>
<li>\ref automatic_length_anchor "Automatic Length"</li>
</ul></li>
<li>Constantly increasing or decreasing length of segments
<li>Constantly increasing or decreasing length of segments:
<ul>
<li>\ref arithmetic_1d_anchor "Arithmetic 1D"</li>
<li>\ref geometric_1d_anchor "Geometric Progression"</li>
<li>\ref start_and_end_length_anchor "Start and end length"</li>
<li>\ref number_of_segments_anchor "Number of segments" with Scale distribution</li>
</ul></li>
<li>Distribution depending on curvature
<li>Distribution depending on curvature:
<ul>
<li>\ref adaptive_1d_anchor "Adaptive"</li>
<li>\ref deflection_1d_anchor "Deflection 1D"</li>
</ul></li>
<li>Arbitrary distribution
<li>Arbitrary distribution:
<ul>
<li>\ref fixed_points_1d_anchor "Fixed points 1D"</li>
<li>\ref number_of_segments_anchor "Number of segments" with
@ -144,12 +144,17 @@ composing your geometrical object. Definition of this hypothesis
consists of setting the \b length of segments, which will approximate these
edges, and the \b precision of rounding.
The \b precision parameter is used to round a number of segments,
calculated by dividing the edge length by the specified \b length of
segment, to the higher integer if the remainder exceeds the precision
and to the lower integer otherwise. Use value 0.5 to provide rounding
to the nearest integer, 1.0 for the lower integer, 0.0 for the higher
integer. Default value is 1e-07.
The \b precision parameter is used to round a <em>number of segments</em>,
calculated by dividing the <em>edge length</em> by the specified \b length of
segment, to the higher integer if the \a remainder exceeds the \b precision
and to the lower integer otherwise. <br>
Use value 0.5 to provide rounding to the nearest integer, 1.0 for the lower integer, 0.0 for the higher integer. Default value is 1e-07.
For example: if <em>edge length</em> is 10.0 and the segment \b length
is 3.0 then their division gives 10./3. = 3.33(3) and the \a remainder is 0.33(3).
If \b precision is less than 0.33(3) then the edge is divided into 3 segments.
If \b precision is more than 0.33(3) then the edge is divided into 4 segments.
\image html image41.gif
@ -245,6 +250,7 @@ negative</b>.
\ref tui_deflection_1d "Defining Number of Segments" hypothesis
operation.
\note The plot functionality is available only if GUI module is builded with Plot 2D Viewer (set option SALOME_USE_PLOT2DVIEWER to ON when building GUI module).
<br>
\anchor start_and_end_length_anchor
@ -316,7 +322,7 @@ possible to select the edges to be reversed either directly picking them in
the 3D viewer or selecting the edges or groups of edges in the
Object Browser.
\ref reversed_edges_helper_anchor "Helper" group assists you in
\ref reversed_edges_helper_anchor "Helper" group assists in
defining <b>Reversed Edges</b> parameter.
@ -330,23 +336,23 @@ defining <b>Reversed Edges</b> parameter.
\image html rev_edges_helper_dlg.png
\b Helper group assists you in defining <b>Reversed Edges</b>
\b Helper group assists in defining <b>Reversed Edges</b>
parameter of the hypotheses depending on edge direction.
<b>Show whole geometry</b> check-box lets you see the whole
geometrical model in the 3D Viewer. This can help you to understand
location within the model of a set of edges shown in the Viewer.
<b>Show whole geometry</b> check-box allows seeing the whole
geometrical model in the 3D Viewer, which can help to understand the
location of a set of edges within the model.
<b>Propagation chains</b> group helps you to define
<b>Reversed Edges</b> so that opposite edges of quadrilateral faces
will be split in the logically same direction. When this group is
<b>Propagation chains</b> group allows defining <b>Reversed Edges</b>
for splitting opposite edges of quadrilateral faces
in a logically uniform direction. When this group is
activated, the list is filled with propagation chains found within the
model. When you select a chain in the list, edges of the chain are
shown in the Viewer with arrows so that you can chose a common
direction for all chain edges. \b Reverse button inverses the common
direction of chain edges. If \b Add button is active, this means that some
edges of a chain have different direction and you can click \b Add
button to add such edges to <b>Reversed Edges</b> list.
model. When a chain is selected in the list its edges are
shown in the Viewer with arrows, which enables choosing a common
direction for all chain edges. \b Reverse button inverts the common
direction of chain edges. If \b Add button is active, some
edges of a chain have a different direction, so you can click \b Add
button to add them to <b>Reversed Edges</b> list.
\image html propagation_chain.png "The whole geometry and a propagation chain"

View File

@ -26,9 +26,9 @@ which will compose the mesh of these faces.
\anchor length_from_edges_anchor
<h2>Length from Edges</h2>
<b>Length from edges</b> hypothesis defines maximum linear size of
mesh faces as an average length of mesh edges approximating a boundary
of a face being meshed.
<b>Length from edges</b> hypothesis defines the maximum linear size of
mesh faces as an average length of mesh edges approximating
the meshed face boundary.
<b>See Also</b> a sample TUI Script of a
\ref tui_length_from_edges "Length from Edges" hypothesis operation.
@ -38,7 +38,7 @@ of a face being meshed.
\image html hypo_quad_params_dialog.png "Quadrangle parameters: Transition"
<b>Quadrangle parameters</b> is a hypothesis for Quadrangle (Mapping) algorithm.
<b>Quadrangle parameters</b> is a hypothesis for \ref quad_ijk_algo_page.
<b>Transition</b> tab is used to define the algorithm of transition
between opposite sides of the face with a different number of
@ -113,7 +113,7 @@ of the enforced nodes.
projected to the meshed face and located close enough to the
meshed face will be used to create the enforced nodes.</li>
</ul>
\note <b>Enforced nodes</b> can't be created at \b Reduced transition type.
\note <b>Enforced nodes</b> cannot be created at \b Reduced transition type.
Let us see how the algorithm works:
<ul>

View File

@ -26,7 +26,7 @@ about selection filters and their usage in GUI.
- In Python scripts, filters can be used to choose only some mesh
entities (nodes or elements) for the operations, which require the
list of entities as input parameter (create/modify group, remove
nodes/elements, etc) and for the operations, which accept objects as
nodes/elements, etc) and for the operations, which accept objects
as input parameter. The page \ref tui_filters_page provides
examples of the filters usage in Python scripts.
*/

View File

@ -14,17 +14,16 @@ The choice of a hypothesis depends on the selected algorithm.
Hypotheses are created during creation and edition of
\ref constructing_meshes_page "meshes" and
\ref constructing_submeshes_page "sub-mesh".
Once created a hypotheses can be reused during creation and
edition of other meshes and sub-meshes. All created hypotheses and
algorithms are present in the Object Browser in \a Hypotheses and
\a Algorithms folders correspondingly. From the context menu of the
hypothesis you can invoke a dialog for modification of its parameters,
and \b Unassign command that will unassign the hypothesis from all
the meshes and sub-meshes using it.
Modification of any hypothesis parameter and unassignment of a
hypothesis leads to automatic removal of elements generated with use
of this hypothesis.
\ref constructing_submeshes_page "sub-meshes".
Once created a hypotheses can be reused during creation and edition of
other meshes and sub-meshes. All created hypotheses and algorithms are
present in the Object Browser in \a Hypotheses and \a Algorithms
folders correspondingly. It is possible to open a dialog to modify the
parameters of a hypothesis from its context menu. This menu also
provides \b Unassign command that will unassign the hypothesis from
all meshes and sub-meshes using it. Modification of any parameter of a
hypothesis and its unassignment leads to automatic removal of elements
generated using it.
In \b MESH there are the following Basic Hypotheses:
<ul>

View File

@ -19,31 +19,31 @@ Mesh module provides several ways to create the mesh:
Construction of \subpage constructing_submeshes_page "sub-meshes"
allows to discretize some sub-shapes of the main shape, for example a face,
using different meshing parameters than other sub-shapes.<br>
using the meshing parameters that differ from those for other sub-shapes.<br>
Meshing parameters of meshes and sub-meshes can be
\subpage editing_meshes_page "edited". (Upon edition only mesh entities
generated using changed meshing parameters are removed and will be
re-computed).<br>
\note Algorithms and hypotheses used at mesh level are referred as
\a global ones and those used at sub-mesh level are referred as \a
\note Algorithms and hypotheses used at mesh level are referred to as
\a global ones and those used at sub-mesh level are referred to as \a
local ones.
</li>
<li>Bottom-up way, using \ref modifying_meshes_page "mesh modification"
operations, especially \ref extrusion_page "extrusion" and \ref
revolution_page "revolution". To create an empty mesh not based on
revolution_page "revolution". To create an empty mesh not based on a
geometry, use the same dialog as to \ref constructing_meshes_page
"construct the mesh on geometry" but do not specify any geometry
nor meshing algorithm.
"construct the mesh on geometry" but do not specify a geometry
or a meshing algorithm.
</li>
<li>The mesh can be \ref importing_exporting_meshes_page "imported" from
<li>The mesh can be \subpage importing_exporting_meshes_page "imported" from
(and exported to) the file in MED, UNV, STL, CGNS, DAT, GMF and
SAUVE formats.
</li>
<li>The 3D mesh can be generated from the 2D mesh, \ref
importing_exporting_meshes_page "imported" or manually created. To
setup the meshing parameters of a mesh not based on geometry, just
setup the meshing parameters of a mesh not based on a geometry, just
invoke \ref editing_meshes_page "Edit mesh / sub-mesh" command on
your 3D mesh.
your 2D mesh.
</li>
<li>Several meshes can be \subpage building_compounds_page "combined"
into a new mesh.
@ -66,29 +66,29 @@ Attractive meshing capabilities include:
sub-meshes.
The \b structure of a SALOME mesh is described by nodes and elements based on
these nodes. Geometry of the element is defined by the sequence of
these nodes. The geometry of an element is defined by the sequence of
nodes constituting it and
the <a href="http://www.code-aster.org/outils/med/html/connectivites.html">
connectivity convention </a> (adopted from MED library). Definition of
the element basing on elements of lower dimension is NOT supported.
the element basing on the elements of a lower dimension is NOT supported.
\anchor mesh_entities
The mesh can include the following entities:
<ul>
<li>\b Node &mdash; an entity of a mesh defining a position in 3D
<li>\b Node &mdash; a mesh entity defining a position in 3D
space with coordinates (x, y, z).</li>
<li>\b Edge (or segment) &mdash; 1D element of a mesh linking two nodes.</li>
<li>\b Face &mdash; 2D element of a mesh representing a part of
<li>\b Edge (or segment) &mdash; 1D mesh element linking two nodes.</li>
<li>\b Face &mdash; 2D mesh element representing a part of
surface bound by links between face nodes. A face can be a
triangle, quadrangle or polygon.</li>
<li>\b Volume &mdash; 3D element of a mesh representing a part of 3D
<li>\b Volume &mdash; 3D mesh element representing a part of 3D
space bound by volume facets. Nodes of a volume describing each
facet are defined by
the <a href="http://www.code-aster.org/outils/med/html/connectivites.html">
MED connectivity convention.</a> A volume can be a tetrahedron, hexahedron,
pentahedron, pyramid, hexagonal prism or polyhedron.</li>
<li>\b 0D element &mdash; element of a mesh defined by one node.</li>
<li>\b Ball element &mdash; discrete element of a mesh defined by a
<li>\b 0D element &mdash; mesh element defined by one node.</li>
<li>\b Ball element &mdash; discrete mesh element defined by a
node and a diameter.</li>
</ul>
@ -97,10 +97,14 @@ generated on (if any). The node generated on the geometrical edge or
surface in addition stores its position in parametric space of the
associated geometrical entity.
SALOME supports elements of second order, without central node
(quadratic triangle, quadrangle, tetrahedron, hexahedron, pentahedron
and pyramid) and with central nodes (bi-quadratic triangle and
quadrangle and tri-quadratic hexahedron).<br>
Mesh entities are identified by integer IDs starting from 1.
Nodes and elements are countered separately, i.e. there can be a node
and element with the same ID.
SALOME supports elements of second order, without a central node
(quadratic triangle, quadrangle, polygon, tetrahedron, hexahedron,
pentahedron and pyramid) and with central nodes (bi-quadratic triangle
and quadrangle and tri-quadratic hexahedron).<br>
Quadratic mesh can be obtained in two ways:
- Using a global \ref quadratic_mesh_anchor "Quadratic Mesh"
hypothesis. (Elements with the central node are not generated in this way).

View File

@ -24,7 +24,6 @@ Node quality controls:
Edge quality controls:
<ul>
<li>\subpage free_edges_page "Free edges"</li>
<li>\subpage free_borders_page "Free borders"</li>
<li>\subpage length_page "Length"</li>
<li>\subpage borders_at_multi_connection_page "Borders at multi-connection"</li>
@ -33,6 +32,7 @@ Edge quality controls:
Face quality controls:
<ul>
<li>\subpage free_edges_page "Free edges"</li>
<li>\subpage free_faces_page "Free faces"</li>
<li>\subpage bare_border_faces_page "Bare border faces"</li>
<li>\subpage over_constrained_faces_page "Over-constrained faces"</li>

View File

@ -32,7 +32,7 @@ nodal connectivity of elements in the documentation on MED library or
<li>From the \b Modification menu choose the \b Add item, the
following associated sub-menu will appear:</li>
\image html image146.png
\image html image152.png
From this sub-menu select the type of element which you would like to add to your mesh.
@ -47,10 +47,13 @@ existing groups of the corresponding type becomes available. By
default, no group is selected. In this case, when the user presses
<b>Apply</b> or <b>Apply & Close</b> button, the warning message box
informs the user about the necessity to input new group name. The
combo box lists both \ref standalone_group "standalone groups"
and \ref group_on_geom "groups on geometry". If the user chooses a
group on geometry, he is warned and proposed to
\ref convert_to_standalone "convert this group to standalone".
combo box lists groups of all the
\ref grouping_elements_page "three types": both
\ref standalone_group "standalone groups",
\ref group_on_filter "groups on filter", and
\ref group_on_geom "groups on geometry". If the user chooses a
group on geometry or on filter, he is warned and proposed to
convert this group to standalone.
If the user rejects conversion operation, it is cancelled and
a new node/element is not created!
@ -87,29 +90,35 @@ selecting them in the 3D viewer and click the \b Apply or
\anchor adding_0delems_on_all_nodes_anchor
<h2>Making 0D elements on Element Nodes</h2>
There is another way to create 0D elements. It is possible to create
There is another way to create 0D elements. It is possible to create
0D elements on all nodes of the selected mesh, sub-mesh, or a group of elements or nodes.
\image html dlg_0D_on_all_nodes.png
In this dialog
In this dialog
<ul>
<li> The radio-buttons allow choosing the type of object to create 0D elements on.
<ul>
<li><b> Mesh, sub-mesh, group </b> - this button allows selecting
a mesh, a sub-mesh or a group to create 0D elements on the nodes of its
<li><b> Mesh, sub-mesh, group </b> - this button allows selecting
a mesh, a sub-mesh or a group to create 0D elements on the nodes of its
elements. The name of the selected object is shown in the dialog. </li>
<li><b> Elements </b> - this button allows selecting elements in the
VTK viewer or typing their IDs in the dialog.</li>
<li><b> Nodes </b> - this button allows selecting nodes to create
0D elements on in the VTK viewer or typing their IDs in the dialog.</li>
</ul></li>
<li><b> Set Filter </b> button allows selecting elements or nodes
by filtering mesh elements or nodes with different criteria
(see \ref filtering_elements "Filter usage").</li>
<li> Switching on <b>Add to group</b> check-box allows specifying the
name of the group to which all created or found 0D elements will be added. You can either select an existing group from
a drop-down list, or enter the name of the group to be created.</li>
<li><b> Set Filter </b> button allows selecting elements or nodes
by filtering mesh elements or nodes with different criteria
(see \ref filtering_elements "Filter usage").</li>
<li> Switching on <b>Add to group</b> check-box allows specifying the
name of the group to which all created or found (existing) 0D elements will
be added. You can either select an existing group from a drop-down
list, or enter the name of the group to be created. If a selected
existing \ref grouping_elements_page "group" is not Standalone
(Group On Geometry or Group On Filter) it will be converted to
Standalone.
\warning If <b>Add to group</b> is activated it has to be filled in.
</li>
</ul>
@ -121,7 +130,7 @@ by filtering mesh elements or nodes with different criteria
In this dialog box specify the nodes, which will form your ball elements,
either by selecting them in the 3D viewer or by manually entering their IDs,
specify the ball diameter and click the \b Apply or <b>Apply and
Close</b> button.
Close</b> button.
\image html add_ball.png

View File

@ -36,7 +36,7 @@ one of the following:
\image html image152.png
\note All dialogs for quadratic element adding to the mesh
\note All dialogs for adding quadratic element to the mesh
provide the possibility to automatically add an element
to the specified group or to create the group anew using
<b>Add to group</b> box, that allows choosing an existing group for
@ -47,23 +47,29 @@ existing groups of the corresponding type becomes available. By
default, no group is selected. In this case, when the user presses
<b>Apply</b> or <b>Apply & Close</b> button, the warning message box
informs the user about the necessity to input a new group name. The
combo box lists both \ref standalone_group "standalone groups"
and \ref group_on_geom "groups on geometry". If the user chooses a
group on geometry, he is warned and proposed to
\ref convert_to_standalone "convert this group to standalone".
combo box lists groups of all the
\ref grouping_elements_page "three types": both
\ref standalone_group "standalone groups",
\ref group_on_filter "groups on filter", and
\ref group_on_geom "groups on geometry". If the user chooses a
group on geometry or on filter, he is warned and proposed to
convert this group to standalone.
If the user rejects conversion operation, it is cancelled and
a new quadratic element is not created.
To create any <b>Quadratic Element</b> specify the nodes which will form your
element by selecting them in the 3D viewer with pressed Shift
button. Their numbers will appear in the dialog box as <b>Corner Nodes</b>
(alternatively you can just input numbers in this field without
selection). The edges formed by the corner nodes will appear in the
table. To define the middle nodes for each edge, double-click on the
respective field and input the number of the node (or pick the node in
the viewer). For bi-quadratic and tri-quadratic elements, your also
need to specify central nodes.
To create any <b>Quadratic Element</b> specify the nodes which will
form your element by selecting them in the 3D viewer with pressed
Shift button and click \a Selection button to the right of
<b>Corner Nodes</b> label. Their numbers will appear in the dialog box
as <b>Corner Nodes</b> (alternatively you can just input numbers in
this field without selection; note that to use this way the mesh
should be selected before invoking this operation). The edges formed
by the corner nodes will appear in the table. To define the middle
nodes for each edge, double-click on the respective field and input
the number of the node (or pick the node in the viewer). For
bi-quadratic and tri-quadratic elements, your also need to specify
central nodes.
As soon as all needed nodes are specified, a preview of a new
quadratic element will be displayed in the 3D viewer. Then
you will be able to click \b Apply or <b>Apply and Close</b> button to

View File

@ -31,12 +31,13 @@ The following additional hypothesis are available:
<h2>Propagation of 1D Hypothesis on opposite edges</h2>
<b>Propagation of 1D Hypothesis on opposite edges</b> allows to mesh
opposite sides of a quadrangle face, and of other adjacent quadrangles,
using the same hypothesis assigned to one edge only.<br>
Thus you define a sub-mesh on an edge where you define 1D meshing
parameters and a \b Propagation hypothesis. These local meshing
opposite sides of a quadrangle face and other adjacent quadrangles,
using the same hypothesis assigned to only one edge.<br>
Thus you define a sub-mesh on the edge where you define 1D meshing
parameters and the \b Propagation hypothesis. These local meshing
parameters will be propagated via opposite sides of quadrangles to the
whole geometry, or till an edge with other local meshing parameters.
whole geometry, and this propagation stops at an edge with other local
meshing parameters.
This hypothesis can be taken into account by
\ref a1d_algos_anchor "Wire Discretization" and
@ -84,17 +85,17 @@ computations.
<li><b>Stretch factor</b> - defines the growth factor of element height
from the mesh boundary inwards.</li>
<li><b>Extrusion method</b> (available in 3D only) - defines how
position of nodes are found during prism construction and how
creation of distorted and intersecting prisms is prevented.
<ul><li><b>Surface offset + smooth</b> method extrudes nodes along normal
to underlying geometrical surface. Smoothing of internal surface of
positions of nodes are found during prism construction and how
the creation of distorted and intersecting prisms is prevented.
<ul><li><b>Surface offset + smooth</b> method extrudes nodes along the normal
to the underlying geometrical surface. Smoothing of the internal surface of
element layers is possible to avoid creation of invalid prisms.</li>
<li><b>Face offset</b> method extrudes nodes along average normal of
surrounding mesh faces till intersection with a neighbor mesh face
translated along its own normal by the layers thickness. Thickness
<li><b>Face offset</b> method extrudes nodes along the average normal of
surrounding mesh faces to the intersection with a neighbor mesh face
translated along its own normal by the thickness of layers. The thickness
of layers can be limited to avoid creation of invalid prisms.</li>
<li><b>Node offset</b> method extrudes nodes along average normal of
surrounding mesh faces by the layers thickness. Thickness of
<li><b>Node offset</b> method extrudes nodes along the average normal of
surrounding mesh faces by the thickness of layers. The thickness of
layers can be limited to avoid creation of invalid prisms.</li>
\image html viscous_layers_extrusion_method.png "Prisms created by the tree extrusion methods at the same other parameters"
</ul></li>
@ -107,9 +108,9 @@ computations.
Faces (or edges) can be selected either in the Object Browser or in
the VTK Viewer.
\note A mesh shown in the 3D Viewer can prevent selection of faces
and edges, just hide the mesh to avoid this. Sometimes a face to
select is hidden by other faces, in this case consider creating a
group of faces you want to select in the Geometry module.<br>
and edges, just hide the mesh to avoid this. If a face, which should be
selected, is hidden by other faces, consider creating a
group of faces to be selected in the Geometry module.<br>
To avoid a long wait when a
geometry with many faces (or edges) is displayed, the number of faces
(edges) shown at a time is limited by the value of "Sub-shapes
@ -150,12 +151,12 @@ computations.
Quadratic Mesh hypothesis allows to build a quadratic mesh (in which
links between element nodes are not straight but curved lines due to
presence of an additional midside node).
presence of an additional mid-side node).
This 1D hypothesis can be taken into account by
\ref a1d_algos_anchor "Wire Discretization" and
\ref a1d_algos_anchor "Composite Side Discretization" algorithms. To
make a quadratic mesh assign this hypothesis at
create a quadratic mesh assign this hypothesis at
\ref constructing_meshes_page "mesh construction".
See \ref adding_quadratic_elements_page
@ -168,9 +169,13 @@ for more information about quadratic meshes.
This additional hypothesis can be used together with 2D triangulation algorithms.
It allows 2D triangulation algorithms to build quadrangular meshes.
When used with "Quadrangle (Mapping)" meshing algorithm, that is obsolete
since introducing \ref hypo_quad_params_anchor "Quadrangle parameters"
hypothesis, this hypothesis has one restriction on its work: the total quantity of
segments on all four sides of the face must be even (divisible by 2).
Usage of this hypothesis with "Quadrangle (Mapping)" meshing algorithm
is obsolete since introducing
\ref hypo_quad_params_anchor "Quadrangle parameters" hypothesis.
Usage of this hypothesis with "Quadrangle (Mapping)" meshing algorithm
corresponds to specifying "Quadrangle Preference" transition type of
\ref hypo_quad_params_anchor "Quadrangle parameters" hypothesis.
\note "Quadrangle Preference" transition type can be used only if the
total quantity of segments on all sides of the face is even (divisible
by 2), else "Standard" transition type is used.
*/

View File

@ -7,26 +7,26 @@ used for meshing entities (1D, 2D, 3D sub-shapes) composing
geometrical objects.
An algorithm represents either an implementation of a certain meshing
technique or a interface to a whole meshing program generating elements
technique or an interface to the whole meshing program generating elements
of several dimensions.
<ul>
<li>For meshing of 1D entities (<b>edges</b>):</li>
\anchor a1d_algos_anchor
<ul>
<li><em>Wire Discretization</em> meshing algorithm - splits an edge into a
<li><b>Wire Discretization</b> meshing algorithm - splits an edge into a
number of mesh segments following an 1D hypothesis.
</li>
<li><em>Composite Side Discretization</em> algorithm - allows to apply an 1D
<li><b>Composite Side Discretization</b> algorithm - allows to apply a 1D
hypothesis to a whole side of a geometrical face even if it is
composed of several edges provided that they form C1 curve and form
one side in all faces of the main shape.</li>
composed of several edges provided that they form C1 curve in all
faces of the main shape.</li>
</ul>
<li>For meshing of 2D entities (<b>faces</b>):</li>
<ul>
<li><em>Triangle (Mefisto)</em> meshing algorithm - splits faces
<li><b>Triangle (Mefisto)</b> meshing algorithm - splits faces
into triangular elements.</li>
<li>\subpage quad_ijk_algo_page "Quadrangle (Mapping)" meshing
algorithm - splits faces into quadrangular elements.</li>
@ -39,8 +39,15 @@ number of mesh segments following an 1D hypothesis.
<li>For meshing of 3D entities (<b>solid objects</b>):</li>
<ul>
<li><em>Hexahedron (i,j,k)</em>meshing algorithm - 6-sided solids are
split into hexahedral (cuboid) elements.</li>
<li><b>Hexahedron (i,j,k)</b> meshing algorithm - solids are
split into hexahedral elements thus forming a structured 3D
mesh. The algorithm requires that 2D mesh generated on a solid could
be considered as a mesh of a box, i.e. there should be eight nodes
shared by three quadrangles and the rest nodes should be shared by
four quadrangles.
\image html hexa_ijk_mesh.png "Structured mesh generated by Hexahedron (i,j,k) on a solid bound by 16 faces"
</li>
<li>\subpage cartesian_algo_page "Body Fitting" meshing
algorithm - solids are split into hexahedral elements forming
a Cartesian grid; polyhedra and other types of elements are generated
@ -52,22 +59,25 @@ number of mesh segments following an 1D hypothesis.
\image html image126.gif "Example of a hexahedral 3D mesh"
</ul>
Some 3D meshing algorithms, such as Hexahedron(i,j,k) and some
commercial ones, also can generate 3D meshes from 2D meshes, working
without geometrical objects.
Some 3D meshing algorithms, such as Hexahedron(i,j,k) also can
generate 3D meshes from 2D meshes, working without geometrical
objects.
There is also a number of more specific algorithms:
<ul>
<li>\subpage prism_3d_algo_page "for meshing prismatic 3D shapes"</li>
<li>\subpage quad_from_ma_algo_page "for meshing faces with sinuous borders"</li>
<li>\subpage prism_3d_algo_page "for meshing prismatic 3D shapes with hexahedra and prisms"</li>
<li>\subpage quad_from_ma_algo_page "for quadrangle meshing of faces with sinuous borders"</li>
<li> <b>Polygon per Face</b> meshing algorithm - generates one mesh
face (either a triangle, a quadrangle or a polygon) per a geometrical
face using all nodes from the face boundary.</li>
<li>\subpage projection_algos_page "for meshing by projection of another mesh"</li>
<li>\subpage import_algos_page "for meshing by importing elements from another mesh"</li>
<li>\subpage radial_prism_algo_page "for meshing geometrical objects with cavities"</li>
<li>\subpage radial_quadrangle_1D2D_algo_page "for meshing special 2d faces (circles and part of circles)"</li>
<li>\subpage radial_prism_algo_page "for meshing 3D geometrical objects with cavities with hexahedra and prisms"</li>
<li>\subpage radial_quadrangle_1D2D_algo_page "for quadrangle meshing of disks and parts of disks"</li>
<li>\subpage use_existing_page "Use Edges to be Created Manually" and
\ref use_existing_page "Use Faces to be Created Manually" algorithms can be
used to create a 1D or a 2D mesh in a python script.</li>
<li>\subpage segments_around_vertex_algo_page "for defining the local size of elements around a certain node"</li>
\ref use_existing_page "Use Faces to be Created Manually" algorithms can be
used to create a 1D or a 2D mesh in a python script.</li>
<li>\subpage segments_around_vertex_algo_page "for defining the length of mesh segments around certain vertices"</li>
</ul>
\ref constructing_meshes_page "Constructing meshes" page describes in

View File

@ -2,8 +2,8 @@
\page borders_at_multi_connection_page Borders at multi-connection
\n This mesh quality control highlights segments according to number
of elements, faces and volumes, the segment belongs to.
\n This mesh quality control highlights segments according to the number
of elements, faces and volumes, to which the segment belongs.
\image html image151.gif

View File

@ -3,7 +3,7 @@
\page borders_at_multi_connection_2d_page Borders at multi-connection 2D
\n This mesh quality control highlights borders of faces (links
between nodes) according to number of faces the link belongs to.
between nodes) according to the number of faces, to which the link belongs.
\image html image127.gif

View File

@ -4,10 +4,10 @@
\n Compound Mesh is a combination of several meshes. All elements and
groups present in input meshes are present in the compound
mesh. Neither geometry nor hypotheses of initial meshes are used by
the compound mesh. No link between input meshes and a compound mesh is
supported, so that modification of an input mesh does not lead to
update of the compound mesh.
mesh. However, it does not use geometry or hypotheses of the initial meshes.
The links between the input meshes and the compound mesh are not
supported, consequently the modification of an input mesh does not lead to
the update of the compound mesh.
<em>To Build a compound mesh:</em>
@ -27,15 +27,16 @@ The following dialog box will appear:
<ul>
<li>\b Name - allows selecting the name of the resulting \b Compound mesh.</li>
<li><b>Meshes, sub-meshes, groups</b> - allows selecting the meshes,
sub-meshes and groups which will be concatenated. They can be
sub-meshes and groups to be concatenated. They can be
chosen in the Object Browser while holding \b Ctrl button.</li>
<li><b>Processing identical groups</b> - allows selecting the method
of processing the namesake groups existing in the input meshes.
They can be either <ul>
<li>\b United - all elements of Group1 of Mesh_1 and Group1 of Mesh_2
become the elements of Group1 of the Compound_Mesh, or</li>
<li>\b Renamed - Group1 of Mesh_1 becomes Group1_1 and Group1 of Mesh_2
becomes Group1_2.</li>
<li>\b United - all elements of \em Group1 of \em Mesh_1 and \em
Group1 of \em Mesh_2 become the elements of \em Group1 of the
\em Compound_Mesh, or</li>
<li>\b Renamed - \em Group1 of \em Mesh_1 becomes \em Group1_1
and \em Group1 of \em Mesh_2 becomes \em Group1_2.</li>
</ul>
See \ref grouping_elements_page "Creating Groups" for more information
about groups.</li>

View File

@ -41,11 +41,9 @@ To apply this algorithm when you define your mesh, select <b>Body
This dialog allows to define
<ul>
<li>\b Name of the algorithm. </li>
<li> Minimal size of a cell truncated by the geometry boundary. If the
size of a truncated grid cell is \b Threshold times less than a
initial cell size, then a mesh element is not created. </li>
<li> <b> Implement Edges </b> check-box activates incorporation of
geometrical edges in the mesh.
@ -64,9 +62,10 @@ This dialog allows to define
System.</li>
<li> You can define the \b Spacing of a grid as an algebraic formula
<em>f(t)</em> where \a t is a position along a grid axis
normalized at [0.0,1.0]. The whole range of geometry can be
divided into sub-ranges with their own spacing formulas to apply;
\a t varies between 0.0 and 1.0 within each sub-range. \b Insert button
normalized at [0.0,1.0]. <em>f(t)</em> must be non-negative
at 0. <= \a t <= 1. The whole extent of geometry can be
divided into ranges with their own spacing formulas to apply;
\a t varies between 0.0 and 1.0 within each \b Range. \b Insert button
divides a selected range into two. \b Delete button adds the
selected sub-range to the previous one. Double click on a range in
the list enables edition of its right boundary. Double click on a

View File

@ -28,12 +28,12 @@
element will be added to the list. To remove a selected element or
elements from the list click the \b Remove button. The \b Sort button
allows to sort the list of elements IDs. The <b>Set filter</b> button
allows to apply a definite \ref filtering_elements "filter" to
allows to apply a definite \ref filtering_elements "filter" to the
selection of elements.</li>
<li><b>Apply to all</b> radio button allows to modify the orientation
of all elements of the selected mesh.</li>
<li><b>Select from</b> set of fields allows to choose a sub-mesh or an
existing group whose elements then can be added to the list.</li>
existing group whose elements can be added to the list.</li>
</ul>
</li>

View File

@ -2,55 +2,54 @@
\page constructing_meshes_page Constructing meshes
To create a mesh on geometry, at first you create a mesh object by choosing
To create a mesh on geometry, it is necessary to create a mesh object by choosing
- a geometrical shape produced in the Geometry module (<em>main shape</em>);
- <em>meshing parameters</em>, including
- \ref basic_meshing_algos_page "meshing algorithms" and
- \ref about_hypo_page "hypotheses" specifying constraints to be
taken into account by chosen meshing algorithms.
taken into account by the chosen meshing algorithms.
Then you already can launch mesh generation by invoking \ref
compute_anchor "Compute" command.
Then you can launch mesh generation by invoking \ref compute_anchor "Compute" command.
\note Sometimes \a hypotheses term is used to refer to both algorithms
and hypotheses.
Generation of the mesh on the geometry is performed in the bottom-up
Mesh generation on the geometry is performed in the bottom-up
flow: nodes on vertices are created first, then edges are divided into
segments using nodes on vertices; the segments of the edges is then
used while meshing faces; then the mesh of the faces is used while meshing
segments using nodes on vertices; the node of segments are then
used to mesh faces; then the nodes of faces are used to mesh
solids. This automatically assures the conformity of the mesh.
You are to choose a meshing algorithm for every dimension of
sub-shapes up to the highest dimension you desire to generate. Note
that some algorithms generate elements of several dimensions while
others, of only one. But it's not necessary to define meshing
It is required to choose a meshing algorithm for every dimension of
sub-shapes up to the highest dimension to be generated. Note
that some algorithms generate elements of several dimensions, and
others of only one. It is not necessary to define meshing
parameters for all dimensions at once; you can start from 1D
meshing parameters only, compute the 1D mesh, then define 2D meshing
parameters and compute the 2D mesh (note that 1D mesh won't be
parameters and compute the 2D mesh (note that 1D mesh will not be
re-computed).
An algorithm of a certain dimension chosen at mesh creation is applied
to discretize every sub-shape of this dimension. But you can
to discretize every sub-shape of this dimension. It is possible to
specify a different algorithm or hypothesis to be applied to one or
a group of sub-shapes by creating a \ref constructing_submeshes_page
"sub-mesh". You can specify no algorithms at all at mesh object
creation and specify the meshing parameters on sub-meshes only; then
only sub-shapes for which you defined an algorithm and a needed
hypothesis (if any) will be discretized.
only the sub-shapes, for which an algorithm and a hypothesis (if any)
have been defined will be discretized.
\n Construction of a mesh on some geometry includes at least two (mesh
creation and computing) of the following steps:
\n Construction of a mesh on a geometry includes at least two
(\ref create_mesh_anchor "mesh creation" and
\ref compute_anchor "computing") of the following steps:
<ul>
<li> \ref create_mesh_anchor "Creation of a mesh object" where you
<li> \ref create_mesh_anchor "Creation of a mesh object", where you
can specify meshing parameters to apply to all sub-shapes of the
main shape.</li>
<li> \ref constructing_submeshes_page "Creation of sub-meshes"
(optional) where you can specify meshing parameters to apply to
<li> \ref constructing_submeshes_page "Creation of sub-meshes",
(optional) where you can specify meshing parameters to apply to the
selected sub-shapes.</li>
<li> \ref evaluate_anchor "Evaluating mesh size" (optional) can be
used to know approximate number of elements before actual generation
of them.</li>
used to know an approximate number of elements before their actual generation.</li>
<li> \ref preview_anchor "Previewing the mesh" (optional) can be
used to generate mesh of only lower dimension(s) in order to
visually estimate it before full mesh generation, which can be much
@ -61,8 +60,8 @@ creation and computing) of the following steps:
<li> \ref compute_anchor "Computing the mesh" uses defined meshing
parameters to generate mesh elements.</li>
<li> \ref edit_anchor "Editing the mesh" (optional) can be used to
\ref modifying_meshes_page "modify" mesh of lower dimension before
\ref compute_anchor "computing" elements of upper dimension.</li>
\ref modifying_meshes_page "modify" the mesh of a lower dimension before
\ref compute_anchor "computing" elements of an upper dimension.</li>
</ul>
\anchor create_mesh_anchor
@ -103,10 +102,10 @@ creation and computing) of the following steps:
3D sub-shapes (solids) and generate 3D mesh elements
(tetrahedra, hexahedra etc.)
As soon as you have selected an algorithm, you can create (or
select already created) a hypothesis. A set of accessible
hypotheses includes only hypotheses the selected algorithm can take
into account.
As soon as you have selected an algorithm, you can create a
hypothesis (or select an already created one). A set of accessible
hypotheses includes only the hypotheses that can be used by the
selected algorithm.
\note
- Some page(s) can be disabled if the geometrical
@ -115,10 +114,10 @@ creation and computing) of the following steps:
\b 3D page is disabled.
- Some algorithms affect the geometry of several dimensions,
i.e. 1D+2D or 1D+2D+3D. If such an algorithm is selected, the
dialog box pages related to the corresponding lower dimensions are
dialog pages related to the corresponding lower dimensions are
disabled.
- \b 0D page does not refer to the 0D elements, but to 0D
geometry (vertices). Mesh module does not provide algorithms that
- \b 0D page refers to 0D geometry (vertices) rather than
to 0D elements. Mesh module does not provide algorithms that
produce 0D elements. Currently \b 0D page provides only one
algorithm "Segments around vertex" that allows specifying the required
size of mesh edges about the selected vertex (or vertices).
@ -126,9 +125,9 @@ creation and computing) of the following steps:
For example, you need to mesh a 3D object.
First, you can change a default name of your mesh in the \b Name
box. Then check that a selected geometrical object, whose name is
shown in \b Geometry field, is that you wish to mesh; if not, click
the right object in the Object Browser. Click "Select" button
box. Then check that the selected geometrical object indicated in
\b Geometry field, is what you wish to mesh; if not, select
the correct object in the Object Browser. Click "Select" button
near \b Geometry field if the name of the object has not yet
appeared in \b Geometry field.
<center>
@ -189,13 +188,9 @@ creation and computing) of the following steps:
which is a 2D object, you do not need to define a 3D Algorithm and
Hypotheses.
In the <b>Object Browser</b> the structure of the new mesh will be
In the <b>Object Browser</b> the structure of the new mesh is
displayed as follows:
<center>
\image html image88.jpg
</center>
It contains:
<ul>
<li>a mesh name (<em>Mesh_mechanic</em>);
@ -205,6 +200,13 @@ creation and computing) of the following steps:
to the hypotheses chosen at the construction of the mesh;</li>
<li><b>Applied algorithms</b> folder containing the references
to the algorithms chosen at the construction of the mesh.</li>
<li><b>SubMeshes on Face</b> folder containing the sub-meshes
defined on geometrical faces. There also can be folders for
sub-meshes on vertices, edges, wires, shells, solids and
compounds.</li>
<li><b>Groups of Faces</b> folder containing the groups of mesh
faces. There also can be folders for groups of nodes, edges,
volumes 0D elements and balls.</li>
</ul>
There is an alternative way to assign Algorithms and Hypotheses by
@ -214,21 +216,32 @@ creation and computing) of the following steps:
CustomMeshers.xml file located in the home directory. CustomMeshers.xml
file must describe sets of hypotheses in the
same way as ${SMESH_ROOT_DIR}/share/salome/resources/smesh/StdMeshers.xml
file does (sets of hypotheses are enclosed between <hypotheses-set-group>
tags).
<center>
file does (sets of hypotheses are enclosed between \<hypotheses-set-group\>
tags). For example:
~~~~~~{.xml}
<?xml version='1.0' encoding='us-ascii'?>
<!DOCTYPE meshers PUBLIC "" "desktop.dtd">
<meshers>
<hypotheses-set-group>
<hypotheses-set name="My favorite hypotheses"
hypos="AutomaticLength"
algos="CompositeSegment_1D, Quadrangle_2D, GHS3D_3D"/>
</hypotheses-set-group>
</meshers>
~~~~~~
If the file contents are incorrect, there can be an error at
activation of Mesh module: <em>"fatal parsing error: error
triggered by consumer in line ..."</em>
<br>
<center>
\image html hypo_sets.png
List of sets of hypotheses. Tag <em>[custom]</em> is
automatically added to the sets defined by the user.
</center>
</center>
\note
- \a "Automatic" in the names of predefined sets of
hypotheses came from previous versions of SALOME where
\ref automatic_length_anchor "Automatic Length" hypothesis
was included in these sets, and not that these sets are suitable for
meshing any geometry.
- \a "Automatic" in the names of predefined sets of hypotheses
does not actually mean that they are suitable for meshing any
geometry.
- The list of sets of hypotheses can be shorter than in the
above image depending on the geometry dimension.
</li>
@ -253,7 +266,9 @@ information box:
<h2>Previewing the mesh</h2>
Before \ref compute_anchor "the mesh computation", it is also possible
to see the mesh preview.
to see the mesh preview. This operation allows to incrementally
compute the mesh, dimension by dimension, and to discard an
unsatisfactory mesh.
For this, select the mesh in the Object Browser. From the \b Mesh menu
select \b Preview or click "Preview" button in the toolbar or activate
@ -371,8 +386,8 @@ will see the following information.
It is equally possible to skip \ref evaluate_anchor "the Evaluation"
and \ref preview_anchor "the Preview" and to \b Compute the mesh after
the hypotheses are assigned. For this, select your mesh in
the <b>Object Browser</b>. From the \b Mesh menu select \b Compute or
click "Compute" button of the toolbar.
the <b>Object Browser</b>. From the \b Mesh menu or the context menu
select \b Compute or click \a "Compute" button of the toolbar.
<center>
\image html image28.png
@ -381,24 +396,25 @@ click "Compute" button of the toolbar.
After the mesh computation finishes, the Mesh Computation information
box appears. If you close this box and click "Compute" button again,
without previously changing meshing parameters, the mesh is
NOT re-computed and the Mesh Computation information box with
the same contents is shown. (To fully re-compute the mesh, invoke \ref
clear_mesh_anchor "Clear Mesh Data" command before).
without previously changing meshing parameters, the mesh will NOT be
re-computed and the Mesh Computation information box will be shown
with the same contents. (To fully re-compute the mesh, invoke
\ref clear_mesh_anchor "Clear Mesh Data" command before).
In case of a success, the box shows information on number of entities
of different types in the mesh.
If the mesh computation has been a success, the box shows information
on the number of entities of different types in the mesh.
\image html meshcomputationsucceed.png
\anchor meshing_failed_anchor
If the mesh computation failed, the information about the cause of the
If the mesh computation has failed, the information about the cause of the
failure is provided in \b Errors table.
\image html meshcomputationfail.png
After you select an error, <b>Show Sub-shape</b> button allows
visualizing in magenta the geometrical entity that causes the error.
After you select an error in \b Errors table, <b>Show Sub-shape</b> button allows
visualizing in magenta the geometrical entity meshing of which failed
(Name of this entity or its ID and type is shown in \a Sub-shape column).
<center>
\image html failed_computation.png
@ -439,12 +455,12 @@ By default, the information box is always shown after mesh computation operation
\anchor edit_anchor
<h2>Editing the mesh</h2>
It is possible to \ref modifying_meshes_page "edit the mesh" of
lower dimension before generation of mesh of higher dimension.
It is possible to \ref modifying_meshes_page "edit the mesh" of a
lower dimension before generation of the mesh of a higher dimension.
For example you can generate 2D mesh, modify it using e.g.
\ref pattern_mapping_page, and then generate 3D mesh basing on the
modified 2D mesh. The workflow is following:
For example you can generate a 2D mesh, modify it using e.g.
\ref pattern_mapping_page, and then generate a 3D mesh basing on the
modified 2D mesh. The workflow is as follows:
- Define 1D and 2D meshing algorithms.
- Compute the mesh. 2D mesh is generated.
- Apply \ref pattern_mapping_page.
@ -453,9 +469,9 @@ and hypotheses.
- Compute the mesh. 3D mesh is generated.
\note Nodes and elements added \ref adding_nodes_and_elements_page
"manually" can't be used in this workflow because the manually created
entities are not attached to any geometry and thus (usually) can't be
found by a mesher paving some geometry.
"manually" cannot be used in this workflow because the manually created
entities are not attached to any geometry and thus (usually) cannot be
found by the mesher paving a geometry.
<b>See Also</b> a sample TUI Script demonstrates the possibility of
\ref tui_editing_while_meshing "Intermediate edition while meshing"

View File

@ -11,8 +11,8 @@ and/or hypotheses than those used to generate the mesh on other
sub-shapes.
Creation of a sub-mesh allows to control individually meshing of a
certain sub-shape, thus allowing to get mesh locally coarser or finer, to get
elements of different types in the same mesh etc.
certain sub-shape, thus to get a locally coarser or finer mesh, to get
elements of different types in the same mesh, etc.
A sub-shape to create a sub-mesh on should be retrieved from the main shape
in one of the following ways: <ul>
@ -33,7 +33,7 @@ compound of solids, starts from searching an algorithm, 1D as for the
edge. The following sub-shapes are sequentially checked for presence
of a sub-mesh where 1D algorithm is assigned:
<ul>
<li> the \b edge it-self</li>
<li> the \b edge itself</li>
<li> <b>groups of edges</b> containing the edge, if any</li>
<li> \b wires sharing the edge</li>
<li> \b faces sharing the edge</li>
@ -43,29 +43,28 @@ of a sub-mesh where 1D algorithm is assigned:
<li> <b>groups of solids</b> sharing the edge, if any</li>
<li> the <b>main shape</b></li>
</ul>
(This sequence of sub-shapes defines priority of sub-meshes. Thus more
(This sequence of sub-shapes defines the priority of sub-meshes. Thus more
local, i.e. assigned to sub-shape of lower dimension, algorithms and
hypotheses have higher priority during the search of hypotheses to
apply.)
As soon as an 1D algorithm is found the search stops and the same
sequence of sub-shapes is checked to find a main and additional 1D
hypotheses the found 1D algorithm can take into account.
As soon as a 1D algorithm is found, the search stops and the same
sequence of sub-shapes is checked to find the main and additional 1D
hypotheses, which can be taken into account by the found 1D algorithm.
The multi-dimensional algorithms have higher priority than
uni-dimensional algorithms if they are assigned to sub-meshes of the
The multi-dimensional algorithms have a higher priority than
uni-dimensional ones if they are assigned to sub-meshes of the
same priority.
If meshing parameters are defined on sub-meshes of the same priority,
for example different 1D hypotheses are assigned to two faces sharing
for example, different 1D hypotheses are assigned to two faces sharing
an edge, the hypothesis assigned to a sub-shape with a lower ID will
be used for meshing. You can \ref submesh_order_anchor "change" mutual
priority of such concurrent sub-meshes.
\n Construction of a sub-mesh consists of:
<ul>
<li>Selecting a mesh which will encapsulate your sub-mesh</li>
<li>Selecting a mesh which will encapsulate the sub-mesh</li>
<li>Selecting a sub-shape for meshing</li>
<li>Applying one or several
\ref about_hypo_page "hypotheses" and
@ -94,7 +93,7 @@ Geometry (e.g. a face if the parent mesh has been built on box) of the
sub-mesh. You can define meshing algorithms and hypotheses in the same way as
in \ref constructing_meshes_page "Create mesh" dialog.
Later you can change applied hypotheses or their parameters in
Later you can change the applied hypotheses or their parameters in
\ref editing_meshes_page "Edit mesh/sub-mesh" dialog. Mesh entities
generated using changed hypotheses are automatically removed.

View File

@ -51,7 +51,7 @@ The following dialog box will appear:
<center>Quadratic mesh</center>
</li>
<li>Click the \b Apply or \b OK button.</li>
<li>Click the \b Apply or <b>Apply and Close</b> button.</li>
</ol>
<br><b>See Also</b> a sample TUI Script of a \ref tui_quadratic "Convert to/from quadratic" operation.

View File

@ -14,9 +14,9 @@ menu in the Object browser <b>Create Groups from Geometry</b> item.
\image html create_groups_from_geometry.png
In this dialog \b Elements group contains a list of shapes to create
groups of elements on them; \b Nodes group contains a list of shapes
to create groups of node on them.
In this dialog \b Elements group contains a list of shapes, on which
groups of elements will be created; \b Nodes group contains a list of shapes,
on which groups of nodes will be created.
*/

View File

@ -23,7 +23,9 @@ elements which will form your group:</li>
</ul>
<li><b>Name</b> field allows to enter the name of your new group.</li>
<li><b>Color</b> - allows to assign to the group a certain color. The
chosen color is used to display the elements of the group.</li>
chosen color is used to display the elements of the group.<br>
Activation of <em>Auto Color</em> item in mesh context menu
switches on a random choice of a color for a new group.</li>
</ul>
Mesh module distinguishes between the three Group types:
<b>Standalone Group</b>, <b>Group on Geometry</b> and <b>Group on Filter</b>.
@ -98,11 +100,11 @@ of a certain type generated on the selected geometrical object. Group
contents are dynamically updated if the mesh is modified. The group on
geometry can be created only if the mesh is based on geometry.
To define a group, click a \a Selection button and chose
To define a group, click the \a Selection button and choose
- <em>Direct geometry selection</em> to select a shape in the Object
Browser or in the Viewer;
- <em>Find geometry by mesh element selection</em> to activate a
dialog which retrieves a shape by a selected element generated on
dialog which retrieves a shape by the selected element generated on
this shape.
Note that this choice is available only if the mesh elements are
@ -130,8 +132,8 @@ of a certain type satisfying the defined filter. Group contents are
dynamically updated if the mesh is modified.
To define a group, click the <b>Set filter</b> button and define
criteria of the filter in the opened dialog. After confirmation of the
operation a new group of mesh elements will be created. See more about
criteria of the filter in the opened dialog. After the
operation is confirmed, a new group of mesh elements will be created. See more about
filters on the
\ref selection_filter_library_page "Selection filter library" page.

View File

@ -18,7 +18,8 @@ The following dialog box shall appear:
\image html diagonalinversion.png
</li>
<li>Enter IDs of nodes forming the required edge in the \b Edge field (the node IDs must be separated by a dash) or select
<li>Enter IDs of nodes forming the required edge in the \b Edge field
(the node IDs must be separated by dashes) or select
this edge in the 3D viewer.</li>
<li>Click the \b Apply or <b>Apply and Close</b> button.</li>
</ol>

View File

@ -8,7 +8,7 @@ mesh of plus one dimension are additionally created. All created
elements can be automatically grouped. Extrusion can be used to create
a \ref extrusion_struct "structured mesh from scratch".
\image html extrusion_box.png "If you extrude several quadrangles, you get exactly same mesh as if you meshed a geometrical box (except that the initial quadrangles can be incorrectly oriented): quadrangles and segments on boundary of generated mesh are created"
\image html extrusion_box.png "If you extrude several quadrangles, you get exactly the same mesh as if you meshed a geometrical box (except for that the initial quadrangles can be incorrectly oriented): quadrangles and segments are created on the boundary of the generated mesh"
<p>Any node, segment or 2D element can be extruded. Each type of
elements is extruded into a corresponding type of result elements:
@ -22,6 +22,14 @@ elements is extruded into a corresponding type of result elements:
<tr><td>Hexagonal polygon </td><td> Hexagonal prism </td></tr>
</table>
When 2D elements are extruded, in addition to 3D elements segments are
created on ribs of the result 3D mesh. Free edges of input 2D elements
generate logically horizontal rib segments. Logically vertical rib
segments are generated from nodes belonging to a sole input 2D element
(a figure below illustrates this rule).
\image html extru_rib_segs.png "Two triangles extruded: no vertical rib segments generated from nodes #2 and #3 as they are shared by both triangles"
<em>To use extrusion:</em>
<ol>
<li>From the \b Modification menu choose the \b Extrusion item or click
@ -32,24 +40,24 @@ elements is extruded into a corresponding type of result elements:
<em>"Extrusion" button</em>
</center>
The following dialog, looking different depending on selected options,
will appear:
The following dialog will appear:
\image html extrusionalongaline1.png
\image html extrusionalongaline2.png
\image html extrusionalongaline3.png
</li>
<li>In this dialog:
<ul>
<li>Use \a Selection button to specify what you are going to
select at a given moment, \b Nodes, \b Edges or \b Faces.
\image html image120.png
<center><em>"Selection" button</em></center>
</li>
<li>Specify \b Nodes, \b Edges and \b Faces, which will be extruded, by one
of following means:
<ul>
<li><b>Select the whole mesh, sub-mesh or group</b> activating this
checkbox.</li>
<li><b>Select the whole mesh, sub-mesh or group</b> activating the
corresponding check-box.</li>
<li>Choose mesh elements with the mouse in the 3D Viewer. It is
possible to select a whole area with a mouse frame.</li>
<li>Input the element IDs directly in <b>Node IDs</b>, <b>Edge
@ -63,7 +71,11 @@ will appear:
<li>If the <b>Extrusion to Distance</b> radio button is selected
- specify the translation vector by which the elements will be extruded.
</li>
<li>If the <b>Extrusion Along Vector</b> radio button is selected
<p><br></p>
\image html extrusionalongaline2.png
<li>If the <b>Extrusion Along Vector</b> radio button is selected
<ul>
<li>specify the coordinates of the \b Vector along which the elements
will be extruded, either directly or by selecting the mesh face (the
@ -72,19 +84,23 @@ will appear:
be negative).</li>
</ul>
</li>
<p><br></p>
\image html extrusionalongaline3.png
<li>If the <b>Extrusion By Normal</b> radio button is selected,
every node of selected faces is extruded along the \a average
every node of the selected faces is extruded along the \a average
of the \a normal vectors to the faces sharing the node. (Nodes and
edges can't be extruded in this mode.)
edges cannot be extruded in this mode.)
<ul>
<li>Specify the \b Distance of extrusion (it can be negative),</li>
<li>Use <b>Along average normal</b> check-box to specify along
what vector the distance is measured.
which vector the distance is measured.
<ul>
<li>If it is \a activated the distance is measured along the
average normal mentioned above. </li>
<li>If it is \a deactivated every node is extruded along the
average normal till its intersection with the virtual plane got
average normal till its intersection with a virtual plane obtained
by translation of the face sharing the node along its own normal
by the \b Distance.</li>
</ul>
@ -95,8 +111,8 @@ will appear:
\image html extrusionbynormal_alongavgnorm.png "'Along average normal' activated (to the left) and deactivated (to the right)"
<p></li>
<li>Using <b>Use only input elements</b> check-box specify what
elements to use to compute the average normal.<ul>
<li><b>Use only input elements</b> check-box specifies what
elements will be used to compute the average normal.<ul>
<li> If it is \a activated only selected faces, among faces
sharing the node, are used to compute the average normal at
the node. </li>

View File

@ -2,14 +2,16 @@
\page free_borders_page Free borders
\n This mesh quality control highlights borders of faces consisting of
1D elements (segments) belonging to one face only.
\n This mesh quality control highlights 1D elements (segments)
belonging to one element (face or volume) only.
\image html free_borders1.png
In this picture the free borders are displayed in white.
In this picture the free borders are displayed in red. (Faces are
explicitly shown via <em>Display Entity</em> menu as all elements but
segments are hidden upon this control activation).
<br><b>See Also</b> a sample TUI Script of a
\ref tui_free_borders "Free Borders quality control" operation.
*/
*/

View File

@ -3,7 +3,7 @@
\page free_edges_page Free edges
\n This mesh quality control highlights borders of faces
consisting of node links belonging to one face only.
(links between nodes, not mesh segments) belonging to one face only.
\image html free_edges.png
<center>In this picture some elements of mesh have been deleted and

View File

@ -19,12 +19,12 @@ In this dialog box specify <ul>
<li>\b All - include if all nodes are common;</li>
<li>\b Main - include if all corner nodes are common (meaningful for
a quadratic mesh) </li>
<li><b>At least one</b> - include if one or more node is common</li>
<li>\b Majority - include if half of nodes or more is common</li></ul>
<li><b>At least one</b> - include if one or more nodes are common</li>
<li>\b Majority - include if half or more nodes are common</li></ul>
</li>
<li> select reference groups,</li>
<li> <b>Include underlying entities only</b> option if activated
allows inclusion of an entity provided that it is based on nodes of
<li> If <b>Include underlying entities only</b> option is activated
an entity can be included if it is based on nodes of
one element of a reference group.</li>
</ul>

View File

@ -12,35 +12,36 @@ visualization only and is not exported.
There are three types of groups different by their internal
organization:<ol>
<li><b>Standalone group</b> is a static set of mesh entities. Its
contents can be explicitely controlled by the user. Upon removal of
contents can be explicitly controlled by the user. Upon removal of
the entities included into the group, the group becomes empty and
the user is to pay efforts to restore its contents. Hence it is
resonable to create standalone groups when the mesh generation is
its content can be restored only manually. Hence it is
reasonable to create standalone groups when the mesh generation is
finished and mesh quality is verified.
\warning Creation and edition of large standalone groups in
\ref creating_groups_page "Create group" dialog using manual edition
is problematic due to poor performance of the dialog.</li>
<li><b>Group on geomerty</b> is associated to one or a group of
<li><b>Group on geometry</b> is associated to a sub-shape or a group of
sub-shapes of the main shape and includes mesh entities generated on
this geometrical entities. The association to geometry is
established at group construction and can't be changed. The group
contents is always up-to-date without user's efforts, hence the
these geometrical entities. The association to a geometry is
established at group construction and cannot be changed. The group
contents are always updated automatically, hence the
group can be created even before mesh elements generation.</li>
<li><b>Group on filter</b> encapsulates a filter which is used to
<li><b>Group on filter</b> encapsulates a filter, which is used to
select mesh entities composing the group from the whole
mesh. Criteria of the filter can be changed at any time. The
group contents is always up-to-date without user's efforts, hence
group contents are always updated automatically, hence
the group can be created even before mesh elements generation.</li>
</ol>
The group on geometry and group on filter can be converted to
the standalone group.
a standalone group.
\image html groups_in_OB.png "Groups of different types look differently in the Object Browser"
The following ways of group creation are possible:
- \subpage creating_groups_page "Create group" dialog allows creation of
a group of any of all the three types:
a group of any type:
\ref standalone_group "Standalone group",
\ref group_on_geom "Group on geometry" and
\ref group_on_filter "Group on filter" using dedicated tabs.
@ -49,7 +50,7 @@ The following ways of group creation are possible:
- Standalone groups of all nodes and elements of the chosen sub-mesh
(type of elements depends on dimension of sub-mesh geometry) can
be created using <b>Mesh -> Construct Group</b> menu item (available
in context menu as well).
from the context menu as well).
- Standalone groups of any element type can be created basing on nodes
of other groups - using \subpage group_of_underlying_elements_page
"Group based on nodes of other groups" dialog.
@ -69,10 +70,9 @@ The created groups can be later:
- \ref importing_exporting_meshes_page "Exported" into a file as a
whole mesh.
In the Object Browser, if groups container item includes more
than one group, it is possible to sort the groups by name in
ascending order. For this, select the groups container in the Object
Browser and choose <b>Sort children</b> context menu item.
In the Object Browser, if an item contains more than one child group,
it is possible to sort the groups by name in ascending order
using <b>Sort children</b> context menu item.
\image html smesh_sort_groups.png "Sorting groups"

View File

@ -4,8 +4,8 @@
\n In MESH there is a functionality allowing import/export
of meshes from/to \b MED, \b UNV (I-DEAS 10), \b DAT (simple ascii format), \b STL,
\b GMF (internal format of DISTENE products, namely BLSurf, GHS3D and
Hexotic algorithms) and \b CGNS format files. You can also export a
\b GMF (internal format of DISTENE products, namely MG-CADSurf, MG-Tetra and
MG-Hexa algorithms) and \b CGNS format files. You can also export a
group as a whole mesh.

View File

@ -16,25 +16,31 @@
either \ref importing_exporting_meshes_page "imported" or manually
created);
</li>
<li>\ref importing_exporting_meshes_page "import and export of meshes in various formats";</li>
<li>\ref importing_exporting_meshes_page "importing and exporting meshes"
in various formats;</li>
<li>\subpage modifying_meshes_page "modifying meshes" with a vast
array of dedicated operations;</li>
<li>\subpage grouping_elements_page "creating groups of mesh elements";</li>
<li>\subpage grouping_elements_page "creating groups" of mesh
elements;</li>
<li>filtering mesh entities (nodes or elements) using
\subpage filters_page "Filters" functionality for \ref
grouping_elements_page "creating groups" and applying \ref
modifying_meshes_page "mesh modifications";</li>
<li>\subpage viewing_meshes_overview_page "viewing meshes" in
the VTK viewer;</li>
the VTK viewer and \ref mesh_infos_page "getting info" on mesh
and its sub-objects;</li>
<li>applying to meshes \subpage quality_page "Quality Controls",
allowing to highlight important elements;
<li>various \subpage measurements_page "measurements" of the mesh objects.
allowing to highlight important elements;</li>
<li>taking various \subpage measurements_page "measurements" of the
mesh objects.</li>
</ul>
When setting parameters of operations, it is possible to use the variables predefined in
\subpage using_notebook_mesh_page "Salome notebook".
It is possible to use the variables predefined in
\subpage using_notebook_mesh_page "Salome notebook" to set parameters
of operations.
Mesh module preferences are described in the \subpage mesh_preferences_page section of SALOME Mesh Help.
Mesh module preferences are described in the \subpage mesh_preferences_page
section of SALOME Mesh Help.
Almost all mesh module functionalities are accessible via
\subpage smeshpy_interface_page "Mesh module Python interface".

View File

@ -2,68 +2,62 @@
\page merging_elements_page Merging Elements
\n This functionality allows to merge coincident elements of a mesh
object selectable in the dialog box. Two elements are considered coincident if they are based on the same set of nodes.
\n This functionality allows to merge coincident elements of a
mesh. Two elements are considered coincident if they are based on the
same set of nodes.
\image html mergeelems_ico.png "Merge elements menu button"
<ol>
<li>Choose in the main menu \b Modification -> \b Transformation
-> <b>Merge elements</b> item. The following dialog box shall
appear:</li>
To merge elements choose in the main menu \b Modification -> \b Transformation
-> <b>Merge elements</b> item. The following dialog box shall
appear:
\image html mergeelems_auto.png
<br>
<ul>
<li>\b Name is the name of the mesh object whose elements will be
merged.</li>
<li>\b Automatic or \b Manual Mode allows choosing how the elements
are processed.
</ul>
<li><b>Automatic mode:</b>
In this dialog:
<ul>
<li>In the \b Automatic Mode the elements created on the same nodes
will be merged.</li>
</ul>
</li>
<li>\b Name is the name of the mesh object whose elements will be
merged.</li>
<li>\b Automatic or \b Manual Mode allows choosing how the elements
are processed. In the \b Automatic Mode all elements created on
the same nodes will be merged. In \b Manual mode you can adjust
groups of coincident elements detected by the program.
<li>If the \b Manual Mode is selected, additional controls are
available:
If the \b Manual Mode is selected, additional controls are
available:
\image html mergeelems.png
<br>
<ul>
<li>\b Detect button generates the list of coincident elements found
in the selected object.</li>
<li><b>Coincident elements</b> is a list of groups of elements for
merging. As result of the operation all elements of each group will
be replaced by the firts element of the group.
<ul>
<li>\b Remove button deletes the selected group from the list.</li>
<li>\b Add button adds to the list a group of elements selected in the
viewer with pressed "Shift" key.</li>
<li><b>Select all</b> checkbox selects all groups.</li>
<li><b>Show double elements IDs</b> checkbox shows/hides identifiers of
elements of selected groups in the 3D viewer.</li>
</ul></li>
<li><b>Edit selected group</b> list allows editing the selected group:
<br><br>
\image html add.png
<center>adds to the group the elements selected in the viewer.</center>
<br>
\image html remove.png
<center>removes from the group the selected elements.</center>
<br>
\image html sort.png
<center>moves the selected element to the first position in the
group. This means that all other elements of the group will be
replaced by this one.</center>
<br>
</li>
<li>To confirm your choice click \b Apply or <b>Apply and Close</b> button.</li>
<li>\b Detect button generates the list of coincident elements found
in the selected object.</li>
<li><b>Coincident elements</b> is a list of groups of elements for
merging. After the operation all elements of each group will
be united into one element. The first element of a group is kept and
the others are removed.
<li>\b Remove button deletes the selected group from the list.</li>
<li>\b Add button adds to the list a group of elements selected in the
viewer with pressed "Shift" key.</li>
<li><b>Select all</b> check-box selects all groups.</li>
<li><b>Show double elements IDs</b> check-box shows/hides identifiers of
elements of the selected groups in the 3D viewer.</li>
<li><b>Edit selected group of coincident elements</b> list allows
editing the selected group:
<br><br>
\image html add.png
<center>adds to the group the elements selected in the viewer.</center>
<br>
\image html remove.png
<center>removes the selected elements from the group.</center>
<br>
\image html sort.png
<center>moves the selected element to the first position in the
group in order to keep it in the mesh.</center>
<br>
</li>
</ul>
<li>To confirm your choice click \b Apply or <b>Apply and Close</b> button.</li>
</ul>
</ol>
In this picture you see a triangle which coincides with one of the
elements of the mesh. After we apply <b>Merge Elements</b> functionality, the

View File

@ -18,35 +18,59 @@ then converted to the single node.
<ul>
<li>\b Name is the name of the mesh whose nodes will be merged.</li>
<li>\b Automatic or \b Manual mode allows choosing how the nodes are
processed.
processed. In \b Manual mode you can adjust groups of coincident nodes
detected by the program and/or select any nodes to be merged.</li>
<li>\b Tolerance is a maximum distance between nodes sufficient for
merging.</li>
<li><b>Exclude Groups</b> group box allows to ignore the nodes which
belong to the specified mesh groups.
<li>Activation of <b>No merge of corner and medium nodes of quadratic
cells</b> check-box prevents merging medium nodes of quadratic
elements with corner nodes. This check-box is enabled provided
that the selected mesh includes quadratic elements.</li>
<li><b>Exclude groups from detection</b> group allows to ignore the
nodes which belong to the specified mesh groups. This control is
active provided that the mesh includes groups.</li>
<li><b>Nodes to keep during the merge</b> group allows to specify
nodes to keep in the mesh. (By default a node being the first in a
group of coincident nodes is kept.) It is possible to either select
nodes in the Viewer or select groups of any element type whose nodes
will be kept.
<ul>
<li>\a Selection button activates selection of nodes to keep.</li>
<li><b>Nodes</b> button activates selection of nodes in the
Viewer.</li>
<li><b>Groups and sub-meshes</b> button activates selection of
groups and sub-meshes.</li>
<li>\b Add button adds selected nodes or groups to the list.</li>
<li> Nodes or groups selected in the list can be removed using \b
Remove button.</li>
</ul>
</li>
</ul>
<li><b>Automatic mode:</b>
<br>
<ul>
<li>In the \b Automatic Mode all Nodes within the indicated tolerance
will be merged. The nodes which belong to the groups specified in the
<b>Exclude Groups</b> will be not taken into account.</li>
<li>In the \b Automatic Mode all nodes within the indicated tolerance
will be merged. The nodes which belong to the groups specified in
<b>Exclude groups from detection</b> will NOT be taken into account.</li>
</ul>
</li><br>
<li> The \b Manual mode gives you full control of what the operation will do.
In this mode additional controls are available:
<ul>
<li>\b Detect button generates the list of coincident nodes for the given
\b Tolerance.</li>
<li><b>Coincident nodes</b> is a list of groups of nodes for
merging. As result of the operation all nodes of each group will be
replaces by the firts node of the group.
<li>\b Detect button generates the list of coincident nodes for the given
\b Tolerance.</li>
<li><b>Coincident nodes</b> is a list of groups of nodes for
merging. Upon \b Apply all nodes of each group will
be united into one node. The first node of a group is kept and
the others are removed. By default the first node has a lowest ID
within the group.
<ul>
<li>\b Remove button deletes the selected group from the list.</li>
<li>\b Add button adds to the list a group of nodes selected in the
viewer with pressed "Shift" key.</li>
<li><b>Select all</b> checkbox selects all groups.</li>
<li><b>Show double nodes IDs</b> checkbox shows/hides identifiers of
viewer.</li>
<li><b>Select all</b> check-box selects all groups.</li>
<li><b>Show double nodes IDs</b> check-box shows/hides identifiers of
nodes of selected groups in the 3D viewer.</li>
</ul>
@ -54,28 +78,32 @@ nodes of selected groups in the 3D viewer.</li>
\image html mergenodes.png
<br>
</li>
<li><b>Edit selected group</b> list allows editing the selected
group:
<br><br>
\image html add.png
<center>adds to the group the nodes selected in the viewer.</center>
<br>
\image html remove.png
<center>removes from the group the selected nodes.</center>
<br>
\image html sort.png
<center>moves the selected node to the first position in the
group. This means that all other nodes of the group will be
replaced by this one.</center><br>
</li>
<li><b>Edit selected group of coincident nodes</b> list allows
editing the selected group:
<br><br>
\image html add.png
<center>adds to the group the nodes selected in the viewer.</center>
<br>
\image html remove.png
<center>removes from the group the selected nodes.</center>
<br>
\image html sort.png
<center>moves the selected node to the first position in the
group in order to keep it in the mesh.</center><br>
</li>
</ul>
</li>
<li>To confirm your choice click \b Apply or <b>Apply and Close</b> button.</li>
</ol>
\image html merging_nodes1.png "The initial obgect"
\image html merging_nodes2.png "The object has been merged with a very big tolerance"
\image html merging_nodes1.png
<center> The initial object. Nodes 25, 26 and 5 are added to <b>Nodes
to keep during the merge</b> group.
</center>
<br>
\image html merging_nodes2.png
<center> The object has been merged
</center>
<br><b>See Also</b> a sample TUI Script of a
\ref tui_merging_nodes "Merge Nodes" operation.

View File

@ -14,14 +14,16 @@ in the toolbar.
<em>"Mesh Information" button</em></center>
The <b>Mesh Information</b> dialog box provides three tab pages:
- <b>\ref advanced_mesh_infos_anchor "Base Info"</b> - to show base
information about the selected mesh object.
- <b>\ref advanced_mesh_infos_anchor "Base Info"</b> - to show
base and quantitative information about the selected mesh object.
- <b>\ref mesh_element_info_anchor "Element Info"</b> - to show
detailed information about the selected mesh node or element.
- <b>\ref mesh_addition_info_anchor "Additional Info"</b> - to show additional information available
for the selected mesh, sub-mesh or group object.
detailed information about the selected mesh nodes or elements.
- <b>\ref mesh_addition_info_anchor "Additional Info"</b> - to show
additional information available for the selected mesh, sub-mesh or
group object.
- <b>\ref mesh_quality_info_anchor "Quality Info"</b> - to show
overall quality information about the selected mesh, sub-mesh or group object.
overall quality information about the selected mesh, sub-mesh or group
object.
\anchor advanced_mesh_infos_anchor
<h2>Base Information</h2>
@ -43,7 +45,8 @@ information about the selected mesh node(s) or element(s), namely:
- For a node:
- Node ID;
- Coordinates (X, Y, Z);
- Connectivity information (connected elements);
- Connectivity information (connected elements); double click in
this line makes the dialog show information of these elements;
- Position on a shape (for meshes built on a geometry);
- Groups information (names of groups the node belongs to).
@ -55,7 +58,8 @@ information about the selected mesh node(s) or element(s), namely:
- Element ID;
- Type (triangle, quadrangle, etc.);
- Gravity center (X, Y, Z coordinates);
- Connectivity information (connected nodes);
- Connectivity information (connected nodes); double click in
a line of a node makes the dialog show information of this node;
- Quality controls (area, aspect ration, volume, etc.);
- Position on a shape (for meshes built on a geometry);
- Groups information (names of groups the element belongs to).
@ -63,7 +67,7 @@ information about the selected mesh node(s) or element(s), namely:
<center>\image html eleminfo2.png
<em>"Element Info" page, element information</em></center>
The use can either input the ID of a node or element he wants to
The user can either input the ID of a node or element he wants to
analyze directly in the dialog box or select the node(s) or element(s) in
the 3D viewer.
@ -152,6 +156,8 @@ button. Also, values are automatically computed if the number of
nodes / elements does not exceed the "Automatic controls compute limit" set
via the "Mesh information" preferences (zero value means that there is no limit).
\note The plot functionality is available only if GUI module is builded with Plot 2D Viewer (set option SALOME_USE_PLOT2DVIEWER to ON when building GUI module).
The button \b "Dump" allows printing the information displayed in the
dialog box to a .txt file.

View File

@ -44,17 +44,17 @@ or in later sessions with this module according to the preferences.
presentation mode as default.
- <b>Representation of the 2D quadratic elements</b>
- <b>Default mode of the 2D quadratic elements</b> combobox - allows
- <b>Default mode of the 2D quadratic elements</b> combo-box - allows
to select lines or arcs for representation of quadratic elements as default.
- <b>Maximum Angle</b> - maximum deviation angle used by the
application to build arcs.
- <b>Mesh export</b>
- If you toggle <b>Automatically create groups for MED export</b> checkbox,
- If you toggle <b>Automatically create groups for MED export</b> check-box,
this operation will be carried out automatically.
- <b>Mesh computation</b>
- <b>Show a computation result notification</b> combobox allows to
- <b>Show a computation result notification</b> combo-box allows to
select the notification mode about a mesh computation result.
There are 3 possible modes:
- <b>Never</b> - do not show the result dialog at all;
@ -132,16 +132,16 @@ or in later sessions with this module according to the preferences.
\image html pref22.png
- <b>Nodes</b> allows to define default parameters for nodes, which will be applied
for a new created mesh only. Customization of already created meshes can be done using
\ref colors_size_page "Properties dialog box" that is called by click on popup menu of mesh.
for a newly created mesh only. Existing meshes can be customized using
\ref colors_size_page "Properties dialog box" available from the context menu of a mesh.
- <b>Color</b> - allows to select the color of nodes. Click on the
colored line to access to the <b>Select Color</b> dialog box.
- <b>Type of marker</b> - allows to define the shape of nodes.
- <b>Scale of marker</b> - allows to define the size of nodes.
- <b>Elements</b> allows to define default parameters for different elements, which will be applied
for a new created mesh only. Customization of already created meshes can be done using
\ref colors_size_page "Properties dialog box" that is called by click on popup menu of mesh.
for a newly created mesh only. Existing meshes can be customized using
\ref colors_size_page "Properties dialog box" available from the context menu of a mesh.
- <b>Surface color</b> - allows to select the surface color of 2D elements
(seen in Shading mode). Click on the colored line to access to the
<b>Select Color</b> dialog box.
@ -175,21 +175,21 @@ or in later sessions with this module according to the preferences.
- <b>Groups</b>
- <b>Names color</b> - specifies color of group names to be used in
3D viewer.
- <b>Default color</b> - specifies default group color, which is used
when creating new mesh group (see \ref creating_groups_page "Create Group dialog box").
- <b>Default color</b> - specifies the default group color, which is used
to create a new mesh group (see \ref creating_groups_page "Create Group dialog box").
- <b>Numbering</b> allows to define properties of numbering functionality:
- <b>Nodes</b> - specifies text properties of nodes numbering
(font family, size, attributes, color).
- <b>Elements</b> - same for elements.
- <b>Orientation of Faces</b> - allows to define the behavior of
<b>Orientation of faces</b> functionality, which will be applied
for a new created mesh only. Customization of already created meshes can be done using
\ref colors_size_page "Properties dialog box" that is called by click on popup menu of mesh.
- \b Color - allows to define the color of orientation vertors;
- <b>Orientation of Faces</b> - allows to define default properties of orientation vectors.
These preferences will be applied to the newly created meshes only; properties of existing meshes
can be customized using \ref colors_size_page "Properties dialog box"
available from the context menu of a mesh.
- \b Color - allows to define the color of orientation vectors;
- \b Scale - allows to define the size of orientation vectors;
- <b>3D Vector</b> checkbox allows to choose between 2D planar
- <b>3D Vector</b> check-box allows to choose between 2D planar
and 3D vectors.
<br><h2>Selection Preferences</h2>
@ -220,9 +220,9 @@ or in later sessions with this module according to the preferences.
\image html pref24.png
\note The following settings are default and will be applied for
a new created mesh only. Customization of already created meshes
can be done using local \ref scalar_bar_dlg "Scalar Bar Properties dialog box"
that is called by click on popup menu of mesh.
a newly created mesh only. Existing meshes
can be customized using local \ref scalar_bar_dlg "Scalar Bar Properties dialog box"
available from the context menu of a mesh.
- <b>Font</b> - in this menu you can set type, face and color for
the font of <b>Title</b> and <b>Labels</b>.

View File

@ -43,6 +43,8 @@ transformation operations, giving the possibility to:
triangles.</li>
<li>\subpage split_to_tetra_page "Split" volumic elements into
tetrahedra or prisms.</li>
<li>\subpage split_biquad_to_linear_page "Split bi-quadratic" elements
into linear ones without creation of additional nodes.</li>
<li>\subpage smoothing_page "Smooth" elements, reducung distortions in
them by adjusting the locations of nodes.</li>
<li>Create an \subpage extrusion_page "extrusion" along a vector or by
@ -58,8 +60,8 @@ transformation operations, giving the possibility to:
<li>\subpage cut_mesh_by_plane_page "Cut a tetrahedron mesh by a plane".</li>
</ul>
It is possible to \ref edit_anchor "modify the mesh" of lower
dimension before generation of mesh of higher dimension.
\note It is possible to \ref edit_anchor "modify the mesh" of a lower
dimension before generation of the mesh of a higher dimension.
<p><br></p>

View File

@ -149,7 +149,7 @@ Alternatively, it is possible to select <b>Refine selected mesh elements</b>
check-box and apply the pattern to
<ul>
<li> One or several <b>Mesh volumes</b> instead of a geometric 3D object</li>
<li> and select two /b Nodes instead of vertices.</li>
<li> and select two \b Nodes instead of vertices.</li>
</ul>
Additionally it is possible to:
<ul>

View File

@ -5,15 +5,20 @@
Medial Axis Projection algorithm can be used for meshing faces with
sinuous borders and having channel-like shape, for which is it
difficult to define 1D hypotheses so that generated quadrangles to be
of good shape.
of good shape. The algorithm can be also applied to faces with ring
topology, which can be viewed as a closed 'channel'. In the latter
case radial discretization of a ring can be specified by
using <em>Number of Layers</em> or <em>Distribution of Layers</em>
hypothesis.
\image html quad_from_ma_mesh.png "A mesh of a river model"
\image html quad_from_ma_mesh.png "A mesh of a river model to the left and of a ring-face to the right"
The algorithm assures good shape of quadrangles by constructing Medial
Axis between sinuous borders of the face and using it to
discretize the borders.
discretize the borders. (Shape of quadrangles can be not perfect at
locations where opposite sides of a 'channel' are far from being parallel.)
\image html quad_from_ma_medial_axis.png "Media Axis between two blue sinuous borders"
\image html quad_from_ma_medial_axis.png "Medial Axis between two blue sinuous borders"
The Medial Axis is used in two ways:
<ol>
@ -22,9 +27,9 @@ The Medial Axis is used in two ways:
Axis.</li>
<li> If there is no sub-meshes on the sinuous borders, then a part of
the Medial Axis that can be mapped to both borders is discretized
using a hypothesis assigned to the face or its ancestor shapes,
using a 1D hypothesis assigned to the face or its ancestor shapes,
and the division points are mapped from the Medial Axis to the both
borders.</li>
borders to find positions of nodes.</li>
</ol>
*/

View File

@ -3,20 +3,20 @@
\page quad_ijk_algo_page Quadrangle (Mapping) meshing algorithm
<b>Quadrangle (Mapping)</b> meshing algorithm is intended for creating
all-quadrangle and quad-dominant meshes on faces with no holes and
all-quadrangle and quad-dominant meshes on faces without holes and
bound by at least three edges.
The algorithm can create mesh on any face but mesh quality and
validity depends on two factors:
- face shape (number of edges and concavity of boundary);
The algorithm can create mesh on any face but its quality and
validity depend on two factors:
- face shape (number of edges and boundary concavity);
- discretization of edges.
\image html quad_mesh_invalid.png "Invalid mesh on quadrilateral concave faces"
The algorithm uses <em>Transfinite Interpolation</em> technic in
The algorithm uses <em>Transfinite Interpolation</em> technique in the
parametric space of a face to locate nodes inside the face.
The algorithm treats any face as a quadrangle. If a face is bound by
The algorithm treats any face as quadrangle. If a face is bound by
more than four edges, four most sharp vertices are considered as
corners of the quadrangle and all edges between these vertices are
treated as quadrangle sides. In the case of three edges, the vertex
@ -26,24 +26,24 @@ quadrangle.
\image html quad_meshes.png "Algorithm generates a structured mesh on complex faces provided that edges are properly discretized"
To get an all-quadrangle mesh you have to carefully define 1D
hypotheses on edges of a face. To get a \b structured mesh you have to assure
hypotheses on edges of a face. To get a \b structured mesh you have to provide
equal number of segments on opposite sides of the quadrangle. If this
condition is not respected, the algorithm by default (with no
hypothesis) creates \b quad-dominant mesh with triangles located near a
side with maximal number of segments. But you can get an
condition is not respected, the algorithm by default (without a
hypothesis) creates a \b quad-dominant mesh with triangles located near the
side with the maximal number of segments. However, you can get an
\b all-quadrangle mesh in this case by using
\ref hypo_quad_params_anchor "Quadrangle Parameters"
hypothesis to specify how to make transition mesh between opposite
sides with different number of segments, provided that certain
conditions are respected. In any case total number of segments must be
even. To use \a Reduced transition method there must be equal number
conditions are respected. In any case the total number of segments must be
even. To use \a Reduced transition method, there must be an equal number
of segments on one pair of opposite sides.
The following hypotheses help in creation of quadrangle meshes.
The following hypotheses help to create quadrangle meshes.
- \ref propagation_anchor "Propagation" additional 1D hypotheses
help to get equal number of segments on opposite sides of the
help to get an equal number of segments on the opposite sides of a
quadrilateral face.
- \ref a1d_algos_anchor "Composite Side Discretization" algorithm is useful
to discretize several C1 continues edges as one quadrangle side.
to discretize several C1 continuous edges as one quadrangle side.
*/

View File

@ -5,8 +5,8 @@
\n This operation allows fixing the orientation of a set of faces in
the following ways:
<ul>
<li>The desired orientation of a set of neighboring faces can be defined
by a vector giving a desired direction of a normal of a certain face. <br>
<li>The required orientation of a set of neighboring faces can be defined
by a vector giving the direction of a normal to a certain face. <br>
Since the direction of face normals in the set can be even opposite,
it is necessary to specify a \a control face, the normal to which
will be compared with the vector. This face can be either:
@ -41,7 +41,7 @@ The orientation of a face is changed by reverting the order of its nodes.
<li>To reorient by direction of the face normal:
<ul>
<li>Specify the coordinates of the \b Point by which the control face
will be found. You can specify the \b Point by either picking a
will be found. You can specify the \b Point by picking a
node in the 3D Viewer or selecting a vertex in the Object
Browser.</li>
<li>Set up the \b Direction vector to be compared with the normal of the
@ -61,7 +61,7 @@ The orientation of a face is changed by reverting the order of its nodes.
</li>
<li>In the second mode it is possible to either pick the \b Face by mouse in the 3D Viewer or directly input the \b Face ID in the corresponding field.
<li>In the second mode it is possible to pick the \b Face by mouse in the 3D Viewer or directly input the \b Face ID in the corresponding field.
<center>
\image html reorient_2d_face.png "The orientation of adjacent faces is chosen according to a vector. The control face is explicitly given."
@ -81,7 +81,7 @@ The orientation of a face is changed by reverting the order of its nodes.
<br>
<center>
\image html reorient_2d_volume.png "The orientation of faces is chosen with relation to adjacent volumes."
\image html reorient_2d_volume.png "The orientation of faces is chosen relatively to adjacent volumes."
</center>
</li>

View File

@ -6,7 +6,9 @@
dimension than the input ones. Boundary elements around generated
mesh of plus one dimension are additionally created. All created
elements can be automatically grouped. Revolution can be used to create
a \ref extrusion_struct "structured mesh from scratch".
a \ref extrusion_struct "structured mesh from scratch".
See \ref extrusion_page page for general information on Revolution
which can be viewed as extrusion along a circular path.
<em>To apply revolution:</em>
<ol>
@ -33,7 +35,7 @@ The following dialog will appear:
of following means:
<ul>
<li><b>Select the whole mesh, sub-mesh or group</b> activating this
checkbox.</li>
check-box.</li>
<li>Choose mesh elements with the mouse in the 3D Viewer. It is
possible to select a whole area with a mouse frame.</li>
<li>Input the element IDs directly in <b>Node IDs</b>, <b>Edge
@ -46,14 +48,14 @@ The following dialog will appear:
</li>
<li>Specify the \b Axis of revolution:
<ul>
<li>Specify the cooordinates of the start \b Point of the
<li>Specify the coordinates of the start \b Point of the
axis of revolution; either directly or by picking a node
in the Viewer (selection of nodes is activated as you click
the \a Selection button).</li>
<li>Specify the \b Vector of the axis in either of three ways:
<ul>
<li>directly adjust vector components;</li>
<li>click \a Selection button, chose <em>From Origin to
<li>click \a Selection button, choose <em>From Origin to
selected Point</em> in the opened menu and pick a node
in the Viewer; </li>
<li>click \a Selection button, chose <em>Normal to
@ -66,16 +68,16 @@ The following dialog will appear:
<ul>
<li> <b>Angle by Step</b> - the elements are revolved by the
specified angle at each step (i.e. for Angle=30 and Number of
Steps=2, the elements will be extruded by 30 degrees twice for a
total of 30*2=60)
\image html revolutionsn2.png "Example of Revolution with Angle by Step"
Steps=3, the elements will be extruded by 30 degrees twice for a
total of 30*3=90)
\image html revolutionsn2.png "Example of Revolution with Angle by Step. Angle=30 and Number of Steps=3"
</li>
<li> <b>Total Angle</b> - the elements are revolved by the
specified angle only once and the number of steps defines the
number of iterations (i.e. for Angle=30 and Number of Steps=2,
the elements will be revolved by 30/2=15 degrees twice for a
number of iterations (i.e. for Angle=30 and Number of Steps=3,
the elements will be revolved by 30/3=10 degrees twice for a
total of 30).
\image html revolutionsn1.png "Example of Revolution with Total Angle"
\image html revolutionsn1.png "Example of Revolution with Total Angle. Angle=30 and Number of Steps=3"
</li>
</ul>
</li>

View File

@ -3,15 +3,20 @@
\page segments_around_vertex_algo_page Segments around Vertex
\n <b>Segments around Vertex</b> algorithm is considered to be a 0D meshing
algorithm, but, of course, it doesn't mesh nodes. It allows to define
the local size of the elements in the neighborhood of a certain
node. If we choose an object of higher dimension, it applies to all
its tops, i.e. corners of a box. The 0D algorithm combines with the
algorithms of higher dimensions, but it is not necessarily required
for their successful implementation.
algorithm, but, of course, it doesn't mesh vertices. It allows to define
the local size of the segments in the neighborhood of a certain
vertex. If we assign this algorithm to a geometrical object of higher
dimension, it applies to all its vertices.
This algorithm allows only one hypothesis.
Length of segments near vertex is defined by <b> Length Near
Vertex </b> hypothesis.
This hypothesis is used by \ref a1d_algos_anchor "Wire Discretization" or
\ref a1d_algos_anchor "Composite Side Discretization" algorithms as
follows: a geometrical edge is discretized according to a 1D
hypotheses and then nodes near vertices are modified to assure the
segment length required by <b> Length Near Vertex </b> hypothesis.
\image html lengthnearvertex.png
*/
*/

View File

@ -2,9 +2,11 @@
\page selection_filter_library_page Selection filter library
\n Selection filter library is a powerful tool enabling to create
filters to be used on meshes. You can access to it from the Main Menu
via <b>Tools / Selection filter library</b>.
\n Selection filter library allows creating and storing in files
filters that can be later loaded and used for operations on meshes. You can
access to it from the Main Menu via <b>Tools / Selection filter library</b>.
It is also possible to save any filter by invoking the filter library
from \a Filter dialog launched from any mesh operation.
\image html selectionfilterlibrary.png
@ -20,21 +22,23 @@ filter. By default it is prefixed with the corresponding entity type.
When we use filters during a group creation or another operation (by
clicking <b>Set Filter</b> button in the corresponding dialog), the
menu for setting filters looks as shown below.
dialog for setting filters looks as shown below.
\image html a-filteronfaces.png
The \b Add button creates a new criterion at the end of the list of
criteria. The \b Insert button creates a new criterion before the
selected criterion. The \b Remove button deletes the selected
criterion. The \b Clear button deletes all criteria.
\n Each <b>Entity type</b> has its specific list of criteria, however all
filters have common syntax. For each criterion you should specify the
<b>Threshold Value</b> and for numerical criteria whether we search
for the elements that should be \b More, \b Less or \b Equal to this
filters have common syntax. The <b>Threshold Value</b> should be specified
for most criteria. For numerical criteria it is necessary to indicate if
the found elements should be \b More, \b Less or \b Equal to this
\b Value. You can also reverse the sense of a criterion using \b Unary
operator \a Not and you should specify logical relations between
criteria using \b Binary operators \a Or and \a And.
\n Some criteria have the additional parameter of \b Tolerance.<br>
Switching on <b>Insert filter in viewer</b> checkbox limits
Switching on <b>Insert filter in viewer</b> check-box limits
selection of elements in the Viewer to the current filter.
<br>
In the \b Source field you choose if the filter will be applied to
@ -56,8 +60,6 @@ in the Library.
is no selected mesh in the Object Browser and the filter can not be
created. You have to select the mesh and the button will be enabled.
\image html a-filteronfaces.png
Some criteria are applicable to all <b>Entity types</b>:
<ul><li>
<b>Belong to Geom</b> selects entities whose all nodes lie on the
@ -72,7 +74,7 @@ algorithm works faster, if this is any other
shape, the algorithm works slower.
</li><li>
<b>Belong to Mesh Group</b> selects entities included into the mesh group
defined by <b>Threshold Value</b>.
defined by the <b>Threshold Value</b>.
</li><li>
<b>Range of IDs</b> allows selection of entities with the specified
IDs.
@ -102,7 +104,7 @@ defined by the <b>Threshold Value</b>. The list of available geometric
types depends on the current entity type.
</li><li>
<b>Entity type</b> allows selection of elements by their type defined
as combination of geometry type + number of nodes.
as a combination of geometry type and the number of nodes.
</li>
</ul>
@ -133,7 +135,7 @@ See also \ref tui_double_nodes_control "Double Nodes quality control".
The following criteria allow selecting mesh <b>Edges</b>:
<ul><li>
<b>Free Borders</b> selects free 1D mesh elements, i.e. edges belonging to
one face only. See also a
one element (face or volume) only. See also a
\ref free_borders_page "Free Borders quality control".
</li><li>
<b>Double edges</b> selects 1D mesh elements basing on the same set of nodes.
@ -177,8 +179,8 @@ The following criteria allow selecting mesh <b>Faces</b>:
\ref area_page "Area quality control"), which is more, less or equal (within a given
<b>Tolerance</b>) to the predefined <b>Threshold Value</b>.
</li><li>
<b>Free edges</b> selects 2D mesh elements consisting of edges belonging to
one element of mesh only. See also a
<b>Free edges</b> selects 2D mesh elements having at least one of its
edges not shared with other faces. See also a
\ref free_edges_page "Free Edges quality control".
</li><li>
<b>Free faces</b> selects 2D mesh elements, which belong to less than two volumes.

View File

@ -20,19 +20,82 @@ and from its sub-menu select the \b Sewing item.</li>
<li>Check in the dialog box one of the radio buttons corresponding to
the type of sewing operation you would like to perform.</li>
<li>Fill the other fields available in the dialog box.</li>
<li>Click the \b Apply or <b>Apply and Close</b> button to perform the operation of sewing.</li>
<li>Click the \b Apply or <b>Apply and Close</b> button to perform the
operation of sewing.</li>
</ol>
<br>
\anchor free_borders_anchor
<h2>Sew free borders</h2>
This functionality allows you to unite two free borders of a 2D mesh.
This functionality allows you to unite free borders of a 2D mesh.
There are two working modes: \a Automatic and \a Manual. In the \b
Automatic mode, the program finds free borders coincident within a
specified tolerance and sews them. Optionally it is possible to
visually check and correct is necessary the found free borders before
sewing. <br>
In the \b Manual mode you are to define borders to sew by picking
three nodes of each of two borders.
\image html sewing1.png
<center>Default mode is \a Automatic</center>
For sewing free borders you should define three points on each border:
first, second and the last node:
To use \b Automatic sewing:
<ul>
<li>Specify a mesh you want to sew by selecting it or any its part
(group or sub-mesh) in the Object Browser or in the VTK Viewer.</li>
<li>Specify the \b Tolerance within which free borders are considered
coincident. At the default zero \b Tolerance, the tolerance used by
the search algorithm is defined as one tenth of an average size of
elements adjacent to free borders being compared.</li>
<li>To visually check the coincident free borders found by the
algorithm, switch off <b>Auto Sewing</b> check-box. Then controls
to adjust groups of coincident free borders will become available in
the dialog.</li>
\image html sewing_auto.png
<center>Controls to adjust groups of coincident free borders</center>
<li>\b Detect button launches the algorithm of search of coincident
free borders.</li>
<li>The found groups of <b>Coincident Free Borders</b> are shown in a
list, a group per a line. Each group has its own color which is used
to display the borders of the group in the VTK Viewer. A free border
within a group is designated by IDs of its first, second and last
nodes within parenthesis. All borders present in the list will be
sewn upon \b Apply.</li>
<li>\b Remove button removes selected groups from the list.</li>
<li><b>Select All</b> check-box selects all groups in the list.</li>
<li>When a group is selected, its borders appear in <b>Edit Selected
Group</b> list that allows you to change this group.</li>
<li>
\image html sort.png
<em>Set First</em> button moves the selected border to the
first position in the group, as a result other borders will be moved
to this border during sewing.
</li><li>
\image html remove.png
<em>Remove Border</em> button removes selected borders from the
group. It is active if there are more than two borders in the group.
</li>
<li>Selection of a border in the list allows to change its first and
last nodes whose IDs appear in two fields below the list. \a Arrow
buttons near each field move the corresponding end node by
number of nodes defined by \b Step field.</li>
<li>
\image html swap.png
<em>Swap</em> button swaps the first and last nodes of a
selected border.
</li>
</ul>
For sewing free borders manually you should switch the \b Mode to \b
Manual and define three points on each border: first, second and the
last node:
\image html sewing_manual.png
<ul>
<li>the first node specifies beginning of the border;</li>
<li>the second node specifies the part of the border which should be
@ -50,6 +113,16 @@ corresponding end nodes of two borders will be merged. Intermediate
nodes of two borders will be either merged or inserted into faces of
the opposite border.
In practice the borders to sew often coincide and in this case it is
difficult to specify the first and the last nodes of a border since
they coincide with the first and the last nodes of the other
border. To cope with this,
\ref merging_nodes_page "merge" coincident nodes into one
beforehand. Two figures below illustrate this approach.
\image html sew_using_merge.png "Merge coincident nodes which are difficult to distinguish"
<br>
\image html sew_after_merge.png "After merging nodes it is easy to specify border nodes"
The sewing algorithm is as follows:
<ol>
<li>The parameter (U) of each node within a border is computed. So

View File

@ -3,8 +3,11 @@
\page smoothing_page Smoothing
\n Smoothing is used to improve quality of 2D mesh by adjusting the
locations of element corners (nodes). \note Depending on smoothing
method and mesh geometry smoothing can decrease quality of elements.
locations of element corners (nodes).
\note Depending on the chosen method and mesh geometry
the smoothing can actually decrease the quality of elements and even
make some elements inverted.
<em>To apply smoothing to the elements of your mesh:</em>
<ol>

View File

@ -0,0 +1,37 @@
/*!
\page split_biquad_to_linear_page Split bi-quadratic into linear
\n This functionality allows to split bi-quadratic elements into
linear ones without creation of additional nodes.
So that
- bi-quadratic triangle will be split into 3 linear quadrangles;
- bi-quadratic quadrangle will be split into 4 linear quadrangles;
- tri-quadratic hexahedron will be split into 8 linear hexahedra;
- quadratic segments adjacent to the split bi-quadratic element will
be split into 2 liner segments.
\image html split_biquad_to_linear_mesh.png "Mesh before and after splitting"
<em>To split bi-quadratic elements into linear:</em>
<ol>
<li>From the \b Modification menu choose the <b>Split bi-quadratic into linear</b> item or
click <em>"Split bi-quadratic into linear"</em> button in the toolbar.
\image html split_biquad_to_linear_icon.png
<center><em>"Split bi-quadratic into linear" button</em></center>
The following dialog box shall appear:
\image html split_biquad_to_linear_dlg.png
</li>
<li>Select a mesh, groups or sub-meshes in the Object Browser or in the
Viewer.</li>
<li>Click the \b Apply or <b>Apply and Close</b> button.</li>
</ol>
<br><b>See Also</b> a sample TUI Script of a \ref tui_split_biquad "Split bi-quadratic into linear" operation.
*/

View File

@ -7,7 +7,7 @@ tetrahedra or hexahedra into prisms. 2D mesh is modified accordingly.
<em>To split volumes:</em>
<ol>
<li>Display a mesh, a sub-mesh or a group in the 3D viewer.</li>
<li>Select a mesh, a sub-mesh or a group.</li>
<li>In the \b Modification menu select the <b>Split Volumes</b> item or
click <em>"Split Volumes"</em> button in the toolbar.

View File

@ -64,21 +64,21 @@ possible to select a whole area with a mouse frame; or</li>
<li>specify the conditions of symmetry operation:
<ul>
<li>activate <b>Move elements</b> radio button to change location of
<li>activate <b>Move elements</b> radio button to change the location of
the selected elements within the current mesh;</li>
<li>activate <b>Copy elements</b> radio button to duplicate the
selected elements at the new location within the current mesh;</li>
<li>activate <b>Create as new mesh</b> radio button to create new
<li>activate <b>Create as new mesh</b> radio button to create a new
element in a new mesh; the new mesh appears in the Object Browser
with the default name MeshName_mirrored (it is possible to change
with the default name \a MeshName_mirrored (it is possible to change
this name in the adjacent box);</li>
<li>activate <b> Copy groups </b> checkbox to put new mesh enities
into new groups if source entities belongs to some groups. New
<li>activate <b> Copy groups </b> check-box to put new mesh entities
into new groups if source entities belong to some groups. New
groups are named by pattern "<old group name>_mirrored".</li>
</ul>
</li>
</ul>
<li>activate <b>Preview</b> checkbox to show the result of
<li>activate <b>Preview</b> check-box to show the result of
transformation in the viewer;</li>
<li>click \b Apply or <b> Apply and Close</b> button to confirm the
operation.</li>

View File

@ -140,4 +140,9 @@
<h2>Convert mesh to/from quadratic</h2>
\tui_script{modifying_meshes_ex26.py}
<br>
\anchor tui_split_biquad
<h2>Split bi-quadratic into linear</h2>
\tui_script{split_biquad.py}
*/

View File

@ -2,7 +2,7 @@
\page uniting_set_of_triangles_page Uniting a set of triangles
\n In MESH you can union many neighboring triangles (cells) into
\n It is possible to unite many neighboring triangles into
quadrangles by deletion of the common edge.
<em>To union several triangles:</em>
@ -10,7 +10,7 @@ quadrangles by deletion of the common edge.
<li>Select a mesh (and display it in the 3D Viewer if you are going to
pick elements by mouse).</li>
<li>In the \b Modification menu select the <b>Union of triangles</b>
item or click <em>"Union of triangles"</em> button in the toolbar.
item or click <em>"Union of triangles"</em> button in the tool-bar.
\image html image80.png
<center><em>"Union of triangles" button</em></center>

View File

@ -2,14 +2,14 @@
\page uniting_two_triangles_page Uniting two triangles
\n In MESH you can union two neighboring triangles (cells) by deletion
\n In MESH you can union two neighboring triangles by deletion
of the common edge.
<em>To unite two triangles:</em>
<ol>
<li>From the \b Modification menu choose the <b>Union of two
triangles</b> item or click <em>"Union of two triangles"</em> button
in the toolbar.
in the tool-bar.
\image html image71.png
<center><em>"Union of two triangles" button</em></center>
@ -20,7 +20,7 @@ The following dialog box shall appear:
</li>
<li>Enter IDs of nodes forming the required edge in the \b Edge field
(the node IDs must be separated by a dash) or select this edge in
(a couple of node IDs separated by a dash) or select this edge in
the 3D viewer.</li>
<li>Click the \b Apply or <b>Apply and Close</b> button.</li>
</ol>

View File

@ -26,8 +26,11 @@ information about the mesh.</li>
<li>\subpage find_element_by_point_page "Find Element by Point" -
allows to find all mesh elements, to which belongs a point with the
given coordinates.</li>
<li><b>Auto Color</b> - switch on / off auto-assigning colors for the groups.</li>
<li>\subpage numbering_page "Numbering" - allows to display the ID
<li><b>Auto Color</b> - switch on / off auto-assigning colors for the
groups. If switched on, a default color of a new group in
\ref creating_groups_page "Create Group" dialog is chosen
randomly. </li>
<li>\subpage numbering_page "Numbering" - allows to display the ID
numbers of all meshing elements or nodes composing your mesh in the
viewer.</li>
<li>\subpage display_mode_page "Display Mode" - allows to select between

View File

@ -1097,6 +1097,13 @@ module StdMeshers
{
};
/*!
* StdMeshers_PolygonPerFace_2D: interface of "Polygon Per Face" 2D algorithm
*/
interface StdMeshers_PolygonPerFace_2D : SMESH::SMESH_2D_Algo
{
};
/*!
* StdMeshers_Hexa_3D: interface of "Hexahedron (i,j,k)" algorithm
*/

View File

@ -439,6 +439,79 @@ module SMESH
in string theLibName,
in GEOM::GEOM_Object theShapeObject,
in boolean toCheckAll );
/*!
* Return indices of elements, which are located inside the sphere
* \param theSource - mesh, sub-mesh or group
* \param theElemType - mesh element type
* \param theX - x cooridate of the center of the sphere
* \param theY - y cooridate of the center of the sphere
* \param theZ - y cooridate of the center of the sphere
* \param theR - radius of the sphere
*/
long_array GetInsideSphere( in SMESH_IDSource theSource,
in ElementType theElemType,
in double theX,
in double theY,
in double theZ,
in double theR );
/*!
* Return indices of elements, which are located inside the box
* \param theSource - mesh, sub-mesh or group
* \param theElemType - mesh element type
* \param theX1 - x cooridate of the first opposite point
* \param theY1 - y cooridate of the first opposite point
* \param theZ1 - y cooridate of the first opposite point
* \param theX2 - x cooridate of the second opposite point
* \param theY2 - y cooridate of the second opposite point
* \param theZ2 - y cooridate of the second opposite point
*/
long_array GetInsideBox( in SMESH_IDSource theSource,
in ElementType theElemType,
in double theX1,
in double theY1,
in double theZ1,
in double theX2,
in double theY2,
in double theZ2);
/*!
* Return indices of elements, which are located inside the box
* \param theSource - mesh, sub-mesh or group
* \param theElemType - mesh element type
* \param theX - x cooridate of the cented of the bottom face
* \param theY - y cooridate of the cented of the bottom face
* \param theZ - y cooridate of the cented of the bottom face
* \param theDX - x cooridate of the cented of the base vector
* \param theDY - y cooridate of the cented of the base vector
* \param theDZ - z cooridate of the cented of the base vector
* \param theH - height of the cylinder
* \param theR - radius of the cylinder
*/
long_array GetInsideCylinder( in SMESH_IDSource theSource,
in ElementType theElemType,
in double theX,
in double theY,
in double theZ,
in double theDX,
in double theDY,
in double theDZ,
in double theH,
in double theR );
/*!
* Return indices of elements, which are located inside the geometry
* \param theSource - mesh, sub-mesh or group
* \param theElemType - mesh element type
* \param theGeom - geometrical object
* \param theTolerance - tolerance for selection.
*/
long_array GetInside( in SMESH_IDSource theSource,
in ElementType theElemType,
in GEOM::GEOM_Object theGeom,
in double theTolerance );
};
};

View File

@ -66,6 +66,7 @@ module SMESH
ADD_QUADEDGE,
ADD_QUADTRIANGLE,
ADD_QUADQUADRANGLE,
ADD_QUADPOLYGON,
ADD_QUADTETRAHEDRON,
ADD_QUADPYRAMID,
ADD_QUADPENTAHEDRON,
@ -89,18 +90,18 @@ module SMESH
struct PointStruct { double x;
double y;
double z; } ;
double z; };
typedef sequence<PointStruct> nodes_array;
struct DirStruct { PointStruct PS ; } ; // analog to OCCT gp_Vec
struct DirStruct { PointStruct PS; }; // analog to OCCT gp_Vec
struct AxisStruct { double x;
double y;
double z;
double vx;
double vy;
double vz; } ;
double vz; };
/*!
* Node location on a shape
*/
@ -132,7 +133,7 @@ module SMESH
BALL,
NB_ELEMENT_TYPES
};
typedef sequence<ElementType> array_of_ElementType ;
typedef sequence<ElementType> array_of_ElementType;
/*!
* Enumeration for element geometry type, like SMDSAbs_GeometryType in SMDSAbs_ElementType.hxx
@ -778,6 +779,9 @@ module SMESH
long NbPolygons()
raises (SALOME::SALOME_Exception);
long NbPolygonsOfOrder(in ElementOrder order)
raises (SALOME::SALOME_Exception);
long NbVolumes()
raises (SALOME::SALOME_Exception);
@ -1040,7 +1044,7 @@ module SMESH
raises (SALOME::SALOME_Exception);
/*!
* Return type of submesh element
* Returns type of mesh element (same as SMESH_Mesh::GetElementType() )
*/
ElementType GetElementType( in long id, in boolean iselem )
raises (SALOME::SALOME_Exception);

View File

@ -29,13 +29,37 @@
module SMESH
{
interface NumericalFunctor;
enum Bnd_Dimension { BND_2DFROM3D, BND_1DFROM3D, BND_1DFROM2D };
struct FreeBorder
{
SMESH::long_array nodeIDs; // all nodes defining a free border
// 1st and last node is same in a closed border
};
struct FreeBorderPart
{
short border; // border index within a sequence<FreeBorder>
long node1; // node index within the border-th FreeBorder
long node2;
long nodeLast;
};
typedef sequence<FreeBorder> ListOfFreeBorders;
typedef sequence<FreeBorderPart> FreeBordersGroup;
typedef sequence<FreeBordersGroup> ListOfFreeBorderGroups;
struct CoincidentFreeBorders
{
ListOfFreeBorders borders; // nodes of all free borders
ListOfFreeBorderGroups coincidentGroups; // groups of coincident parts of borders
};
/*!
* This interface makes modifications on the Mesh - removing elements and nodes etc.
*/
interface NumericalFunctor;
interface SMESH_MeshEditor
{
/*!
@ -143,6 +167,13 @@ module SMESH
long AddPolygonalFace(in long_array IdsOfNodes) raises (SALOME::SALOME_Exception);
/*!
* Create a quadratic polygonal face
* \param IdsOfNodes - nodes of the polygon; corner nodes follow first
* \return long - ID of a new polygon
*/
long AddQuadPolygonalFace(in long_array IdsOfNodes) raises (SALOME::SALOME_Exception);
/*!
* Create volume, either linear and quadratic (this is determed
* by number of given nodes).
@ -353,13 +384,25 @@ module SMESH
* to \a facetToSplitNormal location are split, else \a facetToSplitNormal
* is used to find the facet to split in all domains present in \a elems.
*/
void SplitHexahedraIntoPrisms(in SMESH_IDSource elems,
void SplitHexahedraIntoPrisms(in SMESH_IDSource elems,
in SMESH::PointStruct startHexPoint,
in SMESH::DirStruct facetToSplitNormal,
in short methodFlags,
in boolean allDomains)
raises (SALOME::SALOME_Exception);
/*!
* \brief Split bi-quadratic elements into linear ones without creation of additional nodes.
* - bi-quadratic triangle will be split into 3 linear quadrangles;
* - bi-quadratic quadrangle will be split into 4 linear quadrangles;
* - tri-quadratic hexahedron will be split into 8 linear hexahedra;
* Quadratic elements of lower dimension adjacent to the split bi-quadratic element
* will be split in order to keep the mesh conformal.
* \param elems - elements to split
*/
void SplitBiQuadraticIntoLinear(in ListOfIDSources elems)
raises (SALOME::SALOME_Exception);
enum Smooth_Method { LAPLACIAN_SMOOTH, CENTROIDAL_SMOOTH };
@ -602,41 +645,45 @@ module SMESH
in AxisStruct Axis,
in double AngleInRadians,
in boolean CopyGroups,
in string MeshName)
in string MeshName)
raises (SALOME::SALOME_Exception);
void RotateObject (in SMESH_IDSource theObject,
in AxisStruct Axis,
in double AngleInRadians,
in boolean Copy)
in boolean Copy)
raises (SALOME::SALOME_Exception);
ListOfGroups RotateObjectMakeGroups (in SMESH_IDSource theObject,
in AxisStruct Axis,
in double AngleInRadians)
in double AngleInRadians)
raises (SALOME::SALOME_Exception);
SMESH_Mesh RotateObjectMakeMesh (in SMESH_IDSource theObject,
in AxisStruct Axis,
in double AngleInRadians,
in boolean CopyGroups,
in string MeshName)
in string MeshName)
raises (SALOME::SALOME_Exception);
void FindCoincidentNodes (in double Tolerance,
out array_of_long_array GroupsOfNodes)
out array_of_long_array GroupsOfNodes,
in boolean SeparateCornersAndMedium)
raises (SALOME::SALOME_Exception);
void FindCoincidentNodesOnPart (in SMESH_IDSource SubMeshOrGroup,
in double Tolerance,
out array_of_long_array GroupsOfNodes)
out array_of_long_array GroupsOfNodes,
in boolean SeparateCornersAndMedium)
raises (SALOME::SALOME_Exception);
void FindCoincidentNodesOnPartBut (in SMESH_IDSource SubMeshOrGroup,
in double Tolerance,
out array_of_long_array GroupsOfNodes,
in ListOfIDSources ExceptSubMeshOrGroups)
in ListOfIDSources ExceptSubMeshOrGroups,
in boolean SeparateCornersAndMedium)
raises (SALOME::SALOME_Exception);
void MergeNodes (in array_of_long_array GroupsOfNodes)
void MergeNodes (in array_of_long_array GroupsOfNodes,
in SMESH::ListOfIDSources NodesToKeep)
raises (SALOME::SALOME_Exception);
/*!
@ -700,6 +747,21 @@ module SMESH
short GetPointState(in double x, in double y, in double z)
raises (SALOME::SALOME_Exception);
/*!
* Returns groups of FreeBorder's coincident within the given tolerance.
* If the tolerance <= 0.0 then one tenth of an average size of elements adjacent
* to free borders being compared is used.
*/
CoincidentFreeBorders FindCoincidentFreeBorders(in double tolerance);
/*!
* Sew FreeBorder's of each group
*/
short SewCoincidentFreeBorders (in CoincidentFreeBorders freeBorders,
in boolean createPolygons,
in boolean createPolyedrs)
raises (SALOME::SALOME_Exception);
enum Sew_Error {
SEW_OK,
SEW_BORDER1_NOT_FOUND,

View File

@ -98,6 +98,7 @@ SET(SMESH_RESOURCES_FILES
mesh_tetra.png
mesh_tree_algo_hexa.png
mesh_tree_algo_mefisto.png
mesh_tree_algo_polygon.png
mesh_tree_algo.png
mesh_tree_algo_0D.png
mesh_tree_algo_quad.png
@ -170,6 +171,7 @@ SET(SMESH_RESOURCES_FILES
mesh_quad_edge.png
mesh_quad_triangle.png
mesh_quad_quadrangle.png
mesh_quad_polygon.png
mesh_quad_tetrahedron.png
mesh_quad_pyramid.png
mesh_quad_pentahedron.png
@ -201,6 +203,7 @@ SET(SMESH_RESOURCES_FILES
scale.png
scale_along_axes.png
split_into_tetra.png
split_biquad.png
mesh_duplicate_nodes.png
mesh_duplicate_nodes_with_elem.png
mesh_duplicate_elem_only.png

View File

@ -314,6 +314,7 @@
<algorithm type ="QuadFromMedialAxis_1D2D"
label-id ="Quadrangle (Medial Axis Projection)"
icon-id ="mesh_algo_quad.png"
hypos ="NumberOfLayers2D, LayerDistribution2D"
opt-hypos="ViscousLayers2D"
input ="EDGE"
output ="QUAD"
@ -321,6 +322,20 @@
<python-wrap>
<algo>QuadFromMedialAxis_1D2D=Quadrangle(algo=smeshBuilder.QUAD_MA_PROJ)</algo>
<hypo>ViscousLayers2D=ViscousLayers2D(SetTotalThickness(),SetNumberLayers(),SetStretchFactor(),SetIgnoreEdges())</hypo>
<hypo>NumberOfLayers2D=NumberOfLayers(SetNumberOfLayers())</hypo>
</python-wrap>
</algorithm>
<algorithm type ="PolygonPerFace_2D"
label-id ="Polygon per Face"
icon-id ="mesh_algo_polygon.png"
opt-hypos="ViscousLayers2D"
input ="EDGE"
output ="POLYGON,QUAD,TRIA"
dim ="2">
<python-wrap>
<algo>PolygonPerFace_2D=Polygon()</algo>
<hypo>ViscousLayers2D=ViscousLayers2D(SetTotalThickness(),SetNumberLayers(),SetStretchFactor(),SetIgnoreEdges())</hypo>
</python-wrap>
</algorithm>

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

BIN
resources/split_biquad.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 945 B

View File

@ -31,9 +31,10 @@
#include "SMDS_QuadraticFaceOfNodes.hxx"
#include "SMDS_VolumeTool.hxx"
#include "SMESHDS_GroupBase.hxx"
#include "SMESHDS_GroupOnFilter.hxx"
#include "SMESHDS_Mesh.hxx"
#include "SMESH_OctreeNode.hxx"
#include "SMESH_MeshAlgos.hxx"
#include "SMESH_OctreeNode.hxx"
#include <Basics_Utils.hxx>
@ -68,7 +69,6 @@
#include <set>
#include <limits>
#include <TopTools_MapOfShape.hxx>
/*
AUXILIARY METHODS
@ -136,8 +136,8 @@ namespace {
int aResult0 = 0, aResult1 = 0;
// last node, it is a medium one in a quadratic edge
const SMDS_MeshNode* aLastNode = anEdge->GetNode( anEdge->NbNodes() - 1 );
const SMDS_MeshNode* aNode0 = anEdge->GetNode( 0 );
const SMDS_MeshNode* aNode1 = anEdge->GetNode( 1 );
const SMDS_MeshNode* aNode0 = anEdge->GetNode( 0 );
const SMDS_MeshNode* aNode1 = anEdge->GetNode( 1 );
if ( aNode1 == aLastNode ) aNode1 = 0;
SMDS_ElemIteratorPtr anElemIter = aLastNode->GetInverseElementIterator();
@ -159,29 +159,6 @@ namespace {
}
int aResult = std::max ( aResult0, aResult1 );
// TColStd_MapOfInteger aMap;
// SMDS_ElemIteratorPtr anIter = anEdge->nodesIterator();
// if ( anIter != 0 ) {
// while( anIter->more() ) {
// const SMDS_MeshNode* aNode = (SMDS_MeshNode*)anIter->next();
// if ( aNode == 0 )
// return 0;
// SMDS_ElemIteratorPtr anElemIter = aNode->GetInverseElementIterator();
// while( anElemIter->more() ) {
// const SMDS_MeshElement* anElem = anElemIter->next();
// if ( anElem != 0 && anElem->GetType() != SMDSAbs_Edge ) {
// int anId = anElem->GetID();
// if ( anIter->more() ) // i.e. first node
// aMap.Add( anId );
// else if ( aMap.Contains( anId ) )
// aResult++;
// }
// }
// }
// }
return aResult;
}
@ -233,7 +210,7 @@ void NumericalFunctor::SetMesh( const SMDS_Mesh* theMesh )
myMesh = theMesh;
}
bool NumericalFunctor::GetPoints(const int theId,
bool NumericalFunctor::GetPoints(const int theId,
TSequenceOfXYZ& theRes ) const
{
theRes.clear();
@ -257,6 +234,7 @@ bool NumericalFunctor::GetPoints(const SMDS_MeshElement* anElem,
return false;
theRes.reserve( anElem->NbNodes() );
theRes.setElement( anElem );
// Get nodes of the element
SMDS_ElemIteratorPtr anIter;
@ -273,7 +251,6 @@ bool NumericalFunctor::GetPoints(const SMDS_MeshElement* anElem,
break;
default:
anIter = anElem->nodesIterator();
//return false;
}
}
else {
@ -281,9 +258,13 @@ bool NumericalFunctor::GetPoints(const SMDS_MeshElement* anElem,
}
if ( anIter ) {
double xyz[3];
while( anIter->more() ) {
if ( const SMDS_MeshNode* aNode = static_cast<const SMDS_MeshNode*>( anIter->next() ))
theRes.push_back( gp_XYZ( aNode->X(), aNode->Y(), aNode->Z() ) );
{
aNode->GetXYZ( xyz );
theRes.push_back( gp_XYZ( xyz[0], xyz[1], xyz[2] ));
}
}
}
@ -348,7 +329,7 @@ void NumericalFunctor::GetHistogram(int nbIntervals,
std::multiset< double > values;
if ( elements.empty() )
{
SMDS_ElemIteratorPtr elemIt = myMesh->elementsIterator(GetType());
SMDS_ElemIteratorPtr elemIt = myMesh->elementsIterator( GetType() );
while ( elemIt->more() )
values.insert( GetValue( elemIt->next()->GetID() ));
}
@ -481,6 +462,27 @@ double MaxElementLength2D::GetValue( const TSequenceOfXYZ& P )
double D2 = getDistance(P( 3 ),P( 7 ));
aVal = Max(Max(Max(L1,L2),Max(L3,L4)),Max(D1,D2));
}
// Diagonals are undefined for concave polygons
// else if ( P.getElementEntity() == SMDSEntity_Quad_Polygon && P.size() > 2 ) // quad polygon
// {
// // sides
// aVal = getDistance( P( 1 ), P( P.size() )) + getDistance( P( P.size() ), P( P.size()-1 ));
// for ( size_t i = 1; i < P.size()-1; i += 2 )
// {
// double L = getDistance( P( i ), P( i+1 )) + getDistance( P( i+1 ), P( i+2 ));
// aVal = Max( aVal, L );
// }
// // diagonals
// for ( int i = P.size()-5; i > 0; i -= 2 )
// for ( int j = i + 4; j < P.size() + i - 2; i += 2 )
// {
// double D = getDistance( P( i ), P( j ));
// aVal = Max( aVal, D );
// }
// }
// { // polygons
// }
if( myPrecision >= 0 )
{
@ -699,8 +701,9 @@ double MinimumAngle::GetValue( const TSequenceOfXYZ& P )
aMin = getAngle(P( P.size() ), P( 1 ), P( 2 ));
aMin = Min(aMin,getAngle(P( P.size()-1 ), P( P.size() ), P( 1 )));
for (int i=2; i<P.size();i++){
double A0 = getAngle( P( i-1 ), P( i ), P( i+1 ) );
for ( int i = 2; i < P.size(); i++ )
{
double A0 = getAngle( P( i-1 ), P( i ), P( i+1 ) );
aMin = Min(aMin,A0);
}
@ -1467,11 +1470,14 @@ SMDSAbs_ElementType Skew::GetType() const
double Area::GetValue( const TSequenceOfXYZ& P )
{
double val = 0.0;
if ( P.size() > 2 ) {
if ( P.size() > 2 )
{
gp_Vec aVec1( P(2) - P(1) );
gp_Vec aVec2( P(3) - P(1) );
gp_Vec SumVec = aVec1 ^ aVec2;
for (int i=4; i<=P.size(); i++) {
for (int i=4; i<=P.size(); i++)
{
gp_Vec aVec1( P(i-1) - P(1) );
gp_Vec aVec2( P(i) - P(1) );
gp_Vec tmp = aVec1 ^ aVec2;
@ -1523,7 +1529,7 @@ SMDSAbs_ElementType Length::GetType() const
//================================================================================
/*
Class : Length2D
Description : Functor for calculating length of edge
Description : Functor for calculating minimal length of edge
*/
//================================================================================
@ -1531,63 +1537,59 @@ double Length2D::GetValue( long theElementId )
{
TSequenceOfXYZ P;
//cout<<"Length2D::GetValue"<<endl;
if (GetPoints(theElementId,P)){
//for(int jj=1; jj<=P.size(); jj++)
// cout<<"jj="<<jj<<" P("<<P(jj).X()<<","<<P(jj).Y()<<","<<P(jj).Z()<<")"<<endl;
double aVal;// = GetValue( P );
const SMDS_MeshElement* aElem = myMesh->FindElement( theElementId );
SMDSAbs_ElementType aType = aElem->GetType();
if ( GetPoints( theElementId, P ))
{
double aVal = 0;
int len = P.size();
SMDSAbs_EntityType aType = P.getElementEntity();
switch (aType){
case SMDSAbs_All:
case SMDSAbs_Node:
case SMDSAbs_Edge:
if (len == 2){
switch (aType) {
case SMDSEntity_Edge:
if (len == 2)
aVal = getDistance( P( 1 ), P( 2 ) );
break;
}
else if (len == 3){ // quadratic edge
break;
case SMDSEntity_Quad_Edge:
if (len == 3) // quadratic edge
aVal = getDistance(P( 1 ),P( 3 )) + getDistance(P( 3 ),P( 2 ));
break;
}
case SMDSAbs_Face:
break;
case SMDSEntity_Triangle:
if (len == 3){ // triangles
double L1 = getDistance(P( 1 ),P( 2 ));
double L2 = getDistance(P( 2 ),P( 3 ));
double L3 = getDistance(P( 3 ),P( 1 ));
aVal = Min(L1,Min(L2,L3));
break;
}
else if (len == 4){ // quadrangles
break;
case SMDSEntity_Quadrangle:
if (len == 4){ // quadrangles
double L1 = getDistance(P( 1 ),P( 2 ));
double L2 = getDistance(P( 2 ),P( 3 ));
double L3 = getDistance(P( 3 ),P( 4 ));
double L4 = getDistance(P( 4 ),P( 1 ));
aVal = Min(Min(L1,L2),Min(L3,L4));
break;
}
if (len == 6){ // quadratic triangles
break;
case SMDSEntity_Quad_Triangle:
case SMDSEntity_BiQuad_Triangle:
if (len >= 6){ // quadratic triangles
double L1 = getDistance(P( 1 ),P( 2 )) + getDistance(P( 2 ),P( 3 ));
double L2 = getDistance(P( 3 ),P( 4 )) + getDistance(P( 4 ),P( 5 ));
double L3 = getDistance(P( 5 ),P( 6 )) + getDistance(P( 6 ),P( 1 ));
aVal = Min(L1,Min(L2,L3));
//cout<<"L1="<<L1<<" L2="<<L2<<"L3="<<L3<<" aVal="<<aVal<<endl;
break;
}
else if (len == 8){ // quadratic quadrangles
break;
case SMDSEntity_Quad_Quadrangle:
case SMDSEntity_BiQuad_Quadrangle:
if (len >= 8){ // quadratic quadrangles
double L1 = getDistance(P( 1 ),P( 2 )) + getDistance(P( 2 ),P( 3 ));
double L2 = getDistance(P( 3 ),P( 4 )) + getDistance(P( 4 ),P( 5 ));
double L3 = getDistance(P( 5 ),P( 6 )) + getDistance(P( 6 ),P( 7 ));
double L4 = getDistance(P( 7 ),P( 8 )) + getDistance(P( 8 ),P( 1 ));
aVal = Min(Min(L1,L2),Min(L3,L4));
break;
}
case SMDSAbs_Volume:
if (len == 4){ // tetraidrs
break;
case SMDSEntity_Tetra:
if (len == 4){ // tetrahedra
double L1 = getDistance(P( 1 ),P( 2 ));
double L2 = getDistance(P( 2 ),P( 3 ));
double L3 = getDistance(P( 3 ),P( 1 ));
@ -1595,9 +1597,10 @@ double Length2D::GetValue( long theElementId )
double L5 = getDistance(P( 2 ),P( 4 ));
double L6 = getDistance(P( 3 ),P( 4 ));
aVal = Min(Min(Min(L1,L2),Min(L3,L4)),Min(L5,L6));
break;
}
else if (len == 5){ // piramids
break;
case SMDSEntity_Pyramid:
if (len == 5){ // piramids
double L1 = getDistance(P( 1 ),P( 2 ));
double L2 = getDistance(P( 2 ),P( 3 ));
double L3 = getDistance(P( 3 ),P( 4 ));
@ -1609,9 +1612,10 @@ double Length2D::GetValue( long theElementId )
aVal = Min(Min(Min(L1,L2),Min(L3,L4)),Min(L5,L6));
aVal = Min(aVal,Min(L7,L8));
break;
}
else if (len == 6){ // pentaidres
break;
case SMDSEntity_Penta:
if (len == 6) { // pentaidres
double L1 = getDistance(P( 1 ),P( 2 ));
double L2 = getDistance(P( 2 ),P( 3 ));
double L3 = getDistance(P( 3 ),P( 1 ));
@ -1624,9 +1628,10 @@ double Length2D::GetValue( long theElementId )
aVal = Min(Min(Min(L1,L2),Min(L3,L4)),Min(L5,L6));
aVal = Min(aVal,Min(Min(L7,L8),L9));
break;
}
else if (len == 8){ // hexaider
break;
case SMDSEntity_Hexa:
if (len == 8){ // hexahedron
double L1 = getDistance(P( 1 ),P( 2 ));
double L2 = getDistance(P( 2 ),P( 3 ));
double L3 = getDistance(P( 3 ),P( 4 ));
@ -1643,10 +1648,9 @@ double Length2D::GetValue( long theElementId )
aVal = Min(Min(Min(L1,L2),Min(L3,L4)),Min(L5,L6));
aVal = Min(aVal,Min(Min(L7,L8),Min(L9,L10)));
aVal = Min(aVal,Min(L11,L12));
break;
}
break;
case SMDSEntity_Quad_Tetra:
if (len == 10){ // quadratic tetraidrs
double L1 = getDistance(P( 1 ),P( 5 )) + getDistance(P( 5 ),P( 2 ));
double L2 = getDistance(P( 2 ),P( 6 )) + getDistance(P( 6 ),P( 3 ));
@ -1655,9 +1659,10 @@ double Length2D::GetValue( long theElementId )
double L5 = getDistance(P( 2 ),P( 9 )) + getDistance(P( 9 ),P( 4 ));
double L6 = getDistance(P( 3 ),P( 10 )) + getDistance(P( 10 ),P( 4 ));
aVal = Min(Min(Min(L1,L2),Min(L3,L4)),Min(L5,L6));
break;
}
else if (len == 13){ // quadratic piramids
break;
case SMDSEntity_Quad_Pyramid:
if (len == 13){ // quadratic piramids
double L1 = getDistance(P( 1 ),P( 6 )) + getDistance(P( 6 ),P( 2 ));
double L2 = getDistance(P( 2 ),P( 7 )) + getDistance(P( 7 ),P( 3 ));
double L3 = getDistance(P( 3 ),P( 8 )) + getDistance(P( 8 ),P( 4 ));
@ -1668,9 +1673,10 @@ double Length2D::GetValue( long theElementId )
double L8 = getDistance(P( 4 ),P( 13 )) + getDistance(P( 13 ),P( 5 ));
aVal = Min(Min(Min(L1,L2),Min(L3,L4)),Min(L5,L6));
aVal = Min(aVal,Min(L7,L8));
break;
}
else if (len == 15){ // quadratic pentaidres
break;
case SMDSEntity_Quad_Penta:
if (len == 15){ // quadratic pentaidres
double L1 = getDistance(P( 1 ),P( 7 )) + getDistance(P( 7 ),P( 2 ));
double L2 = getDistance(P( 2 ),P( 8 )) + getDistance(P( 8 ),P( 3 ));
double L3 = getDistance(P( 3 ),P( 9 )) + getDistance(P( 9 ),P( 1 ));
@ -1682,9 +1688,11 @@ double Length2D::GetValue( long theElementId )
double L9 = getDistance(P( 3 ),P( 15 )) + getDistance(P( 15 ),P( 6 ));
aVal = Min(Min(Min(L1,L2),Min(L3,L4)),Min(L5,L6));
aVal = Min(aVal,Min(Min(L7,L8),L9));
break;
}
else if (len == 20){ // quadratic hexaider
break;
case SMDSEntity_Quad_Hexa:
case SMDSEntity_TriQuad_Hexa:
if (len >= 20) { // quadratic hexaider
double L1 = getDistance(P( 1 ),P( 9 )) + getDistance(P( 9 ),P( 2 ));
double L2 = getDistance(P( 2 ),P( 10 )) + getDistance(P( 10 ),P( 3 ));
double L3 = getDistance(P( 3 ),P( 11 )) + getDistance(P( 11 ),P( 4 ));
@ -1700,11 +1708,55 @@ double Length2D::GetValue( long theElementId )
aVal = Min(Min(Min(L1,L2),Min(L3,L4)),Min(L5,L6));
aVal = Min(aVal,Min(Min(L7,L8),Min(L9,L10)));
aVal = Min(aVal,Min(L11,L12));
break;
}
break;
case SMDSEntity_Polygon:
if ( len > 1 ) {
aVal = getDistance( P(1), P( P.size() ));
for ( size_t i = 1; i < P.size(); ++i )
aVal = Min( aVal, getDistance( P( i ), P( i+1 )));
}
break;
case SMDSEntity_Quad_Polygon:
if ( len > 2 ) {
aVal = getDistance( P(1), P( P.size() )) + getDistance( P(P.size()), P( P.size()-1 ));
for ( size_t i = 1; i < P.size()-1; i += 2 )
aVal = Min( aVal, getDistance( P( i ), P( i+1 )) + getDistance( P( i+1 ), P( i+2 )));
}
break;
case SMDSEntity_Hexagonal_Prism:
if (len == 12) { // hexagonal prism
double L1 = getDistance(P( 1 ),P( 2 ));
double L2 = getDistance(P( 2 ),P( 3 ));
double L3 = getDistance(P( 3 ),P( 4 ));
double L4 = getDistance(P( 4 ),P( 5 ));
double L5 = getDistance(P( 5 ),P( 6 ));
double L6 = getDistance(P( 6 ),P( 1 ));
default: aVal=-1;
double L7 = getDistance(P( 7 ), P( 8 ));
double L8 = getDistance(P( 8 ), P( 9 ));
double L9 = getDistance(P( 9 ), P( 10 ));
double L10= getDistance(P( 10 ),P( 11 ));
double L11= getDistance(P( 11 ),P( 12 ));
double L12= getDistance(P( 12 ),P( 7 ));
double L13 = getDistance(P( 1 ),P( 7 ));
double L14 = getDistance(P( 2 ),P( 8 ));
double L15 = getDistance(P( 3 ),P( 9 ));
double L16 = getDistance(P( 4 ),P( 10 ));
double L17 = getDistance(P( 5 ),P( 11 ));
double L18 = getDistance(P( 6 ),P( 12 ));
aVal = Min(Min(Min(L1,L2),Min(L3,L4)),Min(L5,L6));
aVal = Min(aVal, Min(Min(Min(L7,L8),Min(L9,L10)),Min(L11,L12)));
aVal = Min(aVal, Min(Min(Min(L13,L14),Min(L15,L16)),Min(L17,L18)));
}
break;
case SMDSEntity_Polyhedra:
{
}
break;
default:
return 0;
}
if (aVal < 0 ) {
@ -1743,14 +1795,16 @@ Length2D::Value::Value(double theLength,long thePntId1, long thePntId2):
}
}
bool Length2D::Value::operator<(const Length2D::Value& x) const{
bool Length2D::Value::operator<(const Length2D::Value& x) const
{
if(myPntId[0] < x.myPntId[0]) return true;
if(myPntId[0] == x.myPntId[0])
if(myPntId[1] < x.myPntId[1]) return true;
return false;
}
void Length2D::GetValues(TValues& theValues){
void Length2D::GetValues(TValues& theValues)
{
TValues aValues;
SMDS_FaceIteratorPtr anIter = myMesh->facesIterator();
for(; anIter->more(); ){
@ -1947,14 +2001,16 @@ MultiConnection2D::Value::Value(long thePntId1, long thePntId2)
}
}
bool MultiConnection2D::Value::operator<(const MultiConnection2D::Value& x) const{
bool MultiConnection2D::Value::operator<(const MultiConnection2D::Value& x) const
{
if(myPntId[0] < x.myPntId[0]) return true;
if(myPntId[0] == x.myPntId[0])
if(myPntId[1] < x.myPntId[1]) return true;
return false;
}
void MultiConnection2D::GetValues(MValues& theValues){
void MultiConnection2D::GetValues(MValues& theValues)
{
if ( !myMesh ) return;
SMDS_FaceIteratorPtr anIter = myMesh->facesIterator();
for(; anIter->more(); ){
@ -2374,26 +2430,15 @@ bool FreeEdges::IsSatisfy( long theId )
if ( aFace == 0 || aFace->GetType() != SMDSAbs_Face || aFace->NbNodes() < 3 )
return false;
SMDS_ElemIteratorPtr anIter;
if ( aFace->IsQuadratic() ) {
anIter = dynamic_cast<const SMDS_VtkFace*>
(aFace)->interlacedNodesElemIterator();
}
else {
anIter = aFace->nodesIterator();
}
SMDS_NodeIteratorPtr anIter = aFace->interlacedNodesIterator();
if ( !anIter )
return false;
int i = 0, nbNodes = aFace->NbNodes();
std::vector <const SMDS_MeshNode*> aNodes( nbNodes+1 );
while( anIter->more() )
{
const SMDS_MeshNode* aNode = (SMDS_MeshNode*)anIter->next();
if ( aNode == 0 )
if ( ! ( aNodes[ i++ ] = anIter->next() ))
return false;
aNodes[ i++ ] = aNode;
}
aNodes[ nbNodes ] = aNodes[ 0 ];
for ( i = 0; i < nbNodes; i++ )
@ -2526,7 +2571,7 @@ bool FreeFaces::IsSatisfy( long theId )
int nbNode = aFace->NbNodes();
// collect volumes check that number of volumss with count equal nbNode not less than 2
// collect volumes to check that number of volumes with count equal nbNode not less than 2
typedef map< SMDS_MeshElement*, int > TMapOfVolume; // map of volume counters
typedef map< SMDS_MeshElement*, int >::iterator TItrMapOfVolume; // iterator
TMapOfVolume mapOfVol;
@ -2606,7 +2651,7 @@ GroupColor::GroupColor()
bool GroupColor::IsSatisfy( long theId )
{
return (myIDs.find( theId ) != myIDs.end());
return myIDs.count( theId );
}
void GroupColor::SetType( SMDSAbs_ElementType theType )
@ -2624,16 +2669,15 @@ static bool isEqual( const Quantity_Color& theColor1,
{
// tolerance to compare colors
const double tol = 5*1e-3;
return ( fabs( theColor1.Red() - theColor2.Red() ) < tol &&
return ( fabs( theColor1.Red() - theColor2.Red() ) < tol &&
fabs( theColor1.Green() - theColor2.Green() ) < tol &&
fabs( theColor1.Blue() - theColor2.Blue() ) < tol );
fabs( theColor1.Blue() - theColor2.Blue() ) < tol );
}
void GroupColor::SetMesh( const SMDS_Mesh* theMesh )
{
myIDs.clear();
const SMESHDS_Mesh* aMesh = dynamic_cast<const SMESHDS_Mesh*>(theMesh);
if ( !aMesh )
return;
@ -2641,20 +2685,24 @@ void GroupColor::SetMesh( const SMDS_Mesh* theMesh )
int nbGrp = aMesh->GetNbGroups();
if ( !nbGrp )
return;
// iterates on groups and find necessary elements ids
const std::set<SMESHDS_GroupBase*>& aGroups = aMesh->GetGroups();
set<SMESHDS_GroupBase*>::const_iterator GrIt = aGroups.begin();
for (; GrIt != aGroups.end(); GrIt++) {
for (; GrIt != aGroups.end(); GrIt++)
{
SMESHDS_GroupBase* aGrp = (*GrIt);
if ( !aGrp )
continue;
// check type and color of group
if ( !isEqual( myColor, aGrp->GetColor() ) )
continue;
if ( myType != SMDSAbs_All && myType != (SMDSAbs_ElementType)aGrp->GetType() )
if ( !isEqual( myColor, aGrp->GetColor() ))
continue;
// IPAL52867 (prevent infinite recursion via GroupOnFilter)
if ( SMESHDS_GroupOnFilter * gof = dynamic_cast< SMESHDS_GroupOnFilter* >( aGrp ))
if ( gof->GetPredicate().get() == this )
continue;
SMDSAbs_ElementType aGrpElType = (SMDSAbs_ElementType)aGrp->GetType();
if ( myType == aGrpElType || (myType == SMDSAbs_All && aGrpElType != SMDSAbs_Node) ) {
// add elements IDS into control
@ -4634,20 +4682,20 @@ bool LyingOnGeom::Contains( const SMESHDS_Mesh* theMeshDS,
return false;
}
TSequenceOfXYZ::TSequenceOfXYZ()
TSequenceOfXYZ::TSequenceOfXYZ(): myElem(0)
{}
TSequenceOfXYZ::TSequenceOfXYZ(size_type n) : myArray(n)
TSequenceOfXYZ::TSequenceOfXYZ(size_type n) : myArray(n), myElem(0)
{}
TSequenceOfXYZ::TSequenceOfXYZ(size_type n, const gp_XYZ& t) : myArray(n,t)
TSequenceOfXYZ::TSequenceOfXYZ(size_type n, const gp_XYZ& t) : myArray(n,t), myElem(0)
{}
TSequenceOfXYZ::TSequenceOfXYZ(const TSequenceOfXYZ& theSequenceOfXYZ) : myArray(theSequenceOfXYZ.myArray)
TSequenceOfXYZ::TSequenceOfXYZ(const TSequenceOfXYZ& theSequenceOfXYZ) : myArray(theSequenceOfXYZ.myArray), myElem(theSequenceOfXYZ.myElem)
{}
template <class InputIterator>
TSequenceOfXYZ::TSequenceOfXYZ(InputIterator theBegin, InputIterator theEnd): myArray(theBegin,theEnd)
TSequenceOfXYZ::TSequenceOfXYZ(InputIterator theBegin, InputIterator theEnd): myArray(theBegin,theEnd), myElem(0)
{}
TSequenceOfXYZ::~TSequenceOfXYZ()
@ -4656,6 +4704,7 @@ TSequenceOfXYZ::~TSequenceOfXYZ()
TSequenceOfXYZ& TSequenceOfXYZ::operator=(const TSequenceOfXYZ& theSequenceOfXYZ)
{
myArray = theSequenceOfXYZ.myArray;
myElem = theSequenceOfXYZ.myElem;
return *this;
}
@ -4689,6 +4738,11 @@ TSequenceOfXYZ::size_type TSequenceOfXYZ::size() const
return myArray.size();
}
SMDSAbs_EntityType TSequenceOfXYZ::getElementEntity() const
{
return myElem ? myElem->GetEntityType() : SMDSEntity_Last;
}
TMeshModifTracer::TMeshModifTracer():
myMeshModifTime(0), myMesh(0)
{

View File

@ -67,7 +67,7 @@ namespace SMESH{
public:
TSequenceOfXYZ();
TSequenceOfXYZ(size_type n);
explicit TSequenceOfXYZ(size_type n);
TSequenceOfXYZ(size_type n, const gp_XYZ& t);
@ -92,8 +92,16 @@ namespace SMESH{
size_type size() const;
void setElement(const SMDS_MeshElement* e) { myElem = e; }
const SMDS_MeshElement* getElement() const { return myElem; }
SMDSAbs_EntityType getElementEntity() const;
private:
std::vector<gp_XYZ> myArray;
std::vector<gp_XYZ> myArray;
const SMDS_MeshElement* myElem;
};
/*!

View File

@ -147,6 +147,7 @@ namespace
}
{
cgTypes[SMDSEntity_Polygon] = CGNS_ENUMV( NGON_n );
cgTypes[SMDSEntity_Quad_Polygon] = CGNS_ENUMV( NGON_n );
cgTypes[SMDSEntity_Polyhedra] = CGNS_ENUMV( NFACE_n );
cgTypes[SMDSEntity_Hexagonal_Prism] = CGNS_ENUMV( NFACE_n );
}
@ -370,6 +371,21 @@ Driver_Mesh::Status DriverCGNS_Write::Perform()
}
while ( elem && elem->GetEntityType() == elemType );
else if ( elemType == SMDSEntity_Quad_Polygon ) // QUADRATIC POLYGONS
do // write as linear NGON_n
{
elemData.push_back( elem->NbNodes() );
interlace = & SMDS_MeshCell::interlacedSmdsOrder( SMDSEntity_Quad_Polygon,
elem->NbNodes() )[0];
for ( int i = 0, nb = elem->NbNodes(); i < nb; ++i )
elemData.push_back( cgnsID( elem->GetNode( interlace[i] ), n2cgID ));
if ( elem->GetID() != cgID )
elem2cgID.insert( elem2cgID.end(), make_pair( elem, cgID ));
++cgID;
elem = elemIt->more() ? elemIt->next() : 0;
}
while ( elem && elem->GetEntityType() == elemType );
else if ( elemType == SMDSEntity_Polyhedra ||
elemType == SMDSEntity_Hexagonal_Prism) // POLYHEDRA
{

View File

@ -38,7 +38,6 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
Status aResult = DRS_OK;
int nbNodes, nbCells;
//int i;
char *file2Read = (char *)myFile.c_str();
FILE* aFileId = fopen(file2Read, "w+");
@ -55,7 +54,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
nbNodes = myMesh->NbNodes();
/* Combien de mailles, faces ou aretes ? */
int /*nb_of_nodes,*/ nb_of_edges, nb_of_faces, nb_of_volumes;
int nb_of_edges, nb_of_faces, nb_of_volumes;
nb_of_edges = myMesh->NbEdges();
nb_of_faces = myMesh->NbFaces();
nb_of_volumes = myMesh->NbVolumes();
@ -64,7 +63,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
SCRUTE(nb_of_faces);
SCRUTE(nb_of_volumes);
fprintf(stdout, "%d %d\n", nbNodes, nbCells);
//fprintf(stdout, "%d %d\n", nbNodes, nbCells);
fprintf(aFileId, "%d %d\n", nbNodes, nbCells);
/****************************************************************************
@ -74,7 +73,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
SMDS_NodeIteratorPtr itNodes=myMesh->nodesIterator();
while(itNodes->more()){
const SMDS_MeshNode * node = itNodes->next();
fprintf(aFileId, "%d %e %e %e\n", node->GetID(), node->X(), node->Y(), node->Z());
fprintf(aFileId, "%d %.14e %.14e %.14e\n", node->GetID(), node->X(), node->Y(), node->Z());
}
/****************************************************************************

File diff suppressed because it is too large Load Diff

View File

@ -56,7 +56,8 @@ DriverMED_W_SMESHDS_Mesh::DriverMED_W_SMESHDS_Mesh():
myDoGroupOfVolumes (false),
myDoGroupOf0DElems(false),
myDoGroupOfBalls(false),
myAutoDimension(true)
myAutoDimension(true),
myAddODOnVertices(false)
{}
void DriverMED_W_SMESHDS_Mesh::SetFile(const std::string& theFileName,
@ -605,12 +606,21 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
if ( polyTypesSupported ) {
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePOLYGONE,
nbElemInfo.NbPolygons(),
nbElemInfo.NbPolygons( ORDER_LINEAR ),
SMDSAbs_Face));
// we need one more loop on poly elements to count nb of their nodes
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePOLYGONE,
nbElemInfo.NbPolygons(),
nbElemInfo.NbPolygons( ORDER_LINEAR ),
SMDSAbs_Face));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePOLYGON2,
nbElemInfo.NbPolygons( ORDER_QUADRATIC ),
SMDSAbs_Face));
// we need one more loop on QUAD poly elements to count nb of their nodes
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePOLYGON2,
nbElemInfo.NbPolygons( ORDER_QUADRATIC ),
SMDSAbs_Face));
}
#ifdef _ELEMENTS_BY_DIM_
@ -706,9 +716,14 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
// Treat POLYGONs
// ---------------
if ( aElemTypeData->_geomType == ePOLYGONE )
if ( aElemTypeData->_geomType == ePOLYGONE ||
aElemTypeData->_geomType == ePOLYGON2 )
{
elemIterator = myMesh->elementGeomIterator( SMDSGeom_POLYGON );
if ( aElemTypeData->_geomType == ePOLYGONE )
elemIterator = myMesh->elementEntityIterator( SMDSEntity_Polygon );
else
elemIterator = myMesh->elementEntityIterator( SMDSEntity_Quad_Polygon );
if ( nbPolygonNodes == 0 ) {
// Count nb of nodes
while ( elemIterator->more() ) {
@ -758,9 +773,10 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
break;
}
myMed->SetPolygoneInfo(aPolygoneInfo);
}
}
nbPolygonNodes = 0; // to treat next polygon type
}
}
// Treat POLYEDREs
// ----------------

View File

@ -33,12 +33,15 @@
#include "SMDS_Mesh.hxx"
#include "SMDS_MeshElement.hxx"
#include "SMDS_MeshNode.hxx"
#include "SMDS_PolygonalFaceOfNodes.hxx"
#include "SMDS_SetIterator.hxx"
#include "SMDS_VolumeTool.hxx"
#include "SMESH_File.hxx"
#include "SMESH_TypeDefs.hxx"
//#include "utilities.h"
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
#include <gp_Ax2.hxx>
#include <limits>
@ -74,6 +77,7 @@ Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::Perform()
return aResult;
}
//================================================================================
/*!
* \brief Destructor deletes temporary faces
@ -82,8 +86,8 @@ Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::Perform()
DriverSTL_W_SMDS_Mesh::~DriverSTL_W_SMDS_Mesh()
{
for ( unsigned i = 0; i < myVolumeTrias.size(); ++i )
delete myVolumeTrias[i];
for ( unsigned i = 0; i < myVolumeFacets.size(); ++i )
delete myVolumeFacets[i];
}
//================================================================================
@ -94,6 +98,8 @@ DriverSTL_W_SMDS_Mesh::~DriverSTL_W_SMDS_Mesh()
void DriverSTL_W_SMDS_Mesh::findVolumeTriangles()
{
myNbVolumeTrias = 0;
SMDS_VolumeTool theVolume;
SMDS_VolumeIteratorPtr vIt = myMesh->volumesIterator();
std::vector< const SMDS_MeshNode*> nodes;
@ -106,19 +112,20 @@ void DriverSTL_W_SMDS_Mesh::findVolumeTriangles()
const SMDS_MeshNode** n = theVolume.GetFaceNodes(iF);
int nbN = theVolume.NbFaceNodes(iF);
nodes.assign( n, n+nbN );
if ( !myMesh->FindElement( nodes, SMDSAbs_Face, /*Nomedium=*/false))
if ( !myMesh->FindElement( nodes, SMDSAbs_Face, /*noMedium=*/false))
{
if ( nbN == 9 && !theVolume.IsPoly() ) // facet is SMDSEntity_BiQuad_Quadrangle
if (( nbN == 9 || nbN == 7 ) &&
( !theVolume.IsPoly() )) // facet is bi-quaratic
{
int nbTria = nbN - 1;
for ( int iT = 0; iT < nbTria; ++iT )
myVolumeTrias.push_back( new SMDS_FaceOfNodes( n[8], n[0+iT], n[1+iT] ));
myVolumeFacets.push_back( new SMDS_FaceOfNodes( n[8], n[0+iT], n[1+iT] ));
myNbVolumeTrias += nbTria;
}
else
{
int nbTria = nbN - 2;
for ( int iT = 0; iT < nbTria; ++iT )
myVolumeTrias.push_back( new SMDS_FaceOfNodes( n[0], n[1+iT], n[2+iT] ));
myVolumeFacets.push_back( new SMDS_PolygonalFaceOfNodes( nodes ));
myNbVolumeTrias += nbN - 2;
}
}
}
@ -134,8 +141,8 @@ void DriverSTL_W_SMDS_Mesh::findVolumeTriangles()
SMDS_ElemIteratorPtr DriverSTL_W_SMDS_Mesh::getFaces() const
{
SMDS_ElemIteratorPtr facesIter = myMesh->elementsIterator(SMDSAbs_Face);
SMDS_ElemIteratorPtr tmpTriaIter( new SMDS_ElementVectorIterator( myVolumeTrias.begin(),
myVolumeTrias.end()));
SMDS_ElemIteratorPtr tmpTriaIter( new SMDS_ElementVectorIterator( myVolumeFacets.begin(),
myVolumeFacets.end()));
typedef std::vector< SMDS_ElemIteratorPtr > TElemIterVector;
TElemIterVector iters(2);
iters[0] = facesIter;
@ -201,6 +208,177 @@ static gp_XYZ getNormale( const SMDS_MeshNode* n1,
return n;
}
namespace
{
/*!
* \brief Vertex of a polygon. Together with 2 neighbor Vertices represents a triangle
*/
struct PolyVertex
{
SMESH_TNodeXYZ _nxyz;
gp_XY _xy;
PolyVertex* _prev;
PolyVertex* _next;
void SetNodeAndNext( const SMDS_MeshNode* n, PolyVertex& v )
{
_nxyz.Set( n );
_next = &v;
v._prev = this;
}
PolyVertex* Delete()
{
_prev->_next = _next;
_next->_prev = _prev;
return _next;
}
void GetTriaNodes( const SMDS_MeshNode** nodes) const
{
nodes[0] = _prev->_nxyz._node;
nodes[1] = this->_nxyz._node;
nodes[2] = _next->_nxyz._node;
}
inline static double Area( const PolyVertex* v0, const PolyVertex* v1, const PolyVertex* v2 )
{
gp_XY vPrev = v0->_xy - v1->_xy;
gp_XY vNext = v2->_xy - v1->_xy;
return vNext ^ vPrev;
}
double TriaArea() const { return Area( _prev, this, _next ); }
bool IsInsideTria( const PolyVertex* v )
{
gp_XY p = _prev->_xy - v->_xy;
gp_XY t = this->_xy - v->_xy;
gp_XY n = _next->_xy - v->_xy;
const double tol = -1e-12;
return (( p ^ t ) >= tol &&
( t ^ n ) >= tol &&
( n ^ p ) >= tol );
// return ( Area( _prev, this, v ) > 0 &&
// Area( this, _next, v ) > 0 &&
// Area( _next, _prev, v ) > 0 );
}
};
//================================================================================
/*!
* \brief Triangulate a polygon. Assure correct orientation for concave polygons
*/
//================================================================================
bool triangulate( std::vector< const SMDS_MeshNode*>& nodes, const size_t nbNodes )
{
// connect nodes into a ring
std::vector< PolyVertex > pv( nbNodes );
for ( size_t i = 1; i < nbNodes; ++i )
pv[i-1].SetNodeAndNext( nodes[i-1], pv[i] );
pv[ nbNodes-1 ].SetNodeAndNext( nodes[ nbNodes-1 ], pv[0] );
// get a polygon normal
gp_XYZ normal(0,0,0), p0,v01,v02;
p0 = pv[0]._nxyz;
v01 = pv[1]._nxyz - p0;
for ( size_t i = 2; i < nbNodes; ++i )
{
v02 = pv[i]._nxyz - p0;
normal += v01 ^ v02;
v01 = v02;
}
// project nodes to the found plane
gp_Ax2 axes;
try {
axes = gp_Ax2( p0, normal, v01 );
}
catch ( Standard_Failure ) {
return false;
}
for ( size_t i = 0; i < nbNodes; ++i )
{
gp_XYZ p = pv[i]._nxyz - p0;
pv[i]._xy.SetX( axes.XDirection().XYZ() * p );
pv[i]._xy.SetY( axes.YDirection().XYZ() * p );
}
// in a loop, find triangles with positive area and having no vertices inside
int iN = 0, nbTria = nbNodes - 2;
nodes.reserve( nbTria * 3 );
const double minArea = 1e-6;
PolyVertex* v = &pv[0], *vi;
int nbVertices = nbNodes, nbBadTria = 0, isGoodTria;
while ( nbBadTria < nbVertices )
{
if (( isGoodTria = v->TriaArea() > minArea ))
{
for ( vi = v->_next->_next;
vi != v->_prev;
vi = vi->_next )
{
if ( v->IsInsideTria( vi ))
break;
}
isGoodTria = ( vi == v->_prev );
}
if ( isGoodTria )
{
v->GetTriaNodes( &nodes[ iN ] );
iN += 3;
v = v->Delete();
if ( --nbVertices == 3 )
{
// last triangle remains
v->GetTriaNodes( &nodes[ iN ] );
return true;
}
nbBadTria = 0;
}
else
{
v = v->_next;
++nbBadTria;
}
}
// the polygon is invalid; add triangles with positive area
nbBadTria = 0;
while ( nbBadTria < nbVertices )
{
isGoodTria = v->TriaArea() > minArea;
if ( isGoodTria )
{
v->GetTriaNodes( &nodes[ iN ] );
iN += 3;
v = v->Delete();
if ( --nbVertices == 3 )
{
// last triangle remains
v->GetTriaNodes( &nodes[ iN ] );
return true;
}
nbBadTria = 0;
}
else
{
v = v->_next;
++nbBadTria;
}
}
// add all the rest triangles
while ( nbVertices >= 3 )
{
v->GetTriaNodes( &nodes[ iN ] );
iN += 3;
v = v->Delete();
--nbVertices;
}
return true;
} // triangulate()
} // namespace
//================================================================================
/*!
* \brief Return nb triangles in a decomposed mesh face
@ -235,12 +413,13 @@ static int getNbTriangles( const SMDS_MeshElement* face)
*/
//================================================================================
static int getTriangles( const SMDS_MeshElement* face,
const SMDS_MeshNode** nodes)
static int getTriangles( const SMDS_MeshElement* face,
std::vector< const SMDS_MeshNode*>& nodes)
{
// WARNING: decomposing into triangles must be coherent with getNbTriangles()
int nbTria, i = 0;
int nbTria, i = 0, nbNodes = face->NbNodes();
SMDS_NodeIteratorPtr nIt = face->interlacedNodesIterator();
nodes.resize( nbNodes * 3 );
nodes[ i++ ] = nIt->next();
nodes[ i++ ] = nIt->next();
@ -251,30 +430,42 @@ static int getTriangles( const SMDS_MeshElement* face,
case SMDSEntity_BiQuad_Quadrangle:
nbTria = ( type == SMDSEntity_BiQuad_Triangle ) ? 6 : 8;
nodes[ i++ ] = face->GetNode( nbTria );
while ( i < 3*(nbTria-1) )
for ( i = 3; i < 3*(nbTria-1); i += 3 )
{
nodes[ i++ ] = nodes[ i-2 ];
nodes[ i++ ] = nIt->next();
nodes[ i++ ] = nodes[ 2 ];
nodes[ i+0 ] = nodes[ i-2 ];
nodes[ i+1 ] = nIt->next();
nodes[ i+2 ] = nodes[ 2 ];
}
nodes[ i++ ] = nodes[ i-2 ];
nodes[ i++ ] = nodes[ 0 ];
nodes[ i++ ] = nodes[ 2 ];
nodes[ i+0 ] = nodes[ i-2 ];
nodes[ i+1 ] = nodes[ 0 ];
nodes[ i+2 ] = nodes[ 2 ];
break;
case SMDSEntity_Triangle:
nbTria = 1;
nodes[ i++ ] = nIt->next();
break;
default:
// case SMDSEntity_Triangle:
// case SMDSEntity_Quad_Triangle:
// case SMDSEntity_Quadrangle:
// case SMDSEntity_Quad_Quadrangle:
// case SMDSEntity_Polygon:
// case SMDSEntity_Quad_Polygon:
nbTria = face->NbNodes() - 2;
nodes[ i++ ] = nIt->next();
while ( i < 3*nbTria )
{
nodes[ i++ ] = nodes[ 0 ];
nodes[ i++ ] = nodes[ i-2 ];
nbTria = nbNodes - 2;
while ( nIt->more() )
nodes[ i++ ] = nIt->next();
if ( !triangulate( nodes, nbNodes ))
{
nIt = face->interlacedNodesIterator();
nodes[ 0 ] = nIt->next();
nodes[ 1 ] = nIt->next();
nodes[ 2 ] = nIt->next();
for ( i = 3; i < 3*nbTria; i += 3 )
{
nodes[ i+0 ] = nodes[ 0 ];
nodes[ i+1 ] = nodes[ i-1 ];
nodes[ i+2 ] = nIt->next();
}
}
break;
}
@ -298,7 +489,7 @@ Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::writeAscii() const
aFile.writeRaw( buf.c_str(), buf.size() );
char sval[128];
const SMDS_MeshNode* triaNodes[2048];
std::vector< const SMDS_MeshNode* > triaNodes;
SMDS_ElemIteratorPtr itFaces = getFaces();
while ( itFaces->more() )
@ -354,7 +545,7 @@ Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::writeBinary() const
aFile.openForWriting();
// we first count the number of triangles
int nbTri = myVolumeTrias.size();
int nbTri = myNbVolumeTrias;
{
SMDS_FaceIteratorPtr itFaces = myMesh->facesIterator();
while ( itFaces->more() ) {
@ -372,7 +563,7 @@ Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::writeBinary() const
int dum=0;
const SMDS_MeshNode* triaNodes[2048];
std::vector< const SMDS_MeshNode* > triaNodes;
SMDS_ElemIteratorPtr itFaces = getFaces();
while ( itFaces->more() )

Some files were not shown because too many files have changed in this diff Show More