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
1 - The solver thickness will be used for all elements. All elements which have a zero thickness (and all faces of solid elements) are given a nominal thickness of 1000.0 times less than the maximum thickness found on the mark.
thickness
If use_actual_thickness is set to 0, this value is given to all elements and solid faces.
If use_actual_thickness is set to 0 and this value is set to 0.0, the thickness of all elements and solid faces is assumed to be infinite.
If use_actual_thickness is set to 1 and this value is greater than 0.0, this value is used as a multiplier to the solver thickness such that element thickness = solver thickness * (this value) / 2.0
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.
1 - Projects nodes along a vector defined by the normal of each target element .
2 - Projects nodes directly to the elements along the shortest path.
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.
1 - Marks overlapped elements to the result mark and plots the absolute distance on the overlapped elements.
2 - Marks overlapping nodes to the result mark and plots the absolute distance on the overlapping nodes.
3 - Marks overlapped elements and overlapping nodes to the result mark and plots the absolute distance on both the overlapped elements and the overlapping nodes.
4 - Same as 1 but distance plotted is +/- based on vector or normal direction.
5 - Same as 2 but distance plotted is +/- based on vector or normal direction.
6 - Same as 3 but distance plotted is +/- based on vector or normal direction.
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.
1 - Plot results to the screen.
Note that if this option is set to 1, the API will store the closest distance between overlapping nodes and elements. Since more nodes and elements must be checked, this option will run slower than simply marking all overlapping nodes and/or elements.
?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

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