Show / Hide Table of Contents

Class Geometry

The class Geometry only contains static methods to solve some basic geometric tasks.

Inheritance
System.Object
Geometry
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: CADability
Assembly: CADability.dll
Syntax
public class Geometry

Constructors

| Improve this Doc View Source

Geometry()

Declaration
public Geometry()

Methods

| Improve this Doc View Source

AxisThroughTriangle(GeoPoint, GeoVector, GeoPoint, GeoPoint, GeoPoint)

Determins wheather an axis, defined by location and direction, goes through a triangle. The axis is infinite in both directions.

Declaration
public static bool AxisThroughTriangle(GeoPoint axisLoc, GeoVector axisDir, GeoPoint t1, GeoPoint t2, GeoPoint t3)
Parameters
Type Name Description
GeoPoint axisLoc

Point on the axis

GeoVector axisDir

Direction of the axis

GeoPoint t1
  1. point of the triangle
GeoPoint t2
  1. point of the triangle
GeoPoint t3
  1. point of the triangle
Returns
Type Description
System.Boolean

true, if the axis passes through the triangle, false otherwise

| Improve this Doc View Source

AxisThrouoghFourLines(GeoPoint[], GeoVector[], out GeoPoint[], out GeoVector[])

Find one ore more axis (point and direction) passing through the 4 provided lines given by p and v. the provided lines should be pairwise non planar

Declaration
public static bool AxisThrouoghFourLines(GeoPoint[] p, GeoVector[] v, out GeoPoint[] axisPnt, out GeoVector[] axisDir)
Parameters
Type Name Description
GeoPoint[] p
GeoVector[] v
GeoPoint[] axisPnt
GeoVector[] axisDir
Returns
Type Description
System.Boolean

true if a solution could be found

| Improve this Doc View Source

BeamThroughTriangle(GeoPoint, GeoVector, GeoPoint, GeoPoint, GeoPoint)

Determins wheather a beam, defined by location and direction, goes through a triangle. The beam starts at axisLoc and extends in direction axisDir. Only the forward direction is checked.

Declaration
public static bool BeamThroughTriangle(GeoPoint axisLoc, GeoVector axisDir, GeoPoint t1, GeoPoint t2, GeoPoint t3)
Parameters
Type Name Description
GeoPoint axisLoc

Startpoint of the beam

GeoVector axisDir

Direction of the beam

GeoPoint t1
  1. point of the triangle
GeoPoint t2
  1. point of the triangle
GeoPoint t3
  1. point of the triangle
Returns
Type Description
System.Boolean

true, if the beam passes through the triangle, false otherwise

| Improve this Doc View Source

CircleFit(GeoPoint2D[], out GeoPoint2D, out Double)

tries to find a center and radius for a circle which best fits to the provided points

Declaration
public static double CircleFit(GeoPoint2D[] points, out GeoPoint2D center, out double radius)
Parameters
Type Name Description
GeoPoint2D[] points

points to fit

GeoPoint2D center

center of the circle

System.Double radius

radius of the circle

Returns
Type Description
System.Double

maximum error

| Improve this Doc View Source

CircleFitLs(GeoPoint2D[], out GeoPoint2D, out Double)

Declaration
public static double CircleFitLs(GeoPoint2D[] p, out GeoPoint2D c, out double r)
Parameters
Type Name Description
GeoPoint2D[] p
GeoPoint2D c
System.Double r
Returns
Type Description
System.Double
| Improve this Doc View Source

CircleLinePerpDist(Ellipse, GeoPoint, GeoVector)

Declaration
public static GeoPoint[] CircleLinePerpDist(Ellipse circle, GeoPoint lineLocation, GeoVector lineDirection)
Parameters
Type Name Description
Ellipse circle
GeoPoint lineLocation
GeoVector lineDirection
Returns
Type Description
GeoPoint[]
| Improve this Doc View Source

Dir2D(GeoVector, GeoVector, GeoVector)

Declaration
public static GeoVector2D Dir2D(GeoVector dirx, GeoVector diry, GeoVector toConvert)
Parameters
Type Name Description
GeoVector dirx
GeoVector diry
GeoVector toConvert
Returns
Type Description
GeoVector2D
| Improve this Doc View Source

Dist(GeoPoint, GeoPoint)

Returns the distance of the two 3d points.

Declaration
public static double Dist(GeoPoint FirstPoint, GeoPoint SecondPoint)
Parameters
Type Name Description
GeoPoint FirstPoint
  1. point
