1 -- File: Approx_ComputeCSurface.cdl
2 -- Created: Thu Sep 9 16:21:47 1993
3 -- Author: Modelistation
5 ---Copyright: Matra Datavision 1993
8 generic class ComputeCSurface from Approx
10 SurfaceTool as any) --as TheLineTool from AppCont(MultiLine)
13 uses SequenceOfReal from TColStd,
14 HArray1OfReal from TColStd,
15 SequenceOfSurface from TColGeom,
16 BezierSurface from Geom,
17 Constraint from AppParCurves
21 private class MySLeastSquare instantiates SurfLeastSquare from AppCont
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)
38 ---Purpose: The Surface <Surface> will be approximated until tolerances
40 -- The approximation will be done from degreemin to degreemax
41 -- with a cutting if the corresponding boolean is True.
43 returns ComputeCSurface;
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)
57 ---Purpose: Initializes the fields of the algorithm.
59 returns ComputeCSurface;
62 Perform(me: in out; Surf: Surface)
63 ---Purpose: runs the algorithm after having initialized the fields.
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.
76 SetDegrees(me: in out; degreemin, degreemax: Integer)
77 ---Purpose: changes the degrees of the approximation.
82 SetTolerance(me: in out; Tolerance3d: Real)
83 ---Purpose: Changes the tolerances of the approximation.
89 ---Purpose: returns False if at a moment of the approximation,
96 IsToleranceReached(me)
97 ---Purpose: returns False if the status no cut has been done
104 Error(me; Index: Integer)
105 ---Purpose: returns the tolerance of the <Index> approximated Surface.
111 ---Purpose: Returns the number of Bezier Surfaces doing the
112 -- approximation of the Surface.
117 Value(me; Index: Integer = 1)
118 ---Purpose: returns the approximation Surface of range <Index>.
120 returns BezierSurface from Geom;
123 Parameters(me; Index: Integer; firstU, lastU, firstV, lastV: in out Real)
124 ---purpose: returns the first and last parameters of the
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;
140 Tolers3d: SequenceOfReal from TColStd;
146 myfirstUCons: Constraint;
147 mylastUCons: Constraint;
148 mylastVCons: Constraint;
149 mylastCons: Constraint;