Class GeoMath
A Static Class that contains static method for calcuating geometric values.
Inheritance
Inherited Members
Namespace: Dxflib.Geometry
Assembly: Dxflib.dll
Syntax
public static class GeoMath
Fields
| Improve this Doc View SourceTolerance
The Global tolerance for comparing double values
Declaration
public const double Tolerance = 0.001
Field Value
Type | Description |
---|---|
System.Double |
Methods
| Improve this Doc View SourceChordArea(GeoArc)
The Area between the arc line and a line that connects the two points of an arc
Declaration
public static double ChordArea(GeoArc geoArc)
Parameters
Type | Name | Description |
---|---|---|
GeoArc | geoArc | The GeoArc that is going to be calculated |
Returns
Type | Description |
---|---|
System.Double | The Area |
DegToRad(Double)
Conversion from Degrees to Radians
Declaration
public static double DegToRad(double num)
Parameters
Type | Name | Description |
---|---|---|
System.Double | num | The quantity you would like to convert |
Returns
Type | Description |
---|---|
System.Double | Radians |
Distance(Vertex, Vertex)
Calculates the direct distance between two verticies using Pythagoean Theorem.
Declaration
public static double Distance(Vertex v0, Vertex v1)
Parameters
Type | Name | Description |
---|---|---|
Vertex | v0 | The First Vertex |
Vertex | v1 | The Second Vertex |
Returns
Type | Description |
---|---|
System.Double | The Distance between the two points |
Distance(Vertex, Vertex, Double)
Calculates the distance between two points as it follows an arc that is defined by a bulge.
Declaration
public static double Distance(Vertex v0, Vertex v1, double bulge)
Parameters
Type | Name | Description |
---|---|---|
Vertex | v0 | The First Vertex |
Vertex | v1 | The Second Vertex |
System.Double | bulge | The Bulge |
Returns
Type | Description |
---|---|
System.Double | A double values that represents the length along the arc defined by the two points and the Bulge |
RadToDeg(Double)
Conversion from Radians to Degrees
Declaration
public static double RadToDeg(double num)
Parameters
Type | Name | Description |
---|---|---|
System.Double | num | The quantity you would like to convert |
Returns
Type | Description |
---|---|
System.Double | Degrees |
TrapzArea(GeoLine)
The Area between a Geoline and the x-axis
Declaration
public static double TrapzArea(GeoLine line)
Parameters
Type | Name | Description |
---|---|---|
GeoLine | line | The line that defined the area |
Returns
Type | Description |
---|---|
System.Double | The area between a GeoLine and the x-axis |