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 #include <Precision.hxx>
16 #include <BRep_Tool.hxx>
18 //=======================================================================
19 //function : IntTools_EdgeEdge
21 //=======================================================================
22 inline IntTools_EdgeEdge::IntTools_EdgeEdge()
35 mySwap(Standard_False),
39 //=======================================================================
40 //function : IntTools_EdgeEdge
42 //=======================================================================
43 inline IntTools_EdgeEdge::IntTools_EdgeEdge(const TopoDS_Edge& theEdge1,
44 const TopoDS_Edge& theEdge2)
59 mySwap(Standard_False),
63 //=======================================================================
64 //function : IntTools_EdgeEdge
66 //=======================================================================
67 inline IntTools_EdgeEdge::IntTools_EdgeEdge(const TopoDS_Edge& theEdge1,
68 const Standard_Real aT11,
69 const Standard_Real aT12,
70 const TopoDS_Edge& theEdge2,
71 const Standard_Real aT21,
72 const Standard_Real aT22)
87 mySwap(Standard_False),
91 //=======================================================================
92 //function : IntTools_EdgeEdge
94 //=======================================================================
95 inline IntTools_EdgeEdge::~IntTools_EdgeEdge()
98 //=======================================================================
101 //=======================================================================
102 inline void IntTools_EdgeEdge::SetEdge1(const TopoDS_Edge& theEdge)
106 //=======================================================================
107 //function : SetRange1
109 //=======================================================================
110 inline void IntTools_EdgeEdge::SetRange1(const IntTools_Range& theRange)
114 //=======================================================================
115 //function : SetRange1
117 //=======================================================================
118 inline void IntTools_EdgeEdge::SetRange1(const Standard_Real aT1,
119 const Standard_Real aT2)
121 myRange1.SetFirst(aT1);
122 myRange1.SetLast(aT2);
124 //=======================================================================
125 //function : SetEdge1
127 //=======================================================================
128 inline void IntTools_EdgeEdge::SetEdge1(const TopoDS_Edge& theEdge,
129 const Standard_Real aT1,
130 const Standard_Real aT2)
135 //=======================================================================
136 //function : SetEdge2
138 //=======================================================================
139 inline void IntTools_EdgeEdge::SetEdge2(const TopoDS_Edge& theEdge)
143 //=======================================================================
144 //function : SetRange1
146 //=======================================================================
147 inline void IntTools_EdgeEdge::SetRange2(const IntTools_Range& theRange)
151 //=======================================================================
152 //function : SetRange1
154 //=======================================================================
155 inline void IntTools_EdgeEdge::SetRange2(const Standard_Real aT1,
156 const Standard_Real aT2)
158 myRange2.SetFirst(aT1);
159 myRange2.SetLast(aT2);
161 //=======================================================================
162 //function : SetEdge1
164 //=======================================================================
165 inline void IntTools_EdgeEdge::SetEdge2(const TopoDS_Edge& theEdge,
166 const Standard_Real aT1,
167 const Standard_Real aT2)
172 //=======================================================================
173 //function : CommonParts
175 //=======================================================================
176 inline const IntTools_SequenceOfCommonPrts& IntTools_EdgeEdge::CommonParts() const
178 return myCommonParts;
180 //=======================================================================
183 //=======================================================================
184 inline Standard_Boolean IntTools_EdgeEdge::IsDone() const
186 return (myErrorStatus == 0);
188 //=======================================================================
189 //function : CheckData
191 //=======================================================================
192 inline void IntTools_EdgeEdge::CheckData()
194 if (myEdge1.IsNull() || myEdge2.IsNull()) {
199 if (BRep_Tool::Degenerated(myEdge1) || BRep_Tool::Degenerated(myEdge2)) {
204 if (!BRep_Tool::IsGeometric(myEdge1) || !BRep_Tool::IsGeometric(myEdge2)) {