1 -- File: MultiPointConstraint.cdl
2 -- Created: Mon Dec 2 09:03:29 1991
3 -- Author: Laurent PAINNOT
5 ---Copyright: Matra Datavision 1991, 1992
10 class MultiPointConstraint from AppDef
12 inherits MultiPoint from AppParCurves
14 ---Purpose: Describes a MultiPointConstraint used in a
15 -- Multiline. MultiPointConstraints are composed
16 -- of several two or three-dimensional points.
17 -- The purpose is to define the corresponding
18 -- points that share a common constraint in order
19 -- to compute the approximation of several lines in parallel.
21 -- - The order of points of a MultiPointConstraints is very important.
22 -- Users must give 3D points first, and then 2D points.
23 -- - The constraints for the points included in a
24 -- MultiPointConstraint are always identical for
25 -- all points, including the parameter.
26 -- - If a MultiPointConstraint is a "tangency"
27 -- point, the point is also a "passing" point.
35 Array1OfPnt from TColgp,
36 Array1OfPnt2d from TColgp,
37 Array1OfVec from TColgp,
38 Array1OfVec2d from TColgp,
39 Constraint from AppParCurves,
40 OStream from Standard,
43 raises OutOfRange from Standard,
44 ConstructionError from Standard,
45 DimensionError from Standard
51 ---Purpose: creates an undefined MultiPointConstraint.
53 returns MultiPointConstraint from AppDef;
56 Create(NbPoints, NbPoints2d: Integer)
57 ---Purpose: constructs a set of Points used to approximate a Multiline.
58 -- These Points can be of 2 or 3 dimensions.
59 -- Points will be initialized with SetPoint and SetPoint2d.
61 returns MultiPointConstraint from AppDef;
65 Create(tabP: Array1OfPnt)
66 ---Purpose: creates a MultiPoint only composed of 3D points.
68 returns MultiPointConstraint from AppDef;
71 Create(tabP: Array1OfPnt2d)
72 ---Purpose: creates a MultiPoint only composed of 2D points.
74 returns MultiPointConstraint from AppDef;
77 Create(tabP: Array1OfPnt; tabP2d: Array1OfPnt2d)
78 ---Purpose: constructs a set of Points used to approximate a Multiline.
79 -- These Points can be of 2 or 3 dimensions.
80 -- Points will be initialized with SetPoint and SetPoint2d.
82 returns MultiPointConstraint from AppDef;
86 Create(tabP: Array1OfPnt; tabP2d: Array1OfPnt2d;
87 tabVec: Array1OfVec; tabVec2d: Array1OfVec2d;
88 tabCur: Array1OfVec; tabCur2d: Array1OfVec2d)
89 ---Purpose: creates a MultiPointConstraint with a constraint of
91 -- An exception is raised if
92 -- (length of <tabP> + length of <tabP2d> ) is different
93 -- from (length of <tabVec> + length of <tabVec2d> ) or
94 -- from (length of <tabCur> + length of <tabCur2d> )
96 returns MultiPointConstraint from AppDef
97 raises ConstructionError from Standard;
101 Create(tabP: Array1OfPnt; tabP2d: Array1OfPnt2d;
102 tabVec: Array1OfVec; tabVec2d: Array1OfVec2d)
103 ---Purpose: creates a MultiPointConstraint with a constraint of
105 -- An exception is raised if
106 -- (length of <tabP> + length of <tabP2d> ) is different
107 -- from (length of <tabVec> + length of <tabVec2d> )
109 returns MultiPointConstraint from AppDef
110 raises ConstructionError from Standard;
115 Create(tabP: Array1OfPnt; tabVec: Array1OfVec; tabCur: Array1OfVec)
116 ---Purpose: creates a MultiPointConstraint only composed of 3d points
117 -- with constraints of curvature.
118 -- An exception is raised if the length of tabP is different
119 -- from the length of tabVec or from tabCur.
121 returns MultiPointConstraint from AppDef
122 raises ConstructionError;
125 Create(tabP: Array1OfPnt; tabVec: Array1OfVec)
126 ---Purpose: creates a MultiPointConstraint only composed of 3d points
127 -- with constraints of tangency.
128 -- An exception is raised if the length of tabP is different
129 -- from the length of tabVec.
131 returns MultiPointConstraint
132 raises ConstructionError;
136 Create(tabP2d: Array1OfPnt2d; tabVec2d: Array1OfVec2d)
137 ---Purpose: creates a MultiPointConstraint only composed of 2d points
138 -- with constraints of tangency.
139 -- An exception is raised if the length of tabP is different
140 -- from the length of tabVec2d.
142 returns MultiPointConstraint from AppDef
143 raises ConstructionError from Standard;
146 Create(tabP2d: Array1OfPnt2d;
147 tabVec2d: Array1OfVec2d;
148 tabCur2d: Array1OfVec2d)
149 ---Purpose: creates a MultiPointConstraint only composed of 2d points
150 -- with constraints of curvature.
151 -- An exception is raised if the length of tabP is different
152 -- from the length of tabVec2d or from tabCur2d.
154 returns MultiPointConstraint from AppDef
155 raises ConstructionError from Standard;
160 SetTang(me: in out; Index: Integer; Tang: Vec)
161 ---Purpose: sets the value of the tangency of the point of range
163 -- An exception is raised if Index <0 or if Index > number
165 -- An exception is raised if Tang has an incorrect number of
168 raises OutOfRange from Standard,
169 DimensionError from Standard
173 Tang(me; Index: Integer)
174 ---Purpose: returns the tangency value of the point of range Index.
175 -- An exception is raised if Index < 0 or if Index > number
179 raises OutOfRange from Standard
183 SetTang2d(me: in out; Index: Integer; Tang2d: Vec2d)
184 ---Purpose: sets the value of the tangency of the point of range
186 -- An exception is raised if Index <number of 3d points or if
187 -- Index > total number of Points
188 -- An exception is raised if Tang has an incorrect number of
191 raises OutOfRange from Standard,
192 DimensionError from Standard
196 Tang2d(me; Index: Integer)
197 ---Purpose: returns the tangency value of the point of range Index.
198 -- An exception is raised if Index < number of 3d points or
199 -- if Index > total number of points.
201 returns Vec2d from gp
202 raises OutOfRange from Standard
206 SetCurv(me: in out; Index: Integer; Curv: Vec)
207 ---Purpose: Vec sets the value of the normal vector at the
208 -- point of index Index. The norm of the normal
209 -- vector at the point of position Index is set to the normal curvature.
210 -- An exception is raised if Index <0 or if Index > number
212 -- An exception is raised if Curv has an incorrect number of
215 raises OutOfRange from Standard,
216 DimensionError from Standard
220 Curv(me; Index: Integer)
221 ---Purpose: returns the normal vector at the point of range Index.
222 -- An exception is raised if Index < 0 or if Index > number
226 raises OutOfRange from Standard
231 SetCurv2d(me: in out; Index: Integer; Curv2d: Vec2d)
232 ---Purpose: Vec sets the value of the normal vector at the
233 -- point of index Index. The norm of the normal
234 -- vector at the point of position Index is set to the normal curvature.
235 -- An exception is raised if Index <0 or if Index > number
237 -- An exception is raised if Curv has an incorrect number of
240 raises OutOfRange from Standard,
241 DimensionError from Standard
245 Curv2d(me; Index: Integer)
246 ---Purpose: returns the normal vector at the point of range Index.
247 -- An exception is raised if Index < 0 or if Index > number
250 returns Vec2d from gp
255 ---Purpose: returns True if the MultiPoint has a tangency value.
258 raises OutOfRange from Standard
262 ---Purpose: returns True if the MultiPoint has a curvature value.
265 raises OutOfRange from Standard
269 Dump(me; o: in out OStream)
270 ---Purpose: Prints on the stream o information on the current
271 -- state of the object.
272 -- Is used to redefine the operator <<.
280 ttabTang: TShared from MMgt;
281 ttabCurv: TShared from MMgt;
282 ttabTang2d: TShared from MMgt;
283 ttabCurv2d: TShared from MMgt;
286 end MultiPointConstraint from AppDef;