Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1997-12-02
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_TrihedronLaw_HeaderFile
0018 #define _GeomFill_TrihedronLaw_HeaderFile
0019 
0020 #include <Adaptor3d_Curve.hxx>
0021 #include <GeomFill_PipeError.hxx>
0022 #include <GeomAbs_Shape.hxx>
0023 #include <TColStd_Array1OfReal.hxx>
0024 
0025 class gp_Vec;
0026 
0027 
0028 class GeomFill_TrihedronLaw;
0029 DEFINE_STANDARD_HANDLE(GeomFill_TrihedronLaw, Standard_Transient)
0030 
0031 //! To define Trihedron along one Curve
0032 class GeomFill_TrihedronLaw : public Standard_Transient
0033 {
0034 
0035 public:
0036 
0037   //! initialize curve of trihedron law
0038   //! @return Standard_True
0039   Standard_EXPORT virtual Standard_Boolean SetCurve (const Handle(Adaptor3d_Curve)& C);
0040   
0041   Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const = 0;
0042   
0043   //! Give a status to the Law
0044   //! Returns PipeOk (default implementation)
0045   Standard_EXPORT virtual GeomFill_PipeError ErrorStatus() const;
0046   
0047   //! compute Triedrhon on curve at parameter <Param>
0048   Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) = 0;
0049   
0050   //! compute Triedrhon and  derivative Trihedron  on curve
0051   //! at parameter <Param>
0052   //! Warning : It used only for C1 or C2 approximation
0053   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);
0054   
0055   //! compute  Trihedron on curve
0056   //! first and seconde  derivatives.
0057   //! Warning : It used only for C2 approximation
0058   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);
0059   
0060   //! Returns  the number  of  intervals for  continuity
0061   //! <S>.
0062   //! May be one if Continuity(me) >= <S>
0063   Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const = 0;
0064   
0065   //! Stores in <T> the  parameters bounding the intervals
0066   //! of continuity <S>.
0067   //!
0068   //! The array must provide  enough room to  accommodate
0069   //! for the parameters. i.e. T.Length() > NbIntervals()
0070   Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const = 0;
0071   
0072   //! Sets the bounds of the parametric interval on
0073   //! the function
0074   //! This determines the derivatives in these values if the
0075   //! function is not Cn.
0076   Standard_EXPORT virtual void SetInterval (const Standard_Real First, const Standard_Real Last);
0077   
0078   //! Gets the bounds of the parametric interval on
0079   //! the function
0080   Standard_EXPORT void GetInterval (Standard_Real& First, Standard_Real& Last);
0081   
0082   //! Get average value of M(t) and V(t) it is usfull to
0083   //! make fast approximation of rational  surfaces.
0084   Standard_EXPORT virtual void GetAverageLaw (gp_Vec& ATangent, gp_Vec& ANormal, gp_Vec& ABiNormal) = 0;
0085   
0086   //! Say if the law is Constant
0087   Standard_EXPORT virtual Standard_Boolean IsConstant() const;
0088   
0089   //! Say if the law is defined, only by the 3d Geometry of
0090   //! the set Curve
0091   //! Return False by Default.
0092   Standard_EXPORT virtual Standard_Boolean IsOnlyBy3dCurve() const;
0093 
0094 
0095 
0096 
0097   DEFINE_STANDARD_RTTIEXT(GeomFill_TrihedronLaw,Standard_Transient)
0098 
0099 protected:
0100 
0101 
0102   Handle(Adaptor3d_Curve) myCurve;
0103   Handle(Adaptor3d_Curve) myTrimmed;
0104 
0105 
0106 private:
0107 
0108 
0109 
0110 
0111 };
0112 
0113 
0114 
0115 
0116 
0117 
0118 
0119 #endif // _GeomFill_TrihedronLaw_HeaderFile