Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-20 09:17:38

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 <gp_Pnt2d.hxx>
0023 #include <NCollection_Array2.hxx>
0024 #include <NCollection_HArray2.hxx>
0025 #include <math_Vector.hxx>
0026 #include <Standard_Integer.hxx>
0027 #include <GeomFill_TrihedronWithGuide.hxx>
0028 #include <Standard_Real.hxx>
0029 #include <GeomAbs_Shape.hxx>
0030 #include <NCollection_Array1.hxx>
0031 
0032 class GeomFill_Frenet;
0033 class GeomFill_TrihedronLaw;
0034 class gp_Vec;
0035 
0036 //! Trihedron in the case of sweeping along a guide curve defined
0037 //! by the orthogonal plan on the trajectory
0038 class GeomFill_GuideTrihedronPlan : public GeomFill_TrihedronWithGuide
0039 {
0040 
0041 public:
0042   Standard_EXPORT GeomFill_GuideTrihedronPlan(const occ::handle<Adaptor3d_Curve>& theGuide);
0043 
0044   //! initialize curve of trihedron law
0045   //! @return true in case if execution end correctly
0046   Standard_EXPORT bool SetCurve(const occ::handle<Adaptor3d_Curve>& thePath) override;
0047 
0048   Standard_EXPORT occ::handle<GeomFill_TrihedronLaw> Copy() const override;
0049 
0050   //! Give a status to the Law
0051   //! Returns PipeOk (default implementation)
0052   Standard_EXPORT GeomFill_PipeError ErrorStatus() const override;
0053 
0054   Standard_EXPORT occ::handle<Adaptor3d_Curve> Guide() const override;
0055 
0056   Standard_EXPORT bool D0(const double Param,
0057                           gp_Vec&      Tangent,
0058                           gp_Vec&      Normal,
0059                           gp_Vec&      BiNormal) override;
0060 
0061   Standard_EXPORT bool D1(const double Param,
0062                           gp_Vec&      Tangent,
0063                           gp_Vec&      DTangent,
0064                           gp_Vec&      Normal,
0065                           gp_Vec&      DNormal,
0066                           gp_Vec&      BiNormal,
0067                           gp_Vec&      DBiNormal) override;
0068 
0069   Standard_EXPORT bool D2(const double Param,
0070                           gp_Vec&      Tangent,
0071                           gp_Vec&      DTangent,
0072                           gp_Vec&      D2Tangent,
0073                           gp_Vec&      Normal,
0074                           gp_Vec&      DNormal,
0075                           gp_Vec&      D2Normal,
0076                           gp_Vec&      BiNormal,
0077                           gp_Vec&      DBiNormal,
0078                           gp_Vec&      D2BiNormal) override;
0079 
0080   //! Sets the bounds of the parametric interval on
0081   //! the function
0082   //! This determines the derivatives in these values if the
0083   //! function is not Cn.
0084   Standard_EXPORT void SetInterval(const double First, const double Last) override;
0085 
0086   //! Returns the number of intervals for continuity
0087   //! <S>.
0088   //! May be one if Continuity(me) >= <S>
0089   Standard_EXPORT int NbIntervals(const GeomAbs_Shape S) const override;
0090 
0091   //! Stores in <T> the parameters bounding the intervals
0092   //! of continuity <S>.
0093   //!
0094   //! The array must provide enough room to accommodate
0095   //! for the parameters. i.e. T.Length() > NbIntervals()
0096   Standard_EXPORT void Intervals(NCollection_Array1<double>& T,
0097                                  const GeomAbs_Shape         S) const override;
0098 
0099   //! Get average value of M(t) and V(t) it is useful to
0100   //! make fast approximation of rational surfaces.
0101   Standard_EXPORT void GetAverageLaw(gp_Vec& ATangent, gp_Vec& ANormal, gp_Vec& ABiNormal) override;
0102 
0103   //! Say if the law is Constant
0104   Standard_EXPORT bool IsConstant() const override;
0105 
0106   //! Say if the law is defined, only by the 3d Geometry of
0107   //! the set Curve
0108   //! Return False by Default.
0109   Standard_EXPORT bool IsOnlyBy3dCurve() const override;
0110 
0111   Standard_EXPORT void Origine(const double OrACR1, const double OrACR2) override;
0112 
0113   DEFINE_STANDARD_RTTIEXT(GeomFill_GuideTrihedronPlan, GeomFill_TrihedronWithGuide)
0114 
0115 private:
0116   Standard_EXPORT void Init();
0117 
0118   Standard_EXPORT void InitX(const double Param);
0119 
0120   occ::handle<Adaptor3d_Curve>               myTrimmed;
0121   occ::handle<Adaptor3d_Curve>               myCurve;
0122   occ::handle<NCollection_HArray2<gp_Pnt2d>> Pole;
0123   math_Vector                                X;
0124   math_Vector                                XTol;
0125   math_Vector                                Inf;
0126   math_Vector                                Sup;
0127   occ::handle<GeomFill_Frenet>               frenet;
0128   int                                        myNbPts;
0129   GeomFill_PipeError                         myStatus;
0130 };
0131 
0132 #endif // _GeomFill_GuideTrihedronPlan_HeaderFile