distance_prdistance_prDistancePrDistancePrdistance_pr (Operator)

Name

distance_prdistance_prDistancePrDistancePrdistance_pr — Calculate the distance between a point and a region.

Signature

distance_pr(Region : : Row, Column : DistanceMin, DistanceMax)

Herror distance_pr(const Hobject Region, double Row, double Column, double* DistanceMin, double* DistanceMax)

Herror T_distance_pr(const Hobject Region, const Htuple Row, const Htuple Column, Htuple* DistanceMin, Htuple* DistanceMax)

void DistancePr(const HObject& Region, const HTuple& Row, const HTuple& Column, HTuple* DistanceMin, HTuple* DistanceMax)

void HRegion::DistancePr(const HTuple& Row, const HTuple& Column, HTuple* DistanceMin, HTuple* DistanceMax) const

void HRegion::DistancePr(double Row, double Column, double* DistanceMin, double* DistanceMax) const

static void HOperatorSet.DistancePr(HObject region, HTuple row, HTuple column, out HTuple distanceMin, out HTuple distanceMax)

void HRegion.DistancePr(HTuple row, HTuple column, out HTuple distanceMin, out HTuple distanceMax)

void HRegion.DistancePr(double row, double column, out double distanceMin, out double distanceMax)

def distance_pr(region: HObject, row: MaybeSequence[Union[float, int]], column: MaybeSequence[Union[float, int]]) -> Tuple[Sequence[float], Sequence[float]]

def distance_pr_s(region: HObject, row: MaybeSequence[Union[float, int]], column: MaybeSequence[Union[float, int]]) -> Tuple[float, float]

Description

The operator distance_prdistance_prDistancePrDistancePrdistance_pr calculates the distance between a point and one region. As input the coordinates of the points (RowRowRowrowrow,ColumnColumnColumncolumncolumn) and one region are expected. If a point is inside of the region, its minimum distance is zero. The parameters DistanceMinDistanceMinDistanceMindistanceMindistance_min and DistanceMaxDistanceMaxDistanceMaxdistanceMaxdistance_max return the result of the calculation.

Execution Information

Parameters

RegionRegionRegionregionregion (input_object)  region objectHRegionHObjectHObjectHobject

Input region.

RowRowRowrowrow (input_control)  point.y(-array) HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Row coordinate of the point.

ColumnColumnColumncolumncolumn (input_control)  point.x(-array) HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Column coordinate of the point.

DistanceMinDistanceMinDistanceMindistanceMindistance_min (output_control)  real(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Minimum distance between the point and the region.

DistanceMaxDistanceMaxDistanceMaxdistanceMaxdistance_max (output_control)  real(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Maximum distance between the point and the region.

Example (HDevelop)

gen_circle (Circle, 200, 200, 100.5)
draw_point (WindowHandle, Row, Column)
gen_cross_contour_xld (Cross, Row, Column, 15, 0)
distance_pr (Circle, Row, Column, DistanceMin, DistanceMax)

Result

distance_prdistance_prDistancePrDistancePrdistance_pr returns 2 ( H_MSG_TRUE) .

Alternatives

distance_pcdistance_pcDistancePcDistancePcdistance_pc, distance_lrdistance_lrDistanceLrDistanceLrdistance_lr, distance_srdistance_srDistanceSrDistanceSrdistance_sr, diameter_regiondiameter_regionDiameterRegionDiameterRegiondiameter_region

See also

hamming_distancehamming_distanceHammingDistanceHammingDistancehamming_distance, select_region_pointselect_region_pointSelectRegionPointSelectRegionPointselect_region_point, test_region_pointtest_region_pointTestRegionPointTestRegionPointtest_region_point, smallest_rectangle2smallest_rectangle2SmallestRectangle2SmallestRectangle2smallest_rectangle2

Module

Foundation