GO2cam Javascript API  6.11
GO2SPlane Class Reference

Plane shape management. More...

Inherits QObject.

Public Member Functions

 GO2SPlane (Number no=MAXELT)
 Default constructor.
 
void Delete ()
 Delete the plane.
 
String GetName ()
 
Number GetNumber ()
 
GO2SEnum::GO2SError SetFrom3Points (GO2SXYZ origin, GO2SXYZ xAxis, GO2SXYZ yAxis)
 
GO2SEnum::GO2SError SetFromAngle (GO2SXYZ origin, Number angle, GO2SEnum::GO2SAxis axis)
 
GO2SEnum::GO2SError SetFromMatrix (GO2SMatrix matrix)
 
GO2SEnum::GO2SError SetName (String name)
 

Detailed Description

Plane shape management.

let plan = new GO2SPlane
plan.SetFrom3Points(pts[0].toXYZ(), pts[1].toXYZ(), pts[2].toXYZ())
GO2SGeometryUtil.SetUsedPlane(plan.GetNumber())
new GO2SCircle(new GO2SXYZ(0, 0, 0), 20)
Circle object.
Definition GO2SCircle.hpp:8
Class for utilitary methods of geometric entities.
Definition GO2SGeometryUtil.hpp:11
static Array< GO2SGeometry > GetPoints(Number color=-1, Number layer=-1, Number plane=-1)
static void SetUsedPlane(Number newPlane=-1)
Definition GO2SGeometryUtil.hpp:133
Plane shape management.
Definition GO2SPlane.hpp:21
GO2SEnum::GO2SError SetFrom3Points(GO2SXYZ origin, GO2SXYZ xAxis, GO2SXYZ yAxis)
Creation of a coordinate reference.
Definition GO2SXYZ.hpp:81

Constructor & Destructor Documentation

◆ GO2SPlane()

GO2SPlane::GO2SPlane ( Number no = MAXELT)
inline

Default constructor.

Parameters
[in]nonumber of an existing plane number

Member Function Documentation

◆ GetName()

String GO2SPlane::GetName ( )
Returns
the name of the plane

◆ GetNumber()

Number GO2SPlane::GetNumber ( )
inline
Returns
the number of the plane (Reference plane is number 1)

◆ SetFrom3Points()

GO2SEnum::GO2SError GO2SPlane::SetFrom3Points ( GO2SXYZ origin,
GO2SXYZ xAxis,
GO2SXYZ yAxis )

Create a plane from 3 points

Remarks
a new plane will be created in the database and the number of the plane will be updated
Returns
GO2SError.success (0) if success, see GO2SError otherwise
Parameters
[in]originorigin of the plane
[in]xAxiscoordinates of a point in X axis of the plane
[in]yAxiscoordinates of a point in Y axis of the plane

◆ SetFromAngle()

GO2SEnum::GO2SError GO2SPlane::SetFromAngle ( GO2SXYZ origin,
Number angle,
GO2SEnum::GO2SAxis axis )

Create a plane by rotating the current plane

Remarks
a new plane will be created in the database and the number of the plane will be updated
Returns
GO2SError.success (0) if success, see GO2SError otherwise
Parameters
[in]originnew origin for the plane
[in]anglerotation angle in degree
[in]axisrotation axis

◆ SetFromMatrix()

GO2SEnum::GO2SError GO2SPlane::SetFromMatrix ( GO2SMatrix matrix)

Use matrix to define a plane

Remarks
a new plane will be created in the database and the number of the plane will be updated
Returns
GO2SError.success (0) if success, see GO2SError otherwise
Parameters
[in]matrixthe matrix defining the plane

◆ SetName()

GO2SEnum::GO2SError GO2SPlane::SetName ( String name)

Set the name of the plane

Returns
GO2SError.success (0) if success, see GO2SError otherwise
Parameters
[in]namenew name for the plane