GO2cam Javascript API  6.11
GO2SArc Class Reference

Arc object. More...

Inheritance diagram for GO2SArc:
GO2SSimpleGeometry GO2SWireGeometry GO2SGeometry

Public Member Functions

 GO2SArc ()
 Default constructor.
 
 GO2SArc (GO2SXYZ p1, GO2SXYZ p2, GO2SXYZ p3)
 
Number GetAngle ()
 
Number GetRadius ()
 
Number GetStartAngle ()
 
Boolean IsCCW ()
 
GO2SEnum::GO2SError SetFrom3Points (GO2SXYZ p1, GO2SXYZ p2, GO2SXYZ p3)
 
GO2SEnum::GO2SError SetFromAngles (GO2SXYZ center, Number radius, Number start, Number end)
 
GO2SEnum::GO2SError SetFromCenterStartEnd (GO2SXYZ center, GO2SXYZ start, GO2SXYZ end)
 
- Public Member Functions inherited from GO2SSimpleGeometry
Array< GO2SGeometryCut (GO2SXYZ pt)
 
GO2SXYZ GetCenterPoint ()
 
GO2SXYZ GetDirectionOnCurve (Number t)
 Deprecated, use GetTangentOnCurve.
 
GO2SXYZ GetFirstPoint () override
 
GO2SXYZ GetLastPoint () override
 
Number GetLength () override
 
GO2SXYZ GetMidPoint ()
 
GO2SXYZ GetNormalOnCurve (Number t) override
 
GO2SXYZ GetPositionOnCurve (Number t) override
 
GO2SXYZ GetProjPoint (GO2SXYZ point) override
 
Number GetT (GO2SXYZ point) override
 
GO2SXYZ GetTangentOnCurve (Number t) override
 
Boolean IsClose () override
 
GO2SGeometry Trim (Boolean keepStart, GO2SXYZ endTrim)
 
- Public Member Functions inherited from GO2SGeometry
GO2SEnum::GO2SError ChangePlane (Number plane)
 
GO2SGeometry Copy ()
 
GO2SEnum::GO2SError Delete ()
 
Array< GO2SXYZDiscretize (Number accuracy=0.01)
 
Boolean Equals (GO2SGeometry other)
 
Array< GO2SXYZGetBoundingBox ()
 
Number GetColor ()
 
Array< GO2SEnum::GO2SParamGetEditableParams ()
 
Number GetLayer ()
 
Number GetLineType ()
 
Number GetLineWidth ()
 
String GetName ()
 
Number GetParam (GO2SEnum::GO2SParam param)
 
GO2SGeometry GetParent ()
 
Number GetPlane ()
 
GO2SXYZ GetPosition ()
 
Boolean IsCircular ()
 
Boolean IsLinear ()
 
Boolean IsParamEditable (GO2SEnum::GO2SParam param)
 
Boolean IsPoint ()
 
Boolean IsPositionEditable ()
 
Boolean IsSolid ()
 
Boolean IsValid ()
 
Boolean IsVisible ()
 
Boolean IsWireframe ()
 
GO2SGeometry Rotated (GO2SXYZ xyz, Number angle, Boolean xyzDir)
 
GO2SEnum::GO2SError SetColor (Number color)
 
GO2SEnum::GO2SError SetLayer (Number layer)
 
GO2SEnum::GO2SError SetLineType (ELineType type)
 
GO2SEnum::GO2SError SetLineWidth (Number width)
 
GO2SEnum::GO2SError SetName (String p1)
 
GO2SEnum::GO2SError SetParam (GO2SEnum::GO2SParam param, Number value)
 
GO2SEnum::GO2SError SetPlane (Number plane)
 
GO2SEnum::GO2SError SetPolarPosition (Number radius, Number angle, Number altitude=0)
 
GO2SEnum::GO2SError SetPosition (GO2SXYZpos)
 
GO2SEnum::GO2SError SetPosition (Number x, Number y, Number z)
 
GO2SEnum::GO2SError SetVisible (Boolean visibility)
 
String toString ()
 
GO2SEnum::GO2SError Transform (GO2SMatrix matrix)
 
GO2SGeometry Transformed (GO2SMatrix matrix)
 
GO2SGeometry Translated (GO2SXYZ origin, GO2SXYZ p)
 

Detailed Description

Arc object.

Constructor & Destructor Documentation

◆ GO2SArc()

GO2SArc::GO2SArc ( GO2SXYZ p1,
GO2SXYZ p2,
GO2SXYZ p3 )

See GO2SArc.SetFromCenterStartEnd

var c = new GO2SXYZ
var p1 = new GO2SXYZ(10,0,0)
var p2 = new GO2SXYZ(0,10,0)
var arc = new GO2SArc(c, p1, p2)

Member Function Documentation

◆ GetAngle()

Number GO2SArc::GetAngle ( )
Returns
the angle of the arc in degree

◆ GetRadius()

Number GO2SArc::GetRadius ( )
Returns
the radius of the arc

◆ GetStartAngle()

Number GO2SArc::GetStartAngle ( )
Returns
the start angle of the arc
Warning
the result is correct only if the arc is drawn in 2D

◆ IsCCW()

Boolean GO2SArc::IsCCW ( )
Returns
if the arc is CCW

◆ SetFrom3Points()

GO2SEnum::GO2SError GO2SArc::SetFrom3Points ( GO2SXYZ p1,
GO2SXYZ p2,
GO2SXYZ p3 )

Create the arc from a starting point, an ending point, and a crossing point

Returns
GO2SError.success (0) if success, see GO2SError otherwise
Parameters
[in]p1First point the of arc
[in]p2Last point the of arc
[in]p3a crossing point

◆ SetFromAngles()

GO2SEnum::GO2SError GO2SArc::SetFromAngles ( GO2SXYZ center,
Number radius,
Number start,
Number end )

Create the arc given start and end angles

Returns
GO2SError.success (0) if success, see GO2SError otherwise
Parameters
[in]centercenter of the arc
[in]radiusradius of the arc
[in]startstart angle in degree
[in]endend angle in degree

◆ SetFromCenterStartEnd()

GO2SEnum::GO2SError GO2SArc::SetFromCenterStartEnd ( GO2SXYZ center,
GO2SXYZ start,
GO2SXYZ end )

Create the arc given a center, a starting point and an ending point. The arc will goes counterclockwise

Returns
GO2SError.success (0) if success, see GO2SError otherwise
var c = new GO2SXYZ
var p1 = new GO2SXYZ(10,0,0)
var p2 = new GO2SXYZ(0,10,0)
var arc = new GO2SArc
arc.SetFromCenterStartEnd(c, p1, p2)
Parameters
[in]centerCenter of the arc
[in]startFirst point of the arc
[in]endLast point of the arc