GeoPoint SecondPoint
  1. point
Returns
Type Description
System.Double

distance

| Improve this Doc View Source

Dist(GeoPoint2D, GeoPoint2D)

Returns the distance of the two 2d points.

Declaration
public static double Dist(GeoPoint2D FirstPoint, GeoPoint2D SecondPoint)
Parameters
Type Name Description
GeoPoint2D FirstPoint
  1. point
GeoPoint2D SecondPoint
  1. point
Returns
Type Description
System.Double

distance

| Improve this Doc View Source

DistLL(GeoPoint, GeoVector, GeoPoint, GeoVector, out Double, out Double)

Calculates the minimal distance between two lines and the parameter on the lines where the minimal distance occures. If the lines are parallel, the parameters will be double.MaxValue. The point l1Start + par1l1Dir is closest to the second line, and the point l2Start + par2l2Dir is closest to the first line.

Declaration
public static double DistLL(GeoPoint l1Start, GeoVector l1Dir, GeoPoint l2Start, GeoVector l2Dir, out double par1, out double par2)
Parameters
Type Name Description
GeoPoint l1Start

Startpoint of the first line

GeoVector l1Dir

Direction of the first line

GeoPoint l2Start

Startpoint of the second line

GeoVector l2Dir

Direction of the second line

System.Double par1

Parameter on the first line

System.Double par2

Parameter on the second line

Returns
Type Description
System.Double

Minimal distance

| Improve this Doc View Source

DistPL(GeoPoint, Axis)

Declaration
public static double DistPL(GeoPoint P, Axis ax)
Parameters
Type Name Description
GeoPoint P
Axis ax
Returns
Type Description
System.Double
| Improve this Doc View Source

DistPL(GeoPoint, GeoPoint, GeoPoint)

Returns the distance of a point from a line (3d)

Declaration
public static double DistPL(GeoPoint P, GeoPoint lstart, GeoPoint lend)
Parameters
Type Name Description
GeoPoint P

the point

GeoPoint lstart

startpoint of the line

GeoPoint lend

endpoint of the line

Returns
Type Description
System.Double

distance

| Improve this Doc View Source

DistPL(GeoPoint, GeoPoint, GeoVector)

Returns the distance of a point from a line (3d)

Declaration
public static double DistPL(GeoPoint P, GeoPoint lstart, GeoVector ldir)
Parameters
Type Name Description
GeoPoint P

the point

GeoPoint lstart

startpoint of the line

GeoVector ldir

direction of the line

Returns
Type Description
System.Double

distance

| Improve this Doc View Source

DistPL(GeoPoint2D, GeoPoint2D, GeoPoint2D)

Returns the distance of a point from a line (2d), the distance is positive when the point is on the left side of the line, negative on the right side.

Declaration
public static double DistPL(GeoPoint2D P, GeoPoint2D lstart, GeoPoint2D lend)
Parameters
Type Name Description
GeoPoint2D P

the point

GeoPoint2D lstart

startpoint of the line

GeoPoint2D lend

endpoint of the line

Returns
Type Description
System.Double

distance

| Improve this Doc View Source

DistPL(GeoPoint2D, GeoPoint2D, GeoVector2D)

Returns the distance of a point from a line (2d). This might also be negative

Declaration
public static double DistPL(GeoPoint2D P, GeoPoint2D lstart, GeoVector2D ldir)
Parameters
Type Name Description
GeoPoint2D P

the point

GeoPoint2D lstart

startpoint of the line

GeoVector2D ldir

direction of the line

Returns
Type Description
System.Double

distance

| Improve this Doc View Source

DropPL(GeoPoint, GeoPoint, GeoPoint)

Returns the perpendicular foot point of point p on the line (s,e)

Declaration
public static GeoPoint DropPL(GeoPoint p, GeoPoint s, GeoPoint e)
Parameters
Type Name Description
GeoPoint p
GeoPoint s

Startpoint of the line

GeoPoint e

Endpoint of the line

Returns
Type Description
GeoPoint

Footpoint

| Improve this Doc View Source

DropPL(GeoPoint, GeoPoint, GeoVector)

Returns the perpendicular foot point of point p on the line through s with direction v

Declaration
public static GeoPoint DropPL(GeoPoint p, GeoPoint s, GeoVector v)
Parameters
Type Name Description
GeoPoint p
GeoPoint s

Startpoint of the line

