Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-12 09:16:58

0001 // Created on: 1993-02-05
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 _Contap_ThePathPointOfTheSearch_HeaderFile
0018 #define _Contap_ThePathPointOfTheSearch_HeaderFile
0019 
0020 #include <Adaptor2d_Curve2d.hxx>
0021 #include <gp_Pnt.hxx>
0022 
0023 class Adaptor3d_HVertex;
0024 class Standard_DomainError;
0025 class gp_Pnt;
0026 
0027 class Contap_ThePathPointOfTheSearch
0028 {
0029 public:
0030   DEFINE_STANDARD_ALLOC
0031 
0032   Standard_EXPORT Contap_ThePathPointOfTheSearch();
0033 
0034   Standard_EXPORT Contap_ThePathPointOfTheSearch(const gp_Pnt&                         P,
0035                                                  const double                          Tol,
0036                                                  const occ::handle<Adaptor3d_HVertex>& V,
0037                                                  const occ::handle<Adaptor2d_Curve2d>& A,
0038                                                  const double                          Parameter);
0039 
0040   Standard_EXPORT Contap_ThePathPointOfTheSearch(const gp_Pnt&                         P,
0041                                                  const double                          Tol,
0042                                                  const occ::handle<Adaptor2d_Curve2d>& A,
0043                                                  const double                          Parameter);
0044 
0045   void SetValue(const gp_Pnt&                         P,
0046                 const double                          Tol,
0047                 const occ::handle<Adaptor3d_HVertex>& V,
0048                 const occ::handle<Adaptor2d_Curve2d>& A,
0049                 const double                          Parameter);
0050 
0051   void SetValue(const gp_Pnt&                         P,
0052                 const double                          Tol,
0053                 const occ::handle<Adaptor2d_Curve2d>& A,
0054                 const double                          Parameter);
0055 
0056   const gp_Pnt& Value() const;
0057 
0058   double Tolerance() const;
0059 
0060   bool IsNew() const;
0061 
0062   const occ::handle<Adaptor3d_HVertex>& Vertex() const;
0063 
0064   const occ::handle<Adaptor2d_Curve2d>& Arc() const;
0065 
0066   double Parameter() const;
0067 
0068 private:
0069   gp_Pnt                         point;
0070   double                         tol;
0071   bool                           isnew;
0072   occ::handle<Adaptor3d_HVertex> vtx;
0073   occ::handle<Adaptor2d_Curve2d> arc;
0074   double                         param;
0075 };
0076 
0077 //=================================================================================================
0078 // Inline implementations
0079 //=================================================================================================
0080 
0081 inline void Contap_ThePathPointOfTheSearch::SetValue(const gp_Pnt&                         P,
0082                                                      const double                          Tol,
0083                                                      const occ::handle<Adaptor3d_HVertex>& V,
0084                                                      const occ::handle<Adaptor2d_Curve2d>& A,
0085                                                      const double Parameter)
0086 {
0087   isnew = false;
0088   point = P;
0089   tol   = Tol;
0090   vtx   = V;
0091   arc   = A;
0092   param = Parameter;
0093 }
0094 
0095 inline void Contap_ThePathPointOfTheSearch::SetValue(const gp_Pnt&                         P,
0096                                                      const double                          Tol,
0097                                                      const occ::handle<Adaptor2d_Curve2d>& A,
0098                                                      const double Parameter)
0099 {
0100   isnew = true;
0101   point = P;
0102   tol   = Tol;
0103   arc   = A;
0104   param = Parameter;
0105 }
0106 
0107 inline const gp_Pnt& Contap_ThePathPointOfTheSearch::Value() const
0108 {
0109   return point;
0110 }
0111 
0112 inline double Contap_ThePathPointOfTheSearch::Tolerance() const
0113 {
0114   return tol;
0115 }
0116 
0117 inline bool Contap_ThePathPointOfTheSearch::IsNew() const
0118 {
0119   return isnew;
0120 }
0121 
0122 inline const occ::handle<Adaptor3d_HVertex>& Contap_ThePathPointOfTheSearch::Vertex() const
0123 {
0124   if (isnew)
0125   {
0126     throw Standard_DomainError();
0127   }
0128   return vtx;
0129 }
0130 
0131 inline const occ::handle<Adaptor2d_Curve2d>& Contap_ThePathPointOfTheSearch::Arc() const
0132 {
0133   return arc;
0134 }
0135 
0136 inline double Contap_ThePathPointOfTheSearch::Parameter() const
0137 {
0138   return param;
0139 }
0140 
0141 #endif // _Contap_ThePathPointOfTheSearch_HeaderFile