Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-12-03 10:54:00

0001 // Created on: 1993-12-02
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_Point_HeaderFile
0018 #define _Blend_Point_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <gp_Pnt.hxx>
0025 #include <gp_Vec.hxx>
0026 #include <Standard_Boolean.hxx>
0027 #include <gp_Vec2d.hxx>
0028 class gp_Vec2d;
0029 
0030 class Blend_Point
0031 {
0032 public:
0033   DEFINE_STANDARD_ALLOC
0034 
0035   Standard_EXPORT Blend_Point();
0036 
0037   //! Creates a point on 2 surfaces, with tangents.
0038   Standard_EXPORT Blend_Point(const gp_Pnt&   Pt1,
0039                               const gp_Pnt&   Pt2,
0040                               const double    Param,
0041                               const double    U1,
0042                               const double    V1,
0043                               const double    U2,
0044                               const double    V2,
0045                               const gp_Vec&   Tg1,
0046                               const gp_Vec&   Tg2,
0047                               const gp_Vec2d& Tg12d,
0048                               const gp_Vec2d& Tg22d);
0049 
0050   //! Creates a point on 2 surfaces, without tangents.
0051   Standard_EXPORT Blend_Point(const gp_Pnt& Pt1,
0052                               const gp_Pnt& Pt2,
0053                               const double  Param,
0054                               const double  U1,
0055                               const double  V1,
0056                               const double  U2,
0057                               const double  V2);
0058 
0059   //! Creates a point on a surface and a curve, with tangents.
0060   Standard_EXPORT Blend_Point(const gp_Pnt&   Pts,
0061                               const gp_Pnt&   Ptc,
0062                               const double    Param,
0063                               const double    U,
0064                               const double    V,
0065                               const double    W,
0066                               const gp_Vec&   Tgs,
0067                               const gp_Vec&   Tgc,
0068                               const gp_Vec2d& Tg2d);
0069 
0070   //! Creates a point on a surface and a curve, without tangents.
0071   Standard_EXPORT Blend_Point(const gp_Pnt& Pts,
0072                               const gp_Pnt& Ptc,
0073                               const double  Param,
0074                               const double  U,
0075                               const double  V,
0076                               const double  W);
0077 
0078   //! Creates a point on a surface and a curve on surface,
0079   //! with tangents.
0080   Standard_EXPORT Blend_Point(const gp_Pnt&   Pt1,
0081                               const gp_Pnt&   Pt2,
0082                               const double    Param,
0083                               const double    U1,
0084                               const double    V1,
0085                               const double    U2,
0086                               const double    V2,
0087                               const double    PC,
0088                               const gp_Vec&   Tg1,
0089                               const gp_Vec&   Tg2,
0090                               const gp_Vec2d& Tg12d,
0091                               const gp_Vec2d& Tg22d);
0092 
0093   //! Creates a point on a surface and a curve on surface,
0094   //! without tangents.
0095   Standard_EXPORT Blend_Point(const gp_Pnt& Pt1,
0096                               const gp_Pnt& Pt2,
0097                               const double  Param,
0098                               const double  U1,
0099                               const double  V1,
0100                               const double  U2,
0101                               const double  V2,
0102                               const double  PC);
0103 
0104   //! Creates a point on two curves on surfaces, with tangents.
0105   Standard_EXPORT Blend_Point(const gp_Pnt&   Pt1,
0106                               const gp_Pnt&   Pt2,
0107                               const double    Param,
0108                               const double    U1,
0109                               const double    V1,
0110                               const double    U2,
0111                               const double    V2,
0112                               const double    PC1,
0113                               const double    PC2,
0114                               const gp_Vec&   Tg1,
0115                               const gp_Vec&   Tg2,
0116                               const gp_Vec2d& Tg12d,
0117                               const gp_Vec2d& Tg22d);
0118 
0119   //! Creates a point on two curves on surfaces, with tangents.
0120   Standard_EXPORT Blend_Point(const gp_Pnt& Pt1,
0121                               const gp_Pnt& Pt2,
0122                               const double  Param,
0123                               const double  U1,
0124                               const double  V1,
0125                               const double  U2,
0126                               const double  V2,
0127                               const double  PC1,
0128                               const double  PC2);
0129 
0130   //! Set the values for a point on 2 surfaces, with tangents.
0131   Standard_EXPORT void SetValue(const gp_Pnt&   Pt1,
0132                                 const gp_Pnt&   Pt2,
0133                                 const double    Param,
0134                                 const double    U1,
0135                                 const double    V1,
0136                                 const double    U2,
0137                                 const double    V2,
0138                                 const gp_Vec&   Tg1,
0139                                 const gp_Vec&   Tg2,
0140                                 const gp_Vec2d& Tg12d,
0141                                 const gp_Vec2d& Tg22d);
0142 
0143   //! Set the values for a point on 2 surfaces, without tangents.
0144   Standard_EXPORT void SetValue(const gp_Pnt& Pt1,
0145                                 const gp_Pnt& Pt2,
0146                                 const double  Param,
0147                                 const double  U1,
0148                                 const double  V1,
0149                                 const double  U2,
0150                                 const double  V2);
0151 
0152   //! Set the values for a point on a surface and a curve,
0153   //! with tangents.
0154   Standard_EXPORT void SetValue(const gp_Pnt&   Pts,
0155                                 const gp_Pnt&   Ptc,
0156                                 const double    Param,
0157                                 const double    U,
0158                                 const double    V,
0159                                 const double    W,
0160                                 const gp_Vec&   Tgs,
0161                                 const gp_Vec&   Tgc,
0162                                 const gp_Vec2d& Tg2d);
0163 
0164   //! Set the values for a point on a surface and a curve,
0165   //! without tangents.
0166   Standard_EXPORT void SetValue(const gp_Pnt& Pts,
0167                                 const gp_Pnt& Ptc,
0168                                 const double  Param,
0169                                 const double  U,
0170                                 const double  V,
0171                                 const double  W);
0172 
0173   //! Creates a point on a surface and a curve on surface,
0174   //! with tangents.
0175   Standard_EXPORT void SetValue(const gp_Pnt&   Pt1,
0176                                 const gp_Pnt&   Pt2,
0177                                 const double    Param,
0178                                 const double    U1,
0179                                 const double    V1,
0180                                 const double    U2,
0181                                 const double    V2,
0182                                 const double    PC,
0183                                 const gp_Vec&   Tg1,
0184                                 const gp_Vec&   Tg2,
0185                                 const gp_Vec2d& Tg12d,
0186                                 const gp_Vec2d& Tg22d);
0187 
0188   //! Creates a point on a surface and a curve on surface,
0189   //! without tangents.
0190   Standard_EXPORT void SetValue(const gp_Pnt& Pt1,
0191                                 const gp_Pnt& Pt2,
0192                                 const double  Param,
0193                                 const double  U1,
0194                                 const double  V1,
0195                                 const double  U2,
0196                                 const double  V2,
0197                                 const double  PC);
0198 
0199   //! Creates a point on two curves on surfaces, with tangents.
0200   Standard_EXPORT void SetValue(const gp_Pnt&   Pt1,
0201                                 const gp_Pnt&   Pt2,
0202                                 const double    Param,
0203                                 const double    U1,
0204                                 const double    V1,
0205                                 const double    U2,
0206                                 const double    V2,
0207                                 const double    PC1,
0208                                 const double    PC2,
0209                                 const gp_Vec&   Tg1,
0210                                 const gp_Vec&   Tg2,
0211                                 const gp_Vec2d& Tg12d,
0212                                 const gp_Vec2d& Tg22d);
0213 
0214   //! Creates a point on two curves on surfaces, without tangents.
0215   Standard_EXPORT void SetValue(const gp_Pnt& Pt1,
0216                                 const gp_Pnt& Pt2,
0217                                 const double  Param,
0218                                 const double  U1,
0219                                 const double  V1,
0220                                 const double  U2,
0221                                 const double  V2,
0222                                 const double  PC1,
0223                                 const double  PC2);
0224 
0225   //! Creates a point on two curves.
0226   Standard_EXPORT void SetValue(const gp_Pnt& Pt1,
0227                                 const gp_Pnt& Pt2,
0228                                 const double  Param,
0229                                 const double  PC1,
0230                                 const double  PC2);
0231 
0232   //! Changes parameter on existing point
0233   void SetParameter(const double Param);
0234 
0235   double Parameter() const;
0236 
0237   //! Returns true if it was not possible to compute
0238   //! the tangent vectors at PointOnS1 and/or PointOnS2.
0239   bool IsTangencyPoint() const;
0240 
0241   const gp_Pnt& PointOnS1() const;
0242 
0243   const gp_Pnt& PointOnS2() const;
0244 
0245   void ParametersOnS1(double& U, double& V) const;
0246 
0247   void ParametersOnS2(double& U, double& V) const;
0248 
0249   const gp_Vec& TangentOnS1() const;
0250 
0251   const gp_Vec& TangentOnS2() const;
0252 
0253   gp_Vec2d Tangent2dOnS1() const;
0254 
0255   gp_Vec2d Tangent2dOnS2() const;
0256 
0257   const gp_Pnt& PointOnS() const;
0258 
0259   const gp_Pnt& PointOnC() const;
0260 
0261   void ParametersOnS(double& U, double& V) const;
0262 
0263   double ParameterOnC() const;
0264 
0265   const gp_Vec& TangentOnS() const;
0266 
0267   const gp_Vec& TangentOnC() const;
0268 
0269   gp_Vec2d Tangent2d() const;
0270 
0271   const gp_Pnt& PointOnC1() const;
0272 
0273   const gp_Pnt& PointOnC2() const;
0274 
0275   double ParameterOnC1() const;
0276 
0277   double ParameterOnC2() const;
0278 
0279   const gp_Vec& TangentOnC1() const;
0280 
0281   const gp_Vec& TangentOnC2() const;
0282 
0283 private:
0284   gp_Pnt pt1;
0285   gp_Pnt pt2;
0286   gp_Vec tg1;
0287   gp_Vec tg2;
0288   double prm;
0289   double u1;
0290   double v1;
0291   double u2;
0292   double v2;
0293   double pc1;
0294   double pc2;
0295   double utg12d;
0296   double vtg12d;
0297   double utg22d;
0298   double vtg22d;
0299   bool   hass1;
0300   bool   hass2;
0301   bool   hasc1;
0302   bool   hasc2;
0303   bool   istgt;
0304 };
0305 
0306 #include <Blend_Point.lxx>
0307 
0308 #endif // _Blend_Point_HeaderFile