7fd59977 |
1 | -- File: GeomLib_MakeCurvefromApprox.cdl |
2 | -- Created: Tue Jun 13 10:15:20 1995 |
3 | -- Author: Bruno DUMORTIER |
4 | -- <dub@fuegox> |
5 | ---Copyright: Matra Datavision 1995 |
6 | |
7 | |
8 | |
9 | class MakeCurvefromApprox from GeomLib |
10 | |
11 | ---Purpose: this class is used to construct the BSpline curve |
12 | -- from an Approximation ( ApproxAFunction from AdvApprox). |
13 | |
14 | |
15 | uses |
16 | |
17 | ApproxAFunction from AdvApprox, |
18 | BSplineCurve from Geom, |
19 | BSplineCurve from Geom2d |
20 | |
21 | raises |
22 | |
23 | NotDone from StdFail, |
24 | OutOfRange from Standard |
25 | |
26 | is |
27 | |
28 | Create( Approx : ApproxAFunction from AdvApprox) |
29 | returns MakeCurvefromApprox from GeomLib; |
30 | |
31 | IsDone(me) returns Boolean from Standard |
32 | ---C++: inline |
33 | is static; |
34 | |
35 | Nb1DSpaces(me) returns Integer from Standard |
36 | ---Purpose: returns the number of 1D spaces of the Approx |
37 | is static; |
38 | |
39 | Nb2DSpaces(me) returns Integer from Standard |
40 | ---Purpose: returns the number of 3D spaces of the Approx |
41 | is static; |
42 | |
43 | Nb3DSpaces(me) returns Integer from Standard |
44 | ---Purpose: returns the number of 3D spaces of the Approx |
45 | is static; |
46 | |
47 | Curve2d(me; Index2d : Integer from Standard) |
48 | ---Purpose: returns a polynomial curve whose poles correspond to |
49 | -- the Index2d 2D space |
50 | returns BSplineCurve from Geom2d |
51 | raises |
52 | OutOfRange from Standard, |
53 | ---Purpose: if Index2d not in the Range [1,Nb2dSpaces] |
54 | NotDone from StdFail |
55 | ---Purpose: if the Approx is not Done |
56 | is static; |
57 | |
58 | Curve2dFromTwo1d(me; Index1d : Integer from Standard; |
59 | Index2d : Integer from Standard) |
60 | ---Purpose: returns a 2D curve building it from the 1D curve |
61 | -- in x at Index1d and y at Index2d amongst the |
62 | -- 1D curves |
63 | |
64 | returns BSplineCurve from Geom2d |
65 | raises |
66 | OutOfRange from Standard, |
67 | ---Purpose: if Index1d not in the Range [1,Nb1dSpaces] |
68 | -- if Index2d not in the Range [1,Nb1dSpaces] |
69 | NotDone from StdFail |
70 | ---Purpose: if the Approx is not Done |
71 | is static; |
72 | |
73 | Curve2d(me; Index1d : Integer from Standard; |
74 | Index2d : Integer from Standard) |
75 | ---Purpose: returns a rational curve whose poles correspond to |
76 | -- the index2d of the 2D space and whose weights correspond |
77 | -- to one dimensional space of index 1d |
78 | returns BSplineCurve from Geom2d |
79 | raises |
80 | OutOfRange from Standard, |
81 | ---Purpose: if Index1d not in the Range [1,Nb1dSpaces] |
82 | -- if Index2d not in the Range [1,Nb2dSpaces] |
83 | NotDone from StdFail |
84 | ---Purpose: if the Approx is not Done |
85 | is static; |
86 | |
87 | Curve(me; Index3d : Integer from Standard) |
88 | ---Purpose: returns a polynomial curve whose poles correspond to |
89 | -- the Index3D 3D space |
90 | returns BSplineCurve from Geom |
91 | raises |
92 | OutOfRange from Standard, |
93 | ---Purpose: if Index3D not in the Range [1,Nb3dSpaces] |
94 | NotDone from StdFail |
95 | ---Purpose: if the Approx is not Done |
96 | is static; |
97 | |
98 | Curve (me; Index1D : Integer from Standard; |
99 | Index3D : Integer from Standard) |
100 | ---Purpose: returns a rational curve whose poles correspond to |
101 | -- the index3D of the 3D space and whose weights correspond |
102 | -- to the index1d 1D space. |
103 | returns BSplineCurve from Geom |
104 | raises |
105 | OutOfRange from Standard, |
106 | ---Purpose: if Index1D not in the Range [1,Nb1dSpaces] |
107 | -- if Index3D not in the Range [1,Nb3dSpaces] |
108 | NotDone from StdFail |
109 | ---Purpose: if the Approx is not Done |
110 | is static; |
111 | |
112 | |
113 | fields |
114 | |
115 | myApprox : ApproxAFunction from AdvApprox; |
116 | |
117 | end MakeCurvefromApprox; |