smesh/doc/gui/input/tui_modifying_meshes.rst

339 lines
8.2 KiB
ReStructuredText
Raw Normal View History

2017-12-08 19:09:48 +05:00
.. _tui_modifying_meshes_page:
****************
Modifying Meshes
****************
.. contents:: `Table of contents`
.. _tui_adding_nodes_and_elements:
Adding Nodes and Elements
=========================
.. _tui_add_node:
Add Node
********
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex01.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex01.py>`
2017-12-08 19:09:48 +05:00
.. _tui_add_0DElement:
Add 0D Element
**************
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex02.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex02.py>`
2017-12-08 19:09:48 +05:00
.. _tui_add_0DElement_on_all_nodes:
Add 0D Element on Element Nodes
*******************************
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex03.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex03.py>`
2017-12-08 19:09:48 +05:00
.. _tui_add_edge:
Add Edge
********
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex04.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex04.py>`
2017-12-08 19:09:48 +05:00
.. _tui_add_triangle:
Add Triangle
************
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex05.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex05.py>`
2017-12-08 19:09:48 +05:00
.. _tui_add_quadrangle:
Add Quadrangle
**************
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex06.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex06.py>`
2017-12-08 19:09:48 +05:00
.. _tui_add_tetrahedron:
Add Tetrahedron
***************
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex07.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex07.py>`
2017-12-08 19:09:48 +05:00
.. _tui_add_hexahedron:
Add Hexahedron
**************
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex08.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex08.py>`
2017-12-08 19:09:48 +05:00
.. _tui_add_polygon:
Add Polygon
***********
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex09.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex09.py>`
2017-12-08 19:09:48 +05:00
.. _tui_add_polyhedron:
Add Polyhedron
**************
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex10.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex10.py>`
2017-12-08 19:09:48 +05:00
.. _tui_removing_nodes_and_elements:
Removing Nodes and Elements
===========================
.. _tui_removing_nodes:
Removing Nodes
**************
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex11.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex11.py>`
2017-12-08 19:09:48 +05:00
.. _tui_removing_elements:
Removing Elements
*****************
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex12.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex12.py>`
2017-12-08 19:09:48 +05:00
.. _tui_removing_orphan_nodes:
Removing Orphan Nodes
*********************
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex13.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex13.py>`
2017-12-08 19:09:48 +05:00
.. _tui_moving_nodes:
Moving Nodes
============
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex15.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex15.py>`
2017-12-08 19:09:48 +05:00
.. _tui_diagonal_inversion:
Diagonal Inversion
==================
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex16.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex16.py>`
2017-12-08 19:09:48 +05:00
.. _tui_uniting_two_triangles:
Uniting two Triangles
=====================
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex17.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex17.py>`
2017-12-08 19:09:48 +05:00
.. _tui_uniting_set_of_triangles:
Uniting a Set of Triangles
==========================
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex18.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex18.py>`
2017-12-08 19:09:48 +05:00
.. _tui_orientation:
Orientation
===========
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex19.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex19.py>`
2017-12-08 19:09:48 +05:00
.. _tui_cutting_quadrangles:
Cutting Quadrangles
===================
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex20.py
2018-05-25 22:04:48 +05:00
:language: python
2017-12-08 19:09:48 +05:00
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex20.py>`
2017-12-08 19:09:48 +05:00
.. _tui_cutting_triangles:
Cutting Triangles
=================
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_cut_triangles.py
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_cut_triangles.py>`
2018-05-25 22:04:48 +05:00
.. _modifying_meshes_split_vol:
Split Volumes into Tetrahedra
=============================
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_split_vol.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_split_vol.py>`
2017-12-08 19:09:48 +05:00
.. _tui_smoothing:
Smoothing
=========
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex21.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex21.py>`
2017-12-08 19:09:48 +05:00
.. _tui_extrusion:
Extrusion
=========
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex22.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex22.py>`
2017-12-08 19:09:48 +05:00
.. _tui_extrusion_along_path:
Extrusion along a Path
======================
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex23.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex23.py>`
2017-12-08 19:09:48 +05:00
.. _tui_revolution:
Revolution
==========
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex24.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex24.py>`
2017-12-08 19:09:48 +05:00
.. _tui_pattern_mapping:
Pattern Mapping
===============
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex25.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex25.py>`
2017-12-08 19:09:48 +05:00
.. _tui_quadratic:
Convert mesh to/from quadratic
==============================
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/modifying_meshes_ex26.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/modifying_meshes_ex26.py>`
2017-12-08 19:09:48 +05:00
.. _tui_split_biquad:
Split bi-quadratic into linear
==============================
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/split_biquad.py
2017-12-08 19:09:48 +05:00
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/split_biquad.py>`
.. _tui_double_nodes_on_group_boundaries:
Double nodes on groups boundaries
=================================
Double nodes on shared faces between groups of volumes and create flat elements on demand.
The list of groups must contain at least two groups. The groups have to be disjoint: no common element into two different groups.
The nodes of the internal faces at the boundaries of the groups are doubled. Optionally, the internal faces are replaced by flat elements.
Triangles are transformed into prisms, and quadrangles into hexahedrons.
The flat elements are stored in groups of volumes.
These groups are named according to the position of the group in the list:
the group j_n_p is the group of the flat elements that are built between the group \#n and the group \#p in the list.
If there is no shared faces between the group \#n and the group \#p in the list, the group j_n_p is not created.
All the flat elements are gathered into the group named "joints3D" (or "joints2D" in 2D situation).
The flat element of the multiple junctions between the simple junction are stored in a group named "jointsMultiples".
This example represents an iron cable (a thin cylinder) in a concrete block (a big cylinder).
The big cylinder is defined by two geometric volumes.
2022-04-11 18:28:01 +05:00
.. literalinclude:: ../../examples/generate_flat_elements.py
:language: python
2022-04-11 18:28:01 +05:00
:download:`Download this script <../../examples/generate_flat_elements.py>`
Here, the 4 groups of volumes [Solid_1_1, Solid_2_1, Solid_3_1, Solid_4_1] constitute a partition of the mesh.
The flat elements on group boundaries and on faces are built with the
2 last lines of the code above.
If the last argument (Boolean) in DoubleNodesOnGroupBoundaries is set to 1,
the flat elements are built, otherwise, there is only a duplication of the nodes.
To observe flat element groups, save the resulting mesh on a MED file and reload it.