Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/IntAna_IntQuadQuad.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Created on: 1991-05-15
0002 // Created by: Isabelle GRIGNON
0003 // Copyright (c) 1991-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_IntQuadQuad_HeaderFile
0018 #define _IntAna_IntQuadQuad_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <IntAna_Curve.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <gp_Pnt.hxx>
0026 class gp_Cylinder;
0027 class IntAna_Quadric;
0028 class gp_Cone;
0029 
0030 //! This class provides the analytic intersection between a
0031 //! cylinder or a cone from gp and another quadric, as defined
0032 //! in the class Quadric from IntAna.
0033 //! This algorithm is used when the geometric intersection
0034 //! (class QuadQuadGeo from IntAna) returns no geometric
0035 //! solution.
0036 //! The result of the intersection may be
0037 //! - Curves as defined in the class Curve from IntAna
0038 //! - Points (Pnt from gp)
0039 class IntAna_IntQuadQuad
0040 {
0041 public:
0042   DEFINE_STANDARD_ALLOC
0043 
0044   //! Empty Constructor
0045   Standard_EXPORT IntAna_IntQuadQuad();
0046 
0047   //! Creates the intersection between a cylinder and a quadric.
0048   //! Tol est a definir plus precisemment.
0049   Standard_EXPORT IntAna_IntQuadQuad(const gp_Cylinder&    C,
0050                                      const IntAna_Quadric& Q,
0051                                      const double          Tol);
0052 
0053   //! Creates the intersection between a cone and a quadric.
0054   //! Tol est a definir plus precisemment.
0055   Standard_EXPORT IntAna_IntQuadQuad(const gp_Cone& C, const IntAna_Quadric& Q, const double Tol);
0056 
0057   //! Intersects a cylinder and a quadric .
0058   //! Tol est a definir plus precisemment.
0059   Standard_EXPORT void Perform(const gp_Cylinder& C, const IntAna_Quadric& Q, const double Tol);
0060 
0061   //! Intersects a cone and a quadric.
0062   //! Tol est a definir plus precisemment.
0063   Standard_EXPORT void Perform(const gp_Cone& C, const IntAna_Quadric& Q, const double Tol);
0064 
0065   //! Returns True if the computation was successful.
0066   bool IsDone() const;
0067 
0068   //! Returns TRUE if the cylinder, the cone or the sphere
0069   //! is identical to the quadric.
0070   bool IdenticalElements() const;
0071 
0072   //! Returns the number of curves solution.
0073   int NbCurve() const;
0074 
0075   //! Returns the curve of range N.
0076   Standard_EXPORT const IntAna_Curve& Curve(const int N) const;
0077 
0078   //! Returns the number of contact point.
0079   int NbPnt() const;
0080 
0081   //! Returns the point of range N.
0082   Standard_EXPORT const gp_Pnt& Point(const int N) const;
0083 
0084   //! Returns the parameters on the "explicit quadric"
0085   //! (i.e. the cylinder or the cone, the first argument given to the constructor)
0086   //! of the point of range N.
0087   Standard_EXPORT void Parameters(const int N, double& U1, double& U2) const;
0088 
0089   //! Returns True if the Curve I shares its last bound
0090   //! with another curve.
0091   Standard_EXPORT bool HasNextCurve(const int I) const;
0092 
0093   //! If HasNextCurve(I) returns True, this function
0094   //! returns the Index J of the curve which has a
0095   //! common bound with the curve I. If theOpposite ==
0096   //! True, then the last parameter of the curve I, and
0097   //! the last parameter of the curve J give the same
0098   //! point. Else the last parameter of the curve I and
0099   //! the first parameter of the curve J are the same
0100   //! point.
0101   Standard_EXPORT int NextCurve(const int I, bool& theOpposite) const;
0102 
0103   //! Returns True if the Curve I shares its first bound
0104   //! with another curve.
0105   Standard_EXPORT bool HasPreviousCurve(const int I) const;
0106 
0107   //! if HasPreviousCurve(I) returns True, this function
0108   //! returns the Index J of the curve which has a common
0109   //! bound with the curve I. If theOpposite == True
0110   //! then the first parameter of the curve I, and the
0111   //! first parameter of the curve J give the same
0112   //! point. Else the first parameter of the curve I and
0113   //! the last parameter of the curve J are the same
0114   //! point.
0115   Standard_EXPORT int PreviousCurve(const int I, bool& theOpposite) const;
0116 
0117 protected:
0118   //! Set the next and previous fields. Private method.
0119   Standard_EXPORT void InternalSetNextAndPrevious();
0120 
0121 protected:
0122   bool         done;
0123   bool         identical;
0124   IntAna_Curve TheCurve[12];
0125   int          previouscurve[12];
0126   int          nextcurve[12];
0127   int          NbCurves;
0128   int          Nbpoints;
0129   gp_Pnt       Thepoints[2];
0130   int          myNbMaxCurves;
0131   double       myEpsilon;
0132   double       myEpsilonCoeffPolyNull;
0133 };
0134 
0135 #include <IntAna_IntQuadQuad.lxx>
0136 
0137 #endif // _IntAna_IntQuadQuad_HeaderFile