Table of Contents

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
ObjectBase
SerializableObjectBase
ManualSerialization
DocumentBase
SimplePolygon
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

useOnlyEffectiveVertices bool

If true, only effective vertices (instead of all defined vertices) will be used.

vertices VectorD[]

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

rectangle RectanglePhysical

Rectangle to be converted to a polygon.

boundaryIsInside bool

Flag 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

vertices PolygonVertexList

The vertices that define the polygon. The order is important.

boundaryIsInside bool

Flag which says whether or not the boundary is part of the inner region or not.

propertyOfCoordinatesX PhysicalProperty

Physical property of the x-coordinate.

propertyOfCoordinatesY PhysicalProperty

Physical property of the y-coordinate.

dontCheckConsistency bool

If true, no consistency check will be done. (Make sure that you know what you're doing!)

useOnlyEffectiveVertices bool

If 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

rectangle RectangularRegion

Rectangle to be converted to a polygon.

SimplePolygon(SimplePolygon)

Copy constructor of the simple polygon class.

public SimplePolygon(SimplePolygon polygon)

Parameters

polygon SimplePolygon

The 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

string

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

string

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

string

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

string

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

double

Properties

Area

Gets the area of the polygon.

public double Area { get; }

Property Value

double

CounterClockwise

Gets whether or not the polygon is defined counterclockwise. It is determined during preprocessing.

public bool CounterClockwise { get; }

Property Value

bool

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

polygon SimplePolygon

Polygon 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

point VectorD

Point to calculate the distance for.

nearestPointOnBorder VectorD

The point on the border which is the nearest one to the given point, having a distance which is part of the return triple.

ignoreVirtualVertices bool

If 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

point VectorD

Point 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

List<double>

A list of all internal angles. Negative values indicate concave vertices.

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

polygon1 SimplePolygon

First of the polygons to intersect.

polygon2 SimplePolygon

Second of the polygons to intersect.

ignoreVirtualVertices bool

If 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

startPositionOfHalfLine VectorD

The start position of the half line.

directionOfHalfLine VectorD

The direction of the half line.

linesName string

Name of the line to intersect with the polygon.

ignoreVirtualVertices bool

If 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[]

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

firstPointOnLine VectorD

One point lying on the line to be intersecting.

secondPointOnLineOrDirectionOfLine VectorD

Either a second point on the line or the direction of the line, depending on the flag directionGivenInsteadOfSecondPointOnLine.

directionGivenInsteadOfSecondPointOnLine bool

If true, the second VectorD is interpreted as line direction instead of a second point on the line.

linesName string

Name of the line to intersect with the polygon.

ignoreVirtualVertices bool

If true, only effective vertices are used. That will be sufficient for most geometrical cases. If it is about triangulation, all vertices are needed instead.

congruentEdges List<(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

startPositionOfSegment VectorD

The start position of the line segment.

endPositionOfSegment VectorD

The end position of the line segment.

linesName string

Name of the line to intersect with the polygon.

nameOfSegmentStart string

Name of the start point of the line segment to be intersected with the polygon.

nameOfSegmentEnd string

Name of the end point of the line segment to be intersected with the polygon.

ignoreVirtualVertices bool

If 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

polygon1 SimplePolygon

First of the polygons to unite.

polygon2 SimplePolygon

Second of the polygons to unite.

ignoreVirtualVertices bool

If true, only effective vertices are used. That will be sufficient for most geometrical cases. If it is about triangulation, all vertices are needed instead.

holes List<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. Null will 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

polygon SimplePolygon

SimplePolygon 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

polygonalPoints VectorD[]

Points of the polygonal chain to check.

monotone_inX bool

Out parameter which is true, if the polygon is monotone in x.

monotone_inY bool

Out parameter which is true, if the polygon is monotone in y.

boundingBox RectangleD

The bounding box of the polygon.

minX_vertexIndices List<int>

Out parameter which is a list of the indices of those vertices which have the minimum x-coordinate.

maxX_vertexIndices List<int>

Out parameter which is a list of the indices of those vertices which have the maximum x-coordinate.

minY_vertexIndices List<int>

Out parameter which is a list of the indices of those vertices which have the minimum y-coordinate.

maxY_vertexIndices List<int>

Out parameter which is a list of the indices of those vertices which have the maximum y-coordinate.

Returns

bool

True if 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

polygon SimplePolygon

Polygon 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

polygon2check SimplePolygon

Polygon 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

polygon2check SimplePolygon

Polygon 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

obj object
equalityIntent EqualityIntent

Defines what kind of equality you want to check when comparing two objects, for example all values or just physical equality.

Returns

bool

true if the specified object is equal to this instance; otherwise, false.

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

polygon SimplePolygon

Polygon to be extended.

pointIndicesOfPolygonVertices List<long>

List of indices which correspond to the list of points the polygon is the convex hull for.

singlePoint NamedPolygonVertex

Outlying point to be a new vertex of the polygon.

pointIndexOfSinglePoint long

Index of the single point in the point cloud.

newTrianglesForExtension List<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

boundingBox RectanglePhysical

bounding box to limit the region

leftBorders List<Tuple<bool, double>>

left horizontal extrapolated borders

topBorders List<Tuple<bool, double>>

top vertical extrapolated borders

rightBorders List<Tuple<bool, double>>

right horizontal extrapolated borders

bottomBorders List<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

point VectorD

The point to be checked whether it lies inside.

extrapolation2use ExtrapolationInfo

Extrapolation 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

point VectorD

Point to get the InOut-relation for.

boundingBox RectanglePhysical

Bounding box of the parenting composed region.

leftBorders List<Tuple<bool, double>>

Help list of extrapolated horizontal borders left of the bounding box. The list has to be created in a previous preprocessing.

topBorders List<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.

rightBorders List<Tuple<bool, double>>

Help list of extrapolated horizontal borders right of the bounding box. The list has to be created in a previous preprocessing.

bottomBorders List<Tuple<bool, double>>

Help list of extrapolated vertical borders right of the bounding box. The list has to be created in a previous preprocessing.

extrapolation2use ExtrapolationInfo

Extrapolation 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

point VectorD

Point to check.

vertex1 VectorD

First triangle vertex.

vertex2 VectorD

Second triangle vertex.

vertex3 VectorD

Third triangle vertex.

useNumericalChecks bool

If 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

vertices VectorD[]

Vertices of the polygon to be checked. The order is important.

areaWithSign double

The area of the polygon. It is signed because the sign informs about the orientation of the polygon.

Returns

bool

true if 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

maybeNonZeroLeft bool

Are inside states possible at the left?

maybeNonZeroRight bool

Are inside states possible at the right?

maybeNonZeroBottom bool

Are inside states possible at the bottom?

maybeNonZeroTop bool

Are 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

polygon SimplePolygon

Polygon 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

angle double

The angle to rotate the polygon with (given in radians).

centerOfRotation VectorD

The 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

factors VectorD

The scaling factors for both x- and y-direction.

keepCenter bool

Whether 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

shift VectorD

The 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

polygon SimplePolygon

Polygon to be transformed.

targetBoundingBox RectanglePhysical

Target 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

EventHandler

Operators

operator ==(SimplePolygon, SimplePolygon)

Equality operator.

public static bool operator ==(SimplePolygon o1, SimplePolygon o2)

Parameters

o1 SimplePolygon

The first region.

o2 SimplePolygon

The second region.

Returns

bool

Whether the two regions are equal.

operator !=(SimplePolygon, SimplePolygon)

Inequality operator.

public static bool operator !=(SimplePolygon o1, SimplePolygon o2)

Parameters

o1 SimplePolygon

The first region.

o2 SimplePolygon

The second region.

Returns

bool

Whether the two regions are unequal.