| 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> |
| ProError | ProSelectionWithOptionsDistanceEval | ( |
| 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_ERROR | | The function successfully evaluated the distance. |
| PRO_TK_OUT_OF_RANGE | | The 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_INPUTS | | One or more of the input arguments are invalid. |
| PRO_TK_BAD_CONTEXT | | Not applicable to the input selections. |
|