GO2cam Javascript API
GO2SCycle Class Reference

Class to manage machining cycle. More...

Inheritance diagram for GO2SCycle:
GO2SCycleBase

Public Member Functions

GO2SPlane GetPlane ()
 
GO2SMesh GetStock (Boolean isBefore)
 
Number GetStockIndex (Boolean isBefore)
 
GO2STool GetTool ()
 
Array< GO2SGeometry > GetToolpath ()
 
void ReplaceTool (GO2STool tool)
 
- Public Member Functions inherited from GO2SCycleBase
GO2SEnum::GO2SError AddToFolder (String name)
 
void Delete ()
 Delete a cycle/techno function.
 
String GetName ()
 
Number GetNumberMachiningSet ()
 
Number GetPlaneNumber ()
 
Boolean IsBatch ()
 
Boolean IsError ()
 
Boolean IsHidden ()
 
Boolean IsMachiningSet ()
 
Boolean IsSelect ()
 
Boolean IsWaiting ()
 
void SetBatch (Boolean isBatch)
 
void SetMachiningSet (Boolean isSet)
 
void SetName (String name)
 Set the name of the cycle/techno function.
 
void SetNumberMachiningSet (Number number)
 
void SetSelect (Boolean isSelected)
 
void SetWaiting (Boolean isWaiting)
 
String toString () override
 

Detailed Description

Class to manage machining cycle.

Member Function Documentation

◆ GetPlane()

GO2SPlane GO2SCycle::GetPlane ( )

Get the plane of the cycle

Returns
a GO2SPlane object representing the plane where the cycle operates
var cycle = GO2SMachiningUtil.GetCycles()[0];
var plane = cycle.GetPlane();
console.log("Cycle operates on plane number: " + plane.GetNumber());
Class of machining utility methodes.
Definition GO2SMachiningUtil.hpp:22

◆ GetStock()

GO2SMesh GO2SCycle::GetStock ( Boolean isBefore)

Get the mesh of the cycle var isBefore = Stock before or after the cycle.

Returns
a GO2SMesh object representing the mesh stock where the cycle operates
var cycle = GO2SMachiningUtil.GetCycles()[0];
var mesh = cycle.GetStock(true);

◆ GetStockIndex()

Number GO2SCycle::GetStockIndex ( Boolean isBefore)

Get the stock index of the cycle var isBefore = Stock index before or after the cycle.

Returns
a index of the stock
var cycle = GO2SMachiningUtil.GetCycles()[0];
var index = cycle.GetStock(true);

◆ GetTool()

GO2STool GO2SCycle::GetTool ( )
inline

Get the tool of the cycle

Returns
a copy of the tool used by the cycle

◆ GetToolpath()

Array< GO2SGeometry > GO2SCycle::GetToolpath ( )

Get toolpath geometry for the cycle.

Returns
list of GO2SGeometry objects representing the toolpath
var geoms = cycles[0].GetToolpath()
static Array< GO2SCycle > GetAllCycles()
Version
2027

◆ ReplaceTool()

void GO2SCycle::ReplaceTool ( GO2STool tool)

Update the tool cycle's

var tool = GO2SMachiningUtil.LoadTool(type, "F45AD D125-40");
tool.SetParam(REAL_TOOL_INSCRIBED_CIRCLE_DIAMETER, 25)
cycle.ReplaceTool(tool)