0024510: Remove unused local variables
[occt.git] / src / IntCurve / IntCurve_IntConicCurveGen.lxx
1 // Created on: 1992-06-03
2 // Created by: Laurent BUCHARD
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and / or modify it
9 // under the terms of the GNU Lesser General Public version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #include IntCurve_TheIntersector_hxx
18
19 #include <IntRes2d_Domain.hxx>
20
21 #include <gp_Lin2d.hxx>
22 #include <gp_Circ2d.hxx>
23 #include <gp_Elips2d.hxx>
24 #include <gp_Hypr2d.hxx>
25 #include <gp_Parab2d.hxx>
26
27 #include <IntCurve_IConicTool.hxx>
28
29
30 //--------------------------------------------------------------------------------
31 inline IntCurve_IntConicCurveGen::IntCurve_IntConicCurveGen () 
32 { }
33
34 //--------------------------------------------------------------------------------
35 inline IntCurve_IntConicCurveGen::IntCurve_IntConicCurveGen (const gp_Lin2d& L,
36                                                              const IntRes2d_Domain& D1,
37                                                              const ThePCurve& PCurve,
38                                                              const IntRes2d_Domain& D2,
39                                                              const Standard_Real TolConf,
40                                                              const Standard_Real Tol) {
41   
42   Perform(IntCurve_IConicTool(L),D1,PCurve,D2,TolConf,Tol);
43 }
44
45
46 inline void IntCurve_IntConicCurveGen::Perform (const gp_Lin2d& L,
47                                                 const IntRes2d_Domain& D1,
48                                                 const ThePCurve& PCurve,
49                                                 const IntRes2d_Domain& D2,
50                                                 const Standard_Real TolConf,
51                                                 const Standard_Real Tol) {
52   
53   Perform(IntCurve_IConicTool(L),D1,PCurve,D2,TolConf,Tol);
54 }
55 //--------------------------------------------------------------------------------
56 inline void IntCurve_IntConicCurveGen::Perform (const gp_Circ2d& C,
57                                                 const IntRes2d_Domain& D1,
58                                                 const ThePCurve& PCurve,
59                                                 const IntRes2d_Domain& D2,
60                                                 const Standard_Real TolConf,
61                                                 const Standard_Real Tol) {
62   if(!D1.IsClosed()) {
63     IntRes2d_Domain D(D1);
64     D.SetEquivalentParameters(D1.FirstParameter(),D1.FirstParameter()+M_PI+M_PI);
65     Perform(IntCurve_IConicTool(C),D,PCurve,D2,TolConf,Tol);
66     //-- Standard_ConstructionError::Raise("Domaine incorrect");
67   }
68   else { 
69     Perform(IntCurve_IConicTool(C),D1,PCurve,D2,TolConf,Tol);
70   }
71 }
72 //--------------------------------------------------------------------------------
73 inline void IntCurve_IntConicCurveGen::Perform (const gp_Elips2d& E,
74                                                 const IntRes2d_Domain& D1,
75                                                 const ThePCurve& PCurve,
76                                                 const IntRes2d_Domain& D2,
77                                                 const Standard_Real TolConf,
78                                                 const Standard_Real Tol) {
79   if(!D1.IsClosed()) {
80     IntRes2d_Domain D(D1);
81     D.SetEquivalentParameters(D1.FirstParameter(),D1.FirstParameter()+M_PI+M_PI);
82     Perform(IntCurve_IConicTool(E),D,PCurve,D2,TolConf,Tol);
83   }
84   else { 
85     Perform(IntCurve_IConicTool(E),D1,PCurve,D2,TolConf,Tol);
86   }
87 }
88 //--------------------------------------------------------------------------------
89 inline void IntCurve_IntConicCurveGen::Perform (const gp_Parab2d& Prb,
90                                                 const IntRes2d_Domain& D1,
91                                                 const ThePCurve& PCurve,
92                                                 const IntRes2d_Domain& D2,
93                                                 const Standard_Real TolConf,
94                                                 const Standard_Real Tol) {
95   Perform(IntCurve_IConicTool(Prb),D1,PCurve,D2,TolConf,Tol);
96 }
97 //--------------------------------------------------------------------------------
98 inline void IntCurve_IntConicCurveGen::Perform (const gp_Hypr2d& H,
99                                                 const IntRes2d_Domain& D1,
100                                                 const ThePCurve& PCurve,
101                                                 const IntRes2d_Domain& D2,
102                                                 const Standard_Real TolConf,
103                                                 const Standard_Real Tol) {
104   Perform(IntCurve_IConicTool(H),D1,PCurve,D2,TolConf,Tol);
105 }
106 //--------------------------------------------------------------------------------
107 inline void IntCurve_IntConicCurveGen::Perform (const IntCurve_IConicTool& ICurve,
108                                                 const IntRes2d_Domain& D1,
109                                                 const ThePCurve& PCurve,
110                                                 const IntRes2d_Domain& D2,
111                                                 const Standard_Real TolConf,
112                                                 const Standard_Real Tol) {
113   IntCurve_TheIntersector myintersection; 
114   myintersection.SetReversedParameters(ReversedParameters());
115   myintersection.Perform(ICurve,D1,PCurve,D2,TolConf,Tol);
116   this->SetValues(myintersection);
117 }
118 //================================================================================
119   
120   
121