Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1992-07-01
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 _IntAna_Quadric_HeaderFile
0018 #define _IntAna_Quadric_HeaderFile
0019 
0020 #include <NCollection_List.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 class gp_Cone;
0024 class gp_Cylinder;
0025 class gp_Pln;
0026 class gp_Sphere;
0027 
0028 //! This class provides a description of Quadrics by their
0029 //! Coefficients in natural coordinate system.
0030 class IntAna_Quadric 
0031 {
0032 public:
0033 
0034   DEFINE_STANDARD_ALLOC
0035 
0036   
0037   //! Empty Constructor
0038   Standard_EXPORT IntAna_Quadric();
0039   
0040   //! Creates a Quadric from a Pln
0041   Standard_EXPORT IntAna_Quadric(const gp_Pln& P);
0042   
0043   //! Creates a Quadric from a Sphere
0044   Standard_EXPORT IntAna_Quadric(const gp_Sphere& Sph);
0045   
0046   //! Creates a Quadric from a Cylinder
0047   Standard_EXPORT IntAna_Quadric(const gp_Cylinder& Cyl);
0048   
0049   //! Creates a Quadric from a Cone
0050   Standard_EXPORT IntAna_Quadric(const gp_Cone& Cone);
0051   
0052   //! Initializes the quadric with a Pln
0053   Standard_EXPORT void SetQuadric (const gp_Pln& P);
0054   
0055   //! Initialize the quadric with a Sphere
0056   Standard_EXPORT void SetQuadric (const gp_Sphere& Sph);
0057   
0058   //! Initializes the quadric with a Cone
0059   Standard_EXPORT void SetQuadric (const gp_Cone& Con);
0060   
0061   //! Initializes the quadric with a Cylinder
0062   Standard_EXPORT void SetQuadric (const gp_Cylinder& Cyl);
0063   
0064   //! Returns the coefficients of the polynomial equation
0065   //! which define the quadric:
0066   //! xCXX x**2 + xCYY y**2 + xCZZ z**2
0067   //! + 2 ( xCXY x y  + xCXZ x z  + xCYZ y z  )
0068   //! + 2 ( xCX x + xCY y + xCZ z )
0069   //! + xCCte
0070   Standard_EXPORT void Coefficients (Standard_Real& xCXX, Standard_Real& xCYY, Standard_Real& xCZZ, Standard_Real& xCXY, Standard_Real& xCXZ, Standard_Real& xCYZ, Standard_Real& xCX, Standard_Real& xCY, Standard_Real& xCZ, Standard_Real& xCCte) const;
0071   
0072   //! Returns the coefficients of the polynomial equation
0073   //! ( written in the natural coordinates system )
0074   //! in the local coordinates system defined by Axis
0075   Standard_EXPORT void NewCoefficients (Standard_Real& xCXX, Standard_Real& xCYY, Standard_Real& xCZZ, Standard_Real& xCXY, Standard_Real& xCXZ, Standard_Real& xCYZ, Standard_Real& xCX, Standard_Real& xCY, Standard_Real& xCZ, Standard_Real& xCCte, const gp_Ax3& Axis) const;
0076 
0077   //! Returns the list of special points (with singularities)
0078   const NCollection_List<gp_Pnt>& SpecialPoints() const
0079   {
0080     return mySpecialPoints;
0081   }
0082 
0083 
0084 protected:
0085 
0086 
0087 
0088 
0089 
0090 private:
0091 
0092 
0093 
0094   Standard_Real CXX;
0095   Standard_Real CYY;
0096   Standard_Real CZZ;
0097   Standard_Real CXY;
0098   Standard_Real CXZ;
0099   Standard_Real CYZ;
0100   Standard_Real CX;
0101   Standard_Real CY;
0102   Standard_Real CZ;
0103   Standard_Real CCte;
0104   NCollection_List<gp_Pnt> mySpecialPoints;
0105 
0106 };
0107 
0108 
0109 
0110 
0111 
0112 
0113 
0114 #endif // _IntAna_Quadric_HeaderFile