0024428: Implementation of LGPL license
[occt.git] / src / Approx / Approx_TheLineTool.cdl
CommitLineData
b311480e 1-- Created on: 1993-01-26
2-- Created by: Laurent PAINNOT
3-- Copyright (c) 1993-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
973c2be1 8-- This library is free software; you can redistribute it and / or modify it
9-- under the terms of the GNU Lesser General Public version 2.1 as published
10-- by the Free Software Foundation, with special exception defined in the file
11-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12-- distribution for complete text of the license and disclaimer of any warranty.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17deferred generic class TheLineTool from Approx (MLine as any;
18 MPoint as any)
19
20 ---Purpose: Template which defines all the services relative to
21 -- a MultiLine for approximation algorithms.
22
23uses Status from Approx,
24 Pnt from gp,
25 Pnt2d from gp,
26 Vec from gp,
27 Vec2d from gp,
28 Array1OfPnt from TColgp,
29 Array1OfPnt2d from TColgp,
30 Array1OfVec from TColgp,
31 Array1OfVec2d from TColgp
32
33is
34
35
36 FirstPoint(myclass; ML: MLine) returns Integer;
37 ---Purpose: Returns the first index of multipoints of the MLine.
38
39
40 LastPoint(myclass; ML: MLine) returns Integer;
41 ---Purpose: Returns the last index of multipoints of the MLine.
42
43
44
45 NbP2d(myclass; ML: MLine) returns Integer;
46 ---Purpose: Returns the number of 2d points of a MLine.
47
48
49 NbP3d(myclass; ML: MLine) returns Integer;
50 ---Purpose: Returns the number of 3d points of a MLine.
51
52
53 Value(myclass; ML: MLine; MPointIndex: Integer; tabPt: out Array1OfPnt);
54 ---Purpose: returns the 3d points of the multipoint <MPointIndex>
55 -- when only 3d points exist.
56
57
58 Value(myclass; ML: MLine; MPointIndex: Integer;
59 tabPt2d: out Array1OfPnt2d);
60 ---Purpose: returns the 2d points of the multipoint <MPointIndex>
61 -- when only 2d points exist.
62
63
64 Value(myclass; ML: MLine; MPointIndex: Integer;
65 tabPt: out Array1OfPnt; tabPt2d: out Array1OfPnt2d);
66 ---Purpose: returns the 3d and 2d points of the multipoint
67 -- <MPointIndex>.
68
69
70 Tangency(myclass; ML: MLine; MPointIndex: Integer; tabV: out Array1OfVec)
71 returns Boolean;
72 ---Purpose: returns the 3d derivative values of the multipoint
73 -- <MPointIndex> when only 3d points exist.
74
75
76 Tangency(myclass; ML: MLine; MPointIndex: Integer;
77 tabV2d: out Array1OfVec2d)
78 returns Boolean;
79 ---Purpose: returns the 2d derivative values of the multipoint
80 -- <MPointIndex> only when 2d points exist.
81
82
83 Tangency(myclass; ML: MLine; MPointIndex: Integer;
84 tabV: out Array1OfVec; tabV2d: out Array1OfVec2d)
85 returns Boolean;
86 ---Purpose: returns the 3d and 2d derivative values of the multipoint
87 -- <MPointIndex>.
88
89
90
91 WhatStatus(myclass; ML: MLine; I1, I2: Integer)
92 returns Status from Approx;
93 ---Purpose: . if Status = PointsAdded, a new MLine is created between
94 -- the two MPoints <I1> and <I2> of ML by MakeMLBetween.
95 -- . if Status = NoPointsAdded, no MLine will be created.
96 -- The algorithm will return the best approximation done.
97 -- . if Status = NoApproximation, nothing will be
98 -- done between <I1> and <I2>.
99
100 MakeMLBetween(myclass; ML: MLine; I1, I2: Integer;
101 NbPMin: Integer)
102 returns MLine;
103 ---Purpose: Is called if WhatStatus returned "PointsAdded".
104
105end TheLineTool;
106