Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 09:45:50

0001 // Created on: 1993-03-17
0002 // Created by: Laurent BUCHARD
0003 // Copyright (c) 1993-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 _ApproxInt_SvSurfaces_HeaderFile
0018 #define _ApproxInt_SvSurfaces_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Boolean.hxx>
0025 #include <Standard_Real.hxx>
0026 class gp_Pnt;
0027 class gp_Vec;
0028 class gp_Vec2d;
0029 class IntSurf_PntOn2S;
0030 
0031 //! This class is root class for classes dedicated to calculate 
0032 //! 2d and 3d points and tangents of intersection lines of two surfaces of different types
0033 //! for given u, v parameters of intersection point on two surfaces.
0034 //! 
0035 //! The field myUseSolver is used to manage type of calculation:
0036 //! if myUseSolver = true, input parameters u1, v1, u2, v2 are considered as first approximation of 
0037 //! exact intersection point, then coordinates u1, v1, u2, v2 are refined with help of 
0038 //! the solver used in intersection algorithm and required values are calculated.
0039 //! if myUseSolver = false, u1, v1, u2, v2 are considered as "exact" intersection points on two surfaces
0040 //! and required values are calculated directly using u1, v1, u2, v2
0041 class ApproxInt_SvSurfaces
0042 {
0043 public:
0044 
0045   DEFINE_STANDARD_ALLOC
0046 
0047   ApproxInt_SvSurfaces() : myUseSolver (false) {}
0048 
0049   //! returns True if Tg,Tguv1 Tguv2 can be computed.
0050   Standard_EXPORT virtual Standard_Boolean Compute (Standard_Real& u1, Standard_Real& v1,
0051                                                     Standard_Real& u2, Standard_Real& v2,
0052                                                     gp_Pnt& Pt,
0053                                                     gp_Vec& Tg,
0054                                                     gp_Vec2d& Tguv1,
0055                                                     gp_Vec2d& Tguv2) = 0;
0056   
0057   Standard_EXPORT virtual void Pnt (const Standard_Real u1, const Standard_Real v1,
0058                                     const Standard_Real u2, const Standard_Real v2,
0059                                     gp_Pnt& P) = 0;
0060 
0061   //! computes point on curve and parameters on the surfaces
0062   Standard_EXPORT virtual Standard_Boolean SeekPoint(const Standard_Real u1, const Standard_Real v1,
0063                                                      const Standard_Real u2, const Standard_Real v2,
0064                                                      IntSurf_PntOn2S& Point) = 0;
0065   
0066   Standard_EXPORT virtual Standard_Boolean Tangency (const Standard_Real u1, const Standard_Real v1,
0067                                                      const Standard_Real u2, const Standard_Real v2,
0068                                                      gp_Vec& Tg) = 0;
0069   
0070   Standard_EXPORT virtual Standard_Boolean TangencyOnSurf1 (const Standard_Real u1,
0071                                                             const Standard_Real v1,
0072                                                             const Standard_Real u2,
0073                                                             const Standard_Real v2,
0074                                                             gp_Vec2d& Tg) = 0;
0075   
0076   Standard_EXPORT virtual Standard_Boolean TangencyOnSurf2 (const Standard_Real u1,
0077                                                             const Standard_Real v1,
0078                                                             const Standard_Real u2,
0079                                                             const Standard_Real v2,
0080                                                             gp_Vec2d& Tg) = 0;
0081   Standard_EXPORT virtual ~ApproxInt_SvSurfaces();
0082 
0083   void SetUseSolver (const Standard_Boolean theUseSol)
0084   {
0085     myUseSolver = theUseSol;
0086   }
0087 
0088   virtual Standard_Boolean GetUseSolver() const
0089   {
0090     return myUseSolver;
0091   }
0092 
0093 private:
0094 
0095   Standard_Boolean myUseSolver;
0096 
0097 };
0098 
0099 #endif // _ApproxInt_SvSurfaces_HeaderFile