SprutCAM X kernel interface

INCT_Kernel - SprutCAM X kernel interface. The interface provides the work with the text of the G-code and the restart of the interpreter in the mode of contour retrieval.

Description of interface methods:

Method

Method Description

Description of use

Get_ProgramManager

The feature returns the interface of interaction with the NС program of the current operation ( INCT_ProgramManager )

  1. If a postprocessor generates multiple files for the current operation, you can use the INCT_ProgramManager interface to adjust the order of the NC program to the interpreter.

  2. To receive only a portion of the NC program (e.g. by the labels in the program).

InterpreteContour

The function starts a new instance of the interpreter for analyzing the text of the control program and obtaining the contour.

Input Parameters: NCProgram (INCT_Program interface) G-code text; Contour (IUnknown interface) - contour interface.

If a contour machining cycle turning tool (analogue CYCLE95 for the Sinumerik stand) is not built into the core of the driver (Turning machining cycle) to form the toolpath, it is possible to launch a new copy of the interpreter to independently obtain the geometry from the contour path tool. The InterpreteContour function is intended for this purpose.

To form the contour geometry you need:

  1. Get the text of the G-code by contour marks, using the appropriate function (e.g. GetProgramByLabels).

  2. Implement the Contour object, which must have an interface for transmitting and receiving the tool path in the form and format in which the interpreter’s developer needs it.

  3. Execute the InterpreteContour function, to which as parameters to transfer the objects obtained in the first and second steps (the text of the G-code of the contour and the Contour object).

During the execution of the InterpreteContour function, SprutCAM X will receive a new instance of INCT_Interpreter from the interpreter library, initialize the new interpreter, in the SetInterface method, in addition to the normal list of interfaces, transmit the new instance of Contour to the new instance, perform the translation and interpret the transmitted text of the G-code similarly to the usual interpretation. In the process of interpretation, the interpreter, understanding that it is in the mode of contour formation (see Get_IsContourMode) must form a contour path using its own Contour object and an interface designed to save the geometric path.

After the InterpreteContour function is completed, the Contour object will contain a geometric contour path, ready for use to form the tool path in the primary instance of the interpreter.

Get_IsContourMode

The function returns the sign of the operation of the interpreter instance in the contour formation mode.

Output parameter: (boolean) True - in the mode of contour formation, False - in the mode of tool path formation.

No input parameters.


If, during operation, the interpreter launches its new copy independently (for more details, see InterpreteContour), then the newly created instance of the interpreter needs to understand what mode it is running. If the new interpreter is launched in the contour formation mode, then the interpreter must form the contour geometry in the text of the G-code (see the Contour object). If the new interpreter is not launched in the mode of contour formation, then the interpreter must form the tool movement trajectory in the text of the G-code.