1 -- Created on: 1991-12-02
2 -- Created by: Laurent PAINNOT
3 -- Copyright (c) 1991-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class MultiPointConstraint from AppDef
19 inherits MultiPoint from AppParCurves
21 ---Purpose: Describes a MultiPointConstraint used in a
22 -- Multiline. MultiPointConstraints are composed
23 -- of several two or three-dimensional points.
24 -- The purpose is to define the corresponding
25 -- points that share a common constraint in order
26 -- to compute the approximation of several lines in parallel.
28 -- - The order of points of a MultiPointConstraints is very important.
29 -- Users must give 3D points first, and then 2D points.
30 -- - The constraints for the points included in a
31 -- MultiPointConstraint are always identical for
32 -- all points, including the parameter.
33 -- - If a MultiPointConstraint is a "tangency"
34 -- point, the point is also a "passing" point.
42 Array1OfPnt from TColgp,
43 Array1OfPnt2d from TColgp,
44 Array1OfVec from TColgp,
45 Array1OfVec2d from TColgp,
46 Constraint from AppParCurves,
47 OStream from Standard,
50 raises OutOfRange from Standard,
51 ConstructionError from Standard,
52 DimensionError from Standard
58 ---Purpose: creates an undefined MultiPointConstraint.
60 returns MultiPointConstraint from AppDef;
63 Create(NbPoints, NbPoints2d: Integer)
64 ---Purpose: constructs a set of Points used to approximate a Multiline.
65 -- These Points can be of 2 or 3 dimensions.
66 -- Points will be initialized with SetPoint and SetPoint2d.
68 returns MultiPointConstraint from AppDef;
72 Create(tabP: Array1OfPnt)
73 ---Purpose: creates a MultiPoint only composed of 3D points.
75 returns MultiPointConstraint from AppDef;
78 Create(tabP: Array1OfPnt2d)
79 ---Purpose: creates a MultiPoint only composed of 2D points.
81 returns MultiPointConstraint from AppDef;
84 Create(tabP: Array1OfPnt; tabP2d: Array1OfPnt2d)
85 ---Purpose: constructs a set of Points used to approximate a Multiline.
86 -- These Points can be of 2 or 3 dimensions.
87 -- Points will be initialized with SetPoint and SetPoint2d.
89 returns MultiPointConstraint from AppDef;
93 Create(tabP: Array1OfPnt; tabP2d: Array1OfPnt2d;
94 tabVec: Array1OfVec; tabVec2d: Array1OfVec2d;
95 tabCur: Array1OfVec; tabCur2d: Array1OfVec2d)
96 ---Purpose: creates a MultiPointConstraint with a constraint of
98 -- An exception is raised if
99 -- (length of <tabP> + length of <tabP2d> ) is different
100 -- from (length of <tabVec> + length of <tabVec2d> ) or
101 -- from (length of <tabCur> + length of <tabCur2d> )
103 returns MultiPointConstraint from AppDef
104 raises ConstructionError from Standard;
108 Create(tabP: Array1OfPnt; tabP2d: Array1OfPnt2d;
109 tabVec: Array1OfVec; tabVec2d: Array1OfVec2d)
110 ---Purpose: creates a MultiPointConstraint with a constraint of
112 -- An exception is raised if
113 -- (length of <tabP> + length of <tabP2d> ) is different
114 -- from (length of <tabVec> + length of <tabVec2d> )
116 returns MultiPointConstraint from AppDef
117 raises ConstructionError from Standard;
122 Create(tabP: Array1OfPnt; tabVec: Array1OfVec; tabCur: Array1OfVec)
123 ---Purpose: creates a MultiPointConstraint only composed of 3d points
124 -- with constraints of curvature.
125 -- An exception is raised if the length of tabP is different
126 -- from the length of tabVec or from tabCur.
128 returns MultiPointConstraint from AppDef
129 raises ConstructionError;
132 Create(tabP: Array1OfPnt; tabVec: Array1OfVec)
133 ---Purpose: creates a MultiPointConstraint only composed of 3d points
134 -- with constraints of tangency.
135 -- An exception is raised if the length of tabP is different
136 -- from the length of tabVec.
138 returns MultiPointConstraint
139 raises ConstructionError;
143 Create(tabP2d: Array1OfPnt2d; tabVec2d: Array1OfVec2d)
144 ---Purpose: creates a MultiPointConstraint only composed of 2d points
145 -- with constraints of tangency.
146 -- An exception is raised if the length of tabP is different
147 -- from the length of tabVec2d.
149 returns MultiPointConstraint from AppDef
150 raises ConstructionError from Standard;
153 Create(tabP2d: Array1OfPnt2d;
154 tabVec2d: Array1OfVec2d;
155 tabCur2d: Array1OfVec2d)
156 ---Purpose: creates a MultiPointConstraint only composed of 2d points
157 -- with constraints of curvature.
158 -- An exception is raised if the length of tabP is different
159 -- from the length of tabVec2d or from tabCur2d.
161 returns MultiPointConstraint from AppDef
162 raises ConstructionError from Standard;
167 SetTang(me: in out; Index: Integer; Tang: Vec)
168 ---Purpose: sets the value of the tangency of the point of range
170 -- An exception is raised if Index <0 or if Index > number
172 -- An exception is raised if Tang has an incorrect number of
175 raises OutOfRange from Standard,
176 DimensionError from Standard
180 Tang(me; Index: Integer)
181 ---Purpose: returns the tangency value of the point of range Index.
182 -- An exception is raised if Index < 0 or if Index > number
186 raises OutOfRange from Standard
190 SetTang2d(me: in out; Index: Integer; Tang2d: Vec2d)
191 ---Purpose: sets the value of the tangency of the point of range
193 -- An exception is raised if Index <number of 3d points or if
194 -- Index > total number of Points
195 -- An exception is raised if Tang has an incorrect number of
198 raises OutOfRange from Standard,
199 DimensionError from Standard
203 Tang2d(me; Index: Integer)
204 ---Purpose: returns the tangency value of the point of range Index.
205 -- An exception is raised if Index < number of 3d points or
206 -- if Index > total number of points.
208 returns Vec2d from gp
209 raises OutOfRange from Standard
213 SetCurv(me: in out; Index: Integer; Curv: Vec)
214 ---Purpose: Vec sets the value of the normal vector at the
215 -- point of index Index. The norm of the normal
216 -- vector at the point of position Index is set to the normal curvature.
217 -- An exception is raised if Index <0 or if Index > number
219 -- An exception is raised if Curv has an incorrect number of
222 raises OutOfRange from Standard,
223 DimensionError from Standard
227 Curv(me; Index: Integer)
228 ---Purpose: returns the normal vector at the point of range Index.
229 -- An exception is raised if Index < 0 or if Index > number
233 raises OutOfRange from Standard
238 SetCurv2d(me: in out; Index: Integer; Curv2d: Vec2d)
239 ---Purpose: Vec sets the value of the normal vector at the
240 -- point of index Index. The norm of the normal
241 -- vector at the point of position Index is set to the normal curvature.
242 -- An exception is raised if Index <0 or if Index > number
244 -- An exception is raised if Curv has an incorrect number of
247 raises OutOfRange from Standard,
248 DimensionError from Standard
252 Curv2d(me; Index: Integer)
253 ---Purpose: returns the normal vector at the point of range Index.
254 -- An exception is raised if Index < 0 or if Index > number
257 returns Vec2d from gp
262 ---Purpose: returns True if the MultiPoint has a tangency value.
265 raises OutOfRange from Standard
269 ---Purpose: returns True if the MultiPoint has a curvature value.
272 raises OutOfRange from Standard
276 Dump(me; o: in out OStream)
277 ---Purpose: Prints on the stream o information on the current
278 -- state of the object.
279 -- Is used to redefine the operator <<.
287 ttabTang: TShared from MMgt;
288 ttabCurv: TShared from MMgt;
289 ttabTang2d: TShared from MMgt;
290 ttabCurv2d: TShared from MMgt;
293 end MultiPointConstraint from AppDef;