7fd59977 |
1 | -- File: PPoly_Polygon2D.cdl |
2 | -- Created: Tue Oct 24 10:48:37 1995 |
3 | -- Author: Mister rmi |
4 | -- <rmi@pronox> |
5 | ---Copyright: Matra Datavision 1995 |
6 | |
7 | |
8 | class Polygon2D from PPoly inherits Persistent from Standard |
9 | |
10 | ---Purpose: This class represents a 2d polygon. |
11 | -- |
12 | -- It is defined by an array of 2d nodes values. |
13 | -- If the Polygon2D is closed, the point will be |
14 | -- repeated. |
15 | |
16 | |
17 | uses HArray1OfPnt2d from PColgp |
18 | |
19 | is |
20 | |
21 | Create(Nodes: HArray1OfPnt2d from PColgp; |
22 | Defl : Real from Standard) |
23 | returns mutable Polygon2D from PPoly; |
24 | ---Purpose: Defaults with allocation of nodes. |
25 | |
26 | Deflection(me) returns Real; |
27 | |
28 | Deflection(me : mutable; Defl : Real from Standard); |
29 | |
30 | NbNodes(me) returns Integer; |
31 | |
32 | Nodes(me) returns HArray1OfPnt2d from PColgp; |
33 | |
34 | Nodes(me : mutable; Nodes : HArray1OfPnt2d from PColgp); |
35 | |
36 | fields |
37 | |
38 | myDeflection: Real; |
39 | myNodes: HArray1OfPnt2d from PColgp; |
40 | |
41 | end Polygon2D; |