Class ActSpiralMcXyzContour
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
Vec3dThe beginning position in program coordinates.
programPosEnd
Vec3dThe ending position in program coordinates.
programPosCenterOnBeginPlane
Vec3dThe center position of the spiral in program coordinates.
centerNormal
Vec3dThe normal vector of the center plane.
additionalCircleNum
intThe number of additional circles in the spiral movement.
actDuration
TimeSpanThe 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
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
CenterNormal
Gets or sets the normal vector of the center plane.
public Vec3d CenterNormal { get; set; }
Property Value
ProgramPosBegin
Gets or sets the beginning position in program coordinates.
public Vec3d ProgramPosBegin { get; set; }
Property Value
ProgramPosCenterOnBeginPlane
Gets or sets the center position of the spiral in program coordinates.
public Vec3d ProgramPosCenterOnBeginPlane { get; set; }
Property Value
ProgramPosEnd
Gets or sets the ending position in program coordinates.
public Vec3d ProgramPosEnd { get; set; }
Property Value
ProgramPosToMcFunc
Gets or sets the function to convert program position to machine coordinates.
public Func<Vec3d, DVec3d> ProgramPosToMcFunc { get; set; }
Property Value
Methods
GetActMcXyzabcSteps(IMachiningMotionResolution, double)
Gets the machine XYZABC steps for this contour.
public IEnumerable<ActMcXyzabcStep> GetActMcXyzabcSteps(IMachiningMotionResolution ncResolution, double spindleBuckleToToolTipLength)
Parameters
ncResolution
IMachiningMotionResolutionThe machining motion resolution to use for step generation.
spindleBuckleToToolTipLength
doubleThe 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
Vec3dend
Vec3dcenterOnBeginPlane
Vec3dcenterNormal
Vec3dadditionalCircleNum
intarrowBeginOnProj
Vec3dr0
doubler1
doubleaxialMove
Vec3dsynchronized move along the axis
angleOnProj
doubleapproxCurveLength
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
Vec3dThe beginning position in NC coordinates.
ncEnd
Vec3dThe ending position in NC coordinates.
ncCenterVec2d
Vec2dThe center position vector in 2D NC coordinates.
planeNormalDir
intThe direction of the plane normal (0=X, 1=Y, 2=Z).
isCcw
boolIndicates whether the movement is counter-clockwise.
additionalCircleNum
intThe number of additional circles in the spiral movement.
arrowBeginOnProj
Vec3dThe output arrow begin position on projection.
r0
doubleThe output starting radius.
r1
doubleThe output ending radius.
axialMove
Vec3dThe output axial movement vector.
angleOnProj
doubleThe output angle on projection.
approxCurveLength
doubleThe 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.