Skip to main content

Motion Standalone Preprocessor C# library 2024 R2

Class ProfileSprocketBase

Last update: 16.07.2025

Namespace: VM.Managed.CAD.Sprocket
Assembly: VMDSprocket.dll

The base class is sprocket profile.

public abstract class ProfileSprocketBase

Inheritance

object ← ProfileSprocketBase

Derived

ProfileSprocket_ASA, ProfileSprocket_BS

Extension Methods

LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType), LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType), LinkPropertyItemCache.GetLinkedObjects<T>(object, LinkPropertyType)

Constructors

ProfileSprocketBase(ProfileDataSprocket)

Initializes a new instance of the class.

public ProfileSprocketBase(ProfileDataSprocket info)

Parameters

info ProfileDataSprocket

The info is data for creation profile.

Fields

m_Info

The info is data for creation profile

protected ProfileDataSprocket m_Info

Field Value

ProfileDataSprocket

m_dRadius_shift

Shift radius value.

protected double m_dRadius_shift

Field Value

double

m_lstPtOrigin

The original point data.

protected List<VectorBase> m_lstPtOrigin

Field Value

List<VectorBase>

m_lstPtWorkPlane

The transformed point data to work plane.

protected List<VectorBase> m_lstPtWorkPlane

Field Value

List<VectorBase>

m_strError

Set error message when can not calculate profile.

protected string m_strError

Field Value

string

Properties

Radius_Shift

Gets shift radius value.

public double Radius_Shift { get; }

Property Value

double

Methods

Calculation_Gradient(VectorBase, VectorBase)

Find the gradient of line equation

protected double Calculation_Gradient(VectorBase _ptArbitrary1, VectorBase _ptArbitrary2)

Parameters

_ptArbitrary1 VectorBase

The arbitrary point.

_ptArbitrary2 VectorBase

The arbitrary point.

Returns

double

The gradient

Calculation_Gradient_Bewteen_ArbitraryPoint_and_Circle(VectorBase, VectorBase, double)

Called when the gradient calculate between arbitrary point and circle.

protected double[] Calculation_Gradient_Bewteen_ArbitraryPoint_and_Circle(VectorBase _ptArbitrary, VectorBase ptCenterofCircle, double _dRadiusofCircle)

Parameters

_ptArbitrary VectorBase

The arbitrary point.

ptCenterofCircle VectorBase

The center point of circle.

_dRadiusofCircle double

The radius of circle.

Returns

double[]

The array of gradient.

Calculation_TangentPoint_Through_Line_Circle(double, VectorBase, VectorBase, double)

Called when tangent points calculates through line to circle.

protected List<VectorBase> Calculation_TangentPoint_Through_Line_Circle(double dGradient, VectorBase _ptArbitrary, VectorBase ptCenterofCircle, double _dRadiusofCircle)

Parameters

dGradient double

The gradient.

_ptArbitrary VectorBase

The arbitrary point.

ptCenterofCircle VectorBase

The center point of circle.

_dRadiusofCircle double

The radius of circle.

Returns

List<VectorBase>

The list of points

Calculation_TangentPosition(double, VectorBase, VectorBase, double)

Called when tangent points calculates bewteen arbitrary point and circle.

protected double[] Calculation_TangentPosition(double dGradient, VectorBase _ptArbitrary, VectorBase ptCenterofCircle, double _dRadiusofCircle)

Parameters

dGradient double

The gradient.

_ptArbitrary VectorBase

The arbitrary point.

ptCenterofCircle VectorBase

The center point of circle.

_dRadiusofCircle double

The radius of circle.

Returns

double[]

The tangent point.

Calculation_line_Equation(VectorBase, double, ref double)

Find line equation

protected void Calculation_line_Equation(VectorBase _ptArbitrary, double _dGradient, ref double _dConstant)

Parameters

_ptArbitrary VectorBase

The arbitrary point.

_dGradient double

y=mx+nm

_dConstant double

y=mx+nn

Claculation_TangentPoint_Between_Two_Circle(VectorBase, double, VectorBase, double)

Called when tangent points calculates bewteen two circles.

protected List<VectorBase> Claculation_TangentPoint_Between_Two_Circle(VectorBase ptCenter1, double dR1, VectorBase ptCenter2, double dR2)

Parameters

ptCenter1 VectorBase

The center position

dR1 double

The radius.

ptCenter2 VectorBase

The center position.

dR2 double

The radius.

Returns

List<VectorBase>

The list of points

CreateProfile()

Create profile data.

protected virtual bool CreateProfile()

Returns

bool

GetPointData_For_WorkPlane()

Gets points data on work plane.

public List<VectorBase> GetPointData_For_WorkPlane()

Returns

List<VectorBase>

GetPointData_For_XYPlane()

Gets points data on XY plane.

public List<VectorBase> GetPointData_For_XYPlane()

Returns

List<VectorBase>

Validation()

Check validation of member variables

protected virtual bool Validation()

Returns

bool

matvec(double[], VectorBase)

protected VectorBase matvec(double[] mat, VectorBase vecA)

Parameters

mat double[]

vecA VectorBase

Returns

VectorBase

vectlvec(VectorBase, VectorBase)

protected VectorBase vectlvec(VectorBase vecA, VectorBase vecB)

Parameters

vecA VectorBase

vecB VectorBase

Returns

VectorBase

vectranspose_vectieldvec(VectorBase, VectorBase, VectorBase)

protected double vectranspose_vectieldvec(VectorBase vecDepth, VectorBase vecA, VectorBase vecB)

Parameters

vecDepth VectorBase

vecA VectorBase

vecB VectorBase

Returns

double

Connect with Ansys