Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-13 09:16:55

0001 // Created on: 1992-04-27
0002 // Created by: Laurent BUCHARD
0003 // Copyright (c) 1992-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _IntCurve_IntConicConic_HeaderFile
0018 #define _IntCurve_IntConicConic_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <IntCurve_IntImpConicParConic.hxx>
0024 #include <IntRes2d_Intersection.hxx>
0025 class gp_Lin2d;
0026 class IntRes2d_Domain;
0027 class gp_Circ2d;
0028 class gp_Elips2d;
0029 class gp_Parab2d;
0030 class gp_Hypr2d;
0031 
0032 //! Provides methods to intersect two conics.
0033 //! The exception ConstructionError is raised in constructors
0034 //! or in Perform methods when a domain (Domain from IntRes2d)
0035 //! is not correct, i-e when a Circle (Circ2d from gp) or
0036 //! an Ellipse (i-e Elips2d from gp) do not have a closed
0037 //! domain (use the SetEquivalentParameters method for a domain
0038 //! on a circle or an ellipse).
0039 class IntCurve_IntConicConic : public IntRes2d_Intersection
0040 {
0041 public:
0042   DEFINE_STANDARD_ALLOC
0043 
0044   //! Empty Constructor
0045   IntCurve_IntConicConic();
0046 
0047   //! Intersection between 2 lines from gp.
0048   IntCurve_IntConicConic(const gp_Lin2d&        L1,
0049                          const IntRes2d_Domain& D1,
0050                          const gp_Lin2d&        L2,
0051                          const IntRes2d_Domain& D2,
0052                          const double           TolConf,
0053                          const double           Tol);
0054 
0055   //! Intersection between 2 lines from gp.
0056   Standard_EXPORT void Perform(const gp_Lin2d&        L1,
0057                                const IntRes2d_Domain& D1,
0058                                const gp_Lin2d&        L2,
0059                                const IntRes2d_Domain& D2,
0060                                const double           TolConf,
0061                                const double           Tol);
0062 
0063   //! Intersection between a line and a circle.
0064   //! The exception ConstructionError is raised if the method
0065   //! IsClosed of the domain of the circle returns False.
0066   IntCurve_IntConicConic(const gp_Lin2d&        L,
0067                          const IntRes2d_Domain& DL,
0068                          const gp_Circ2d&       C,
0069                          const IntRes2d_Domain& DC,
0070                          const double           TolConf,
0071                          const double           Tol);
0072 
0073   //! Intersection between a line and a circle.
0074   //! The exception ConstructionError is raised if the method
0075   //! IsClosed of the domain of the circle returns False.
0076   Standard_EXPORT void Perform(const gp_Lin2d&        L,
0077                                const IntRes2d_Domain& DL,
0078                                const gp_Circ2d&       C,
0079                                const IntRes2d_Domain& DC,
0080                                const double           TolConf,
0081                                const double           Tol);
0082 
0083   //! Intersection between a line and an ellipse.
0084   //! The exception ConstructionError is raised if the method
0085   //! IsClosed of the domain of the ellipse returns False.
0086   IntCurve_IntConicConic(const gp_Lin2d&        L,
0087                          const IntRes2d_Domain& DL,
0088                          const gp_Elips2d&      E,
0089                          const IntRes2d_Domain& DE,
0090                          const double           TolConf,
0091                          const double           Tol);
0092 
0093   //! Intersection between a line and an ellipse.
0094   //! The exception ConstructionError is raised if the method
0095   //! IsClosed of the domain of the ellipse returns False.
0096   Standard_EXPORT void Perform(const gp_Lin2d&        L,
0097                                const IntRes2d_Domain& DL,
0098                                const gp_Elips2d&      E,
0099                                const IntRes2d_Domain& DE,
0100                                const double           TolConf,
0101                                const double           Tol);
0102 
0103   //! Intersection between a line and a parabola from gp.
0104   IntCurve_IntConicConic(const gp_Lin2d&        L,
0105                          const IntRes2d_Domain& DL,
0106                          const gp_Parab2d&      P,
0107                          const IntRes2d_Domain& DP,
0108                          const double           TolConf,
0109                          const double           Tol);
0110 
0111   //! Intersection between a line and a parabola from gp.
0112   Standard_EXPORT void Perform(const gp_Lin2d&        L,
0113                                const IntRes2d_Domain& DL,
0114                                const gp_Parab2d&      P,
0115                                const IntRes2d_Domain& DP,
0116                                const double           TolConf,
0117                                const double           Tol);
0118 
0119   //! Intersection between a line and an hyperbola.
0120   IntCurve_IntConicConic(const gp_Lin2d&        L,
0121                          const IntRes2d_Domain& DL,
0122                          const gp_Hypr2d&       H,
0123                          const IntRes2d_Domain& DH,
0124                          const double           TolConf,
0125                          const double           Tol);
0126 
0127   //! Intersection between a line and an hyperbola.
0128   Standard_EXPORT void Perform(const gp_Lin2d&        L,
0129                                const IntRes2d_Domain& DL,
0130                                const gp_Hypr2d&       H,
0131                                const IntRes2d_Domain& DH,
0132                                const double           TolConf,
0133                                const double           Tol);
0134 
0135   //! Intersection between 2 circles from gp.
0136   //! The exception ConstructionError is raised if the method
0137   //! IsClosed of one of the domain returns False.
0138   IntCurve_IntConicConic(const gp_Circ2d&       C1,
0139                          const IntRes2d_Domain& D1,
0140                          const gp_Circ2d&       C2,
0141                          const IntRes2d_Domain& D2,
0142                          const double           TolConf,
0143                          const double           Tol);
0144 
0145   //! Intersection between 2 circles from gp.
0146   //! The exception ConstructionError is raised if the method
0147   //! IsClosed of the domain of one of the circle returns False.
0148   Standard_EXPORT void Perform(const gp_Circ2d&       C1,
0149                                const IntRes2d_Domain& D1,
0150                                const gp_Circ2d&       C2,
0151                                const IntRes2d_Domain& D2,
0152                                const double           TolConf,
0153                                const double           Tol);
0154 
0155   //! Intersection between a circle and an ellipse.
0156   //! The exception ConstructionError is raised if the method
0157   //! IsClosed of one the domain returns False.
0158   IntCurve_IntConicConic(const gp_Circ2d&       C,
0159                          const IntRes2d_Domain& DC,
0160                          const gp_Elips2d&      E,
0161                          const IntRes2d_Domain& DE,
0162                          const double           TolConf,
0163                          const double           Tol);
0164 
0165   //! Intersection between a circle and an ellipse.
0166   //! The exception ConstructionError is raised if the method
0167   //! IsClosed of one the domain returns False.
0168   Standard_EXPORT void Perform(const gp_Circ2d&       C,
0169                                const IntRes2d_Domain& DC,
0170                                const gp_Elips2d&      E,
0171                                const IntRes2d_Domain& DE,
0172                                const double           TolConf,
0173                                const double           Tol);
0174 
0175   //! Intersection between a circle and a parabola.
0176   //! The exception ConstructionError is raised if the method
0177   //! IsClosed of the domain of the circle returns False.
0178   IntCurve_IntConicConic(const gp_Circ2d&       C,
0179                          const IntRes2d_Domain& DC,
0180                          const gp_Parab2d&      P,
0181                          const IntRes2d_Domain& DP,
0182                          const double           TolConf,
0183                          const double           Tol);
0184 
0185   //! Intersection between a circle and a parabola.
0186   //! The exception ConstructionError is raised if the method
0187   //! IsClosed of the domain of the circle returns False.
0188   Standard_EXPORT void Perform(const gp_Circ2d&       C,
0189                                const IntRes2d_Domain& DC,
0190                                const gp_Parab2d&      P,
0191                                const IntRes2d_Domain& DP,
0192                                const double           TolConf,
0193                                const double           Tol);
0194 
0195   //! Intersection between a circle and an hyperbola.
0196   //! The exception ConstructionError is raised if the method
0197   //! IsClosed of the domain of the circle returns False.
0198   IntCurve_IntConicConic(const gp_Circ2d&       C,
0199                          const IntRes2d_Domain& DC,
0200                          const gp_Hypr2d&       H,
0201                          const IntRes2d_Domain& DH,
0202                          const double           TolConf,
0203                          const double           Tol);
0204 
0205   //! Intersection between a circle and an hyperbola.
0206   //! The exception ConstructionError is raised if the method
0207   //! IsClosed of the domain of the circle returns False.
0208   Standard_EXPORT void Perform(const gp_Circ2d&       C,
0209                                const IntRes2d_Domain& DC,
0210                                const gp_Hypr2d&       H,
0211                                const IntRes2d_Domain& DH,
0212                                const double           TolConf,
0213                                const double           Tol);
0214 
0215   //! Intersection between 2 ellipses.
0216   //! The exception ConstructionError is raised if the method
0217   //! IsClosed of one of the domain returns False.
0218   IntCurve_IntConicConic(const gp_Elips2d&      E1,
0219                          const IntRes2d_Domain& D1,
0220                          const gp_Elips2d&      E2,
0221                          const IntRes2d_Domain& D2,
0222                          const double           TolConf,
0223                          const double           Tol);
0224 
0225   //! Intersection between 2 ellipses.
0226   //! The exception ConstructionError is raised if the method
0227   //! IsClosed of one of the domain returns False.
0228   Standard_EXPORT void Perform(const gp_Elips2d&      E1,
0229                                const IntRes2d_Domain& D1,
0230                                const gp_Elips2d&      E2,
0231                                const IntRes2d_Domain& D2,
0232                                const double           TolConf,
0233                                const double           Tol);
0234 
0235   //! Intersection between an ellipse and a parabola.
0236   //! The exception ConstructionError is raised if the method
0237   //! IsClosed of the domain of the ellipse returns False.
0238   IntCurve_IntConicConic(const gp_Elips2d&      E,
0239                          const IntRes2d_Domain& DE,
0240                          const gp_Parab2d&      P,
0241                          const IntRes2d_Domain& DP,
0242                          const double           TolConf,
0243                          const double           Tol);
0244 
0245   //! Intersection between an ellipse and a parabola.
0246   //! The exception ConstructionError is raised if the method
0247   //! IsClosed of the domain of the ellipse returns False.
0248   Standard_EXPORT void Perform(const gp_Elips2d&      E,
0249                                const IntRes2d_Domain& DE,
0250                                const gp_Parab2d&      P,
0251                                const IntRes2d_Domain& DP,
0252                                const double           TolConf,
0253                                const double           Tol);
0254 
0255   //! Intersection between an ellipse and an hyperbola.
0256   //! The exception ConstructionError is raised if the method
0257   //! IsClosed of the domain of the ellipse returns False.
0258   IntCurve_IntConicConic(const gp_Elips2d&      E,
0259                          const IntRes2d_Domain& DE,
0260                          const gp_Hypr2d&       H,
0261                          const IntRes2d_Domain& DH,
0262                          const double           TolConf,
0263                          const double           Tol);
0264 
0265   //! Intersection between an ellipse and an hyperbola.
0266   //! The exception ConstructionError is raised if the method
0267   //! IsClosed of the domain of the ellipse returns False.
0268   Standard_EXPORT void Perform(const gp_Elips2d&      E,
0269                                const IntRes2d_Domain& DE,
0270                                const gp_Hypr2d&       H,
0271                                const IntRes2d_Domain& DH,
0272                                const double           TolConf,
0273                                const double           Tol);
0274 
0275   //! Intersection between 2 parabolas.
0276   IntCurve_IntConicConic(const gp_Parab2d&      P1,
0277                          const IntRes2d_Domain& D1,
0278                          const gp_Parab2d&      P2,
0279                          const IntRes2d_Domain& D2,
0280                          const double           TolConf,
0281                          const double           Tol);
0282 
0283   //! Intersection between 2 parabolas.
0284   Standard_EXPORT void Perform(const gp_Parab2d&      P1,
0285                                const IntRes2d_Domain& D1,
0286                                const gp_Parab2d&      P2,
0287                                const IntRes2d_Domain& D2,
0288                                const double           TolConf,
0289                                const double           Tol);
0290 
0291   //! Intersection between a parabola and an hyperbola.
0292   IntCurve_IntConicConic(const gp_Parab2d&      P,
0293                          const IntRes2d_Domain& DP,
0294                          const gp_Hypr2d&       H,
0295                          const IntRes2d_Domain& DH,
0296                          const double           TolConf,
0297                          const double           Tol);
0298 
0299   //! Intersection between a parabola and an hyperbola.
0300   Standard_EXPORT void Perform(const gp_Parab2d&      P,
0301                                const IntRes2d_Domain& DP,
0302                                const gp_Hypr2d&       H,
0303                                const IntRes2d_Domain& DH,
0304                                const double           TolConf,
0305                                const double           Tol);
0306 
0307   //! Intersection between 2 hyperbolas.
0308   IntCurve_IntConicConic(const gp_Hypr2d&       H1,
0309                          const IntRes2d_Domain& D1,
0310                          const gp_Hypr2d&       H2,
0311                          const IntRes2d_Domain& D2,
0312                          const double           TolConf,
0313                          const double           Tol);
0314 
0315   //! Intersection between 2 hyperbolas.
0316   Standard_EXPORT void Perform(const gp_Hypr2d&       H1,
0317                                const IntRes2d_Domain& D1,
0318                                const gp_Hypr2d&       H2,
0319                                const IntRes2d_Domain& D2,
0320                                const double           TolConf,
0321                                const double           Tol);
0322 
0323 private:
0324   IntCurve_IntImpConicParConic Inter;
0325 };
0326 
0327 #include <IntCurve_IntConicConic.lxx>
0328 
0329 #endif // _IntCurve_IntConicConic_HeaderFile