SE_shape_calculate_distance

Returns the closest distance between two shapes.

Usage syntax

LONG SE_shape_calculate_distance (const SE_SHAPE primary_shape, const SE_SHAPE secondary_shape, LFLOAT *distance, BOOL inside_test);

Parameters
primary_shape A handle to an active shape object
secondary_shape A handle to an active shape object
distance The distance
inside_test If FALSE, returns the closest boundary-to-boundary distance. If TRUE and any part of one of the shapes is inside the other, distance is set to zero.
Description

Returns the closest distance between two shapes. If inside_test is FALSE, inside tests are not performed on the two shapes, and the closest boundary-to-boundary distance is returned. If inside_test is TRUE and any part of one of the shapes is inside the other area shape, the minimum distance is set to zero.

Returns

SE_SUCCESS
SE_COORD_OUT_OF_BOUNDS

SE_FAILURE

SE_INCOMPATIBLE_COORDREFS

SE_INVALID_ENTITY_TYPE

SE_INVALID_POINTER

SE_INVALID_SHAPE

SE_INVALID_SHAPE_OBJECT

SE_OUT_OF_CLMEM

SE_SHAPE_INTEGRITY_ERROR

Notes

•  Ignores any CAD data.