Class Precision
Precision specifies the order of size of a typical model. For example
two points are considered geometrically equal if their distance is less than
Precision.eps. Default value for Precision.eps is 1e-6.
Precision.epsa is the angular precision. Two directions are considered
equal if their angular difference is less than Precision.epsa.
Inheritance
System.Object
Precision
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()
Assembly: CADability.dll
Syntax
Fields
|
Improve this Doc
View Source
eps
The maximum distance for which two points are considered geometrically equal.
Declaration
Field Value
| Type |
Description |
| System.Double |
|
|
Improve this Doc
View Source
epsa
The maximum difference in radians for two angles to be considered geometrically equal.
Declaration
public static double epsa
Field Value
| Type |
Description |
| System.Double |
|
Methods
|
Improve this Doc
View Source
IsDirectionInPlane(GeoVector, Plane)
Determins, whether the given vector is in the given plane
Declaration
public static bool IsDirectionInPlane(GeoVector dir, Plane pl)
Parameters
Returns
| Type |
Description |
| System.Boolean |
true, if the direction is in the plane
|
|
Improve this Doc
View Source
IsEqual(Angle, Angle)
Declaration
public static bool IsEqual(Angle a1, Angle a2)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsEqual(GeoPoint, GeoPoint)
Determins, whether the given points are almost identical, i.e. the distance
of the points is less than eps.
Declaration
public static bool IsEqual(GeoPoint p1, GeoPoint p2)
Parameters
Returns
| Type |
Description |
| System.Boolean |
true: almost identical, false: different
|
|
Improve this Doc
View Source
IsEqual(GeoPoint, GeoPoint[])
Returns true if the distance of each point from p to c is less than eps.
Declaration
public static bool IsEqual(GeoPoint c, params GeoPoint[] p)
Parameters
| Type |
Name |
Description |
| GeoPoint |
c |
the center to test to
|
| GeoPoint[] |
p |
points to test
|
Returns
| Type |
Description |
| System.Boolean |
true if all points are close, false otherwise
|
|
Improve this Doc
View Source
IsEqual(GeoPoint[])
Declaration
public static bool IsEqual(GeoPoint[] pnts)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsEqual(GeoPoint2D, GeoPoint2D)
Declaration
public static bool IsEqual(GeoPoint2D p1, GeoPoint2D p2)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsEqual(GeoPoint2D, GeoPoint2D[])
Returns true if the distance of each point from p to c is less than eps.
Declaration
public static bool IsEqual(GeoPoint2D c, params GeoPoint2D[] p)
Parameters
Returns
| Type |
Description |
| System.Boolean |
true if all points are close, false otherwise
|
|
Improve this Doc
View Source
IsEqual(GeoVector, GeoVector)
Declaration
public static bool IsEqual(GeoVector v1, GeoVector v2)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsEqual(GeoVector2D, GeoVector2D)
Declaration
public static bool IsEqual(GeoVector2D v1, GeoVector2D v2)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsEqual(Plane, Plane)
Determins, whether the two planes are almost identical, i.e. the angular difference
is less than epsa and the distance of then location of p2 to the plane p1 is less than
eps. The DirectionX, DirectionY and Location properties of the two planes may be
completely different, the two coordinate systems of the planes may be different.
Declaration
public static bool IsEqual(Plane p1, Plane p2)
Parameters
| Type |
Name |
Description |
| Plane |
p1 |
first plane
|
| Plane |
p2 |
second plane
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsEqual(Double, Double)
Declaration
public static bool IsEqual(double d1, double d2)
Parameters
| Type |
Name |
Description |
| System.Double |
d1 |
|
| System.Double |
d2 |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsNormedVector(GeoVector)
Declaration
public static bool IsNormedVector(GeoVector v)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsNull(Angle)
Declaration
public static bool IsNull(Angle a)
Parameters
| Type |
Name |
Description |
| Angle |
a |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsNull(SweepAngle)
Declaration
public static bool IsNull(SweepAngle sw)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsNull(Double)
Declaration
public static bool IsNull(double l)
Parameters
| Type |
Name |
Description |
| System.Double |
l |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsNullVector(GeoVector)
Determins, whether the length of the given vector is almost 0, i.e.
the length is less than eps
Declaration
public static bool IsNullVector(GeoVector v)
Parameters
| Type |
Name |
Description |
| GeoVector |
v |
the vector to test
|
Returns
| Type |
Description |
| System.Boolean |
true if null-vector, false otherwise
|
|
Improve this Doc
View Source
IsNullVector(GeoVector2D)
Declaration
public static bool IsNullVector(GeoVector2D v)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsPerpendicular(GeoVector, GeoVector, Boolean)
Declaration
public static bool IsPerpendicular(GeoVector v1, GeoVector v2, bool VectorsAreNormalized)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsPerpendicular(GeoVector2D, GeoVector2D, Boolean)
Declaration
public static bool IsPerpendicular(GeoVector2D v1, GeoVector2D v2, bool VectorsAreNormalized)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsPointOnLine(GeoPoint, GeoPoint, GeoPoint)
Declaration
public static bool IsPointOnLine(GeoPoint testPoint, GeoPoint startPoint, GeoPoint endPoint)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsPointOnLine(GeoPoint2D, GeoPoint2D, GeoPoint2D)
Declaration
public static bool IsPointOnLine(GeoPoint2D testPoint, GeoPoint2D startPoint, GeoPoint2D endPoint)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsPointOnPlane(GeoPoint, Plane)
Determins, whether the 3D point is on the plane. This is true when either the distance
of the point to the plane is less than eps, or the elevation of the vector from the
location of the plane to the point is less than epsa
Declaration
public static bool IsPointOnPlane(GeoPoint p, Plane pl)
Parameters
Returns
| Type |
Description |
| System.Boolean |
true, if the point is on the plane
|
|
Improve this Doc
View Source
OppositeDirection(GeoVector, GeoVector)
Declaration
public static bool OppositeDirection(GeoVector v1, GeoVector v2)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
OppositeDirection(GeoVector2D, GeoVector2D)
Declaration
public static bool OppositeDirection(GeoVector2D v1, GeoVector2D v2)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
SameDirection(GeoVector, GeoVector, Boolean)
Determins, whether the directions of the given vectors are almost identical, i.e.
the angular difference is less than epsa. This is also true for opposite directions.
Declaration
public static bool SameDirection(GeoVector v1, GeoVector v2, bool VectorsAreNormalized)
Parameters
| Type |
Name |
Description |
| GeoVector |
v1 |
first vector
|
| GeoVector |
v2 |
second vector
|
| System.Boolean |
VectorsAreNormalized |
true, if the vectors are already normalized, false if not or unknown
|
Returns
| Type |
Description |
| System.Boolean |
true: almost same direction, false: different directions
|
|
Improve this Doc
View Source
SameDirection(GeoVector2D, GeoVector2D, Boolean)
Determins, whether the directions of the given vectors are almost identical, i.e.
the angular difference is less than epsa.
Declaration
public static bool SameDirection(GeoVector2D v1, GeoVector2D v2, bool VectorsAreNormalized)
Parameters
| Type |
Name |
Description |
| GeoVector2D |
v1 |
first vector
|
| GeoVector2D |
v2 |
second vector
|
| System.Boolean |
VectorsAreNormalized |
true, if the vectors are already normalized, false if not or unknown
|
Returns
| Type |
Description |
| System.Boolean |
true: almost same direction, false: different directions
|
|
Improve this Doc
View Source
SameNotOppositeDirection(GeoVector, GeoVector)
Declaration
public static bool SameNotOppositeDirection(GeoVector v1, GeoVector v2)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
SameNotOppositeDirection(GeoVector2D, GeoVector2D, Boolean)
Declaration
public static bool SameNotOppositeDirection(GeoVector2D v1, GeoVector2D v2, bool VectorsAreNormalized)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
SetFromModel(Model)
Declaration
public static void SetFromModel(Model m)
Parameters
| Type |
Name |
Description |
| Model |
m |
|