summaryrefslogtreecommitdiff
path: root/inc/IntSurf_PathPoint.lxx
blob: a4eb63aba5f78fab7f71bbc033058529e3aa26a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#include <StdFail_UndefinedDerivative.hxx>
#include <TColgp_HSequenceOfXY.hxx>

inline void IntSurf_PathPoint::AddUV(const Standard_Real U,
				     const Standard_Real V) {
  sequv->Append(gp_XY(U,V));
}
  
inline void IntSurf_PathPoint::SetDirections (const gp_Vec& V,
					      const gp_Dir2d& D) {

  istgt = Standard_False;
  vectg = V;
  dirtg = D;
}

inline void IntSurf_PathPoint::SetTangency (const Standard_Boolean Tang) {
  
  istgt = Tang;
}

inline void IntSurf_PathPoint::SetPassing (const Standard_Boolean Pass) {

  ispass = Pass;
}

inline const gp_Pnt& IntSurf_PathPoint::Value () const
{
  return pt;
}

inline void IntSurf_PathPoint::Value2d (Standard_Real& U,
					Standard_Real& V) const
{
  gp_XY uv(sequv->Sequence().First());
  U = uv.X();
  V = uv.Y();
}

inline Standard_Boolean IntSurf_PathPoint::IsPassingPnt () const {

  return ispass;
}

inline Standard_Boolean IntSurf_PathPoint::IsTangent () const {

  return istgt;
}

inline const gp_Vec& IntSurf_PathPoint::Direction3d () const {

  if (istgt) {StdFail_UndefinedDerivative::Raise();}
  return vectg;
}

inline const gp_Dir2d& IntSurf_PathPoint::Direction2d () const {

  if (istgt) {StdFail_UndefinedDerivative::Raise();}
  return dirtg;
}

inline Standard_Integer IntSurf_PathPoint::Multiplicity () const {

  return (sequv->Length()-1);
}

inline void IntSurf_PathPoint::Parameters (const Standard_Integer Index,
					   Standard_Real& U,
					   Standard_Real& V) const
{
  gp_XY uv(sequv->Value(Index+1));
  U = uv.X();
  V = uv.Y();
}