Interface ICLDTranslator
CLDTranslator is a base working object of the postprocessing system. It opens SprutCAM's project and starts translation of CLData files and commands placed inside this project. It also opens the exact postprocessor and sends all the CLData commands to the corresponding command handlers of the postprocessor.
Namespace: SprutTechnology.SCPostprocessor
Assembly: SCPostprocessor.dll
Syntax
public interface ICLDTranslator
Properties
CurrentCmd
Contains the reference to the CLData command currently being translated.
Declaration
ICLDCommand CurrentCmd { get; }
Property Value
Type | Description |
---|---|
ICLDCommand |
CurrentFile
Contains the reference to the CLData file currently being translated.
Declaration
ICLDFile CurrentFile { get; }
Property Value
Type | Description |
---|---|
ICLDFile |
CurrentOperation
Contains the reference to the technological operation currently being translated.
Declaration
ICLDTechOperation CurrentOperation { get; }
Property Value
Type | Description |
---|---|
ICLDTechOperation |
CurrentProject
The current project with the CLData of SprutCAM that is opened for translation.
Declaration
ICLDProject CurrentProject { get; }
Property Value
Type | Description |
---|---|
ICLDProject |
IsBreakedTranslation
This flag is "True" only if the translation was terminated early. The translation can be interrupted by the user, the system, or the postprocessor developer by directly calling the BreakTranslation method. You can check this flag inside long subroutines and loops to be able to terminate normally as soon as possible.
Declaration
bool IsBreakedTranslation { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
BreakTranslation()
Early interrupts translation of the all following CLData commands. It does not interrupt the execution of the current procedure. The operators break and return can be used for this. This can be used, for example, when detecting any unexpected things or incorrect data during the postprocessing operations, for the fastest completion of postprocessing. You can use methods of the Log object (for example Log.Error("reason") or Log.Warning("reason")) to explain the reason of termination for the user.
Declaration
void BreakTranslation()
Cross()
Determines how two consecutive segments (current and next) connected
Declaration
int Cross()
Returns
Type | Description |
---|---|
System.Int32 |
|
FlagIn()
Determines the type of angle between two consecutive moves - current and next
Declaration
int FlagIn()
Returns
Type | Description |
---|---|
System.Int32 |
|
NextToolNum(Boolean)
Returns the next tool number. if getFirstToolAtFinish is "true" then it will return the first tool number, otherwise "-1"
Declaration
int NextToolNum(bool getFirstToolAtFinish)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | getFirstToolAtFinish | Determines behaviour for the last tool should it or not to return the first tool number. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the number of the tool that should be next in the programm. |
ToolChange()
Indicates the status of a tool change
Declaration
int ToolChange()
Returns
Type | Description |
---|---|
System.Int32 |
|
TranslateCLDFile(Int32)
Starts translation of the CLData file with the given index. Usually it is used by the postprocessing system internally to start translation of a CLD subroutine. You don't need to call this method yourself unless you know exactly what you want to do.
Declaration
void TranslateCLDFile(int FileIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | FileIndex | The index of the CLData file to translate. |