SMS:Editing 2D Meshes: Difference between revisions

From XMS Wiki
Jump to navigationJump to search
No edit summary
 
(34 intermediate revisions by 2 users not shown)
Line 1: Line 1:
2D Mesh nodes can be inserted, [[SMS:Deleting Nodes|deleted]], or [[SMS:Editing Node Coordinates|moved]].
{{TOCright}}
It is generally best to assure that the mesh elements will be generated correctly prior to generating the 2D mesh. This is done by using the '''Preview''' option in the [[SMS:2D Mesh Polygon Properties|''2D Mesh Polygon Properties'']] dialog. However, if there are only a few elements to be corrected after generating the mesh, the 2D mesh nodes can be inserted, [[SMS:Editing 2D Meshes#Deleting Nodes|deleted]], or [[SMS:Editing 2D Meshes#Editing Node Coordinates|moved]].


For a 2D mesh with a large number of elements that need editing, it is recommended that a new mesh be generated with the elements having been corrected using the Map module tools.


2D Mesh elements can be edited in the following ways:
2D mesh elements can be edited in the following ways:


* Elements can be converted  between linear and quadratic.
* Elements can be converted  between linear and quadratic.
* The type of element can be changed from a 3 node element to a 4  node element by [[SMS:Merging Triangles|merging triangles]].
* The type of element can be changed from a 3 node element to a 4  node element by [[SMS:Editing 2D Meshes#Merging Triangles|merging triangles]].
* A 4 node element can be converted to a 3 node element by [[SMS:Splitting Quadrilaterals|splitting the 4 node element]].
* A 4 node element can be converted to a 3 node element by [[SMS:Editing 2D Meshes#Splitting Quadrilaterals|splitting the 4 node element]].
* Elements can be refined  automatically.
* Elements can be refined  automatically.
* The material assigned to an  element can be changed.
* The material assigned to an  element can be changed.
Line 13: Line 15:


==Deleting Nodes==
==Deleting Nodes==
A set of selected nodes can be deleted by hitting the Delete key or selecting the Delete command from the Edit menu. Elements attached to the nodes are also deleted.  
A set of selected nodes can be deleted by hitting the ''DELETE'' key or selecting the '''Delete''' command from the ''Edit'' menu. Elements attached to the nodes are also deleted.  


If the Retriangulate voids when deleting option is turned on, the void created when a node and the elements surrounding the node are deleted is re-triangulated or filled in with triangles. This feature makes it possible to selectively "unrefine" a region of the mesh or reduce the density of the nodes in a region of the mesh without having to completely recreate all of the elements in the region.  
If the ''Confirm Deletions'' option in the ''Edit'' menu is active, SMS will prompt to confirm each deletion. This feature is helpful in preventing accidental deletions. The ''Confirm Deletions'' item is toggled by selecting it from the menu.


If the Retriangulate voids when deleting item in the Node Options dialog is not set, the selected node and the elements surrounding the node are simply deleted and the resulting void is not filled in with triangles.
Options in the [[SMS:2D Mesh Node Options Dialog#Retriangulate Voids When Deleting|''Node Options'']] dialog will affect how nodes are deleted.
 
If the Confirm Deletions option in the Edit menu is active, GMS will prompt the user to confirm each deletion. This feature is helpful in preventing accidental deletions. The Confirm Deletions item is toggled by selecting it from the menu.  


==Editing Node Coordinates==
==Editing Node Coordinates==
The coordinates of a 2D Mesh node can be edited by selecting the mesh node and entering the new coordinates in the edit boxes in the ''Edit Window''. It is also possible to drag an existing node to a new location by clicking on the node and moving the mouse with the button held down until the node is in the desired position.  
The coordinates of a 2D mesh node can be edited by selecting the mesh node and entering the new coordinates in the edit boxes in the ''Edit Window''. It is also possible to drag an existing node to a new location by clicking on the node and moving the mouse with the button held down until the node is in the desired position.  


If the snap to grid option in the ''Drawing Grid Options'' dialog is set, the node will move in increments corresponding to the drawing grid. If the node being dragged is connected to one or more elements, SMS will not allow the node to be dragged to a position where one of the surrounding elements would become ill-formed.  
If the snap to grid option in the ''Drawing Grid Options'' dialog is set, the node will move in increments corresponding to the drawing grid. If the node being dragged is connected to one or more elements, SMS will not allow the node to be dragged to a position where one of the surrounding elements would become ill-formed.  
Line 32: Line 32:


===The Merge Triangles Command===  
===The Merge Triangles Command===  
The '''Merge Triangles''' command in the ''Elements'' menu can be used to automatically merge pairs of adjacent triangular elements into quadrilateral elements. Upon selecting the '''Merge Triangles''' command, the user is prompted to input a minimum interior angle. This angle should be between 0 and 90 degrees. If no elements are selected, all of the triangular elements in the mesh are then processed. If some elements have been selected, only the selected elements are processed.  
The '''Merge Triangles''' command in the ''Elements'' menu can be used to automatically merge pairs of adjacent triangular elements into quadrilateral elements. Upon selecting the '''Merge Triangles''' command, a prompt appears to input a minimum interior angle. This angle should be between 0 and 90 degrees. If no elements are selected, all of the triangular elements in the mesh are then processed. If some elements have been selected, only the selected elements are processed.  


The conversion process works as follows:  
The conversion process works as follows:  
# The set of elements to be processed is traversed one element at a time. Each triangular element that is found is compared with each of its three adjacent elements. If the adjacent element is a triangle, the trapezoid formed by the triangle and the adjacent triangle is checked.  
# The set of elements to be processed is traversed one element at a time. Each triangular element that is found is compared with each of its three adjacent elements. If the adjacent element is a triangle, the trapezoid formed by the triangle and the adjacent triangle is checked.  
# Each of the four interior angles of the trapezoid is computed and compared to a minimum interior angle. If all of the angles are greater than the user-specified minimum interior angle, then the two triangles are merged into a single quadrilateral element.  
# Each of the four interior angles of the trapezoid is computed and compared to a minimum interior angle. If all of the angles are greater than the user specified minimum interior angle, then the two triangles are merged into a single quadrilateral element.  


This process is repeated for all of the elements. The merging scheme will not always result in a mesh composed entirely of quadrilateral elements. Some triangular elements are often necessary in highly irregular meshes to provide transitions from one region to the next.
This process is repeated for all of the elements. The merging scheme will not always result in a mesh composed entirely of quadrilateral elements. Some triangular elements are often necessary in highly irregular meshes to provide transitions from one region to the next.


===The Merge/Split Tool===  
===The Merge/Split Tool===  
The other option for merging triangles involves the use of the '''Merge/Split''' tool in the ''Tool Palette''. This tool can be used to manually merge triangles one pair at a time rather than using the automatic scheme described above.  
The other option for merging triangles involves the use of the '''Merge/Split''' tool in the Tool Palette. This tool can be used to manually merge triangles one pair at a time rather than using the automatic scheme described above.  


The manual method is also useful to edit or override the results of the automatic merging scheme in selected areas. The Merge/Split tool can also be used to undo a merge. A quadrilateral element can be split into two triangles by clicking anywhere in the interior of the element. This tool is useful if a pair of triangles is inadvertently merged.
The manual method is also useful to edit or override the results of the automatic merging scheme in selected areas. The Merge/Split tool can also be used to undo a merge. A quadrilateral element can be split into two triangles by clicking anywhere in the interior of the element. This tool is useful if a pair of triangles is inadvertently merged.
Line 52: Line 52:


===The Merge/Split Tool===  
===The Merge/Split Tool===  
The other option for splitting quadrilateral elements involves the use of the '''Merge/Split''' tool in the ''Tool Palette''. If the '''Merge/Split''' tool is selected, clicking anywhere in the interior of a quadrilateral element with the mouse cursor will cause the element to be split into two triangles. The shortest diagonal through the quadrilateral is chosen as the common edge of the two new triangular elements.
The other option for splitting quadrilateral elements involves the use of the '''Merge/Split''' tool in the Tool Palette. If the '''Merge/Split''' tool is selected, clicking anywhere in the interior of a quadrilateral element with the mouse cursor will cause the element to be split into two triangles. The shortest diagonal through the quadrilateral is chosen as the common edge of the two new triangular elements.
 
==Subset Edit Mode==
When working with large meshes, even simple operations can take a long time.  Therefore, it can be useful to work on only a portion of the mesh. This is referred to as ''Subset Edit Mode''.
 
===Entering Mesh Subset Edit Mode===
To enter subset edit mode:


==Mesh Subset Edit Mode==
# Select elements that cover the area to be edited.
When working with large meshes, it can be useful to work on only a small portion of the mesh. The user can select elements on which to work on and enter subset edit mode either through the select element tool's right click menu or the right click menu on the mesh tree item.  The geometry of the mesh inside the selected area can then be changed.  Datasets other than the depth/elevation dataset are deleted upon entering mesh subset edit.
# Enter subset edit mode in one of the two following ways:
## Right-click on the selected elements and select '''Edit Subset'''.
## Right-click on the mesh tree item and select '''Edit Subset'''.


===Prohibited Actions While in Subset Edit Mode===
The icon in the Project Explorer for the mesh being edited is updated to indicate that a subset of this mesh is being edited.
* Making changes on the border of the mesh subset
* Making changes outside of the mesh subset
:'''''Caution:''''' Datasets other than the depth/elevation dataset are deleted upon entering mesh subset edit.
* Reading in meshes from file
* Creating meshes from feature map or scatter data
* Running models
* Changing attributes such as boundary conditions on nodes, nodestrings, and elements
* Renumbering node/nodestring/element ids


===Commit Mesh===
====Prohibited Actions While in Subset Edit Mode====
The user can merge the changes made to the subset of the mesh with the rest of the mesh by selecting Commit mesh from the right click menu of either the mesh tree item or the select element tool.  Commit mesh will exit subset edit mode.
* Making changes on the border of the mesh subset.
* Making changes outside of the mesh subset.
* Reading in meshes from file.
* Creating meshes from feature map or scatter data.
* Running numerical models.
* Changing attributes such as boundary conditions on nodes, nodestrings, and elements.
* Renumbering node/nodestring/element ids.


===Revert Mesh===
===Exiting Mesh Subset Edit Mode===
The user can revert to how the mesh was upon entering mesh subset edit mode by selecting Revert mesh from the right click menu of either the mesh tree item or the select element tool.  Revert mesh will exit subset edit mode.
As noted above, several operations are not allowed while in subset edit mode.  It is intended that this mode only be used to facilitate editing sections of the mesh.  SMS includes to commands to exit subset edit mode when the desired edits are completed, or to revert and undo any local edits.
 
; Commit Mesh : Merge the changes made to the subset of the mesh with the rest of the mesh by selecting''' Commit mesh''' from the right-click menu of either the mesh tree item or the '''Select Element''' tool.  '''Commit mesh''' will exit subset edit mode.
 
; Revert Mesh : Revert to how the mesh was upon entering mesh subset edit mode by selecting '''Revert mesh''' from the right-click menu of either the mesh tree item or the '''select element''' tool.  '''Revert mesh''' will exit subset edit mode.


==Related Topics==
==Related Topics==
* [[SMS:2D_Mesh_Module_Tools|2D Mesh Module Tools]]
* [[SMS:2D_Mesh_Module_Tools|2D Mesh Module Tools]]
* [[SMS:Element Patch Workflow|Element Patch Workflow]]


{{Template:Navbox SMS}}
{{Template:Navbox SMS}}


[[Category:SMS 2D Mesh|Editing 2D Meshes]]
[[Category:SMS 2D Mesh|Editing 2D Meshes]]
[[Category:Needs Update]]

Latest revision as of 22:56, 16 April 2019


It is generally best to assure that the mesh elements will be generated correctly prior to generating the 2D mesh. This is done by using the Preview option in the 2D Mesh Polygon Properties dialog. However, if there are only a few elements to be corrected after generating the mesh, the 2D mesh nodes can be inserted, deleted, or moved.

For a 2D mesh with a large number of elements that need editing, it is recommended that a new mesh be generated with the elements having been corrected using the Map module tools.

2D mesh elements can be edited in the following ways:

  • Elements can be converted between linear and quadratic.
  • The type of element can be changed from a 3 node element to a 4 node element by merging triangles.
  • A 4 node element can be converted to a 3 node element by splitting the 4 node element.
  • Elements can be refined automatically.
  • The material assigned to an element can be changed.
  • Poorly shaped boundary triangles can be automatically selected for deletion.
  • Breaklines can be inserted into the mesh

Deleting Nodes

A set of selected nodes can be deleted by hitting the DELETE key or selecting the Delete command from the Edit menu. Elements attached to the nodes are also deleted.

If the Confirm Deletions option in the Edit menu is active, SMS will prompt to confirm each deletion. This feature is helpful in preventing accidental deletions. The Confirm Deletions item is toggled by selecting it from the menu.

Options in the Node Options dialog will affect how nodes are deleted.

Editing Node Coordinates

The coordinates of a 2D mesh node can be edited by selecting the mesh node and entering the new coordinates in the edit boxes in the Edit Window. It is also possible to drag an existing node to a new location by clicking on the node and moving the mouse with the button held down until the node is in the desired position.

If the snap to grid option in the Drawing Grid Options dialog is set, the node will move in increments corresponding to the drawing grid. If the node being dragged is connected to one or more elements, SMS will not allow the node to be dragged to a position where one of the surrounding elements would become ill-formed.

Since it is possible to accidentally drag points, nodes can be "locked" to prevent them from being dragged by selecting the Lock All Nodes item from the Nodes menu. The nodes can be unlocked by unselecting Lock All Nodes from the Nodes menu.

Merging Triangles

The triangulate operation creates a mesh composed entirely of triangles. In some cases it is desirable to have the mesh composed primarily of quadrilateral elements. Quadrilateral elements result in less elements which leads to faster solutions, and quadrilateral elements are often more stable numerically. To address this need, two options are provided for converting triangular elements to quadrilateral elements:

The Merge Triangles Command

The Merge Triangles command in the Elements menu can be used to automatically merge pairs of adjacent triangular elements into quadrilateral elements. Upon selecting the Merge Triangles command, a prompt appears to input a minimum interior angle. This angle should be between 0 and 90 degrees. If no elements are selected, all of the triangular elements in the mesh are then processed. If some elements have been selected, only the selected elements are processed.

The conversion process works as follows:

  1. The set of elements to be processed is traversed one element at a time. Each triangular element that is found is compared with each of its three adjacent elements. If the adjacent element is a triangle, the trapezoid formed by the triangle and the adjacent triangle is checked.
  2. Each of the four interior angles of the trapezoid is computed and compared to a minimum interior angle. If all of the angles are greater than the user specified minimum interior angle, then the two triangles are merged into a single quadrilateral element.

This process is repeated for all of the elements. The merging scheme will not always result in a mesh composed entirely of quadrilateral elements. Some triangular elements are often necessary in highly irregular meshes to provide transitions from one region to the next.

The Merge/Split Tool

The other option for merging triangles involves the use of the Merge/Split tool in the Tool Palette. This tool can be used to manually merge triangles one pair at a time rather than using the automatic scheme described above.

The manual method is also useful to edit or override the results of the automatic merging scheme in selected areas. The Merge/Split tool can also be used to undo a merge. A quadrilateral element can be split into two triangles by clicking anywhere in the interior of the element. This tool is useful if a pair of triangles is inadvertently merged.

Splitting Quadrilaterals

Occasionally it is necessary to split quadrilateral elements into triangular elements. For example, in order for new nodes to be automatically inserted into a mesh, the elements in the region where the node is inserted must be triangular. Also, in order to process a breakline, the elements in the region of the breakline must be triangular. In such situations, it may be necessary to split a group of quadrilateral elements into triangular elements. Two options are provided for splitting quadrilateral elements:

The Split Quads Command

The Split Quads command in the Mesh menu can be used to split a group of quadrilateral elements into triangular elements. If no elements are selected, all of the quadrilateral elements in the mesh are split. If some elements have been selected, only the selected quadrilateral elements are split.

The Merge/Split Tool

The other option for splitting quadrilateral elements involves the use of the Merge/Split tool in the Tool Palette. If the Merge/Split tool is selected, clicking anywhere in the interior of a quadrilateral element with the mouse cursor will cause the element to be split into two triangles. The shortest diagonal through the quadrilateral is chosen as the common edge of the two new triangular elements.

Subset Edit Mode

When working with large meshes, even simple operations can take a long time. Therefore, it can be useful to work on only a portion of the mesh. This is referred to as Subset Edit Mode.

Entering Mesh Subset Edit Mode

To enter subset edit mode:

  1. Select elements that cover the area to be edited.
  2. Enter subset edit mode in one of the two following ways:
    1. Right-click on the selected elements and select Edit Subset.
    2. Right-click on the mesh tree item and select Edit Subset.

The icon in the Project Explorer for the mesh being edited is updated to indicate that a subset of this mesh is being edited.

Caution: Datasets other than the depth/elevation dataset are deleted upon entering mesh subset edit.

Prohibited Actions While in Subset Edit Mode

  • Making changes on the border of the mesh subset.
  • Making changes outside of the mesh subset.
  • Reading in meshes from file.
  • Creating meshes from feature map or scatter data.
  • Running numerical models.
  • Changing attributes such as boundary conditions on nodes, nodestrings, and elements.
  • Renumbering node/nodestring/element ids.

Exiting Mesh Subset Edit Mode

As noted above, several operations are not allowed while in subset edit mode. It is intended that this mode only be used to facilitate editing sections of the mesh. SMS includes to commands to exit subset edit mode when the desired edits are completed, or to revert and undo any local edits.

Commit Mesh
Merge the changes made to the subset of the mesh with the rest of the mesh by selecting Commit mesh from the right-click menu of either the mesh tree item or the Select Element tool. Commit mesh will exit subset edit mode.
Revert Mesh
Revert to how the mesh was upon entering mesh subset edit mode by selecting Revert mesh from the right-click menu of either the mesh tree item or the select element tool. Revert mesh will exit subset edit mode.

Related Topics