Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-18 09:20:59

0001 // Created on: 1992-05-06
0002 // Created by: Jacques GOUSSARD
0003 // Copyright (c) 1992-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 _IntSurf_PntOn2S_HeaderFile
0018 #define _IntSurf_PntOn2S_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <gp_Pnt.hxx>
0025 #include <Standard_Boolean.hxx>
0026 class gp_Pnt2d;
0027 
0028 //! This class defines the geometric information
0029 //! for an intersection point between 2 surfaces :
0030 //! The coordinates ( Pnt from gp ), and two
0031 //! parametric coordinates.
0032 class IntSurf_PntOn2S
0033 {
0034 public:
0035   DEFINE_STANDARD_ALLOC
0036 
0037   //! Empty constructor.
0038   Standard_EXPORT IntSurf_PntOn2S();
0039 
0040   //! Sets the value of the point in 3d space.
0041   void SetValue(const gp_Pnt& Pt);
0042 
0043   //! Sets the values of the point in 3d space, and
0044   //! in the parametric space of one of the surface.
0045   Standard_EXPORT void SetValue(const gp_Pnt& Pt,
0046                                 const bool    OnFirst,
0047                                 const double  U,
0048                                 const double  V);
0049 
0050   //! Sets the values of the point in 3d space, and
0051   //! in the parametric space of each surface.
0052   void SetValue(const gp_Pnt& Pt,
0053                 const double  U1,
0054                 const double  V1,
0055                 const double  U2,
0056                 const double  V2);
0057 
0058   //! Set the values of the point in the parametric
0059   //! space of one of the surface.
0060   Standard_EXPORT void SetValue(const bool OnFirst, const double U, const double V);
0061 
0062   //! Set the values of the point in the parametric
0063   //! space of one of the surface.
0064   void SetValue(const double U1, const double V1, const double U2, const double V2);
0065 
0066   //! Returns the point in 3d space.
0067   const gp_Pnt& Value() const;
0068 
0069   //! Returns the point in 2d space of one of the surfaces.
0070   Standard_EXPORT gp_Pnt2d ValueOnSurface(const bool OnFirst) const;
0071 
0072   //! Returns the parameters of the point on the first surface.
0073   void ParametersOnS1(double& U1, double& V1) const;
0074 
0075   //! Returns the parameters of the point on the second surface.
0076   void ParametersOnS2(double& U2, double& V2) const;
0077 
0078   //! Returns the parameters of the point in the
0079   //! parametric space of one of the surface.
0080   Standard_EXPORT void ParametersOnSurface(const bool OnFirst, double& U, double& V) const;
0081 
0082   //! Returns the parameters of the point on both surfaces.
0083   void Parameters(double& U1, double& V1, double& U2, double& V2) const;
0084 
0085   //! Returns TRUE if 2D- and 3D-coordinates of theOterPoint are equal to
0086   //! corresponding coordinates of me (with given tolerance).
0087   //! If theTol2D < 0.0 we will compare 3D-points only.
0088   Standard_EXPORT bool IsSame(const IntSurf_PntOn2S& theOtherPoint,
0089                               const double           theTol3D = 0.0,
0090                               const double           theTol2D = -1.0) const;
0091 
0092 private:
0093   gp_Pnt pt;
0094   double u1;
0095   double v1;
0096   double u2;
0097   double v2;
0098 };
0099 
0100 #include <IntSurf_PntOn2S.lxx>
0101 
0102 #endif // _IntSurf_PntOn2S_HeaderFile