Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/Extrema_ExtElC2d.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: 1994-01-04
0002 // Created by: Christophe MARION
0003 // Copyright (c) 1994-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 _Extrema_ExtElC2d_HeaderFile
0018 #define _Extrema_ExtElC2d_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <Standard_Integer.hxx>
0024 #include <Extrema_POnCurv2d.hxx>
0025 
0026 class gp_Lin2d;
0027 class gp_Circ2d;
0028 class gp_Elips2d;
0029 class gp_Hypr2d;
0030 class gp_Parab2d;
0031 
0032 //! It calculates all the distance between two elementary
0033 //! curves.
0034 //! These distances can be maximum or minimum.
0035 class Extrema_ExtElC2d
0036 {
0037 public:
0038   DEFINE_STANDARD_ALLOC
0039 
0040   Standard_EXPORT Extrema_ExtElC2d();
0041 
0042   //! Calculates the distance between two lines.
0043   //! AngTol is used to test if the lines are parallel:
0044   //! Angle(C1,C2) < AngTol.
0045   Standard_EXPORT Extrema_ExtElC2d(const gp_Lin2d& C1, const gp_Lin2d& C2, const double AngTol);
0046 
0047   //! Calculates the distance between a line and a
0048   //! circle.
0049   Standard_EXPORT Extrema_ExtElC2d(const gp_Lin2d& C1, const gp_Circ2d& C2, const double Tol);
0050 
0051   //! Calculates the distance between a line and an
0052   //! ellipse.
0053   Standard_EXPORT Extrema_ExtElC2d(const gp_Lin2d& C1, const gp_Elips2d& C2);
0054 
0055   //! Calculates the distance between a line and a
0056   //! hyperbola.
0057   Standard_EXPORT Extrema_ExtElC2d(const gp_Lin2d& C1, const gp_Hypr2d& C2);
0058 
0059   //! Calculates the distance between a line and a
0060   //! parabola.
0061   Standard_EXPORT Extrema_ExtElC2d(const gp_Lin2d& C1, const gp_Parab2d& C2);
0062 
0063   //! Calculates the distance between two circles.
0064   //! The circles can be parallel or identical.
0065   Standard_EXPORT Extrema_ExtElC2d(const gp_Circ2d& C1, const gp_Circ2d& C2);
0066 
0067   //! Calculates the distance between a circle and an
0068   //! ellipse.
0069   Standard_EXPORT Extrema_ExtElC2d(const gp_Circ2d& C1, const gp_Elips2d& C2);
0070 
0071   //! Calculates the distance between a circle and a
0072   //! hyperbola.
0073   Standard_EXPORT Extrema_ExtElC2d(const gp_Circ2d& C1, const gp_Hypr2d& C2);
0074 
0075   //! Calculates the distance between a circle and a
0076   //! parabola.
0077   Standard_EXPORT Extrema_ExtElC2d(const gp_Circ2d& C1, const gp_Parab2d& C2);
0078 
0079   //! Returns True if the distances are found.
0080   Standard_EXPORT bool IsDone() const;
0081 
0082   //! Returns True if the two curves are parallel.
0083   Standard_EXPORT bool IsParallel() const;
0084 
0085   //! Returns the number of extremum distances.
0086   Standard_EXPORT int NbExt() const;
0087 
0088   //! Returns the value of the Nth extremum square distance.
0089   Standard_EXPORT double SquareDistance(const int N = 1) const;
0090 
0091   //! Returns the points of the Nth extremum distance.
0092   //! P1 is on the first curve, P2 on the second one.
0093   Standard_EXPORT void Points(const int N, Extrema_POnCurv2d& P1, Extrema_POnCurv2d& P2) const;
0094 
0095 private:
0096   bool              myDone;
0097   bool              myIsPar;
0098   int               myNbExt;
0099   double            mySqDist[8];
0100   Extrema_POnCurv2d myPoint[8][2];
0101 };
0102 
0103 #endif // _Extrema_ExtElC2d_HeaderFile