Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created by: Julia GERASIMOVA
0002 // Copyright (c) 2015 OPEN CASCADE SAS
0003 //
0004 // This file is part of Open CASCADE Technology software library.
0005 //
0006 // This library is free software; you can redistribute it and/or modify it under
0007 // the terms of the GNU Lesser General Public License version 2.1 as published
0008 // by the Free Software Foundation, with special exception defined in the file
0009 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0010 // distribution for complete text of the license and disclaimer of any warranty.
0011 //
0012 // Alternatively, this file may be used under the terms of Open CASCADE
0013 // commercial license or contractual agreement.
0014 
0015 #ifndef _BlendFunc_ConstThroat_HeaderFile
0016 #define _BlendFunc_ConstThroat_HeaderFile
0017 
0018 #include <Adaptor3d_Surface.hxx>
0019 #include <BlendFunc_GenChamfer.hxx>
0020 #include <math_Vector.hxx>
0021 #include <TColStd_Array1OfReal.hxx>
0022 #include <TColStd_Array1OfInteger.hxx>
0023 #include <TColgp_Array1OfVec2d.hxx>
0024 
0025 class math_Matrix;
0026 
0027 //! Class for a function used to compute a symmetric chamfer
0028 //! with constant throat that is the height of isosceles triangle in section
0029 class BlendFunc_ConstThroat  : public BlendFunc_GenChamfer
0030 {
0031 public:
0032 
0033   DEFINE_STANDARD_ALLOC
0034 
0035   
0036   Standard_EXPORT BlendFunc_ConstThroat(const Handle(Adaptor3d_Surface)& S1,
0037                                         const Handle(Adaptor3d_Surface)& S2,
0038                                         const Handle(Adaptor3d_Curve)& C);
0039   
0040   
0041   //! computes the values <F> of the Functions for the
0042   //! variable <X>.
0043   //! Returns True if the computation was done successfully,
0044   //! False otherwise.
0045   Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F) Standard_OVERRIDE;
0046   
0047   //! returns the values <D> of the derivatives for the
0048   //! variable <X>.
0049   //! Returns True if the computation was done successfully,
0050   //! False otherwise.
0051   Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) Standard_OVERRIDE;
0052   
0053   Standard_EXPORT void Set (const Standard_Real Param) Standard_OVERRIDE;
0054   
0055   Standard_EXPORT Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) Standard_OVERRIDE;
0056   
0057   Standard_EXPORT const gp_Pnt& PointOnS1() const Standard_OVERRIDE;
0058   
0059   Standard_EXPORT const gp_Pnt& PointOnS2() const Standard_OVERRIDE;
0060   
0061   Standard_EXPORT Standard_Boolean IsTangencyPoint() const Standard_OVERRIDE;
0062   
0063   Standard_EXPORT const gp_Vec& TangentOnS1() const Standard_OVERRIDE;
0064   
0065   Standard_EXPORT const gp_Vec2d& Tangent2dOnS1() const Standard_OVERRIDE;
0066   
0067   Standard_EXPORT const gp_Vec& TangentOnS2() const Standard_OVERRIDE;
0068   
0069   Standard_EXPORT const gp_Vec2d& Tangent2dOnS2() const Standard_OVERRIDE;
0070   
0071   //! Returns the tangent vector at the section,
0072   //! at the beginning and the end of the section, and
0073   //! returns the normal (of the surfaces) at
0074   //! these points.
0075   Standard_EXPORT void Tangent (const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, gp_Vec& TgFirst, gp_Vec& TgLast, gp_Vec& NormFirst, gp_Vec& NormLast) const Standard_OVERRIDE;
0076   
0077   //! Sets the throat and the "quadrant".
0078   Standard_EXPORT void Set (const Standard_Real aThroat, const Standard_Real, const Standard_Integer Choix) Standard_OVERRIDE;
0079   
0080   //! Returns the length of the maximum section
0081   Standard_EXPORT Standard_Real GetSectionSize() const Standard_OVERRIDE;
0082 
0083   
0084 
0085 
0086 
0087 protected:
0088 
0089   gp_Pnt pts1;
0090   gp_Pnt pts2;
0091   gp_Vec d1u1;
0092   gp_Vec d1v1;
0093   gp_Vec d1u2;
0094   gp_Vec d1v2;
0095   Standard_Boolean istangent;
0096   gp_Vec tg1;
0097   gp_Vec2d tg12d;
0098   gp_Vec tg2;
0099   gp_Vec2d tg22d;
0100   Standard_Real param;
0101   Standard_Real Throat;
0102 
0103   gp_Pnt ptgui;
0104   gp_Vec nplan;
0105   Standard_Real normtg;
0106   Standard_Real theD;
0107   gp_Vec d1gui;
0108   gp_Vec d2gui;
0109 
0110 private:
0111 
0112 
0113 };
0114 
0115 
0116 
0117 
0118 
0119 
0120 
0121 #endif // _BlendFunc_ConstThroat_HeaderFile