Back to home page

EIC code displayed by LXR

 
 

    


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

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 
0032 //! It calculates all the extremum distances
0033 //! between two surfaces.
0034 //! These distances can be minimum or maximum.
0035 class Extrema_ExtSS 
0036 {
0037 public:
0038 
0039   DEFINE_STANDARD_ALLOC
0040 
0041   
0042   Standard_EXPORT Extrema_ExtSS();
0043   
0044   //! It calculates all the distances between S1 and S2.
0045   Standard_EXPORT Extrema_ExtSS(const Adaptor3d_Surface& S1, const Adaptor3d_Surface& S2, const Standard_Real TolS1, const Standard_Real TolS2);
0046   
0047   //! It calculates all the distances between S1 and S2.
0048   Standard_EXPORT Extrema_ExtSS(const Adaptor3d_Surface& S1, const Adaptor3d_Surface& S2, const Standard_Real Uinf1, const Standard_Real Usup1, const Standard_Real Vinf1, const Standard_Real Vsup1, const Standard_Real Uinf2, const Standard_Real Usup2, const Standard_Real Vinf2, const Standard_Real Vsup2, const Standard_Real TolS1, const Standard_Real TolS2);
0049   
0050   //! Initializes the fields of the algorithm.
0051   Standard_EXPORT void Initialize (const Adaptor3d_Surface& S2, const Standard_Real Uinf2, const Standard_Real Usup2, const Standard_Real Vinf2, const Standard_Real Vsup2, const Standard_Real TolS1);
0052   
0053   //! Computes the distances.
0054   //! An exception is raised if the fieds have not been
0055   //! initialized.
0056   Standard_EXPORT void Perform (const Adaptor3d_Surface& S1, const Standard_Real Uinf1, const Standard_Real Usup1, const Standard_Real Vinf1, const Standard_Real Vsup1, const Standard_Real TolS1);
0057   
0058   //! Returns True if the distances are found.
0059   Standard_EXPORT Standard_Boolean IsDone() const;
0060   
0061   //! Returns True if the surfaces are parallel
0062   Standard_EXPORT Standard_Boolean IsParallel() const;
0063   
0064   //! Returns the number of extremum distances.
0065   Standard_EXPORT Standard_Integer NbExt() const;
0066   
0067   //! Returns the value of the Nth resulting square distance.
0068   Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N) const;
0069   
0070   //! Returns the point of the Nth resulting distance.
0071   Standard_EXPORT void Points (const Standard_Integer N, Extrema_POnSurf& P1, Extrema_POnSurf& P2) const;
0072 
0073 private:
0074 
0075   const Adaptor3d_Surface* myS2;
0076   Standard_Boolean myDone;
0077   Standard_Boolean myIsPar;
0078   Extrema_ExtElSS myExtElSS;
0079   Extrema_SequenceOfPOnSurf myPOnS1;
0080   Extrema_SequenceOfPOnSurf myPOnS2;
0081   Standard_Real myuinf1;
0082   Standard_Real myusup1;
0083   Standard_Real myvinf1;
0084   Standard_Real myvsup1;
0085   Standard_Real myuinf2;
0086   Standard_Real myusup2;
0087   Standard_Real myvinf2;
0088   Standard_Real myvsup2;
0089   Standard_Real mytolS1;
0090   Standard_Real mytolS2;
0091   TColStd_SequenceOfReal mySqDist;
0092   GeomAbs_SurfaceType myStype;
0093 
0094 };
0095 
0096 #endif // _Extrema_ExtSS_HeaderFile