1 -- File: Poly_Polygon3D.cdl
2 -- Created: Tue Mar 7 11:19:36 1995
3 -- Author: Laurent PAINNOT
5 ---Copyright: Matra Datavision 1995
8 class Polygon3D from Poly inherits TShared from MMgt
10 ---Purpose: This class Provides a polygon in 3D space. It is generally an approximate representation of a curve.
11 -- A Polygon3D is defined by a table of nodes. Each node is
12 -- a 3D point. If the polygon is closed, the point of closure is
13 -- repeated at the end of the table of nodes.
14 -- If the polygon is an approximate representation of a curve,
15 -- you can associate with each of its nodes the value of the
16 -- parameter of the corresponding point on the curve.
18 uses Array1OfPnt from TColgp,
19 Array1OfReal from TColStd,
20 HArray1OfReal from TColStd
22 raises NullObject from Standard
26 Create(Nodes: Array1OfPnt from TColgp)
27 returns mutable Polygon3D from Poly;
28 ---Purpose: onstructs a 3D polygon defined by the table of points, Nodes.
30 Create(Nodes: Array1OfPnt from TColgp;
31 Parameters: Array1OfReal from TColStd)
32 returns mutable Polygon3D from Poly;
33 ---Purpose: Constructs a 3D polygon defined by
34 -- the table of points, Nodes, and the parallel table of
35 -- parameters, Parameters, where each value of the table
36 -- Parameters is the parameter of the corresponding point
37 -- on the curve approximated by the constructed polygon.
39 -- Both the Nodes and Parameters tables must have the
40 -- same bounds. This property is not checked at construction time.
42 Deflection(me) returns Real;
43 ---Purpose: Returns the deflection of this polygon
44 Deflection(me : mutable; D : Real);
45 ---Purpose: Sets the deflection of this polygon to D. See more on deflection in Poly_Polygon2D
47 NbNodes(me) returns Integer;
48 ---Purpose: Returns the number of nodes in this polygon.
49 -- Note: If the polygon is closed, the point of closure is
50 -- repeated at the end of its table of nodes. Thus, on a closed
51 -- triangle the function NbNodes returns 4.
54 Nodes(me) returns Array1OfPnt from TColgp
55 ---Purpose: Returns the table of nodes for this polygon.
56 ---C++: return const &
57 raises NullObject from Standard;
60 HasParameters(me) returns Boolean from Standard;
61 ---Purpose: Returns the table of the parameters associated with each node in this polygon.
62 -- HasParameters function checks if parameters are associated with the nodes of this polygon.
64 Parameters(me) returns Array1OfReal from TColStd
65 ---Purpose: Returns true if parameters are associated with the nodes
67 ---C++: return const &
68 raises NullObject from Standard;
70 ChangeParameters(me) returns Array1OfReal from TColStd
71 ---Purpose: Returns the table of the parameters associated with each node in this polygon.
72 -- ChangeParameters function returnes the array as shared. Therefore if the table is selected by
73 -- reference you can, by simply modifying it, directly modify
74 -- the data structure of this polygon.
76 raises NullObject from Standard;
82 myDeflection: Real from Standard;
83 myNodes: Array1OfPnt from TColgp;
84 myParameters: HArray1OfReal from TColStd;