Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/Extrema_ExtPExtS.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: 1999-09-16
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_ExtPExtS_HeaderFile
0018 #define _Extrema_ExtPExtS_HeaderFile
0019 
0020 #include <Extrema_GenExtPS.hxx>
0021 #include <Extrema_FuncPSNorm.hxx>
0022 #include <Extrema_POnSurf.hxx>
0023 #include <GeomAdaptor_SurfaceOfLinearExtrusion.hxx>
0024 #include <gp_Ax2.hxx>
0025 #include <gp_Vec.hxx>
0026 
0027 //! It calculates all the extremum (minimum and
0028 //! maximum) distances between a point and a linear
0029 //! extrusion surface.
0030 class Extrema_ExtPExtS : public Standard_Transient
0031 {
0032 
0033 public:
0034   Standard_EXPORT Extrema_ExtPExtS();
0035 
0036   //! It calculates all the distances between a point
0037   //! from gp and a Surface.
0038   Standard_EXPORT Extrema_ExtPExtS(const gp_Pnt&                                            P,
0039                                    const occ::handle<GeomAdaptor_SurfaceOfLinearExtrusion>& S,
0040                                    const double                                             Umin,
0041                                    const double                                             Usup,
0042                                    const double                                             Vmin,
0043                                    const double                                             Vsup,
0044                                    const double                                             TolU,
0045                                    const double                                             TolV);
0046 
0047   //! It calculates all the distances between a point
0048   //! from gp and a Surface.
0049   Standard_EXPORT Extrema_ExtPExtS(const gp_Pnt&                                            P,
0050                                    const occ::handle<GeomAdaptor_SurfaceOfLinearExtrusion>& S,
0051                                    const double                                             TolU,
0052                                    const double                                             TolV);
0053 
0054   //! Initializes the fields of the algorithm.
0055   Standard_EXPORT void Initialize(const occ::handle<GeomAdaptor_SurfaceOfLinearExtrusion>& S,
0056                                   const double                                             Uinf,
0057                                   const double                                             Usup,
0058                                   const double                                             Vinf,
0059                                   const double                                             Vsup,
0060                                   const double                                             TolU,
0061                                   const double                                             TolV);
0062 
0063   Standard_EXPORT void Perform(const gp_Pnt& P);
0064 
0065   //! Returns True if the distances are found.
0066   Standard_EXPORT bool IsDone() const;
0067 
0068   //! Returns the number of extremum distances.
0069   Standard_EXPORT int NbExt() const;
0070 
0071   //! Returns the value of the Nth resulting square distance.
0072   Standard_EXPORT double SquareDistance(const int N) const;
0073 
0074   //! Returns the point of the Nth resulting distance.
0075   Standard_EXPORT const Extrema_POnSurf& Point(const int N) const;
0076 
0077   DEFINE_STANDARD_RTTIEXT(Extrema_ExtPExtS, Standard_Transient)
0078 
0079 private:
0080   Standard_EXPORT void MakePreciser(double&       U,
0081                                     const gp_Pnt& P,
0082                                     const bool    isMin,
0083                                     const gp_Ax2& OrtogSection) const;
0084 
0085   double                                            myuinf;
0086   double                                            myusup;
0087   double                                            mytolu;
0088   double                                            myvinf;
0089   double                                            myvsup;
0090   double                                            mytolv;
0091   Extrema_FuncPSNorm                                myF;
0092   occ::handle<Adaptor3d_Curve>                      myC;
0093   occ::handle<GeomAdaptor_SurfaceOfLinearExtrusion> myS;
0094   gp_Vec                                            myDirection;
0095   gp_Ax2                                            myPosition;
0096   Extrema_GenExtPS                                  myExtPS;
0097   bool                                              myIsAnalyticallyComputable;
0098   bool                                              myDone;
0099   int                                               myNbExt;
0100   double                                            mySqDist[4];
0101   Extrema_POnSurf                                   myPoint[4];
0102 };
0103 
0104 #endif // _Extrema_ExtPExtS_HeaderFile