Minor doc changes

+ fix meshing progress (SMESH_subMesh.cxx)
This commit is contained in:
eap 2016-07-08 22:22:13 +03:00
parent 9b27b015d9
commit 0f9ed6f02c
6 changed files with 65 additions and 21 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -2,6 +2,8 @@
\page constructing_submeshes_page Constructing sub-meshes
\tableofcontents
By purpose, the sub-mesh is an object used to assign to a sub-shape
different meshing parameters than those assigned to the main shape.
@ -14,6 +16,8 @@ Creation of a sub-mesh allows to control individually meshing of a
certain sub-shape, thus to get a locally coarser or finer mesh, to get
elements of different types in the same mesh, etc.
\section submesh_shape_section How to get a sub-shape for sub-mesh construction
A sub-shape to create a sub-mesh on should be retrieved from the main shape
in one of the following ways: <ul>
<li> In Geometry module, via <em>New Entity > Explode</em> menu.</li>
@ -27,6 +31,8 @@ in one of the following ways: <ul>
dialog showing \ref meshing_failed_anchor "meshing errors".</li>
</ul>
\section submesh_priority How hypotheses are selected among sub-meshes
Internally, definition of meshing parameters to apply for
discretization of a certain sub-shape, for example an edge of a
compound of solids, starts from searching an algorithm, 1D as for the
@ -62,6 +68,8 @@ 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.
\section submesh_definition How to construct a sub-mesh
\n Construction of a sub-mesh consists of:
<ul>
<li>Selecting a mesh which will encapsulate the sub-mesh</li>
@ -123,6 +131,8 @@ ID in <b> Element ID</b> field.
with which the sub-shape will appear in the Object Browser (if not yet
there).
\section submesh_tree Sub-mesh in the Object Browser
In the Object Browser the structure of the new sub-mesh will be
displayed as follows:
@ -133,9 +143,9 @@ It contains:
<li>a sub-mesh name (\a SubMeshFace1)
<li>a reference to the geometrical object on the basis of which the
sub-mesh has been constructed (<em>Cylindrical Face_1</em>);</li>
<li><em>Applied hypotheses</em> folder containing the references to the
<li><em>Applied hypotheses</em> folder containing references to
hypotheses assigned to the sub-mesh;</li>
<li><em>Applied algorithms</em> folder containing the references to the
<li><em>Applied algorithms</em> folder containing references to
algorithms assigned to the sub-mesh.</li>
</ul>

View File

@ -49,21 +49,35 @@ The \b Local algorithms and hypotheses to be chosen at
\ref constructing_submeshes_page "Construction of sub-meshes" are:
<ul>
<li> 1D and 2D algorithms and hypotheses that will be applied for
meshing the top and the base prism faces. These faces can be meshed
meshing the top and the base prism
\ref submesh_shape_section "faces". These faces can be meshed
with any type of 2D elements: quadrangles, triangles, polygons or
their mix. It is enough to define a sub-mesh on either the top or the base
face. In the sample picture above, "NETGEN_1D2D" algorithm meshes
"bottom disk" face with triangles. (1D algorithm is not
assigned as "NETGEN_1D2D" does not require divided edges to create a 2D mesh.)
their mix. It is enough to define a sub-mesh on either the top or
the base face. In the sample picture above, "NETGEN_1D2D"
algorithm meshes "bottom disk" face with triangles. (1D algorithm
is not assigned as "NETGEN_1D2D" does not require divided edges to
create a 2D mesh.)
</li>
<li> Optionally you can define a 1D sub-mesh on some vertical edges
of stacked prisms, which will override the global 1D hypothesis mentioned
above. In the <b>Prism stacks</b> picture, the
vertical division is not equidistant on the whole length because
a "Number Of Segments" hypothesis with Scale Factor=3 is assigned to
the highlighted edge.
<li> Optionally you can define a 1D sub-mesh on some vertical
\ref submesh_shape_section "edges" of stacked prisms, which will
override the global 1D hypothesis mentioned above. In the <b>Prism
stacks</b> picture, the vertical division is not equidistant on
the whole length because a "Number Of Segments" hypothesis with
Scale Factor=3 is assigned to the highlighted edge.
</li></ul>
If <em>3D extrusion</em> algorithm is assigned to a sub-mesh in a mesh
with multiple sub-meshes, the described above approach may not work as
expected. For example the bottom face may be meshed by other algorithm
before <em>3D extrusion</em> have a chance to project a mesh from the
base face. This thing can happen with vertical edges as well. All
these can lead to either a meshing failure or to an incorrect meshing.
In such a case, it's necessary to explicitly define algorithms
that <em>3D extrusion</em> implicitly applies in a simple case:
- assign \ref projection_1D2D algorithm to the top face and
- assign a 1D algorithm to a group of all vertical edges.
\image html image157.gif "Prism with 3D extrusion meshing. Vertical division is different on neighbor edges because several local 1D hypotheses are assigned."
\sa a sample TUI Script of