GeoVector v

Direction of the line

Returns
Type Description
GeoPoint

Footpoint

| Improve this Doc View Source

DropPL(GeoPoint2D, GeoPoint2D, GeoPoint2D)

Returns the perpendicular foot point of point p on the line (lstart,lend)

Declaration
public static GeoPoint2D DropPL(GeoPoint2D P, GeoPoint2D lstart, GeoPoint2D lend)
Parameters
Type Name Description
GeoPoint2D P

the source point

GeoPoint2D lstart

startpoint of the line

GeoPoint2D lend

endpoint of the line

Returns
Type Description
GeoPoint2D

footpoint

| Improve this Doc View Source

DropPL(GeoPoint2D, GeoPoint2D, GeoVector2D)

Returns the perpendicular foot point of point p on the line through s with direction v

Declaration
public static GeoPoint2D DropPL(GeoPoint2D p, GeoPoint2D s, GeoVector2D v)
Parameters
Type Name Description
GeoPoint2D p
GeoPoint2D s

Startpoint of the line

GeoVector2D v

Direction of the line

Returns
Type Description
GeoPoint2D

Footpoint

| Improve this Doc View Source

FindImplicitPolynomialForm(BoundingRect, ISurface, Int32)

Declaration
public static void FindImplicitPolynomialForm(BoundingRect uv, ISurface surface, int maxDegree)
Parameters
Type Name Description
BoundingRect uv
ISurface surface
System.Int32 maxDegree
| Improve this Doc View Source

GetPosition(GeoPoint2D, GeoPoint2D, GeoVector2D, GeoVector2D)

Declaration
public static GeoPoint2D GetPosition(GeoPoint2D p, GeoPoint2D sysLoc, GeoVector2D sysDirx, GeoVector2D sysDiry)
Parameters
Type Name Description
GeoPoint2D p
GeoPoint2D sysLoc
GeoVector2D sysDirx
GeoVector2D sysDiry
Returns
Type Description
GeoPoint2D
| Improve this Doc View Source

InnerIntersection(GeoPoint2D, GeoPoint2D, GeoPoint2D, GeoPoint2D)

Returns true if the line segments p1->p2 and p3->p4 have an inner intersection, i.e. an intersection point inside the bounds of the line segment. Returns false otherwise, returns false if the intersection point coincides with one of the two lines

Declaration
public static bool InnerIntersection(GeoPoint2D p1, GeoPoint2D p2, GeoPoint2D p3, GeoPoint2D p4)
Parameters
Type Name Description
GeoPoint2D p1

startpoint of the first line segment

GeoPoint2D p2

endpoint of the first line segment

GeoPoint2D p3

startpoint of the second line segment

GeoPoint2D p4

endpoint of the second line segment

Returns
Type Description
System.Boolean
| Improve this Doc View Source

IntersectCC(GeoPoint2D, Double, GeoPoint2D, Double)

Returns the intersection points of two circles in 2d. The result may contain 0 to 2 points.

Declaration
public static GeoPoint2D[] IntersectCC(GeoPoint2D center1, double radius1, GeoPoint2D center2, double radius2)
Parameters
Type Name Description
GeoPoint2D center1

center of the first cricle

System.Double radius1

radius of the first circle

GeoPoint2D center2

center of the second cricle

System.Double radius2

radius of the second circle

Returns
Type Description
GeoPoint2D[]

intersctione points

| Improve this Doc View Source

IntersectLC(GeoPoint2D, GeoPoint2D, GeoPoint2D, Double)

Returns the intersection points of a circle and a line in 2d. The result may contain 0 to 2 points.

Declaration
public static GeoPoint2D[] IntersectLC(GeoPoint2D lstart, GeoPoint2D lend, GeoPoint2D center, double radius)
Parameters
Type Name Description
GeoPoint2D lstart

startpoint of the line

GeoPoint2D lend

endpoint of the line

GeoPoint2D center

center of the cricle

System.Double radius

radius of the circle

Returns
Type Description
GeoPoint2D[]

intersctione points

| Improve this Doc View Source

IntersectLC(GeoPoint2D, GeoVector2D, GeoPoint2D, Double)

Returns the intersection points of a circle and a line in 2d. The result may contain 0 to 2 points.

Declaration
public static GeoPoint2D[] IntersectLC(GeoPoint2D pointofline, GeoVector2D direction, GeoPoint2D center, double radius)
Parameters
Type Name Description
GeoPoint2D pointofline
GeoVector2D direction
GeoPoint2D center

