1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
// File: Law_Constant.cxx
// Created: Fri Mar 29 10:29:35 1996
// Author: Laurent BOURESCHE
// <lbo@phylox>
// pmn -> 17/01/1996 added : Continuity, (Nb)Interals, D2, Trim
#include <Law_Constant.ixx>
//=======================================================================
//function : Law_Constant
//purpose :
//=======================================================================
Law_Constant::Law_Constant()
{
}
//=======================================================================
//function : Set
//purpose :
//=======================================================================
void Law_Constant::Set(const Standard_Real Radius,
const Standard_Real PFirst,
const Standard_Real PLast)
{
radius = Radius;
first = PFirst;
last = PLast;
}
//=======================================================================
//function : Continuity
//purpose :
//=======================================================================
GeomAbs_Shape Law_Constant::Continuity() const
{
return GeomAbs_CN;
}
//=======================================================================
//function : NbIntervals
//purpose :
//=======================================================================
//Standard_Integer Law_Constant::NbIntervals(const GeomAbs_Shape S) const
Standard_Integer Law_Constant::NbIntervals(const GeomAbs_Shape ) const
{
return 1;
}
//=======================================================================
//function : Intervals
//purpose :
//=======================================================================
void Law_Constant::Intervals(TColStd_Array1OfReal& T,
// const GeomAbs_Shape S) const
const GeomAbs_Shape ) const
{
T.SetValue(T.Lower(), first);
T.SetValue(T.Upper(), last);
}
//=======================================================================
//function : Value
//purpose :
//=======================================================================
Standard_Real Law_Constant::Value(const Standard_Real)
{
return radius;
}
//=======================================================================
//function : D1
//purpose :
//=======================================================================
void Law_Constant::D1(const Standard_Real,
Standard_Real& F,
Standard_Real& D)
{
F = radius;
D = 0.;
}
//=======================================================================
//function : D2
//purpose :
//=======================================================================
void Law_Constant::D2(const Standard_Real,
Standard_Real& F,
Standard_Real& D,
Standard_Real& D2)
{
F = radius;
D = D2 = 0.;
}
//=======================================================================
//function : Trim
//purpose :
//=======================================================================
Handle(Law_Function) Law_Constant::Trim(const Standard_Real PFirst,
const Standard_Real PLast,
// const Standard_Real Tol) const
const Standard_Real ) const
{
Handle(Law_Constant) l = new (Law_Constant)();
l->Set(radius, PFirst, PLast);
return l;
}
//=======================================================================
//function : Bounds
//purpose :
//=======================================================================
void Law_Constant::Bounds(Standard_Real& PFirst,
Standard_Real& PLast)
{
PFirst = first;
PLast = last;
}
|