1 -- Created by: Eugeny MALTCHIKOV
2 -- Copyright (c) 2013-2014 OPEN CASCADE SAS
4 -- This file is part of Open CASCADE Technology software library.
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
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.
12 -- Alternatively, this file may be used under the terms of Open CASCADE
13 -- commercial license or contractual agreement.
15 class EdgeEdge from IntTools
17 -- The class provides Edge/Edge intersection algorithm
18 -- based on the intersection between edges bounding boxes.
26 Curve from BRepAdaptor,
27 ShapeEnum from TopAbs,
28 SequenceOfRanges from IntTools,
29 SequenceOfCommonPrts from IntTools
34 returns EdgeEdge from IntTools;
35 ---C++: alias "~IntTools_EdgeEdge();"
41 theEdge1 : Edge from TopoDS;
42 theEdge2 : Edge from TopoDS)
43 returns EdgeEdge from IntTools;
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;
59 theEdge : Edge from TopoDS);
62 -- Sets the first edge
65 theEdge : Edge from TopoDS;
66 aT1, aT2 : Real from Standard);
69 -- Sets the first edge and its range
72 theRange1 : Range from IntTools);
75 -- Sets the range for the first edge
78 aT1, aT2 : Real from Standard);
81 -- Sets the range for the first edge
84 theEdge : Edge from TopoDS);
87 -- Sets the second edge
90 theEdge : Edge from TopoDS;
91 aT1, aT2 : Real from Standard);
94 -- Sets the first edge and its range
97 theRange : Range from IntTools);
100 -- Sets the range for the second edge
103 aT1, aT2 : Real from Standard);
106 -- Sets the range for the second edge
121 -- Performs the intersection between edges
123 ComputeLineLine(me:out)
126 -- Computes Line/Line intersection.
128 FindSolutions(me:out;
129 theRanges1 : out SequenceOfRanges from IntTools;
130 theRanges2 : out SequenceOfRanges from IntTools;
131 bSplit2 : out Boolean from Standard)
134 -- Intermediate function
136 FindSolutions(me:out;
137 theR1, theR2 : Range from IntTools;
138 theBox2 : Box from Bnd;
139 theRanges1 : out SequenceOfRanges from IntTools;
140 theRanges2 : out SequenceOfRanges from IntTools)
143 -- Looking for the exact intersection ranges
145 MergeSolutions(me:out;
146 theRanges1 : SequenceOfRanges from IntTools;
147 theRanges2 : SequenceOfRanges from IntTools;
148 bSplit2 : Boolean from Standard)
151 -- Merges found solutions
153 FindParameters(myclass;
154 theBAC : Curve from BRepAdaptor;
155 aT1, aT2 : Real from Standard;
156 theRes : Real from Standard;
157 thePTol : Real from Standard;
158 theResCoeff : Real from Standard;
159 theCBox : Box from Bnd;
160 aTB1, aTB2 : out Real from Standard)
161 returns Boolean from Standard
164 -- Looking for the range of the edge whick is in the box
166 CheckCoincidence(me:out;
167 aT11, aT12 : Real from Standard;
168 aT21, aT22 : Real from Standard;
169 theCriteria : Real from Standard;
170 theCurveRes1: Real from Standard)
171 returns Integer from Standard
174 -- Checks if edges coincide on the ranges
177 aT11, aT12, aT21, aT22 : Real from Standard;
178 theType : ShapeEnum from TopAbs)
181 -- Adds common part of the given type to myCommonParts
183 FindBestSolution(me:out;
184 aT11, aT12, aT21, aT22 : Real from Standard;
185 aT1, aT2 : out Real from Standard)
188 -- Looking for the minimal distance between edges on the ranges
190 IsIntersection(me:out;
191 aT11, aT12 : Real from Standard;
192 aT21, aT22 : Real from Standard)
193 returns Boolean from Standard
196 -- Checks is there an intersection between edges on the given ranges
197 -- (for nearly conicident edges)
200 returns Boolean from Standard;
203 -- Returns TRUE if common part(s) is(are) found
206 returns SequenceOfCommonPrts from IntTools;
208 ---C++: return const&
210 -- Returns common parts
214 myEdge1 : Edge from TopoDS is protected;
215 myEdge2 : Edge from TopoDS is protected;
217 myGeom1 : Curve from Geom is protected;
218 myGeom2 : Curve from Geom is protected;
220 myCurve1 : Curve from BRepAdaptor is protected;
221 myCurve2 : Curve from BRepAdaptor is protected;
223 myTol1 : Real from Standard is protected;
224 myTol2 : Real from Standard is protected;
225 myTol : Real from Standard is protected;
227 myRes1 : Real from Standard is protected;
228 myRes2 : Real from Standard is protected;
230 myResCoeff1 : Real from Standard is protected;
231 myResCoeff2 : Real from Standard is protected;
233 myPTol1 : Real from Standard is protected;
234 myPTol2 : Real from Standard is protected;
236 myRange1 : Range from IntTools is protected;
237 myRange2 : Range from IntTools is protected;
240 mySwap : Boolean from Standard is protected;
241 myErrorStatus : Integer from Standard is protected;
242 myCommonParts : SequenceOfCommonPrts from IntTools is protected;