GO2cam Javascript API  6.11
GO2STechnoFunc Class Reference

Class to manage techno functions / sub program call. More...

Inheritance diagram for GO2STechnoFunc:
GO2SCycleBase GO2SMachining

Public Member Functions

 GO2STechnoFunc ()
 Default constructor.
 
GO2SEnum::GO2SError Add (GO2SEnum::GO2SWay way, GO2SCycleBase cycle, Boolean isVisible=true)
 
void CreateFunction (Number key, Array< double > params=Array< double >(), Number time=1.0, Number planNb=0, String name="", String comment="")
 
void CreateSpgCall (Number spgNumber, Number manipType, GO2SXYZ v, Number value=0, Number numberOfCall=1, String name="", String comment="")
 
Array< String > GetFunctionList ()
 
- Public Member Functions inherited from GO2SCycleBase
GO2SEnum::GO2SError AddToFolder (String name)
 
void Delete ()
 Delete a cycle/techno function.
 
String GetName ()
 
Boolean IsBatch ()
 
Boolean IsError ()
 
Boolean IsHidden ()
 
Boolean IsSelect ()
 
void SetBatch (Boolean isBatch)
 
void SetName (String name)
 Set the name of the cycle/techno function.
 
void SetSelect (Boolean isSelected)
 
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 techno functions / sub program call.

let stop_fct = new GO2STechnoFunc
stop_fct.CreateFunction(CONST_FCT_STOP)
stop_fct.Add(GO2SWay.before, cycles[0])
let start_tag = GO2STechnoFuncCreate.StartTag(1, cycles[0])
let end_tag = GO2STechnoFuncCreate.EndTag(1, cycles[cycles.length - 1])
let spg_call = new GO2STechnoFunc
spg_call.CreateSpgCall(1, 1, new GO2SXYZ(85, 0, 0))
spg_call.Add(GO2SWay.after, end_tag)
Class of machining utility methodes.
Definition GO2SMachiningUtil.hpp:19
static Array< GO2SCycle > GetAllCycles()
Helper class to create techno function cycle.
Definition GO2SFCTechno.hpp:201
static GO2STechnoFunc EndTag(Number subProgNb, GO2SCycle cycle, String label="")
static GO2STechnoFunc StartTag(Number subProgNb, GO2SCycle cycle, String label="")
Class to manage techno functions / sub program call.
Definition GO2SFCTechno.hpp:33
void CreateFunction(Number key, Array< double > params=Array< double >(), Number time=1.0, Number planNb=0, String name="", String comment="")
void CreateSpgCall(Number spgNumber, Number manipType, GO2SXYZ v, Number value=0, Number numberOfCall=1, String name="", String comment="")
Definition GO2SFCTechno.hpp:59
Creation of a coordinate reference.
Definition GO2SXYZ.hpp:81

Member Function Documentation

◆ Add()

GO2SEnum::GO2SError GO2STechnoFunc::Add ( GO2SEnum::GO2SWay way,
GO2SCycleBase cycle,
Boolean isVisible = true )

Add the techno function or the spg call in the machining tree

var pocket = GO2SMachiningUtil.GetByName('Pocket')[0]
var stop = new GO2STechnoFunc(CONST_FCT_STOP, [0])
stop.Add(GO2SWay.before, pocket)
static Array< GO2SCycleBase > GetByName(String name)
GO2SEnum::GO2SError Add(GO2SEnum::GO2SWay way, GO2SCycleBase cycle, Boolean isVisible=true)
GO2STechnoFunc()
Default constructor.
Returns
GO2SError.success (0) if success, see GO2SError otherwise
Parameters
[in]wayChoose if added before or after cycle. See GO2SEnum::GO2SWay.
[in]cycleCycle already existing in the machining tree to to place the function before or after.
[in]isVisibleSet if techno cycle will be visible in tree.

◆ CreateFunction()

void GO2STechnoFunc::CreateFunction ( Number key,
Array< double > params = Array< double >(),
Number time = 1.0,
Number planNb = 0,
String name = "",
String comment = "" )

Initialize a techno function

Remarks
this method creates the function but does not add it in the machining tree. See GO2STechnoFunc::Add to place the function in the tree
var stop = new GO2STechnoFunc
stop.CreateFunction(CONST_FCT_STOP, [0])
Parameters
[in]keyFunction key.See GO2STechnoFunc::GetFunctionList to get the list of available keys. See https://go2cam.scrollhelp.site/en/go2cam/V611/aa-techno-functions to know more about techno functions.
[in]paramsParameters of the function. This array can have a maximum 9 values depending of the key
[in]timeDuration of the function in seconds
[in]planNbPlan number
[in]nameName of function in machining tree
[in]commentComment

◆ CreateSpgCall()

void GO2STechnoFunc::CreateSpgCall ( Number spgNumber,
Number manipType,
GO2SXYZ v,
Number value = 0,
Number numberOfCall = 1,
String name = "",
String comment = "" )
inline

Initialize a subprogram call

Remarks
this method creates the call but does not add it in the machining tree. See GO2STechnoFunc::Add to place the call in the tree
Parameters
[in]spgNumberSubprogram number to call
[in]manipTypeManipulation type to apply to the subprogram
  • 1 : translation defined by v
  • 2 : symmetry along the line crossing the point (v.X(), v.Y(), 0) with the angle 'value' in degree
  • 3 : rotation of 'value' in degree around the point (v.X(), v.Y(), 0)
  • 4 : homothety along the point (v.X(), v.Y(), 0) with the scale factor 'value'
  • 5 : rotation along X axis with the angle 'value' in degree
  • 6 : rotation along Y axis with the angle 'value' in degree
  • 7 : rotation along Z axis with the angle 'value' in degree
  • 8 : rotation along a line crossing the point defined by 'v' and parallel to X axis, with the angle 'value' in degree
v- 9 : rotation along a line crossing the point defined by 'v' and parallel to Y axis, with the angle 'value' in degree
  • 10 : rotation along a line crossing the point defined by 'v' and parallel to Z axis, with the angle 'value' in degree - 11 : translation of 'v' + rotation of value' in degree[in] Parameters arrays for function
[in]valueValue to set angle or coef depending on manipulation type
[in]numberOfCallNumber of calls of the subprogram
[in]nameName of the call in machining tree
[in]commentComment

◆ GetFunctionList()

Array< String > GO2STechnoFunc::GetFunctionList ( )
inline
Returns
the list of function types and parameters