1 // Created on: 1992-07-01
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 _IntAna_Quadric_HeaderFile
18 #define _IntAna_Quadric_HeaderFile
20 #include <Standard_DefineAlloc.hxx>
21 #include <NCollection_List.hxx>
23 //! This class provides a description of Quadrics by their
24 //! Coefficients in natural coordinate system.
33 Standard_EXPORT IntAna_Quadric();
35 //! Creates a Quadric from a Pln
36 Standard_EXPORT IntAna_Quadric(const gp_Pln& P);
38 //! Creates a Quadric from a Sphere
39 Standard_EXPORT IntAna_Quadric(const gp_Sphere& Sph);
41 //! Creates a Quadric from a Cylinder
42 Standard_EXPORT IntAna_Quadric(const gp_Cylinder& Cyl);
44 //! Creates a Quadric from a Cone
45 Standard_EXPORT IntAna_Quadric(const gp_Cone& Cone);
47 //! Initializes the quadric with a Pln
48 Standard_EXPORT void SetQuadric (const gp_Pln& P);
50 //! Initialize the quadric with a Sphere
51 Standard_EXPORT void SetQuadric (const gp_Sphere& Sph);
53 //! Initializes the quadric with a Cone
54 Standard_EXPORT void SetQuadric (const gp_Cone& Con);
56 //! Initializes the quadric with a Cylinder
57 Standard_EXPORT void SetQuadric (const gp_Cylinder& Cyl);
59 //! Returns the coefficients of the polynomial equation
60 //! which define the quadric:
61 //! xCXX x**2 + xCYY y**2 + xCZZ z**2
62 //! + 2 ( xCXY x y + xCXZ x z + xCYZ y z )
63 //! + 2 ( xCX x + xCY y + xCZ z )
65 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;
67 //! Returns the coefficients of the polynomial equation
68 //! ( written in the natural coordinates system )
69 //! in the local coordinates system defined by Axis
70 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;
72 //! Returns the list of special points (with singularities)
73 const NCollection_List<gp_Pnt>& SpecialPoints() const
75 return mySpecialPoints;
99 NCollection_List<gp_Pnt> mySpecialPoints;
109 #endif // _IntAna_Quadric_HeaderFile