Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/IntPatch_TheSegmentOfTheSOnBounds.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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 _IntPatch_TheSegmentOfTheSOnBounds_HeaderFile
0018 #define _IntPatch_TheSegmentOfTheSOnBounds_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <IntPatch_ThePathPointOfTheSOnBounds.hxx>
0025 
0026 class Standard_DomainError;
0027 class Adaptor3d_HVertex;
0028 class IntPatch_ThePathPointOfTheSOnBounds;
0029 
0030 class IntPatch_TheSegmentOfTheSOnBounds
0031 {
0032 public:
0033   DEFINE_STANDARD_ALLOC
0034 
0035   //! Empty constructor.
0036   Standard_EXPORT IntPatch_TheSegmentOfTheSOnBounds();
0037 
0038   //! Defines the concerned arc.
0039   void SetValue(const occ::handle<Adaptor2d_Curve2d>& A);
0040 
0041   //! Defines the first point or the last point,
0042   //! depending on the value of the boolean First.
0043   Standard_EXPORT void SetLimitPoint(const IntPatch_ThePathPointOfTheSOnBounds& V,
0044                                      const bool                                 First);
0045 
0046   //! Returns the geometric curve on the surface 's domain
0047   //! which is solution.
0048   const occ::handle<Adaptor2d_Curve2d>& Curve() const;
0049 
0050   //! Returns True if there is a vertex (ThePathPoint) defining
0051   //! the lowest valid parameter on the arc.
0052   bool HasFirstPoint() const;
0053 
0054   //! Returns the first point.
0055   const IntPatch_ThePathPointOfTheSOnBounds& FirstPoint() const;
0056 
0057   //! Returns True if there is a vertex (ThePathPoint) defining
0058   //! the greatest valid parameter on the arc.
0059   bool HasLastPoint() const;
0060 
0061   //! Returns the last point.
0062   const IntPatch_ThePathPointOfTheSOnBounds& LastPoint() const;
0063 
0064 private:
0065   occ::handle<Adaptor2d_Curve2d>      arc;
0066   bool                                hasfp;
0067   IntPatch_ThePathPointOfTheSOnBounds thefp;
0068   bool                                haslp;
0069   IntPatch_ThePathPointOfTheSOnBounds thelp;
0070 };
0071 
0072 //=================================================================================================
0073 // Inline implementations
0074 //=================================================================================================
0075 
0076 inline void IntPatch_TheSegmentOfTheSOnBounds::SetValue(const occ::handle<Adaptor2d_Curve2d>& A)
0077 {
0078   hasfp = false;
0079   haslp = false;
0080   arc   = A;
0081 }
0082 
0083 inline const occ::handle<Adaptor2d_Curve2d>& IntPatch_TheSegmentOfTheSOnBounds::Curve() const
0084 {
0085   return arc;
0086 }
0087 
0088 inline bool IntPatch_TheSegmentOfTheSOnBounds::HasFirstPoint() const
0089 {
0090   return hasfp;
0091 }
0092 
0093 inline const IntPatch_ThePathPointOfTheSOnBounds& IntPatch_TheSegmentOfTheSOnBounds::FirstPoint()
0094   const
0095 {
0096   if (!hasfp)
0097   {
0098     throw Standard_DomainError();
0099   }
0100   return thefp;
0101 }
0102 
0103 inline bool IntPatch_TheSegmentOfTheSOnBounds::HasLastPoint() const
0104 {
0105   return haslp;
0106 }
0107 
0108 inline const IntPatch_ThePathPointOfTheSOnBounds& IntPatch_TheSegmentOfTheSOnBounds::LastPoint()
0109   const
0110 {
0111   if (!haslp)
0112   {
0113     throw Standard_DomainError();
0114   }
0115   return thelp;
0116 }
0117 
0118 #endif // _IntPatch_TheSegmentOfTheSOnBounds_HeaderFile