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()
31 mySwap(Standard_False),
35 //=======================================================================
36 //function : IntTools_EdgeEdge
38 //=======================================================================
39 inline IntTools_EdgeEdge::IntTools_EdgeEdge(const TopoDS_Edge& theEdge1,
40 const TopoDS_Edge& theEdge2)
51 mySwap(Standard_False),
55 //=======================================================================
56 //function : IntTools_EdgeEdge
58 //=======================================================================
59 inline IntTools_EdgeEdge::IntTools_EdgeEdge(const TopoDS_Edge& theEdge1,
60 const Standard_Real aT11,
61 const Standard_Real aT12,
62 const TopoDS_Edge& theEdge2,
63 const Standard_Real aT21,
64 const Standard_Real aT22)
75 mySwap(Standard_False),
79 //=======================================================================
80 //function : IntTools_EdgeEdge
82 //=======================================================================
83 inline IntTools_EdgeEdge::~IntTools_EdgeEdge()
86 //=======================================================================
89 //=======================================================================
90 inline void IntTools_EdgeEdge::SetEdge1(const TopoDS_Edge& theEdge)
94 //=======================================================================
95 //function : SetRange1
97 //=======================================================================
98 inline void IntTools_EdgeEdge::SetRange1(const IntTools_Range& theRange)
102 //=======================================================================
103 //function : SetRange1
105 //=======================================================================
106 inline void IntTools_EdgeEdge::SetRange1(const Standard_Real aT1,
107 const Standard_Real aT2)
109 myRange1.SetFirst(aT1);
110 myRange1.SetLast(aT2);
112 //=======================================================================
113 //function : SetEdge1
115 //=======================================================================
116 inline void IntTools_EdgeEdge::SetEdge1(const TopoDS_Edge& theEdge,
117 const Standard_Real aT1,
118 const Standard_Real aT2)
123 //=======================================================================
124 //function : SetEdge2
126 //=======================================================================
127 inline void IntTools_EdgeEdge::SetEdge2(const TopoDS_Edge& theEdge)
131 //=======================================================================
132 //function : SetRange1
134 //=======================================================================
135 inline void IntTools_EdgeEdge::SetRange2(const IntTools_Range& theRange)
139 //=======================================================================
140 //function : SetRange1
142 //=======================================================================
143 inline void IntTools_EdgeEdge::SetRange2(const Standard_Real aT1,
144 const Standard_Real aT2)
146 myRange2.SetFirst(aT1);
147 myRange2.SetLast(aT2);
149 //=======================================================================
150 //function : SetEdge1
152 //=======================================================================
153 inline void IntTools_EdgeEdge::SetEdge2(const TopoDS_Edge& theEdge,
154 const Standard_Real aT1,
155 const Standard_Real aT2)
160 //=======================================================================
161 //function : CommonParts
163 //=======================================================================
164 inline const IntTools_SequenceOfCommonPrts& IntTools_EdgeEdge::CommonParts() const
166 return myCommonParts;
168 //=======================================================================
171 //=======================================================================
172 inline Standard_Boolean IntTools_EdgeEdge::IsDone() const
174 return (myErrorStatus == 0);
176 //=======================================================================
177 //function : CheckData
179 //=======================================================================
180 inline void IntTools_EdgeEdge::CheckData()
182 if (myEdge1.IsNull() || myEdge2.IsNull()) {
187 if (BRep_Tool::Degenerated(myEdge1) || BRep_Tool::Degenerated(myEdge2)) {
192 if (!BRep_Tool::IsGeometric(myEdge1) || !BRep_Tool::IsGeometric(myEdge2)) {