Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-18 09:19:35

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 <NCollection_Array1.hxx>
0027 #include <gp_Pnt.hxx>
0028 #include <gp_Vec.hxx>
0029 #include <gp_Pnt2d.hxx>
0030 #include <gp_Vec2d.hxx>
0031 class gp_Pnt;
0032 class gp_Vec;
0033 class gp_Vec2d;
0034 class Blend_Point;
0035 
0036 //! Deferred class for a function used to compute a blending
0037 //! surface between two surfaces, using a guide line.
0038 //! The vector <X> used in Value, Values and Derivatives methods
0039 //! has to be the vector of the parametric coordinates U1,V1,
0040 //! U2,V2, of the extremities of a section on the first and
0041 //! second surface.
0042 class Blend_Function : public Blend_AppFunction
0043 {
0044 public:
0045   DEFINE_STANDARD_ALLOC
0046 
0047   //! Returns 4.
0048   Standard_EXPORT int NbVariables() const override;
0049 
0050   //! Returns the point on the first support.
0051   Standard_EXPORT const gp_Pnt& Pnt1() const override;
0052 
0053   //! Returns the point on the second support.
0054   Standard_EXPORT const gp_Pnt& Pnt2() const override;
0055 
0056   //! Returns the point on the first surface, at parameter
0057   //! Sol(1),Sol(2) (Sol is the vector used in the call of
0058   //! IsSolution.
0059   Standard_EXPORT virtual const gp_Pnt& PointOnS1() const = 0;
0060 
0061   //! Returns the point on the second surface, at parameter
0062   //! Sol(3),Sol(4) (Sol is the vector used in the call of
0063   //! IsSolution.
0064   Standard_EXPORT virtual const gp_Pnt& PointOnS2() const = 0;
0065 
0066   //! Returns True when it is not possible to compute
0067   //! the tangent vectors at PointOnS1 and/or PointOnS2.
0068   Standard_EXPORT virtual bool IsTangencyPoint() const = 0;
0069 
0070   //! Returns the tangent vector at PointOnS1, in 3d space.
0071   Standard_EXPORT virtual const gp_Vec& TangentOnS1() const = 0;
0072 
0073   //! Returns the tangent vector at PointOnS1, in the
0074   //! parametric space of the first surface.
0075   Standard_EXPORT virtual const gp_Vec2d& Tangent2dOnS1() const = 0;
0076 
0077   //! Returns the tangent vector at PointOnS2, in 3d space.
0078   Standard_EXPORT virtual const gp_Vec& TangentOnS2() const = 0;
0079 
0080   //! Returns the tangent vector at PointOnS2, in the
0081   //! parametric space of the second surface.
0082   Standard_EXPORT virtual const gp_Vec2d& Tangent2dOnS2() const = 0;
0083 
0084   //! Returns the tangent vector at the section,
0085   //! at the beginning and the end of the section, and
0086   //! returns the normal (of the surfaces) at
0087   //! these points.
0088   Standard_EXPORT virtual void Tangent(const double U1,
0089                                        const double V1,
0090                                        const double U2,
0091                                        const double V2,
0092                                        gp_Vec&      TgFirst,
0093                                        gp_Vec&      TgLast,
0094                                        gp_Vec&      NormFirst,
0095                                        gp_Vec&      NormLast) const = 0;
0096 
0097   Standard_EXPORT virtual bool TwistOnS1() const;
0098 
0099   Standard_EXPORT virtual bool TwistOnS2() const;
0100 
0101   Standard_EXPORT void Section(const Blend_Point&            P,
0102                                NCollection_Array1<gp_Pnt>&   Poles,
0103                                NCollection_Array1<gp_Pnt2d>& Poles2d,
0104                                NCollection_Array1<double>&   Weigths) override = 0;
0105 
0106   //! Used for the first and last section
0107   //! The method returns true if the derivatives
0108   //! are computed, otherwise it returns false
0109   Standard_EXPORT bool Section(const Blend_Point&            P,
0110                                NCollection_Array1<gp_Pnt>&   Poles,
0111                                NCollection_Array1<gp_Vec>&   DPoles,
0112                                NCollection_Array1<gp_Vec>&   D2Poles,
0113                                NCollection_Array1<gp_Pnt2d>& Poles2d,
0114                                NCollection_Array1<gp_Vec2d>& DPoles2d,
0115                                NCollection_Array1<gp_Vec2d>& D2Poles2d,
0116                                NCollection_Array1<double>&   Weigths,
0117                                NCollection_Array1<double>&   DWeigths,
0118                                NCollection_Array1<double>&   D2Weigths) override;
0119 };
0120 
0121 #endif // _Blend_Function_HeaderFile