gen_parallels_xldgen_parallels_xldGenParallelsXldGenParallelsXldgen_parallels_xld (算子)

名称

gen_parallels_xldgen_parallels_xldGenParallelsXldGenParallelsXldgen_parallels_xld — 提取平行 XLD 多边形。

签名

gen_parallels_xld(Polygons : Parallels : Len, Dist, Alpha, Merge : )

Herror gen_parallels_xld(const Hobject Polygons, Hobject* Parallels, double Len, double Dist, double Alpha, const char* Merge)

Herror T_gen_parallels_xld(const Hobject Polygons, Hobject* Parallels, const Htuple Len, const Htuple Dist, const Htuple Alpha, const Htuple Merge)

void GenParallelsXld(const HObject& Polygons, HObject* Parallels, const HTuple& Len, const HTuple& Dist, const HTuple& Alpha, const HTuple& Merge)

HXLDPara HXLDPoly::GenParallelsXld(const HTuple& Len, const HTuple& Dist, const HTuple& Alpha, const HString& Merge) const

HXLDPara HXLDPoly::GenParallelsXld(double Len, double Dist, double Alpha, const HString& Merge) const

HXLDPara HXLDPoly::GenParallelsXld(double Len, double Dist, double Alpha, const char* Merge) const

HXLDPara HXLDPoly::GenParallelsXld(double Len, double Dist, double Alpha, const wchar_t* Merge) const   ( Windows only)

static void HOperatorSet.GenParallelsXld(HObject polygons, out HObject parallels, HTuple len, HTuple dist, HTuple alpha, HTuple merge)

HXLDPara HXLDPoly.GenParallelsXld(HTuple len, HTuple dist, HTuple alpha, string merge)

HXLDPara HXLDPoly.GenParallelsXld(double len, double dist, double alpha, string merge)

def gen_parallels_xld(polygons: HObject, len: Union[float, int], dist: Union[float, int], alpha: Union[float, int], merge: str) -> HObject

描述

gen_parallels_xldgen_parallels_xldGenParallelsXldGenParallelsXldGenParallelsXldgen_parallels_xld examines the XLD polygons passed in PolygonsPolygonsPolygonsPolygonspolygonspolygons for parallelism. The resulting parallel polygons are returned in ParallelsParallelsParallelsParallelsparallelsparallels. If the parameter MergeMergeMergeMergemergemerge is set to 'true'"true""true""true""true""true", adjacent parallel polygons are returned in a single parallel relation. Otherwise, one parallel relation is returned for each pair of parallel line segments.

Only polygon segments longer than LenLenLenLenlenlen are taken into account. Whether two polygon segments are parallel depends on a maximum allowed angle difference AlphaAlphaAlphaAlphaalphaalpha (in radians). Furthermore, the projections of the two segments onto their angle bisector have to overlap. Finally, the overlap on the angle bisector is reprojected onto the two segments. If the maximal distance of the reprojections is smaller than DistDistDistDistdistdist, the segments are stored in ParallelsParallelsParallelsParallelsparallelsparallels

As a side effect, a quality factor is calculated for each pair of parallels, compare mod_parallels_xldmod_parallels_xldModParallelsXldModParallelsXldModParallelsXldmod_parallels_xld。It is based on the normalized angular difference and the normalized length of the overlap: Here, is the angle difference of the polygon segments, is the length of the overlap, and the lengths of the polygon segments, and the resulting quality factor. The quality factor is a measure of parallelism (the larger its value, the “more parallel” the polygons). Finally, the quality factors of all parallel polygon segments contained in a single polygon are added, weighted with their length of the overlapping area. Note that you can query the range for the quality factor with info_parallels_xldinfo_parallels_xldInfoParallelsXldInfoParallelsXldInfoParallelsXldinfo_parallels_xld

执行信息

参数

PolygonsPolygonsPolygonsPolygonspolygonspolygons (输入对象)  xld_poly-array objectHXLDPolyHObjectHXLDPolyHobject

Input polygons.

ParallelsParallelsParallelsParallelsparallelsparallels (输出对象)  xld_para-array objectHXLDParaHObjectHXLDParaHobject *

Parallel polygons.

LenLenLenLenlenlen (输入控制)  number HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Minimum length of the individual polygon segments.

默认值: 10.0

建议值: 5.0, 10.0, 15.0, 20.0

限制: Len > 0.0

DistDistDistDistdistdist (输入控制)  number HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Maximum distance between the polygon segments.

默认值: 30.0

建议值: 20.0, 25.0, 30.0, 40.0, 50.0, 75.0

限制: Dist > 0.0

AlphaAlphaAlphaAlphaalphaalpha (输入控制)  number HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Maximum angle difference of the polygon segments.

默认值: 0.15

建议值: 0.05, 0.10, 0.15, 0.20, 0.30

限制: 0 <= Alpha && Alpha <= pi / 2

MergeMergeMergeMergemergemerge (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Should adjacent parallel relations be merged?

默认值: 'true' "true" "true" "true" "true" "true"

值列表: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

可能的前趋

gen_polygons_xldgen_polygons_xldGenPolygonsXldGenPolygonsXldGenPolygonsXldgen_polygons_xld

可能的后继

mod_parallels_xldmod_parallels_xldModParallelsXldModParallelsXldModParallelsXldmod_parallels_xld, get_parallels_xldget_parallels_xldGetParallelsXldGetParallelsXldGetParallelsXldget_parallels_xld, info_parallels_xldinfo_parallels_xldInfoParallelsXldInfoParallelsXldInfoParallelsXldinfo_parallels_xld

模块

基础