Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1997-07-11
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_CircularBlendFunc_HeaderFile
0018 #define _GeomFill_CircularBlendFunc_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <gp_Pnt.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <Convert_ParameterisationType.hxx>
0026 #include <Approx_SweepFunction.hxx>
0027 #include <TColgp_Array1OfPnt.hxx>
0028 #include <TColgp_Array1OfPnt2d.hxx>
0029 #include <TColStd_Array1OfReal.hxx>
0030 #include <TColgp_Array1OfVec.hxx>
0031 #include <TColgp_Array1OfVec2d.hxx>
0032 #include <TColStd_Array1OfInteger.hxx>
0033 #include <GeomAbs_Shape.hxx>
0034 
0035 
0036 
0037 class GeomFill_CircularBlendFunc;
0038 DEFINE_STANDARD_HANDLE(GeomFill_CircularBlendFunc, Approx_SweepFunction)
0039 
0040 //! Circular     Blend Function  to    approximate by
0041 //! SweepApproximation from Approx
0042 class GeomFill_CircularBlendFunc : public Approx_SweepFunction
0043 {
0044 
0045 public:
0046 
0047   
0048   //! Create a Blend  with a  constant  radius with 2
0049   //! guide-line.   <FShape>  sets the type of  fillet
0050   //! surface. The --  default value is  Convert_TgtThetaOver2 (classical --
0051   //! nurbs    --   representation  of   circles).
0052   //! ChFi3d_QuasiAngular  --  corresponds  to a nurbs
0053   //! representation   of  circles     --     which
0054   //! parameterisation  matches  the  circle  one.  --
0055   //! ChFi3d_Polynomial corresponds to a polynomial --
0056   //! representation of circles.
0057   Standard_EXPORT GeomFill_CircularBlendFunc(const Handle(Adaptor3d_Curve)& Path, const Handle(Adaptor3d_Curve)& Curve1, const Handle(Adaptor3d_Curve)& Curve2, const Standard_Real Radius, const Standard_Boolean Polynomial = Standard_False);
0058   
0059   //! compute the section for v = param
0060   Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, const Standard_Real First, const Standard_Real Last, TColgp_Array1OfPnt& Poles, TColgp_Array1OfPnt2d& Poles2d, TColStd_Array1OfReal& Weigths) Standard_OVERRIDE;
0061   
0062   //! compute the first  derivative in v direction  of the
0063   //! section for v =  param
0064   Standard_EXPORT virtual Standard_Boolean D1 (const Standard_Real Param, const Standard_Real First, const Standard_Real Last, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths) Standard_OVERRIDE;
0065   
0066   //! compute the second derivative  in v direction of the
0067   //! section  for v = param
0068   Standard_EXPORT virtual Standard_Boolean D2 (const Standard_Real Param, const Standard_Real First, const Standard_Real Last, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfVec& D2Poles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColgp_Array1OfVec2d& D2Poles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths, TColStd_Array1OfReal& D2Weigths) Standard_OVERRIDE;
0069   
0070   //! get the number of 2d curves to  approximate.
0071   Standard_EXPORT virtual Standard_Integer Nb2dCurves() const Standard_OVERRIDE;
0072   
0073   //! get the format of an  section
0074   Standard_EXPORT virtual void SectionShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree) const Standard_OVERRIDE;
0075   
0076   //! get the Knots of the section
0077   Standard_EXPORT virtual void Knots (TColStd_Array1OfReal& TKnots) const Standard_OVERRIDE;
0078   
0079   //! get the Multplicities of the section
0080   Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) const Standard_OVERRIDE;
0081   
0082   //! Returns if the section is rationnal or not
0083   Standard_EXPORT virtual Standard_Boolean IsRational() const Standard_OVERRIDE;
0084   
0085   //! Returns  the number  of  intervals for  continuity
0086   //! <S>. May be one if Continuity(me) >= <S>
0087   Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
0088   
0089   //! Stores in <T> the  parameters bounding the intervals
0090   //! of continuity <S>.
0091   //!
0092   //! The array must provide  enough room to  accommodate
0093   //! for the parameters. i.e. T.Length() > NbIntervals()
0094   Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
0095   
0096   //! Sets the bounds of the parametric interval on
0097   //! the fonction
0098   //! This determines the derivatives in these values if the
0099   //! function is not Cn.
0100   Standard_EXPORT virtual void SetInterval (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE;
0101   
0102   //! Returns the tolerance to reach in approximation
0103   //! to respecte
0104   //! BoundTol error at the Boundary
0105   //! AngleTol tangent error at the Boundary (in radian)
0106   //! SurfTol error inside the surface.
0107   Standard_EXPORT virtual void GetTolerance (const Standard_Real BoundTol, const Standard_Real SurfTol, const Standard_Real AngleTol, TColStd_Array1OfReal& Tol3d) const Standard_OVERRIDE;
0108   
0109   //! Is usfull, if (me) have to  be run numerical
0110   //! algorithme to perform D0, D1 or D2
0111   Standard_EXPORT virtual void SetTolerance (const Standard_Real Tol3d, const Standard_Real Tol2d) Standard_OVERRIDE;
0112   
0113   //! Get    the   barycentre of   Surface.   An   very  poor
0114   //! estimation is sufficient. This information is useful
0115   //! to perform well conditioned rational approximation.
0116   Standard_EXPORT virtual gp_Pnt BarycentreOfSurf() const Standard_OVERRIDE;
0117   
0118   //! Returns the   length of the maximum section. This
0119   //! information is useful to perform well conditioned rational
0120   //! approximation.
0121   Standard_EXPORT virtual Standard_Real MaximalSection() const Standard_OVERRIDE;
0122   
0123   //! Compute the minimal value of weight for each poles
0124   //! of all  sections.  This information is  useful to
0125   //! perform well conditioned rational approximation.
0126   Standard_EXPORT virtual void GetMinimalWeight (TColStd_Array1OfReal& Weigths) const Standard_OVERRIDE;
0127 
0128 
0129 
0130 
0131   DEFINE_STANDARD_RTTIEXT(GeomFill_CircularBlendFunc,Approx_SweepFunction)
0132 
0133 protected:
0134 
0135 
0136 
0137 
0138 private:
0139 
0140   
0141   Standard_EXPORT void Discret();
0142 
0143   gp_Pnt myBary;
0144   Standard_Real myRadius;
0145   Standard_Real maxang;
0146   Standard_Real minang;
0147   Standard_Real distmin;
0148   Handle(Adaptor3d_Curve) myPath;
0149   Handle(Adaptor3d_Curve) myCurve1;
0150   Handle(Adaptor3d_Curve) myCurve2;
0151   Handle(Adaptor3d_Curve) myTPath;
0152   Handle(Adaptor3d_Curve) myTCurve1;
0153   Handle(Adaptor3d_Curve) myTCurve2;
0154   Standard_Integer myDegree;
0155   Standard_Integer myNbKnots;
0156   Standard_Integer myNbPoles;
0157   Convert_ParameterisationType myTConv;
0158   Standard_Boolean myreverse;
0159 
0160 
0161 };
0162 
0163 
0164 
0165 
0166 
0167 
0168 
0169 #endif // _GeomFill_CircularBlendFunc_HeaderFile