Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1993-09-13
0002 // Created by: Jacques GOUSSARD
0003 // Copyright (c) 1993-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 _Blend_Function_HeaderFile
0018 #define _Blend_Function_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Blend_AppFunction.hxx>
0025 #include <Standard_Boolean.hxx>
0026 #include <TColStd_Array1OfReal.hxx>
0027 #include <TColgp_Array1OfPnt.hxx>
0028 #include <TColgp_Array1OfVec.hxx>
0029 #include <TColgp_Array1OfPnt2d.hxx>
0030 #include <TColgp_Array1OfVec2d.hxx>
0031 class gp_Pnt;
0032 class gp_Vec;
0033 class gp_Vec2d;
0034 class Blend_Point;
0035 
0036 
0037 //! Deferred class for a function used to compute a blending
0038 //! surface between two surfaces, using a guide line.
0039 //! The vector <X> used in Value, Values and Derivatives methods
0040 //! has to be the vector of the parametric coordinates U1,V1,
0041 //! U2,V2, of the extremities of a section on the first and
0042 //! second surface.
0043 class Blend_Function  : public Blend_AppFunction
0044 {
0045 public:
0046 
0047   DEFINE_STANDARD_ALLOC
0048 
0049   
0050   //! Returns 4.
0051   Standard_EXPORT Standard_Integer NbVariables() const Standard_OVERRIDE;
0052   
0053   //! Returns the point on the first support.
0054   Standard_EXPORT const gp_Pnt& Pnt1() const Standard_OVERRIDE;
0055   
0056   //! Returns the point on the seconde support.
0057   Standard_EXPORT const gp_Pnt& Pnt2() const Standard_OVERRIDE;
0058   
0059   //! Returns the point on the first surface, at parameter
0060   //! Sol(1),Sol(2) (Sol is the vector used in the call of
0061   //! IsSolution.
0062   Standard_EXPORT virtual const gp_Pnt& PointOnS1() const = 0;
0063   
0064   //! Returns the point on the second surface, at parameter
0065   //! Sol(3),Sol(4) (Sol is the vector used in the call of
0066   //! IsSolution.
0067   Standard_EXPORT virtual const gp_Pnt& PointOnS2() const = 0;
0068   
0069   //! Returns True when it is not possible to compute
0070   //! the tangent vectors at PointOnS1 and/or PointOnS2.
0071   Standard_EXPORT virtual Standard_Boolean IsTangencyPoint() const = 0;
0072   
0073   //! Returns the tangent vector at PointOnS1, in 3d space.
0074   Standard_EXPORT virtual const gp_Vec& TangentOnS1() const = 0;
0075   
0076   //! Returns the tangent vector at PointOnS1, in the
0077   //! parametric space of the first surface.
0078   Standard_EXPORT virtual const gp_Vec2d& Tangent2dOnS1() const = 0;
0079   
0080   //! Returns the tangent vector at PointOnS2, in 3d space.
0081   Standard_EXPORT virtual const gp_Vec& TangentOnS2() const = 0;
0082   
0083   //! Returns the tangent vector at PointOnS2, in the
0084   //! parametric space of the second surface.
0085   Standard_EXPORT virtual const gp_Vec2d& Tangent2dOnS2() const = 0;
0086   
0087   //! Returns the tangent vector at the section,
0088   //! at the beginning and the end of the section, and
0089   //! returns the normal (of the surfaces) at
0090   //! these points.
0091   Standard_EXPORT virtual void Tangent (const Standard_Real U1,
0092                                         const Standard_Real V1,
0093                                         const Standard_Real U2,
0094                                         const Standard_Real V2,
0095                                         gp_Vec& TgFirst,
0096                                         gp_Vec& TgLast,
0097                                         gp_Vec& NormFirst,
0098                                         gp_Vec& NormLast) const = 0;
0099   
0100   Standard_EXPORT virtual Standard_Boolean TwistOnS1() const;
0101   
0102   Standard_EXPORT virtual Standard_Boolean TwistOnS2() const;
0103   
0104   Standard_EXPORT virtual void Section (const Blend_Point& P,
0105                                         TColgp_Array1OfPnt& Poles,
0106                                         TColgp_Array1OfPnt2d& Poles2d,
0107                                         TColStd_Array1OfReal& Weigths) Standard_OVERRIDE = 0;
0108   
0109   //! Used for the first and last section
0110   //! The method returns Standard_True if the derivatives
0111   //! are computed, otherwise it returns Standard_False
0112   Standard_EXPORT virtual Standard_Boolean Section (const Blend_Point& P,
0113                                                     TColgp_Array1OfPnt& Poles,
0114                                                     TColgp_Array1OfVec& DPoles,
0115                                                     TColgp_Array1OfVec& D2Poles,
0116                                                     TColgp_Array1OfPnt2d& Poles2d,
0117                                                     TColgp_Array1OfVec2d& DPoles2d,
0118                                                     TColgp_Array1OfVec2d& D2Poles2d,
0119                                                     TColStd_Array1OfReal& Weigths,
0120                                                     TColStd_Array1OfReal& DWeigths,
0121                                                     TColStd_Array1OfReal& D2Weigths) Standard_OVERRIDE;
0122 
0123 
0124 
0125 
0126 protected:
0127 
0128 
0129 
0130 
0131 
0132 private:
0133 
0134 
0135 
0136 
0137 
0138 };
0139 
0140 
0141 
0142 
0143 
0144 
0145 
0146 #endif // _Blend_Function_HeaderFile