Circular movements

INCT_CircularMotionFormer - SprutCAM X interface that implements the functionality to simplify the formation of movements along the arc. The interface returns the INCT_CLData.CreateCircularMotionFormer , INCT_GeomCLData.CreateCircularMotionFormer .

Purpose:

The process of formation of the arc along the frame of the NC-code is as follows. The text of the NC-code is transmitted, i.e. parsed on registers with values. Registers with values are added to the list of objects for interpretation. List objects are interpreted. When interpreting objects, according to the changed values of the registers that are associated with the axes of the machine of the kinematic scheme, the command of the movement along the arc ( INCT_CLData.AddCircle / INCT_GeomCLData.ArcTo3d ) is added to the (INCT_CLData) tool path.

If we consider this process in more detail, we get the following set of actions.

Before interpreting the frame:

  1. Get the indexes of the X, Y, Z axes for the current tool or work object.

  2. Arrange storage of axle indexes.

  3. Get the current coordinate values of the tool position for the axes stored in the list, separately for the arc center point.

When interpreting registers:

  1. Get new values of the frame registers associated with the center point, ending point, radius or angle, direction, arc.

  2. Set new values for all modified arc parameters.

After frame interpretation or in the process of interpretation, but after interpretation of all registers:

  1. Calculate missing parameters for use in INCT_CLData.AddCircle/ INCT_GeomCLData.ArcTo3d .

  2. Run INCT_CLData.AddCircle/ INCT_GeomCLData.ArcTo3d .

The actions from the list above, indicated in italics, are implemented in the arc motion generator (INCT_CircularMotionFormer). Using a shaper allows you to simplify the spelling of the interpreter.

We recommend creating one arc shaper for the entire cycle of the NC-code interpretation. Create to produce when the interpreter is initialized ( INCT_Interprete.Initialize ).

Description of interface methods:

Method

Method Description

Description of use

InitBlock

The method stores in the internal list the indexes of the axes and the current values for the X, Y, Z coordinates of the current tool or work object.

No input and output parameters.

Must be used before interpreting objects associated with registers. It is recommended to use in the implementation of the INCT_Interpreter.BeforeInterprete . method.

InitCenterPoint

The method remembers the current values of the X, Y, Z coordinates of the current tool or work object as a center point.

No input and output parameters.


Must be used before interpreting objects associated with registers. It is recommended to use in the implementation of the INCT_Interpreter.BeforeInterprete method or INCT_Interpreter.Interprete (if the point of the center of the circle is not set in the current frame).

SetConstructMode

The method sets the arc construction mode.

Input parameter: Mode (TNCConstructArcMode) - arc construction mode:

caByCircleCenter - in direction, end point and center of arc
caByRadius - in direction, end point and arc radius

No output parameters.


It is necessary to use when interpreting registers in the implementation of the INCT_Interpreter.Interprete . method.






SetMode

The method sets the arc direction mode.

Input Parameter: Mode (TNCCircularMode) - arc direction:

cmCW - clockwise;
cmCCW - counterclockwise.

No output parameters.

SetEndPoint

The method sets the coordinate value of one of the axes of the end point.

Input parameters: Abs (logical) - type of the end point value, True - absolute value, False - relative value (relative to the current coordinate value, see InitBlock); AxisType (TNCAxisType) - axis axX - X axis, axY - Y axis, axZ - Z axis; Value - (numeric) - coordinate value.

No output parameters.


SetEndPointByAngle

The method sets the value of the end point of the arc at a given angle relative to the current point.

Input parameters: Plane (TNCPlaneType) - current ptXY plane - XY plane, ptYZ - YZ plane, ptZX - ZX plane; Angle - (numeric) - the specified angle of the arc.

No output parameters.

Important! If you are constructing a full circle (the angle of the circular arc is 360 degrees), you must force the end point of the path to equal the value of the starting (current) point. Otherwise, a situation may arise as a result of which, due to an error in calculating the coordinates of the end point in one hundredth or one thousandth of a number, the next move command will be incorrect.

This is especially true for those commands in which the starting point is used to calculate auxiliary parameters involved in the construction of the trajectory (for example, when moving a tool along an arc of a circle defined by the coordinates of its center, end point and direction of movement).

SetCenterPoint

The method sets the value of the coordinate of one of the axes of the arc center point.

Input parameters: Abs (boolean) - the type of the center point value, True - the absolute value, False - the relative value (relative to the current value of the coordinate, see InitCenterPoint); AxisType (TNCAxisType) - axis axX - X axis, axY - Y axis, axZ - Z axis; Value - (numeric) - coordinate value.

No output parameters.

SetRadius

The method sets the arc radius value.

Input parameter: Value - (numeric) - radius value.

No output parameters.


MakeWorkpath

The method calculates the end point of the arc if an angle has been entered (SetEndPointByAngle). Depending on the arc construction mode (SetConstructMode), it calculates the missing parameters for AddCircle.

In the toolpath, it adds an arc move command ( INCT_CLData.AddCircle/ INCT_GeomCLData.ArcTo3d ) with previously calculated parameters.

To form a team move in an arc. Used when interpreting in INCT_Interpreter.Interprete , after interpreting all registers (add to the end of the list of objects for interpretation). Or in INCT_Interpreter.AfterInterprete .