Back to home page

EIC code displayed by LXR

 
 

    


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

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