Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-15 09:16:09

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