center of the cricle

System.Double radius

radius of the circle

Returns
Type Description
GeoPoint2D[]

intersctione points

| Improve this Doc View Source

IntersectLL(GeoPoint, GeoVector, GeoPoint, GeoVector)

Intersection point of two lines in 3D. This should only be called when the two lines share a common plane. If not, the result will be in the middle of the closest connection of the two points. If the lines are parallel a GeometryException will be thrown.

Declaration
public static GeoPoint IntersectLL(GeoPoint l1Start, GeoVector l1Dir, GeoPoint l2Start, GeoVector l2Dir)
Parameters
Type Name Description
GeoPoint l1Start

Startpoint of first line

GeoVector l1Dir

Direction of first line

GeoPoint l2Start

Startpoint of second line

GeoVector l2Dir

Direction of second line

Returns
Type Description
GeoPoint
| Improve this Doc View Source

IntersectLL(GeoPoint2D, GeoPoint2D, GeoPoint2D, GeoPoint2D, out GeoPoint2D)

Calculates the intersectionpoint of two lines in 2d. The intersection point may be in any extension of the two lines.

Declaration
public static bool IntersectLL(GeoPoint2D StartPoint1, GeoPoint2D EndPoint1, GeoPoint2D StartPoint2, GeoPoint2D EndPoint2, out GeoPoint2D IntersectionPoint)
Parameters
Type Name Description
GeoPoint2D StartPoint1

Startpoint of the first line

GeoPoint2D EndPoint1

Endpoint of the first line

GeoPoint2D StartPoint2

Startpoint of the second line

GeoPoint2D EndPoint2

Endpoint of the second line

GeoPoint2D IntersectionPoint

the intersection point

Returns
Type Description
System.Boolean

true, if there is an intersection point, otherwise false

| Improve this Doc View Source

IntersectLL(GeoPoint2D, GeoVector2D, GeoPoint2D, GeoVector2D, out GeoPoint2D)

Calculates the intersectionpoint of two lines in 2d.

Declaration
public static bool IntersectLL(GeoPoint2D StartPoint1, GeoVector2D dir1, GeoPoint2D StartPoint2, GeoVector2D dir2, out GeoPoint2D IntersectionPoint)
Parameters
Type Name Description
GeoPoint2D StartPoint1

Startpoint of the first line

GeoVector2D dir1

Direction of the first line

GeoPoint2D StartPoint2

Startpoint of the second line

GeoVector2D dir2

Direction of the second line

GeoPoint2D IntersectionPoint

the intersection point

Returns
Type Description
System.Boolean

true, if there is an intersection point, otherwise false

| Improve this Doc View Source

LineFit(GeoPoint[], out GeoPoint, out GeoVector)

Declaration
public static double LineFit(GeoPoint[] points, out GeoPoint location, out GeoVector direction)
Parameters
Type Name Description
GeoPoint[] points
GeoPoint location
GeoVector direction
Returns
Type Description
System.Double
| Improve this Doc View Source

LineFit(GeoPoint2D[], out GeoPoint2D, out GeoVector2D)

Declaration
public static double LineFit(GeoPoint2D[] points, out GeoPoint2D location, out GeoVector2D direction)
Parameters
Type Name Description
GeoPoint2D[] points
GeoPoint2D location
GeoVector2D direction
Returns
Type Description
System.Double
| Improve this Doc View Source

LinePar(GeoPoint, GeoPoint, GeoPoint)

Declaration
public static double LinePar(GeoPoint sp, GeoPoint ep, GeoPoint p)
Parameters
Type Name Description
GeoPoint sp
GeoPoint ep
GeoPoint p
Returns
Type Description
System.Double
| Improve this Doc View Source

LinePar(GeoPoint, GeoVector, GeoPoint)

Declaration
public static double LinePar(GeoPoint sp, GeoVector dir, GeoPoint p)
Parameters
Type Name Description
GeoPoint sp
GeoVector dir
GeoPoint p
Returns
Type Description
System.Double
| Improve this Doc View Source

LinePar(GeoPoint2D, GeoPoint2D, GeoPoint2D)

Declaration
public static double LinePar(GeoPoint2D sp, GeoPoint2D ep, GeoPoint2D p)
Parameters
Type Name Description
GeoPoint2D sp
GeoPoint2D ep
GeoPoint2D p
Returns
Type Description
System.Double
| Improve this Doc View Source

