summaryrefslogtreecommitdiff
path: root/inc/Contap_Line.lxx
blob: aeed591b01c2d50c8923f427eb311554ed6ae92f (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
#include <Standard_DomainError.hxx>
#include <TColgp_HSequenceOfPnt.hxx>
#include <gp_Lin.hxx>
#include <gp_Circ.hxx>
#include <IntSurf_PntOn2S.hxx>
#include <IntSurf_LineOn2S.hxx>


#include TheHSequenceOfPoint_hxx

inline const Handle(IntSurf_LineOn2S)& Contap_Line::LineOn2S () const
{
  return curv;
}

inline void Contap_Line::Add(const IntSurf_PntOn2S& POn2S)
{
  curv->Add(POn2S);
}

inline Standard_Integer Contap_Line::NbVertex () const
{
  return svtx->Length();
}

inline ThePoint& Contap_Line::Vertex (const Standard_Integer Index) const
{
  return svtx->ChangeSequence()(Index);
}

inline Contap_IType Contap_Line::TypeContour () const
{
  return typL;
}

inline Standard_Integer Contap_Line::NbPnts () const {
  if (typL != Contap_Walking) {Standard_DomainError::Raise();}
  return(curv->NbPoints());
}

inline const IntSurf_PntOn2S& Contap_Line::Point (const Standard_Integer Index) const {
  if (typL != Contap_Walking) {Standard_DomainError::Raise();}
  return(curv->Value(Index));
}

inline gp_Lin Contap_Line::Line () const
{
  if (typL != Contap_Lin) {Standard_DomainError::Raise();}
  return gp_Lin(pt,dir1);
}

inline gp_Circ Contap_Line::Circle () const
{
  if (typL != Contap_Circle) {Standard_DomainError::Raise();}
  return gp_Circ(gp_Ax2(pt,dir1,dir2),rad);
}