Back to home page

EIC code displayed by LXR

 
 

    


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 // function : SetPint
0021 // purpose  :
0022 //=======================================================================
0023 inline void TopOpeBRep_Point2d::SetPint(const IntRes2d_IntersectionPoint& P)
0024 {
0025   mypint    = P;
0026   myhaspint = Standard_True;
0027 }
0028 
0029 //=======================================================================
0030 // function : HasPint
0031 // purpose  :
0032 //=======================================================================
0033 inline Standard_Boolean TopOpeBRep_Point2d::HasPint() const
0034 {
0035   return myhaspint;
0036 }
0037 
0038 //=======================================================================
0039 // function : Pint
0040 // purpose  :
0041 //=======================================================================
0042 inline const IntRes2d_IntersectionPoint& TopOpeBRep_Point2d::Pint() const
0043 {
0044   if (!HasPint())
0045     throw Standard_Failure("TopOpeBRep_Point2d::Pint");
0046   return mypint;
0047 }
0048 
0049 //=======================================================================
0050 // function : SetIsVertex
0051 // purpose  :
0052 //=======================================================================
0053 inline void TopOpeBRep_Point2d::SetIsVertex(const Standard_Integer Index, const Standard_Boolean B)
0054 {
0055   if (Index == 1)
0056     myisvertex1 = B;
0057   else if (Index == 2)
0058     myisvertex2 = B;
0059   else
0060     throw Standard_Failure("TopOpeBRep_Point2d::SetIsVertex");
0061 }
0062 
0063 //=======================================================================
0064 // function : IsVertex
0065 // purpose  :
0066 //=======================================================================
0067 inline Standard_Boolean TopOpeBRep_Point2d::IsVertex(const Standard_Integer Index) const
0068 {
0069   if (Index == 1)
0070     return myisvertex1;
0071   else if (Index == 2)
0072     return myisvertex2;
0073   else
0074     throw Standard_Failure("TopOpeBRep_Point2d::IsVertex");
0075 }
0076 
0077 //=======================================================================
0078 // function : SetVertex
0079 // purpose  :
0080 //=======================================================================
0081 inline void TopOpeBRep_Point2d::SetVertex(const Standard_Integer Index, const TopoDS_Vertex& V)
0082 {
0083   if (Index == 1)
0084   {
0085     myvertex1   = V;
0086     myisvertex1 = Standard_True;
0087   }
0088   else if (Index == 2)
0089   {
0090     myvertex2   = V;
0091     myisvertex2 = Standard_True;
0092   }
0093   else
0094     throw Standard_Failure("TopOpeBRep_Point2d::SetVertex");
0095 }
0096 
0097 //=======================================================================
0098 // function : SetTransition
0099 // purpose  :
0100 //=======================================================================
0101 inline void TopOpeBRep_Point2d::SetTransition(const Standard_Integer         Index,
0102                                               const TopOpeBRepDS_Transition& T)
0103 {
0104   if (Index == 1)
0105     mytransition1 = T;
0106   else if (Index == 2)
0107     mytransition2 = T;
0108   else
0109     throw Standard_Failure("TopOpeBRep_Point2d::SetTransition");
0110 }
0111 
0112 //=======================================================================
0113 // function : SetParameter
0114 // purpose  :
0115 //=======================================================================
0116 inline void TopOpeBRep_Point2d::SetParameter(const Standard_Integer Index, const Standard_Real P)
0117 {
0118   if (Index == 1)
0119     myparameter1 = P;
0120   else if (Index == 2)
0121     myparameter2 = P;
0122   else
0123     throw Standard_Failure("TopOpeBRep_Point2d::SetParameter");
0124 }
0125 
0126 //=======================================================================
0127 // function : Parameter
0128 // purpose  :
0129 //=======================================================================
0130 inline Standard_Real TopOpeBRep_Point2d::Parameter(const Standard_Integer Index) const
0131 {
0132   if (Index == 1)
0133     return myparameter1;
0134   else if (Index == 2)
0135     return myparameter2;
0136   else
0137     throw Standard_Failure("TopOpeBRep_Point2d::Parameter");
0138 }
0139 
0140 //=======================================================================
0141 // function : SetIsPointOfSegment
0142 // purpose  :
0143 //=======================================================================
0144 inline void TopOpeBRep_Point2d::SetIsPointOfSegment(const Standard_Boolean B)
0145 {
0146   myispointofsegment = B;
0147 }
0148 
0149 //=======================================================================
0150 // function : IsPointOfSegment
0151 // purpose  :
0152 //=======================================================================
0153 inline Standard_Boolean TopOpeBRep_Point2d::IsPointOfSegment() const
0154 {
0155   return myispointofsegment;
0156 }
0157 
0158 //=======================================================================
0159 // function : SetSegmentAncestors
0160 // purpose  :
0161 //=======================================================================
0162 inline void TopOpeBRep_Point2d::SetSegmentAncestors(const Standard_Integer IP1,
0163                                                     const Standard_Integer IP2)
0164 {
0165   myips1         = IP1;
0166   myips2         = IP2;
0167   myhasancestors = (myips1 != 0 && myips2 != 0);
0168   if (myhasancestors)
0169     mystatus = TopOpeBRep_P2DNEW;
0170 }
0171 
0172 //=======================================================================
0173 // function : SegmentAncestors
0174 // purpose  :
0175 //=======================================================================
0176 inline Standard_Boolean TopOpeBRep_Point2d::SegmentAncestors(Standard_Integer& IP1,
0177                                                              Standard_Integer& IP2) const
0178 {
0179   IP1 = myips1;
0180   IP2 = myips2;
0181   return myhasancestors;
0182 }
0183 
0184 //=======================================================================
0185 // function : SetStatus
0186 // purpose  :
0187 //=======================================================================
0188 inline void TopOpeBRep_Point2d::SetStatus(const TopOpeBRep_P2Dstatus I)
0189 {
0190   mystatus = I;
0191 }
0192 
0193 //=======================================================================
0194 // function : Status
0195 // purpose  :
0196 //=======================================================================
0197 inline TopOpeBRep_P2Dstatus TopOpeBRep_Point2d::Status() const
0198 {
0199   return mystatus;
0200 }
0201 
0202 //=======================================================================
0203 // function : SetIndex
0204 // purpose  :
0205 //=======================================================================
0206 inline void TopOpeBRep_Point2d::SetIndex(const Standard_Integer I)
0207 {
0208   myindex = I;
0209 }
0210 
0211 //=======================================================================
0212 // function : Index
0213 // purpose  :
0214 //=======================================================================
0215 inline Standard_Integer TopOpeBRep_Point2d::Index() const
0216 {
0217   return myindex;
0218 }
0219 
0220 //=======================================================================
0221 // function : SetValue
0222 // purpose  :
0223 //=======================================================================
0224 inline void TopOpeBRep_Point2d::SetValue(const gp_Pnt& P)
0225 {
0226   mypnt = P;
0227 }
0228 
0229 //=======================================================================
0230 // function : Value
0231 // purpose  :
0232 //=======================================================================
0233 inline const gp_Pnt& TopOpeBRep_Point2d::Value() const
0234 {
0235   return mypnt;
0236 }
0237 
0238 //=======================================================================
0239 // function : SetValue2d
0240 // purpose  :
0241 //=======================================================================
0242 inline void TopOpeBRep_Point2d::SetValue2d(const gp_Pnt2d& P)
0243 {
0244   mypnt2d = P;
0245 }
0246 
0247 //=======================================================================
0248 // function : Value2d
0249 // purpose  :
0250 //=======================================================================
0251 inline const gp_Pnt2d& TopOpeBRep_Point2d::Value2d() const
0252 {
0253   return mypnt2d;
0254 }
0255 
0256 //=======================================================================
0257 // function : SetKeep
0258 // purpose  :
0259 //=======================================================================
0260 inline void TopOpeBRep_Point2d::SetKeep(const Standard_Boolean B)
0261 {
0262   mykeep = B;
0263 }
0264 
0265 //=======================================================================
0266 // function : Keep
0267 // purpose  :
0268 //=======================================================================
0269 inline Standard_Boolean TopOpeBRep_Point2d::Keep() const
0270 {
0271   return mykeep;
0272 }
0273 
0274 //=======================================================================
0275 // function : SetEdgesConfig
0276 // purpose  :
0277 //=======================================================================
0278 inline void TopOpeBRep_Point2d::SetEdgesConfig(const TopOpeBRepDS_Config B)
0279 {
0280   myedgesconfig = B;
0281 }
0282 
0283 //=======================================================================
0284 // function : EdgesConfig
0285 // purpose  :
0286 //=======================================================================
0287 inline TopOpeBRepDS_Config TopOpeBRep_Point2d::EdgesConfig() const
0288 {
0289   return myedgesconfig;
0290 }
0291 
0292 //=======================================================================
0293 // function : SetTolerance
0294 // purpose  :
0295 //=======================================================================
0296 inline void TopOpeBRep_Point2d::SetTolerance(const Standard_Real t)
0297 {
0298   mytolerance = t;
0299 }
0300 
0301 //=======================================================================
0302 // function : Tolerance
0303 // purpose  :
0304 //=======================================================================
0305 inline Standard_Real TopOpeBRep_Point2d::Tolerance() const
0306 {
0307   return mytolerance;
0308 }
0309 
0310 //=======================================================================
0311 // function : SetHctxff2d
0312 // purpose  :
0313 //=======================================================================
0314 inline void TopOpeBRep_Point2d::SetHctxff2d(const Handle(TopOpeBRep_Hctxff2d)& h)
0315 {
0316   myctxff2d = h;
0317 }
0318 
0319 //=======================================================================
0320 // function : Hctxff2d
0321 // purpose  :
0322 //=======================================================================
0323 inline Handle(TopOpeBRep_Hctxff2d) TopOpeBRep_Point2d::Hctxff2d() const
0324 {
0325   return myctxff2d;
0326 }
0327 
0328 //=======================================================================
0329 // function : SetHctxee2d
0330 // purpose  :
0331 //=======================================================================
0332 inline void TopOpeBRep_Point2d::SetHctxee2d(const Handle(TopOpeBRep_Hctxee2d)& h)
0333 {
0334   myctxee2d = h;
0335 }
0336 
0337 //=======================================================================
0338 // function : Hctxee2d
0339 // purpose  :
0340 //=======================================================================
0341 inline Handle(TopOpeBRep_Hctxee2d) TopOpeBRep_Point2d::Hctxee2d() const
0342 {
0343   return myctxee2d;
0344 }