Table of Contents

Class ActSpiralMcXyzContour

Namespace
Hi.Numerical.Acts
Assembly
HiMech.dll

Represents a spiral contour movement in machine XYZ coordinates.

public class ActSpiralMcXyzContour : IActDuration, IActMcXyzabcContour, IAct
Inheritance
ActSpiralMcXyzContour
Implements
Inherited Members
Extension Methods

Constructors

ActSpiralMcXyzContour(Vec3d, Vec3d, Vec3d, Vec3d, int, TimeSpan, Func<Vec3d, DVec3d>)

Initializes a new instance of the ActSpiralMcXyzContour class with the specified parameters.

public ActSpiralMcXyzContour(Vec3d programPosBegin, Vec3d programPosEnd, Vec3d programPosCenterOnBeginPlane, Vec3d centerNormal, int additionalCircleNum, TimeSpan actDuration, Func<Vec3d, DVec3d> programPosToMcFunc)

Parameters

programPosBegin Vec3d

The beginning position in program coordinates.

programPosEnd Vec3d

The ending position in program coordinates.

programPosCenterOnBeginPlane Vec3d

The center position of the spiral in program coordinates.

centerNormal Vec3d

The normal vector of the center plane.

additionalCircleNum int

The number of additional circles in the spiral movement.

actDuration TimeSpan

The duration of the contour movement.

programPosToMcFunc Func<Vec3d, DVec3d>

The function to convert program position to machine coordinates.

Properties

ActDuration

Gets or sets the duration of the action.

public TimeSpan ActDuration { get; set; }

Property Value

TimeSpan

Remarks

The duration represents:

  • The time required to complete the action
  • Should be positive and finite
  • Zero duration indicates an instantaneous action
  • Used for scheduling and timing calculations

AdditionalCircleNum

Gets or sets the number of additional circles in the spiral movement.

public int AdditionalCircleNum { get; set; }

Property Value

int

CenterNormal

Gets or sets the normal vector of the center plane.

public Vec3d CenterNormal { get; set; }

Property Value

Vec3d

ProgramPosBegin

Gets or sets the beginning position in program coordinates.

public Vec3d ProgramPosBegin { get; set; }

Property Value

Vec3d

ProgramPosCenterOnBeginPlane

Gets or sets the center position of the spiral in program coordinates.

public Vec3d ProgramPosCenterOnBeginPlane { get; set; }

Property Value

Vec3d

ProgramPosEnd

Gets or sets the ending position in program coordinates.

public Vec3d ProgramPosEnd { get; set; }

Property Value

Vec3d

ProgramPosToMcFunc

Gets or sets the function to convert program position to machine coordinates.

public Func<Vec3d, DVec3d> ProgramPosToMcFunc { get; set; }

Property Value

Func<Vec3d, DVec3d>

Methods

GetActMcXyzabcSteps(IMachiningMotionResolution, double)

Gets the machine XYZABC steps for this contour.

public IEnumerable<ActMcXyzabcStep> GetActMcXyzabcSteps(IMachiningMotionResolution ncResolution, double spindleBuckleToToolTipLength)

Parameters

ncResolution IMachiningMotionResolution

The machining motion resolution to use for step generation.

spindleBuckleToToolTipLength double

The length from spindle buckle to tool tip, used for computing step numbers.

Returns

IEnumerable<ActMcXyzabcStep>

A collection of machine XYZABC steps.

GetDerivative(Vec3d, Vec3d, Vec3d, Vec3d, int, out Vec3d, out double, out double, out Vec3d, out double, out double)

Get derivatives.

public static void GetDerivative(Vec3d begin, Vec3d end, Vec3d centerOnBeginPlane, Vec3d centerNormal, int additionalCircleNum, out Vec3d arrowBeginOnProj, out double r0, out double r1, out Vec3d axialMove, out double angleOnProj, out double approxCurveLength)

Parameters

begin Vec3d
end Vec3d
centerOnBeginPlane Vec3d
centerNormal Vec3d
additionalCircleNum int
arrowBeginOnProj Vec3d
r0 double
r1 double
axialMove Vec3d

synchronized move along the axis

angleOnProj double
approxCurveLength double

GetNcDerivative(Vec3d, Vec3d, Vec2d, int, bool, int, out Vec3d, out double, out double, out Vec3d, out double, out double)

Calculates the derivative parameters for numerical control spiral movement.

public static void GetNcDerivative(Vec3d ncBegin, Vec3d ncEnd, Vec2d ncCenterVec2d, int planeNormalDir, bool isCcw, int additionalCircleNum, out Vec3d arrowBeginOnProj, out double r0, out double r1, out Vec3d axialMove, out double angleOnProj, out double approxCurveLength)

Parameters

ncBegin Vec3d

The beginning position in NC coordinates.

ncEnd Vec3d

The ending position in NC coordinates.

ncCenterVec2d Vec2d

The center position vector in 2D NC coordinates.

planeNormalDir int

The direction of the plane normal (0=X, 1=Y, 2=Z).

isCcw bool

Indicates whether the movement is counter-clockwise.

additionalCircleNum int

The number of additional circles in the spiral movement.

arrowBeginOnProj Vec3d

The output arrow begin position on projection.

r0 double

The output starting radius.

r1 double

The output ending radius.

axialMove Vec3d

The output axial movement vector.

angleOnProj double

The output angle on projection.

approxCurveLength double

The output approximate curve length.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.