Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-08 09:16:03

0001 // Created on: 1991-02-21
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 _Extrema_ExtSS_HeaderFile
0018 #define _Extrema_ExtSS_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <Extrema_ExtElSS.hxx>
0024 #include <Extrema_SequenceOfPOnSurf.hxx>
0025 #include <TColStd_SequenceOfReal.hxx>
0026 #include <GeomAbs_SurfaceType.hxx>
0027 #include <Standard_Integer.hxx>
0028 class Adaptor3d_Surface;
0029 class Extrema_POnSurf;
0030 
0031 //! It calculates all the extremum distances
0032 //! between two surfaces.
0033 //! These distances can be minimum or maximum.
0034 class Extrema_ExtSS
0035 {
0036 public:
0037   DEFINE_STANDARD_ALLOC
0038 
0039   Standard_EXPORT Extrema_ExtSS();
0040 
0041   //! It calculates all the distances between S1 and S2.
0042   Standard_EXPORT Extrema_ExtSS(const Adaptor3d_Surface& S1,
0043                                 const Adaptor3d_Surface& S2,
0044                                 const Standard_Real      TolS1,
0045                                 const Standard_Real      TolS2);
0046 
0047   //! It calculates all the distances between S1 and S2.
0048   Standard_EXPORT Extrema_ExtSS(const Adaptor3d_Surface& S1,
0049                                 const Adaptor3d_Surface& S2,
0050                                 const Standard_Real      Uinf1,
0051                                 const Standard_Real      Usup1,
0052                                 const Standard_Real      Vinf1,
0053                                 const Standard_Real      Vsup1,
0054                                 const Standard_Real      Uinf2,
0055                                 const Standard_Real      Usup2,
0056                                 const Standard_Real      Vinf2,
0057                                 const Standard_Real      Vsup2,
0058                                 const Standard_Real      TolS1,
0059                                 const Standard_Real      TolS2);
0060 
0061   //! Initializes the fields of the algorithm.
0062   Standard_EXPORT void Initialize(const Adaptor3d_Surface& S2,
0063                                   const Standard_Real      Uinf2,
0064                                   const Standard_Real      Usup2,
0065                                   const Standard_Real      Vinf2,
0066                                   const Standard_Real      Vsup2,
0067                                   const Standard_Real      TolS1);
0068 
0069   //! Computes the distances.
0070   //! An exception is raised if the fields have not been
0071   //! initialized.
0072   Standard_EXPORT void Perform(const Adaptor3d_Surface& S1,
0073                                const Standard_Real      Uinf1,
0074                                const Standard_Real      Usup1,
0075                                const Standard_Real      Vinf1,
0076                                const Standard_Real      Vsup1,
0077                                const Standard_Real      TolS1);
0078 
0079   //! Returns True if the distances are found.
0080   Standard_EXPORT Standard_Boolean IsDone() const;
0081 
0082   //! Returns True if the surfaces are parallel
0083   Standard_EXPORT Standard_Boolean IsParallel() const;
0084 
0085   //! Returns the number of extremum distances.
0086   Standard_EXPORT Standard_Integer NbExt() const;
0087 
0088   //! Returns the value of the Nth resulting square distance.
0089   Standard_EXPORT Standard_Real SquareDistance(const Standard_Integer N) const;
0090 
0091   //! Returns the point of the Nth resulting distance.
0092   Standard_EXPORT void Points(const Standard_Integer N,
0093                               Extrema_POnSurf&       P1,
0094                               Extrema_POnSurf&       P2) const;
0095 
0096 private:
0097   const Adaptor3d_Surface*  myS2;
0098   Standard_Boolean          myDone;
0099   Standard_Boolean          myIsPar;
0100   Extrema_ExtElSS           myExtElSS;
0101   Extrema_SequenceOfPOnSurf myPOnS1;
0102   Extrema_SequenceOfPOnSurf myPOnS2;
0103   Standard_Real             myuinf1;
0104   Standard_Real             myusup1;
0105   Standard_Real             myvinf1;
0106   Standard_Real             myvsup1;
0107   Standard_Real             myuinf2;
0108   Standard_Real             myusup2;
0109   Standard_Real             myvinf2;
0110   Standard_Real             myvsup2;
0111   Standard_Real             mytolS1;
0112   Standard_Real             mytolS2;
0113   TColStd_SequenceOfReal    mySqDist;
0114   GeomAbs_SurfaceType       myStype;
0115 };
0116 
0117 #endif // _Extrema_ExtSS_HeaderFile