LinePar(GeoPoint2D, GeoVector2D, GeoPoint2D)

Liefert den Parameter des gegebenen Punktes auf der gegebenen Linie

Declaration
public static double LinePar(GeoPoint2D sp, GeoVector2D dir, GeoPoint2D p)
Parameters
Type Name Description
GeoPoint2D sp

Startpunkt der Linie

GeoVector2D dir

Richtung der Linie

GeoPoint2D p

zu testender Punkt

Returns
Type Description
System.Double

der Parameter, z.B. 0.0==StartPunkt

| Improve this Doc View Source

LinePos(GeoPoint, GeoPoint, Double)

Declaration
public static GeoPoint LinePos(GeoPoint sp, GeoPoint ep, double pos)
Parameters
Type Name Description
GeoPoint sp
GeoPoint ep
System.Double pos
Returns
Type Description
GeoPoint
| Improve this Doc View Source

LinePos(GeoPoint, GeoVector, GeoPoint)

Declaration
public static GeoPoint LinePos(GeoPoint sp, GeoVector dir, GeoPoint toProject)
Parameters
Type Name Description
GeoPoint sp
GeoVector dir
GeoPoint toProject
Returns
Type Description
GeoPoint
| Improve this Doc View Source

LinePos(GeoPoint, GeoVector, Double)

Declaration
public static GeoPoint LinePos(GeoPoint sp, GeoVector dir, double pos)
Parameters
Type Name Description
GeoPoint sp
GeoVector dir
System.Double pos
Returns
Type Description
GeoPoint
| Improve this Doc View Source

LinePos(GeoPoint2D, GeoPoint2D, Double)

Declaration
public static GeoPoint2D LinePos(GeoPoint2D sp, GeoPoint2D ep, double pos)
Parameters
Type Name Description
GeoPoint2D sp
GeoPoint2D ep
System.Double pos
Returns
Type Description
GeoPoint2D
| Improve this Doc View Source

NextDouble(Double)

Declaration
public static double NextDouble(double value)
Parameters
Type Name Description
System.Double value
Returns
Type Description
System.Double
| Improve this Doc View Source

OnLeftSide(GeoPoint2D, GeoPoint2D, GeoPoint2D)

Declaration
public static bool OnLeftSide(GeoPoint2D P, GeoPoint2D lstart, GeoPoint2D lend)
Parameters
Type Name Description
GeoPoint2D P
GeoPoint2D lstart
GeoPoint2D lend
Returns
Type Description
System.Boolean
| Improve this Doc View Source

OnLeftSide(GeoPoint2D, GeoPoint2D, GeoVector2D)

Checks whether the point P is on the left side of the line given by lstart and ldir. If the point lies exactly on the line, the result is false. There is no precision or epsilon test. Precision

Declaration
public static bool OnLeftSide(GeoPoint2D P, GeoPoint2D lstart, GeoVector2D ldir)
Parameters
Type Name Description
GeoPoint2D P

The point to test

GeoPoint2D lstart

Startpoint of the line

GeoVector2D ldir

Direction of the line

Returns
Type Description
System.Boolean

true, if P is on the left side, false otherwise

| Improve this Doc View Source

OnSameSide(GeoPoint2D, GeoPoint2D, GeoPoint2D, GeoPoint2D)

Returns true, if p1 an p2 are on the same side of the line given by p3 and p4. Also returns true if one of the two points p1 and p2 coincide with the line (p3,p4)

Declaration
public static bool OnSameSide(GeoPoint2D p1, GeoPoint2D p2, GeoPoint2D p3, GeoPoint2D p4)
Parameters
Type Name Description
GeoPoint2D p1

first testpoint

GeoPoint2D p2

second testpoint

GeoPoint2D p3

first linepoint

GeoPoint2D p4

second linepoint

Returns
Type Description
System.Boolean

true if on the same side

| Improve this Doc View Source

OnSameSide(GeoPoint2D, GeoPoint2D, GeoPoint2D, GeoVector2D)

Declaration
public static bool OnSameSide(GeoPoint2D p0, GeoPoint2D p1, GeoPoint2D p2, GeoVector2D v2)
Parameters
Type Name Description
GeoPoint2D p0
GeoPoint2D p1
GeoPoint2D p2
GeoVector2D v2
Returns
Type Description
System.Boolean
| Improve this Doc View Source

OnSameSideStrict(GeoPoint2D, GeoPoint2D, GeoPoint2D, GeoPoint2D)

