0023948: Wrong intersection between a surface of revolution and a plane.
[occt.git] / src / IntTools / IntTools_EdgeEdge.cdl
CommitLineData
ec0cdc0e 1-- Created by: Eugeny MALTCHIKOV
d5f74e42 2-- Copyright (c) 2013-2014 OPEN CASCADE SAS
b311480e 3--
973c2be1 4-- This file is part of Open CASCADE Technology software library.
b311480e 5--
d5f74e42 6-- This library is free software; you can redistribute it and/or modify it under
7-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 8-- by the Free Software Foundation, with special exception defined in the file
9-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10-- distribution for complete text of the license and disclaimer of any warranty.
b311480e 11--
973c2be1 12-- Alternatively, this file may be used under the terms of Open CASCADE
13-- commercial license or contractual agreement.
7fd59977 14
15class EdgeEdge from IntTools
ec0cdc0e 16 ---Purpose:
17 -- The class provides Edge/Edge intersection algorithm
18 -- based on the intersection between edges bounding boxes.
19
20uses
21 Real from Standard,
22 Box from Bnd,
23 Range from IntTools,
24 Edge from TopoDS,
25 Curve from Geom,
26 Curve from BRepAdaptor,
27 ShapeEnum from TopAbs,
28 SequenceOfRanges from IntTools,
29 SequenceOfCommonPrts from IntTools
7fd59977 30
ec0cdc0e 31is
32
33 Create
34 returns EdgeEdge from IntTools;
35 ---C++: alias "~IntTools_EdgeEdge();"
36 ---C++: inline
37 ---Purpose:
38 -- Empty contructor
7fd59977 39
ec0cdc0e 40 Create (
41 theEdge1 : Edge from TopoDS;
42 theEdge2 : Edge from TopoDS)
43 returns EdgeEdge from IntTools;
44 ---C++: inline
45 ---Purpose:
46 -- Contructor
47
48 Create (
49 theEdge1 : Edge from TopoDS;
50 aT11, aT12 : Real from Standard;
51 theEdge2 : Edge from TopoDS;
52 aT21, aT22 : Real from Standard)
53 returns EdgeEdge from IntTools;
54 ---C++: inline
55 ---Purpose:
56 -- Contructor
57
58 SetEdge1(me:out;
59 theEdge : Edge from TopoDS);
60 ---C++: inline
61 ---Purpose:
62 -- Sets the first edge
63
64 SetEdge1(me:out;
65 theEdge : Edge from TopoDS;
66 aT1, aT2 : Real from Standard);
67 ---C++: inline
68 ---Purpose:
69 -- Sets the first edge and its range
70
71 SetRange1(me:out;
72 theRange1 : Range from IntTools);
73 ---C++: inline
74 ---Purpose:
75 -- Sets the range for the first edge
76
77 SetRange1(me:out;
78 aT1, aT2 : Real from Standard);
79 ---C++: inline
80 ---Purpose:
81 -- Sets the range for the first edge
82
83 SetEdge2(me:out;
84 theEdge : Edge from TopoDS);
85 ---C++: inline
86 ---Purpose:
87 -- Sets the second edge
7fd59977 88
ec0cdc0e 89 SetEdge2(me:out;
90 theEdge : Edge from TopoDS;
91 aT1, aT2 : Real from Standard);
92 ---C++: inline
93 ---Purpose:
94 -- Sets the first edge and its range
95
96 SetRange2(me:out;
97 theRange : Range from IntTools);
98 ---C++: inline
99 ---Purpose:
100 -- Sets the range for the second edge
101
102 SetRange2(me:out;
103 aT1, aT2 : Real from Standard);
104 ---C++: inline
105 ---Purpose:
106 -- Sets the range for the second edge
107
108 CheckData(me:out)
109 is protected;
110 ---C++: inline
111 ---Purpose:
112 -- Checks the data
113
114 Prepare(me:out)
115 is protected;
116 ---Purpose:
117 -- Prepares the data
7fd59977 118
7fd59977 119 Perform(me:out);
ec0cdc0e 120 ---Purpose:
121 -- Performs the intersection between edges
7fd59977 122
ec0cdc0e 123 ComputeLineLine(me:out)
124 is protected;
125 ---Purpose:
126 -- Computes Line/Line intersection.
ec0cdc0e 127
128 FindSolutions(me:out;
129 theR1, theR2 : Range from IntTools;
130 theRanges1 : out SequenceOfRanges from IntTools;
131 theRanges2 : out SequenceOfRanges from IntTools)
132 is protected;
133 ---Purpose:
0d19eb34 134 -- Looking for the exact intersection ranges
ec0cdc0e 135
136 MergeSolutions(me:out;
137 theRanges1, theRanges2 : SequenceOfRanges from IntTools)
138 is protected;
139 ---Purpose:
140 -- Merges found solutions
141
142 FindParameters(myclass;
a4e383e1 143 theBAC : Curve from BRepAdaptor;
144 aT1, aT2 : Real from Standard;
145 theRes : Real from Standard;
146 thePTol : Real from Standard;
147 theResCoeff : Real from Standard;
148 theCBox : Box from Bnd;
149 aTB1, aTB2 : out Real from Standard)
ec0cdc0e 150 returns Boolean from Standard
151 is protected;
152 ---Purpose:
153 -- Looking for the range of the edge whick is in the box
7fd59977 154
ec0cdc0e 155 CheckCoincidence(me:out;
156 aT11, aT12 : Real from Standard;
157 aT21, aT22 : Real from Standard;
158 theCriteria : Real from Standard;
159 theCurveRes1: Real from Standard)
160 returns Integer from Standard
161 is protected;
162 ---Purpose:
163 -- Checks if edges coincide on the ranges
7fd59977 164
ec0cdc0e 165 AddSolution(me:out;
166 aT11, aT12, aT21, aT22 : Real from Standard;
167 theType : ShapeEnum from TopAbs)
168 is protected;
169 ---Purpose:
170 -- Adds common part of the given type to myCommonParts
7fd59977 171
ec0cdc0e 172 FindBestSolution(me:out;
173 aT11, aT12, aT21, aT22 : Real from Standard;
174 aT1, aT2 : out Real from Standard)
175 is protected;
176 ---Purpose:
177 -- Looking for the minimal distance between edges on the ranges
178
179 IsIntersection(me:out;
180 aT11, aT12 : Real from Standard;
181 aT21, aT22 : Real from Standard)
182 returns Boolean from Standard
183 is protected;
184 ---Purpose:
185 -- Checks is there an intersection between edges on the given ranges
186 -- (for nearly conicident edges)
f793011e 187
ec0cdc0e 188 IsDone(me)
189 returns Boolean from Standard;
190 ---C++: inline
191 ---Purpose:
192 -- Returns TRUE if common part(s) is(are) found
7fd59977 193
ec0cdc0e 194 CommonParts(me)
195 returns SequenceOfCommonPrts from IntTools;
196 ---C++: inline
197 ---C++: return const&
198 ---Purpose:
199 -- Returns common parts
200
201fields
202 -- source data
203 myEdge1 : Edge from TopoDS is protected;
204 myEdge2 : Edge from TopoDS is protected;
205
206 myGeom1 : Curve from Geom is protected;
207 myGeom2 : Curve from Geom is protected;
208
209 myCurve1 : Curve from BRepAdaptor is protected;
210 myCurve2 : Curve from BRepAdaptor is protected;
211
212 myTol1 : Real from Standard is protected;
213 myTol2 : Real from Standard is protected;
214 myTol : Real from Standard is protected;
215
216 myRes1 : Real from Standard is protected;
a4e383e1 217 myRes2 : Real from Standard is protected;
218
219 myResCoeff1 : Real from Standard is protected;
220 myResCoeff2 : Real from Standard is protected;
a743e2e5 221
222 myPTol1 : Real from Standard is protected;
223 myPTol2 : Real from Standard is protected;
ec0cdc0e 224
225 myRange1 : Range from IntTools is protected;
226 myRange2 : Range from IntTools is protected;
227
228 -- results
229 mySwap : Boolean from Standard is protected;
230 myErrorStatus : Integer from Standard is protected;
231 myCommonParts : SequenceOfCommonPrts from IntTools is protected;
7fd59977 232
233end EdgeEdge;