GO2cam Javascript API  6.11
GO2SMachine Class Reference

Class to manage machining machine. More...

Inheritance diagram for GO2SMachine:
GO2SMachining

Public Member Functions

 GO2SMachine ()
 Defaut constructor.
 
 GO2SMachine (String dir, String name)
 Create a machine object.
 
void GetExistingMachine ()
 
String GetName ()
 
any GetParam (Number key, Number noDevice=0) override
 
Boolean IsLoaded ()
 
void LoadFromFile (String dir, String name)
 
GO2SEnum::GO2SError RunPP (String dir, String name)
 
GO2SEnum::GO2SError SetParam (Number key, any value, Number noDevice=0) override
 
String toString () override
 
- 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 machine.

Constructor & Destructor Documentation

◆ GO2SMachine()

GO2SMachine::GO2SMachine ( String dir,
String name )
inline

Create a machine object.

Parameters
[in]dirMachine file directory. If empty, the GO2cam machine directory will be used
[in]nameMachine file name

Member Function Documentation

◆ GetExistingMachine()

void GO2SMachine::GetExistingMachine ( )

Read the existing machine in the current file If no machine is loaded, try to load the default machine

var mac = new GO2SMachine
if(mac.IsLoaded())
console.log(mac.GetName())
Class to manage machining machine.
Definition GO2SMachine.hpp:8
void GetExistingMachine()

◆ GetName()

String GO2SMachine::GetName ( )
Returns
the mane of the machine

◆ IsLoaded()

Boolean GO2SMachine::IsLoaded ( )
inline
Returns
if the machine is properly loaded and can be used

◆ LoadFromFile()

void GO2SMachine::LoadFromFile ( String dir,
String name )

Load a machine file on the current part

var mac = new GO2SMachine
mac.LoadFromFile('', 'fanuc.mcf')
if(mac.IsLoaded())
{
//use the machine
}
void LoadFromFile(String dir, String name)
Parameters
[in]dirMachine file directory. If empty, the GO2cam machine directory will be used
[in]nameMachine file name

◆ RunPP()

GO2SEnum::GO2SError GO2SMachine::RunPP ( String dir,
String name )

Starts the execution of the post processor defined in the machine file

var machine = new GO2SMachine('', 'fanuc.mcf')
if(machine.IsLoaded())
{
machine.RunPP('iso', 'my_pp.iso')
}
GO2SMachine()
Defaut constructor.
Definition GO2SMachine.hpp:14
Boolean IsLoaded()
Definition GO2SMachine.hpp:50
Returns
GO2SError.success (0) if success, see GO2SError otherwise
Parameters
[in]dirISO file destination directory. If empty, the GO2cam iso directory will be used
[in]nameIso file name

◆ toString()

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

Implements GO2SMachining.