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_prDistancePrDistancePrDistancePrdistance_pr calculates the distance between a point and one region. As input the coordinates of the points (RowRowRowRowrowrow,ColumnColumnColumnColumncolumncolumn) and one region are expected. If a point is inside of the region, its minimum distance is zero. The parameters DistanceMinDistanceMinDistanceMinDistanceMindistanceMindistance_min and DistanceMaxDistanceMaxDistanceMaxDistanceMaxdistanceMaxdistance_max return the result of the calculation.

Execution Information

Parameters

RegionRegionRegionRegionregionregion (input_object)  region objectHRegionHObjectHRegionHobject

Input region.

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

Row coordinate of the point.

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

Column coordinate of the point.

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

Minimum distance between the point and the region.

DistanceMaxDistanceMaxDistanceMaxDistanceMaxdistanceMaxdistance_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_prDistancePrDistancePrDistancePrdistance_pr returns 2 (H_MSG_TRUE).

Alternatives

distance_pcdistance_pcDistancePcDistancePcDistancePcdistance_pc, distance_lrdistance_lrDistanceLrDistanceLrDistanceLrdistance_lr, distance_srdistance_srDistanceSrDistanceSrDistanceSrdistance_sr, diameter_regiondiameter_regionDiameterRegionDiameterRegionDiameterRegiondiameter_region

See also

hamming_distancehamming_distanceHammingDistanceHammingDistanceHammingDistancehamming_distance, select_region_pointselect_region_pointSelectRegionPointSelectRegionPointSelectRegionPointselect_region_point, test_region_pointtest_region_pointTestRegionPointTestRegionPointTestRegionPointtest_region_point, smallest_rectangle2smallest_rectangle2SmallestRectangle2SmallestRectangle2SmallestRectangle2smallest_rectangle2

Module

Foundation