GO2cam Javascript API  6.11
GO2SChamfer Class Reference

Chamfer object. More...

Inheritance diagram for GO2SChamfer:
GO2SSimpleGeometry GO2SWireGeometry GO2SGeometry

Public Member Functions

 GO2SChamfer ()
 Default constructor.
 
 GO2SChamfer (GO2SSegment seg1, GO2SSegment seg2, Number distance)
 See GO2SChamfer.SetFrom2Segments.
 
Array< GO2SSimpleGeometryGetAdjacentEntities ()
 
GO2SEnum::GO2SError SetFrom2Segments (GO2SSegment seg1, GO2SSegment seg2, Number distance)
 
GO2SEnum::GO2SError SetFrom2Segments2Distances (GO2SSegment seg1, GO2SSegment seg2, Number distance1, Number distance2)
 
GO2SEnum::GO2SError SetFrom2SegmentsDistanceAngle (GO2SSegment seg1, GO2SSegment seg2, Number distance, Number angle)
 
- 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

Chamfer object.

// create 3 points
var A = new GO2SXYZ(-10,-10,0)
var B = new GO2SXYZ(10,-10,0)
var D = new GO2SXYZ(-10,10,0)
// create 2 segments between points
var AB = new GO2SSegment(A,B)
var DA = new GO2SSegment(D,A)
// create a 5mm chamfer between segments
new GO2SChamfer(DA,AB,5)

Member Function Documentation

◆ GetAdjacentEntities()

Array< GO2SSimpleGeometry > GO2SChamfer::GetAdjacentEntities ( )
inline
Returns
the 2 entities modified by the chamfer
Remarks
if the chamfer is built in the script (SetFrom2Segments for example), the returned array is ordered so that the 1st element of the array is the trim of the 1st segment given as parameter

◆ SetFrom2Segments()

GO2SEnum::GO2SError GO2SChamfer::SetFrom2Segments ( GO2SSegment seg1,
GO2SSegment seg2,
Number distance )

Create a chamfer between 2 segments with a same distance for both segments

Returns
GO2SError.success (0) if success, see GO2SError otherwise
Parameters
[in]seg1the first segment
[in]seg2the second segment
[in]distancedistance of the chamfer

◆ SetFrom2Segments2Distances()

GO2SEnum::GO2SError GO2SChamfer::SetFrom2Segments2Distances ( GO2SSegment seg1,
GO2SSegment seg2,
Number distance1,
Number distance2 )

Create a chamfer between 2 segments with a different distance for both segments

Returns
GO2SError.success (0) if success, see GO2SError otherwise
Parameters
[in]seg1the first segment
[in]seg2the second segment
[in]distance1the distance of the chamfer on the first segment
[in]distance2the distance of the chamfer on the second segment

◆ SetFrom2SegmentsDistanceAngle()

GO2SEnum::GO2SError GO2SChamfer::SetFrom2SegmentsDistanceAngle ( GO2SSegment seg1,
GO2SSegment seg2,
Number distance,
Number angle )

Create a chamfer between 2 segments with a distance and an angle

Returns
GO2SError.success (0) if success, see GO2SError otherwise
Parameters
[in]seg1the first segment
[in]seg2the second segment
[in]distancethe distance of the chamfer on the first segment
[in]anglethe angle of the chamfer