b311480e |
1 | -- Created on: 1994-03-21 |
2 | -- Created by: Jean Marc LACHAUME |
3 | -- Copyright (c) 1994-1999 Matra Datavision |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | -- |
6 | -- The content of this file is subject to the Open CASCADE Technology Public |
7 | -- License Version 6.5 (the "License"). You may not use the content of this file |
8 | -- except in compliance with the License. Please obtain a copy of the License |
9 | -- at http://www.opencascade.org and read it completely before using this file. |
10 | -- |
11 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
12 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
13 | -- |
14 | -- The Original Code and all software distributed under the License is |
15 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
16 | -- Initial Developer hereby disclaims all such warranties, including without |
17 | -- limitation, any warranties of merchantability, fitness for a particular |
18 | -- purpose or non-infringement. Please see the License for the specific terms |
19 | -- and conditions governing the rights and limitations under the License. |
20 | |
7fd59977 |
21 | |
22 | deferred generic class Intersector from HatchGen |
23 | (TheCurveH as any ; -- as Curve from Geom2dAdaptor |
24 | TheCurveE as any ) -- as Curve from Geom2dAdaptor |
25 | |
26 | |
27 | inherits Intersection from IntRes2d |
28 | |
29 | uses |
30 | Lin2d from gp, |
31 | Dir2d from gp |
32 | |
33 | |
34 | |
35 | |
36 | is |
37 | |
38 | Initialize |
39 | |
40 | ---Purpose: Creates an empty intersector |
41 | |
42 | is protected ; |
43 | |
44 | |
45 | Initialize(Confusion : Real from Standard ; |
46 | Tangency : Real from Standard) |
47 | |
48 | ---Purpose: Creates an intersector. |
49 | is protected ; |
50 | |
51 | |
52 | ConfusionTolerance (me) |
53 | |
54 | ---Purpose: Returns the confusion tolerance of the |
55 | -- intersector. |
56 | |
57 | returns Real from Standard |
58 | is static ; |
59 | |
60 | |
61 | SetConfusionTolerance (me : in out ; |
62 | Confusion : Real from Standard) |
63 | |
64 | ---Purpose: Sets the confusion tolerance of the intersector. |
65 | |
66 | is static ; |
67 | |
68 | |
69 | TangencyTolerance (me) |
70 | |
71 | ---Purpose: Returns the tangency tolerance of the |
72 | -- intersector. |
73 | |
74 | returns Real from Standard |
75 | is static ; |
76 | |
77 | |
78 | SetTangencyTolerance (me : in out ; |
79 | Tangency : Real from Standard) |
80 | |
81 | ---Purpose: Sets the tangency tolerance of the intersector. |
82 | |
83 | is static ; |
84 | |
85 | |
86 | Intersect (me : in out ; C1 : in out TheCurveE ; |
87 | C2 : in out TheCurveH ) |
88 | |
89 | ---Purpose: Intersects the curves C1 and C2. |
90 | -- The results are retreived by the usual methods |
91 | -- described in IntRes2d_Intersection. |
92 | |
93 | is static ; |
94 | |
95 | ------------------------------------------------------------------------- |
96 | ---- 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 --- |
97 | ------------------------------------------------------------------------- |
98 | |
99 | |
100 | Perform(me : in out; |
101 | L : Lin2d from gp; |
102 | P : Real from Standard; |
103 | Tol : Real from Standard; |
104 | E : TheCurveE) |
105 | |
106 | ---Purpose: Performs the intersection between the 2d line |
107 | -- segment (<L>, <P>) and the Curve <E>. The line |
108 | -- segment is the part of the 2d line <L> of |
109 | -- parameter range [0, <P>] (P is positive and can be |
110 | -- RealLast()). Tol is the Tolerance on the segment. |
111 | -- The order is relevant, the first argument is the |
112 | -- segment, the second the Edge. |
113 | is static; |
114 | |
115 | LocalGeometry(me; |
116 | E : TheCurveE ; |
117 | U : Real from Standard; |
118 | T : out Dir2d from gp; |
119 | N : out Dir2d from gp; |
120 | C : out Real) |
121 | |
122 | ---Purpose: Returns in <T>, <N> and <C> the tangent, normal |
123 | -- and curvature of the edge <E> at parameter value |
124 | -- <U>. |
125 | is static; |
126 | |
127 | |
128 | end Intersector from HatchGen ; |
129 | |
130 | |
131 | |
132 | |