-
Notifications
You must be signed in to change notification settings - Fork 0
DiGi.Geometry.Planar
public static class ConvertInheritance System.Object → Convert
Converts a NetTopologySuite.Geometries.Coordinate to a Point2D.
public static DiGi.Geometry.Planar.Classes.Point2D ToDiGi(this Coordinate coordinate);coordinate NetTopologySuite.Geometries.Coordinate
The NetTopologySuite.Geometries.Coordinate instance to convert.
Point2D
A new Point2D object created from the coordinate values.
Converts a NetTopologySuite.Geometries.Geometry to an DiGi.Geometry.Planar.Interfaces.IGeometry2D.
public static DiGi.Geometry.Planar.Interfaces.IGeometry2D? ToDiGi(this Geometry? geometry);geometry NetTopologySuite.Geometries.Geometry
The NetTopologySuite.Geometries.Geometry instance to convert.
DiGi.Geometry.Planar.Interfaces.IGeometry2D
An DiGi.Geometry.Planar.Interfaces.IGeometry2D representation of the geometry, or null if the provided NetTopologySuite.Geometries.Geometry is null.
Converts the specified NetTopologySuite.Geometries.GeometryCollection to a GeometryCollection2D.
public static DiGi.Geometry.Planar.Classes.GeometryCollection2D? ToDiGi(this GeometryCollection? geometryCollection);geometryCollection NetTopologySuite.Geometries.GeometryCollection
The NetTopologySuite.Geometries.GeometryCollection instance to convert.
GeometryCollection2D
A GeometryCollection2D containing the converted elements, or null if the provided NetTopologySuite.Geometries.GeometryCollection is null.
Converts a NetTopologySuite.Geometries.LinearRing to a Polygon2D.
public static DiGi.Geometry.Planar.Classes.Polygon2D? ToDiGi(this LinearRing? linearRing);linearRing NetTopologySuite.Geometries.LinearRing
The NetTopologySuite.Geometries.LinearRing instance to convert.
Polygon2D
A Polygon2D instance if the conversion is successful; otherwise, null.
Converts a NetTopologySuite.Geometries.LineSegment instance to a Segment2D instance.
public static DiGi.Geometry.Planar.Classes.Segment2D? ToDiGi(this LineSegment? lineSegment);lineSegment NetTopologySuite.Geometries.LineSegment
The NetTopologySuite.Geometries.LineSegment instance to convert.
Segment2D
A Segment2D instance if the conversion is successful; otherwise, null.
Converts a NetTopologySuite.Geometries.LineString to a Polyline2D.
public static DiGi.Geometry.Planar.Classes.Polyline2D? ToDiGi(this LineString? linearString);linearString NetTopologySuite.Geometries.LineString
The NetTopologySuite.Geometries.LineString instance to convert.
Polyline2D
A Polyline2D instance if the conversion is successful and contains at least 3 points; otherwise, null.
Converts a NetTopologySuite.Geometries.Point to a Point2D.
public static DiGi.Geometry.Planar.Classes.Point2D ToDiGi(this Point point);point NetTopologySuite.Geometries.Point
The NetTopologySuite.Geometries.Point instance to convert.
Point2D
A new Point2D object created from the coordinates of the provided point.
Converts the specified NetTopologySuite.Geometries.Polygon to a PolygonalFace2D.
public static DiGi.Geometry.Planar.Classes.PolygonalFace2D? ToDiGi(this Polygon? polygon);polygon NetTopologySuite.Geometries.Polygon
The NetTopologySuite.Geometries.Polygon instance to convert.
PolygonalFace2D
A PolygonalFace2D representation of the polygon, or null if the NetTopologySuite.Geometries.Polygon is null, empty, or cannot be converted.
Converts a collection of NetTopologySuite.Geometries.Coordinate objects to a list of Point2D objects.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? ToDiGi(this System.Collections.Generic.IEnumerable<Coordinate>? coordinates);coordinates System.Collections.Generic.IEnumerable<NetTopologySuite.Geometries.Coordinate>
The IEnumerable<NetTopologySuite.Geometries.Coordinate> containing the coordinates to convert.
System.Collections.Generic.List<Point2D>
A List<Point2D> containing the converted points, or null if the input IEnumerable<NetTopologySuite.Geometries.Coordinate> is null.
Converts a System.Drawing.Point instance to a Point2D instance.
public static DiGi.Geometry.Planar.Classes.Point2D ToDiGi(this System.Drawing.Point point);point System.Drawing.Point
The System.Drawing.Point instance to convert.
Point2D
A new Point2D instance created from the provided System.Drawing.Point.
Converts a System.Drawing.PointF instance to a Point2D instance.
public static DiGi.Geometry.Planar.Classes.Point2D ToDiGi(this System.Drawing.PointF pointF);pointF System.Drawing.PointF
The System.Drawing.PointF instance to convert.
Point2D
A new Point2D instance created from the provided System.Drawing.PointF.
Converts a System.Drawing.Rectangle to a BoundingBox2D.
public static DiGi.Geometry.Planar.Classes.BoundingBox2D ToDiGi(this System.Drawing.Rectangle rectangle);rectangle System.Drawing.Rectangle
The System.Drawing.Rectangle instance to convert.
BoundingBox2D
A new BoundingBox2D created from the provided System.Drawing.Rectangle.
Converts a System.Drawing.RectangleF to a BoundingBox2D.
public static DiGi.Geometry.Planar.Classes.BoundingBox2D ToDiGi(this System.Drawing.RectangleF rectangleF);rectangleF System.Drawing.RectangleF
The System.Drawing.RectangleF instance to convert.
BoundingBox2D
A new BoundingBox2D instance created from the provided System.Drawing.RectangleF.
Converts a System.Drawing.Size object to a Vector2D.
public static DiGi.Geometry.Planar.Classes.Vector2D ToDiGi(this System.Drawing.Size size);size System.Drawing.Size
The System.Drawing.Size instance to convert.
Vector2D
A new Vector2D representing the dimensions of the provided System.Drawing.Size.
Converts a System.Drawing.SizeF instance to a Vector2D.
public static DiGi.Geometry.Planar.Classes.Vector2D ToDiGi(this System.Drawing.SizeF sizeF);sizeF System.Drawing.SizeF
The System.Drawing.SizeF instance to convert.
Vector2D
A new Vector2D created from the width and height of the System.Drawing.SizeF instance.
Converts a NetTopologySuite.Geometries.Geometry of any dimension to a flat list of DiGi.Geometry.Planar.Interfaces.IGeometry2D objects.
Nested NetTopologySuite.Geometries.GeometryCollection instances (including NetTopologySuite.Geometries.MultiPolygon, NetTopologySuite.Geometries.MultiLineString and NetTopologySuite.Geometries.MultiPoint) are flattened. Polygons convert to PolygonalFace2D, linear rings to Polygon2D, two-point line strings to Segment2D, longer line strings to Polyline2D and points to Point2D. Empty components are skipped.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Interfaces.IGeometry2D>? ToDiGi_Geometry2Ds(this Geometry? geometry);geometry NetTopologySuite.Geometries.Geometry
The NetTopologySuite.Geometries.Geometry instance to convert.
System.Collections.Generic.List<DiGi.Geometry.Planar.Interfaces.IGeometry2D>
A list of DiGi.Geometry.Planar.Interfaces.IGeometry2D objects (possibly empty), or null if the provided geometry is null.
Converts a NetTopologySuite.Geometries.Polygon to a list of Polygon2D.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Polygon2D>? ToDiGi_Polygon2Ds(this Polygon? polygon);polygon NetTopologySuite.Geometries.Polygon
The NetTopologySuite.Geometries.Polygon instance to convert.
System.Collections.Generic.List<Polygon2D>
A System.Collections.Generic.List<> containing the converted polygons, or null if the provided NetTopologySuite.Geometries.Polygon is null or has no exterior ring.
Converts a NetTopologySuite.Geometries.MultiPolygon instance to a System.Collections.Generic.List<> of PolygonalFace2D objects.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.PolygonalFace2D>? ToDiGi_PolygonalFace2Ds(this MultiPolygon? multiPolygon);multiPolygon NetTopologySuite.Geometries.MultiPolygon
The NetTopologySuite.Geometries.MultiPolygon instance to convert.
System.Collections.Generic.List<PolygonalFace2D>
A System.Collections.Generic.List<> containing the converted PolygonalFace2D objects, or null if the input is null or cannot be processed.
Converts the specified BoundingBox2D to a System.Drawing.RectangleF.
public static System.Nullable<System.Drawing.RectangleF> ToDrawing(this DiGi.Geometry.Planar.Classes.BoundingBox2D boundingBox2D);boundingBox2D BoundingBox2D
The BoundingBox2D instance to convert.
System.Nullable<System.Drawing.RectangleF>
A System.Drawing.RectangleF representing the bounding box, or null if the BoundingBox2D is null or its minimum point is null.
Converts a Point2D? to a PointF? for drawing purposes.
public static System.Nullable<System.Drawing.PointF> ToDrawing(this DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The Point2D instance to convert.
System.Nullable<System.Drawing.PointF>
A PointF? representation of the point, or null if the provided Point2D? is null.
Converts a Vector2D instance to a System.Drawing.SizeF object.
public static System.Nullable<System.Drawing.SizeF> ToDrawing(this DiGi.Geometry.Planar.Classes.Vector2D vector2D);vector2D Vector2D
The Vector2D instance to convert.
System.Nullable<System.Drawing.SizeF>
A System.Drawing.SizeF representation of the Vector2D, or null if the provided Vector2D is null.
Converts a Point2D to a System.Drawing.Point using the specified rounding method.
public static System.Nullable<System.Drawing.Point> ToDrawing_Point(this DiGi.Geometry.Planar.Classes.Point2D point2D, DiGi.Core.Enums.RoundingMethod roundingMethod=DiGi.Core.Enums.RoundingMethod.Nearest);point2D Point2D
The Point2D instance to convert.
roundingMethod DiGi.Core.Enums.RoundingMethod
The DiGi.Core.Enums.RoundingMethod used to round the coordinates. Defaults to DiGi.Core.Enums.RoundingMethod.Nearest.
System.Nullable<System.Drawing.Point>
A System.Drawing.Point object if the conversion is successful and the rounding method is not undefined; otherwise, null.
Converts a BoundingBox2D to a System.Drawing.Rectangle using the specified rounding method.
public static System.Nullable<System.Drawing.Rectangle> ToDrawing_Rectangle(this DiGi.Geometry.Planar.Classes.BoundingBox2D boundingBox2D, DiGi.Core.Enums.RoundingMethod roundingMethod=DiGi.Core.Enums.RoundingMethod.Nearest);boundingBox2D BoundingBox2D
The BoundingBox2D instance to convert.
roundingMethod DiGi.Core.Enums.RoundingMethod
The DiGi.Core.Enums.RoundingMethod used to round the coordinates. Defaults to DiGi.Core.Enums.RoundingMethod.Nearest.
System.Nullable<System.Drawing.Rectangle>
A System.Drawing.Rectangle if the conversion is successful; otherwise, null if the roundingMethod is DiGi.Core.Enums.RoundingMethod.Undefined or the internal conversion fails.
Converts a Vector2D to a System.Drawing.Size using the specified rounding method.
public static System.Nullable<System.Drawing.Size> ToDrawing_Size(this DiGi.Geometry.Planar.Classes.Vector2D vector2D, DiGi.Core.Enums.RoundingMethod roundingMethod=DiGi.Core.Enums.RoundingMethod.Nearest);vector2D Vector2D
The Vector2D instance to convert.
roundingMethod DiGi.Core.Enums.RoundingMethod
The DiGi.Core.Enums.RoundingMethod used to round the values. Defaults to DiGi.Core.Enums.RoundingMethod.Nearest.
System.Nullable<System.Drawing.Size>
A System.Drawing.Size object if the conversion is successful and the rounding method is not DiGi.Core.Enums.RoundingMethod.Undefined; otherwise, null.
Converts a Point2D instance to an NTS NetTopologySuite.Geometries.Coordinate.
public static Coordinate? ToNTS(this DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The Point2D instance to convert.
NetTopologySuite.Geometries.Coordinate
A NetTopologySuite.Geometries.Coordinate instance if the provided Point2D is not null; otherwise, null.
Converts a Point2D to an NTS NetTopologySuite.Geometries.Coordinate, rounding the coordinates using the specified tolerance.
public static Coordinate? ToNTS(this DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance);point2D Point2D
The Point2D instance to convert.
tolerance System.Double
The System.Double value used for rounding the X and Y coordinates.
NetTopologySuite.Geometries.Coordinate
A NetTopologySuite.Geometries.Coordinate object if the provided Point2D is not null; otherwise, returns null.
Converts the specified Polyline2D to an NTS NetTopologySuite.Geometries.LineString.
public static LineString? ToNTS(this DiGi.Geometry.Planar.Classes.Polyline2D? polyline2D);polyline2D Polyline2D
The Polyline2D instance to convert.
NetTopologySuite.Geometries.LineString
An NTS NetTopologySuite.Geometries.LineString if the conversion is successful; otherwise, null.
Converts the specified Segment2D to an NTS NetTopologySuite.Geometries.LineSegment.
public static LineSegment? ToNTS(this DiGi.Geometry.Planar.Classes.Segment2D? segment2D);segment2D Segment2D
The Segment2D instance to convert.
NetTopologySuite.Geometries.LineSegment
A NetTopologySuite.Geometries.LineSegment if the Segment2D and its start and end points are not null; otherwise, null.
Converts an DiGi.Geometry.Planar.Interfaces.IGeometry2D instance to a NetTopologySuite.Geometries.Geometry object.
public static Geometry? ToNTS(this DiGi.Geometry.Planar.Interfaces.IGeometry2D? sAMGeometry2D);sAMGeometry2D DiGi.Geometry.Planar.Interfaces.IGeometry2D
The DiGi.Geometry.Planar.Interfaces.IGeometry2D geometry to convert.
NetTopologySuite.Geometries.Geometry
A NetTopologySuite.Geometries.Geometry representation of the input geometry, or null if the provided DiGi.Geometry.Planar.Interfaces.IGeometry2D is null.
Converts an IPolygonal2D instance to a NetTopologySuite NetTopologySuite.Geometries.LinearRing.
public static LinearRing? ToNTS(this DiGi.Geometry.Planar.Interfaces.IPolygonal2D? polygonal2D);polygonal2D IPolygonal2D
The IPolygonal2D instance to convert.
NetTopologySuite.Geometries.LinearRing
A NetTopologySuite.Geometries.LinearRing if the conversion is successful; otherwise, null.
Converts an IPolygonalFace2D instance to a NetTopologySuite NetTopologySuite.Geometries.Polygon.
public static Polygon? ToNTS(this DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D? polygonalFace2D);polygonalFace2D IPolygonalFace2D
The IPolygonalFace2D instance to convert.
NetTopologySuite.Geometries.Polygon
A NetTopologySuite.Geometries.Polygon representing the polygonal face, or null if the provided IPolygonalFace2D is null or its external edge cannot be converted.
Converts a collection of Point2D objects to a list of Coordinate objects.
public static System.Collections.Generic.List<Coordinate>? ToNTS(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The IEnumerable<Point2D> containing the points to convert.
System.Collections.Generic.List<NetTopologySuite.Geometries.Coordinate>
A List<Coordinate> containing the converted coordinates, or null if the input collection is null.
Converts the points of a Segmentable2D to an array of NTS NetTopologySuite.Geometries.Coordinate objects without cloning the points.
public static Coordinate[]? ToNTS_Coordinates(this DiGi.Geometry.Planar.Classes.Segmentable2D? segmentable2D, bool close);segmentable2D Segmentable2D
The Segmentable2D instance to convert.
close System.Boolean
When true, the first coordinate is appended at the end to close the ring.
NetTopologySuite.Geometries.Coordinate[]
An array of NetTopologySuite.Geometries.Coordinate objects, or null if there are no points.
Converts the specified Segment2D to an NTS NetTopologySuite.Geometries.LineString.
public static LineString? ToNTS_LineString(this DiGi.Geometry.Planar.Classes.Segment2D? segment2D);segment2D Segment2D
The Segment2D instance to convert.
NetTopologySuite.Geometries.LineString
An NTS NetTopologySuite.Geometries.LineString if the conversion is successful; otherwise, null.
Converts the specified IPolygonal2D instance to a NetTopologySuite NetTopologySuite.Geometries.Polygon.
public static Polygon? ToNTS_Polygon(this DiGi.Geometry.Planar.Interfaces.IPolygonal2D? polygonal2D);polygonal2D IPolygonal2D
The IPolygonal2D instance to convert.
NetTopologySuite.Geometries.Polygon
A NetTopologySuite.Geometries.Polygon object if the provided IPolygonal2D is not null; otherwise, null.
Converts a Coordinate2D instance to a nullable System.Numerics.Vector2.
public static System.Nullable<System.Numerics.Vector2> ToNumerics(this DiGi.Geometry.Planar.Classes.Coordinate2D coordinate2D);coordinate2D Coordinate2D
The Coordinate2D instance to convert.
System.Nullable<System.Numerics.Vector2>
A System.Numerics.Vector2 containing the X and Y coordinates, or null if the coordinate2D is null.
public static class CreateInheritance System.Object → Create
Adds a point to a collection unless a point within the squared tolerance already exists.
private static bool AddUniqueByDistance(System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D> point2Ds, DiGi.Geometry.Planar.Classes.Point2D point2D, double tolerance_Squared);point2Ds System.Collections.Generic.List<Point2D>
The accumulated points.
point2D Point2D
The candidate point.
tolerance_Squared System.Double
The squared distance tolerance used to detect duplicates.
System.Boolean
True if the point was added; otherwise, false.
Creates an adjacency graph from a collection of segmentable geometries.
public static AdjacencyGraph<DiGi.Geometry.Planar.Classes.Point2D,Edge<DiGi.Geometry.Planar.Classes.Point2D>>? AdjacencyGraph(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.ISegmentable2D>? segmentable2Ds, double tolerance=1E-06);segmentable2Ds System.Collections.Generic.IEnumerable<ISegmentable2D>
The collection of segmentable geometries.
tolerance System.Double
The distance tolerance used for rounding points.
QuikGraph.AdjacencyGraph
An adjacency graph representing the connectivity; otherwise, null if input is null.
Create.BooleanOperationResult2D(this BooleanOpertaionType, IPolygonalFace2D, IPolygonalFace2D) Method
Calculates the 2D boolean operation result between two polygonal faces based on the specified operation type.
public static DiGi.Geometry.Planar.Classes.BooleanOperationResult2D? BooleanOperationResult2D(this DiGi.Geometry.Core.Enums.BooleanOpertaionType booleanOpertaionType, DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D? polygonalFace2D_1, DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D? polygonalFace2D_2);booleanOpertaionType BooleanOpertaionType
The type of the boolean operation.
polygonalFace2D_1 IPolygonalFace2D
The first polygonal face.
polygonalFace2D_2 IPolygonalFace2D
The second polygonal face.
BooleanOperationResult2D
A BooleanOperationResult2D containing the result of the operation, or null if the operation type is not supported.
Creates a bounding box with specified width and height, centered at the given point.
public static DiGi.Geometry.Planar.Classes.BoundingBox2D? BoundingBox2D(this DiGi.Geometry.Planar.Classes.Point2D? center, double width, double height);center Point2D
The center point of the bounding box.
width System.Double
The width of the bounding box.
height System.Double
The height of the bounding box.
BoundingBox2D
A new BoundingBox2D; otherwise, null if any input is invalid.
Creates a bounding box with specified width and height, using the point as a corner.
public static DiGi.Geometry.Planar.Classes.BoundingBox2D? BoundingBox2D(this DiGi.Geometry.Planar.Classes.Point2D? point2D, double width, double height, DiGi.Geometry.Core.Enums.Corner corner);point2D Point2D
The anchor point.
width System.Double
The width of the bounding box.
height System.Double
The height of the bounding box.
corner Corner
The corner that the specified point represents.
BoundingBox2D
A new BoundingBox2D; otherwise, null if any input is invalid.
Creates a bounding box that encompasses all provided boundable geometries.
public static DiGi.Geometry.Planar.Classes.BoundingBox2D? BoundingBox2D<T>(this System.Collections.Generic.IEnumerable<T>? boundable2Ds, double offset=0.0)
where T : DiGi.Geometry.Planar.Interfaces.IBoundable2D;T
A type that implements IBoundable2D.
boundable2Ds System.Collections.Generic.IEnumerable<T>
The collection of boundable geometries.
offset System.Double
An optional offset to apply to the resulting bounding box.
BoundingBox2D
A BoundingBox2D that encompasses all inputs; otherwise, null if input is null.
Creates a coordinate system based on an origin and a Y-axis vector.
public static DiGi.Geometry.Planar.Classes.CoordinateSystem2D? CoordinateSystem2D(this DiGi.Geometry.Planar.Classes.Point2D? origin, DiGi.Geometry.Planar.Classes.Vector2D? axisY);origin Point2D
The origin point of the coordinate system.
axisY Vector2D
The vector representing the Y-axis.
CoordinateSystem2D
A new CoordinateSystem2D; otherwise, null if any input is null.
Calculates the 2D boolean difference between two polygonal faces.
public static DiGi.Geometry.Planar.Classes.DifferenceResult2D? DifferenceResult2D(this DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D? polygonalFace2D_1, DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D? polygonalFace2D_2);polygonalFace2D_1 IPolygonalFace2D
The first polygonal face (from which to subtract).
polygonalFace2D_2 IPolygonalFace2D
The second polygonal face (to subtract).
DifferenceResult2D
A DifferenceResult2D containing the difference geometry, or null if polygonalFace2D_1 is null or the computation fails.
Invalid (self-intersecting) inputs are repaired before the overlay is computed.
If the first face is degenerate (zero area, collapsing under repair), the difference is lower-dimensional: the parts of the face boundary linework lying outside the second face are returned as Segment2D(this Line2D, IPolygonal2D, double)/Polyline2D/Point2D elements.
Simplifies a collection of geometries by merging similar ones and decomposing them into basic primitives (points, segments, polylines, polygons, etc.).
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Interfaces.IGeometry2D>? Geometry2Ds(System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.IGeometry2D>? geometry2Ds, double tolerance=1E-06);geometry2Ds System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.IGeometry2D>
The collection of geometries to simplify.
tolerance System.Double
The distance tolerance used for similarity and intersection checks.
System.Collections.Generic.List<DiGi.Geometry.Planar.Interfaces.IGeometry2D>
A simplified list of unique geometries; otherwise, null if input is null.
Computes the raw intersection geometry between a line and a segment without allocating an IntersectionResult2D or cloning redundantly.
private static DiGi.Geometry.Planar.Interfaces.IGeometry2D? IntersectionGeometry2D(DiGi.Geometry.Planar.Classes.Line2D line2D, DiGi.Geometry.Planar.Classes.Segment2D segment2D, double tolerance);line2D Line2D
The line (must be non-null).
segment2D Segment2D
The segment (must be non-null).
tolerance System.Double
The distance tolerance.
DiGi.Geometry.Planar.Interfaces.IGeometry2D
A freshly owned Segment2D(this Line2D, IPolygonal2D, double) when the segment lies on the line, a Point2D when they cross, or null when they do not intersect.
Computes the raw intersection geometry between two segments without allocating an IntersectionResult2D or cloning redundantly.
private static DiGi.Geometry.Planar.Interfaces.IGeometry2D? IntersectionGeometry2D(DiGi.Geometry.Planar.Classes.Segment2D segment2D_1, DiGi.Geometry.Planar.Classes.Segment2D segment2D_2, double tolerance, out bool handled);segment2D_1 Segment2D
The first segment (must be non-null).
segment2D_2 Segment2D
The second segment (must be non-null).
tolerance System.Double
The distance tolerance.
handled System.Boolean
Set to false only for the degenerate fall-through case where no intersection topology could be resolved; otherwise true.
DiGi.Geometry.Planar.Interfaces.IGeometry2D
A freshly owned Point2D or Segment2D(this Line2D, IPolygonal2D, double), or null when the segments do not intersect.
Calculates the intersection result of two lines.
public static DiGi.Geometry.Planar.Classes.IntersectionResult2D? IntersectionResult2D(this DiGi.Geometry.Planar.Classes.Line2D? line2D_1, DiGi.Geometry.Planar.Classes.Line2D? line2D_2, double tolerance=1E-06);line2D_1 Line2D
The first line.
line2D_2 Line2D
The second line.
tolerance System.Double
The distance tolerance.
IntersectionResult2D
An IntersectionResult2D containing the intersection geometry; otherwise, null if either input is null.
Calculates the intersection result of a line and a segment.
public static DiGi.Geometry.Planar.Classes.IntersectionResult2D? IntersectionResult2D(this DiGi.Geometry.Planar.Classes.Line2D? line2D, DiGi.Geometry.Planar.Classes.Segment2D? segment2D, double tolerance=1E-06);line2D Line2D
The line.
segment2D Segment2D
The segment.
tolerance System.Double
The distance tolerance.
IntersectionResult2D
An IntersectionResult2D containing the intersection geometry; otherwise, null if either input is null.
Calculates the intersection result of a line and a collection of segments.
public static DiGi.Geometry.Planar.Classes.IntersectionResult2D? IntersectionResult2D(this DiGi.Geometry.Planar.Classes.Line2D? line2D, System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Segment2D>? segment2Ds, double tolerance=1E-06);line2D Line2D
The line.
segment2Ds System.Collections.Generic.IEnumerable<Segment2D>
The collection of segments.
tolerance System.Double
The distance tolerance.
IntersectionResult2D
An IntersectionResult2D containing all unique intersection geometries; otherwise, null if either input is null.
Calculates the intersection result of two segments.
public static DiGi.Geometry.Planar.Classes.IntersectionResult2D? IntersectionResult2D(this DiGi.Geometry.Planar.Classes.Segment2D? segment2D_1, DiGi.Geometry.Planar.Classes.Segment2D? segment2D_2, double tolerance=1E-06);segment2D_1 Segment2D
The first segment.
segment2D_2 Segment2D
The second segment.
tolerance System.Double
The distance tolerance.
IntersectionResult2D
An IntersectionResult2D containing the intersection geometry; otherwise, null if either input is null.
Calculates the intersection result of a segment and a collection of segments.
public static DiGi.Geometry.Planar.Classes.IntersectionResult2D? IntersectionResult2D(this DiGi.Geometry.Planar.Classes.Segment2D? segment2D, System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Segment2D>? segment2Ds, double tolerance=1E-06);segment2D Segment2D
The segment to check.
segment2Ds System.Collections.Generic.IEnumerable<Segment2D>
The collection of segments to intersect with.
tolerance System.Double
The distance tolerance.
IntersectionResult2D
An IntersectionResult2D containing all unique intersection geometries; otherwise, null if either input is null.
Calculates the intersection result of a polygonal face and a linear geometry.
public static DiGi.Geometry.Planar.Classes.IntersectionResult2D? IntersectionResult2D(this DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D? polygonalFace2D, DiGi.Geometry.Planar.Interfaces.ILinear2D? linear2D, double tolerance=1E-06);polygonalFace2D IPolygonalFace2D
The polygonal face.
linear2D ILinear2D
The linear geometry.
tolerance System.Double
The distance tolerance.
IntersectionResult2D
An IntersectionResult2D containing the intersection geometry; otherwise, null if either input is null.
Calculates the intersection result of two polygonal faces.
public static DiGi.Geometry.Planar.Classes.IntersectionResult2D? IntersectionResult2D(this DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D? polygonalFace2D_1, DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D? polygonalFace2D_2);polygonalFace2D_1 IPolygonalFace2D
The first polygonal face.
polygonalFace2D_2 IPolygonalFace2D
The second polygonal face.
IntersectionResult2D
An IntersectionResult2D containing the intersection geometry; otherwise, null if either input is null or the computation fails.
Invalid (self-intersecting) inputs are repaired before the overlay is computed.
Boundary-only intersections are lower-dimensional: shared edges are returned as Segment2D(this Line2D, IPolygonal2D, double)/Polyline2D elements and touching vertices as Point2D elements.
Calculates the intersection result of a segmentable geometry and a line.
public static DiGi.Geometry.Planar.Classes.IntersectionResult2D? IntersectionResult2D(this DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D, DiGi.Geometry.Planar.Classes.Line2D? line2D, double tolerance=1E-06);segmentable2D ISegmentable2D
The segmentable geometry.
line2D Line2D
The line.
tolerance System.Double
The distance tolerance.
IntersectionResult2D
An IntersectionResult2D containing the intersection geometry; otherwise, null if either input is null.
Calculates the intersection result of two segmentable geometries.
public static DiGi.Geometry.Planar.Classes.IntersectionResult2D? IntersectionResult2D(this DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D_1, DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D_2, double tolerance=1E-06);segmentable2D_1 ISegmentable2D
The first segmentable geometry.
segmentable2D_2 ISegmentable2D
The second segmentable geometry.
tolerance System.Double
The distance tolerance.
IntersectionResult2D
An IntersectionResult2D containing the intersection geometry; otherwise, null if either input is null.
Calculates the intersection result of a segmentable geometry with itself or other segments within it.
public static DiGi.Geometry.Planar.Classes.IntersectionResult2D? IntersectionResult2D(this DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D, double tolerance=1E-06);segmentable2D ISegmentable2D
The segmentable geometry.
tolerance System.Double
The distance tolerance.
IntersectionResult2D
An IntersectionResult2D containing the self-intersection geometries; otherwise, null if input is null.
Calculates the intersection result of a segmentable geometry with itself or other segments within it, up to a maximum number of intersections.
public static DiGi.Geometry.Planar.Classes.IntersectionResult2D? IntersectionResult2D(this DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D, int maxCount, double tolerance=1E-06);segmentable2D ISegmentable2D
The segmentable geometry.
maxCount System.Int32
The maximum number of intersections to find.
tolerance System.Double
The distance tolerance.
IntersectionResult2D
An IntersectionResult2D containing the self-intersection geometries; otherwise, null if input is null.
Calculates the intersection result between two collections of segments.
public static DiGi.Geometry.Planar.Classes.IntersectionResult2D? IntersectionResult2D(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Segment2D>? segment2Ds_1, System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Segment2D>? segment2Ds_2, double tolerance=1E-06);segment2Ds_1 System.Collections.Generic.IEnumerable<Segment2D>
The first collection of segments.
segment2Ds_2 System.Collections.Generic.IEnumerable<Segment2D>
The second collection of segments.
tolerance System.Double
The distance tolerance.
IntersectionResult2D
An IntersectionResult2D containing all unique intersection geometries; otherwise, null if either input is null.
Creates a line with the specified origin and angle.
public static DiGi.Geometry.Planar.Classes.Line2D? Line2D(this DiGi.Geometry.Planar.Classes.Point2D? origin, double angle);origin Point2D
The origin point of the line.
angle System.Double
The angle of the line in radians.
Line2D
A new Line2D; otherwise, null if origin is null or angle is invalid.
Creates a linear equation from a line.
public static DiGi.Math.Classes.LinearEquation? LinearEquation(this DiGi.Geometry.Planar.Classes.Line2D? line2D);line2D Line2D
The line.
DiGi.Math.Classes.LinearEquation
A LinearEquation; otherwise, null if the line is null or has no origin.
Creates a linear equation from two points.
public static DiGi.Math.Classes.LinearEquation? LinearEquation(this DiGi.Geometry.Planar.Classes.Point2D? point2D_1, DiGi.Geometry.Planar.Classes.Point2D? point2D_2);point2D_1 Point2D
The first point.
point2D_2 Point2D
The second point.
DiGi.Math.Classes.LinearEquation
A LinearEquation; otherwise, null if points are identical or either is null.
Creates a linear equation from a segment.
public static DiGi.Math.Classes.LinearEquation? LinearEquation(this DiGi.Geometry.Planar.Classes.Segment2D? segment2D);segment2D Segment2D
The segment.
DiGi.Math.Classes.LinearEquation
A LinearEquation; otherwise, null if the segment is null or has missing endpoints.
Converts an IPolygonalFace2D to a Mesh2D.
public static DiGi.Geometry.Planar.Classes.Mesh2D? Mesh2D(this DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D? polygonalFace2D, double tolerance=1E-06);polygonalFace2D IPolygonalFace2D
The IPolygonalFace2D instance to convert.
tolerance System.Double
The System.Double tolerance value used for the conversion.
Mesh2D
A Mesh2D object if the conversion is successful; otherwise, null.
Creates a Mesh2D from a collection of Triangle2D objects.
public static DiGi.Geometry.Planar.Classes.Mesh2D? Mesh2D(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Triangle2D>? triangle2Ds, double tolerance=1E-06);triangle2Ds System.Collections.Generic.IEnumerable<Triangle2D>
The System.Collections.Generic.IEnumerable<> of Triangle2D objects to be converted into a mesh.
tolerance System.Double
A System.Double value representing the minimum area threshold; triangles with an area smaller than this value are ignored.
Mesh2D
A Mesh2D object if valid triangles are provided; otherwise, null.
Generates a list of random points within the specified coordinate range.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? Point2Ds(double x_min, double y_min, double x_max, double y_max, int count);x_min System.Double
The minimum X coordinate.
y_min System.Double
The minimum Y coordinate.
x_max System.Double
The maximum X coordinate.
y_max System.Double
The maximum Y coordinate.
count System.Int32
The number of points to generate; -1 returns null.
System.Collections.Generic.List<Point2D>
A list of random Point2D objects, or null if count is -1.
Creates a list of points from an array of coordinates.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? Point2Ds(params double[]? values);values System.Double[]
An array of X and Y coordinates (must have an even length).
System.Collections.Generic.List<Point2D>
A list of Point2D objects, or null if the input is null or has an invalid length.
Generates the nodes of a grid anchored at origin that fall within the specified bounding box.
Unlike Point2Ds(this BoundingBox2D, double, double, double), which starts at the minimum corner of the box, this places every node at origin plus a whole number of steps. Boxes that are not aligned to each other therefore still yield nodes of one shared lattice, which is what lets separately generated areas be joined without a seam and lets the same area be regenerated without shifting.
An origin of (0, 0) with a whole-number grid size puts every coordinate at a whole multiple of that size, which is exact in binary floating point over any coordinate range in practical use - two areas generated separately produce identical values for a shared node rather than merely close ones.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? Point2Ds(this DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, DiGi.Geometry.Planar.Classes.Point2D? origin, double gridSize_X, double gridSize_Y, double tolerance=1E-06);boundingBox2D BoundingBox2D
The bounding box the nodes have to fall within.
origin Point2D
The point the lattice is anchored at. Null falls back to anchoring at the minimum corner of the bounding box.
gridSize_X System.Double
The grid spacing along the X axis; has to be greater than zero.
gridSize_Y System.Double
The grid spacing along the Y axis; has to be greater than zero.
tolerance System.Double
The distance tolerance used when deciding whether a node lying on the boundary of the bounding box still falls within it.
System.Collections.Generic.List<Point2D>
A list of Point2D objects ordered column by column, empty when the bounding box holds no node of the lattice, or null if the parameters are invalid or the grid does not fit in a single list.
Generates a regular grid of points covering the specified bounding box.
The first point sits on the minimum corner of the bounding box and the grid steps by gridSize_X and gridSize_Y towards the maximum corner. A row or column landing on the maximum corner within tolerance is still included, so a bounding box whose extents are exact multiples of the grid size yields points on both corners.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? Point2Ds(this DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, double gridSize_X, double gridSize_Y, double tolerance=1E-06);boundingBox2D BoundingBox2D
The bounding box defining the area.
gridSize_X System.Double
The grid spacing along the X axis; has to be greater than zero.
gridSize_Y System.Double
The grid spacing along the Y axis; has to be greater than zero.
tolerance System.Double
The distance tolerance used when deciding whether the last row or column still fits within the bounding box.
System.Collections.Generic.List<Point2D>
A list of Point2D objects ordered column by column, or null if the parameters are invalid or the grid does not fit in a single list.
Generates a list of random points within the specified bounding box.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? Point2Ds(this DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, int count);boundingBox2D BoundingBox2D
The bounding box defining the area.
count System.Int32
The number of points to generate; -1 returns null.
System.Collections.Generic.List<Point2D>
A list of random Point2D objects, or null if parameters are invalid.
Creates a Polygon2D from another polygonal geometry, dropping any point which repeats the one before it.
public static DiGi.Geometry.Planar.Classes.Polygon2D? Polygon2D(this DiGi.Geometry.Planar.Interfaces.IPolygonal2D? polygonal2D, double tolerance=1E-06);polygonal2D IPolygonal2D
The IPolygonal2D whose points define the polygon.
tolerance System.Double
The System.Double distance within which two points are treated as one.
Polygon2D
A Polygon2D object if a valid polygon can be created; otherwise, null.
Creates a Polygon2D from a collection of Point2D objects, dropping any point which repeats the one before it.
Use this rather than the constructor whenever the points come from outside the library - a file, a service, a user - and are not already known to form an open ring. A polygon holds its ring open, because GetSegments() adds the closing segment itself, so a ring which repeats its first point as its last would otherwise carry a segment of no length. Such a segment has no direction, makes the ring report as self intersecting, and pushes a triangle onto the four point branch of triangulation where it produces a second, degenerate triangle.
The constructor stays a plain assignment and does none of this, so a caller who already holds clean points pays nothing.
public static DiGi.Geometry.Planar.Classes.Polygon2D? Polygon2D(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D?>? point2Ds, double tolerance=1E-06);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The System.Collections.Generic.IEnumerable<> of Point2D objects used to define the polygon.
tolerance System.Double
The System.Double distance within which two points are treated as one.
Polygon2D
A Polygon2D object if a valid polygon can be created; otherwise, null.
Creates a list of polygons from a segmentable geometry.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Polygon2D>? Polygon2Ds(this DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D, double tolerance=1E-06);segmentable2D ISegmentable2D
The segmentable geometry.
tolerance System.Double
The distance tolerance for identifying loops.
System.Collections.Generic.List<Polygon2D>
A list of Polygon2D objects; otherwise, null if input is null.
Creates a list of polygons from a collection of segments.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Polygon2D>? Polygon2Ds(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Segment2D>? segment2Ds, double tolerance=1E-06);segment2Ds System.Collections.Generic.IEnumerable<Segment2D>
The collection of segments.
tolerance System.Double
The distance tolerance for connecting segments into loops.
System.Collections.Generic.List<Polygon2D>
A list of Polygon2D objects; otherwise, null if inputs are invalid or no polygons can be formed.
Simplifies or recreates the IPolygonal2D instance using a specified distance tolerance.
public static DiGi.Geometry.Planar.Interfaces.IPolygonal2D? Polygonal2D(this DiGi.Geometry.Planar.Interfaces.IPolygonal2D? polygonal2D, double tolerance=1E-06);polygonal2D IPolygonal2D
The IPolygonal2D instance to be processed.
tolerance System.Double
A System.Double value specifying the distance tolerance.
IPolygonal2D
An IPolygonal2D instance if the input is not null; otherwise, null.
Creates an IPolygonal2D instance from a collection of Point2D points.
public static DiGi.Geometry.Planar.Interfaces.IPolygonal2D? Polygonal2D(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds, double tolerance=1E-06);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The System.Collections.Generic.IEnumerable<> of Point2D objects used to define the polygon.
tolerance System.Double
The System.Double tolerance value used for distance calculations.
IPolygonal2D
An IPolygonal2D instance if the collection is not null and contains at least three points; otherwise, null.
Creates a PolygonalFace2D from the specified array of Point2D points.
public static DiGi.Geometry.Planar.Classes.PolygonalFace2D? PolygonalFace2D(params DiGi.Geometry.Planar.Classes.Point2D[]? points);An array of Point2D objects that define the vertices of the polygonal face.
PolygonalFace2D
A PolygonalFace2D instance if the provided Point2D array contains at least three points; otherwise, null.
Creates a PolygonalFace2D using the specified external boundary and optional internal boundaries.
public static DiGi.Geometry.Planar.Classes.PolygonalFace2D? PolygonalFace2D(this DiGi.Geometry.Planar.Interfaces.IPolygonal2D? externalEdge, System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.IPolygonal2D>? internalEdges=null, double tolerace=1E-06);externalEdge IPolygonal2D
The IPolygonal2D that defines the external boundary of the face.
internalEdges System.Collections.Generic.IEnumerable<IPolygonal2D>
An optional System.Collections.Generic.IEnumerable<> containing the internal boundaries (holes) of the face.
tolerace System.Double
The System.Double tolerance used to determine if an internal boundary is inside the external boundary.
PolygonalFace2D
A PolygonalFace2D instance if the externalEdge is not null; otherwise, null.
Creates a list of PolygonalFace2D objects from a collection of Segment2D(this Line2D, IPolygonal2D, double) segments.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.PolygonalFace2D>? PolygonalFace2Ds(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Segment2D>? segment2Ds, double tolerance=1E-06);segment2Ds System.Collections.Generic.IEnumerable<Segment2D>
The System.Collections.Generic.IEnumerable<> of Segment2D(this Line2D, IPolygonal2D, double) segments to process.
tolerance System.Double
The System.Double tolerance value used for distance calculations.
System.Collections.Generic.List<PolygonalFace2D>
A System.Collections.Generic.List<> of PolygonalFace2D objects if successful; otherwise, null.
Converts a collection of IPolygonal2D objects to a list of PolygonalFace2D objects.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.PolygonalFace2D>? PolygonalFace2Ds(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.IPolygonal2D>? polygonal2Ds, double tolerace=1E-06);polygonal2Ds System.Collections.Generic.IEnumerable<IPolygonal2D>
The System.Collections.Generic.IEnumerable<> of IPolygonal2D objects to convert.
tolerace System.Double
The System.Double distance tolerance used for the conversion.
System.Collections.Generic.List<PolygonalFace2D>
A System.Collections.Generic.List<> of PolygonalFace2D objects, or null if the input collection is null.
Extracts a list of polygons from an NTS MultiPolygon.
public static System.Collections.Generic.List<Polygon>? Polygons(this MultiPolygon? multiPolygon);multiPolygon NetTopologySuite.Geometries.MultiPolygon
The MultiPolygon to extract polygons from.
System.Collections.Generic.List<NetTopologySuite.Geometries.Polygon>
A list of NetTopologySuite Polygons; otherwise, null if input is null.
Creates a list of NTS polygons from a collection of segments.
public static System.Collections.Generic.List<Polygon>? Polygons(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Segment2D>? segment2Ds, double tolerance=1E-06);segment2Ds System.Collections.Generic.IEnumerable<Segment2D>
The collection of segments.
tolerance System.Double
The distance tolerance for connecting segments into loops.
System.Collections.Generic.List<NetTopologySuite.Geometries.Polygon>
A list of NetTopologySuite Polygons; otherwise, null if input is null.
Creates a list of NTS polygons from a collection of geometries by nodalizing and polygonizing them.
public static System.Collections.Generic.List<Polygon>? Polygons(this System.Collections.Generic.IEnumerable<Geometry>? geometries, double tolerance=1E-06);geometries System.Collections.Generic.IEnumerable<NetTopologySuite.Geometries.Geometry>
The collection of geometries (lines, rings, etc.).
tolerance System.Double
The precision tolerance used for nodalization.
System.Collections.Generic.List<NetTopologySuite.Geometries.Polygon>
A list of NetTopologySuite Polygons; otherwise, null if input is null.
Creates a list of polylines from a collection of segmentable geometries.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Polyline2D>? Polyline2Ds<T>(this System.Collections.Generic.IEnumerable<T>? segmentable2Ds, DiGi.Geometry.Planar.Classes.Point2D? point2D_Start=null, bool split=true, double tolerance=1E-06)
where T : DiGi.Geometry.Planar.Interfaces.ISegmentable2D;T
A type that implements ISegmentable2D.
segmentable2Ds System.Collections.Generic.IEnumerable<T>
The collection of segmentable geometries to convert into polylines.
point2D_Start Point2D
Optional starting point for the first polyline.
split System.Boolean
Whether to split segmentable geometries into basic segments before processing.
tolerance System.Double
The distance tolerance for connecting segments.
System.Collections.Generic.List<Polyline2D>
A list of Polyline2D objects; otherwise, null if the input is empty or invalid.
Fits a polynomial equation to the specified collection of Point2D points.
public static DiGi.Math.Classes.PolynomialEquation? PolynomialEquation(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds, int order=-1);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The System.Collections.Generic.IEnumerable<> of Point2D objects used for the fit.
order System.Int32
The System.Int32 order of the polynomial equation to be created.
DiGi.Math.Classes.PolynomialEquation
A PolynomialEquation(this IEnumerable<Point2D>, int) if the input collection is not null and contains at least two points; otherwise, null.
Creates the minimum area bounding rectangle that encompasses two existing rectangles.
public static DiGi.Geometry.Planar.Classes.Rectangle2D? Rectangle2D(this DiGi.Geometry.Planar.Classes.Rectangle2D? rectangle2D_1, DiGi.Geometry.Planar.Classes.Rectangle2D? rectangle2D_2, double tolerance=1E-06);rectangle2D_1 Rectangle2D
The first rectangle.
rectangle2D_2 Rectangle2D
The second rectangle.
tolerance System.Double
The distance tolerance.
Rectangle2D
A Rectangle2D that bounds both inputs; otherwise, null if either is null.
Creates the minimum area bounding rectangle for a polygonal face's external edge.
public static DiGi.Geometry.Planar.Classes.Rectangle2D? Rectangle2D(this DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D? polygonalFace2D, double tolerance=1E-06);polygonalFace2D IPolygonalFace2D
The polygonal face.
tolerance System.Double
The distance tolerance.
Rectangle2D
A Rectangle2D that bounds the outer boundary; otherwise, null if no external edge exists.
Creates the minimum area bounding rectangle for a single segmentable geometry.
public static DiGi.Geometry.Planar.Classes.Rectangle2D? Rectangle2D(this DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D, double tolerance=1E-06);segmentable2D ISegmentable2D
The segmentable geometry.
tolerance System.Double
The distance tolerance.
Rectangle2D
A Rectangle2D that bounds the geometry; otherwise, null if points cannot be extracted.
Creates a rectangle that bounds the given points along the specified direction.
public static DiGi.Geometry.Planar.Classes.Rectangle2D? Rectangle2D(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds, DiGi.Geometry.Planar.Classes.Vector2D? direction);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The collection of points to bound.
direction Vector2D
The primary orientation vector for the rectangle's height.
Rectangle2D
A Rectangle2D that bounds the points; otherwise, null if inputs are invalid.
Creates the minimum area bounding rectangle for a set of points.
public static DiGi.Geometry.Planar.Classes.Rectangle2D? Rectangle2D(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds, double tolerance=1E-06);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The collection of points.
tolerance System.Double
The distance tolerance for calculations.
Rectangle2D
The smallest Rectangle2D that contains all points; otherwise, null if too few points are provided.
Creates the minimum area bounding rectangle for a set of segmentable geometries.
public static DiGi.Geometry.Planar.Classes.Rectangle2D? Rectangle2D(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.ISegmentable2D>? segmentable2Ds, double tolerance=1E-06);segmentable2Ds System.Collections.Generic.IEnumerable<ISegmentable2D>
The collection of segmentable geometries.
tolerance System.Double
The distance tolerance.
Rectangle2D
A Rectangle2D that bounds all points in the geometries; otherwise, null if no points are found.
Creates a segment from the intersection of a line and a polygonal geometry.
public static DiGi.Geometry.Planar.Classes.Segment2D? Segment2D(this DiGi.Geometry.Planar.Classes.Line2D? line2D, DiGi.Geometry.Planar.Interfaces.IPolygonal2D? polygonal2D, double tolerance=1E-06);line2D Line2D
The line to intersect.
polygonal2D IPolygonal2D
The polygonal geometry to intersect with.
tolerance System.Double
The distance tolerance for intersection detection.
Segment2D
A Segment2D resulting from the intersection; otherwise, null.
Converts a collection of Point2D objects into a list of Segment2D(this Line2D, IPolygonal2D, double) objects.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Segment2D>? Segment2Ds(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds, bool closed=false);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The System.Collections.Generic.IEnumerable<> of Point2D points to process.
closed System.Boolean
A System.Boolean value indicating whether the sequence should be closed by connecting the last point back to the first point.
System.Collections.Generic.List<Segment2D>
A System.Collections.Generic.List<> of Segment2D(this Line2D, IPolygonal2D, double) objects, or null if the provided System.Collections.Generic.IEnumerable<> is null.
Performs a segmentable trace operation and returns the first result found.
public static DiGi.Geometry.Planar.Classes.SegmentableTraceResult2D? SegmentableTraceResult2D(this DiGi.Geometry.Planar.Classes.Point2D? point2D, DiGi.Geometry.Planar.Classes.Vector2D? vector2D, System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Segment2D>? segment2Ds, double tolerance=1E-06);point2D Point2D
The starting Point2D for the trace.
vector2D Vector2D
The direction Vector2D of the trace.
segment2Ds System.Collections.Generic.IEnumerable<Segment2D>
An System.Collections.Generic.IEnumerable<> containing the segments to be traced.
tolerance System.Double
A System.Double representing the distance tolerance for the operation.
SegmentableTraceResult2D
The first SegmentableTraceResult2D found, or null if no result exists.
Traces a ray from a point in a given direction through a collection of segmentable 2D objects and returns the first intersection result.
public static DiGi.Geometry.Planar.Classes.SegmentableTraceResult2D? SegmentableTraceResult2D(this DiGi.Geometry.Planar.Classes.Point2D? point2D, DiGi.Geometry.Planar.Classes.Vector2D? vector2D, System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.ISegmentable2D>? segmentable2Ds, double tolerance=1E-06);point2D Point2D
The starting Point2D for the trace operation.
vector2D Vector2D
The Vector2D representing the direction of the trace.
segmentable2Ds System.Collections.Generic.IEnumerable<ISegmentable2D>
An System.Collections.Generic.IEnumerable<> containing the objects to be traced.
tolerance System.Double
A System.Double value specifying the distance tolerance for the operation.
SegmentableTraceResult2D
The first SegmentableTraceResult2D found, or null if no intersection occurs within the specified tolerance.
Create.SegmentableTraceResult2Ds(this Point2D, Vector2D, IEnumerable<Segment2D>, int, double) Method
Traces a path from a starting point in a specified direction through a collection of 2D segments, accounting for bounces and distance tolerance.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.SegmentableTraceResult2D>? SegmentableTraceResult2Ds(this DiGi.Geometry.Planar.Classes.Point2D? point2D, DiGi.Geometry.Planar.Classes.Vector2D? vector2D, System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Segment2D>? segment2Ds, int bounces=0, double tolerance=1E-06);point2D Point2D
The starting Point2D for the trace operation.
vector2D Vector2D
The Vector2D representing the direction of the trace.
segment2Ds System.Collections.Generic.IEnumerable<Segment2D>
An System.Collections.Generic.IEnumerable<> containing the segments to be traced against.
bounces System.Int32
The System.Int32 number of times the trace may bounce off segments.
tolerance System.Double
The System.Double value representing the distance tolerance for intersection calculations.
System.Collections.Generic.List<SegmentableTraceResult2D>
A System.Collections.Generic.List<> containing the results of the trace, or null if any of the required inputs are null.
Create.SegmentableTraceResult2Ds(this Point2D, Vector2D, IEnumerable<ISegmentable2D>, int, double) Method
Traces a ray from the specified Point2D in the direction of the provided Vector2D through a collection of ISegmentable2D objects.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.SegmentableTraceResult2D>? SegmentableTraceResult2Ds(this DiGi.Geometry.Planar.Classes.Point2D? point2D, DiGi.Geometry.Planar.Classes.Vector2D? vector2D, System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.ISegmentable2D>? segmentable2Ds, int bounces=0, double tolerance=1E-06);point2D Point2D
The starting Point2D for the trace.
vector2D Vector2D
The direction Vector2D of the trace.
segmentable2Ds System.Collections.Generic.IEnumerable<ISegmentable2D>
An System.Collections.Generic.IEnumerable<> containing the objects to be traced against.
bounces System.Int32
The number of times the trace should bounce off surfaces as an System.Int32.
tolerance System.Double
The distance tolerance used for intersection calculations as a System.Double.
System.Collections.Generic.List<SegmentableTraceResult2D>
A System.Collections.Generic.List<> containing the results of the trace, or null if any required input is null.
Creates an undirected graph from a collection of segmentable 2D objects using a specified distance tolerance.
public static UndirectedGraph<DiGi.Geometry.Planar.Classes.Point2D,Edge<DiGi.Geometry.Planar.Classes.Point2D>>? UndirectedGraph(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.ISegmentable2D>? segmentable2Ds, double tolerance=1E-06);segmentable2Ds System.Collections.Generic.IEnumerable<ISegmentable2D>
The System.Collections.Generic.IEnumerable<> collection of objects to be converted into a graph.
tolerance System.Double
The System.Double distance tolerance used for point comparison.
QuikGraph.UndirectedGraph
An UndirectedGraph<Point2D, Edge<Point2D>> representing the network of points and edges, or null if the segmentable2Ds collection is null.
Calculates the 2D boolean union between two polygonal faces.
public static DiGi.Geometry.Planar.Classes.UnionResult2D? UnionResult2D(this DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D? polygonalFace2D_1, DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D? polygonalFace2D_2);polygonalFace2D_1 IPolygonalFace2D
The first polygonal face.
polygonalFace2D_2 IPolygonalFace2D
The second polygonal face.
UnionResult2D
A UnionResult2D containing the union geometry, or null if both inputs are null or the computation fails.
Invalid (self-intersecting) inputs are repaired before the overlay is computed. Disjoint inputs produce a result containing both faces.
Calculates a unit vector based on the specified alignment.
public static DiGi.Geometry.Planar.Classes.Vector2D? Vector2D(DiGi.Geometry.Core.Enums.Alignment alignment);alignment Alignment
The desired alignment.
Vector2D
A unit Vector2D corresponding to the alignment; otherwise, null.
Calculates unit vector for given angle [rad]
public static DiGi.Geometry.Planar.Classes.Vector2D? Vector2D(double angle);angle System.Double
angle to X axis counted counterclockwise [rad]
Vector2D
Unit Vector2D
Calculates a vector for a given angle and length.
public static DiGi.Geometry.Planar.Classes.Vector2D? Vector2D(double angle, double length);angle System.Double
The angle to the X axis counted counterclockwise [rad].
length System.Double
The length of the vector.
Vector2D
A Vector2D with specified angle and length; otherwise, null.
Accumulates unique intersection points and segments, deduplicating within a distance tolerance. Points use a linear scan while few, then transparently switch to a uniform spatial-hash grid (cell size equal to the tolerance) so lookups stay near O(1) as the result set grows. First-seen ordering is preserved.
private sealed class Create.IntersectionAccumulatorInheritance System.Object → IntersectionAccumulator
Initializes a new accumulator using the supplied distance tolerance.
public IntersectionAccumulator(double tolerance);tolerance System.Double
The distance tolerance used for deduplication.
Adds a candidate intersection geometry unless a similar one is already present.
public bool Add(DiGi.Geometry.Planar.Interfaces.IGeometry2D? geometry2D);geometry2D DiGi.Geometry.Planar.Interfaces.IGeometry2D
The candidate intersection geometry.
System.Boolean
True if the geometry is a point or a segment (an intersection event); otherwise, false.
Builds the final result, adopting the accumulated geometries without cloning.
public DiGi.Geometry.Planar.Classes.IntersectionResult2D ToResult();IntersectionResult2D
An IntersectionResult2D that owns the accumulated geometries.
public static class Create.Transform2DInheritance System.Object → Transform2D
Create.Transform2D.CoordinateSystem2DToCoordinateSystem2D(CoordinateSystem2D, CoordinateSystem2D) Method
Creates a transformation that converts points from one coordinate system to another.
public static DiGi.Geometry.Planar.Classes.Transform2D? CoordinateSystem2DToCoordinateSystem2D(DiGi.Geometry.Planar.Classes.CoordinateSystem2D? coordinateSystem2D_From, DiGi.Geometry.Planar.Classes.CoordinateSystem2D? coordinateSystem2D_To);coordinateSystem2D_From CoordinateSystem2D
The source coordinate system.
coordinateSystem2D_To CoordinateSystem2D
The target coordinate system.
Transform2D
A transformation that maps the source system to the target system; otherwise, null.
Creates a 2D transformation that maps coordinates from the specified coordinate system back to the origin.
public static DiGi.Geometry.Planar.Classes.Transform2D? CoordinateSystem2DToOrigin(DiGi.Geometry.Planar.Classes.CoordinateSystem2D? coordinateSystem2D);coordinateSystem2D CoordinateSystem2D
The source coordinate system to convert into a transformation.
Transform2D
A Transform2D object representing the transformation, or null if the provided coordinate system or its origin is null.
Creates an identity 2D transformation that does not alter the coordinates of any point it is applied to.
public static DiGi.Geometry.Planar.Classes.Transform2D Identity();Transform2D
A Transform2D object representing the identity transformation.
Creates a 2D transformation that mirrors across the horizontal axis (X-axis) passing through the origin.
public static DiGi.Geometry.Planar.Classes.Transform2D MirrorX();Transform2D
A Transform2D object representing the mirroring transformation.
Creates a 2D transformation that mirrors across the horizontal axis (X-axis) passing through the specified point.
public static DiGi.Geometry.Planar.Interfaces.ITransform2D? MirrorX(DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The point that defines the position of the mirroring axis.
DiGi.Geometry.Planar.Interfaces.ITransform2D
An DiGi.Geometry.Planar.Interfaces.ITransform2D object representing the mirroring transformation, or null if the provided point is null.
Creates a 2D transformation that mirrors across the vertical axis (Y-axis) passing through the origin.
public static DiGi.Geometry.Planar.Classes.Transform2D MirrorY();Transform2D
A Transform2D object representing the mirroring transformation.
Creates a 2D transformation that mirrors across the vertical axis passing through the specified point.
public static DiGi.Geometry.Planar.Interfaces.ITransform2D? MirrorY(DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The point defining the mirror axis. If null, the method returns null.
DiGi.Geometry.Planar.Interfaces.ITransform2D
An DiGi.Geometry.Planar.Interfaces.ITransform2D object representing the mirroring transformation, or null if the provided point is null.
Creates a 2D transformation that maps the origin to the specified coordinate system.
public static DiGi.Geometry.Planar.Classes.Transform2D? OriginToCoordinateSystem2D(DiGi.Geometry.Planar.Classes.CoordinateSystem2D? coordinateSystem2D);coordinateSystem2D CoordinateSystem2D
The target coordinate system. If null, the method returns null.
Transform2D
A Transform2D object representing the transformation from the origin to the coordinate system, or null if the provided coordinate system is null.
Creates a 2D rotation transformation around a specified origin point by the given angle.
public static DiGi.Geometry.Planar.Classes.Transform2D? Rotation(DiGi.Geometry.Planar.Classes.Point2D? origin, double angle);origin Point2D
The center point of the rotation. If null, the method returns null.
angle System.Double
The angle of rotation. If NaN, the method returns null.
Transform2D
A Transform2D object representing the rotation transformation, or null if the origin is null or the angle is NaN.
Creates a 2D rotation transformation around the origin by the specified angle.
public static DiGi.Geometry.Planar.Classes.Transform2D Rotation(double angle);angle System.Double
The angle of rotation.
Transform2D
A Transform2D object representing the rotation transformation.
Creates a 2D transformation that scales coordinates uniformly by the specified factor.
public static DiGi.Geometry.Planar.Classes.Transform2D Scale(double factor);factor System.Double
The scale factor to apply to both the X and Y axes.
Transform2D
A Transform2D object representing the uniform scaling transformation.
Creates a 2D transformation that scales coordinates by the specified factors along the X and Y axes.
public static DiGi.Geometry.Planar.Classes.Transform2D Scale(double x, double y);The scale factor for the X-axis.
The scale factor for the Y-axis.
Transform2D
A Transform2D object representing the scaling transformation.
Creates a 2D transformation that translates coordinates by the specified vector.
public static DiGi.Geometry.Planar.Classes.Transform2D Translation(DiGi.Geometry.Planar.Classes.Vector2D vector2D);vector2D Vector2D
The translation vector containing the X and Y offsets.
Transform2D
A Transform2D object representing the translation transformation.
Creates a 2D transformation that translates coordinates by the specified x and y offsets.
public static DiGi.Geometry.Planar.Classes.Transform2D Translation(double x, double y);The translation distance along the X-axis.
The translation distance along the Y-axis.
Transform2D
A Transform2D object representing the translation transformation.
public static class ModifyInheritance System.Object → Modify
Adds a Point2D? to the List<Point2D?>? if it is not null and does not already exist within the specified tolerance.
public static bool Add(this System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D?>? point2Ds, DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2Ds System.Collections.Generic.List<Point2D>
The List<Point2D?>? to which the point will be added.
point2D Point2D
The Point2D? object to add to the list.
tolerance System.Double
The System.Double tolerance used to determine if a point is a duplicate.
System.Boolean
A System.Boolean value indicating whether the point was successfully added to the list.
Adds a new Point2D to the specified list of nullable Point2D objects using the provided x and y coordinates.
public static bool Add(this System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D?>? point2Ds, double x, double y);point2Ds System.Collections.Generic.List<Point2D>
The System.Collections.Generic.List<> of nullable Point2D objects to which the point will be added.
The double value for the X coordinate.
The double value for the Y coordinate.
System.Boolean
A boolean value indicating whether the point was successfully added; returns false if the list is null.
Connect given Point2D to Segment2Ds. If point2D is on the end of Segment2D then nothing happen. If point2D is on the Segment2D then segment will be split otherwise point2D will be connected to closest Segment2D by adding extra segment.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Segment2D>? Connect(this System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Segment2D>? segment2Ds, DiGi.Geometry.Planar.Classes.Point2D? point2D, DiGi.Geometry.Core.Enums.PointConnectMethod pointConnectMethod=DiGi.Geometry.Core.Enums.PointConnectMethod.Projection, double tolerance=1E-06);segment2Ds System.Collections.Generic.List<Segment2D>
Segment2Ds
point2D Point2D
Point2D to be connected
pointConnectMethod PointConnectMethod
Point Connect Method
tolerance System.Double
Tolerance
System.Collections.Generic.List<Segment2D>
List of the segments connected to given Point2D
Finds the first point in the List<Point2D?>? that lies within the specified tolerance of the given point, using the same cached spatial index as Add(this List<Point2D>, Point2D, double).
internal static DiGi.Geometry.Planar.Classes.Point2D? FindNear(this System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D?>? point2Ds, DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2Ds System.Collections.Generic.List<Point2D>
The List<Point2D?>? to search.
point2D Point2D
The Point2D? to search for.
tolerance System.Double
The System.Double tolerance used to determine a match.
Point2D
The matching Point2D from the list, or null if none is found.
Returns the cached spatial index for the given list, rebuilding it (one O(n) pass) if the list was mutated outside of Add(this List<Point2D>, Point2D, double)/FindNear(this List<Point2D>, Point2D, double) or the tolerance changed; otherwise the cached index is reused as-is.
private static DiGi.Geometry.Planar.Modify.PointIndex2D GetIndex(System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D?> point2Ds, double tolerance);point2Ds System.Collections.Generic.List<Point2D>
tolerance System.Double
Determines if the majority of point sets within the provided list exhibit the specified orientation.
public static bool Orient(System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds, DiGi.Geometry.Core.Enums.Orientation orientation);point2Ds System.Collections.Generic.List<Point2D>
The System.Collections.Generic.List<> containing points to analyze.
orientation Orientation
The target Orientation to check for.
System.Boolean
A System.Boolean value indicating whether the majority of orientations match the specified Orientation.
Orients the specified IPolygonal2D to a target Orientation.
public static bool Orient(this DiGi.Geometry.Planar.Interfaces.IPolygonal2D? polygonal2D, DiGi.Geometry.Core.Enums.Orientation orientation, bool convexHull=true);polygonal2D IPolygonal2D
The IPolygonal2D instance to orient.
orientation Orientation
The desired Orientation.
convexHull System.Boolean
A System.Boolean value indicating whether the convex hull should be used for orientation calculation.
System.Boolean
A System.Boolean value indicating whether the polygonal object was inverted to match the target orientation.
Removes every point which coincides with the point before it, so the geometry holds no zero length segment.
A repeated point contributes a segment of no length, which has no direction and no meaning - it makes a ring report as self intersecting, pushes a triangle onto the four point branch of triangulation, and produces an invalid ring once the geometry is handed to NetTopologySuite.
Set closed for a ring, where the last point is the predecessor of the first. That is what strips the repeated closing position a gml:LinearRing carries.
No floor is applied to how many points survive, so a ring which is nothing but repeats of one corner collapses to that single point. That is deliberate - the caller checks the count afterwards, and leaving a degenerate ring padded out to three points would let it pass a check for three corners while holding fewer.
public static bool RemoveDuplicates(this System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds, bool closed, double tolerance=1E-06);point2Ds System.Collections.Generic.List<Point2D>
The System.Collections.Generic.List<> to clean up in place.
closed System.Boolean
A System.Boolean value indicating whether the points form a closed ring, in which case the last point is compared against the first.
tolerance System.Double
The System.Double distance within which two points are treated as one.
System.Boolean
A System.Boolean value indicating whether any point was removed.
Caches a tolerance-bucketed spatial hash grid per System.Collections.Generic.List<> instance so repeated Add(this List<Point2D>, Point2D, double) / FindNear(this List<Point2D>, Point2D, double) calls on the same list avoid an O(n) linear scan.
private sealed class Modify.PointIndex2DInheritance System.Object → PointIndex2D
public static class QueryInheritance System.Object → Query
Determines whether the specified Point2D is above the curve of the DiGi.Math.Classes.PolynomialEquation, considering a given tolerance.
public static bool Above(this DiGi.Math.Classes.PolynomialEquation? polynomialEquation, DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=0.0);polynomialEquation DiGi.Math.Classes.PolynomialEquation
The DiGi.Math.Classes.PolynomialEquation to evaluate.
point2D Point2D
The Point2D to check against the equation.
tolerance System.Double
A System.Double value representing the tolerance for the comparison. Defaults to 0.
System.Boolean
A System.Boolean indicating whether the point is above the polynomial curve; returns false if either the DiGi.Math.Classes.PolynomialEquation or Point2D is null.
Retrieves the adjacent Segment2D objects between two ISegmentable2D instances within a specified tolerance.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Segment2D>? AdjacentSegments(this DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D_1, DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D_2, double tolerance=1E-06);segmentable2D_1 ISegmentable2D
The first ISegmentable2D instance.
segmentable2D_2 ISegmentable2D
The second ISegmentable2D instance.
tolerance System.Double
The System.Double distance tolerance used to determine if the bounding boxes are in range.
System.Collections.Generic.List<Segment2D>
A System.Collections.Generic.List<> containing the adjacent segments, or null if either input is null or no adjacency is found.
Identifies and returns a list of adjacent 2D segments from a collection of segmentable objects based on a specified distance tolerance.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Segment2D>? AdjacentSegments<T>(this System.Collections.Generic.IEnumerable<T?>? segmentable2Ds, double tolerance=1E-06)
where T : DiGi.Geometry.Planar.Interfaces.ISegmentable2D;T
The type of the segmentable objects, which must implement ISegmentable2D.
segmentable2Ds System.Collections.Generic.IEnumerable<T>
An System.Collections.Generic.IEnumerable<> containing the segmentable objects to evaluate for adjacency.
tolerance System.Double
A System.Double value representing the distance tolerance used to determine if segments are adjacent.
System.Collections.Generic.List<Segment2D>
A System.Collections.Generic.List<> of adjacent segments, or null if the input collection is null.
Determines whether two Point2D? points are approximately equal based on a specified distance tolerance.
public static bool AlmostEquals(this DiGi.Geometry.Planar.Classes.Point2D? point2D_1, DiGi.Geometry.Planar.Classes.Point2D? point2D_2, double tolerance=1E-06);point2D_1 Point2D
The first Point2D? point to compare.
point2D_2 Point2D
The second Point2D? point to compare.
tolerance System.Double
The System.Double tolerance value used to determine if the points are almost equal.
System.Boolean
A System.Boolean value indicating whether the two points are considered equal within the given tolerance.
Determines whether two ISegmentable2D instances are approximately equal based on a specified tolerance.
public static bool AlmostEquals(this DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D_1, DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D_2, double tolerance=1E-06);segmentable2D_1 ISegmentable2D
The first ISegmentable2D instance to compare.
segmentable2D_2 ISegmentable2D
The second ISegmentable2D instance to compare.
tolerance System.Double
A System.Double value specifying the tolerance for the equality check.
System.Boolean
A System.Boolean value indicating whether the two instances are almost equal.
Calculates the angle formed by three Point2D points, where the second point is the vertex of the angle.
public static double Angle(this DiGi.Geometry.Planar.Classes.Point2D point2D_Previous, DiGi.Geometry.Planar.Classes.Point2D point2D, DiGi.Geometry.Planar.Classes.Point2D point2D_Next);point2D_Previous Point2D
The first Point2D point.
point2D Point2D
The Point2D point that serves as the vertex of the angle.
point2D_Next Point2D
The third Point2D point.
System.Double
A System.Double representing the angle between the vectors, or System.Double.NaN if any of the Point2D parameters are null.
Calculates the area of a polygon defined by a collection of Point2D points.
public static double Area(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D> point2Ds);point2Ds System.Collections.Generic.IEnumerable<Point2D>
An System.Collections.Generic.IEnumerable<> of Point2D objects representing the vertices of the polygon.
System.Double
The calculated area as a System.Double. Returns System.Double.NaN if the System.Collections.Generic.IEnumerable<> is null or contains any null elements; returns 0 if there are fewer than three points.
Calculates the aspect ratio of the specified BoundingBox2D.
public static double AspectRatio(this DiGi.Geometry.Planar.Classes.BoundingBox2D boundingBox2D, bool normalized=true);boundingBox2D BoundingBox2D
The BoundingBox2D to calculate the aspect ratio for.
normalized System.Boolean
A System.Boolean value indicating whether the result should be normalized. Defaults to true.
System.Double
A System.Double representing the aspect ratio, or System.Double.NaN if the BoundingBox2D is null.
Calculates the aspect ratio of the specified Rectangle2D.
public static double AspectRatio(this DiGi.Geometry.Planar.Classes.Rectangle2D rectangle2D, bool normalized=true);rectangle2D Rectangle2D
The Rectangle2D instance to calculate the aspect ratio for.
normalized System.Boolean
A System.Boolean value indicating whether the result should be normalized. Defaults to true.
System.Double
A System.Double representing the aspect ratio, or System.Double.NaN if the rectangle2D is null.
Calculates the average position of a collection of Point2D objects.
public static DiGi.Geometry.Planar.Classes.Point2D? Average(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The System.Collections.Generic.IEnumerable<> of points to average.
Point2D
A Point2D representing the average coordinates, or null if the System.Collections.Generic.IEnumerable<> is null or empty.
Calculates the bounce vector of a given Vector2D against a Segment2D, accounting for friction and restitution.
public static DiGi.Geometry.Planar.Classes.Vector2D? Bounce(this DiGi.Geometry.Planar.Classes.Vector2D? vector2D_ToBeBounced, DiGi.Geometry.Planar.Classes.Segment2D? segment2D, double friction=1.0, double restitution=1.0);vector2D_ToBeBounced Vector2D
The Vector2D? representing the velocity or direction to be bounced.
segment2D Segment2D
The Segment2D representing the surface to bounce off of.
friction System.Double
A System.Double value representing the friction coefficient applied during the bounce.
restitution System.Double
A System.Double value representing the restitution coefficient applied during the bounce.
Vector2D
The resulting Vector2D? after the bounce calculation, or null if either the input vector or segment is null.
Calculates the reflection of a Vector2D against another Vector2D, applying friction and restitution coefficients.
public static DiGi.Geometry.Planar.Classes.Vector2D? Bounce(this DiGi.Geometry.Planar.Classes.Vector2D? vector2D_ToBeBounced, DiGi.Geometry.Planar.Classes.Vector2D? vector2D, double friction=1.0, double restitution=1.0);vector2D_ToBeBounced Vector2D
The Vector2D that is to be bounced.
vector2D Vector2D
The Vector2D representing the surface normal or reflection axis.
friction System.Double
A System.Double value representing the friction coefficient applied to the tangential component of the bounce.
restitution System.Double
A System.Double value representing the restitution coefficient applied to the normal component of the bounce.
Vector2D
The resulting bounced Vector2D, or null if either input vector is null.
Calculates the centroid of the specified IPolygonal2D.
public static DiGi.Geometry.Planar.Classes.Point2D? Centroid(this DiGi.Geometry.Planar.Interfaces.IPolygonal2D? polygonal2D);polygonal2D IPolygonal2D
The IPolygonal2D instance to calculate the centroid for.
Point2D
A Point2D representing the centroid, or null if the IPolygonal2D is null.
Calculates the centroid of the specified IPolygonalFace2D.
public static DiGi.Geometry.Planar.Classes.Point2D? Centroid(this DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D? polygonalFace2D);polygonalFace2D IPolygonalFace2D
The IPolygonalFace2D for which to calculate the centroid.
Point2D
A Point2D representing the centroid, or null if the IPolygonalFace2D is null or has no external edge.
Calculates the centroid of a collection of Point2D objects.
public static DiGi.Geometry.Planar.Classes.Point2D? Centroid(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The collection of Point2D objects to process.
Point2D
A Point2D representing the centroid, or null if the input collection is null or empty.
Calculates the closest point on a line or line segment defined by two points relative to a target point.
public static DiGi.Geometry.Planar.Classes.Point2D? ClosestPoint(this DiGi.Geometry.Planar.Classes.Point2D? point2D, DiGi.Geometry.Planar.Classes.Point2D? point2D_1, DiGi.Geometry.Planar.Classes.Point2D? point2D_2, bool bounded);point2D Point2D
The target Point2D? point.
point2D_1 Point2D
The first Point2D? point defining the line or segment.
point2D_2 Point2D
The second Point2D? point defining the line or segment.
bounded System.Boolean
A System.Boolean value indicating whether the result should be bounded to the line segment between the two points.
Point2D
The closest Point2D? point on the line or segment, or null if any of the input points are null.
Calculates the closest point on a line or line segment defined by two points relative to a target point.
public static DiGi.Geometry.Planar.Classes.Point2D? ClosestPoint(this DiGi.Geometry.Planar.Classes.Point2D? point2D, DiGi.Geometry.Planar.Classes.Point2D? point2D_1, DiGi.Geometry.Planar.Classes.Point2D? point2D_2, bool bounded_1, bool bounded_2);point2D Point2D
The Point2D? target point.
point2D_1 Point2D
The Point2D? first point defining the line or segment.
point2D_2 Point2D
The Point2D? second point defining the line or segment.
bounded_1 System.Boolean
A System.Boolean value indicating whether the result is bounded by the first point.
bounded_2 System.Boolean
A System.Boolean value indicating whether the result is bounded by the second point.
Point2D
The closest Point2D? on the line or segment, or null if any of the input points are null.
Calculates the closest point on an ISegmentable2D object to a given Point2D.
public static DiGi.Geometry.Planar.Classes.Point2D? ClosestPoint(this DiGi.Geometry.Planar.Classes.Point2D? point2D, DiGi.Geometry.Planar.Interfaces.ISegmentable2D segmentable2D);point2D Point2D
The Point2D for which the closest point is being sought.
segmentable2D ISegmentable2D
The ISegmentable2D object to find the closest point on.
Point2D
The closest Point2D found, or null if no point could be determined.
Calculates the closest point on an ISegmentable2D object to a given Point2D.
public static DiGi.Geometry.Planar.Classes.Point2D? ClosestPoint(this DiGi.Geometry.Planar.Classes.Point2D? point2D, DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D, out double distance);point2D Point2D
The Point2D from which the distance is measured.
segmentable2D ISegmentable2D
The ISegmentable2D object to find the closest point on.
distance System.Double
When this method returns, contains the distance between the input Point2D and the resulting closest Point2D.
Point2D
The closest Point2D found on the ISegmentable2D object, or null if no point could be determined.
Finds the closest Point2D in a collection of points to the specified Point2D.
public static DiGi.Geometry.Planar.Classes.Point2D? ClosestPoint(this DiGi.Geometry.Planar.Classes.Point2D? point2D, System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds);point2D Point2D
The source Point2D for which the closest point is sought.
point2Ds System.Collections.Generic.IEnumerable<Point2D>
An System.Collections.Generic.IEnumerable<> of Point2D objects to search through.
Point2D
The closest Point2D found in the collection, or null if no point is found.
Finds the closest Point2D in a collection of points relative to a specified source point.
public static DiGi.Geometry.Planar.Classes.Point2D? ClosestPoint(this DiGi.Geometry.Planar.Classes.Point2D? point2D, System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds, out double distance);point2D Point2D
The source Point2D used as the reference for distance calculations.
point2Ds System.Collections.Generic.IEnumerable<Point2D>
An System.Collections.Generic.IEnumerable<> of Point2D objects to search through.
distance System.Double
When this method returns, contains the minimum System.Double distance found; otherwise, System.Double.NaN.
Point2D
The closest Point2D from the collection, or null if no point is found or if either input parameter is null.
Finds the closest point on a collection of Segment2D objects to the specified Point2D.
public static DiGi.Geometry.Planar.Classes.Point2D? ClosestPoint(this DiGi.Geometry.Planar.Classes.Point2D? point2D, System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Segment2D>? segment2Ds);point2D Point2D
The Point2D for which the closest point is being sought.
segment2Ds System.Collections.Generic.IEnumerable<Segment2D>
An System.Collections.Generic.IEnumerable<> containing the segments to evaluate.
Point2D
The closest Point2D found on any of the provided segments, or null if the point is null, the collection is null, or the collection contains no elements.
Finds the closest point among a collection of line segments to a given point.
public static DiGi.Geometry.Planar.Classes.Point2D? ClosestPoint(this DiGi.Geometry.Planar.Classes.Point2D? point2D, System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Segment2D>? segment2Ds, out double distance);point2D Point2D
The source Point2D point.
segment2Ds System.Collections.Generic.IEnumerable<Segment2D>
An System.Collections.Generic.IEnumerable<> of Segment2D objects to search.
distance System.Double
When this method returns, contains the distance between the source Point2D and the closest point found; otherwise, System.Double.NaN.
Point2D
The closest Point2D found across all segments, or null if no valid point is found or inputs are null.
Finds the closest Point2D to the specified reference point from a collection of segmentable 2D objects.
public static DiGi.Geometry.Planar.Classes.Point2D? ClosestPoint<T>(this DiGi.Geometry.Planar.Classes.Point2D? point2D, System.Collections.Generic.IEnumerable<T>? segmentable2Ds)
where T : DiGi.Geometry.Planar.Interfaces.ISegmentable2D;T
A type that implements the ISegmentable2D interface.
point2D Point2D
The reference Point2D to calculate distance from.
segmentable2Ds System.Collections.Generic.IEnumerable<T>
An System.Collections.Generic.IEnumerable<> of objects that implement the ISegmentable2D interface.
Point2D
The closest Point2D found, or null if the reference point or the collection is null.
Finds the closest point to a given point from a collection of segmentable 2D objects.
public static DiGi.Geometry.Planar.Classes.Point2D? ClosestPoint<T>(this DiGi.Geometry.Planar.Classes.Point2D? point2D, System.Collections.Generic.IEnumerable<T>? segmentable2Ds, out double distance)
where T : DiGi.Geometry.Planar.Interfaces.ISegmentable2D;T
A type that implements ISegmentable2D.
point2D Point2D
The source Point2D to calculate the distance from.
segmentable2Ds System.Collections.Generic.IEnumerable<T>
An System.Collections.Generic.IEnumerable<> of objects implementing ISegmentable2D.
distance System.Double
When this method returns, contains the System.Double distance to the closest point found; otherwise, System.Double.NaN.
Point2D
The closest Point2D found, or null if no points are available or inputs are null.
Determines whether three Point2D points are collinear within a specified tolerance.
public static bool Collinear(this DiGi.Geometry.Planar.Classes.Point2D? point2D_1, DiGi.Geometry.Planar.Classes.Point2D? point2D_2, DiGi.Geometry.Planar.Classes.Point2D? point2D_3, double tolerance=1E-06);point2D_1 Point2D
The first Point2D point.
point2D_2 Point2D
The second Point2D point.
point2D_3 Point2D
The third Point2D point.
tolerance System.Double
The System.Double tolerance value used to determine collinearity.
System.Boolean
A System.Boolean value indicating whether the points are collinear; returns false if any of the provided points are null.
Determines whether two ILinear2D objects are collinear within a specified tolerance.
public static bool Collinear(this DiGi.Geometry.Planar.Interfaces.ILinear2D? linear2D_1, DiGi.Geometry.Planar.Interfaces.ILinear2D? linear2D_2, double tolerance=1E-06);linear2D_1 ILinear2D
The first ILinear2D object.
linear2D_2 ILinear2D
The second ILinear2D object.
tolerance System.Double
A System.Double value representing the tolerance for collinearity.
System.Boolean
A System.Boolean value indicating whether the two objects are collinear.
Determines whether a collection of points are collinear within a specified tolerance.
public static bool Collinear(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D?>? point2Ds, double tolerance=1E-06);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The IEnumerable<Point2D?> collection of points to evaluate.
tolerance System.Double
The System.Double distance tolerance used to determine if the points lie on the same line.
System.Boolean
A System.Boolean value indicating whether the points are collinear; returns false if the input collection is null.
Determines whether the specified PolygonalFace2D is concave.
public static bool Concave(this DiGi.Geometry.Planar.Classes.PolygonalFace2D? polygonalFace2D, bool externalEdge=true, bool internalEdges=true);polygonalFace2D PolygonalFace2D
The PolygonalFace2D instance to evaluate.
externalEdge System.Boolean
A System.Boolean value indicating whether the external edge should be checked for concavity.
internalEdges System.Boolean
A System.Boolean value indicating whether internal edges should be checked for concavity.
System.Boolean
A System.Boolean value that is true if the polygonal face is concave; otherwise, false.
Determines whether the specified IPolygonal2D instance is concave.
public static bool Concave(this DiGi.Geometry.Planar.Interfaces.IPolygonal2D? polygonal2D);polygonal2D IPolygonal2D
The IPolygonal2D instance to evaluate.
System.Boolean
A System.Boolean value indicating whether the polygonal object is concave; otherwise, false if the IPolygonal2D instance is null.
Determines whether the provided collection of Point2D points forms a concave polygon.
public static bool Concave(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The System.Collections.Generic.IEnumerable<> of Point2D objects representing the vertices of the polygon.
System.Boolean
A System.Boolean value indicating whether the polygon is concave; returns false if the collection is null or contains fewer than three points.
Determines whether the collection of Point2D objects contains a specific Point2D within the specified tolerance.
public static bool Contains(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D> point2Ds, DiGi.Geometry.Planar.Classes.Point2D point2D, double tolerance=1E-06);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The System.Collections.Generic.IEnumerable<> of Point2D objects to search.
point2D Point2D
The Point2D object to locate in the collection.
tolerance System.Double
The System.Double value representing the distance tolerance for equality comparison.
System.Boolean
A System.Boolean value indicating whether the specified Point2D was found within the given tolerance; otherwise, false.
Determines whether the specified PolygonalFace2D is convex.
public static bool Convex(this DiGi.Geometry.Planar.Classes.PolygonalFace2D? polygonalFace2D, bool externalEdge=true, bool internalEdges=true);polygonalFace2D PolygonalFace2D
The PolygonalFace2D instance to evaluate.
externalEdge System.Boolean
A System.Boolean value indicating whether the external edge should be included in the convexity check.
internalEdges System.Boolean
A System.Boolean value indicating whether internal edges should be included in the convexity check.
System.Boolean
A System.Boolean value that is true if the face is convex; otherwise, false.
Determines whether the specified IPolygonal2D is convex.
public static bool Convex(this DiGi.Geometry.Planar.Interfaces.IPolygonal2D? polygonal2D);polygonal2D IPolygonal2D
The IPolygonal2D instance to evaluate.
System.Boolean
A System.Boolean value indicating whether the polygon is convex; returns false if the input is null.
Determines whether the specified collection of Point2D objects forms a convex polygon.
public static bool Convex(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The System.Collections.Generic.IEnumerable<> of Point2D objects to evaluate.
System.Boolean
A System.Boolean value indicating whether the points form a convex polygon; returns false if the collection is null or contains fewer than three points.
Computes the convex hull for the specified ISegmentable2D instance.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? ConvexHull(this DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D);segmentable2D ISegmentable2D
The ISegmentable2D instance to calculate the convex hull for.
System.Collections.Generic.List<Point2D>
A System.Collections.Generic.List<> containing the points of the convex hull, or null if the segmentable2D is null.
Computes the convex hull for a given collection of Point2D objects.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? ConvexHull(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds);point2Ds System.Collections.Generic.IEnumerable<Point2D>
An System.Collections.Generic.IEnumerable<> containing the points to process.
System.Collections.Generic.List<Point2D>
A System.Collections.Generic.List<> representing the vertices of the convex hull, or null if the input collection is null.
Computes the convex hull for a collection of Point2D points.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? ConvexHull(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds, bool keepOrder);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The System.Collections.Generic.IEnumerable<> of Point2D objects to process.
keepOrder System.Boolean
A System.Boolean value indicating whether the original order of the points should be preserved in the resulting list.
System.Collections.Generic.List<Point2D>
A System.Collections.Generic.List<> of Point2D objects forming the convex hull, or null if the input collection is null.
Computes the convex hull for a collection of Segment2D.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? ConvexHull(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Segment2D>? segment2Ds);segment2Ds System.Collections.Generic.IEnumerable<Segment2D>
The System.Collections.Generic.IEnumerable<> of Segment2D objects used to derive points for the convex hull.
System.Collections.Generic.List<Point2D>
A System.Collections.Generic.List<> of Point2D vertices forming the convex hull, or null if the input is null.
Calculates the determinant of three 2D points.
public static double Determinant(this DiGi.Geometry.Planar.Classes.Point2D? point2D_1, DiGi.Geometry.Planar.Classes.Point2D? point2D_2, DiGi.Geometry.Planar.Classes.Point2D? point2D_3);point2D_1 Point2D
The first Point2D point.
point2D_2 Point2D
The second Point2D point.
point2D_3 Point2D
The third Point2D point.
System.Double
The calculated System.Double determinant, or System.Double.NaN if any of the provided points are null.
Calculates the determinant of two 2D vectors.
public static double Determinant(this DiGi.Geometry.Planar.Classes.Vector2D? vector2D_1, DiGi.Geometry.Planar.Classes.Vector2D? vector2D_2);vector2D_1 Vector2D
The first Vector2D instance.
vector2D_2 Vector2D
The second Vector2D instance.
System.Double
A System.Double representing the determinant, or System.Double.NaN if either Vector2D is null.
Calculates the determinants for the specified IPolygonal2D object.
public static System.Collections.Generic.List<double>? Determinants(this DiGi.Geometry.Planar.Interfaces.IPolygonal2D? polygonal2D);polygonal2D IPolygonal2D
The IPolygonal2D instance to process.
System.Collections.Generic.List<System.Double>
A System.Collections.Generic.List<> of System.Double values representing the determinants, or null if the input is null or contains fewer than three points.
Calculates the determinants for a sequence of Point2D objects by treating them as a closed loop.
public static System.Collections.Generic.List<double>? Determinants(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The IEnumerable<Point2D> collection of points to process.
System.Collections.Generic.List<System.Double>
A List<double> containing the calculated determinants, or null if the input is null or contains fewer than 3 Point2D elements.
Calculates the length of the diagonal for the specified BoundingBox2D.
public static double DiagonalLength(this DiGi.Geometry.Planar.Classes.BoundingBox2D boundingBox2D);boundingBox2D BoundingBox2D
The BoundingBox2D instance to calculate the diagonal length for.
System.Double
A System.Double representing the length of the diagonal, or System.Double.NaN if the BoundingBox2D is null or contains no diagonals.
Calculates the difference between two PolygonalFace2D objects.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.PolygonalFace2D>? Difference(this DiGi.Geometry.Planar.Classes.PolygonalFace2D? polygonalFace2D_1, DiGi.Geometry.Planar.Classes.PolygonalFace2D? polygonalFace2D_2);polygonalFace2D_1 PolygonalFace2D
The first PolygonalFace2D object from which the second is subtracted.
polygonalFace2D_2 PolygonalFace2D
The second PolygonalFace2D object to subtract from the first.
System.Collections.Generic.List<PolygonalFace2D>
A System.Collections.Generic.List<> containing the resulting faces of the difference operation, or null if either input is null or conversion fails.
The computation is delegated to DifferenceResult2D(this IPolygonalFace2D, IPolygonalFace2D); only the polygonal faces of the result are returned. Use the result object directly to access lower-dimensional (segment/point) difference geometries.
Calculates the difference between two 2D polygonal shapes.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Interfaces.IPolygonal2D>? Difference(this DiGi.Geometry.Planar.Interfaces.IPolygonal2D? polygonal2D_1, DiGi.Geometry.Planar.Interfaces.IPolygonal2D? polygonal2D_2);polygonal2D_1 IPolygonal2D
The first IPolygonal2D object.
polygonal2D_2 IPolygonal2D
The second IPolygonal2D object to subtract from the first.
System.Collections.Generic.List<IPolygonal2D>
A System.Collections.Generic.List<> of IPolygonal2D objects representing the resulting difference, or null if either input is null.
Calculates the geometric difference between two NetTopologySuite.Geometries.Polygon objects.
public static System.Collections.Generic.List<Polygon>? Difference(this Polygon? polygon_1, Polygon? polygon_2);polygon_1 NetTopologySuite.Geometries.Polygon
The first NetTopologySuite.Geometries.Polygon from which the second polygon is subtracted.
polygon_2 NetTopologySuite.Geometries.Polygon
The second NetTopologySuite.Geometries.Polygon to be subtracted from the first.
System.Collections.Generic.List<NetTopologySuite.Geometries.Polygon>
A System.Collections.Generic.List<> containing the resulting polygons of the difference operation, or null if either input polygon is null.
Calculates the height and width direction vectors based on the specified corner.
public static void Directions(this DiGi.Geometry.Core.Enums.Corner corner, out DiGi.Geometry.Planar.Classes.Vector2D? heightDirection, out DiGi.Geometry.Planar.Classes.Vector2D? widthDirection);corner Corner
The Corner value used to determine the directions.
heightDirection Vector2D
When this method returns, contains a Vector2D? representing the height direction vector, or null if not applicable.
widthDirection Vector2D
When this method returns, contains a Vector2D? representing the width direction vector, or null if not applicable.
Calculates the directions for a collection of segmentable 2D objects.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Vector2D>? Directions(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.ISegmentable2D>? segmentable2Ds);segmentable2Ds System.Collections.Generic.IEnumerable<ISegmentable2D>
The System.Collections.Generic.IEnumerable<> of ISegmentable2D objects to process.
System.Collections.Generic.List<Vector2D>
A System.Collections.Generic.List<> containing the calculated directions, or null if the segmentable2Ds collection is null.
Calculates the distance between a BoundingBox2D and an ISegmentable2D.
public static double Distance(DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D, out DiGi.Geometry.Planar.Classes.Point2D? point2D_Closest1, out DiGi.Geometry.Planar.Classes.Point2D? point2D_Closest2, double tolerance=1E-06);boundingBox2D BoundingBox2D
The BoundingBox2D to measure the distance from.
segmentable2D ISegmentable2D
The ISegmentable2D to measure the distance to.
point2D_Closest1 Point2D
When this method returns, contains the Point2D on the BoundingBox2D closest to the ISegmentable2D, or null if not found.
point2D_Closest2 Point2D
When this method returns, contains the Point2D on the ISegmentable2D closest to the BoundingBox2D, or null if not found.
tolerance System.Double
The System.Double tolerance value used for distance calculations.
System.Double
The System.Double distance between the two objects, or System.Double.NaN if either input is null.
Calculates the shortest distance between an ISegmentable2D and a BoundingBox2D.
public static double Distance(DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D, DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, out DiGi.Geometry.Planar.Classes.Point2D? point2D_Closest1, out DiGi.Geometry.Planar.Classes.Point2D? point2D_Closest2, double tolerance=1E-06);segmentable2D ISegmentable2D
The ISegmentable2D object.
boundingBox2D BoundingBox2D
The BoundingBox2D object.
point2D_Closest1 Point2D
When this method returns, contains the Point2D that is closest to the other object on the ISegmentable2D.
point2D_Closest2 Point2D
When this method returns, contains the Point2D that is closest to the other object on the BoundingBox2D.
tolerance System.Double
The System.Double tolerance value used for distance calculations.
System.Double
The shortest distance as a System.Double between the two objects.
Calculates the shortest distance between two segmentable 2D objects.
public static double Distance(DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D_1, DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D_2, out DiGi.Geometry.Planar.Classes.Point2D? point2D_Closest1, out DiGi.Geometry.Planar.Classes.Point2D? point2D_Closest2, double tolerance=1E-06);segmentable2D_1 ISegmentable2D
The first ISegmentable2D object.
segmentable2D_2 ISegmentable2D
The second ISegmentable2D object.
point2D_Closest1 Point2D
When this method returns, contains the Point2D on the first segmentable object that is closest to the second segmentable object, or null if no distance could be calculated.
point2D_Closest2 Point2D
When this method returns, contains the Point2D on the second segmentable object that is closest to the first segmentable object, or null if no distance could be calculated.
tolerance System.Double
The System.Double tolerance value used for calculations.
System.Double
The shortest distance as a System.Double between the two objects, or System.Double.NaN if either object is null or contains no segments.
Calculates the shortest distance between a Point2D and an ISegmentable2D.
public static double Distance(this DiGi.Geometry.Planar.Classes.Point2D? point2D, DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D);point2D Point2D
The Point2D from which to calculate the distance.
segmentable2D ISegmentable2D
The ISegmentable2D object to measure the distance to.
System.Double
The shortest distance as a System.Double.
Calculates the shortest distance between a specified Point2D and a collection of Segment2D objects.
public static double Distance(this DiGi.Geometry.Planar.Classes.Point2D? point2D, System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Segment2D>? segment2Ds);point2D Point2D
The Point2D from which to calculate the distance.
segment2Ds System.Collections.Generic.IEnumerable<Segment2D>
An System.Collections.Generic.IEnumerable<> of Segment2D objects to measure the distance against.
System.Double
The shortest distance as a System.Double. Returns System.Double.NaN if the point or the collection is null or empty.
Calculates the shortest distance from a Point2D to a collection of Segment2D objects.
public static double Distance(this DiGi.Geometry.Planar.Classes.Point2D? point2D, System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Segment2D>? segment2Ds, out DiGi.Geometry.Planar.Classes.Point2D? closetPoint2D);point2D Point2D
The Point2D instance to measure the distance from.
segment2Ds System.Collections.Generic.IEnumerable<Segment2D>
An System.Collections.Generic.IEnumerable<> containing the segments to evaluate.
closetPoint2D Point2D
When this method returns, contains the Point2D that is closest to the source point; otherwise, null.
System.Double
The minimum distance as a System.Double.
Calculates the shortest distance between a specified Point2D and a collection of objects that implement ISegmentable2D.
public static double Distance<T>(this DiGi.Geometry.Planar.Classes.Point2D? point2D, System.Collections.Generic.IEnumerable<T>? segmentable2Ds)
where T : DiGi.Geometry.Planar.Interfaces.ISegmentable2D;T
A type that implements the ISegmentable2D interface.
point2D Point2D
The Point2D from which the distance is measured.
segmentable2Ds System.Collections.Generic.IEnumerable<T>
An System.Collections.Generic.IEnumerable<> collection of objects implementing ISegmentable2D to measure the distance against.
System.Double
The shortest distance as a System.Double.
Calculates the shortest distance from a Point2D to a collection of objects that implement ISegmentable2D.
public static double Distance<T>(this DiGi.Geometry.Planar.Classes.Point2D? point2D, System.Collections.Generic.IEnumerable<T>? segmentable2Ds, out DiGi.Geometry.Planar.Classes.Point2D? closetPoint2D)
where T : DiGi.Geometry.Planar.Interfaces.ISegmentable2D;T
A type that implements ISegmentable2D.
point2D Point2D
The source Point2D to measure the distance from.
segmentable2Ds System.Collections.Generic.IEnumerable<T>
An System.Collections.Generic.IEnumerable<> of objects that implement ISegmentable2D.
closetPoint2D Point2D
When this method returns, contains the closest Point2D found on the segmentable objects; otherwise, null.
System.Double
The minimum distance as a System.Double, or System.Double.NaN if the source point is null, the collection is null, or the collection contains no elements.
Determines whether two ISegmentable2D objects are topologically equal.
public static bool EqualsTopologically(this DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D_1, DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D_2);segmentable2D_1 ISegmentable2D
The first ISegmentable2D object to compare.
segmentable2D_2 ISegmentable2D
The second ISegmentable2D object to compare.
System.Boolean
A System.Boolean value indicating whether the two objects are topologically equal.
Evaluates the specified DiGi.Math.Classes.PolynomialEquation at a given x-coordinate and returns the result as a Point2D.
public static DiGi.Geometry.Planar.Classes.Point2D? Evaluate(this DiGi.Math.Classes.PolynomialEquation? polynominalEquation, double x);polynominalEquation DiGi.Math.Classes.PolynomialEquation
The DiGi.Math.Classes.PolynomialEquation instance to evaluate.
The double value representing the x-coordinate.
Point2D
A Point2D containing the x and y coordinates if the evaluation is successful; otherwise, null if the DiGi.Math.Classes.PolynomialEquation is null or if either the input x or the resulting y value is NaN.
Extends a 2D line segment by a specified distance at the start and/or end points.
public static DiGi.Geometry.Planar.Classes.Segment2D? Extend(this DiGi.Geometry.Planar.Classes.Segment2D? segment2D, double distance, bool extendStart=true, bool extendEnd=true);segment2D Segment2D
The Segment2D instance to be extended.
distance System.Double
The System.Double distance to extend the segment by.
extendStart System.Boolean
A System.Boolean value indicating whether the start of the segment should be extended. Defaults to true.
extendEnd System.Boolean
A System.Boolean value indicating whether the end of the segment should be extended. Defaults to true.
Segment2D
A new Segment2D instance representing the extended segment, or null if the input Segment2D or its endpoints are null.
Extracts the external polygons from a collection of 2D segments using a specified distance tolerance.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Polygon2D>? ExternalPolygons(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Segment2D>? segment2Ds, double tolerance=1E-06);segment2Ds System.Collections.Generic.IEnumerable<Segment2D>
The System.Collections.Generic.IEnumerable<> collection of segments to process.
tolerance System.Double
The System.Double distance tolerance used for calculations.
System.Collections.Generic.List<Polygon2D>
A System.Collections.Generic.List<> containing the external polygons, or null if the input collection is null.
Extracts the external polygons from a collection of segmentable 2D objects using a specified distance tolerance.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Polygon2D>? ExternalPolygons<T>(this System.Collections.Generic.IEnumerable<T>? segmentable2Ds, double tolerance=1E-06)
where T : DiGi.Geometry.Planar.Interfaces.ISegmentable2D;T
The type of the segmentable 2D objects, which must implement ISegmentable2D.
segmentable2Ds System.Collections.Generic.IEnumerable<T>
The System.Collections.Generic.IEnumerable<> collection of segmentable 2D objects to process.
tolerance System.Double
The System.Double distance tolerance used for calculations.
System.Collections.Generic.List<Polygon2D>
A System.Collections.Generic.List<> containing the external polygons, or null if the input collection is null.
Extracts and identifies external polygons from a collection of segmentable 2D objects, optionally extending the segments by a specified distance.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Polygon2D>? ExternalPolygons<T>(this System.Collections.Generic.IEnumerable<T>? segmentable2Ds, double maxDistance, double tolerance=1E-06)
where T : DiGi.Geometry.Planar.Interfaces.ISegmentable2D;T
The type of the segmentable 2D objects, which must implement ISegmentable2D.
segmentable2Ds System.Collections.Generic.IEnumerable<T>
An System.Collections.Generic.IEnumerable<> of segmentable 2D objects to process.
maxDistance System.Double
A System.Double representing the distance by which each segment should be extended.
tolerance System.Double
A System.Double specifying the tolerance used for distance calculations.
System.Collections.Generic.List<Polygon2D>
A System.Collections.Generic.List<> containing the identified external polygons, or null if the input collection is null or contains no segments.
Finds the two points within a collection that are furthest apart from each other.
public static void ExtremePoints(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds, out DiGi.Geometry.Planar.Classes.Point2D? point2D_1, out DiGi.Geometry.Planar.Classes.Point2D? point2D_2);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The System.Collections.Generic.IEnumerable<> of Point2D objects to evaluate.
point2D_1 Point2D
When this method returns, contains the first point of the pair with the maximum distance, or null if the collection is null or contains fewer than two points.
point2D_2 Point2D
When this method returns, contains the second point of the pair with the maximum distance, or null if the collection is null or contains fewer than two points.
Fits a source BoundingBox2D into a target BoundingBox2D with an optional offset.
public static DiGi.Geometry.Planar.Classes.BoundingBox2D? Fit(this DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D_Source, double offset=0.0);boundingBox2D BoundingBox2D
The target BoundingBox2D to fit into.
boundingBox2D_Source BoundingBox2D
The source BoundingBox2D to be fitted.
offset System.Double
A System.Double value representing the offset applied during fitting.
BoundingBox2D
The resulting BoundingBox2D if successful; otherwise, null.
Fits a source BoundingBox2D into a target BoundingBox2D.
public static DiGi.Geometry.Planar.Classes.BoundingBox2D? Fit(this DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D_Source, out double scale, double offset=0.0);boundingBox2D BoundingBox2D
The target BoundingBox2D to fit the source bounding box into.
boundingBox2D_Source BoundingBox2D
The source BoundingBox2D that is being fitted.
scale System.Double
When this method returns, contains the calculated System.Double scale factor used for fitting; otherwise, System.Double.NaN.
offset System.Double
The System.Double offset to apply during the fitting process.
BoundingBox2D
A BoundingBox2D representing the fitted result, or null if either input bounding box is null or cannot be processed.
Fits a Polygon2D into a BoundingBox2D.
public static DiGi.Geometry.Planar.Classes.Polygon2D? Fit(this DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, DiGi.Geometry.Planar.Classes.Polygon2D? polygon2D, double offset=0.0);boundingBox2D BoundingBox2D
The BoundingBox2D to fit the polygon into.
polygon2D Polygon2D
The Polygon2D to be fitted.
offset System.Double
A System.Double value representing the offset.
Polygon2D
A new Polygon2D that fits within the bounding box, or null if the operation fails or any input is null.
Fits a Polygon2D into a BoundingBox2D.
public static DiGi.Geometry.Planar.Classes.Polygon2D? Fit(this DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, DiGi.Geometry.Planar.Classes.Polygon2D? polygon2D, out double scale, double offset=0.0);boundingBox2D BoundingBox2D
The BoundingBox2D that defines the target area for fitting.
polygon2D Polygon2D
The Polygon2D to be fitted into the bounding box.
scale System.Double
When this method returns, contains the System.Double scale factor applied to fit the polygon; otherwise, System.Double.NaN.
offset System.Double
A System.Double value representing the offset used during the fitting process.
Polygon2D
A new Polygon2D that fits within the specified bounding box, or null if either input is null or the resulting polygon contains fewer than two points.
Fits a Segment2D into a BoundingBox2D.
public static DiGi.Geometry.Planar.Classes.Segment2D? Fit(this DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, DiGi.Geometry.Planar.Classes.Segment2D? segment2D, double offset=0.0);boundingBox2D BoundingBox2D
The target BoundingBox2D to fit the segment into.
segment2D Segment2D
The source Segment2D to be fitted.
offset System.Double
A System.Double value representing the offset.
Segment2D
A Segment2D that fits within the bounding box, or null if either input is null.
Fits a Segment2D into a BoundingBox2D.
public static DiGi.Geometry.Planar.Classes.Segment2D? Fit(this DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, DiGi.Geometry.Planar.Classes.Segment2D? segment2D, out double scale, double offset=0.0);boundingBox2D BoundingBox2D
The BoundingBox2D to fit the segment into.
segment2D Segment2D
The Segment2D to be fitted.
scale System.Double
When this method returns, contains the calculated System.Double scale factor; otherwise, System.Double.NaN.
offset System.Double
The System.Double offset value used during the fitting process.
Segment2D
A new Segment2D that fits within the bounding box, or null if the input parameters are null or the segment cannot be fitted.
Fits a collection of Point2D objects within the specified BoundingBox2D.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? Fit(this DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds, double offset=0.0);boundingBox2D BoundingBox2D
The BoundingBox2D to fit the points into.
point2Ds System.Collections.Generic.IEnumerable<Point2D>
An System.Collections.Generic.IEnumerable<> of Point2D objects to be fitted.
offset System.Double
A System.Double value representing the offset for the fitting process.
System.Collections.Generic.List<Point2D>
A System.Collections.Generic.List<> of fitted Point2D objects, or null if the input is invalid.
Fits a collection of Point2D objects into the specified BoundingBox2D.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? Fit(this DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds, out double scale, double offset=0.0);boundingBox2D BoundingBox2D
The BoundingBox2D that defines the target area for fitting.
point2Ds System.Collections.Generic.IEnumerable<Point2D>
An System.Collections.Generic.IEnumerable<> containing the points to be fitted.
scale System.Double
When this method returns, contains the System.Double scale factor used to fit the points; otherwise, System.Double.NaN.
offset System.Double
A System.Double value representing the offset applied during fitting.
System.Collections.Generic.List<Point2D>
A List<Point2D> containing the fitted points if successful; otherwise, null.
Determines whether two geometries are within a specified distance tolerance of each other.
public static bool InRange(this Geometry geometry_1, Geometry geometry_2, double tolerance=1E-06);geometry_1 NetTopologySuite.Geometries.Geometry
The first NetTopologySuite.Geometries.Geometry to evaluate.
geometry_2 NetTopologySuite.Geometries.Geometry
The second NetTopologySuite.Geometries.Geometry to evaluate.
tolerance System.Double
A System.Double value representing the maximum distance threshold for proximity.
System.Boolean
A System.Boolean indicating whether the geometries intersect or are within the specified tolerance; otherwise, false if either geometry is null.
Checks if point is inside tree points (triangle)
public static bool Inside(this DiGi.Geometry.Planar.Classes.Point2D? point2D, DiGi.Geometry.Planar.Classes.Point2D? point2D_1, DiGi.Geometry.Planar.Classes.Point2D? point2D_2, DiGi.Geometry.Planar.Classes.Point2D? point2D_3);point2D Point2D
Point to be checked
point2D_1 Point2D
Triangle point 1
point2D_2 Point2D
Triangle point 2
point2D_3 Point2D
Triangle point 3
System.Boolean
True in point2D is inside triangle created by trheer points (point2D_1, point2D_2, point2D_3)
Determines whether a specified Point2D is located inside a polygon defined by a collection of Point2D objects.
public static bool Inside(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds, DiGi.Geometry.Planar.Classes.Point2D? point2D);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The System.Collections.Generic.IEnumerable<> of Point2D vertices that define the boundary of the polygon.
point2D Point2D
The Point2D to check for containment within the polygon.
System.Boolean
A System.Boolean value indicating true if the Point2D is inside the polygon; otherwise, false.
Calculates a point that is strictly internal to the polygon defined by the provided collection of points.
public static DiGi.Geometry.Planar.Classes.Point2D? InternalPoint(System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds, double tolerance=1E-06);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The System.Collections.Generic.IEnumerable<> collection of points defining the boundary.
tolerance System.Double
The System.Double tolerance value used to determine if a point lies on a segment.
Point2D
A Point2D representing an internal point, or null if the input is invalid or no internal point can be determined.
Retrieves the internal vectors of the specified DiGi.Geometry.Planar.Interfaces.IPolygon2D.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Vector2D?>? InternalVectors(this DiGi.Geometry.Planar.Interfaces.IPolygon2D? polygonal2D);polygonal2D DiGi.Geometry.Planar.Interfaces.IPolygon2D
The DiGi.Geometry.Planar.Interfaces.IPolygon2D instance to extract internal vectors from.
System.Collections.Generic.List<Vector2D>
A List<Vector2D?> containing the internal vectors, or null if the DiGi.Geometry.Planar.Interfaces.IPolygon2D is null, contains no segments, or has an undefined or collinear orientation.
Determines whether two linear 2D objects intersect within a specified tolerance.
public static bool Intersect(this DiGi.Geometry.Planar.Interfaces.ILinear2D? linear2D_1, DiGi.Geometry.Planar.Interfaces.ILinear2D? linear_2, double tolerance=1E-06);linear2D_1 ILinear2D
The first ILinear2D object.
linear_2 ILinear2D
The second ILinear2D object.
tolerance System.Double
The System.Double tolerance value used to determine the intersection.
System.Boolean
A System.Boolean value indicating whether an intersection point exists between the two linear 2D objects within the specified tolerance.
Determines whether a Segment2D intersects with an ISegmentable2D object within a specified tolerance.
public static bool Intersect(this DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D, DiGi.Geometry.Planar.Classes.Segment2D? segment2D, double tolerance=1E-06);segmentable2D ISegmentable2D
The ISegmentable2D object to check for intersection.
segment2D Segment2D
The Segment2D segment to intersect with the ISegmentable2D object.
tolerance System.Double
A System.Double value specifying the distance tolerance for the intersection check.
System.Boolean
A System.Boolean value indicating whether the objects intersect; otherwise, false.
Determines whether two ISegmentable2D objects intersect within a specified tolerance.
public static bool Intersect(this DiGi.Geometry.Planar.Interfaces.ISegmentable2D segmentable2D_1, DiGi.Geometry.Planar.Interfaces.ISegmentable2D segmentable2D_2, double tolerance=1E-06);segmentable2D_1 ISegmentable2D
The first ISegmentable2D object to check for intersection.
segmentable2D_2 ISegmentable2D
The second ISegmentable2D object to check for intersection.
tolerance System.Double
The System.Double tolerance value used to determine if the objects are within range of each other.
System.Boolean
A System.Boolean value indicating whether the two ISegmentable2D objects intersect; otherwise, false.
Calculates the intersection of two 2D polygons.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Polygon2D>? Intersection(this DiGi.Geometry.Planar.Classes.Polygon2D? polygon2D_1, DiGi.Geometry.Planar.Classes.Polygon2D? polygon2D_2, double tolerance=1E-06);polygon2D_1 Polygon2D
The first Polygon2D object to intersect.
polygon2D_2 Polygon2D
The second Polygon2D object to intersect.
tolerance System.Double
The distance tolerance used for geometric calculations.
System.Collections.Generic.List<Polygon2D>
A list containing the resulting intersection polygons, or null if no intersection exists or either input polygon is null.
Calculates the intersection of two polygonal faces in 2D space.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.PolygonalFace2D>? Intersection(this DiGi.Geometry.Planar.Classes.PolygonalFace2D? polygonalFace2D_1, DiGi.Geometry.Planar.Classes.PolygonalFace2D? polygonalFace2D_2);polygonalFace2D_1 PolygonalFace2D
The first polygonal face to intersect.
polygonalFace2D_2 PolygonalFace2D
The second polygonal face to intersect.
System.Collections.Generic.List<PolygonalFace2D>
A list of PolygonalFace2D objects representing the intersection area, or null if either input is null or cannot be converted for processing.
Calculates the intersection of a collection of 2D polygons.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Polygon2D>? Intersection(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Polygon2D>? polygon2Ds, double tolerance=1E-06);polygon2Ds System.Collections.Generic.IEnumerable<Polygon2D>
The collection of Polygon2D objects to intersect.
tolerance System.Double
The distance tolerance used for geometric calculations.
System.Collections.Generic.List<Polygon2D>
A list containing the resulting intersection polygons, or null if no intersection exists or the input is null.
Calculates the intersection of a collection of polygonal geometries.
public static System.Collections.Generic.List<X>? Intersection<X,T>(this System.Collections.Generic.IEnumerable<T>? polygonal2Ds, double tolerance=1E-06)
where X : DiGi.Geometry.Planar.Interfaces.IPolygonal2D
where T : DiGi.Geometry.Planar.Interfaces.IPolygonal2D;X
The type of the resulting polygonal geometries.
T
The type of the input polygonal geometries.
polygonal2Ds System.Collections.Generic.IEnumerable<T>
A collection of polygonal geometries to be intersected.
tolerance System.Double
The distance tolerance used for geometric calculations.
System.Collections.Generic.List<X>
A list containing the resulting intersection polygons, or null if the input collection is null.
Intersection of two segments/lines represented by four point2Ds with given tolerance.
public static DiGi.Geometry.Planar.Classes.Point2D? IntersectionPoint(DiGi.Geometry.Planar.Classes.Point2D? point2D_1_Start, DiGi.Geometry.Planar.Classes.Point2D? point2D_1_End, DiGi.Geometry.Planar.Classes.Point2D? point2D_2_Start, DiGi.Geometry.Planar.Classes.Point2D? point2D_2_End, bool bounded, double tolerance=1E-06);point2D_1_Start Point2D
Segment 1 start Point2D
point2D_1_End Point2D
Segment 1 end Point2D
point2D_2_Start Point2D
Segment 2 start Point2D
point2D_2_End Point2D
Segment 2 end Point2D
bounded System.Boolean
if bounded set to false then segments will be treated as lines (unlimited)
tolerance System.Double
tolerance
Point2D
Intersection Point2D
Intersection of two segments represented by four point2Ds with given tolerance. Output points point2D_Closest1 and point2D_Closest2 are null if intersection point is on segments
public static DiGi.Geometry.Planar.Classes.Point2D? IntersectionPoint(DiGi.Geometry.Planar.Classes.Point2D? point2D_1_Start, DiGi.Geometry.Planar.Classes.Point2D? point2D_1_End, DiGi.Geometry.Planar.Classes.Point2D? point2D_2_Start, DiGi.Geometry.Planar.Classes.Point2D? point2D_2_End, out DiGi.Geometry.Planar.Classes.Point2D? point2D_Closest1, out DiGi.Geometry.Planar.Classes.Point2D? point2D_Closest2, double tolerance=1E-06);point2D_1_Start Point2D
Segment 1 start Point2D
point2D_1_End Point2D
Segment 1 end Point2D
point2D_2_Start Point2D
Segment 2 start Point2D
point2D_2_End Point2D
Segment 2 end Point2D
point2D_Closest1 Point2D
Closest point for Segment 1
point2D_Closest2 Point2D
Closest point for Segment 2
tolerance System.Double
Calculates the intersection point of two Segment2D objects.
public static DiGi.Geometry.Planar.Classes.Point2D? IntersectionPoint(DiGi.Geometry.Planar.Classes.Segment2D? segment2D_1, DiGi.Geometry.Planar.Classes.Segment2D? segment2D_2, out DiGi.Geometry.Planar.Classes.Point2D? point2D_Closest1, out DiGi.Geometry.Planar.Classes.Point2D? point2D_Closest2, double tolerance=1E-06);segment2D_1 Segment2D
The first Segment2D object.
segment2D_2 Segment2D
The second Segment2D object.
point2D_Closest1 Point2D
When this method returns, contains the Point2D object on the first segment that is closest to the intersection or the other segment.
point2D_Closest2 Point2D
When this method returns, contains the Point2D object on the second segment that is closest to the intersection or the other segment.
tolerance System.Double
The double value used as a distance tolerance for calculating the intersection.
Point2D
A Point2D object representing the intersection point if one exists within the specified tolerance; otherwise, null.
Calculates the intersection point of two linear 2D entities.
public static DiGi.Geometry.Planar.Classes.Point2D? IntersectionPoint(this DiGi.Geometry.Planar.Interfaces.ILinear2D? linear2D_1, DiGi.Geometry.Planar.Interfaces.ILinear2D? linear2D_2, double tolerance=1E-06);linear2D_1 ILinear2D
The first ILinear2D entity.
linear2D_2 ILinear2D
The second ILinear2D entity.
tolerance System.Double
A System.Double value representing the distance tolerance for calculating the intersection.
Point2D
A Point2D if an intersection point is found; otherwise, null.
Calculates the intersection points between a circle and a line defined by two points.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? IntersectionPoints(double x, double y, double radius, DiGi.Geometry.Planar.Classes.Point2D? point2D_1, DiGi.Geometry.Planar.Classes.Point2D? point2D_2, double tolerance=1E-06);The X-coordinate of the center of the circle as a System.Double.
The Y-coordinate of the center of the circle as a System.Double.
radius System.Double
The radius of the circle as a System.Double.
point2D_1 Point2D
The first point defining the line as a Point2D?
point2D_2 Point2D
The second point defining the line as a Point2D?
tolerance System.Double
The distance tolerance used for calculations as a System.Double.
System.Collections.Generic.List<Point2D>
A System.Collections.Generic.List<>? containing the intersection points, or null if no intersections exist or input points are invalid.
Calculates the intersection points between a circle and a line.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? IntersectionPoints(this DiGi.Geometry.Planar.Classes.Circle2D? circle2D, DiGi.Geometry.Planar.Classes.Line2D? line2D, double tolerance=1E-06);circle2D Circle2D
The Circle2D instance to intersect.
line2D Line2D
The Line2D instance to intersect.
tolerance System.Double
A System.Double value representing the distance tolerance for intersection calculations.
System.Collections.Generic.List<Point2D>
A System.Collections.Generic.List<> containing the intersection points, or null if either input is null or required properties are missing.
Calculates the intersection points between a circle and a line segment.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? IntersectionPoints(this DiGi.Geometry.Planar.Classes.Circle2D? circle2D, DiGi.Geometry.Planar.Classes.Segment2D? segment2D, double tolerance=1E-06);circle2D Circle2D
The Circle2D instance to check for intersections.
segment2D Segment2D
The Segment2D instance to check for intersections.
tolerance System.Double
A System.Double value representing the distance tolerance used for calculations.
System.Collections.Generic.List<Point2D>
A System.Collections.Generic.List<> containing the intersection points, or null if either input is null or the circle center is not defined.
Calculates the intersection points between a Circle2D and an ISegmentable2D.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? IntersectionPoints(this DiGi.Geometry.Planar.Classes.Circle2D? circle2D, DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D, double tolerance=1E-06);circle2D Circle2D
The Circle2D to check for intersections.
segmentable2D ISegmentable2D
The ISegmentable2D object to check for intersections.
tolerance System.Double
The System.Double tolerance value used for the intersection calculation.
System.Collections.Generic.List<Point2D>
A System.Collections.Generic.List<> containing the intersection points, or null if either input is null or no segments are found.
Calculates the intersection points between an ellipse and a line.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? IntersectionPoints(this DiGi.Geometry.Planar.Classes.Ellipse2D? ellipse2D, DiGi.Geometry.Planar.Classes.Line2D? line2D, double tolerance=1E-06);ellipse2D Ellipse2D
The Ellipse2D instance to intersect.
line2D Line2D
The Line2D instance to intersect.
tolerance System.Double
A System.Double value specifying the distance tolerance for the intersection calculation.
System.Collections.Generic.List<Point2D>
A System.Collections.Generic.List<> containing the intersection points, or null if either input is null.
Calculates the intersection points between an ellipse and a line segment.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? IntersectionPoints(this DiGi.Geometry.Planar.Classes.Ellipse2D? ellipse2D, DiGi.Geometry.Planar.Classes.Segment2D? segment2D, double tolerance=1E-06);ellipse2D Ellipse2D
The Ellipse2D to intersect.
segment2D Segment2D
The Segment2D to intersect.
tolerance System.Double
The System.Double tolerance used for the intersection calculation.
System.Collections.Generic.List<Point2D>
A System.Collections.Generic.List<> containing the intersection points, or null if either input is null or the segment is invalid.
Calculates the intersection points between an Ellipse2D and an ISegmentable2D.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? IntersectionPoints(this DiGi.Geometry.Planar.Classes.Ellipse2D? ellipse2D, DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D, double tolerance=1E-06);ellipse2D Ellipse2D
The Ellipse2D to check for intersections.
segmentable2D ISegmentable2D
The ISegmentable2D object containing segments to check for intersections.
tolerance System.Double
A System.Double value representing the distance tolerance used for intersection calculations.
System.Collections.Generic.List<Point2D>
A System.Collections.Generic.List<> containing the intersection points if successful; otherwise, null.
Calculates the intersection points between a Line2D and an ISegmentable2D.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? IntersectionPoints(this DiGi.Geometry.Planar.Classes.Line2D? line2D, DiGi.Geometry.Planar.Interfaces.ISegmentable2D segmentable2D, double tolerance=1E-06);line2D Line2D
The Line2D to check for intersections.
segmentable2D ISegmentable2D
The ISegmentable2D object containing segments to intersect with.
tolerance System.Double
The System.Double tolerance used for the intersection calculation.
System.Collections.Generic.List<Point2D>
A System.Collections.Generic.List<> containing the intersection points, or null if the Line2D or segmentable object is null.
Calculates the intersection points between a Line2D and a collection of ISegmentable2D objects.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? IntersectionPoints(this DiGi.Geometry.Planar.Classes.Line2D? line2D, System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.ISegmentable2D>? segmentable2Ds, double tolerance=1E-06);line2D Line2D
The Line2D to check for intersections.
segmentable2Ds System.Collections.Generic.IEnumerable<[ISegmentable2D](DiGi.Geometry.Planar.Interfaces.md#DiGi.Geometry.Planar.Interfaces.ISegmentable2D 'DiGi.Geometry.Planar.Interfaces.