Declaration
public static bool OnSameSideStrict(GeoPoint2D p0, GeoPoint2D p1, GeoPoint2D p2, GeoPoint2D p3)
Parameters
Type Name Description
GeoPoint2D p0
GeoPoint2D p1
GeoPoint2D p2
GeoPoint2D p3
Returns
Type Description
System.Boolean
| Improve this Doc View Source

PointInsideConvexPolygon(GeoPoint2D[], GeoPoint2D)

Declaration
public static bool PointInsideConvexPolygon(GeoPoint2D[] cp, GeoPoint2D p)
Parameters
Type Name Description
GeoPoint2D[] cp
GeoPoint2D p
Returns
Type Description
System.Boolean
| Improve this Doc View Source

PointInsidePolygon(GeoPoint2D[], GeoPoint2D)

Declaration
public static int PointInsidePolygon(GeoPoint2D[] cp, GeoPoint2D p)
Parameters
Type Name Description
GeoPoint2D[] cp
GeoPoint2D p
Returns
Type Description
System.Int32
| Improve this Doc View Source

PointInsideTriangle(GeoPoint2D, GeoPoint2D, GeoPoint2D, GeoPoint2D)

Declaration
public static bool PointInsideTriangle(GeoPoint2D p1, GeoPoint2D p2, GeoPoint2D p3, GeoPoint2D p)
Parameters
Type Name Description
GeoPoint2D p1
GeoPoint2D p2
GeoPoint2D p3
GeoPoint2D p
Returns
Type Description
System.Boolean
| Improve this Doc View Source

PolynomialRoots(Double[])

Finds all real roots of a polynomial of arbitrary degree. The first coefficient is the one with the highest degree. Uses the Jenkins–Traub algorithm.

Declaration
public static double[] PolynomialRoots(params double[] coeff)
Parameters
Type Name Description
System.Double[] coeff

coefficients of the polynom

Returns
Type Description
System.Double[]

the roots

| Improve this Doc View Source

ReBase(GeoVector, GeoVector, GeoVector, GeoVector)

Computes the vector toRebase in the base given by sysDirx, sysDiry and sysDirz.

Declaration
public static GeoVector ReBase(GeoVector toRebase, GeoVector sysDirx, GeoVector sysDiry, GeoVector sysDirz)
Parameters
Type Name Description
GeoVector toRebase
GeoVector sysDirx
GeoVector sysDiry
GeoVector sysDirz
Returns
Type Description
GeoVector
| Improve this Doc View Source

SegmentInnerIntersection(GeoPoint2D, GeoPoint2D, GeoPoint2D, GeoPoint2D)

Same as SegmentIntersection(GeoPoint2D, GeoPoint2D, GeoPoint2D, GeoPoint2D), but returns true only if the intersection happens in the inside of the two segments, not at the endpoints

Declaration
public static bool SegmentInnerIntersection(GeoPoint2D p0, GeoPoint2D p1, GeoPoint2D p2, GeoPoint2D p3)
Parameters
Type Name Description
GeoPoint2D p0

first line startpoint

GeoPoint2D p1

first line endpoint

GeoPoint2D p2

second line startpoint

GeoPoint2D p3

second line endpoint

Returns
Type Description
System.Boolean

true if segment intersection

| Improve this Doc View Source

SegmentIntersection(GeoPoint2D, GeoPoint2D, GeoPoint2D, GeoPoint2D)

Returns true, if the two line segments given by (p0,p1) and (p2,p3) have a common intersection. The intersection point is noct calculated. This Method is intended as a fast check for intersection or not. Returns true, if one segment starts or ends on the other segment.

Declaration
public static bool SegmentIntersection(GeoPoint2D p0, GeoPoint2D p1, GeoPoint2D p2, GeoPoint2D p3)
Parameters
Type Name Description
GeoPoint2D p0

first line startpoint

GeoPoint2D p1

first line endpoint

GeoPoint2D p2

second line startpoint

GeoPoint2D p3

second line endpoint

Returns
Type Description
System.Boolean

true if segment intersection

| Improve this Doc View Source

SphereFit(GeoPoint[], out GeoPoint, out Double)

Declaration
public static double SphereFit(GeoPoint[] points, out GeoPoint center, out double radius)
Parameters
Type Name Description
GeoPoint[] points
GeoPoint center
System.Double radius
Returns
Type Description
System.Double
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX