7fd59977 |
1 | #include <PPoly_Polygon3D.ixx> |
2 | |
3 | //======================================================================= |
4 | //function : |
5 | //purpose : |
6 | //======================================================================= |
7 | |
8 | |
9 | PPoly_Polygon3D::PPoly_Polygon3D(const Handle(PColgp_HArray1OfPnt)& Nodes, |
10 | const Standard_Real Defl) : |
11 | myDeflection(Defl), |
12 | myNodes(Nodes) |
13 | { |
14 | } |
15 | |
16 | //======================================================================= |
17 | //function : |
18 | //purpose : |
19 | //======================================================================= |
20 | |
21 | |
22 | PPoly_Polygon3D::PPoly_Polygon3D(const Handle(PColgp_HArray1OfPnt)& Nodes, |
23 | const Handle(PColStd_HArray1OfReal)& Param, |
24 | const Standard_Real Defl) : |
25 | myDeflection(Defl), |
26 | myNodes(Nodes), |
27 | myParameters(Param) |
28 | { |
29 | } |
30 | |
31 | //======================================================================= |
32 | //function : |
33 | //purpose : |
34 | //======================================================================= |
35 | |
36 | |
37 | Standard_Real PPoly_Polygon3D::Deflection() const |
38 | { |
39 | return myDeflection; |
40 | } |
41 | |
42 | //======================================================================= |
43 | //function : |
44 | //purpose : |
45 | //======================================================================= |
46 | |
47 | |
48 | void PPoly_Polygon3D::Deflection(const Standard_Real Defl) |
49 | { |
50 | myDeflection = Defl; |
51 | } |
52 | |
53 | //======================================================================= |
54 | //function : |
55 | //purpose : |
56 | //======================================================================= |
57 | |
58 | |
59 | Standard_Integer PPoly_Polygon3D::NbNodes() const |
60 | { |
61 | return myNodes->Length(); |
62 | } |
63 | |
64 | //======================================================================= |
65 | //function : |
66 | //purpose : |
67 | //======================================================================= |
68 | |
69 | |
70 | Handle(PColgp_HArray1OfPnt) PPoly_Polygon3D::Nodes() const |
71 | { |
72 | return myNodes; |
73 | } |
74 | |
75 | |
76 | //======================================================================= |
77 | //function : |
78 | //purpose : |
79 | //======================================================================= |
80 | |
81 | void PPoly_Polygon3D::Nodes(const Handle(PColgp_HArray1OfPnt)& Nodes) |
82 | { |
83 | myNodes = Nodes; |
84 | } |
85 | |
86 | //======================================================================= |
87 | //function : |
88 | //purpose : |
89 | //======================================================================= |
90 | |
91 | Standard_Boolean PPoly_Polygon3D::HasParameters() const |
92 | { |
93 | return (!myParameters.IsNull()); |
94 | } |
95 | |
96 | |
97 | //======================================================================= |
98 | //function : |
99 | //purpose : |
100 | //======================================================================= |
101 | |
102 | void PPoly_Polygon3D::Parameters(const Handle(PColStd_HArray1OfReal)& Param) |
103 | { |
104 | myParameters = Param; |
105 | } |
106 | |
107 | |
108 | //======================================================================= |
109 | //function : |
110 | //purpose : |
111 | //======================================================================= |
112 | |
113 | Handle(PColStd_HArray1OfReal) PPoly_Polygon3D::Parameters() const |
114 | { |
115 | return myParameters; |
116 | } |
117 | |