Show / Hide Table of Contents

Class MathExtension

Inheritance
object
MathExtension
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: FpAssistantCore.General
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
Type Name Description
Vector3d v1
Vector3d v
Returns
Type Description
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
double width

Rectangle widht

double height

Rectangle height

Returns
Type Description
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
double[]
Exceptions
Type Condition
NullReferenceException

If parameter is null

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
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-2025 CADology Limited