File indexing completed on 2026-09-23 09:17:11
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _Contap_TheSegmentOfTheSearch_HeaderFile
0018 #define _Contap_TheSegmentOfTheSearch_HeaderFile
0019
0020 #include <Adaptor2d_Curve2d.hxx>
0021 #include <Contap_ThePathPointOfTheSearch.hxx>
0022
0023 class Standard_DomainError;
0024 class Adaptor3d_HVertex;
0025 class Contap_ThePathPointOfTheSearch;
0026
0027 class Contap_TheSegmentOfTheSearch
0028 {
0029 public:
0030 DEFINE_STANDARD_ALLOC
0031
0032
0033 Standard_EXPORT Contap_TheSegmentOfTheSearch();
0034
0035
0036 void SetValue(const occ::handle<Adaptor2d_Curve2d>& A);
0037
0038
0039
0040 Standard_EXPORT void SetLimitPoint(const Contap_ThePathPointOfTheSearch& V, const bool First);
0041
0042
0043
0044 const occ::handle<Adaptor2d_Curve2d>& Curve() const;
0045
0046
0047
0048 bool HasFirstPoint() const;
0049
0050
0051 const Contap_ThePathPointOfTheSearch& FirstPoint() const;
0052
0053
0054
0055 bool HasLastPoint() const;
0056
0057
0058 const Contap_ThePathPointOfTheSearch& LastPoint() const;
0059
0060 private:
0061 occ::handle<Adaptor2d_Curve2d> arc;
0062 bool hasfp;
0063 Contap_ThePathPointOfTheSearch thefp;
0064 bool haslp;
0065 Contap_ThePathPointOfTheSearch thelp;
0066 };
0067
0068
0069
0070
0071
0072 inline void Contap_TheSegmentOfTheSearch::SetValue(const occ::handle<Adaptor2d_Curve2d>& A)
0073 {
0074 hasfp = false;
0075 haslp = false;
0076 arc = A;
0077 }
0078
0079 inline const occ::handle<Adaptor2d_Curve2d>& Contap_TheSegmentOfTheSearch::Curve() const
0080 {
0081 return arc;
0082 }
0083
0084 inline bool Contap_TheSegmentOfTheSearch::HasFirstPoint() const
0085 {
0086 return hasfp;
0087 }
0088
0089 inline const Contap_ThePathPointOfTheSearch& Contap_TheSegmentOfTheSearch::FirstPoint() const
0090 {
0091 if (!hasfp)
0092 {
0093 throw Standard_DomainError();
0094 }
0095 return thefp;
0096 }
0097
0098 inline bool Contap_TheSegmentOfTheSearch::HasLastPoint() const
0099 {
0100 return haslp;
0101 }
0102
0103 inline const Contap_ThePathPointOfTheSearch& Contap_TheSegmentOfTheSearch::LastPoint() const
0104 {
0105 if (!haslp)
0106 {
0107 throw Standard_DomainError();
0108 }
0109 return thelp;
0110 }
0111
0112 #endif