*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 and components.
- mark_id
- The ID of the mark containing the input entities. Valid values are 1 and 2.
- mode
- The orientation mode.
- 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
- Specifies the size of the normal graphics to be drawn. If set to zero, the vector is drawn at 10% of the screen size.
- display
- 0 - Display all elements normals upon command completion.
- 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 and to display the adjusted element normals with a size of 5.0:
*createmark elems 1 1-10
*normalsadjust2 elems 1 100 1 5.0 1
Errors
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.