*normalsadjust2

Adjusts the normals of 2D and 3D elements.

Syntax

*normalsadjust2 entity_type mark_id mode orientation_element size display vector_id ?feature_angle?

Type

HyperMesh Tcl Modify Command

Description

Adjusts the normals of 2D and 3D elements.

Inputs

entity_type
The type of entity to adjust normals for. Valid values are elements, surfaces, and components.
If surfaces or components are selected, adjustment will be applied for all elements belonging to selected surfaces and components. This option is relevant for FE surfaces only.
mark_id
The ID of the mark containing the input entities. Valid values are 1 and 2.
mode
The orientation mode. For elements belonging to FE-surfaces, though, each connected section is limited by surface borders and 'dominant normal direction' is calculated for each FE-surface separately.
  • 0 - For each connected section, adjust the normals for all elements in that section to be consistent with the 'dominant normal direction' already existing within that section. orientation_element and vector_id are ignored and can be 0.
  • 1 - For each connected section, the entity in the section with its normal 'most parallel' to the orientation_element is found. All other elements in the section are adjusted to be consistent with this element. orientation_element must be a valid selection and vector_id is ignored and can be 0.
  • 2 - Selected elements that are associated to surfaces are adjusted to match the normal of their surfaces. This is a no-op, but not an error, for elements not associated to a surface. orientation_element and vector_id are ignored and can be 0.
  • 3 - For each connected section, the elements in the section are adjusted to be consistent with the specified vector direction. vector_id must be a valid selection and orientation_element is ignored and can be 0.
  • 4 - For each connected section, adjust the normals for all elements in that section to be consistent with the 'dominant normal direction' already existing within that section, with the sections defined based on the specified feature_angle. orientation_elementand vector_id are ignored and can be 0.
orientation_element
The ID of the orientation element.
size
This argument is deprecated and should be always set to zero.
display
This argument is deprecated and should be always set to zero.
vector_id
If mode is 3, this is the temporary vector ID created using *createvector. This should always be set to 1.
?feature_angle?
If mode is 4, this is the feature angle to use to define the connected sections. This is ignored and not required otherwise.

Example

To adjust the normals for elements 1-10 based on element 100:
*createmark elems 1 1-10
*normalsadjust2 elems 1 100 0 0 1
To adjust the normals for all surfaces with feature angle 15 degrees:
*createmark surfs 1 all
*normalsadjust2 surfs 4 0 0 0 0 15

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

Version History

14.0

2017.1 - Added a new value of 4 for mode and a new optional argument feature_angle to support the auto adjustment of element normals, with the connected selection adjusted based on the feature angle.

2023 - Added support for FE surfaces and deprecated arguments size and display.