Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1997-12-09
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_ConstantBiNormal_HeaderFile
0018 #define _GeomFill_ConstantBiNormal_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <gp_Vec.hxx>
0024 #include <GeomFill_TrihedronLaw.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <GeomAbs_Shape.hxx>
0027 #include <TColStd_Array1OfReal.hxx>
0028 class GeomFill_Frenet;
0029 class gp_Dir;
0030 
0031 
0032 class GeomFill_ConstantBiNormal;
0033 DEFINE_STANDARD_HANDLE(GeomFill_ConstantBiNormal, GeomFill_TrihedronLaw)
0034 
0035 //! Defined an Trihedron Law  where the BiNormal, is fixed
0036 class GeomFill_ConstantBiNormal : public GeomFill_TrihedronLaw
0037 {
0038 
0039 public:
0040 
0041   
0042   Standard_EXPORT GeomFill_ConstantBiNormal(const gp_Dir& BiNormal);
0043   
0044   Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE;
0045   
0046   //! initialize curve of trihedron law
0047   //! @return Standard_True in case if execution end correctly
0048   Standard_EXPORT virtual Standard_Boolean SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE;
0049   
0050   //! Computes Triedrhon on curve at parameter <Param>
0051   Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE;
0052   
0053   //! Computes Triedrhon and  derivative Trihedron  on curve
0054   //! at parameter <Param>
0055   //! Warning : It used only for C1 or C2 approximation
0056   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;
0057   
0058   //! compute  Trihedron on curve
0059   //! first and seconde  derivatives.
0060   //! Warning : It used only for C2 approximation
0061   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;
0062   
0063   //! Returns  the number  of  intervals for  continuity
0064   //! <S>.
0065   //! May be one if Continuity(me) >= <S>
0066   Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
0067   
0068   //! Stores in <T> the  parameters bounding the intervals
0069   //! of continuity <S>.
0070   //!
0071   //! The array must provide  enough room to  accommodate
0072   //! for the parameters. i.e. T.Length() > NbIntervals()
0073   Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
0074   
0075   //! Gets average value of Tangent(t) and Normal(t) it is usfull to
0076   //! make fast approximation of rational  surfaces.
0077   Standard_EXPORT virtual void GetAverageLaw (gp_Vec& ATangent, gp_Vec& ANormal, gp_Vec& ABiNormal) Standard_OVERRIDE;
0078   
0079   //! Says if the law is Constant.
0080   Standard_EXPORT virtual Standard_Boolean IsConstant() const Standard_OVERRIDE;
0081   
0082   //! Return True.
0083   Standard_EXPORT virtual Standard_Boolean IsOnlyBy3dCurve() const Standard_OVERRIDE;
0084 
0085 
0086 
0087 
0088   DEFINE_STANDARD_RTTIEXT(GeomFill_ConstantBiNormal,GeomFill_TrihedronLaw)
0089 
0090 protected:
0091 
0092 
0093 
0094 
0095 private:
0096 
0097 
0098   gp_Vec BN;
0099   Handle(GeomFill_Frenet) frenet;
0100 
0101 
0102 };
0103 
0104 
0105 
0106 
0107 
0108 
0109 
0110 #endif // _GeomFill_ConstantBiNormal_HeaderFile