GO2cam Javascript API  6.11
GO2SSimpleGeometry Class Reference

Intermediate class for simple wire geometry (segment, arc, circle line, nurbs...) More...

Inheritance diagram for GO2SSimpleGeometry:
GO2SWireGeometry GO2SGeometry GO2SArc GO2SChamfer GO2SCircle GO2SEllipse GO2SFillet GO2SHelix GO2SHole GO2SLine GO2SNurbs GO2SPoint GO2SPolyline GO2SSegment

Public Member Functions

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

Intermediate class for simple wire geometry (segment, arc, circle line, nurbs...)

Member Function Documentation

◆ Cut()

Array< GO2SGeometry > GO2SSimpleGeometry::Cut ( GO2SXYZ pt)

Cut the geometry at a specific point

Warning
if the point is not on the curve it will be projected
Returns
the 2 geom that result the operation or []

◆ GetCenterPoint()

GO2SXYZ GO2SSimpleGeometry::GetCenterPoint ( )
Returns
the center of the wire geometry

◆ GetFirstPoint()

GO2SXYZ GO2SSimpleGeometry::GetFirstPoint ( )
overridevirtual
Returns
the first point of the geometry (the first point of the first element in case of multiple geometry)

Implements GO2SWireGeometry.

◆ GetLastPoint()

GO2SXYZ GO2SSimpleGeometry::GetLastPoint ( )
overridevirtual
Returns
the last point of the geometry (the last point of the last element in case of multiple geometry)

Implements GO2SWireGeometry.

◆ GetLength()

Number GO2SSimpleGeometry::GetLength ( )
overridevirtual
Returns
the full length of the geometry (sum of all entities length in case of multiple geometry)

Implements GO2SWireGeometry.

◆ GetMidPoint()

GO2SXYZ GO2SSimpleGeometry::GetMidPoint ( )
Returns
the middle point of the wire geometry

◆ GetNormalOnCurve()

GO2SXYZ GO2SSimpleGeometry::GetNormalOnCurve ( Number t)
overridevirtual
Returns
the normal on a geometry. In case of GO2SMultipleGeometry, the geometry must be continuous.
Version
6.11.206
Parameters
[in]tposition [0,1] on the geometry where to get the xyz coordinates, with 0 for 1st point and 1 for last point

Implements GO2SWireGeometry.

◆ GetPositionOnCurve()

GO2SXYZ GO2SSimpleGeometry::GetPositionOnCurve ( Number t)
overridevirtual
Returns
the position on a geometry. In case of GO2SMultipleGeometry, the geometry must be continuous.
Parameters
[in]tposition [0,1] on the geometry where to get the xyz coordinates, with 0 for 1st point and 1 for last point

Implements GO2SWireGeometry.

◆ GetProjPoint()

GO2SXYZ GO2SSimpleGeometry::GetProjPoint ( GO2SXYZ point)
overridevirtual

Compute the projection of a point on the wire geometry

Warning
No construction history is attached, only xyz coordinates are computed

Implements GO2SWireGeometry.

◆ GetT()

Number GO2SSimpleGeometry::GetT ( GO2SXYZ point)
overridevirtual
Returns
the t position at a given position (xyz). 0 corresponds to the first point of the geometry, 1 to the last point. if an error occurred, returns -1
Version
6.11.206
Parameters
[in]pointposition (xyz) on the geometry where to get the t parameter

Implements GO2SWireGeometry.

◆ GetTangentOnCurve()

GO2SXYZ GO2SSimpleGeometry::GetTangentOnCurve ( Number t)
overridevirtual
Returns
the tangent on a geometry. In case of GO2SMultipleGeometry, the geometry must be continuous.
Version
6.11.206
Parameters
[in]tposition [0,1] on the geometry where to get the xyz coordinates, with 0 for 1st point and 1 for last point

Implements GO2SWireGeometry.

◆ IsClose()

Boolean GO2SSimpleGeometry::IsClose ( )
overridevirtual
Returns
if the geometry is closed

Implements GO2SWireGeometry.

◆ Trim()

GO2SGeometry GO2SSimpleGeometry::Trim ( Boolean keepStart,
GO2SXYZ endTrim )

Trim a geometry

Returns
the new trimmed geometry
Parameters
[in]keepStartif we keep the starting point of the geometry or the end point
[in]endTrimthe end of the trim