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
|
-- File: CurveTransition.cdl
-- Created: Thu Jan 30 12:10:21 1992
-- Author: Didier PIFFAULT
-- <dpf@sdsun1>
---Copyright: Matra Datavision 1992
class CurveTransition from TopTrans
---Purpose: This algorithm is used to compute the transition
-- of a Curve intersecting a curvilinear boundary.
--
-- The geometric elements are described locally at
-- the intersection point by a second order
-- development.
--
-- The curve is described by the intersection point,
-- the tangent vector and the curvature.
--
-- The boundary is described by a set of curve
-- elements, a curve element is either :
--
-- - A curve.
--
-- - A curve and an orientation called a half-curve,
-- the boundary of the curve is before or after the
-- intersection point depending on the orientation.
--
uses
Boolean from Standard,
Real from Standard,
Pnt from gp,
Dir from gp,
State from TopAbs,
Orientation from TopAbs
is
Create returns CurveTransition from TopTrans;
---Purpose: Create an empty Curve Transition.
Reset( me : in out;
Tgt : in Dir from gp; -- Tangent at this point
Norm : in Dir from gp; -- Normal vector at this point
Curv : in Real from Standard);-- Curvature at this point
---Purpose: Initialize a Transition with the local description
-- of a Curve.
Reset( me : in out;
Tgt : in Dir from gp); -- Tangent at this point
---Purpose: Initialize a Transition with the local description
-- of a straigth line.
Compare(me : in out;
Tole : in Real from Standard; -- Cosine tolerance
Tang : in Dir from gp; -- Tangent on curve for this point
Norm : in Dir from gp; -- Normal vector at this point
Curv : in Real from Standard; -- Curvature at this point
S : in Orientation from TopAbs; -- transition locale
Or : in Orientation from TopAbs);-- orientation de la tangente
---Purpose: Add a curve element to the boundary. If Or is
-- REVERSED the curve is before the intersection,
-- else if Or is FORWARD the curv is after the
-- intersection and if Or is INTERNAL the
-- intersection is in the middle of the curv.
StateBefore(me) returns State from TopAbs;
---Purpose: returns the state of the curve before the
-- intersection, this is the position relative to the
-- boundary of a point very close to the intersection
-- on the negative side of the tangent.
StateAfter(me) returns State from TopAbs;
---Purpose: returns the state of the curve after the
-- intersection, this is the position relative to the
-- boundary of a point very close to the intersection
-- on the positive side of the tangent.
---Implementation functions :
IsBefore( me;
Tole : in Real from Standard;
Angl : in Real from Standard;
Nor1 : in Dir from gp;
Cur1 : in Real from Standard;
Nor2 : in Dir from gp;
Cur2 : in Real from Standard)
returns Boolean from Standard is private;
---Purpose: Compare two curvature and return true if N1,C1 is
-- before N2,C2 in the edge orientation
Compare(me;
Ang1 : in Real from Standard;
Ang2 : in Real from Standard;
Tole : in Real from Standard)
returns Integer from Standard is private;
---Purpose: Compare two angles at tolerance Tole
fields
myTgt : Dir from gp; -- Tangent at this point
myNorm : Dir from gp; -- Normal vector at this point
myCurv : Real; -- Curvature at this point
Init : Boolean;
TgtFirst : Dir from gp; -- Elements to determine the state
NormFirst : Dir from gp; --
CurvFirst : Real; -- before the intersection
TranFirst : Orientation from TopAbs;
TgtLast : Dir from gp; -- Elements to determine the state
NormLast : Dir from gp; --
CurvLast : Real; -- After the intersection
TranLast : Orientation from TopAbs;
end CurveTransition;
|