Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:06

0001 // Created on: 1993-04-07
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 _IntCurveSurface_TheExactHInter_HeaderFile
0018 #define _IntCurveSurface_TheExactHInter_HeaderFile
0019 
0020 #include <Adaptor3d_Surface.hxx>
0021 #include <IntCurveSurface_TheCSFunctionOfHInter.hxx>
0022 
0023 class Adaptor3d_HSurfaceTool;
0024 class IntCurveSurface_TheHCurveTool;
0025 class IntCurveSurface_TheCSFunctionOfHInter;
0026 class math_FunctionSetRoot;
0027 
0028 class IntCurveSurface_TheExactHInter 
0029 {
0030 public:
0031 
0032   DEFINE_STANDARD_ALLOC
0033 
0034   
0035   //! compute the solution point with the close point
0036   //! MarginCoef is the coefficient for extension of UV bounds.
0037   //! Ex., UFirst -= MarginCoef*(ULast-UFirst)
0038   Standard_EXPORT IntCurveSurface_TheExactHInter(const Standard_Real U, const Standard_Real V, const Standard_Real W, const IntCurveSurface_TheCSFunctionOfHInter& F, const Standard_Real TolTangency, const Standard_Real MarginCoef = 0.0);
0039   
0040   //! initialize the parameters to compute the solution
0041   Standard_EXPORT IntCurveSurface_TheExactHInter(const IntCurveSurface_TheCSFunctionOfHInter& F, const Standard_Real TolTangency);
0042   
0043   //! compute the solution
0044   //! it's possible to write to optimize:
0045   //! IntImp_IntCS inter(S1,C1,Toltangency)
0046   //! math_FunctionSetRoot rsnld(Inter.function())
0047   //! while ...{
0048   //! u=...
0049   //! v=...
0050   //! w=...
0051   //! inter.Perform(u,v,w,rsnld)
0052   //! }
0053   //! or
0054   //! IntImp_IntCS inter(Toltangency)
0055   //! inter.SetSurface(S);
0056   //! math_FunctionSetRoot rsnld(Inter.function())
0057   //! while ...{
0058   //! C=...
0059   //! inter.SetCurve(C);
0060   //! u=...
0061   //! v=...
0062   //! w=...
0063   //! inter.Perform(u,v,w,rsnld)
0064   //! }
0065   Standard_EXPORT void Perform (const Standard_Real U, const Standard_Real V, const Standard_Real W, math_FunctionSetRoot& Rsnld, const Standard_Real u0, const Standard_Real v0, const Standard_Real u1, const Standard_Real v1, const Standard_Real w0, const Standard_Real w1);
0066   
0067   //! Returns TRUE if the creation completed without failure.
0068   Standard_EXPORT Standard_Boolean IsDone() const;
0069   
0070   Standard_EXPORT Standard_Boolean IsEmpty() const;
0071   
0072   //! returns the intersection point
0073   //! The exception NotDone is raised if IsDone is false.
0074   //! The exception DomainError is raised if IsEmpty is true.
0075   Standard_EXPORT const gp_Pnt& Point() const;
0076   
0077   Standard_EXPORT Standard_Real ParameterOnCurve() const;
0078   
0079   Standard_EXPORT void ParameterOnSurface (Standard_Real& U, Standard_Real& V) const;
0080   
0081   //! return the math function which
0082   //! is used to compute the intersection
0083   Standard_EXPORT IntCurveSurface_TheCSFunctionOfHInter& Function();
0084 
0085 
0086 
0087 
0088 protected:
0089 
0090 
0091 
0092 
0093 
0094 private:
0095 
0096 
0097 
0098   Standard_Boolean done;
0099   Standard_Boolean empty;
0100   IntCurveSurface_TheCSFunctionOfHInter myFunction;
0101   Standard_Real w;
0102   Standard_Real u;
0103   Standard_Real v;
0104   Standard_Real tol;
0105 
0106 
0107 };
0108 
0109 
0110 
0111 
0112 
0113 
0114 
0115 #endif // _IntCurveSurface_TheExactHInter_HeaderFile