Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/opencascade/Contap_Point.lxx is written in an unsupported language. File is not indexed.

0001 // Created on: 1993-03-04
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 #include <Standard_DomainError.hxx>
0018 
0019 inline void Contap_Point::SetValue (const gp_Pnt& Pt,
0020                                     const Standard_Real U,
0021                                     const Standard_Real V)
0022 {
0023   pt = Pt;
0024   uparam = U;
0025   vparam = V;
0026   onarc = Standard_False;
0027   isvtx = Standard_False;
0028   ismult= Standard_False;
0029   myInternal = Standard_False;
0030 }
0031 
0032 inline void Contap_Point::SetParameter (const Standard_Real Para) {
0033 
0034   paraline = Para;
0035 }
0036  
0037 inline void Contap_Point::SetVertex(const Handle(Adaptor3d_HVertex)& V) {
0038 
0039   isvtx = Standard_True;
0040   vtx   = V;
0041 }
0042 
0043 inline void Contap_Point::SetArc (const Handle(Adaptor2d_Curve2d)& A,
0044                                   const Standard_Real Param,
0045                                   const IntSurf_Transition& TLine,
0046                                   const IntSurf_Transition& TArc) {
0047 
0048   onarc   = Standard_True;
0049   arc     = A;
0050   prmarc  = Param;
0051   traline = TLine;
0052   traarc  = TArc;
0053 }
0054 
0055 inline void Contap_Point::SetMultiple ()
0056 {
0057   ismult = Standard_True;
0058 }
0059 
0060 inline void Contap_Point::SetInternal ()
0061 {
0062   myInternal = Standard_True;
0063 }
0064 
0065 
0066 inline Standard_Boolean Contap_Point::IsMultiple () const
0067 {
0068   return ismult;
0069 }
0070 
0071 inline Standard_Boolean Contap_Point::IsInternal () const
0072 {
0073   return myInternal;
0074 }
0075 
0076 inline const gp_Pnt& Contap_Point::Value () const {
0077 
0078   return pt;
0079 }
0080 
0081 inline Standard_Real Contap_Point::ParameterOnLine () const {
0082 
0083   return paraline;
0084 }
0085 
0086 inline void Contap_Point::Parameters (Standard_Real& U1,
0087                                       Standard_Real& V1) const {
0088 
0089   U1 = uparam;
0090   V1 = vparam;
0091 }
0092 
0093 inline Standard_Boolean Contap_Point::IsOnArc () const{
0094   return onarc;
0095 }
0096 
0097 inline const Handle(Adaptor2d_Curve2d)& Contap_Point::Arc () const {
0098 
0099   if (!onarc) {throw Standard_DomainError();}
0100   return arc;
0101 }
0102 
0103 inline const IntSurf_Transition& Contap_Point::TransitionOnLine () const {
0104 
0105   if (!onarc) {throw Standard_DomainError();}
0106   return traline;
0107 }
0108 
0109 inline const IntSurf_Transition& Contap_Point::TransitionOnArc () const {
0110 
0111   if (!onarc) {throw Standard_DomainError();}
0112   return traarc;
0113 }
0114 
0115 inline Standard_Real Contap_Point::ParameterOnArc () const {
0116 
0117   if (!onarc) {throw Standard_DomainError();}
0118   return prmarc;
0119 }
0120 
0121 inline Standard_Boolean Contap_Point::IsVertex () const {
0122   return isvtx;
0123 }
0124 
0125 inline const Handle(Adaptor3d_HVertex)& Contap_Point::Vertex () const {
0126 
0127   if (!isvtx) {throw Standard_DomainError();}
0128   return vtx;
0129 }