difference_closed_polygons_xlddifference_closed_polygons_xldDifferenceClosedPolygonsXldDifferenceClosedPolygonsXlddifference_closed_polygons_xld (算子名称)

名称

difference_closed_polygons_xlddifference_closed_polygons_xldDifferenceClosedPolygonsXldDifferenceClosedPolygonsXlddifference_closed_polygons_xld — Compute the difference of closed polygons.

参数签名

difference_closed_polygons_xld(Polygons, Sub : PolygonsDifference : : )

Herror difference_closed_polygons_xld(const Hobject Polygons, const Hobject Sub, Hobject* PolygonsDifference)

Herror T_difference_closed_polygons_xld(const Hobject Polygons, const Hobject Sub, Hobject* PolygonsDifference)

void DifferenceClosedPolygonsXld(const HObject& Polygons, const HObject& Sub, HObject* PolygonsDifference)

HXLDPoly HXLDPoly::DifferenceClosedPolygonsXld(const HXLDPoly& Sub) const

static void HOperatorSet.DifferenceClosedPolygonsXld(HObject polygons, HObject sub, out HObject polygonsDifference)

HXLDPoly HXLDPoly.DifferenceClosedPolygonsXld(HXLDPoly sub)

def difference_closed_polygons_xld(polygons: HObject, sub: HObject) -> HObject

描述

该算子 difference_closed_polygons_xlddifference_closed_polygons_xldDifferenceClosedPolygonsXldDifferenceClosedPolygonsXldDifferenceClosedPolygonsXlddifference_closed_polygons_xld calculates the difference of the regions enclosed by the polygons PolygonsPolygonsPolygonsPolygonspolygonspolygons and SubSubSubSubsubsub. The boundaries of this difference are returned in PolygonsDifferencePolygonsDifferencePolygonsDifferencePolygonsDifferencepolygonsDifferencepolygons_difference.

If the individual input polygons are not closed, they are closed automatically by connecting their start and end points.

Internally, first, the regions enclosed by each set of polygons (PolygonsPolygonsPolygonsPolygonspolygonspolygons and SubSubSubSubsubsub, respectively) are determined as described below. Then, the difference of these two regions is calculated.

In the following, the two sets of input polygons are referred to as boundary sets. A boundary set consists of an arbitrary number of boundaries (the individual polygons of PolygonsPolygonsPolygonsPolygonspolygonspolygons and SubSubSubSubsubsub, respectively). Each boundary may be convex or concave and self-intersecting. Internal holes may be formed by the nesting of boundaries.

The region enclosed by such a boundary set is defined by the so-called Even-Odd-Rule. Thus, it consists of all points with the following property: The line constructed by connecting the point with another reference point that lies outside of the region has an odd number of intersections with boundaries.

More descriptive, this means that a boundary defines a hole in the region enclosed by another boundary if it lies completely inside that region. Similarly, the overlapping area of two separate boundaries of one boundary set is taken as a "hole", i.e., it does not belong to the region enclosed by the two boundaries. Note that the region enclosed by a boundary does not depend on the orientation of the boundary.

A self-intersecting boundary may be split at the intersection point or it is reordered such that it touches itself at the intersection point. The resulting boundaries are treated as separate boundaries.

注意

The resulting polygons PolygonsDifferencePolygonsDifferencePolygonsDifferencePolygonsDifferencepolygonsDifferencepolygons_difference contain no references to the XLD contours that are possibly referenced by PolygonsPolygonsPolygonsPolygonspolygonspolygons and SubSubSubSubsubsub. Hence, operators that access the contours associated with a polygon, e.g., split_contours_xldsplit_contours_xldSplitContoursXldSplitContoursXldSplitContoursXldsplit_contours_xld will not work correctly.

运行信息

参数表

PolygonsPolygonsPolygonsPolygonspolygonspolygons (input_object)  xld_poly(-array) objectHXLDPolyHObjectHXLDPolyHobject

Polygons enclosing the region from which the second region is subtracted.

SubSubSubSubsubsub (input_object)  xld_poly(-array) objectHXLDPolyHObjectHXLDPolyHobject

Polygons enclosing the region that is subtracted from the first region.

PolygonsDifferencePolygonsDifferencePolygonsDifferencePolygonsDifferencepolygonsDifferencepolygons_difference (output_object)  xld_poly(-array) objectHXLDPolyHObjectHXLDPolyHobject *

Polygons enclosing the difference.

结果

difference_closed_polygons_xlddifference_closed_polygons_xldDifferenceClosedPolygonsXldDifferenceClosedPolygonsXldDifferenceClosedPolygonsXlddifference_closed_polygons_xld returns 2 ( H_MSG_TRUE) if all parameters are correct. 如有必要,将引发异常。

可能的前置算子

gen_polygons_xldgen_polygons_xldGenPolygonsXldGenPolygonsXldGenPolygonsXldgen_polygons_xld

可替代算子

differencedifferenceDifferenceDifferenceDifferencedifference

参考其它

intersection_closed_polygons_xldintersection_closed_polygons_xldIntersectionClosedPolygonsXldIntersectionClosedPolygonsXldIntersectionClosedPolygonsXldintersection_closed_polygons_xld, symm_difference_closed_polygons_xldsymm_difference_closed_polygons_xldSymmDifferenceClosedPolygonsXldSymmDifferenceClosedPolygonsXldSymmDifferenceClosedPolygonsXldsymm_difference_closed_polygons_xld, union2_closed_polygons_xldunion2_closed_polygons_xldUnion2ClosedPolygonsXldUnion2ClosedPolygonsXldUnion2ClosedPolygonsXldunion2_closed_polygons_xld, difference_closed_contours_xlddifference_closed_contours_xldDifferenceClosedContoursXldDifferenceClosedContoursXldDifferenceClosedContoursXlddifference_closed_contours_xld

模块

Foundation