Back to home page

EIC code displayed by LXR

 
 

    


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

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