GO2cam Javascript API  6.11
GO2SInteract Class Reference

Class to manage interactivity with GO2cam. More...

Inherits QObject.

Static Public Member Functions

static void CheckLicenceFeature (String name)
 Check if the feature name of the licence is valid.
 
static void ClearAll (Boolean askSave=false)
 Reset GO2cam content (same than creating a new empty file)
 
static GO2SEnum::GO2SContext GetCurrentContext ()
 
static GO2SGeometry PickEntity (String forcedMessage="")
 
static GO2SReference PickReference (String forcedMessage="")
 
static GO2SXYZ PickXYZ (String forcedMessage="")
 
static GO2SXYZ PickXYZWithPreview (Array< GO2SGeometry > preview, String forcedMessage="")
 
static void Redraw (Boolean reframe=false)
 Force the 3D scene to be redrawn.
 
static void SetCurrentContext (GO2SEnum::GO2SContext ctx)
 
static void SetLayerName (Number layerNo, String name)
 
static void StartSelection ()
 Ask for a selection in the 3D scene. When selection is done, selected elements can be retrieved with GO2SGeometryUtil::GetSelected()
 
static void UpdateAll ()
 Update geometry and machining.
 
static void UpdateGeometry ()
 Update geometry.
 
static void UpdateMachining ()
 Update machining.
 

Detailed Description

Class to manage interactivity with GO2cam.

Member Function Documentation

◆ CheckLicenceFeature()

static void GO2SInteract::CheckLicenceFeature ( String name)
static

Check if the feature name of the licence is valid.

Parameters
[in]namename of the feature

◆ ClearAll()

static void GO2SInteract::ClearAll ( Boolean askSave = false)
static

Reset GO2cam content (same than creating a new empty file)

Parameters
[in]askSaveif true, ask to save the pce file before clear

◆ GetCurrentContext()

static GO2SEnum::GO2SContext GO2SInteract::GetCurrentContext ( )
static

Get current GO2cam context

Warning
Allow to read the current context of GO2cam
Version
6.11.205

◆ PickEntity()

static GO2SGeometry GO2SInteract::PickEntity ( String forcedMessage = "")
static

Ask for an entity to be picked in the 3D scene When picking on a solid face or edge, returns the whole solid. To get faces or edges, see GO2SInteract.PickReference

Returns
A geometry
Parameters
[in]forcedMessageoptional message to be displayed in the dialog bar

◆ PickReference()

static GO2SReference GO2SInteract::PickReference ( String forcedMessage = "")
static

Ask for an entity to be picked in the 3D scene. This function allows to get references on faces or edges when clicking on a solid.

Version
6.11.204
Returns
a reference on the entity (see GO2SReference.GetGeometry()).
Parameters
[in]forcedMessageoptional message to be displayed in the dialog bar

◆ PickXYZ()

static GO2SXYZ GO2SInteract::PickXYZ ( String forcedMessage = "")
static

Ask for XYZ to be picked in the 3D scene

Returns
Picked position
Parameters
[in]forcedMessageoptional message to be displayed in the dialog bar

◆ PickXYZWithPreview()

static GO2SXYZ GO2SInteract::PickXYZWithPreview ( Array< GO2SGeometry > preview,
String forcedMessage = "" )
static

Ask for a point picked in the 3D scene + display a preview under the mouse

Remarks
the function automatically deletes the geometry given to make the preview
var preview = new GO2SCircle(new GO2SXYZ, 10)
var newPos = GO2SInteract.PickPointWithPreview([preview])
var circle = new GO2SCircle(newPos, 10)
Circle object.
Definition GO2SCircle.hpp:8
Class to manage interactivity with GO2cam.
Definition GO2SInteract.hpp:12
Creation of a coordinate reference.
Definition GO2SXYZ.hpp:81
Returns
Picked position
Parameters
[in]previewList of geometries to put under the mouse

◆ Redraw()

static void GO2SInteract::Redraw ( Boolean reframe = false)
static

Force the 3D scene to be redrawn.

Parameters
[in]reframeif true, reframe the view

◆ SetCurrentContext()

static void GO2SInteract::SetCurrentContext ( GO2SEnum::GO2SContext ctx)
static

Change GO2Cam context

Warning
Use to create a geometry or Opelist in milling or turning context
Version
6.11.205
Parameters
[in]ctxctx new wanted context

◆ SetLayerName()

static void GO2SInteract::SetLayerName ( Number layerNo,
String name )
static

Set the name of a layer

Version
6.11.205
Parameters
[in]layerNolayer number to rename
[in]namename of the layer