summaryrefslogtreecommitdiff
path: root/inc/IntPatch_WLine.lxx
blob: b2bdcbbe307fb819a9fc43f421be712f75863c00 (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
76
77
78
79
80
81
82
83
84
85
86
87
88
// File:	IntPatch_WLine.lxx
// Created:	Mon May 27 13:18:45 1991
// Author:	Isabelle GRIGNON
// Copyright:	OPEN CASCADE 1991, 1992

#include <Standard_DomainError.hxx>
#include <IntSurf_LineOn2S.hxx>
#include <IntPatch_Point.hxx>


inline void IntPatch_WLine::AddVertex (const IntPatch_Point& Pnt)
{
  svtx.Append(Pnt);
}

inline void IntPatch_WLine::Replace (const Standard_Integer Index,
				     const IntPatch_Point& Pnt)
{
  svtx(Index) = Pnt;
}

inline void IntPatch_WLine::SetFirstPoint (const Standard_Integer IndFirst)
{
  fipt = Standard_True;
  indf = IndFirst;
}

inline void IntPatch_WLine::SetLastPoint (const Standard_Integer IndLast)
{
  lapt = Standard_True;
  indl = IndLast;
}

inline Standard_Integer IntPatch_WLine::NbPnts () const
{
  return curv->NbPoints();
}

inline const IntSurf_PntOn2S& IntPatch_WLine::Point (const Standard_Integer Index) const
{
  return curv->Value(Index);
}

inline Standard_Boolean IntPatch_WLine::HasFirstPoint () const
{
  return fipt;
}

inline Standard_Boolean IntPatch_WLine::HasLastPoint () const
{
  return lapt;
}

inline const IntPatch_Point& IntPatch_WLine::FirstPoint () const
{
  if (!fipt) {Standard_DomainError::Raise();}
  return svtx(indf);
}

inline const IntPatch_Point& IntPatch_WLine::LastPoint () const
{
  if (!lapt) {Standard_DomainError::Raise();}
  return svtx(indl);
}

inline const IntPatch_Point& IntPatch_WLine::FirstPoint (Standard_Integer& Indfirst) const
{
  if (!fipt) {Standard_DomainError::Raise();}
  Indfirst = indf;
  return svtx(indf);
}

inline const IntPatch_Point& IntPatch_WLine::LastPoint (Standard_Integer& Indlast) const
{
  if (!lapt) {Standard_DomainError::Raise();}
  Indlast = indl;
  return svtx(indl);
}

inline Standard_Integer IntPatch_WLine::NbVertex () const
{
  return svtx.Length();
}

inline const IntPatch_Point& IntPatch_WLine::Vertex (const Standard_Integer Index) const
{
  return svtx(Index);
}