1 // Created on: 1992-05-06
2 // Created by: Jacques GOUSSARD
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _IntPatch_CurvIntSurf_HeaderFile
18 #define _IntPatch_CurvIntSurf_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <IntPatch_CSFunction.hxx>
26 #include <Standard_Real.hxx>
27 class StdFail_NotDone;
28 class Standard_DomainError;
29 class Adaptor3d_HSurface;
30 class Adaptor3d_HSurfaceTool;
31 class Adaptor2d_HCurve2d;
32 class IntPatch_HCurve2dTool;
33 class IntPatch_CSFunction;
34 class math_FunctionSetRoot;
39 class IntPatch_CurvIntSurf
46 //! compute the solution point with the close point
47 //! MarginCoef is the coefficient for extension of UV bounds.
48 //! Ex., UFirst -= MarginCoef*(ULast-UFirst)
49 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);
51 //! initialize the parameters to compute the solution
52 Standard_EXPORT IntPatch_CurvIntSurf(const IntPatch_CSFunction& F, const Standard_Real TolTangency);
54 //! compute the solution
55 //! it's possible to write to optimize:
56 //! IntImp_IntCS inter(S1,C1,Toltangency)
57 //! math_FunctionSetRoot rsnld(Inter.function())
62 //! inter.Perform(u,v,w,rsnld)
65 //! IntImp_IntCS inter(Toltangency)
66 //! inter.SetSurface(S);
67 //! math_FunctionSetRoot rsnld(Inter.function())
70 //! inter.SetCurve(C);
74 //! inter.Perform(u,v,w,rsnld)
76 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);
78 //! Returns TRUE if the creation completed without failure.
79 Standard_EXPORT Standard_Boolean IsDone() const;
81 Standard_EXPORT Standard_Boolean IsEmpty() const;
83 //! returns the intersection point
84 //! The exception NotDone is raised if IsDone is false.
85 //! The exception DomainError is raised if IsEmpty is true.
86 Standard_EXPORT const gp_Pnt& Point() const;
88 Standard_EXPORT Standard_Real ParameterOnCurve() const;
90 Standard_EXPORT void ParameterOnSurface (Standard_Real& U, Standard_Real& V) const;
92 //! return the math function which
93 //! is used to compute the intersection
94 Standard_EXPORT IntPatch_CSFunction& Function();
109 Standard_Boolean done;
110 Standard_Boolean empty;
111 IntPatch_CSFunction myFunction;
126 #endif // _IntPatch_CurvIntSurf_HeaderFile