7fd59977 |
1 | -- File: Law.cdl |
2 | -- Created: Thu Apr 7 17:57:23 1994 |
3 | -- Author: Isabelle GRIGNON |
4 | -- <isg@zerox> |
5 | ---Copyright: Matra Datavision 1994 |
6 | |
7 | |
8 | |
9 | |
10 | package Law |
11 | |
12 | ---Purpose: Multiple services concerning 1d functions. |
13 | |
14 | uses Adaptor3d,GeomAbs,TColgp,TColStd,TCollection,MMgt,Standard,StdFail |
15 | |
16 | is |
17 | |
18 | class BSpline; -- inherits TShared from MMgt |
19 | |
20 | class Interpolate; -- duplication of GeomAPI algorithm!?! |
21 | |
22 | deferred class Function; -- inherits TShared from MMgt |
23 | |
24 | class Constant; -- inherits Function from Law |
25 | |
26 | class Linear; -- inherits Function from Law |
27 | |
28 | class BSpFunc; -- inherits Function from Law |
29 | |
30 | class S; -- inherits BSpFunc from Law |
31 | |
32 | class Interpol; -- inherits BSpFunc from Law |
33 | |
34 | class Laws instantiates List from TCollection (Function from Law); |
35 | |
36 | class Composite; -- inherits Function from Law |
37 | |
38 | class BSplineKnotSplitting; |
39 | --- Purpose : |
40 | -- This algorithm searches the knot values corresponding to the |
41 | -- splitting of a given B-spline law into several arcs with |
42 | -- the same continuity. The continuity order is given at the |
43 | -- construction time. |
44 | |
45 | MixBnd(Lin : Linear from Law) |
46 | ---Purpose: Builds a 1d bspline that is near from Lin with null |
47 | -- derivatives at the extremities. |
48 | returns BSpFunc from Law; |
49 | |
50 | MixBnd(Degree : Integer from Standard; |
51 | Knots : Array1OfReal from TColStd; |
52 | Mults : Array1OfInteger from TColStd; |
53 | Lin : Linear from Law) |
54 | ---Purpose: Builds the poles of the 1d bspline that is near from |
55 | -- Lin with null derivatives at the extremities. |
56 | returns HArray1OfReal from TColStd; |
57 | |
58 | MixTgt(Degree : Integer from Standard; |
59 | Knots : Array1OfReal from TColStd; |
60 | Mults : Array1OfInteger from TColStd; |
61 | NulOnTheRight : Boolean from Standard; |
62 | Index : Integer from Standard) |
63 | ---Purpose: Builds the poles of the 1d bspline that is null on the |
64 | -- rigth side of Knots(Index) (on the left if |
65 | -- NulOnTheRight is false) and that is like a |
66 | -- t*(1-t)(1-t) curve on the left side of Knots(Index) |
67 | -- (on the rigth if NulOnTheRight is false). The result |
68 | -- curve is C1 with a derivative equal to 1. at first |
69 | -- parameter (-1 at last parameter if NulOnTheRight is |
70 | -- false). |
71 | -- Warning: Mults(Index) must greater or equal to degree-1. |
72 | returns HArray1OfReal from TColStd; |
73 | |
74 | |
75 | Reparametrize(Curve : Curve from Adaptor3d; |
76 | First, Last : Real from Standard; |
77 | HasDF, HasDL : Boolean from Standard; |
78 | DFirst, DLast : Real from Standard; |
79 | Rev : Boolean from Standard; |
80 | NbPoints : Integer from Standard) |
81 | returns mutable BSpline from Law; |
82 | ---Purpose: Computes a 1 d curve to reparametrize a curve. Its an |
83 | -- interpolation of NbPoints points calculated at quasi |
84 | -- constant abscissa. |
85 | |
86 | Scale(First, Last : Real from Standard; |
87 | HasF, HasL : Boolean from Standard; |
88 | VFirst, VLast : Real from Standard) |
89 | returns mutable BSpline from Law; |
90 | ---Purpose: Computes a 1 d curve to scale a field of tangency. |
91 | -- Value is 1. for t = (First+Last)/2 . |
92 | -- If HasFirst value for t = First is VFirst (null derivative). |
93 | -- If HasLast value for t = Last is VLast (null derivative). |
94 | -- |
95 | -- 1. _ |
96 | -- _/ \_ |
97 | -- __/ \__ |
98 | -- / \ |
99 | -- VFirst ____/ \ |
100 | -- VLast \____ |
101 | -- First Last |
102 | |
103 | ScaleCub(First, Last : Real from Standard; |
104 | HasF, HasL : Boolean from Standard; |
105 | VFirst, VLast : Real from Standard) |
106 | returns mutable BSpline from Law; |
107 | |
108 | end Law; |
109 | |
110 | |
111 | |