1 -- File: UniformAbscissa.cdl
2 -- Created: Wed Feb 27 09:57:51 1991
3 -- Author: Jean Claude Vauthier
5 ---Copyright: Matra Datavision 1991, 1992
8 class UniformAbscissa from GCPnts
11 ---Purpose: This class allows to compute a uniform distribution of points
12 -- on a curve (ie the points will all be equally distant).
15 Curve2d from Adaptor2d,
16 HArray1OfReal from TColStd
19 raises DomainError from Standard,
20 ConstructionError from Standard,
21 OutOfRange from Standard,
27 ---Purpose: creation of a indefinite UniformAbscissa
28 returns UniformAbscissa from GCPnts;
30 Create(C : in out Curve from Adaptor3d ; Abscissa : Real ; Toler : Real = -1)
31 --- Purpose : Computes a uniform abscissa distribution of points on
32 -- the Curve <C>. Parameter Toler is equal Precision::Confusion by default.
33 -- It Is used for more precise calculation of curve length
34 returns UniformAbscissa from GCPnts
35 raises ConstructionError;
37 Create(C : in out Curve from Adaptor3d ; Abscissa, U1, U2 : Real ;
39 --- Purpose : Computes a Uniform abscissa distribution of points
40 -- on a part of the Curve <C>. Parameter Toler is equal Precision::Confusion by default.
41 -- It Is used for more precise calculation of curve length
42 returns UniformAbscissa from GCPnts
43 raises ConstructionError,
46 Create(C : in out Curve from Adaptor3d ; NbPoints : Integer ;
48 --- Purpose : Computes a uniform abscissa distribution of points on
50 -- <NbPoints> defines the nomber of desired points.
51 -- Parameter Toler is equal Precision::Confusion by default.
52 -- It Is used for more precise calculation of curve length
53 returns UniformAbscissa from GCPnts
54 raises ConstructionError,
57 Create(C : in out Curve from Adaptor3d ; NbPoints : Integer; U1, U2 : Real ;
59 --- Purpose : Computes a Uniform abscissa distribution of points
60 -- on a part of the Curve <C>.
61 -- Parameter Toler is equal Precision::Confusion by default.
62 -- It Is used for more precise calculation of curve length
63 returns UniformAbscissa from GCPnts
64 raises ConstructionError,
67 Initialize(me : in out; C : in out Curve from Adaptor3d ; Abscissa : Real ;
69 ---Purpose: Initialize the algoritms with <C>, <Abscissa>, <Toler>
70 raises ConstructionError
73 Initialize(me : in out; C : in out Curve from Adaptor3d ; Abscissa, U1, U2 : Real ;
75 ---Purpose: Initialize the algoritms with <C>, <Abscissa>, <U1>,
77 raises ConstructionError,
82 Initialize(me : in out; C : in out Curve from Adaptor3d ; NbPoints : Integer ;
84 ---Purpose: Initialize the algoritms with <C>, <NbPoints>, <Toler> and
85 raises ConstructionError
89 Initialize(me : in out; C : in out Curve from Adaptor3d ; NbPoints : Integer; U1, U2 : Real ;
91 ---Purpose: Initialize the algoritms with <C>, <Abscissa>, <U1>,
93 raises ConstructionError,
97 Create(C : in out Curve2d from Adaptor2d ; Abscissa : Real ; Toler : Real = -1)
98 --- Purpose : Computes a uniform abscissa distribution of points on
100 -- Parameter Toler is equal Precision::Confusion by default.
101 -- It Is used for more precise calculation of curve length
102 returns UniformAbscissa from GCPnts
103 raises ConstructionError;
105 Create(C : in out Curve2d from Adaptor2d ; Abscissa, U1, U2 : Real ; Toler : Real = -1)
106 --- Purpose : Computes a Uniform abscissa distribution of points
107 -- on a part of the Curve2d <C>.
108 -- Parameter Toler is equal Precision::Confusion by default.
109 -- It Is used for more precise calculation of curve length
110 returns UniformAbscissa from GCPnts
111 raises ConstructionError,
114 Create(C : in out Curve2d from Adaptor2d ; NbPoints : Integer ;
116 --- Purpose : Computes a uniform abscissa distribution of points on
118 -- <NbPoints> defines the nomber of desired points.
119 -- Parameter Toler is equal Precision::Confusion by default.
120 -- It Is used for more precise calculation of curve length
121 returns UniformAbscissa from GCPnts
122 raises ConstructionError,
125 Create(C : in out Curve2d from Adaptor2d ; NbPoints : Integer; U1, U2 : Real ;
127 --- Purpose : Computes a Uniform abscissa distribution of points
128 -- on a part of the Curve2d <C>.
129 -- Parameter Toler is equal Precision::Confusion by default.
130 -- It Is used for more precise calculation of curve length
131 returns UniformAbscissa from GCPnts
132 raises ConstructionError,
135 Initialize(me : in out; C : in out Curve2d from Adaptor2d ; Abscissa : Real ; Toler : Real = -1)
136 ---Purpose: Initialize the algoritms with <C>, <Abscissa>, <Toler>
137 raises ConstructionError
140 Initialize(me : in out; C : in out Curve2d from Adaptor2d ; Abscissa, U1, U2 : Real ;
142 ---Purpose: Initialize the algoritms with <C>, <Abscissa>, <U1>,
144 raises ConstructionError,
149 Initialize(me : in out; C : in out Curve2d from Adaptor2d ; NbPoints : Integer ;
151 ---Purpose: Initialize the algoritms with <C>, <NbPoints>, <Toler> and
152 raises ConstructionError
156 Initialize(me : in out; C : in out Curve2d from Adaptor2d ; NbPoints : Integer; U1, U2 : Real ;
158 ---Purpose: Initialize the algoritms with <C>, <Abscissa>, <U1>,
160 raises ConstructionError,
165 IsDone(me) returns Boolean
170 NbPoints(me) returns Integer
174 Parameter(me; Index : Integer) returns Real
175 ---Purpose : returns the computed Parameter of index <Index>.
179 Abscissa(me) returns Real
180 ---Purpose : returne the current abscissa
181 -- ie the distance between two consecutive points
188 myNbPoints : Integer ;
189 -- stores the number of points computed with the
190 -- requested Abscissa else stores the requested
193 myParams : HArray1OfReal from TColStd ;
194 -- the size of this array will be be bigger than myNbPoints