Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-08 09:16:43

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