Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:11

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