Show / Hide Table of Contents

Class MathExtension

Inheritance
System.Object
MathExtension
Namespace: FpAssistantCore.General
Assembly: FpAssistantCoreScl.dll
Syntax
public static class MathExtension : object

Methods

View Source

AngleTo(Vector3d, Vector3d)

Calculate angle between 2 vectors

Declaration
public static double AngleTo(this Vector3d v1, Vector3d v)
Parameters
Type Name Description
Vector3d v1
Vector3d v
Returns
Type Description
System.Double
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
System.Double width

Rectangle widht

System.Double height

Rectangle height

Returns
Type Description
System.Double[]
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
Type Description
System.Double[]
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
System.Double[] dt

[0]-dist from origin1, [1]=dist from origin2, dt[2]-return flag:0-no intersection. 1=has intersection

Returns
Type Description
Point3d
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
Type Name Description
Vector3d v
Returns
Type Description
Vector3d
  • View Source
In This Article
Back to top Copyright 2018-2024 CADology Limited