Back to home page

EIC code displayed by LXR

 
 

    


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

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_GuideTrihedronAC_HeaderFile
0018 #define _GeomFill_GuideTrihedronAC_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <GeomFill_TrihedronWithGuide.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <GeomAbs_Shape.hxx>
0026 #include <NCollection_Array1.hxx>
0027 class Approx_CurvlinFunc;
0028 class GeomFill_TrihedronLaw;
0029 class gp_Vec;
0030 
0031 //! Trihedron in the case of a sweeping along a guide curve.
0032 //! defined by curviline absciss
0033 class GeomFill_GuideTrihedronAC : public GeomFill_TrihedronWithGuide
0034 {
0035 
0036 public:
0037   Standard_EXPORT GeomFill_GuideTrihedronAC(const occ::handle<Adaptor3d_Curve>& guide);
0038 
0039   //! initialize curve of trihedron law
0040   //! @return true
0041   Standard_EXPORT bool SetCurve(const occ::handle<Adaptor3d_Curve>& C) override;
0042 
0043   Standard_EXPORT occ::handle<GeomFill_TrihedronLaw> Copy() const override;
0044 
0045   Standard_EXPORT occ::handle<Adaptor3d_Curve> Guide() const override;
0046 
0047   Standard_EXPORT bool D0(const double Param,
0048                           gp_Vec&      Tangent,
0049                           gp_Vec&      Normal,
0050                           gp_Vec&      BiNormal) override;
0051 
0052   Standard_EXPORT bool D1(const double Param,
0053                           gp_Vec&      Tangent,
0054                           gp_Vec&      DTangent,
0055                           gp_Vec&      Normal,
0056                           gp_Vec&      DNormal,
0057                           gp_Vec&      BiNormal,
0058                           gp_Vec&      DBiNormal) override;
0059 
0060   Standard_EXPORT bool D2(const double Param,
0061                           gp_Vec&      Tangent,
0062                           gp_Vec&      DTangent,
0063                           gp_Vec&      D2Tangent,
0064                           gp_Vec&      Normal,
0065                           gp_Vec&      DNormal,
0066                           gp_Vec&      D2Normal,
0067                           gp_Vec&      BiNormal,
0068                           gp_Vec&      DBiNormal,
0069                           gp_Vec&      D2BiNormal) override;
0070 
0071   //! Returns the number of intervals for continuity
0072   //! <S>.
0073   //! May be one if Continuity(me) >= <S>
0074   Standard_EXPORT int NbIntervals(const GeomAbs_Shape S) const override;
0075 
0076   //! Stores in <T> the parameters bounding the intervals
0077   //! of continuity <S>.
0078   //!
0079   //! The array must provide enough room to accommodate
0080   //! for the parameters. i.e. T.Length() > NbIntervals()
0081   Standard_EXPORT void Intervals(NCollection_Array1<double>& T,
0082                                  const GeomAbs_Shape         S) const override;
0083 
0084   //! Sets the bounds of the parametric interval on
0085   //! the function
0086   //! This determines the derivatives in these values if the
0087   //! function is not Cn.
0088   Standard_EXPORT void SetInterval(const double First, const double Last) override;
0089 
0090   //! Get average value of M(t) and V(t) it is useful to
0091   //! make fast approximation of rational surfaces.
0092   Standard_EXPORT void GetAverageLaw(gp_Vec& ATangent, gp_Vec& ANormal, gp_Vec& ABiNormal) override;
0093 
0094   //! Say if the law is Constant
0095   Standard_EXPORT bool IsConstant() const override;
0096 
0097   //! Say if the law is defined, only by the 3d Geometry of
0098   //! the set Curve
0099   //! Return False by Default.
0100   Standard_EXPORT bool IsOnlyBy3dCurve() const override;
0101 
0102   Standard_EXPORT void Origine(const double OrACR1, const double OrACR2) override;
0103 
0104   DEFINE_STANDARD_RTTIEXT(GeomFill_GuideTrihedronAC, GeomFill_TrihedronWithGuide)
0105 
0106 private:
0107   occ::handle<Approx_CurvlinFunc> myGuideAC;
0108   double                          Lguide;
0109   occ::handle<Approx_CurvlinFunc> myCurveAC;
0110   double                          L;
0111   occ::handle<Adaptor3d_Curve>    myCurve;
0112   double                          UTol;
0113   double                          STol;
0114   double                          Orig1;
0115   double                          Orig2;
0116 };
0117 
0118 #endif // _GeomFill_GuideTrihedronAC_HeaderFile