Warning, /include/opencascade/IntSurf_PathPoint.lxx is written in an unsupported language. File is not indexed.
0001 // Copyright (c) 1995-1999 Matra Datavision
0002 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0003 //
0004 // This file is part of Open CASCADE Technology software library.
0005 //
0006 // This library is free software; you can redistribute it and/or modify it under
0007 // the terms of the GNU Lesser General Public License version 2.1 as published
0008 // by the Free Software Foundation, with special exception defined in the file
0009 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0010 // distribution for complete text of the license and disclaimer of any warranty.
0011 //
0012 // Alternatively, this file may be used under the terms of Open CASCADE
0013 // commercial license or contractual agreement.
0014
0015 #include <StdFail_UndefinedDerivative.hxx>
0016 #include <TColgp_HSequenceOfXY.hxx>
0017
0018 inline void IntSurf_PathPoint::AddUV(const Standard_Real U,
0019 const Standard_Real V) {
0020 sequv->Append(gp_XY(U,V));
0021 }
0022
0023 inline void IntSurf_PathPoint::SetDirections (const gp_Vec& V,
0024 const gp_Dir2d& D) {
0025
0026 istgt = Standard_False;
0027 vectg = V;
0028 dirtg = D;
0029 }
0030
0031 inline void IntSurf_PathPoint::SetTangency (const Standard_Boolean Tang) {
0032
0033 istgt = Tang;
0034 }
0035
0036 inline void IntSurf_PathPoint::SetPassing (const Standard_Boolean Pass) {
0037
0038 ispass = Pass;
0039 }
0040
0041 inline const gp_Pnt& IntSurf_PathPoint::Value () const
0042 {
0043 return pt;
0044 }
0045
0046 inline void IntSurf_PathPoint::Value2d (Standard_Real& U,
0047 Standard_Real& V) const
0048 {
0049 gp_XY uv(sequv->Sequence().First());
0050 U = uv.X();
0051 V = uv.Y();
0052 }
0053
0054 inline Standard_Boolean IntSurf_PathPoint::IsPassingPnt () const {
0055
0056 return ispass;
0057 }
0058
0059 inline Standard_Boolean IntSurf_PathPoint::IsTangent () const {
0060
0061 return istgt;
0062 }
0063
0064 inline const gp_Vec& IntSurf_PathPoint::Direction3d () const {
0065
0066 if (istgt) {throw StdFail_UndefinedDerivative();}
0067 return vectg;
0068 }
0069
0070 inline const gp_Dir2d& IntSurf_PathPoint::Direction2d () const {
0071
0072 if (istgt) {throw StdFail_UndefinedDerivative();}
0073 return dirtg;
0074 }
0075
0076 inline Standard_Integer IntSurf_PathPoint::Multiplicity () const {
0077
0078 return (sequv->Length()-1);
0079 }
0080
0081 inline void IntSurf_PathPoint::Parameters (const Standard_Integer Index,
0082 Standard_Real& U,
0083 Standard_Real& V) const
0084 {
0085 gp_XY uv(sequv->Value(Index+1));
0086 U = uv.X();
0087 V = uv.Y();
0088 }
0089