7fd59977 |
1 | -- File: Geom2dHatch_Intersector.cdl |
2 | -- Created: Wed Mar 23 11:16:39 1994 |
3 | -- Author: Jean Marc LACHAUME |
4 | -- <jml@phylox> |
5 | ---Copyright: Matra Datavision 1994 |
6 | |
7 | class Intersector from Geom2dHatch |
8 | |
9 | inherits GInter from Geom2dInt |
10 | |
11 | uses |
12 | |
13 | Curve from Geom2dAdaptor, |
14 | Lin2d from gp, |
15 | Dir2d from gp |
16 | |
17 | is |
18 | |
19 | Create (Confusion : Real from Standard ; |
20 | Tangency : Real from Standard) |
21 | |
22 | ---Purpose: Creates an intersector. |
23 | |
24 | ---C++: inline |
25 | |
26 | returns Intersector from Geom2dHatch ; |
27 | |
28 | |
29 | ConfusionTolerance (me) |
30 | |
31 | ---Purpose: Returns the confusion tolerance of the |
32 | -- intersector. |
33 | |
34 | ---C++: inline |
35 | |
36 | returns Real from Standard |
37 | is static ; |
38 | |
39 | |
40 | SetConfusionTolerance (me : in out ; |
41 | Confusion : Real from Standard) |
42 | |
43 | ---Purpose: Sets the confusion tolerance of the intersector. |
44 | |
45 | ---C++: inline |
46 | |
47 | is static ; |
48 | |
49 | |
50 | TangencyTolerance (me) |
51 | |
52 | ---Purpose: Returns the tangency tolerance of the |
53 | -- intersector. |
54 | |
55 | ---C++: inline |
56 | |
57 | returns Real from Standard |
58 | is static ; |
59 | |
60 | |
61 | SetTangencyTolerance (me : in out ; |
62 | Tangency : Real from Standard) |
63 | |
64 | ---Purpose: Sets the tangency tolerance of the intersector. |
65 | |
66 | ---C++: inline |
67 | |
68 | is static ; |
69 | |
70 | |
71 | Intersect (me : in out ; C1 : Curve from Geom2dAdaptor ; |
72 | C2 : Curve from Geom2dAdaptor ) |
73 | |
74 | ---Purpose: Intersects the curves C1 and C2. |
75 | -- The results are retreived by the usual methods |
76 | -- described in IntRes2d_Intersection. |
77 | |
78 | ---C++: inline |
79 | |
80 | is static ; |
81 | |
82 | ------------------------------------------------------------------------- |
83 | ---- M e t h o d s u s e d b y t h e C l a s s i f i e r 2 d --- |
84 | ------------------------------------------------------------------------- |
85 | Create |
86 | |
87 | ---Purpose: Creates an intersector. |
88 | |
89 | ---C++: inline |
90 | |
91 | returns Intersector from Geom2dHatch ; |
92 | |
93 | Perform(me : in out; |
94 | L : Lin2d from gp; |
95 | P : Real from Standard; |
96 | Tol : Real from Standard; |
97 | E : Curve from Geom2dAdaptor) -- en fait in out |
98 | |
99 | ---Purpose: Performs the intersection between the 2d line |
100 | -- segment (<L>, <P>) and the Curve <E>. The line |
101 | -- segment is the part of the 2d line <L> of |
102 | -- parameter range [0, <P>] (P is positive and can be |
103 | -- RealLast()). Tol is the Tolerance on the segment. |
104 | -- The order is relevant, the first argument is the |
105 | -- segment, the second the Edge. |
106 | is static; |
107 | |
108 | LocalGeometry(me; |
109 | E : Curve from Geom2dAdaptor; |
110 | U : Real from Standard; |
111 | T : out Dir2d from gp; |
112 | N : out Dir2d from gp; |
113 | C : out Real) |
114 | |
115 | ---Purpose: Returns in <T>, <N> and <C> the tangent, normal |
116 | -- and curvature of the edge <E> at parameter value |
117 | -- <U>. |
118 | is static; |
119 | |
120 | |
121 | |
122 | fields |
123 | |
124 | myConfusionTolerance : Real from Standard ; |
125 | myTangencyTolerance : Real from Standard ; |
126 | |
127 | end Intersector from Geom2dHatch ; |