View File

@ -2,9 +2,20 @@
\page projection_algos_page Projection Algorithms
\n Projection algorithms allow to define the mesh of a geometrical
\tableofcontents
Projection algorithms allow to define the mesh of a geometrical
object by the projection of another already meshed geometrical object.
\note Source and target geometrical objects mush be topologically
equal, i.e. they must have same number of sub-shapes, connected to
corresponding counterparts.
\image html topo_equality.png Topologically equal faces suitable for 2D projection.
\section projection_1D Projection 1D
<b>Projection 1D</b> algorithm allows to define the mesh of an edge
(or group of edges)
by the projection of another already meshed edge (or group of edges).
@ -34,6 +45,8 @@ vertices are specified, the edges in the group must be connected.
The source and target groups must contain equal number of edges
and they must form topologically equal structures.
\section projection_2D Projection 2D
\n <b>Projection 2D</b> algorithm allows to define the mesh of a face
(or group of faces) by the projection of another already meshed face
(or group of faces). This algorithm works only if all edges of the
@ -64,12 +77,16 @@ The groups of faces are suitable for this algorithm only if they
contain an equal number of faces and form topologically equal
structures.
\n <b>Projection 1D-2D</b> algorithm differs from <b>Projection 2D</b>
algorithm in one aspect: it generates mesh segments on edges of
the face according to the projected 2D elements; thus it does not
require the edges to be meshed by any other 1D algorithm; moreover it
does not allow to mesh edges of the face using another algorithm via
definition of sub-meshes.
\section projection_1D2D Projection 1D-2D
\n <b>Projection 1D-2D</b> algorithm differs from
\ref projection_2D algorithm in one aspect: it generates mesh segments
on edges of the face according to the projected 2D elements; thus it
does not require the edges to be meshed by any other 1D algorithm;
moreover it does not allow to mesh edges of the face using another
algorithm via definition of sub-meshes.
\section projection_3D Projection 3D
\n <b>Projection 3D</b> algorithm allows to define the mesh of a shape by
the projection of another already meshed shape. This algorithm works

View File

@ -2079,10 +2079,10 @@ TopoDS_Shape SMESH_subMesh::getCollection(SMESH_Gen * theGen,
const TopoDS_Shape& S = subMesh->_subShape;
if ( S.ShapeType() != this->_subShape.ShapeType() )
continue;
theSubs.push_back( subMesh );
if ( subMesh == this )
{
aBuilder.Add( aCompound, S );
theSubs.push_back( subMesh );
}
else if ( subMesh->GetComputeState() == READY_TO_COMPUTE )
{
@ -2093,6 +2093,7 @@ TopoDS_Shape SMESH_subMesh::getCollection(SMESH_Gen * theGen,
aBuilder.Add( aCompound, S );
if ( !subMesh->SubMeshesComputed() )
theSubComputed = false;
theSubs.push_back( subMesh );
}
}
}

View File

@ -1252,6 +1252,7 @@ bool SMESH_MeshAlgos::IsOut( const SMDS_MeshElement* element, const gp_Pnt& poin
bool covexCorner = ( edgeNorm * edgeAdjacent * (rClosest==1. ? 1. : -1.)) < 0;
return covexCorner ? (out || out2) : (out && out2);
}
if ( element->GetType() == SMDSAbs_Edge ) // --------------------------------------------------
{
// point is out of edge if it is NOT ON any straight part of edge
@ -1279,6 +1280,7 @@ bool SMESH_MeshAlgos::IsOut( const SMDS_MeshElement* element, const gp_Pnt& poin
}
return true;
}
// Node or 0D element -------------------------------------------------------------------------
{
gp_Vec n2p ( xyz[0], point );