7fd59977 |
1 | #include <StepShape_PolyLoop.ixx> |
2 | |
3 | |
4 | StepShape_PolyLoop::StepShape_PolyLoop () {} |
5 | |
6 | void StepShape_PolyLoop::Init( |
7 | const Handle(TCollection_HAsciiString)& aName) |
8 | { |
9 | |
10 | StepRepr_RepresentationItem::Init(aName); |
11 | } |
12 | |
13 | void StepShape_PolyLoop::Init( |
14 | const Handle(TCollection_HAsciiString)& aName, |
15 | const Handle(StepGeom_HArray1OfCartesianPoint)& aPolygon) |
16 | { |
17 | // --- classe own fields --- |
18 | polygon = aPolygon; |
19 | // --- classe inherited fields --- |
20 | StepRepr_RepresentationItem::Init(aName); |
21 | } |
22 | |
23 | |
24 | void StepShape_PolyLoop::SetPolygon(const Handle(StepGeom_HArray1OfCartesianPoint)& aPolygon) |
25 | { |
26 | polygon = aPolygon; |
27 | } |
28 | |
29 | Handle(StepGeom_HArray1OfCartesianPoint) StepShape_PolyLoop::Polygon() const |
30 | { |
31 | return polygon; |
32 | } |
33 | |
34 | Handle(StepGeom_CartesianPoint) StepShape_PolyLoop::PolygonValue(const Standard_Integer num) const |
35 | { |
36 | return polygon->Value(num); |
37 | } |
38 | |
39 | Standard_Integer StepShape_PolyLoop::NbPolygon () const |
40 | { |
41 | if (polygon.IsNull()) return 0; |
42 | return polygon->Length(); |
43 | } |