Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1995-06-06
0002 // Created by: Jean Yves LEBEY
0003 // Copyright (c) 1995-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 _BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox_HeaderFile
0018 #define _BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <IntSurf_PntOn2S.hxx>
0024 #include <gp_Dir.hxx>
0025 #include <gp_Dir2d.hxx>
0026 #include <BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx>
0027 #include <TColStd_Array1OfReal.hxx>
0028 #include <IntImp_ConstIsoparametric.hxx>
0029 class StdFail_NotDone;
0030 class Standard_DomainError;
0031 class Standard_ConstructionError;
0032 class StdFail_UndefinedDerivative;
0033 class BRepAdaptor_Surface;
0034 class BRepApprox_SurfaceTool;
0035 class BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox;
0036 class math_FunctionSetRoot;
0037 class IntSurf_PntOn2S;
0038 class gp_Dir;
0039 class gp_Dir2d;
0040 
0041 
0042 
0043 class BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox 
0044 {
0045 public:
0046 
0047   DEFINE_STANDARD_ALLOC
0048 
0049   //! compute the solution point with the close point
0050   Standard_EXPORT BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox(const TColStd_Array1OfReal& Param, const BRepAdaptor_Surface& S1, const BRepAdaptor_Surface& S2, const Standard_Real TolTangency);
0051   
0052   //! initialize the parameters to compute the solution point
0053   //! it 's possible to write to optimize:
0054   //! IntImp_Int2S inter(S1,S2,Func,TolTangency);
0055   //! math_FunctionSetRoot rsnld(inter.Function());
0056   //! while ...{
0057   //! Param(1)=...
0058   //! Param(2)=...
0059   //! param(3)=...
0060   //! inter.Perform(Param,rsnld);
0061   //! }
0062   Standard_EXPORT BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox(const BRepAdaptor_Surface& S1, const BRepAdaptor_Surface& S2, const Standard_Real TolTangency);
0063   
0064   //! returns the best constant isoparametric to find
0065   //! the next intersection's point +stores the solution
0066   //! point (the solution point is found with the close point
0067   //! to intersect the isoparametric with the other patch;
0068   //! the choice of the isoparametic is calculated)
0069   Standard_EXPORT IntImp_ConstIsoparametric Perform (const TColStd_Array1OfReal& Param, math_FunctionSetRoot& Rsnld);
0070   
0071   //! returns the best constant isoparametric to find
0072   //! the next intersection's point +stores the solution
0073   //! point (the solution point is found with the close point
0074   //! to intersect the isoparametric with the other patch;
0075   //! the choice of the isoparametic is given by ChoixIso)
0076   Standard_EXPORT IntImp_ConstIsoparametric Perform (const TColStd_Array1OfReal& Param, math_FunctionSetRoot& Rsnld, const IntImp_ConstIsoparametric ChoixIso);
0077   
0078   //! Returns TRUE if the creation completed without failure.
0079     Standard_Boolean IsDone() const;
0080   
0081   //! Returns TRUE when there is no solution to the problem.
0082     Standard_Boolean IsEmpty() const;
0083   
0084   //! Returns the intersection point.
0085     const IntSurf_PntOn2S& Point() const;
0086   
0087   //! Returns True if the surfaces are tangent at the
0088   //! intersection point.
0089     Standard_Boolean IsTangent() const;
0090   
0091   //! Returns the tangent at the intersection line.
0092     const gp_Dir& Direction() const;
0093   
0094   //! Returns the tangent at the intersection line in the
0095   //! parametric space of the first surface.
0096     const gp_Dir2d& DirectionOnS1() const;
0097   
0098   //! Returns the tangent at the intersection line in the
0099   //! parametric space of the second surface.
0100     const gp_Dir2d& DirectionOnS2() const;
0101   
0102   //! return the math function which
0103   //! is used to compute the intersection
0104     BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox& Function();
0105   
0106   //! return the intersection point which is
0107   //! enable for changing.
0108     IntSurf_PntOn2S& ChangePoint();
0109 
0110 
0111 
0112 
0113 protected:
0114 
0115 
0116 
0117 
0118 
0119 private:
0120 
0121 
0122 
0123   Standard_Boolean done;
0124   Standard_Boolean empty;
0125   IntSurf_PntOn2S pint;
0126   Standard_Boolean tangent;
0127   gp_Dir d3d;
0128   gp_Dir2d d2d1;
0129   gp_Dir2d d2d2;
0130   BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox myZerParFunc;
0131   Standard_Real tol;
0132   Standard_Real ua0;
0133   Standard_Real va0;
0134   Standard_Real ua1;
0135   Standard_Real va1;
0136   Standard_Real ub0;
0137   Standard_Real vb0;
0138   Standard_Real ub1;
0139   Standard_Real vb1;
0140   Standard_Real ures1;
0141   Standard_Real ures2;
0142   Standard_Real vres1;
0143   Standard_Real vres2;
0144 
0145 
0146 };
0147 
0148 #define ThePSurface BRepAdaptor_Surface
0149 #define ThePSurface_hxx <BRepAdaptor_Surface.hxx>
0150 #define ThePSurfaceTool BRepApprox_SurfaceTool
0151 #define ThePSurfaceTool_hxx <BRepApprox_SurfaceTool.hxx>
0152 #define IntImp_TheFunction BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox
0153 #define IntImp_TheFunction_hxx <BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx>
0154 #define IntImp_Int2S BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox
0155 #define IntImp_Int2S_hxx <BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx>
0156 
0157 #include <IntImp_Int2S.lxx>
0158 
0159 #undef ThePSurface
0160 #undef ThePSurface_hxx
0161 #undef ThePSurfaceTool
0162 #undef ThePSurfaceTool_hxx
0163 #undef IntImp_TheFunction
0164 #undef IntImp_TheFunction_hxx
0165 #undef IntImp_Int2S
0166 #undef IntImp_Int2S_hxx
0167 
0168 
0169 
0170 
0171 #endif // _BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox_HeaderFile