Back to home page

EIC code displayed by LXR

 
 

    


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

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