\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.
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>
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
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>
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:
<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>
\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
\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).
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
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
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 )
{
aBuilder.Add( aCompound, S );
if ( !subMesh->SubMeshesComputed() )
theSubComputed = false;
+ theSubs.push_back( subMesh );
}
}
}
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
}
return true;
}
+
// Node or 0D element -------------------------------------------------------------------------
{
gp_Vec n2p ( xyz[0], point );