mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 09:20:34 +05:00
[bos #38088] [CEA] Create documentation for Offset transformation in SMESH.
Fixing typo critireas is criterias.
This commit is contained in:
parent
d3c3260cd9
commit
1eed742fd3
@ -129,6 +129,7 @@ SET(BAD_TESTS
|
|||||||
transforming_meshes_ex04.py
|
transforming_meshes_ex04.py
|
||||||
transforming_meshes_ex05.py
|
transforming_meshes_ex05.py
|
||||||
transforming_meshes_ex06.py
|
transforming_meshes_ex06.py
|
||||||
|
transforming_meshes_ex15.py
|
||||||
viewing_meshes_ex01.py
|
viewing_meshes_ex01.py
|
||||||
radial_prism_3d_algo.py
|
radial_prism_3d_algo.py
|
||||||
create_dual_mesh.py
|
create_dual_mesh.py
|
||||||
|
40
doc/examples/transforming_meshes_ex15.py
Normal file
40
doc/examples/transforming_meshes_ex15.py
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
# Offset 2D mesh, sub-mesh, group or elements from filter.
|
||||||
|
|
||||||
|
import salome
|
||||||
|
salome.salome_init_without_session()
|
||||||
|
|
||||||
|
import SMESH
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
from salome.smesh import smeshBuilder
|
||||||
|
|
||||||
|
geom_builder = geomBuilder.New()
|
||||||
|
smesh_builder = smeshBuilder.New()
|
||||||
|
|
||||||
|
box = geom_builder.MakeBoxDXDYDZ(100, 100, 100)
|
||||||
|
|
||||||
|
## -----------
|
||||||
|
##
|
||||||
|
## Offset mesh
|
||||||
|
##
|
||||||
|
## -----------
|
||||||
|
|
||||||
|
init_mesh = smesh_builder.Mesh(box, "box")
|
||||||
|
init_mesh.AutomaticTetrahedralization()
|
||||||
|
init_mesh.Compute()
|
||||||
|
|
||||||
|
#Offset triangular elements in mesh (expand the entire mesh)
|
||||||
|
offset = 20
|
||||||
|
mesh, mesh_group = init_mesh.Offset( init_mesh, offset, MakeGroups=False, CopyElements=False )
|
||||||
|
assert isinstance( mesh, smeshBuilder.Mesh )
|
||||||
|
assert len( mesh_group ) == 0
|
||||||
|
offsetMeshArea = smesh_builder.GetArea(mesh)
|
||||||
|
|
||||||
|
#Offset triangular elements in mesh (shrink the entire mesh)
|
||||||
|
offset = -20
|
||||||
|
mesh, mesh_group = init_mesh.Offset( init_mesh, offset, MakeGroups=False, CopyElements=False, NewMeshName="MeshShrink" )
|
||||||
|
assert isinstance( mesh, smeshBuilder.Mesh )
|
||||||
|
assert len( mesh_group ) == 0
|
||||||
|
assert mesh.GetName() == "MeshShrink"
|
||||||
|
shrinkMeshArea = smesh_builder.GetArea(mesh)
|
||||||
|
|
||||||
|
assert offsetMeshArea > shrinkMeshArea
|
BIN
doc/gui/images/image81.png
Normal file
BIN
doc/gui/images/image81.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1006 B |
BIN
doc/gui/images/offset_filter_for_faces_gui.png
Normal file
BIN
doc/gui/images/offset_filter_for_faces_gui.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
BIN
doc/gui/images/offset_mesh.png
Normal file
BIN
doc/gui/images/offset_mesh.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
BIN
doc/gui/images/offset_mesh_from_filter.png
Normal file
BIN
doc/gui/images/offset_mesh_from_filter.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
@ -15,6 +15,7 @@ Salome provides a vast specter of mesh modification and transformation operation
|
|||||||
* :ref:`Translate <translation_page>` in the indicated direction the mesh or some of its elements.
|
* :ref:`Translate <translation_page>` in the indicated direction the mesh or some of its elements.
|
||||||
* :ref:`Rotate <rotation_page>` by the indicated axis and angle the mesh or some of its elements.
|
* :ref:`Rotate <rotation_page>` by the indicated axis and angle the mesh or some of its elements.
|
||||||
* :ref:`Scale <scale_page>` the mesh or some of its elements.
|
* :ref:`Scale <scale_page>` the mesh or some of its elements.
|
||||||
|
* :ref:`Offset <offset_elements_page>` the entire mesh, the sub-mesh or a selection of elements based on filters.
|
||||||
* :ref:`Mirror <symmetry_page>` the mesh through a point, a vector or a plane of symmetry.
|
* :ref:`Mirror <symmetry_page>` the mesh through a point, a vector or a plane of symmetry.
|
||||||
* :ref:`double_nodes_page`. Duplication of nodes can be useful to emulate a crack in the model.
|
* :ref:`double_nodes_page`. Duplication of nodes can be useful to emulate a crack in the model.
|
||||||
* :ref:`Merge Nodes<merging_nodes_page>` coincident within the indicated tolerance.
|
* :ref:`Merge Nodes<merging_nodes_page>` coincident within the indicated tolerance.
|
||||||
@ -58,6 +59,7 @@ Salome provides a vast specter of mesh modification and transformation operation
|
|||||||
translation.rst
|
translation.rst
|
||||||
rotation.rst
|
rotation.rst
|
||||||
scale.rst
|
scale.rst
|
||||||
|
offset_elements.rst
|
||||||
symmetry.rst
|
symmetry.rst
|
||||||
double_nodes_page.rst
|
double_nodes_page.rst
|
||||||
sewing_meshes.rst
|
sewing_meshes.rst
|
||||||
|
49
doc/gui/input/offset_elements.rst
Normal file
49
doc/gui/input/offset_elements.rst
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
.. _offset_elements_page:
|
||||||
|
|
||||||
|
********************************
|
||||||
|
Offset mesh
|
||||||
|
********************************
|
||||||
|
|
||||||
|
Offset 2D elements in mesh, submesh, group or elements from filter.
|
||||||
|
|
||||||
|
*To offset all elements from mesh, sub-mesh or group:*
|
||||||
|
|
||||||
|
.. |img| image:: ../images/image81.png
|
||||||
|
|
||||||
|
#. In the **Modification** menu, select the **Transformations** then click *Offset* button |img| or click directly in the same button in the toolbar.
|
||||||
|
|
||||||
|
The following dialog box will appear:
|
||||||
|
|
||||||
|
.. image:: ../images/offset_mesh.png
|
||||||
|
:align: center
|
||||||
|
|
||||||
|
* Check the option **Select whole mesh, sub-mesh or group** if it is not set.
|
||||||
|
* Set the name of the mesh, sub-mesh or created group.
|
||||||
|
* Set the **Offset** value (negative offsets are allowed).
|
||||||
|
* Select **Move Elements** to offset the current mesh, **Copy Elements** to offset and duplicate them, or **Create a new mesh** to create a new mesh from the offset elements.
|
||||||
|
|
||||||
|
#. Click the **Apply** or **Apply and Close** button to confirm the operation.
|
||||||
|
|
||||||
|
|
||||||
|
*To offset all elements ids from a filter:*
|
||||||
|
|
||||||
|
#. In the **Modification** menu, select the **Transformations** then click *Offset* button |img| or click directly in the same button from the toolbar.
|
||||||
|
|
||||||
|
* Uncheck the option **Select whole mesh, sub-mesh or group**.
|
||||||
|
|
||||||
|
.. image:: ../images/offset_mesh_from_filter.png
|
||||||
|
:align: center
|
||||||
|
|
||||||
|
* Then click on **Set_Filter** button
|
||||||
|
|
||||||
|
The dialog for filter for faces will appear:
|
||||||
|
|
||||||
|
.. image:: ../images/offset_filter_for_faces_gui.png
|
||||||
|
:align: center
|
||||||
|
|
||||||
|
* Define the desired criterias and then click the **Apply and Close** button to confirm the selection of elements.
|
||||||
|
* Set **Offset** value and mesh creation **options** as done for the first case.
|
||||||
|
|
||||||
|
#. Click the **Apply** or **Apply and Close** button to confirm the operation.
|
||||||
|
|
||||||
|
**See also:** A sample TUI Script of a :ref:`tui_offset_elements` transformation.
|
@ -145,4 +145,14 @@ Create 2D mesh from 3D elements
|
|||||||
.. literalinclude:: ../../examples/transforming_meshes_ex14.py
|
.. literalinclude:: ../../examples/transforming_meshes_ex14.py
|
||||||
:language: python
|
:language: python
|
||||||
|
|
||||||
:download:`Download this script <../../examples/transforming_meshes_ex14.py>`
|
:download:`Download this script <../../examples/transforming_meshes_ex14.py>`
|
||||||
|
|
||||||
|
.. _tui_offset_elements:
|
||||||
|
|
||||||
|
Offset 2D mesh
|
||||||
|
========================
|
||||||
|
|
||||||
|
.. literalinclude:: ../../examples/transforming_meshes_ex15.py
|
||||||
|
:language: python
|
||||||
|
|
||||||
|
:download:`Download this script <../../examples/transforming_meshes_ex15.py>`
|
@ -245,7 +245,7 @@ SMESHGUI_OffsetDlg::SMESHGUI_OffsetDlg( SMESHGUI* theModule ) :
|
|||||||
myMeshOrSubMeshOrGroupFilter =
|
myMeshOrSubMeshOrGroupFilter =
|
||||||
new SMESH_LogicalFilter(aListOfFilters, SMESH_LogicalFilter::LO_OR);
|
new SMESH_LogicalFilter(aListOfFilters, SMESH_LogicalFilter::LO_OR);
|
||||||
|
|
||||||
myHelpFileName = "Offset_page.html";
|
myHelpFileName = "offset_elements.html";
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user