C# 클래스 SolidworksAddinFramework.MathUtilityExtensions

파일 보기 프로젝트 열기: Weingartner/SolidworksAddinFramework

공개 메소드들

메소드 설명
ComposeTransform ( this math, MathVector translate, double scale = 1.0 ) : MathTransform
GetRotationFromAxisAndAngle ( this m, IMathVector axis, double angle ) : MathTransform
GetTranslationFromVector ( this m, IMathVector v ) : MathTransform
IdentityTransform ( this math ) : MathTransform
InterpolatePoints ( this m, IEnumerable pointsEnum, double stepSize ) : List
Mp ( this m, double v ) : MathPoint
Mv ( this m, double v ) : MathVector
Origin ( this m ) : MathPoint
OriginArray ( this m ) : double[]
Point ( this m, double v ) : MathPoint
RotateByAngle ( this m, IMathPoint p, IMathVector axis, double angle ) : IMathPoint
ToHexString ( this d ) : string
ToMatrix4X4 ( this transform ) : Matrix4x4
ToSwMatrix ( this math, Matrix4x4 matrix ) : MathTransform

Transformation matrix data: |a b c.n | |d e f.o | |g h i.p | |j k l.m | The SOLIDWORKS transformation matrix is stored as a homogeneous matrix of 16 elements, ordered as shown.The first 9 elements(a to i) are elements of a 3x3 rotational sub-matrix, the next 3 elements(j, k, l) define a translation vector, and the next 1 element(m) is a scaling factor.The last 3 elements(n, o, p) are unused in this context. The 3x3 rotational sub-matrix represents 3 axis sets: row 1 for x-axis components of rotation row 2 for y-axis components of rotation row 3 for z-axis components of rotation The 3 axes are constrained to be orthogonal and unified so that they produce a pure rotational transformation.Reflections can also be added to these axes by setting the components to negative.The rotation sub-matrix coupled with the lower-left translation vector and the lower-right corner scaling factor creates an affine transformation, which is a transformation that preserves lines and parallelism; i.e., maps parallel lines to parallel lines. If the 3 axis sets of the 3x3 rotational sub-matrix are not orthogonal or unified, then they are automatically corrected according to the following rules: If any axis is 0, or any two axes are parallel, or all axes are coplanar, then an identity matrix replaces the rotational sub-matrix. All axes are corrected to be of unit length. The axes are built to be orthogonal to each other in the prioritized order of Z, X, Y (X is orthogonal to Z, Y is orthogonal to Z and X).

TranslateByVector ( this m, IMathPoint p, IMathVector v ) : IMathPoint
Vector ( this m, double v ) : MathVector
Vector ( this m, double a, double b ) : MathVector
XAxis ( this m ) : MathVector
XAxisArray ( this m ) : double[]
YAxis ( this m ) : MathVector
YAxisArray ( this m ) : double[]
ZAxis ( this m ) : MathVector
ZAxisArray ( this m ) : double[]

메소드 상세

ComposeTransform() 공개 정적인 메소드

public static ComposeTransform ( this math, MathVector translate, double scale = 1.0 ) : MathTransform
math this
translate MathVector
scale double
리턴 MathTransform

GetRotationFromAxisAndAngle() 공개 정적인 메소드

public static GetRotationFromAxisAndAngle ( this m, IMathVector axis, double angle ) : MathTransform
m this
axis IMathVector
angle double
리턴 MathTransform

GetTranslationFromVector() 공개 정적인 메소드

public static GetTranslationFromVector ( this m, IMathVector v ) : MathTransform
m this
v IMathVector
리턴 MathTransform

IdentityTransform() 공개 정적인 메소드

public static IdentityTransform ( this math ) : MathTransform
math this
리턴 MathTransform

InterpolatePoints() 공개 정적인 메소드

public static InterpolatePoints ( this m, IEnumerable pointsEnum, double stepSize ) : List
m this
pointsEnum IEnumerable
stepSize double
리턴 List

