|
||||
File indexing completed on 2025-01-18 10:03:29
0001 // Created on: 1995-07-18 0002 // Created by: Modelistation 0003 // Copyright (c) 1995-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_GenLocateExtPS_HeaderFile 0018 #define _Extrema_GenLocateExtPS_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 0023 #include <Standard_Boolean.hxx> 0024 #include <Extrema_POnSurf.hxx> 0025 class gp_Pnt; 0026 class Adaptor3d_Surface; 0027 0028 0029 //! With a close point, it calculates the distance 0030 //! between a point and a surface. 0031 //! Criteria type is defined in "Perform" method. 0032 class Extrema_GenLocateExtPS 0033 { 0034 public: 0035 0036 DEFINE_STANDARD_ALLOC 0037 0038 //! Constructor. 0039 Standard_EXPORT Extrema_GenLocateExtPS(const Adaptor3d_Surface& theS, 0040 const Standard_Real theTolU = Precision::PConfusion(), 0041 const Standard_Real theTolV = Precision::PConfusion()); 0042 0043 //! Calculates the extrema between the point and the surface using a close point. 0044 //! The close point is defined by the parameter values theU0 and theV0. 0045 //! Type of the algorithm depends on the isDistanceCriteria flag. 0046 //! If flag value is false - normal projection criteria will be used. 0047 //! If flag value is true - distance criteria will be used. 0048 Standard_EXPORT void Perform(const gp_Pnt& theP, 0049 const Standard_Real theU0, 0050 const Standard_Real theV0, 0051 const Standard_Boolean isDistanceCriteria = Standard_False); 0052 0053 //! Returns True if the distance is found. 0054 Standard_EXPORT Standard_Boolean IsDone() const; 0055 0056 //! Returns the value of the extremum square distance. 0057 Standard_EXPORT Standard_Real SquareDistance() const; 0058 0059 //! Returns the point of the extremum distance. 0060 Standard_EXPORT const Extrema_POnSurf& Point() const; 0061 0062 //! Returns True if UV point theU0, theV0 is point of local minimum of square distance between 0063 //! point theP and points theS(U, V), U, V are in small area around theU0, theV0 0064 Standard_EXPORT static Standard_Boolean IsMinDist(const gp_Pnt& theP, const Adaptor3d_Surface& theS, 0065 const Standard_Real theU0, const Standard_Real theV0); 0066 0067 private: 0068 0069 const Extrema_GenLocateExtPS& operator=(const Extrema_GenLocateExtPS&); 0070 Extrema_GenLocateExtPS(const Extrema_GenLocateExtPS&); 0071 0072 // Input. 0073 const Adaptor3d_Surface& mySurf; 0074 Standard_Real myTolU, myTolV; 0075 0076 // State. 0077 Standard_Boolean myDone; 0078 0079 // Result. 0080 Standard_Real mySqDist; 0081 Extrema_POnSurf myPoint; 0082 0083 0084 }; 0085 0086 0087 0088 0089 0090 0091 0092 #endif // _Extrema_GenLocateExtPS_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |