Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-10 09:17:22

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