ClassesClassesClassesClasses | | | | Operators

differencedifferenceDifferencedifferenceDifferenceDifference (Operator)

Name

differencedifferenceDifferencedifferenceDifferenceDifference — Calculate the difference of two regions.

Signature

difference(Region, Sub : RegionDifference : : )

Herror difference(const Hobject Region, const Hobject Sub, Hobject* RegionDifference)

Herror T_difference(const Hobject Region, const Hobject Sub, Hobject* RegionDifference)

Herror difference(Hobject Region, Hobject Sub, Hobject* RegionDifference)

HRegion HRegion::Difference(const HRegion& Sub) const

HRegionArray HRegionArray::Difference(const HRegionArray& Sub) const

void Difference(const HObject& Region, const HObject& Sub, HObject* RegionDifference)

HRegion HRegion::Difference(const HRegion& Sub) const

void HOperatorSetX.Difference(
[in] IHUntypedObjectX* Region, [in] IHUntypedObjectX* Sub, [out] IHUntypedObjectX*RegionDifference)

IHRegionX* HRegionX.Difference([in] IHRegionX* Sub)

static void HOperatorSet.Difference(HObject region, HObject sub, out HObject regionDifference)

HRegion HRegion.Difference(HRegion sub)

Description

differencedifferenceDifferencedifferenceDifferenceDifference calculates the set-theoretic difference of two regions:

   (Regions in Region) - (Regions in Sub)
The resulting region is defined as the input region (RegionRegionRegionRegionRegionregion) with all points from SubSubSubSubSubsub removed. Note that, internally, all regions of SubSubSubSubSubsub are united to a single region before the differences between the individual regions of RegionRegionRegionRegionRegionregion and the united region are calculated.

Attention

Empty regions are valid for both parameters. On output, empty regions may result. The value of the system flag 'store_empty_region'"store_empty_region""store_empty_region""store_empty_region""store_empty_region""store_empty_region" determines the behavior in this case.

Parallelization

Parameters

RegionRegionRegionRegionRegionregion (input_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject

Regions to be processed.

SubSubSubSubSubsub (input_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject

The union of these regions is subtracted from Region.

RegionDifferenceRegionDifferenceRegionDifferenceRegionDifferenceRegionDifferenceregionDifference (output_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject *

Resulting region.

Example (HDevelop)

* provides the region X without the points in Y
difference(X,Y,RegionDifference)

Example (C)

/* provides the region X without the points in Y */
difference(X,Y,&RegionDifference);

Example (HDevelop)

* provides the region X without the points in Y
difference(X,Y,RegionDifference)

Example (HDevelop)

* provides the region X without the points in Y
difference(X,Y,RegionDifference)

Example (HDevelop)

* provides the region X without the points in Y
difference(X,Y,RegionDifference)

Example (HDevelop)

* provides the region X without the points in Y
difference(X,Y,RegionDifference)

Complexity

Let N be the number of regions, F_1 be their average area, and F_2 be the total area of all regions in SubSubSubSubSubsub. Then the runtime complexity is O(F_1 * log(F_1) + N * (sqrt(F_1) + sqrt(F_2))).

Result

differencedifferenceDifferencedifferenceDifferenceDifference always returns the value 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>)set_system("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>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

thresholdthresholdThresholdthresholdThresholdThreshold, connectionconnectionConnectionconnectionConnectionConnection, regiongrowingregiongrowingRegiongrowingregiongrowingRegiongrowingRegiongrowing, pouringpouringPouringpouringPouringPouring, class_ndim_normclass_ndim_normClassNdimNormclass_ndim_normClassNdimNormClassNdimNorm

Possible Successors

select_shapeselect_shapeSelectShapeselect_shapeSelectShapeSelectShape, disp_regiondisp_regionDispRegiondisp_regionDispRegionDispRegion

See also

intersectionintersectionIntersectionintersectionIntersectionIntersection, union1union1Union1union1Union1Union1, union2union2Union2union2Union2Union2, complementcomplementComplementcomplementComplementComplement, symm_differencesymm_differenceSymmDifferencesymm_differenceSymmDifferenceSymmDifference

Module

Foundation


ClassesClassesClassesClasses | | | | Operators