Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/BlendFunc_GenChamfer.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Created by: Julia GERASIMOVA
0002 // Copyright (c) 2015 OPEN CASCADE SAS
0003 //
0004 // This file is part of Open CASCADE Technology software library.
0005 //
0006 // This library is free software; you can redistribute it and/or modify it under
0007 // the terms of the GNU Lesser General Public License version 2.1 as published
0008 // by the Free Software Foundation, with special exception defined in the file
0009 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0010 // distribution for complete text of the license and disclaimer of any warranty.
0011 //
0012 // Alternatively, this file may be used under the terms of Open CASCADE
0013 // commercial license or contractual agreement.
0014 
0015 #ifndef _BlendFunc_GenChamfer_HeaderFile
0016 #define _BlendFunc_GenChamfer_HeaderFile
0017 
0018 #include <Adaptor3d_Surface.hxx>
0019 #include <Blend_Function.hxx>
0020 #include <math_Vector.hxx>
0021 #include <TColStd_Array1OfReal.hxx>
0022 #include <GeomAbs_Shape.hxx>
0023 #include <TColStd_Array1OfInteger.hxx>
0024 #include <TColgp_Array1OfPnt.hxx>
0025 #include <TColgp_Array1OfVec.hxx>
0026 #include <TColgp_Array1OfPnt2d.hxx>
0027 #include <TColgp_Array1OfVec2d.hxx>
0028 
0029 class math_Matrix;
0030 class gp_Lin;
0031 class Blend_Point;
0032 
0033 //! Deferred class for a function used to compute a general chamfer
0034 class BlendFunc_GenChamfer : public Blend_Function
0035 {
0036 public:
0037   DEFINE_STANDARD_ALLOC
0038 
0039   Standard_EXPORT BlendFunc_GenChamfer(const Handle(Adaptor3d_Surface)& S1,
0040                                        const Handle(Adaptor3d_Surface)& S2,
0041                                        const Handle(Adaptor3d_Curve)&   CG);
0042 
0043   //! returns the number of equations of the function.
0044   Standard_EXPORT Standard_Integer NbEquations() const Standard_OVERRIDE;
0045 
0046   //! returns the values <F> of the functions and the derivatives
0047   //! <D> for the variable <X>.
0048   //! Returns True if the computation was done successfully,
0049   //! False otherwise.
0050   Standard_EXPORT Standard_Boolean Values(const math_Vector& X,
0051                                           math_Vector&       F,
0052                                           math_Matrix&       D) Standard_OVERRIDE;
0053 
0054   //! Sets the value of the parameter along the guide line.
0055   //! This determines the plane in which the solution has
0056   //! to be found.
0057   Standard_EXPORT void Set(const Standard_Real Param) Standard_OVERRIDE = 0;
0058 
0059   //! Sets the bounds of the parametric interval on
0060   //! the guide line.
0061   //! This determines the derivatives in these values if the
0062   //! function is not Cn.
0063   Standard_EXPORT void Set(const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE;
0064 
0065   Standard_EXPORT void GetTolerance(math_Vector&        Tolerance,
0066                                     const Standard_Real Tol) const Standard_OVERRIDE;
0067 
0068   Standard_EXPORT void GetBounds(math_Vector& InfBound,
0069                                  math_Vector& SupBound) const Standard_OVERRIDE;
0070 
0071   //! Returns   the    minimal  Distance  between   two
0072   //! extremities of calculated sections.
0073   Standard_EXPORT Standard_Real GetMinimalDistance() const Standard_OVERRIDE;
0074 
0075   //! Sets the distances and the "quadrant".
0076   Standard_EXPORT virtual void Set(const Standard_Real    Dist1,
0077                                    const Standard_Real    Dist2,
0078                                    const Standard_Integer Choix) = 0;
0079 
0080   //! Returns False
0081   Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE;
0082 
0083   //! Compute the minimal value of weight for each poles
0084   //! of all sections.
0085   Standard_EXPORT void GetMinimalWeight(TColStd_Array1OfReal& Weigths) const Standard_OVERRIDE;
0086 
0087   //! Returns  the number  of  intervals for  continuity
0088   //! <S>. May be one if Continuity(me) >= <S>
0089   Standard_EXPORT Standard_Integer NbIntervals(const GeomAbs_Shape S) const Standard_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   //! raises
0097   //! OutOfRange from Standard
0098   Standard_EXPORT void Intervals(TColStd_Array1OfReal& T,
0099                                  const GeomAbs_Shape   S) const Standard_OVERRIDE;
0100 
0101   Standard_EXPORT void GetShape(Standard_Integer& NbPoles,
0102                                 Standard_Integer& NbKnots,
0103                                 Standard_Integer& Degree,
0104                                 Standard_Integer& NbPoles2d) Standard_OVERRIDE;
0105 
0106   //! Returns the tolerance to reach in approximation
0107   //! to respect
0108   //! BoundTol error at the Boundary
0109   //! AngleTol tangent error at the Boundary
0110   //! SurfTol error inside the surface.
0111   Standard_EXPORT void GetTolerance(const Standard_Real BoundTol,
0112                                     const Standard_Real SurfTol,
0113                                     const Standard_Real AngleTol,
0114                                     math_Vector&        Tol3d,
0115                                     math_Vector&        Tol1D) const Standard_OVERRIDE;
0116 
0117   Standard_EXPORT void Knots(TColStd_Array1OfReal& TKnots) Standard_OVERRIDE;
0118 
0119   Standard_EXPORT void Mults(TColStd_Array1OfInteger& TMults) Standard_OVERRIDE;
0120 
0121   //! Obsolete method
0122   Standard_EXPORT void Section(const Standard_Real Param,
0123                                const Standard_Real U1,
0124                                const Standard_Real V1,
0125                                const Standard_Real U2,
0126                                const Standard_Real V2,
0127                                Standard_Real&      Pdeb,
0128                                Standard_Real&      Pfin,
0129                                gp_Lin&             C);
0130 
0131   //! Used for the first and last section
0132   Standard_EXPORT Standard_Boolean Section(const Blend_Point&    P,
0133                                            TColgp_Array1OfPnt&   Poles,
0134                                            TColgp_Array1OfVec&   DPoles,
0135                                            TColgp_Array1OfVec&   D2Poles,
0136                                            TColgp_Array1OfPnt2d& Poles2d,
0137                                            TColgp_Array1OfVec2d& DPoles2d,
0138                                            TColgp_Array1OfVec2d& D2Poles2d,
0139                                            TColStd_Array1OfReal& Weigths,
0140                                            TColStd_Array1OfReal& DWeigths,
0141                                            TColStd_Array1OfReal& D2Weigths) Standard_OVERRIDE;
0142 
0143   //! Used for the first and last section
0144   Standard_EXPORT Standard_Boolean Section(const Blend_Point&    P,
0145                                            TColgp_Array1OfPnt&   Poles,
0146                                            TColgp_Array1OfVec&   DPoles,
0147                                            TColgp_Array1OfPnt2d& Poles2d,
0148                                            TColgp_Array1OfVec2d& DPoles2d,
0149                                            TColStd_Array1OfReal& Weigths,
0150                                            TColStd_Array1OfReal& DWeigths) Standard_OVERRIDE;
0151 
0152   Standard_EXPORT void Section(const Blend_Point&    P,
0153                                TColgp_Array1OfPnt&   Poles,
0154                                TColgp_Array1OfPnt2d& Poles2d,
0155                                TColStd_Array1OfReal& Weigths) Standard_OVERRIDE;
0156 
0157   Standard_EXPORT void Resolution(const Standard_Integer IC2d,
0158                                   const Standard_Real    Tol,
0159                                   Standard_Real&         TolU,
0160                                   Standard_Real&         TolV) const Standard_OVERRIDE;
0161 
0162 protected:
0163   Handle(Adaptor3d_Surface) surf1;
0164   Handle(Adaptor3d_Surface) surf2;
0165   Handle(Adaptor3d_Curve)   curv;
0166   Standard_Integer          choix;
0167   Standard_Real             tol;
0168   Standard_Real             distmin;
0169 
0170 private:
0171 };
0172 
0173 #endif // _BlendFunc_GenChamfer_HeaderFile