summaryrefslogtreecommitdiff
path: root/src/Poly/Poly_Polygon2D.cxx
blob: 2fe51ed6732250aef7e87da914fa87baf580a559 (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
// File:	Poly_Polygon2D.cxx
// Created:	Thu Mar  9 16:36:49 1995
// Author:	Laurent PAINNOT
//		<lpa@metrox>


#include <Poly_Polygon2D.ixx>
#include <gp_Pnt2d.hxx>

//=======================================================================
//function : Poly_Polygon2D
//purpose  : 
//=======================================================================

Poly_Polygon2D::Poly_Polygon2D(const TColgp_Array1OfPnt2d& Nodes): 
    myDeflection(0.),
    myNodes(1, Nodes.Length())
{
  Standard_Integer i, j= 1;
  for (i = Nodes.Lower(); i <= Nodes.Upper(); i++)
    myNodes(j++) = Nodes(i);
}

//=======================================================================
//function : Deflection
//purpose  : 
//=======================================================================

Standard_Real Poly_Polygon2D::Deflection() const 
{
  return myDeflection;
}

//=======================================================================
//function : Deflection
//purpose  : 
//=======================================================================

void Poly_Polygon2D::Deflection(const Standard_Real D)
{
  myDeflection = D;
}

//=======================================================================
//function : Nodes
//purpose  : 
//=======================================================================

const TColgp_Array1OfPnt2d& Poly_Polygon2D::Nodes() const 
{
  return myNodes;
}