Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1998-06-23
0002 // Created by: Stephanie HUMEAU
0003 // Copyright (c) 1998-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_GuideTrihedronPlan_HeaderFile
0018 #define _GeomFill_GuideTrihedronPlan_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <TColgp_HArray2OfPnt2d.hxx>
0023 #include <math_Vector.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <GeomFill_TrihedronWithGuide.hxx>
0026 #include <Standard_Real.hxx>
0027 #include <GeomAbs_Shape.hxx>
0028 #include <TColStd_Array1OfReal.hxx>
0029 
0030 class GeomFill_Frenet;
0031 class GeomFill_TrihedronLaw;
0032 class gp_Vec;
0033 
0034 
0035 class GeomFill_GuideTrihedronPlan;
0036 DEFINE_STANDARD_HANDLE(GeomFill_GuideTrihedronPlan, GeomFill_TrihedronWithGuide)
0037 
0038 //! Trihedron in  the case of sweeping along a guide curve defined
0039 //! by the orthogonal  plan on  the trajectory
0040 class GeomFill_GuideTrihedronPlan : public GeomFill_TrihedronWithGuide
0041 {
0042 
0043 public:
0044 
0045   
0046   Standard_EXPORT GeomFill_GuideTrihedronPlan(const Handle(Adaptor3d_Curve)& theGuide);
0047   
0048   //! initialize curve of trihedron law
0049   //! @return Standard_True in case if execution end correctly
0050   Standard_EXPORT virtual Standard_Boolean SetCurve (const Handle(Adaptor3d_Curve)& thePath) Standard_OVERRIDE;
0051   
0052   Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE;
0053   
0054   //! Give a status to the Law
0055   //! Returns PipeOk (default implementation)
0056   Standard_EXPORT virtual GeomFill_PipeError ErrorStatus() const Standard_OVERRIDE;
0057   
0058   Standard_EXPORT virtual Handle(Adaptor3d_Curve) Guide() const Standard_OVERRIDE;
0059   
0060   Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE;
0061   
0062   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;
0063   
0064   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;
0065   
0066   //! Sets the bounds of the parametric interval on
0067   //! the function
0068   //! This determines the derivatives in these values if the
0069   //! function is not Cn.
0070   Standard_EXPORT virtual void SetInterval (const Standard_Real First, const Standard_Real Last) 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 M(t) and V(t) it is usfull 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   //! Say if the law is defined, only by the 3d Geometry of
0092   //! the set Curve
0093   //! Return False by Default.
0094   Standard_EXPORT virtual Standard_Boolean IsOnlyBy3dCurve() const Standard_OVERRIDE;
0095   
0096   Standard_EXPORT virtual void Origine (const Standard_Real OrACR1, const Standard_Real OrACR2) Standard_OVERRIDE;
0097 
0098 
0099 
0100 
0101   DEFINE_STANDARD_RTTIEXT(GeomFill_GuideTrihedronPlan,GeomFill_TrihedronWithGuide)
0102 
0103 protected:
0104 
0105 
0106 
0107 
0108 private:
0109 
0110   
0111   Standard_EXPORT void Init();
0112   
0113   Standard_EXPORT void InitX (const Standard_Real Param);
0114 
0115   Handle(Adaptor3d_Curve) myTrimmed;
0116   Handle(Adaptor3d_Curve) myCurve;
0117   Handle(TColgp_HArray2OfPnt2d) Pole;
0118   math_Vector X;
0119   math_Vector XTol;
0120   math_Vector Inf;
0121   math_Vector Sup;
0122   Handle(GeomFill_Frenet) frenet;
0123   Standard_Integer myNbPts;
0124   GeomFill_PipeError myStatus;
0125 
0126 
0127 };
0128 
0129 
0130 
0131 
0132 
0133 
0134 
0135 #endif // _GeomFill_GuideTrihedronPlan_HeaderFile