0024023: Revamp the OCCT Handle -- ambiguity
[occt.git] / src / Approx / Approx_ComputeCLine.cdl
CommitLineData
b311480e 1-- Created on: 1993-05-14
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--
d5f74e42 8-- This library is free software; you can redistribute it and/or modify it under
9-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 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
17generic class ComputeCLine from Approx
368cdde6 18 (MultiLine as any)
ff8178ef 19 ---Purpose: Approximate a continous MultiLine with a cutting.
20 -- The Tool of the line is the tool from AppCont.
7fd59977 21
22uses ParametrizationType from Approx,
23 SequenceOfReal from TColStd,
24 HArray1OfReal from TColStd,
25 SequenceOfMultiCurve from AppParCurves,
26 MultiCurve from AppParCurves,
27 Constraint from AppParCurves,
28 Vector from math
29
30
7fd59977 31is
32
33
34 Create(Line: MultiLine;
35 degreemin: Integer = 3;
36 degreemax: Integer = 8;
37 Tolerance3d: Real = 1.0e-5;
38 Tolerance2d: Real = 1.0e-5;
39 cutting: Boolean = Standard_False;
40 FirstC: Constraint = AppParCurves_TangencyPoint;
41 LastC: Constraint = AppParCurves_TangencyPoint)
42
43 ---Purpose: The MultiLine <Line> will be approximated until tolerances
44 -- will be reached.
45 -- The approximation will be done from degreemin to degreemax
46 -- with a cutting if the corresponding boolean is True.
47
48 returns ComputeCLine;
49
50
51
52
53 Create(degreemin: Integer = 3;
54 degreemax: Integer = 8;
55 Tolerance3d: Real = 1.0e-05;
56 Tolerance2d: Real = 1.0e-05;
57 cutting: Boolean = Standard_False;
58 FirstC: Constraint = AppParCurves_TangencyPoint;
59 LastC: Constraint = AppParCurves_TangencyPoint)
60
61 ---Purpose: Initializes the fields of the algorithm.
62
63 returns ComputeCLine;
64
65
66 Perform(me: in out; Line: MultiLine)
67 ---Purpose: runs the algorithm after having initialized the fields.
68
69 is static;
70
71
72 Compute(me: in out; Line: MultiLine; Ufirst, Ulast: Real;
73 TheTol3d, TheTol2d: in out Real)
74 ---Purpose: is internally used by the algorithms.
75
76 returns Boolean
77 is static private;
78
79
80 SetDegrees(me: in out; degreemin, degreemax: Integer)
81 ---Purpose: changes the degrees of the approximation.
82
83 is static;
84
85
86 SetTolerances(me: in out; Tolerance3d, Tolerance2d: Real)
87 ---Purpose: Changes the tolerances of the approximation.
88
89 is static;
90
91
92 SetConstraints(me: in out; FirstC, LastC: Constraint)
93 ---Purpose: Changes the constraints of the approximation.
94
95 is static;
96
97
98 IsAllApproximated(me)
99 ---Purpose: returns False if at a moment of the approximation,
100 -- the status NoApproximation has been sent by the user
101 -- when more points were needed.
102
103 returns Boolean
104 is static;
105
106 IsToleranceReached(me)
107 ---Purpose: returns False if the status NoPointsAdded has been sent.
108
109 returns Boolean
110 is static;
111
112
113 Error(me; Index: Integer; tol3d: in out Real; tol2d: in out Real)
114 ---Purpose: returns the tolerances 2d and 3d of the <Index> MultiCurve.
115
116 is static;
117
118
119 NbMultiCurves(me)
120 ---Purpose: Returns the number of MultiCurve doing the approximation
121 -- of the MultiLine.
122 returns Integer
123 is static;
124
125
126 Value(me; Index: Integer = 1)
127 ---Purpose: returns the approximation MultiCurve of range <Index>.
128
129 returns MultiCurve from AppParCurves;
130
131
132 Parameters(me; Index: Integer; firstp, lastp: in out Real)
133 ---purpose: returns the first and last parameters of the
134 -- <Index> MultiCurve.
135 is static;
136
137
138fields
139
140
141myMultiCurves: SequenceOfMultiCurve from AppParCurves;
142myfirstparam: SequenceOfReal from TColStd;
143mylastparam: SequenceOfReal from TColStd;
144TheMultiCurve: MultiCurve from AppParCurves;
145alldone: Boolean;
146tolreached: Boolean;
147Tolers3d: SequenceOfReal from TColStd;
148Tolers2d: SequenceOfReal from TColStd;
149mydegremin: Integer;
150mydegremax: Integer;
151mytol3d: Real;
152mytol2d: Real;
153currenttol3d: Real;
154currenttol2d: Real;
155mycut: Boolean;
156myfirstC: Constraint;
368cdde6 157mylastC: Constraint;
7fd59977 158
159
160end ComputeCLine;