Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:29

0001 // Created on: 1999-09-21
0002 // Created by: Edward AGAPOV
0003 // Copyright (c) 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_ExtPRevS_HeaderFile
0018 #define _Extrema_ExtPRevS_HeaderFile
0019 
0020 #include <GeomAdaptor_SurfaceOfRevolution.hxx>
0021 #include <gp_Ax2.hxx>
0022 #include <Extrema_GenExtPS.hxx>
0023 #include <Extrema_POnSurf.hxx>
0024 
0025 DEFINE_STANDARD_HANDLE(Extrema_ExtPRevS, Standard_Transient)
0026 
0027 //! It calculates all the extremum (minimum and
0028 //! maximum) distances between a point and a surface
0029 //! of revolution.
0030 class Extrema_ExtPRevS : public Standard_Transient
0031 {
0032 
0033 public:
0034 
0035   
0036   Standard_EXPORT Extrema_ExtPRevS();
0037   
0038   //! It calculates all the distances between a point
0039   //! from gp and a SurfacePtr from Adaptor3d.
0040   Standard_EXPORT Extrema_ExtPRevS(const gp_Pnt& P, const Handle(GeomAdaptor_SurfaceOfRevolution)& S, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real Vmin, const Standard_Real Vsup, const Standard_Real TolU, const Standard_Real TolV);
0041   
0042   //! It calculates all the distances between a point
0043   //! from gp and a SurfacePtr from Adaptor3d.
0044   Standard_EXPORT Extrema_ExtPRevS(const gp_Pnt& P, const Handle(GeomAdaptor_SurfaceOfRevolution)& S, const Standard_Real TolU, const Standard_Real TolV);
0045   
0046   Standard_EXPORT void Initialize (const Handle(GeomAdaptor_SurfaceOfRevolution)& S, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real Vmin, const Standard_Real Vsup, const Standard_Real TolU, const Standard_Real TolV);
0047   
0048   Standard_EXPORT void Perform (const gp_Pnt& P);
0049   
0050   //! Returns True if the distances are found.
0051   Standard_EXPORT Standard_Boolean IsDone() const;
0052   
0053   //! Returns the number of extremum distances.
0054   Standard_EXPORT Standard_Integer NbExt() const;
0055   
0056   //! Returns the value of the Nth resulting square distance.
0057   Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N) const;
0058   
0059   //! Returns the point of the Nth resulting distance.
0060   Standard_EXPORT const Extrema_POnSurf& Point (const Standard_Integer N) const;
0061 
0062 
0063 
0064 
0065   DEFINE_STANDARD_RTTIEXT(Extrema_ExtPRevS,Standard_Transient)
0066 
0067 protected:
0068 
0069 
0070 
0071 
0072 private:
0073 
0074 
0075   Handle(GeomAdaptor_SurfaceOfRevolution) myS;
0076   Standard_Real myvinf;
0077   Standard_Real myvsup;
0078   Standard_Real mytolv;
0079   gp_Ax2 myPosition;
0080   Extrema_GenExtPS myExtPS;
0081   Standard_Boolean myIsAnalyticallyComputable;
0082   Standard_Boolean myDone;
0083   Standard_Integer myNbExt;
0084   Standard_Real mySqDist[8];
0085   Extrema_POnSurf myPoint[8];
0086 
0087 
0088 };
0089 
0090 
0091 
0092 
0093 
0094 
0095 
0096 #endif // _Extrema_ExtPRevS_HeaderFile