ClassesClasses | | Operators

intersectionintersectionIntersectionIntersection (Operator)

Name

intersectionintersectionIntersectionIntersection — Calculate the intersection of two regions.

Signature

intersection(Region1, Region2 : RegionIntersection : : )

Herror intersection(const Hobject Region1, const Hobject Region2, Hobject* RegionIntersection)

Herror T_intersection(const Hobject Region1, const Hobject Region2, Hobject* RegionIntersection)

void Intersection(const HObject& Region1, const HObject& Region2, HObject* RegionIntersection)

HRegion HRegion::Intersection(const HRegion& Region2) const

static void HOperatorSet.Intersection(HObject region1, HObject region2, out HObject regionIntersection)

HRegion HRegion.Intersection(HRegion region2)

Description

intersectionintersectionIntersectionIntersectionIntersection calculates the intersection of the regions in Region1Region1Region1Region1region1 with the regions in Region2Region2Region2Region2region2. Each region in Region1Region1Region1Region1region1 is intersected with all regions in Region2Region2Region2Region2region2. That is, internally all regions of Region2Region2Region2Region2region2 are united to a single region before the individual regions of Region1Region1Region1Region1region1 are intersected with the united region. The order of regions in RegionIntersectionRegionIntersectionRegionIntersectionRegionIntersectionregionIntersection is identical to the order of regions in Region1Region1Region1Region1region1.

Attention

Empty input regions are permitted. Because empty result regions are possible, the system flag 'store_empty_region'"store_empty_region""store_empty_region""store_empty_region""store_empty_region" should be set appropriately.

Execution Information

Parameters

Region1Region1Region1Region1region1 (input_object)  region(-array) objectHRegionHRegionHobject

Regions to be intersected with all regions in Region2.

Region2Region2Region2Region2region2 (input_object)  region(-array) objectHRegionHRegionHobject

Regions with which Region1 is intersected.

RegionIntersectionRegionIntersectionRegionIntersectionRegionIntersectionregionIntersection (output_object)  region(-array) objectHRegionHRegionHobject *

Result of the intersection.

Number of elements: RegionIntersection <= Region1

Complexity

Let N be the number of regions in Region1Region1Region1Region1region1, be their average area, and be the total area of all regions in Region2Region2Region2Region2region2. Then the runtime complexity is .

Result

intersectionintersectionIntersectionIntersectionIntersection always returns 2 (H_MSG_TRUE). The behavior in case of empty input (no regions given) can be set via set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>) and the behavior in case of an empty input region via set_system('empty_region_result',<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

thresholdthresholdThresholdThresholdThreshold, connectionconnectionConnectionConnectionConnection, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowing, pouringpouringPouringPouringPouring

Possible Successors

select_shapeselect_shapeSelectShapeSelectShapeSelectShape, disp_regiondisp_regionDispRegionDispRegionDispRegion

See also

union1union1Union1Union1Union1, union2union2Union2Union2Union2, complementcomplementComplementComplementComplement

Module

Foundation


ClassesClasses | | Operators