Category Selection, Object ProSelection

Function ProSelectionDistanceEval


DEPRECATED: since Creo 4.0
SUPERSEDED BY: ProSelectionWithOptionsDistanceEval
Description
Evaluate the distance between two items. Objects can be surfaces, entities, surface-curves, surface-nodes, or points. 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 params will be set to 0.0. Note: This function works incorrectly for datum planes and axes. The resulted distance is measured to the selected point instead of the projection to the datum/axis. Please use instead ProSelectionWithOptionsDistanceEval.
Replacement in Object TOOLKIT: pfcSelectionEvaluator::ComputeNearestCriticalDistance
Synopsis
#include <ProSelection.h>
ProErrorProSelectionDistanceEval(
ProSelection p_selection1
/* (In)
The first selection.
*/
ProSelection p_selection2
/* (In)
The second selection.
*/
Pro2dPnt param_1
/* (Out)
UV params of the critical point on the first item.
*/
Pro2dPnt param_2
/* (Out)
UV params of the critical point on the second item.
*/
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_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 Parametric TOOLKIT Function Mapping: Equivalent Pro/DEVELOP Functions
  2. Core: 3D Geometry: Measurement

Sample Code References:

  1. pt_userguide ( UgGeomInterferCheck.c )