Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-11 09:17:43

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 <NCollection_Array1.hxx>
0028 class GeomFill_Frenet;
0029 class gp_Dir;
0030 
0031 //! Defined a Trihedron Law where the BiNormal, is fixed
0032 class GeomFill_ConstantBiNormal : public GeomFill_TrihedronLaw
0033 {
0034 
0035 public:
0036   Standard_EXPORT GeomFill_ConstantBiNormal(const gp_Dir& BiNormal);
0037 
0038   Standard_EXPORT occ::handle<GeomFill_TrihedronLaw> Copy() const override;
0039 
0040   //! initialize curve of trihedron law
0041   //! @return true in case if execution end correctly
0042   Standard_EXPORT bool SetCurve(const occ::handle<Adaptor3d_Curve>& C) override;
0043 
0044   //! Computes Triedrhon on curve at parameter <Param>
0045   Standard_EXPORT bool D0(const double Param,
0046                           gp_Vec&      Tangent,
0047                           gp_Vec&      Normal,
0048                           gp_Vec&      BiNormal) override;
0049 
0050   //! Computes Triedrhon and derivative Trihedron on curve
0051   //! at parameter <Param>
0052   //! Warning: It used only for C1 or C2 approximation
0053   Standard_EXPORT bool D1(const double Param,
0054                           gp_Vec&      Tangent,
0055                           gp_Vec&      DTangent,
0056                           gp_Vec&      Normal,
0057                           gp_Vec&      DNormal,
0058                           gp_Vec&      BiNormal,
0059                           gp_Vec&      DBiNormal) override;
0060 
0061   //! compute Trihedron on curve
0062   //! first and second derivatives.
0063   //! Warning: It used only for C2 approximation
0064   Standard_EXPORT bool D2(const double Param,
0065                           gp_Vec&      Tangent,
0066                           gp_Vec&      DTangent,
0067                           gp_Vec&      D2Tangent,
0068                           gp_Vec&      Normal,
0069                           gp_Vec&      DNormal,
0070                           gp_Vec&      D2Normal,
0071                           gp_Vec&      BiNormal,
0072                           gp_Vec&      DBiNormal,
0073                           gp_Vec&      D2BiNormal) override;
0074 
0075   //! Returns the number of intervals for continuity <S>.
0076   //! May be one if Continuity(me) >= <S>
0077   Standard_EXPORT int NbIntervals(const GeomAbs_Shape S) const override;
0078 
0079   //! Stores in <T> the parameters bounding the intervals
0080   //! of continuity <S>.
0081   //!
0082   //! The array must provide enough room to accommodate
0083   //! for the parameters. i.e. T.Length() > NbIntervals()
0084   Standard_EXPORT void Intervals(NCollection_Array1<double>& T,
0085                                  const GeomAbs_Shape         S) const override;
0086 
0087   //! Gets average value of Tangent(t) and Normal(t) it is useful to
0088   //! make fast approximation of rational surfaces.
0089   Standard_EXPORT void GetAverageLaw(gp_Vec& ATangent, gp_Vec& ANormal, gp_Vec& ABiNormal) override;
0090 
0091   //! Says if the law is Constant.
0092   Standard_EXPORT bool IsConstant() const override;
0093 
0094   //! Return True.
0095   Standard_EXPORT bool IsOnlyBy3dCurve() const override;
0096 
0097   DEFINE_STANDARD_RTTIEXT(GeomFill_ConstantBiNormal, GeomFill_TrihedronLaw)
0098 
0099 private:
0100   gp_Vec                       BN;
0101   occ::handle<GeomFill_Frenet> frenet;
0102 };
0103 
0104 #endif // _GeomFill_ConstantBiNormal_HeaderFile