Category Selection, Object ProSelection

Function ProSelectionWithOptionsDistanceEval


Description
Evaluate the distance between two items. Objects can be surfaces, edges, entities, vertices, datums or quilts. The selected points on the objects are used as the initial guesses. In case of error, p_result will be set to -1.0 and all parameters will be set to 0.0. option1 and option2 can be specified to alter the desired behavior for the corresponded selection.
Synopsis
#include <ProSelection.h>
ProErrorProSelectionWithOptionsDistanceEval(
ProSelection p_selection1
/* (In)
The first selection.
*/
ProBool option1
/* (In)
The option related to the first selection. The usage is analogical to the checkbox in the measure distance UI. For the PRO_B_TRUE value:
*/
ProSelection p_selection2
/* (In)
The second selection.
*/
ProBool option2
/* (In)
The option related to the second selection analogical to option1.
*/
Pro2dPnt param_1
/* (Out)
UV parameters of the critical point on the first item. Not applicable for quilts.
*/
Pro2dPnt param_2
/* (Out)
UV parameters of the critical point on the second item. Not applicable for quilts.
*/
Pro3dPnt pnt_1
/* (Out)
Critical point on the first item.
*/
Pro3dPnt pnt_2
/* (Out)
Critical point on the second item.
*/
double* p_result
/* (Out)
The resulting distance between the two items.
*/
)
Returns
PRO_TK_NO_ERRORThe function successfully evaluated the distance.
PRO_TK_OUT_OF_RANGEThe function successfully evaluated the distance, but UV parameters could not be evaluated. It may happen when dealing with borderless items and the calculated critical point is outside of the item boundaries.
PRO_TK_BAD_INPUTSOne or more of the input arguments are invalid.
PRO_TK_BAD_CONTEXTNot applicable to the input selections.

Manual References:

  1. Pro/DEVELOP to Creo Toolkit Function Mapping: Equivalent Pro/DEVELOP Functions
  2. Core: 3D Geometry: Measurement

Sample Code References:

  1. pt_userguide ( UgGeomInterferCheck.c )