Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-06 08:35:32

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 Standard_Real Param,
0041                               const Standard_Real U1,
0042                               const Standard_Real V1,
0043                               const Standard_Real U2,
0044                               const Standard_Real 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 Standard_Real Param,
0054                               const Standard_Real U1,
0055                               const Standard_Real V1,
0056                               const Standard_Real U2,
0057                               const Standard_Real 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 Standard_Real Param,
0063                               const Standard_Real U,
0064                               const Standard_Real V,
0065                               const Standard_Real 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 Standard_Real Param,
0074                               const Standard_Real U,
0075                               const Standard_Real V,
0076                               const Standard_Real 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 Standard_Real Param,
0083                               const Standard_Real U1,
0084                               const Standard_Real V1,
0085                               const Standard_Real U2,
0086                               const Standard_Real V2,
0087                               const Standard_Real 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 Standard_Real Param,
0098                               const Standard_Real U1,
0099                               const Standard_Real V1,
0100                               const Standard_Real U2,
0101                               const Standard_Real V2,
0102                               const Standard_Real 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 Standard_Real Param,
0108                               const Standard_Real U1,
0109                               const Standard_Real V1,
0110                               const Standard_Real U2,
0111                               const Standard_Real V2,
0112                               const Standard_Real PC1,
0113                               const Standard_Real 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 Standard_Real Param,
0123                               const Standard_Real U1,
0124                               const Standard_Real V1,
0125                               const Standard_Real U2,
0126                               const Standard_Real V2,
0127                               const Standard_Real PC1,
0128                               const Standard_Real 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 Standard_Real Param,
0134                                 const Standard_Real U1,
0135                                 const Standard_Real V1,
0136                                 const Standard_Real U2,
0137                                 const Standard_Real 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 Standard_Real Param,
0147                                 const Standard_Real U1,
0148                                 const Standard_Real V1,
0149                                 const Standard_Real U2,
0150                                 const Standard_Real 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 Standard_Real Param,
0157                                 const Standard_Real U,
0158                                 const Standard_Real V,
0159                                 const Standard_Real 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 Standard_Real Param,
0169                                 const Standard_Real U,
0170                                 const Standard_Real V,
0171                                 const Standard_Real 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 Standard_Real Param,
0178                                 const Standard_Real U1,
0179                                 const Standard_Real V1,
0180                                 const Standard_Real U2,
0181                                 const Standard_Real V2,
0182                                 const Standard_Real 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 Standard_Real Param,
0193                                 const Standard_Real U1,
0194                                 const Standard_Real V1,
0195                                 const Standard_Real U2,
0196                                 const Standard_Real V2,
0197                                 const Standard_Real 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 Standard_Real Param,
0203                                 const Standard_Real U1,
0204                                 const Standard_Real V1,
0205                                 const Standard_Real U2,
0206                                 const Standard_Real V2,
0207                                 const Standard_Real PC1,
0208                                 const Standard_Real 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 Standard_Real Param,
0218                                 const Standard_Real U1,
0219                                 const Standard_Real V1,
0220                                 const Standard_Real U2,
0221                                 const Standard_Real V2,
0222                                 const Standard_Real PC1,
0223                                 const Standard_Real 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 Standard_Real Param,
0229                                 const Standard_Real PC1,
0230                                 const Standard_Real PC2);
0231 
0232   //! Changes parameter on existing point
0233   void SetParameter(const Standard_Real Param);
0234 
0235   Standard_Real Parameter() const;
0236 
0237   //! Returns Standard_True if it was not possible to compute
0238   //! the tangent vectors at PointOnS1 and/or PointOnS2.
0239   Standard_Boolean IsTangencyPoint() const;
0240 
0241   const gp_Pnt& PointOnS1() const;
0242 
0243   const gp_Pnt& PointOnS2() const;
0244 
0245   void ParametersOnS1(Standard_Real& U, Standard_Real& V) const;
0246 
0247   void ParametersOnS2(Standard_Real& U, Standard_Real& 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(Standard_Real& U, Standard_Real& V) const;
0262 
0263   Standard_Real 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   Standard_Real ParameterOnC1() const;
0276 
0277   Standard_Real ParameterOnC2() const;
0278 
0279   const gp_Vec& TangentOnC1() const;
0280 
0281   const gp_Vec& TangentOnC2() const;
0282 
0283 protected:
0284 private:
0285   gp_Pnt           pt1;
0286   gp_Pnt           pt2;
0287   gp_Vec           tg1;
0288   gp_Vec           tg2;
0289   Standard_Real    prm;
0290   Standard_Real    u1;
0291   Standard_Real    v1;
0292   Standard_Real    u2;
0293   Standard_Real    v2;
0294   Standard_Real    pc1;
0295   Standard_Real    pc2;
0296   Standard_Real    utg12d;
0297   Standard_Real    vtg12d;
0298   Standard_Real    utg22d;
0299   Standard_Real    vtg22d;
0300   Standard_Boolean hass1;
0301   Standard_Boolean hass2;
0302   Standard_Boolean hasc1;
0303   Standard_Boolean hasc2;
0304   Standard_Boolean istgt;
0305 };
0306 
0307 #include <Blend_Point.lxx>
0308 
0309 #endif // _Blend_Point_HeaderFile