Mp() 공개 정적인 메소드

public static Mp ( this m, double v ) : MathPoint
m this
v double
리턴 MathPoint

Mv() 공개 정적인 메소드

public static Mv ( this m, double v ) : MathVector
m this
v double
리턴 MathVector

Origin() 공개 정적인 메소드

public static Origin ( this m ) : MathPoint
m this
리턴 MathPoint

OriginArray() 공개 정적인 메소드

public static OriginArray ( this m ) : double[]
m this
리턴 double[]

Point() 공개 정적인 메소드

public static Point ( this m, double v ) : MathPoint
m this
v double
리턴 MathPoint

RotateByAngle() 공개 정적인 메소드

public static RotateByAngle ( this m, IMathPoint p, IMathVector axis, double angle ) : IMathPoint
m this
p IMathPoint
axis IMathVector
angle double
리턴 IMathPoint

ToHexString() 공개 정적인 메소드

public static ToHexString ( this d ) : string
d this
리턴 string

ToMatrix4X4() 공개 정적인 메소드

public static ToMatrix4X4 ( this transform ) : Matrix4x4
transform this
리턴 Matrix4x4

ToSwMatrix() 공개 정적인 메소드

Transformation matrix data: |a b c.n | |d e f.o | |g h i.p | |j k l.m | The SOLIDWORKS transformation matrix is stored as a homogeneous matrix of 16 elements, ordered as shown.The first 9 elements(a to i) are elements of a 3x3 rotational sub-matrix, the next 3 elements(j, k, l) define a translation vector, and the next 1 element(m) is a scaling factor.The last 3 elements(n, o, p) are unused in this context. The 3x3 rotational sub-matrix represents 3 axis sets: row 1 for x-axis components of rotation row 2 for y-axis components of rotation row 3 for z-axis components of rotation The 3 axes are constrained to be orthogonal and unified so that they produce a pure rotational transformation.Reflections can also be added to these axes by setting the components to negative.The rotation sub-matrix coupled with the lower-left translation vector and the lower-right corner scaling factor creates an affine transformation, which is a transformation that preserves lines and parallelism; i.e., maps parallel lines to parallel lines. If the 3 axis sets of the 3x3 rotational sub-matrix are not orthogonal or unified, then they are automatically corrected according to the following rules: If any axis is 0, or any two axes are parallel, or all axes are coplanar, then an identity matrix replaces the rotational sub-matrix. All axes are corrected to be of unit length. The axes are built to be orthogonal to each other in the prioritized order of Z, X, Y (X is orthogonal to Z, Y is orthogonal to Z and X).
public static ToSwMatrix ( this math, Matrix4x4 matrix ) : MathTransform
math this
matrix Matrix4x4
리턴 MathTransform

TranslateByVector() 공개 정적인 메소드

public static TranslateByVector ( this m, IMathPoint p, IMathVector v ) : IMathPoint
m this
p IMathPoint
v IMathVector
리턴 IMathPoint

Vector() 공개 정적인 메소드

public static Vector ( this m, double v ) : MathVector
m this
v double
리턴 MathVector

Vector() 공개 정적인 메소드

public static Vector ( this m, double a, double b ) : MathVector
m this
a double
b double
리턴 MathVector

XAxis() 공개 정적인 메소드

public static XAxis ( this m ) : MathVector
m this
리턴 MathVector

XAxisArray() 공개 정적인 메소드

public static XAxisArray ( this m ) : double[]
m this
리턴 double[]

YAxis() 공개 정적인 메소드

public static YAxis ( this m ) : MathVector
m this
리턴 MathVector

YAxisArray() 공개 정적인 메소드

public static YAxisArray ( this m ) : double[]
m this
리턴 double[]

ZAxis() 공개 정적인 메소드

public static ZAxis ( this m ) : MathVector
m this
리턴 MathVector

ZAxisArray() 공개 정적인 메소드

public static ZAxisArray ( this m ) : double[]
m this
리턴 double[]