Interface classes |
Top Previous Next |
|
Sprut4 connects to application programming interfaces via interface classes. Interface class declaration: type tintf1 = class external '<dll-name>' name '<class-name>' procedure meth1(<parameters list>) external '<external method name>' end
For example this class is used to interface with CAM 'IST_Curve' interface
type IST_Curve = class external 'sckernel_intf.dll' name 'IST_Curve' function Get_QntP: Integer external 'Get_QntP' function Get_KnotPoint(i: Integer): TST3DPoint external 'Get_KnotPoint' function Get_TMin: float external 'Get_TMin' function Get_TMax: float external 'Get_TMax' function Get_EndPoint(IsStart: integer): TST3DPoint external 'Get_EndPoint' function Get_EndTangent(IsStart: integer): TST3DPoint external 'Get_EndTangent' function Get_SpanSTangent(Span: Integer): TST3DPoint external 'Get_SpanSTangent' function Get_SpanTTangent(Span: Integer): TST3DPoint external 'Get_SpanTTangent' function Get_FullLen: float external 'Get_FullLen' function Get_CurveArea: float external 'Get_CurveArea' function Get_IsClosed: integer external 'Get_IsClosed' function Get_Direction: integer external 'Get_Direction' function Get_Box: TST3DBox external 'Get_Box' function Get_Dimension: Integer external 'Get_Dimension' procedure Set_Dimension(Value: Integer) external 'Set_Dimension' function Get_Point(t: float): TST3DPoint external 'Get_Point' function Get_PointL(LParam: float): TST3DPoint external 'Get_PointL' function Get_UnitTangent(t: float; IsForward: integer): TST3DPoint external 'Get_UnitTangent' function Get_Deriv(t: float; IsForward: integer): TST3DPoint external 'Get_Deriv' function Get_Len(t1: float; t2: float): float external 'Get_Len' function LenToParam(LParam: float): float external 'LenToParam' function Get_Flag(t: float): Integer external 'Get_Flag' function Set_Flag(t1: float; t2: float; Flag: Integer): integer external 'Set_Flag' function FindRangeWithFlag(Flag: Integer; TMin: float; TMax: float; t1: float; t2: float): integer external 'FindRangeWithFlag' function FindNearestPoint(pp: TST3DPoint; t1: float; t2: float): float external 'FindNearestPoint' procedure Inverse external 'Inverse' function GetCopy: IST_Curve external 'GetCopy' procedure SavePartToReceiver(Receiver: IST_CurveReceiver; t1: float; t2: float; Tol: float) external 'SavePartToReceiver' end |