Class MathExtension
Inheritance
MathExtension
Assembly: FpAssistantCoreScl.dll
Syntax
public static class MathExtension
Methods
View Source
AngleTo(Vector3d, Vector3d)
Calculate angle between 2 vectors
Declaration
public static double AngleTo(this Vector3d v1, Vector3d v)
Parameters
Returns
View Source
FitToRectangle(Point3d[], double, double)
Canculate offset and scale factors the fit the point collection into a rectangle. [xo,yo,sx,sy]
Declaration
public static double[] FitToRectangle(Point3d[] p3c, double width, double height)
Parameters
Type |
Name |
Description |
Point3d[] |
p3c |
|
double |
width |
Rectangle widht
|
double |
height |
Rectangle height
|
Returns
View Source
GetExtents(Point3d[])
Return the extents of the point collection in n arry of [xmin,xmax, ymin,ymax, zmin,zmax]
Declaration
public static double[] GetExtents(Point3d[] p3c)
Parameters
Type |
Name |
Description |
Point3d[] |
p3c |
|
Returns
Exceptions
View Source
IntersectLine2D(Point3d, Vector3d, Point3d, Vector3d, double[])
Intersect 2 2D lines defined by points and vectors
Declaration
public static Point3d IntersectLine2D(Point3d origin1, Vector3d vector1, Point3d origin2, Vector3d v2, double[] dt)
Parameters
Type |
Name |
Description |
Point3d |
origin1 |
|
Vector3d |
vector1 |
|
Point3d |
origin2 |
|
Vector3d |
v2 |
|
double[] |
dt |
[0]-dist from origin1, [1]=dist from origin2, dt[2]-return flag:0-no intersection. 1=has intersection
|
Returns
View Source
PerpendicularVector2D(Vector3d)
Return a new 2D vector that is perpendicular to this vector on XY plan.
Declaration
public static Vector3d PerpendicularVector2D(this Vector3d v)
Parameters
Returns