hm_finddeviation

Finds the deviation between two CAD geometries and returns a list of component pairs along with the deviation data.

Syntax

hm_finddeviation source_entity_type source_mark_id target_entity_type target_mark_id tolerance_value

Type

HyperMesh Tcl Query Command

Description

Finds and returns the deviating component pairs data for a given set of selected components. The returned data is a list of lists where each entity is represented in the following format:

{srccompid targetcompid unmatch unmatch_pecentage deviationdata {{sourcepoint} {target_point} {source_face_id} {target_face_id} {deviation_distance}}}
  • srccompid – The ID of the source component.
  • trgcompid – The ID of the target component.
  • unmatch – The approximate percentage of unmatched area between the two components.
  • source_point – The coordinates of the point on the source component where the deviation occurs.
  • target_point - The coordinates of the point on the target component where the deviation occurs.
  • source_face_id – The ID of the surface on the source component that contains the source point.
  • target_face_id – The ID of the surface on the target component that contains the target point.
  • deviation_distance - The distance between the source point and the target point.

Inputs

source_entity_type
The type of the source entity. Currently supported for components only.
source_mark_id
The ID of the mark containing the source entities. Valid values are 1 and 2.
target_entity_type
The type of the target entity. Currently supported for components only.
target_mark_id
The ID of the mark containing the target entities. Valid values are 1 and 2.
tolerance_value
The tolerance value.

Examples

To get the deviation information between components ID 81 and 88 using a tolerance of 0.01:

*createmark comps 1 81
*createmark comps 2 88
hm_finddeviation comps 1 comps 2 0.01

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

2022.1