7fd59977 |
1 | -- File: GeomFill_Fixed.cdl |
2 | -- Created: Tue Dec 9 18:33:12 1997 |
3 | -- Author: Philippe MANGIN |
4 | -- <pmn@sgi29> |
5 | ---Copyright: Matra Datavision 1997 |
6 | |
7 | |
8 | class Fixed from GeomFill |
9 | inherits TrihedronLaw from GeomFill |
10 | |
11 | ---Purpose: Defined an constant TrihedronLaw |
12 | |
13 | uses |
14 | Shape from GeomAbs, |
15 | Array1OfReal from TColStd, |
16 | Vec from gp |
17 | |
18 | raises |
19 | OutOfRange, ConstructionError |
20 | is |
21 | |
22 | Create(Tangent, Normal : Vec from gp) |
23 | returns Fixed from GeomFill |
24 | raises ConstructionError; |
25 | -- if <Tangent> and <Normal> are colinear |
26 | |
27 | Copy(me) |
28 | returns TrihedronLaw from GeomFill |
29 | is redefined; |
30 | -- |
31 | -- |
32 | --========== To compute Location and derivatives Location |
33 | -- |
34 | D0(me : mutable; |
35 | Param: Real; |
36 | Tangent : out Vec from gp; |
37 | Normal : out Vec from gp; |
38 | BiNormal : out Vec from gp) |
39 | ---Purpose: compute Triedrhon on curve at parameter <Param> |
40 | returns Boolean is redefined; |
41 | |
42 | D1(me : mutable; |
43 | Param: Real; |
44 | Tangent : out Vec from gp; |
45 | DTangent : out Vec from gp; |
46 | Normal : out Vec from gp; |
47 | DNormal : out Vec from gp; |
48 | BiNormal : out Vec from gp; |
49 | DBiNormal : out Vec from gp) |
50 | ---Purpose: compute Triedrhon and derivative Trihedron on curve |
51 | -- at parameter <Param> |
52 | -- Warning : It used only for C1 or C2 aproximation |
53 | returns Boolean |
54 | is redefined; |
55 | |
56 | D2(me : mutable; |
57 | Param: Real; |
58 | Tangent : out Vec from gp; |
59 | DTangent : out Vec from gp; |
60 | D2Tangent : out Vec from gp; |
61 | Normal : out Vec from gp; |
62 | DNormal : out Vec from gp; |
63 | D2Normal : out Vec from gp; |
64 | BiNormal : out Vec from gp; |
65 | DBiNormal : out Vec from gp; |
66 | D2BiNormal : out Vec from gp) |
67 | ---Purpose: compute Trihedron on curve |
68 | -- first and seconde derivatives. |
69 | -- Warning : It used only for C2 aproximation |
70 | returns Boolean |
71 | is redefined; |
72 | -- |
73 | -- =================== Management of continuity =================== |
74 | -- |
75 | NbIntervals(me; S : Shape from GeomAbs) |
76 | ---Purpose: Returns the number of intervals for continuity |
77 | -- <S>. |
78 | -- May be one if Continuity(me) >= <S> |
79 | returns Integer is redefined; |
80 | |
81 | Intervals(me; T : in out Array1OfReal from TColStd; |
82 | S : Shape from GeomAbs) |
83 | ---Purpose: Stores in <T> the parameters bounding the intervals |
84 | -- of continuity <S>. |
85 | -- |
86 | -- The array must provide enough room to accomodate |
87 | -- for the parameters. i.e. T.Length() > NbIntervals() |
88 | raises |
89 | OutOfRange from Standard |
90 | is redefined; |
91 | |
92 | |
93 | -- ===================== To help computation of Tolerance ============ |
94 | GetAverageLaw(me : mutable; |
95 | ATangent : out Vec from gp; |
96 | ANormal : out Vec from gp; |
97 | ABiNormal : out Vec from gp) |
98 | ---Purpose: Get average value of Tangent(t) and Normal(t) it is usfull to |
99 | -- make fast approximation of rational surfaces. |
100 | is redefined; |
101 | |
102 | -- =================== To help Particular case =============== |
103 | |
104 | IsConstant(me) |
105 | ---Purpose: Return True. |
106 | returns Boolean |
107 | is redefined; |
108 | |
109 | fields |
110 | T, N, B : Vec from gp; |
111 | end Fixed; |