ClassesClassesClassesClasses | | | | Operators

union2_closed_polygons_xldunion2_closed_polygons_xldUnion2ClosedPolygonsXldunion2_closed_polygons_xldUnion2ClosedPolygonsXldUnion2ClosedPolygonsXld (Operator)

Name

union2_closed_polygons_xldunion2_closed_polygons_xldUnion2ClosedPolygonsXldunion2_closed_polygons_xldUnion2ClosedPolygonsXldUnion2ClosedPolygonsXld — Compute the union of closed polygons.

Signature

union2_closed_polygons_xld(Polygons1, Polygons2 : PolygonsUnion : : )

Herror union2_closed_polygons_xld(const Hobject Polygons1, const Hobject Polygons2, Hobject* PolygonsUnion)

Herror T_union2_closed_polygons_xld(const Hobject Polygons1, const Hobject Polygons2, Hobject* PolygonsUnion)

Herror union2_closed_polygons_xld(Hobject Polygons1, Hobject Polygons2, Hobject* PolygonsUnion)

HXLDPoly HXLDPoly::Union2ClosedPolygonsXld(const HXLDPoly& Polygons2) const

HXLDPolyArray HXLDPolyArray::Union2ClosedPolygonsXld(const HXLDPolyArray& Polygons2) const

void Union2ClosedPolygonsXld(const HObject& Polygons1, const HObject& Polygons2, HObject* PolygonsUnion)

HXLDPoly HXLDPoly::Union2ClosedPolygonsXld(const HXLDPoly& Polygons2) const

void HOperatorSetX.Union2ClosedPolygonsXld(
[in] IHUntypedObjectX* Polygons1, [in] IHUntypedObjectX* Polygons2, [out] IHUntypedObjectX*PolygonsUnion)

IHXLDPolyX* HXLDPolyX.Union2ClosedPolygonsXld([in] IHXLDPolyX* Polygons2)

static void HOperatorSet.Union2ClosedPolygonsXld(HObject polygons1, HObject polygons2, out HObject polygonsUnion)

HXLDPoly HXLDPoly.Union2ClosedPolygonsXld(HXLDPoly polygons2)

Description

The operator union2_closed_polygons_xldunion2_closed_polygons_xldUnion2ClosedPolygonsXldunion2_closed_polygons_xldUnion2ClosedPolygonsXldUnion2ClosedPolygonsXld calculates the union of the regions enclosed by the polygons Polygons1Polygons1Polygons1Polygons1Polygons1polygons1 and Polygons2Polygons2Polygons2Polygons2Polygons2polygons2. The boundaries of this union are returned in PolygonsUnionPolygonsUnionPolygonsUnionPolygonsUnionPolygonsUnionpolygonsUnion.

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 (Polygons1Polygons1Polygons1Polygons1Polygons1polygons1 and Polygons2Polygons2Polygons2Polygons2Polygons2polygons2, respectively) are determined as described below. Then, the union 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 Polygons1Polygons1Polygons1Polygons1Polygons1polygons1 and Polygons2Polygons2Polygons2Polygons2Polygons2polygons2, 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.

Attention

The resulting polygons PolygonsUnionPolygonsUnionPolygonsUnionPolygonsUnionPolygonsUnionpolygonsUnion contain no references to the XLD contours that are possibly referenced by Polygons1Polygons1Polygons1Polygons1Polygons1polygons1 and Polygons2Polygons2Polygons2Polygons2Polygons2polygons2. Hence, operators that access the contours associated with a polygon, e.g., split_contours_xldsplit_contours_xldSplitContoursXldsplit_contours_xldSplitContoursXldSplitContoursXld will not work correctly.

Parallelization

Parameters

Polygons1Polygons1Polygons1Polygons1Polygons1polygons1 (input_object)  xld_poly(-array) objectHXLDPolyHXLDPolyHXLDPolyHXLDPolyXHobject

Polygons enclosing the first region.

Polygons2Polygons2Polygons2Polygons2Polygons2polygons2 (input_object)  xld_poly(-array) objectHXLDPolyHXLDPolyHXLDPolyHXLDPolyXHobject

Polygons enclosing the second region.

PolygonsUnionPolygonsUnionPolygonsUnionPolygonsUnionPolygonsUnionpolygonsUnion (output_object)  xld_poly(-array) objectHXLDPolyHXLDPolyHXLDPolyHXLDPolyXHobject *

Polygons enclosing the union.

Result

union2_closed_polygons_xldunion2_closed_polygons_xldUnion2ClosedPolygonsXldunion2_closed_polygons_xldUnion2ClosedPolygonsXldUnion2ClosedPolygonsXld returns 2 (H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.

Possible Predecessors

gen_polygons_xldgen_polygons_xldGenPolygonsXldgen_polygons_xldGenPolygonsXldGenPolygonsXld

Alternatives

union2union2Union2union2Union2Union2

See also

difference_closed_polygons_xlddifference_closed_polygons_xldDifferenceClosedPolygonsXlddifference_closed_polygons_xldDifferenceClosedPolygonsXldDifferenceClosedPolygonsXld, symm_difference_closed_polygons_xldsymm_difference_closed_polygons_xldSymmDifferenceClosedPolygonsXldsymm_difference_closed_polygons_xldSymmDifferenceClosedPolygonsXldSymmDifferenceClosedPolygonsXld, intersection_closed_polygons_xldintersection_closed_polygons_xldIntersectionClosedPolygonsXldintersection_closed_polygons_xldIntersectionClosedPolygonsXldIntersectionClosedPolygonsXld, union2_closed_contours_xldunion2_closed_contours_xldUnion2ClosedContoursXldunion2_closed_contours_xldUnion2ClosedContoursXldUnion2ClosedContoursXld

Module

Foundation


ClassesClassesClassesClasses | | | | Operators