smesh/doc/salome/gui/SMESH/input/pattern_mapping.doc

232 lines
7.9 KiB
Plaintext
Raw Normal View History

/*!
\page pattern_mapping_page Pattern mapping
<br><h2>About patterns</h2>
The pattern describes a mesh to generate: positions of nodes within a
2012-08-09 16:03:55 +06:00
geometrical domain and nodal connectivity of elements. A
pattern also specifies the so-called key-points, i.e. the nodes that will be
located at geometrical vertices. The pattern description is stored in
\<pattern_name\>.smp file.
The smp file contains 4 sections:
2012-08-09 16:03:55 +06:00
-# The first line indicates the total number of pattern nodes (N).
-# The next N lines describe nodes coordinates. Each line contains 2
2015-05-14 14:51:53 +05:00
node coordinates for a 2D pattern or 3 node coordinates for a 3D pattern.
Note, that node coordinates of a 3D pattern can be defined only by
relative values in range [0;1].
2012-08-09 16:03:55 +06:00
-# The key-points line contains the indices of the nodes to be mapped on geometrical
2015-05-14 14:51:53 +05:00
vertices (for a 2D pattern only). Index n refers to the node described
on the n-th line of section 2. The index of the first node is
zero. For a 3D pattern the key points are not specified.
2012-08-09 16:03:55 +06:00
-# The remaining lines describe nodal connectivity of elements, one line
2015-05-14 14:51:53 +05:00
for each element. Each line holds indices of nodes forming an element.
Index n refers to the node described on the n-th line of section 2.
The first node index is zero. There must be 3 or 4 indices on each
line for a 2D pattern (only liner 2d elements are allowed) and 4, 5, 6 or 8
indices for a 3D pattern (only linear 3d elements are allowed).
2012-08-09 16:03:55 +06:00
A 2D pattern must contain at least one element and at least one
key-point. All key-points must lie on boundaries.
A 3D pattern must contain at least one element.
An example of a simple 2D pattern smp file:
\code
!!! SALOME 2D mesh pattern file
!!!
!!! Nb of points:
9
200 0 !- 0
100 0 !- 1
0 0 !- 2
0 -100 !- 3
0 -200 !- 4
100 -200 !- 5
200 -200 !- 6
200 -100 !- 7
100 -100 !- 8
!!! Indices of 4 key-points
2 0 4 6
!!! Indices of points of 6 elements
0 1 8
8 5 6 7
2 3 8
8 3 4 5
8 7 0
8 1 2
\endcode
The image below provides a preview of the above pattern:
\image html pattern2d.png
An example of a simple 3D pattern smp file:
\code
!!! SALOME 3D mesh pattern file
!!!
!!! Nb of points:
9
0 0 0 !- 0
1 0 0 !- 1
0 1 0 !- 2
1 1 0 !- 3
0 0 1 !- 4
1 0 1 !- 5
0 1 1 !- 6
1 1 1 !- 7
0.5 0.5 0.5 !- 8
!!! Indices of points of 6 elements:
0 1 5 4 8
7 5 1 3 8
3 2 6 7 8
2 0 4 6 8
0 2 3 1 8
4 5 7 6 8
\endcode
<br><h2>Application of pattern mapping</h2>
2014-11-07 18:51:28 +05:00
<em>To apply pattern mapping to a geometrical object or mesh elements:</em>
From the \b Modification menu choose the <b>Pattern Mapping</b> item or click
<em>"Pattern mapping"</em> button in the toolbar.
2009-02-17 10:27:49 +05:00
\image html image98.png
<center><em>"Pattern mapping" button</em></center>
2012-08-09 16:03:55 +06:00
The following dialog box will appear:
\n For a <b>2D pattern</b>
\image html patternmapping1.png
2012-08-09 16:03:55 +06:00
In this dialog you should specify:
<ul>
<li> \b Pattern, which can be loaded from .smp pattern file previously
2015-05-14 14:51:53 +05:00
created manually or generated automatically from an existing mesh or
sub-mesh.</li>
2012-08-09 16:03:55 +06:00
<li> \b Face with the number of vertices equal to the number of
2015-05-14 14:51:53 +05:00
key-points in the pattern; the number of key-points on internal
boundaries of the pattern must also be equal to the number of vertices
on internal boundaries of the face;</li>
2012-08-09 16:03:55 +06:00
<li> \b Vertex to which the first key-point should be mapped;</li>
2014-11-07 18:51:28 +05:00
</ul>
2015-05-14 14:51:53 +05:00
2012-08-09 16:03:55 +06:00
Alternatively, it is possible to select <b>Refine selected mesh elements</b>
2014-11-07 18:51:28 +05:00
check-box and apply the pattern to <ul>
2015-05-14 14:51:53 +05:00
<li> <b>Mesh Face</b> instead of a geometric Face</li>
<li> and select \b Node instead of vertex.</li>
2014-11-07 18:51:28 +05:00
</ul>
2015-05-14 14:51:53 +05:00
2014-11-07 18:51:28 +05:00
Additionally it is possible to: <ul>
<li> <b>Reverse the order of key-points</b>. By default, the vertices of
2015-05-14 14:51:53 +05:00
a face are ordered counterclockwise.</li>
2012-08-09 16:03:55 +06:00
<li> Enable to <b> Create polygons near boundary</b> </li>
2014-11-07 18:51:28 +05:00
<li> and <b>Create polyhedrons near boundary</b></li>
2012-08-09 16:03:55 +06:00
</ul>
\n For a <b>3D pattern</b>
\image html patternmapping2.png
2012-08-09 16:03:55 +06:00
In this dialog you should specify:
<ul>
2012-08-09 16:03:55 +06:00
<li> \b Pattern, which can be loaded from .smp pattern file previously
2015-05-14 14:51:53 +05:00
created manually or generated automatically from an existing mesh or
sub-mesh.</li>
2014-11-07 18:51:28 +05:00
<li> A 3D block (Solid) object.</li>
<li> Two vertices that specify the order of nodes in the resulting
mesh.</li>
</ul>
2015-05-14 14:51:53 +05:00
2012-08-09 16:03:55 +06:00
Alternatively, it is possible to select <b>Refine selected mesh elements</b>
2015-05-14 14:51:53 +05:00
check-box and apply the pattern to
2014-11-07 18:51:28 +05:00
<ul>
2015-05-14 14:51:53 +05:00
<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>
2014-11-07 18:51:28 +05:00
</ul>
2012-08-09 16:03:55 +06:00
Additionally it is possible to:
2014-11-07 18:51:28 +05:00
<ul>
2012-08-09 16:03:55 +06:00
<li> Enable to <b> Create polygons near boundary</b> </li>
2014-11-07 18:51:28 +05:00
<li> and <b>Create polyhedrons near boundary</b></li>
</ul>
2014-11-07 18:51:28 +05:00
<br>
2015-05-14 14:51:53 +05:00
<h3> Automatic Pattern Generation</h3>
2012-08-09 16:03:55 +06:00
2014-11-07 18:51:28 +05:00
To generate a pattern automatically from an existing mesh or sub-mesh,
2012-08-09 16:03:55 +06:00
click \b New button.
The following dialog box will appear:
\image html a-patterntype1.png
2012-08-09 16:03:55 +06:00
In this dialog you should specify:
2012-08-09 16:03:55 +06:00
<ul>
2015-05-14 14:51:53 +05:00
<li> <b>Mesh or Sub-mesh</b>, which is a meshed geometrical face (for a
2D pattern) or a meshed solid block (for a 3D pattern). Mesh nodes lying on
2012-08-09 16:03:55 +06:00
the face vertices become key-points of the pattern. </li>
<li> A custom <b>Pattern Name </b> </li>
<li>Additionally, for a 2D pattern you may choose to
<b>Project nodes on the face</b> to get node coordinates instead of using
"positions on face" generated by the mesher (if there is any). The faces
having a seam edge cannot be used for automatic pattern creation.</li>
</ul>
2012-08-09 16:03:55 +06:00
When a pattern is created from an existing mesh, two cases are possible:
2012-08-09 16:03:55 +06:00
- A sub-mesh on a face/solid is selected. The pattern is created from the 2d/3d
elements bound to the face/solid by the mesher. For a 2D pattern, the node coordinates are either
"positions on face" computed by the mesher, or coordinates got by node
projection on a geometrical surface, according to the user choice. For
a 3D pattern, the node coordinates correspond to the nodes computed by
the mesher.
- A mesh, where the main shape is a face/solid, is selected. The pattern is
created from all 2d/3d elements in a mesh. In addition, if all mesh
elements of a 2D pattern are built by the mesher, the user can select
how to get node coordinates, otherwise all nodes are projected on
a face surface.
2012-08-09 16:03:55 +06:00
<br><h2>Mapping algorithm</h2>
The mapping algorithm for a 2D case is as follows:
2012-08-09 16:03:55 +06:00
- The key-points are set counterclockwise in the order corresponding
to their location on the pattern boundary. The first key-point is preserved.
- The geometrical vertices corresponding to the key-points are found
on face boundary. Here, "Reverse order of key-points" flag is set.
\image html image95.gif
- The boundary nodes of the pattern are mapped onto the edges of the face: a
node located between two key-points on the pattern boundary is
mapped on the geometrical edge limited by the corresponding geometrical
vertices. The node position on the edge depends on its distance from the
key-points.
\image html image96.gif
2015-05-14 14:51:53 +05:00
- The coordinates of a non-boundary node in the parametric space of the face
are defined in the following way. In the parametric space of the
2012-08-09 16:03:55 +06:00
pattern, the node lies at the intersection of two iso-lines. Both
of them intersect the pattern boundary at two
points at least. If the mapped positions of boundary nodes are known, it is
2015-05-14 14:51:53 +05:00
possible to find, where the points at the intersection of iso-lines
2012-08-09 16:03:55 +06:00
and boundaries are mapped. Then it is possible to find
2015-05-14 14:51:53 +05:00
the direction of mapped iso-line section and, finally, the positions of
2012-08-09 16:03:55 +06:00
two nodes on two mapped isolines. The eventual mapped
2015-05-14 14:51:53 +05:00
position of the node is found as an average of the positions on mapped
iso-lines.
\image html image97.gif
2012-08-09 16:03:55 +06:00
The 3D algorithm is similar.
<b>See Also</b> a sample TUI Script of a
\ref tui_pattern_mapping "Pattern Mapping" operation.
2012-08-09 16:03:55 +06:00
*/