1 // Created on: 1992-04-27
2 // Created by: Laurent BUCHARD
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License 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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _IntCurve_IntConicConic_HeaderFile
18 #define _IntCurve_IntConicConic_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <IntCurve_IntImpConicParConic.hxx>
25 #include <IntRes2d_Intersection.hxx>
26 #include <Standard_Real.hxx>
27 class Standard_ConstructionError;
29 class IntRes2d_Domain;
36 //! Provides methods to intersect two conics.
37 //! The exception ConstructionError is raised in constructors
38 //! or in Perform methods when a domain (Domain from IntRes2d)
39 //! is not correct, i-e when a Circle (Circ2d from gp) or
40 //! an Ellipse (i-e Elips2d from gp) do not have a closed
41 //! domain (use the SetEquivalentParameters method for a domain
42 //! on a circle or an ellipse).
43 class IntCurve_IntConicConic : public IntRes2d_Intersection
51 IntCurve_IntConicConic();
53 //! Intersection between 2 lines from gp.
54 IntCurve_IntConicConic(const gp_Lin2d& L1, const IntRes2d_Domain& D1, const gp_Lin2d& L2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
56 //! Intersection between 2 lines from gp.
57 Standard_EXPORT void Perform (const gp_Lin2d& L1, const IntRes2d_Domain& D1, const gp_Lin2d& L2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
59 //! Intersection between a line and a circle.
60 //! The exception ConstructionError is raised if the method
61 //! IsClosed of the domain of the circle returns False.
62 IntCurve_IntConicConic(const gp_Lin2d& L, const IntRes2d_Domain& DL, const gp_Circ2d& C, const IntRes2d_Domain& DC, const Standard_Real TolConf, const Standard_Real Tol);
64 //! Intersection between a line and a circle.
65 //! The exception ConstructionError is raised if the method
66 //! IsClosed of the domain of the circle returns False.
67 Standard_EXPORT void Perform (const gp_Lin2d& L, const IntRes2d_Domain& DL, const gp_Circ2d& C, const IntRes2d_Domain& DC, const Standard_Real TolConf, const Standard_Real Tol);
69 //! Intersection between a line and an ellipse.
70 //! The exception ConstructionError is raised if the method
71 //! IsClosed of the domain of the ellipse returns False.
72 IntCurve_IntConicConic(const gp_Lin2d& L, const IntRes2d_Domain& DL, const gp_Elips2d& E, const IntRes2d_Domain& DE, const Standard_Real TolConf, const Standard_Real Tol);
74 //! Intersection between a line and an ellipse.
75 //! The exception ConstructionError is raised if the method
76 //! IsClosed of the domain of the ellipse returns False.
77 Standard_EXPORT void Perform (const gp_Lin2d& L, const IntRes2d_Domain& DL, const gp_Elips2d& E, const IntRes2d_Domain& DE, const Standard_Real TolConf, const Standard_Real Tol);
79 //! Intersection between a line and a parabola from gp.
80 IntCurve_IntConicConic(const gp_Lin2d& L, const IntRes2d_Domain& DL, const gp_Parab2d& P, const IntRes2d_Domain& DP, const Standard_Real TolConf, const Standard_Real Tol);
82 //! Intersection between a line and a parabola from gp.
83 Standard_EXPORT void Perform (const gp_Lin2d& L, const IntRes2d_Domain& DL, const gp_Parab2d& P, const IntRes2d_Domain& DP, const Standard_Real TolConf, const Standard_Real Tol);
85 //! Intersection between a line and an hyperbola.
86 IntCurve_IntConicConic(const gp_Lin2d& L, const IntRes2d_Domain& DL, const gp_Hypr2d& H, const IntRes2d_Domain& DH, const Standard_Real TolConf, const Standard_Real Tol);
88 //! Intersection between a line and an hyperbola.
89 Standard_EXPORT void Perform (const gp_Lin2d& L, const IntRes2d_Domain& DL, const gp_Hypr2d& H, const IntRes2d_Domain& DH, const Standard_Real TolConf, const Standard_Real Tol);
91 //! Intersection between 2 circles from gp.
92 //! The exception ConstructionError is raised if the method
93 //! IsClosed of one of the domain returns False.
94 IntCurve_IntConicConic(const gp_Circ2d& C1, const IntRes2d_Domain& D1, const gp_Circ2d& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
96 //! Intersection between 2 circles from gp.
97 //! The exception ConstructionError is raised if the method
98 //! IsClosed of the domain of one of the circle returns False.
99 Standard_EXPORT void Perform (const gp_Circ2d& C1, const IntRes2d_Domain& D1, const gp_Circ2d& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
101 //! Intersection between a circle and an ellipse.
102 //! The exception ConstructionError is raised if the method
103 //! IsClosed of one the domain returns False.
104 IntCurve_IntConicConic(const gp_Circ2d& C, const IntRes2d_Domain& DC, const gp_Elips2d& E, const IntRes2d_Domain& DE, const Standard_Real TolConf, const Standard_Real Tol);
106 //! Intersection between a circle and an ellipse.
107 //! The exception ConstructionError is raised if the method
108 //! IsClosed of one the domain returns False.
109 Standard_EXPORT void Perform (const gp_Circ2d& C, const IntRes2d_Domain& DC, const gp_Elips2d& E, const IntRes2d_Domain& DE, const Standard_Real TolConf, const Standard_Real Tol);
111 //! Intersection between a circle and a parabola.
112 //! The exception ConstructionError is raised if the method
113 //! IsClosed of the domain of the circle returns False.
114 IntCurve_IntConicConic(const gp_Circ2d& C, const IntRes2d_Domain& DC, const gp_Parab2d& P, const IntRes2d_Domain& DP, const Standard_Real TolConf, const Standard_Real Tol);
116 //! Intersection between a circle and a parabola.
117 //! The exception ConstructionError is raised if the method
118 //! IsClosed of the domain of the circle returns False.
119 Standard_EXPORT void Perform (const gp_Circ2d& C, const IntRes2d_Domain& DC, const gp_Parab2d& P, const IntRes2d_Domain& DP, const Standard_Real TolConf, const Standard_Real Tol);
121 //! Intersection between a circle and an hyperbola.
122 //! The exception ConstructionError is raised if the method
123 //! IsClosed of the domain of the circle returns False.
124 IntCurve_IntConicConic(const gp_Circ2d& C, const IntRes2d_Domain& DC, const gp_Hypr2d& H, const IntRes2d_Domain& DH, const Standard_Real TolConf, const Standard_Real Tol);
126 //! Intersection between a circle and an hyperbola.
127 //! The exception ConstructionError is raised if the method
128 //! IsClosed of the domain of the circle returns False.
129 Standard_EXPORT void Perform (const gp_Circ2d& C, const IntRes2d_Domain& DC, const gp_Hypr2d& H, const IntRes2d_Domain& DH, const Standard_Real TolConf, const Standard_Real Tol);
131 //! Intersection between 2 ellipses.
132 //! The exception ConstructionError is raised if the method
133 //! IsClosed of one of the domain returns False.
134 IntCurve_IntConicConic(const gp_Elips2d& E1, const IntRes2d_Domain& D1, const gp_Elips2d& E2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
136 //! Intersection between 2 ellipses.
137 //! The exception ConstructionError is raised if the method
138 //! IsClosed of one of the domain returns False.
139 Standard_EXPORT void Perform (const gp_Elips2d& E1, const IntRes2d_Domain& D1, const gp_Elips2d& E2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
141 //! Intersection between an ellipse and a parabola.
142 //! The exception ConstructionError is raised if the method
143 //! IsClosed of the domain of the ellipse returns False.
144 IntCurve_IntConicConic(const gp_Elips2d& E, const IntRes2d_Domain& DE, const gp_Parab2d& P, const IntRes2d_Domain& DP, const Standard_Real TolConf, const Standard_Real Tol);
146 //! Intersection between an ellipse and a parabola.
147 //! The exception ConstructionError is raised if the method
148 //! IsClosed of the domain of the ellipse returns False.
149 Standard_EXPORT void Perform (const gp_Elips2d& E, const IntRes2d_Domain& DE, const gp_Parab2d& P, const IntRes2d_Domain& DP, const Standard_Real TolConf, const Standard_Real Tol);
151 //! Intersection between an ellipse and an hyperbola.
152 //! The exception ConstructionError is raised if the method
153 //! IsClosed of the domain of the ellipse returns False.
154 IntCurve_IntConicConic(const gp_Elips2d& E, const IntRes2d_Domain& DE, const gp_Hypr2d& H, const IntRes2d_Domain& DH, const Standard_Real TolConf, const Standard_Real Tol);
156 //! Intersection between an ellipse and an hyperbola.
157 //! The exception ConstructionError is raised if the method
158 //! IsClosed of the domain of the ellipse returns False.
159 Standard_EXPORT void Perform (const gp_Elips2d& E, const IntRes2d_Domain& DE, const gp_Hypr2d& H, const IntRes2d_Domain& DH, const Standard_Real TolConf, const Standard_Real Tol);
161 //! Intersection between 2 parabolas.
162 IntCurve_IntConicConic(const gp_Parab2d& P1, const IntRes2d_Domain& D1, const gp_Parab2d& P2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
164 //! Intersection between 2 parabolas.
165 Standard_EXPORT void Perform (const gp_Parab2d& P1, const IntRes2d_Domain& D1, const gp_Parab2d& P2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
167 //! Intersection between a parabola and an hyperbola.
168 IntCurve_IntConicConic(const gp_Parab2d& P, const IntRes2d_Domain& DP, const gp_Hypr2d& H, const IntRes2d_Domain& DH, const Standard_Real TolConf, const Standard_Real Tol);
170 //! Intersection between a parabola and an hyperbola.
171 Standard_EXPORT void Perform (const gp_Parab2d& P, const IntRes2d_Domain& DP, const gp_Hypr2d& H, const IntRes2d_Domain& DH, const Standard_Real TolConf, const Standard_Real Tol);
173 //! Intersection between 2 hyperbolas.
174 IntCurve_IntConicConic(const gp_Hypr2d& H1, const IntRes2d_Domain& D1, const gp_Hypr2d& H2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
176 //! Intersection between 2 hyperbolas.
177 Standard_EXPORT void Perform (const gp_Hypr2d& H1, const IntRes2d_Domain& D1, const gp_Hypr2d& H2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
192 IntCurve_IntImpConicParConic Inter;
198 #include <IntCurve_IntConicConic.lxx>
204 #endif // _IntCurve_IntConicConic_HeaderFile