Warning, /include/opencascade/TopOpeBRep_Point2d.lxx is written in an unsupported language. File is not indexed.
0001 // Created on: 1998-10-29
0002 // Created by: Jean Yves LEBEY
0003 // Copyright (c) 1998-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 #include <TopOpeBRep_define.hxx>
0018
0019 //=================================================================================================
0020
0021 inline void TopOpeBRep_Point2d::SetPint(const IntRes2d_IntersectionPoint& P)
0022 {
0023 mypint = P;
0024 myhaspint = true;
0025 }
0026
0027 //=================================================================================================
0028
0029 inline bool TopOpeBRep_Point2d::HasPint() const
0030 {
0031 return myhaspint;
0032 }
0033
0034 //=================================================================================================
0035
0036 inline const IntRes2d_IntersectionPoint& TopOpeBRep_Point2d::Pint() const
0037 {
0038 if (!HasPint())
0039 throw Standard_Failure("TopOpeBRep_Point2d::Pint");
0040 return mypint;
0041 }
0042
0043 //=================================================================================================
0044
0045 inline void TopOpeBRep_Point2d::SetIsVertex(const int Index, const bool B)
0046 {
0047 if (Index == 1)
0048 myisvertex1 = B;
0049 else if (Index == 2)
0050 myisvertex2 = B;
0051 else
0052 throw Standard_Failure("TopOpeBRep_Point2d::SetIsVertex");
0053 }
0054
0055 //=================================================================================================
0056
0057 inline bool TopOpeBRep_Point2d::IsVertex(const int Index) const
0058 {
0059 if (Index == 1)
0060 return myisvertex1;
0061 else if (Index == 2)
0062 return myisvertex2;
0063 else
0064 throw Standard_Failure("TopOpeBRep_Point2d::IsVertex");
0065 }
0066
0067 //=================================================================================================
0068
0069 inline void TopOpeBRep_Point2d::SetVertex(const int Index, const TopoDS_Vertex& V)
0070 {
0071 if (Index == 1)
0072 {
0073 myvertex1 = V;
0074 myisvertex1 = true;
0075 }
0076 else if (Index == 2)
0077 {
0078 myvertex2 = V;
0079 myisvertex2 = true;
0080 }
0081 else
0082 throw Standard_Failure("TopOpeBRep_Point2d::SetVertex");
0083 }
0084
0085 //=================================================================================================
0086
0087 inline void TopOpeBRep_Point2d::SetTransition(const int Index, const TopOpeBRepDS_Transition& T)
0088 {
0089 if (Index == 1)
0090 mytransition1 = T;
0091 else if (Index == 2)
0092 mytransition2 = T;
0093 else
0094 throw Standard_Failure("TopOpeBRep_Point2d::SetTransition");
0095 }
0096
0097 //=================================================================================================
0098
0099 inline void TopOpeBRep_Point2d::SetParameter(const int Index, const double P)
0100 {
0101 if (Index == 1)
0102 myparameter1 = P;
0103 else if (Index == 2)
0104 myparameter2 = P;
0105 else
0106 throw Standard_Failure("TopOpeBRep_Point2d::SetParameter");
0107 }
0108
0109 //=================================================================================================
0110
0111 inline double TopOpeBRep_Point2d::Parameter(const int Index) const
0112 {
0113 if (Index == 1)
0114 return myparameter1;
0115 else if (Index == 2)
0116 return myparameter2;
0117 else
0118 throw Standard_Failure("TopOpeBRep_Point2d::Parameter");
0119 }
0120
0121 //=================================================================================================
0122
0123 inline void TopOpeBRep_Point2d::SetIsPointOfSegment(const bool B)
0124 {
0125 myispointofsegment = B;
0126 }
0127
0128 //=================================================================================================
0129
0130 inline bool TopOpeBRep_Point2d::IsPointOfSegment() const
0131 {
0132 return myispointofsegment;
0133 }
0134
0135 //=================================================================================================
0136
0137 inline void TopOpeBRep_Point2d::SetSegmentAncestors(const int IP1, const int IP2)
0138 {
0139 myips1 = IP1;
0140 myips2 = IP2;
0141 myhasancestors = (myips1 != 0 && myips2 != 0);
0142 if (myhasancestors)
0143 mystatus = TopOpeBRep_P2DNEW;
0144 }
0145
0146 //=================================================================================================
0147
0148 inline bool TopOpeBRep_Point2d::SegmentAncestors(int& IP1, int& IP2) const
0149 {
0150 IP1 = myips1;
0151 IP2 = myips2;
0152 return myhasancestors;
0153 }
0154
0155 //=================================================================================================
0156
0157 inline void TopOpeBRep_Point2d::SetStatus(const TopOpeBRep_P2Dstatus I)
0158 {
0159 mystatus = I;
0160 }
0161
0162 //=================================================================================================
0163
0164 inline TopOpeBRep_P2Dstatus TopOpeBRep_Point2d::Status() const
0165 {
0166 return mystatus;
0167 }
0168
0169 //=================================================================================================
0170
0171 inline void TopOpeBRep_Point2d::SetIndex(const int I)
0172 {
0173 myindex = I;
0174 }
0175
0176 //=================================================================================================
0177
0178 inline int TopOpeBRep_Point2d::Index() const
0179 {
0180 return myindex;
0181 }
0182
0183 //=================================================================================================
0184
0185 inline void TopOpeBRep_Point2d::SetValue(const gp_Pnt& P)
0186 {
0187 mypnt = P;
0188 }
0189
0190 //=================================================================================================
0191
0192 inline const gp_Pnt& TopOpeBRep_Point2d::Value() const
0193 {
0194 return mypnt;
0195 }
0196
0197 //=================================================================================================
0198
0199 inline void TopOpeBRep_Point2d::SetValue2d(const gp_Pnt2d& P)
0200 {
0201 mypnt2d = P;
0202 }
0203
0204 //=================================================================================================
0205
0206 inline const gp_Pnt2d& TopOpeBRep_Point2d::Value2d() const
0207 {
0208 return mypnt2d;
0209 }
0210
0211 //=================================================================================================
0212
0213 inline void TopOpeBRep_Point2d::SetKeep(const bool B)
0214 {
0215 mykeep = B;
0216 }
0217
0218 //=================================================================================================
0219
0220 inline bool TopOpeBRep_Point2d::Keep() const
0221 {
0222 return mykeep;
0223 }
0224
0225 //=================================================================================================
0226
0227 inline void TopOpeBRep_Point2d::SetEdgesConfig(const TopOpeBRepDS_Config B)
0228 {
0229 myedgesconfig = B;
0230 }
0231
0232 //=================================================================================================
0233
0234 inline TopOpeBRepDS_Config TopOpeBRep_Point2d::EdgesConfig() const
0235 {
0236 return myedgesconfig;
0237 }
0238
0239 //=================================================================================================
0240
0241 inline void TopOpeBRep_Point2d::SetTolerance(const double t)
0242 {
0243 mytolerance = t;
0244 }
0245
0246 //=================================================================================================
0247
0248 inline double TopOpeBRep_Point2d::Tolerance() const
0249 {
0250 return mytolerance;
0251 }
0252
0253 //=================================================================================================
0254
0255 inline void TopOpeBRep_Point2d::SetHctxff2d(const occ::handle<TopOpeBRep_Hctxff2d>& h)
0256 {
0257 myctxff2d = h;
0258 }
0259
0260 //=================================================================================================
0261
0262 inline occ::handle<TopOpeBRep_Hctxff2d> TopOpeBRep_Point2d::Hctxff2d() const
0263 {
0264 return myctxff2d;
0265 }
0266
0267 //=================================================================================================
0268
0269 inline void TopOpeBRep_Point2d::SetHctxee2d(const occ::handle<TopOpeBRep_Hctxee2d>& h)
0270 {
0271 myctxee2d = h;
0272 }
0273
0274 //=================================================================================================
0275
0276 inline occ::handle<TopOpeBRep_Hctxee2d> TopOpeBRep_Point2d::Hctxee2d() const
0277 {
0278 return myctxee2d;
0279 }