Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:05

0001 // Created on: 1992-02-11
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 _IntAna2d_Conic_HeaderFile
0018 #define _IntAna2d_Conic_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 class gp_Circ2d;
0024 class gp_Lin2d;
0025 class gp_Parab2d;
0026 class gp_Hypr2d;
0027 class gp_Elips2d;
0028 class gp_XY;
0029 class gp_Ax2d;
0030 
0031 
0032 //! Definition of a conic by its implicit quadaratic equation:
0033 //! A.X**2 + B.Y**2 + 2.C.X*Y + 2.D.X + 2.E.Y + F = 0.
0034 class IntAna2d_Conic 
0035 {
0036 public:
0037 
0038   DEFINE_STANDARD_ALLOC
0039 
0040   
0041   Standard_EXPORT IntAna2d_Conic(const gp_Circ2d& C);
0042   
0043   Standard_EXPORT IntAna2d_Conic(const gp_Lin2d& C);
0044   
0045   Standard_EXPORT IntAna2d_Conic(const gp_Parab2d& C);
0046   
0047   Standard_EXPORT IntAna2d_Conic(const gp_Hypr2d& C);
0048   
0049   Standard_EXPORT IntAna2d_Conic(const gp_Elips2d& C);
0050   
0051   //! value of the function F at the point X,Y.
0052   Standard_EXPORT Standard_Real Value (const Standard_Real X, const Standard_Real Y) const;
0053   
0054   //! returns the value of the gradient of F at the point X,Y.
0055   Standard_EXPORT gp_XY Grad (const Standard_Real X, const Standard_Real Y) const;
0056   
0057   //! Returns the value of the function and its gradient at
0058   //! the point X,Y.
0059   Standard_EXPORT void ValAndGrad (const Standard_Real X, const Standard_Real Y, Standard_Real& Val, gp_XY& Grd) const;
0060   
0061   //! returns the coefficients of the polynomial equation
0062   //! which defines the conic:
0063   //! A.X**2 + B.Y**2 + 2.C.X*Y + 2.D.X + 2.E.Y + F = 0.
0064   Standard_EXPORT void Coefficients (Standard_Real& A, Standard_Real& B, Standard_Real& C, Standard_Real& D, Standard_Real& E, Standard_Real& F) const;
0065   
0066   //! Returns the coefficients of the polynomial equation
0067   //! ( written in the natural coordinates system )
0068   //! A x x + B y y + 2 C x y + 2 D x + 2 E y + F
0069   //! in the local coordinates system defined by Axis
0070   Standard_EXPORT void NewCoefficients (Standard_Real& A, Standard_Real& B, Standard_Real& C, Standard_Real& D, Standard_Real& E, Standard_Real& F, const gp_Ax2d& Axis) const;
0071 
0072 
0073 
0074 
0075 protected:
0076 
0077 
0078 
0079 
0080 
0081 private:
0082 
0083 
0084 
0085   Standard_Real a;
0086   Standard_Real b;
0087   Standard_Real c;
0088   Standard_Real d;
0089   Standard_Real e;
0090   Standard_Real f;
0091 
0092 
0093 };
0094 
0095 
0096 
0097 
0098 
0099 
0100 
0101 #endif // _IntAna2d_Conic_HeaderFile