Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1997-12-19
0002 // Created by: Philippe MANGIN
0003 // Copyright (c) 1997-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 _GeomFill_Frenet_HeaderFile
0018 #define _GeomFill_Frenet_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <TColStd_HArray1OfReal.hxx>
0023 #include <GeomFill_TrihedronLaw.hxx>
0024 #include <Standard_Real.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <GeomAbs_Shape.hxx>
0027 #include <TColStd_Array1OfReal.hxx>
0028 class gp_Vec;
0029 
0030 
0031 class GeomFill_Frenet;
0032 DEFINE_STANDARD_HANDLE(GeomFill_Frenet, GeomFill_TrihedronLaw)
0033 
0034 //! Defined Frenet Trihedron  Law
0035 class GeomFill_Frenet : public GeomFill_TrihedronLaw
0036 {
0037 
0038 public:
0039 
0040   
0041   Standard_EXPORT GeomFill_Frenet();
0042   
0043   Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE;
0044   
0045   Standard_EXPORT void Init();
0046   
0047   //! initialize curve of frenet law
0048   //! @return Standard_True
0049   Standard_EXPORT virtual Standard_Boolean SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE;
0050   
0051   //! compute Triedrhon on curve at parameter <Param>
0052   Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE;
0053   
0054   //! compute Triedrhon and  derivative Trihedron  on curve
0055   //! at parameter <Param>
0056   //! Warning : It used only for C1 or C2 approximation
0057   Standard_EXPORT virtual Standard_Boolean D1 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& BiNormal, gp_Vec& DBiNormal) Standard_OVERRIDE;
0058   
0059   //! compute  Trihedron on curve
0060   //! first and seconde  derivatives.
0061   //! Warning : It used only for C2 approximation
0062   Standard_EXPORT virtual Standard_Boolean D2 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& D2Tangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& D2Normal, gp_Vec& BiNormal, gp_Vec& DBiNormal, gp_Vec& D2BiNormal) Standard_OVERRIDE;
0063   
0064   //! Returns  the number  of  intervals for  continuity
0065   //! <S>.
0066   //! May be one if Continuity(me) >= <S>
0067   Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
0068   
0069   //! Stores in <T> the  parameters bounding the intervals
0070   //! of continuity <S>.
0071   //!
0072   //! The array must provide  enough room to  accommodate
0073   //! for the parameters. i.e. T.Length() > NbIntervals()
0074   Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
0075   
0076   //! Get average value of Tangent(t) and Normal(t) it is usfull to
0077   //! make fast approximation of rational  surfaces.
0078   Standard_EXPORT virtual void GetAverageLaw (gp_Vec& ATangent, gp_Vec& ANormal, gp_Vec& ABiNormal) Standard_OVERRIDE;
0079   
0080   //! Say if the law is Constant.
0081   Standard_EXPORT virtual Standard_Boolean IsConstant() const Standard_OVERRIDE;
0082   
0083   //! Return True.
0084   Standard_EXPORT virtual Standard_Boolean IsOnlyBy3dCurve() const Standard_OVERRIDE;
0085 
0086 
0087 
0088 
0089   DEFINE_STANDARD_RTTIEXT(GeomFill_Frenet,GeomFill_TrihedronLaw)
0090 
0091 protected:
0092 
0093 
0094 
0095 
0096 private:
0097 
0098   
0099   Standard_EXPORT Standard_Boolean IsSingular (const Standard_Real U, Standard_Integer& Index) const;
0100   
0101   Standard_EXPORT Standard_Boolean DoSingular (const Standard_Real U, const Standard_Integer Index, gp_Vec& Tangent, gp_Vec& BiNormal, Standard_Integer& n, Standard_Integer& k, Standard_Integer& TFlag, Standard_Integer& BNFlag, Standard_Real& Delta);
0102   
0103   //! computes Triedrhon on curve at parameter <Param>
0104   Standard_EXPORT Standard_Boolean SingularD0 (const Standard_Real Param, const Standard_Integer Index, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal, Standard_Real& Delta);
0105   
0106   //! computes Triedrhon and  derivative Trihedron  on curve
0107   //! at parameter <Param>
0108   //! Warning : It used only for C1 or C2 approximation
0109   Standard_EXPORT Standard_Boolean SingularD1 (const Standard_Real Param, const Standard_Integer Index, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& BiNormal, gp_Vec& DBiNormal, Standard_Real& Delta);
0110   
0111   //! computes  Trihedron on curve
0112   //! first and seconde  derivatives.
0113   //! Warning : It used only for C2 approximation
0114   Standard_EXPORT Standard_Boolean SingularD2 (const Standard_Real Param, const Standard_Integer Index, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& D2Tangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& D2Normal, gp_Vec& BiNormal, gp_Vec& DBiNormal, gp_Vec& D2BiNormal, Standard_Real& Delta);
0115   
0116   //! revolves the trihedron (which is determined
0117   //! of given "Tangent", "Normal" and "BiNormal" vectors)
0118   //! to coincide "Tangent" and "NewTangent" axes.
0119   Standard_EXPORT Standard_Boolean RotateTrihedron (gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal, const gp_Vec& NewTangent) const;
0120 
0121   gp_Pnt P;
0122   Handle(TColStd_HArray1OfReal) mySngl;
0123   Handle(TColStd_HArray1OfReal) mySnglLen;
0124   Standard_Boolean isSngl;
0125 
0126 
0127 };
0128 
0129 
0130 
0131 
0132 
0133 
0134 
0135 #endif // _GeomFill_Frenet_HeaderFile