hm_findprojected
Finds nodes which lie on or within shells or solid faces, or which can be projected on to those shells or solid faces along a vector or element normal.
Syntax
hm_findprojected project_type project_mark target_mark use_actual_thickness thickness tolerance project_normal project_x project_y project_z mark_target output_mark ?plot_results? ?legend_red? ?legend_yellow? ?results_file? ?output_file?
Type
HyperMesh Tcl Query Command
Description
This API projects a mark of nodes (or the nodes of a mark of elements) along either a user defined vector or the normal of each target element, and determines whether each node is within the thickness of the target elements. The overlapping nodes, the overlapped elements, or both are placed on the result mark depending on the option used. The values of the closest distance between the overlapping nodes and the overlapped elements can be plotted in the graphics.
This API can be used for semi-diverse tasks such as finding which nodes of bar elements are touching a mark of shell elements, determining how close to the hood of a car the engine components are, and determining the closest distance between two meshes (although true element to element distances are not calculated, only node to element distances).
This API uses a highly efficient search tree algorithm and multi-threading which makes it suitable for large models.
Inputs
- project_type
- The source entity type for the projected nodes. Valid values are elems or nodes. If elems are selected, the elements' nodes are used.
- project_mark
- The ID of the mark containing the nodes to be projected. Valid values are 1 and 2.
- target_mark
- The ID of the mark containing the target elements. Valid values are 1 and 2. Only shell and solid element are supported.
- use_actual_thickness
- 0 - All elements will be given the thickness set using the thickness argument
- thickness
- If use_actual_thickness is set to 0, this value is given to all elements and solid faces.
- tolerance
- This value is used as a fraction of the element size within which nodes are considered overlapping if they are near an element's edges but not inside the element. A value of 0.01 allows nodes which are within 1% of element size of an element to be treated as overlapping. A good value for this option is 0.01.
- project_normal
- 0 - Projects nodes along a vector defined by project_x, project_y, and project_z.
- project_x
- Project vector x component. Used only if project_normal is 0.
- project_y
- Project vector y component. Used only if project_normal is 0.
- project_z
- Project vector z component. Used only if project_normal is 0.
- mark_target
- 0 - Turns off any active plotting. No analysis will be performed.
- output_mark
- The ID of the mark containing the overlapping nodes and/or elements. Valid values are 1 and 2.
- ?plot_results?
- 0 - No plotting.
- ?legend_red?
- Setting this value to something other than zero will show all overlapping nodes or elements which are closer than this value to be shown in red. If mark_target is set to 4, 5, or 6, this value is best left set to 0.0. This option is only used if plot_results is set to 1.
- ?legend_yellow?
- Setting this value to something other than zero will show all overlapping nodes or elements which are closer than this value to be shown in yellow or orange. If mark_target is set to 4, 5, or 6, this value is best left set to 0.0. This option is only used if plot_results is set to 1.
- ?results_file?
- The full path and name of the results file to be generated in HyperMesh binary results format (.res).
- ?output_file?
- The full path and name of the results file to be generated in plain text format. This file will contain the overlapping nodes and/or elements as well as their closest distances if plot_results is set to 1.
Example
Generate a plot of the closest distance between two components on the target elements. Note that the thickness is set to 0.0 (infinite) for all elements, the element normals are used for projection, and the results are set to be shown on the target elements with the direction as + or -:
*createmark nodes 1 "by collector id" 6
*createmark elems 2 "by collector id" 1
hm_findprojected nodes 1 2 0 0.0 0.01 1 0.0 0.0 0.0 4 1 1 0 0 C:/Temp/closest.res C:/Temp/closest.txt
Errors
if { [ catch {command_name...} ] } {
# Handle error
}
Version History
14.0