Class SimplePolygon
- Namespace
- VirtualLabAPI.Core.Numerics.Region2D
- Assembly
- VirtualLabAPI.dll
Public class which defines a simple polygon (defined by an array of vertices). “Simple” means, that there are no intersections of the vertices.
[Serializable]
public class SimplePolygon : ElementaryRegion2D, ISerializable, IDeserializationCallback, IRegion1D2D, IDocument, IEquatable<IObjectBase>, IDisposable, ICloneable
- Inheritance
-
ObjectBaseSerializableObjectBaseManualSerializationDocumentBaseSimplePolygon
- Implements
-
IEquatable<IObjectBase>
- Inherited Members
- Extension Methods
Constructors
SimplePolygon()
Default constructor, creating a triangle with an edge length of 5 mm, centered at (0, 0), and with its base line parallel to the x-axis.
public SimplePolygon()
SimplePolygon(bool, params VectorD[])
Initializes a new instance of the SimplePolygon class out of a list of VectorD. Each vertex gets the name "Vertex" and a running number. The boundaries are regarded as being outside, which you can change with the BoundariesAreInside property.
public SimplePolygon(bool useOnlyEffectiveVertices = true, params VectorD[] vertices)
Parameters
useOnlyEffectiveVerticesboolIf
true, only effective vertices (instead of all defined vertices) will be used.verticesVectorD[]The vertices of the polygon.
Exceptions
- ArgumentException
At least three vertices must be given.
- ArgumentException
Vertices have to be unique.
SimplePolygon(RectanglePhysical, bool)
Constructor which gets a rectangle that shall be represented by a polygon.
public SimplePolygon(RectanglePhysical rectangle, bool boundaryIsInside = false)
Parameters
rectangleRectanglePhysicalRectangle to be converted to a polygon.
boundaryIsInsideboolFlag which says whether or not the boundary is part of the inner region or not.
SimplePolygon(PolygonVertexList, bool, PhysicalProperty, PhysicalProperty, bool, bool)
A constructor of the simple polygon class. Non-simple polygons (where at least two edges intersect) are not allowed. The constructor determines the type of the polygon.
public SimplePolygon(PolygonVertexList vertices, bool boundaryIsInside = false, PhysicalProperty propertyOfCoordinatesX = PhysicalProperty.Length, PhysicalProperty propertyOfCoordinatesY = PhysicalProperty.Length, bool dontCheckConsistency = false, bool useOnlyEffectiveVertices = true)
Parameters
verticesPolygonVertexListThe vertices that define the polygon. The order is important.
boundaryIsInsideboolFlag which says whether or not the boundary is part of the inner region or not.
propertyOfCoordinatesXPhysicalPropertyPhysical property of the x-coordinate.
propertyOfCoordinatesYPhysicalPropertyPhysical property of the y-coordinate.
dontCheckConsistencyboolIf
true, no consistency check will be done. (Make sure that you know what you're doing!)useOnlyEffectiveVerticesboolIf
true, only effective vertices (instead of all defined vertices) will be used.
Exceptions
- ArgumentNullException
- ArgumentException
Not enough vertices specified. or Duplicate vertices found.
SimplePolygon(RectangularRegion)
Constructor which gets a rectangular region which shall be represented by a polygon.
public SimplePolygon(RectangularRegion rectangle)
Parameters
rectangleRectangularRegionRectangle to be converted to a polygon.
SimplePolygon(SimplePolygon)
Copy constructor of the simple polygon class.
public SimplePolygon(SimplePolygon polygon)
Parameters
polygonSimplePolygonThe polygon which shall be copied.
Fields
NameOfRectanglesCorner_BL
Vertex name of the bottom left corner of a rectangle which is represented as SimplePolygon.
public const string NameOfRectanglesCorner_BL = "BL_of_Rect"
Field Value
NameOfRectanglesCorner_BR
Vertex name of the bottom right corner of a rectangle which is represented as SimplePolygon.
public const string NameOfRectanglesCorner_BR = "BR_of_Rect"
Field Value
NameOfRectanglesCorner_TL
Vertex name of the top left corner of a rectangle which is represented as SimplePolygon.
public const string NameOfRectanglesCorner_TL = "TL_of_Rect"
Field Value
NameOfRectanglesCorner_TR
Vertex name of the top right corner of a rectangle which is represented as SimplePolygon.
public const string NameOfRectanglesCorner_TR = "TR_of_Rect"
Field Value
ThresholdForNumericalCriticalDifference
Threshold below which a coordinate difference is considered critical. To be used by the method CheckPolygonForCoordinateDifferencesWhichAreNumericalCritical.
public const double ThresholdForNumericalCriticalDifference = 1E-08
Field Value
Properties
Area
Gets the area of the polygon.
public double Area { get; }
Property Value
CounterClockwise
Gets whether or not the polygon is defined counterclockwise. It is determined during preprocessing.
public bool CounterClockwise { get; }
Property Value
ParameterRunParameters
Gets all available parameters. For variable parameters (i.e. those double and int parameters which can be used in the Parameter Run, Parametric Optimization and so on) add a VaryParameterInfo object (derived from Parameter class) to the returned list.
public virtual List<Parameter> ParameterRunParameters { get; }
Property Value
- List<Parameter>
Type
Gets the type of the polygon. It is determined during preprocessing.
public PolygonType Type { get; }
Property Value
- PolygonType
Vertices
public property to get the vertices of the polygon
public PolygonVertexList Vertices { get; }
Property Value
- PolygonVertexList
Methods
CalculateAxisAlignedBoundingBox()
Method for (re)calculating the axis aligned bounding box.
public override void CalculateAxisAlignedBoundingBox()
CalculateCentroid(SimplePolygon)
Calculates the centroid of a given polygon. Formula taken from Wikipedia.
public static VectorD CalculateCentroid(SimplePolygon polygon)
Parameters
polygonSimplePolygonPolygon to calculate the centroid for.
Returns
- VectorD
The centroid for the given polygon.
CalculateDistanceOfPointToPolygon(VectorD, out VectorD, bool)
Calculates the distance of a point to the border of this polygon. Important: This method will ignore all extrapolation settings!
public (int startIndexOfNearestEdge, int endIndexOfNearestEdge, double distance) CalculateDistanceOfPointToPolygon(VectorD point, out VectorD nearestPointOnBorder, bool ignoreVirtualVertices = true)
Parameters
pointVectorDPoint to calculate the distance for.
nearestPointOnBorderVectorDThe point on the border which is the nearest one to the given point, having a distance which is part of the return triple.
ignoreVirtualVerticesboolIf set to
true, virtual vertices will be ignored.
Returns
- (int startIndexOfNearestEdge, int endIndexOfNearestEdge, double distance)
A named tuple containing the vertex indices of the edge with the smallest distance as well as the distance itself.
CalculateDistanceOfPointToRegionBorder(VectorD)
Calculates the distance of a point to the border of this region.
public override double CalculateDistanceOfPointToRegionBorder(VectorD point)
Parameters
pointVectorDPoint to calculate the distance for.
Returns
- double
The distance of the given point to the border of this region
CalculateInternalAngles()
Method which calculates all internal angles of the polygon.
public List<double> CalculateInternalAngles()
Returns
CalculateIntersectionOfTwoPolygons(SimplePolygon, SimplePolygon, bool)
Method for calculating the intersection of two polygons. See ITN.067 for more information.
public static List<SimplePolygon> CalculateIntersectionOfTwoPolygons(SimplePolygon polygon1, SimplePolygon polygon2, bool ignoreVirtualVertices)
Parameters
polygon1SimplePolygonFirst of the polygons to intersect.
polygon2SimplePolygonSecond of the polygons to intersect.
ignoreVirtualVerticesboolIf
true, only effective vertices are used. That will be sufficient for most geometrical cases. If it is about triangulation, all vertices are needed instead.
Returns
- List<SimplePolygon>
A list of simple polygons representing the intersection(s) of the given polygons.
CalculateIntersectionsOfHalfLineAndPolygon(VectorD, VectorD, string, bool, out string[])
Method for calculating the intersection points of a given half line and this polygon
public VectorD[] CalculateIntersectionsOfHalfLineAndPolygon(VectorD startPositionOfHalfLine, VectorD directionOfHalfLine, string linesName, bool ignoreVirtualVertices, out string[] namesOfPoints)
Parameters
startPositionOfHalfLineVectorDThe start position of the half line.
directionOfHalfLineVectorDThe direction of the half line.
linesNamestringName of the line to intersect with the polygon.
ignoreVirtualVerticesboolIf
true, only effective vertices are used. That will be sufficient for most geometrical cases. If it is about triangulation, all vertices are needed instead.namesOfPointsstring[]Array which contains the names of the intersection points.
Returns
- VectorD[]
The intersection points of a given half line and this polygon.
CalculateIntersectionsOfLineAndPolygon(VectorD, VectorD, bool, string, bool, out List<(int edgeStart, int edgeEnd)>)
Method for calculating the intersection points of a given line and this polygon.
public List<(VectorD intersectionPoint, string nameOfPoint)> CalculateIntersectionsOfLineAndPolygon(VectorD firstPointOnLine, VectorD secondPointOnLineOrDirectionOfLine, bool directionGivenInsteadOfSecondPointOnLine, string linesName, bool ignoreVirtualVertices, out List<(int edgeStart, int edgeEnd)> congruentEdges)
Parameters
firstPointOnLineVectorDOne point lying on the line to be intersecting.
secondPointOnLineOrDirectionOfLineVectorDEither a second point on the line or the direction of the line, depending on the flag directionGivenInsteadOfSecondPointOnLine.
directionGivenInsteadOfSecondPointOnLineboolIf
true, the second VectorD is interpreted as line direction instead of a second point on the line.linesNamestringName of the line to intersect with the polygon.
ignoreVirtualVerticesboolIf
true, only effective vertices are used. That will be sufficient for most geometrical cases. If it is about triangulation, all vertices are needed instead.congruentEdgesList<(int edgeStart, int edgeEnd)>A list of edge start and end indices of these edges which are congruent to the line to intersect.
Returns
- List<(VectorD intersectionPoint, string nameOfPoint)>
A list of value tuples which give the found intersection points as well as the name of the point.
Exceptions
- ArgumentException
If directionGivenInsteadOfSecondPointOnLine is true and the absolute value of secondPointOnLineOrDirectionOfLine, an exception is thrown.
CalculateIntersectionsOfLineSegmentAndPolygon(VectorD, VectorD, string, string, string, bool, out (string, string)[])
Method for calculating the intersection points of a given line segment and this polygon
public VectorD[] CalculateIntersectionsOfLineSegmentAndPolygon(VectorD startPositionOfSegment, VectorD endPositionOfSegment, string linesName, string nameOfSegmentStart, string nameOfSegmentEnd, bool ignoreVirtualVertices, out (string, string)[] namesOfPoints)
Parameters
startPositionOfSegmentVectorDThe start position of the line segment.
endPositionOfSegmentVectorDThe end position of the line segment.
linesNamestringName of the line to intersect with the polygon.
nameOfSegmentStartstringName of the start point of the line segment to be intersected with the polygon.
nameOfSegmentEndstringName of the end point of the line segment to be intersected with the polygon.
ignoreVirtualVerticesboolIf
true, only effective vertices are used. That will be sufficient for most geometrical cases. If it is about triangulation, all vertices are needed instead.namesOfPoints(string, string)[]Array which contains the names of the intersection points.
Returns
- VectorD[]
A list of tuples which give the found intersection points as well as a bool flag indicating whether or not the edge from the current intersection to the next one is congruent to the line segment.
CalculateUnionOfTwoPolygons(SimplePolygon, SimplePolygon, bool, out List<SimplePolygon>?)
Method for calculating the union of two polygons. See ITN.067 for more information.
public static SimplePolygon? CalculateUnionOfTwoPolygons(SimplePolygon polygon1, SimplePolygon polygon2, bool ignoreVirtualVertices, out List<SimplePolygon>? holes)
Parameters
polygon1SimplePolygonFirst of the polygons to unite.
polygon2SimplePolygonSecond of the polygons to unite.
ignoreVirtualVerticesboolIf
true, only effective vertices are used. That will be sufficient for most geometrical cases. If it is about triangulation, all vertices are needed instead.holesList<SimplePolygon>A list of holes that do not belong to the mathematical union set but which can be not represented by the returned simple polygon.
Returns
- SimplePolygon
A simple polygon representing the union of the given polygons.
Nullwill be returned in case of the two given polygons being separate or touching in one single contact point at most.
CheckPolygonForCoordinateDifferencesWhichAreNumericalCritical(SimplePolygon)
Method which checks the vertices of a given SimplePolygon whether or not it contains (neighbored) vertices whose x- or y-coordinates are not identical but so close that numerical problems are probable.
public static List<(string nameOfVertex1, string nameOfVertex2, bool criticalX, bool criticalY)>? CheckPolygonForCoordinateDifferencesWhichAreNumericalCritical(SimplePolygon polygon)
Parameters
polygonSimplePolygonSimplePolygon to check.
Returns
- List<(string nameOfVertex1, string nameOfVertex2, bool criticalX, bool criticalY)>
List of tuples of names of vertices whose coordinates are nearly equal in one dimension at least.
CheckPolygonalChainForConvexityAndMonotony(VectorD[], out bool, out bool, out RectangleD, out List<int>, out List<int>, out List<int>, out List<int>)
Check whether a polygonal chain is convex and monotone.
public static bool CheckPolygonalChainForConvexityAndMonotony(VectorD[] polygonalPoints, out bool monotone_inX, out bool monotone_inY, out RectangleD boundingBox, out List<int> minX_vertexIndices, out List<int> maxX_vertexIndices, out List<int> minY_vertexIndices, out List<int> maxY_vertexIndices)
Parameters
polygonalPointsVectorD[]Points of the polygonal chain to check.
monotone_inXboolOut parameter which is
true, if the polygon is monotone in x.monotone_inYboolOut parameter which is
true, if the polygon is monotone in y.boundingBoxRectangleDThe bounding box of the polygon.
minX_vertexIndicesList<int>Out parameter which is a list of the indices of those vertices which have the minimum x-coordinate.
maxX_vertexIndicesList<int>Out parameter which is a list of the indices of those vertices which have the maximum x-coordinate.
minY_vertexIndicesList<int>Out parameter which is a list of the indices of those vertices which have the minimum y-coordinate.
maxY_vertexIndicesList<int>Out parameter which is a list of the indices of those vertices which have the maximum y-coordinate.
Returns
- bool
Trueif the polygon which is described by the chain is convex.
Clone()
Deep copy of the object.
public override object Clone()
Returns
- object
A deep copy of this.
DecomposeConvexPolygonToTwoHorizontalChains(SimplePolygon)
Method which decomposes a suitable polygon into two separate polygonal chains, an upper and a lower one.
public static (List<NamedPolygonVertex> upperChain, List<NamedPolygonVertex> lowerChain) DecomposeConvexPolygonToTwoHorizontalChains(SimplePolygon polygon)
Parameters
polygonSimplePolygonPolygon to be decomposed which is at least monotone in x-direction.
Returns
- (List<NamedPolygonVertex> upperChain, List<NamedPolygonVertex> lowerChain)
Two polygonal chains.
Exceptions
- Exception
Thrown if more than two vertices are found as left most or right most ones.
- ArgumentException
Thrown if a non-suitable polygon is given (not monotone in x).
EnsureClockwisePolygon(SimplePolygon)
Method which checks whether the vertices of a polygon are given in clockwise order. If so, it will be returned unchanged. If not, a polygon with reversed vertex order is returned.
public static SimplePolygon EnsureClockwisePolygon(SimplePolygon polygon2check)
Parameters
polygon2checkSimplePolygonPolygon to check for clockwise vertex order.
Returns
- SimplePolygon
Polygon with clockwise vertex order.
EnsureCounterClockwisePolygon(SimplePolygon)
Method which checks whether the vertices of a polygon are given in counterclockwise order. If so, it will be returned unchanged. If not, a polygon with reversed vertex order is returned.
public static SimplePolygon EnsureCounterClockwisePolygon(SimplePolygon polygon2check)
Parameters
polygon2checkSimplePolygonPolygon to check for counterclockwise vertex order.
Returns
- SimplePolygon
Polygon with counterclockwise vertex order.
Equals(object, EqualityIntent)
Determines whether the specified object is equal to this instance.
public override bool Equals(object obj, EqualityIntent equalityIntent)
Parameters
objobjectequalityIntentEqualityIntentDefines what kind of equality you want to check when comparing two objects, for example all values or just physical equality.
Returns
ExtendConvexPolygonWithOutlyingPoint(SimplePolygon, List<long>, NamedPolygonVertex, long, out List<TriangulationTriangle2D>)
Method which extends a convex polygon by a given point. The polygon is meant to be the convex hull of a triangulated point cloud as described in ITN.065.
public static List<(long index, VectorD point)> ExtendConvexPolygonWithOutlyingPoint(SimplePolygon polygon, List<long> pointIndicesOfPolygonVertices, NamedPolygonVertex singlePoint, long pointIndexOfSinglePoint, out List<TriangulationTriangle2D> newTrianglesForExtension)
Parameters
polygonSimplePolygonPolygon to be extended.
pointIndicesOfPolygonVerticesList<long>List of indices which correspond to the list of points the polygon is the convex hull for.
singlePointNamedPolygonVertexOutlying point to be a new vertex of the polygon.
pointIndexOfSinglePointlongIndex of the single point in the point cloud.
newTrianglesForExtensionList<TriangulationTriangle2D>Adding the new vertex will usually remove old edges which lie inside the new polygon now. This out parameters gives all triangle which are defined by the removed edge and the new point.
Returns
- List<(long index, VectorD point)>
A polygonal chain which represents a new convex polygon, extended by the given point.
ExtrapolatedRegionBorders(RectanglePhysical, out List<Tuple<bool, double>>, out List<Tuple<bool, double>>, out List<Tuple<bool, double>>, out List<Tuple<bool, double>>)
Determine region borders that can be created by 'border continuation' extrapolation. //See ITN.064 for more information.
public void ExtrapolatedRegionBorders(RectanglePhysical boundingBox, out List<Tuple<bool, double>> leftBorders, out List<Tuple<bool, double>> topBorders, out List<Tuple<bool, double>> rightBorders, out List<Tuple<bool, double>> bottomBorders)
Parameters
boundingBoxRectanglePhysicalbounding box to limit the region
leftBordersList<Tuple<bool, double>>left horizontal extrapolated borders
topBordersList<Tuple<bool, double>>top vertical extrapolated borders
rightBordersList<Tuple<bool, double>>right horizontal extrapolated borders
bottomBordersList<Tuple<bool, double>>bottom vertical extrapolated borders
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
GetInOutRelation(VectorD, ExtrapolationInfo)
Method which checks whether or not a point lies inside or outside the 2D region or on its boundary.
public override InsideOutside GetInOutRelation(VectorD point, ExtrapolationInfo extrapolation2use = null)
Parameters
pointVectorDThe point to be checked whether it lies inside.
extrapolation2useExtrapolationInfoExtrapolation info actually to be used.
Returns
- InsideOutside
Information where the point lies in relation to the region.
InOutRelation_boundingBoxBorder_extrapolated(VectorD, RectanglePhysical, List<Tuple<bool, double>>, List<Tuple<bool, double>>, List<Tuple<bool, double>>, List<Tuple<bool, double>>, ExtrapolationInfo)
If a simple polygon is used inside a composed region, we may need a special handling for points near a given bounding box. If there are edges of neighbored vertices exactly on a border of the bounding box, the border may effectively disappear in case of 'periodic' or 'border continuation' extrapolation. See ITN.064 for more information on the mode 'border continuation'.
public InsideOutside InOutRelation_boundingBoxBorder_extrapolated(VectorD point, RectanglePhysical boundingBox, List<Tuple<bool, double>> leftBorders, List<Tuple<bool, double>> topBorders, List<Tuple<bool, double>> rightBorders, List<Tuple<bool, double>> bottomBorders, ExtrapolationInfo extrapolation2use)
Parameters
pointVectorDPoint to get the InOut-relation for.
boundingBoxRectanglePhysicalBounding box of the parenting composed region.
leftBordersList<Tuple<bool, double>>Help list of extrapolated horizontal borders left of the bounding box. The list has to be created in a previous preprocessing.
topBordersList<Tuple<bool, double>>Help list of extrapolated vertical borders above the top of the bounding box. The list has to be created in a previous preprocessing.
rightBordersList<Tuple<bool, double>>Help list of extrapolated horizontal borders right of the bounding box. The list has to be created in a previous preprocessing.
bottomBordersList<Tuple<bool, double>>Help list of extrapolated vertical borders right of the bounding box. The list has to be created in a previous preprocessing.
extrapolation2useExtrapolationInfoExtrapolation info actually to be used.
Returns
- InsideOutside
The InOut-relation for the given point.
IsInsideTriangle(VectorD, VectorD, VectorD, VectorD, bool)
Fast method for checking whether a point lies inside a given triangle. Important: No check for collinearity is done (for performance reasons).
public static InsideOutside IsInsideTriangle(VectorD point, VectorD vertex1, VectorD vertex2, VectorD vertex3, bool useNumericalChecks = true)
Parameters
pointVectorDPoint to check.
vertex1VectorDFirst triangle vertex.
vertex2VectorDSecond triangle vertex.
vertex3VectorDThird triangle vertex.
useNumericalChecksboolIf
true, NumericalChecks comparison is used in order to tolerate numerical errors.
Returns
- InsideOutside
InsideOutside state for the point.
IsSelfIntersecting(VectorD[], out double)
Method which checks whether or not a polygon (for the given order of the vertices!) is self intersecting.
public static bool IsSelfIntersecting(VectorD[] vertices, out double areaWithSign)
Parameters
verticesVectorD[]Vertices of the polygon to be checked. The order is important.
areaWithSigndoubleThe area of the polygon. It is signed because the sign informs about the orientation of the polygon.
Returns
- bool
trueif the polygon is self intersecting.
MayBeNonzeroOutside(out bool, out bool, out bool, out bool)
Method which determines whether or not non zero values (i.e. 'inside' states) may appear outside the polygon in case of 'border continuation' extrapolation.
public override void MayBeNonzeroOutside(out bool maybeNonZeroLeft, out bool maybeNonZeroRight, out bool maybeNonZeroBottom, out bool maybeNonZeroTop)
Parameters
maybeNonZeroLeftboolAre inside states possible at the left?
maybeNonZeroRightboolAre inside states possible at the right?
maybeNonZeroBottomboolAre inside states possible at the bottom?
maybeNonZeroTopboolAre inside states possible at the top?
RemoveVirtualVertices(SimplePolygon)
Method for creating a polygon without virtual vertices from an arbitrary polygon.
public static SimplePolygon RemoveVirtualVertices(SimplePolygon polygon)
Parameters
polygonSimplePolygonPolygon which may contain virtual vertices.
Returns
- SimplePolygon
A polygon without virtual vertices.
Rotate(double, VectorD)
Method for transforming a given polygon by rotating by an angle around a given rotation center.
public void Rotate(double angle, VectorD centerOfRotation)
Parameters
angledoubleThe angle to rotate the polygon with (given in radians).
centerOfRotationVectorDThe center to rotate the polygon around.
ScaleByFactors(VectorD, bool)
Scales the region by the given factor.
public override void ScaleByFactors(VectorD factors, bool keepCenter)
Parameters
factorsVectorDThe scaling factors for both x- and y-direction.
keepCenterboolWhether the center of the region remains unchanged (true) or is scaled by the same factors (false).
Shift(VectorD)
Shifts this region by the given vector.
public override void Shift(VectorD shift)
Parameters
shiftVectorDThe shift added to the current position of the region.
TransformVerticesToTargetBox(SimplePolygon, RectanglePhysical)
Static method for transforming the vertices a given polygon to fill the given target box.
public static PolygonVertexList TransformVerticesToTargetBox(SimplePolygon polygon, RectanglePhysical targetBoundingBox)
Parameters
polygonSimplePolygonPolygon to be transformed.
targetBoundingBoxRectanglePhysicalTarget position and size.
Returns
- PolygonVertexList
The transformed vertices.
UpdatePropertyOfCoordinates()
Method for handling update after change of the physical property of the coordinate
public override void UpdatePropertyOfCoordinates()
Events
PolygonChanged
Event for changed vertices.
public event EventHandler? PolygonChanged
Event Type
Operators
operator ==(SimplePolygon, SimplePolygon)
Equality operator.
public static bool operator ==(SimplePolygon o1, SimplePolygon o2)
Parameters
o1SimplePolygonThe first region.
o2SimplePolygonThe second region.
Returns
- bool
Whether the two regions are equal.
operator !=(SimplePolygon, SimplePolygon)
Inequality operator.
public static bool operator !=(SimplePolygon o1, SimplePolygon o2)
Parameters
o1SimplePolygonThe first region.
o2SimplePolygonThe second region.
Returns
- bool
Whether the two regions are unequal.