GO2cam Javascript API  6.11
GO2STool Class Reference

Class to manage machining tool. More...

Inheritance diagram for GO2STool:
GO2SMachining

Public Member Functions

 GO2STool ()
 Create an empty tool object.
 
GO2STool Copy (String new_name)
 Get a copy of the tool.
 
String GetName ()
 
any GetParam (Number key, Number noDevice=0) override
 
GO2SEnum::GO2SError LoadFromFile (Number typout, String name, String subdir="")
 
GO2SEnum::GO2SError LoadFromName (String name)
 
GO2SEnum::GO2SError SetParam (Number key, any value, Number noDevice=0) override
 
String toString () override
 
void Update ()
 Update all machining operations using the tool.
 
- Public Member Functions inherited from GO2SMachining
Array< String > GetEditableParams ()
 
any GetParam (Number key, Number noDevice=0)
 
Boolean IsParamEditable (Number key)
 
GO2SEnum::GO2SError SetParam (Number key, any value, Number noDevice=0)
 

Detailed Description

Class to manage machining tool.

Member Function Documentation

◆ Copy()

GO2STool GO2STool::Copy ( String new_name)

Get a copy of the tool.

Parameters
[in]new_namename of the copy

◆ GetName()

String GO2STool::GetName ( )
Returns
the name of the tool

◆ GetParam()

any GO2STool::GetParam ( Number key,
Number noDevice = 0 )
override

Get a parameter of a tool or an attachment if possible Use GetEditableParams() to get the list of parameters

Returns
the value of the parameter
Parameters
[in]keythe parameter key
[in]noDevicethe device number

◆ LoadFromFile()

GO2SEnum::GO2SError GO2STool::LoadFromFile ( Number typout,
String name,
String subdir = "" )

Load a tool from file

var tool = new GO2STool
var err = tool.LoadFromFile(TOOL_MILL_FACING, 'F45AD D125-40')
Class to manage machining tool.
Definition GO2STool.hpp:7
GO2SEnum::GO2SError LoadFromFile(Number typout, String name, String subdir="")
Returns
GO2SError.success(0) if the tool is properly loaded, see GO2SError otherwise
Parameters
[in]typouttype of the tool
[in]namename of the tool
[in]subdirdirectory to search, if empty the default GO2cam is used.

◆ LoadFromName()

GO2SEnum::GO2SError GO2STool::LoadFromName ( String name)

Load a tool from the database

var tool = new GO2STool
tool.LoadFromName('MW01- Facing Tool.F09')
console.log(tool.GetParam(REAL_TOOL_LENGTH_CUTTED))
GO2SEnum::GO2SError LoadFromName(String name)
Returns
GO2SError.success(0) if the tool is properly loaded, see GO2SError otherwise
Parameters
[in]namename of the tool

◆ SetParam()

GO2SEnum::GO2SError GO2STool::SetParam ( Number key,
any value,
Number noDevice = 0 )
override

Change the parameter of a tool or an attachment if possible Use GetEditableParams() to get the list of editable parameters

Returns
GO2SError.success(0) if success, see GO2SError otherwise
Parameters
[in]keythe parameter key
[in]valuethe parameter value
[in]noDevicethe device number

◆ toString()

String GO2STool::toString ( )
overridevirtual
Returns
printable information about the object

Implements GO2SMachining.