Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 2013-02-05
0002 // Created by: Julia GERASIMOVA
0003 // Copyright (c) 2001-2013 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _GeomFill_DiscreteTrihedron_HeaderFile
0017 #define _GeomFill_DiscreteTrihedron_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 
0021 #include <GeomFill_HSequenceOfAx2.hxx>
0022 #include <TColStd_HSequenceOfReal.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 GeomFill_Frenet;
0029 class gp_Vec;
0030 
0031 
0032 class GeomFill_DiscreteTrihedron;
0033 DEFINE_STANDARD_HANDLE(GeomFill_DiscreteTrihedron, GeomFill_TrihedronLaw)
0034 
0035 //! Defined Discrete Trihedron Law.
0036 //! The requirement for path curve is only G1.
0037 //! The result is C0-continuous surface
0038 //! that can be later approximated to C1.
0039 class GeomFill_DiscreteTrihedron : public GeomFill_TrihedronLaw
0040 {
0041 
0042 public:
0043 
0044   
0045   Standard_EXPORT GeomFill_DiscreteTrihedron();
0046   
0047   Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE;
0048   
0049   Standard_EXPORT void Init();
0050   
0051   //! initialize curve of trihedron law
0052   //! @return Standard_True in case if execution end correctly
0053   Standard_EXPORT virtual Standard_Boolean SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE;
0054   
0055   //! compute Trihedron on curve at parameter <Param>
0056   Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE;
0057   
0058   //! compute Trihedron and  derivative Trihedron  on curve
0059   //! at parameter <Param>
0060   //! Warning : It used only for C1 or C2 approximation
0061   //! For the moment it returns null values for DTangent, DNormal
0062   //! and DBiNormal.
0063   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;
0064   
0065   //! compute  Trihedron on curve
0066   //! first and seconde  derivatives.
0067   //! Warning : It used only for C2 approximation
0068   //! For the moment it returns null values for DTangent, DNormal
0069   //! DBiNormal, D2Tangent, D2Normal, D2BiNormal.
0070   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;
0071   
0072   //! Returns  the number  of  intervals for  continuity
0073   //! <S>.
0074   //! May be one if Continuity(me) >= <S>
0075   Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
0076   
0077   //! Stores in <T> the  parameters bounding the intervals
0078   //! of continuity <S>.
0079   //!
0080   //! The array must provide  enough room to  accommodate
0081   //! for the parameters. i.e. T.Length() > NbIntervals()
0082   Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
0083   
0084   //! Get average value of Tangent(t) and Normal(t) it is usful to
0085   //! make fast approximation of rational  surfaces.
0086   Standard_EXPORT virtual void GetAverageLaw (gp_Vec& ATangent, gp_Vec& ANormal, gp_Vec& ABiNormal) Standard_OVERRIDE;
0087   
0088   //! Say if the law is Constant.
0089   Standard_EXPORT virtual Standard_Boolean IsConstant() const Standard_OVERRIDE;
0090   
0091   //! Return True.
0092   Standard_EXPORT virtual Standard_Boolean IsOnlyBy3dCurve() const Standard_OVERRIDE;
0093 
0094 
0095 
0096 
0097   DEFINE_STANDARD_RTTIEXT(GeomFill_DiscreteTrihedron,GeomFill_TrihedronLaw)
0098 
0099 protected:
0100 
0101 
0102 
0103 
0104 private:
0105 
0106 
0107   gp_Pnt myPoint;
0108   Handle(GeomFill_HSequenceOfAx2) myTrihedrons;
0109   Handle(TColStd_HSequenceOfReal) myKnots;
0110   Handle(GeomFill_Frenet) myFrenet;
0111   Standard_Boolean myUseFrenet;
0112 
0113 
0114 };
0115 
0116 
0117 
0118 
0119 
0120 
0121 
0122 #endif // _GeomFill_DiscreteTrihedron_HeaderFile