Integration of OCCT 6.5.0 from SVN
[occt.git] / src / Approx / Approx_ComputeCSurface.cdl
1 -- File:        Approx_ComputeCSurface.cdl
2 -- Created:     Thu Sep  9 16:21:47 1993
3 -- Author:      Modelistation
4 --              <model@zerox>
5 ---Copyright:    Matra Datavision 1993
6
7
8 generic class ComputeCSurface from Approx 
9                     (Surface as any;
10                      SurfaceTool  as any) --as TheLineTool from AppCont(MultiLine)
11
12
13 uses SequenceOfReal            from TColStd,
14      HArray1OfReal             from TColStd,
15      SequenceOfSurface         from TColGeom,
16      BezierSurface             from Geom,
17      Constraint                from AppParCurves
18      
19      
20
21 private class MySLeastSquare instantiates SurfLeastSquare from AppCont
22                                        (Surface,
23                                         SurfaceTool);
24                                                           
25 is
26
27
28     Create(Surf:            Surface;
29            degreemin:       Integer = 4;
30            degreemax:       Integer = 8;
31            Tolerance3d:     Real    = 1.0e-3;
32            FirstCons:       Constraint = AppParCurves_TangencyPoint;
33            LastUCons:       Constraint = AppParCurves_TangencyPoint;
34            LastVCons:       Constraint = AppParCurves_TangencyPoint;
35            LastCons:        Constraint = AppParCurves_TangencyPoint;
36            cutting:         Boolean = Standard_False)
37            
38         ---Purpose: The Surface <Surface> will be approximated until tolerances
39         --          will be reached.
40         --          The approximation will be done from degreemin to degreemax
41         --          with a cutting if the corresponding boolean is True.
42
43     returns ComputeCSurface;
44
45
46
47
48     Create(degreemin:       Integer = 3;
49            degreemax:       Integer = 8;
50            Tolerance3d:     Real    = 1.0e-03; 
51            FirstCons:       Constraint = AppParCurves_TangencyPoint;
52            LastUCons:       Constraint = AppParCurves_TangencyPoint;
53            LastVCons:       Constraint = AppParCurves_TangencyPoint;
54            LastCons:        Constraint = AppParCurves_TangencyPoint;
55            cutting:         Boolean = Standard_False)
56            
57         ---Purpose: Initializes the fields of the algorithm.
58
59     returns ComputeCSurface;
60
61
62     Perform(me: in out; Surf: Surface)
63         ---Purpose: runs the algorithm after having initialized the fields.
64     
65     is static;
66
67
68     Compute(me: in out; Surf: Surface; Ufirst, Ulast, Vfirst, Vlast: Real;
69             TheTol3d: in out Real)
70         ---Purpose: is internally used by the algorithms.
71
72     returns Boolean
73     is static private;
74     
75     
76     SetDegrees(me: in out; degreemin, degreemax: Integer)
77         ---Purpose: changes the degrees of the approximation.
78     
79     is static;
80     
81     
82     SetTolerance(me: in out; Tolerance3d: Real)
83         ---Purpose: Changes the tolerances of the approximation.
84     
85     is static;
86     
87     
88     IsAllApproximated(me) 
89         ---Purpose: returns False if at a moment of the approximation,
90         --          NotDone was sent.
91     
92     returns Boolean
93     is static;
94     
95     
96     IsToleranceReached(me)
97         ---Purpose: returns False if the status no cut has been done
98         --          if necessary.
99     
100     returns Boolean
101     is static;
102     
103
104     Error(me; Index: Integer)
105         ---Purpose: returns the tolerance of the <Index> approximated Surface.
106     returns Real
107     is static;
108     
109
110     NbSurfaces(me)
111         ---Purpose: Returns the number of Bezier Surfaces doing the 
112         --          approximation of the Surface.
113     returns Integer
114     is static;
115
116
117     Value(me; Index: Integer = 1)
118         ---Purpose: returns the approximation Surface of range <Index>.
119
120     returns BezierSurface from Geom;
121
122             
123     Parameters(me; Index: Integer; firstU, lastU, firstV, lastV: in out Real)
124         ---purpose: returns the first and last parameters of the 
125         --          <Index> Surface.
126     is static;
127             
128
129 fields
130
131
132 mySurfaces:    SequenceOfSurface    from TColGeom;
133 myfirstUparam: SequenceOfReal       from TColStd;
134 mylastUparam:  SequenceOfReal       from TColStd;
135 myfirstVparam: SequenceOfReal       from TColStd;
136 mylastVparam:  SequenceOfReal       from TColStd;
137 TheSurface:    BezierSurface        from Geom;
138 alldone:       Boolean;
139 tolreached:    Boolean;
140 Tolers3d:      SequenceOfReal from TColStd;
141 mydegremin:    Integer;
142 mydegremax:    Integer;
143 mytol3d:       Real;
144 currenttol3d:  Real;
145 mycut:         Boolean;
146 myfirstUCons:  Constraint;
147 mylastUCons:   Constraint;
148 mylastVCons:   Constraint;
149 mylastCons:    Constraint;
150
151
152
153 end ComputeCSurface;