1 -- Created on: 1991-12-02
2 -- Created by: Laurent PAINNOT
3 -- Copyright (c) 1991-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
25 class MultiPointConstraint from AppDef
27 inherits MultiPoint from AppParCurves
29 ---Purpose: Describes a MultiPointConstraint used in a
30 -- Multiline. MultiPointConstraints are composed
31 -- of several two or three-dimensional points.
32 -- The purpose is to define the corresponding
33 -- points that share a common constraint in order
34 -- to compute the approximation of several lines in parallel.
36 -- - The order of points of a MultiPointConstraints is very important.
37 -- Users must give 3D points first, and then 2D points.
38 -- - The constraints for the points included in a
39 -- MultiPointConstraint are always identical for
40 -- all points, including the parameter.
41 -- - If a MultiPointConstraint is a "tangency"
42 -- point, the point is also a "passing" point.
50 Array1OfPnt from TColgp,
51 Array1OfPnt2d from TColgp,
52 Array1OfVec from TColgp,
53 Array1OfVec2d from TColgp,
54 Constraint from AppParCurves,
55 OStream from Standard,
58 raises OutOfRange from Standard,
59 ConstructionError from Standard,
60 DimensionError from Standard
66 ---Purpose: creates an undefined MultiPointConstraint.
68 returns MultiPointConstraint from AppDef;
71 Create(NbPoints, NbPoints2d: Integer)
72 ---Purpose: constructs a set of Points used to approximate a Multiline.
73 -- These Points can be of 2 or 3 dimensions.
74 -- Points will be initialized with SetPoint and SetPoint2d.
76 returns MultiPointConstraint from AppDef;
80 Create(tabP: Array1OfPnt)
81 ---Purpose: creates a MultiPoint only composed of 3D points.
83 returns MultiPointConstraint from AppDef;
86 Create(tabP: Array1OfPnt2d)
87 ---Purpose: creates a MultiPoint only composed of 2D points.
89 returns MultiPointConstraint from AppDef;
92 Create(tabP: Array1OfPnt; tabP2d: Array1OfPnt2d)
93 ---Purpose: constructs a set of Points used to approximate a Multiline.
94 -- These Points can be of 2 or 3 dimensions.
95 -- Points will be initialized with SetPoint and SetPoint2d.
97 returns MultiPointConstraint from AppDef;
101 Create(tabP: Array1OfPnt; tabP2d: Array1OfPnt2d;
102 tabVec: Array1OfVec; tabVec2d: Array1OfVec2d;
103 tabCur: Array1OfVec; tabCur2d: Array1OfVec2d)
104 ---Purpose: creates a MultiPointConstraint with a constraint of
106 -- An exception is raised if
107 -- (length of <tabP> + length of <tabP2d> ) is different
108 -- from (length of <tabVec> + length of <tabVec2d> ) or
109 -- from (length of <tabCur> + length of <tabCur2d> )
111 returns MultiPointConstraint from AppDef
112 raises ConstructionError from Standard;
116 Create(tabP: Array1OfPnt; tabP2d: Array1OfPnt2d;
117 tabVec: Array1OfVec; tabVec2d: Array1OfVec2d)
118 ---Purpose: creates a MultiPointConstraint with a constraint of
120 -- An exception is raised if
121 -- (length of <tabP> + length of <tabP2d> ) is different
122 -- from (length of <tabVec> + length of <tabVec2d> )
124 returns MultiPointConstraint from AppDef
125 raises ConstructionError from Standard;
130 Create(tabP: Array1OfPnt; tabVec: Array1OfVec; tabCur: Array1OfVec)
131 ---Purpose: creates a MultiPointConstraint only composed of 3d points
132 -- with constraints of curvature.
133 -- An exception is raised if the length of tabP is different
134 -- from the length of tabVec or from tabCur.
136 returns MultiPointConstraint from AppDef
137 raises ConstructionError;
140 Create(tabP: Array1OfPnt; tabVec: Array1OfVec)
141 ---Purpose: creates a MultiPointConstraint only composed of 3d points
142 -- with constraints of tangency.
143 -- An exception is raised if the length of tabP is different
144 -- from the length of tabVec.
146 returns MultiPointConstraint
147 raises ConstructionError;
151 Create(tabP2d: Array1OfPnt2d; tabVec2d: Array1OfVec2d)
152 ---Purpose: creates a MultiPointConstraint only composed of 2d points
153 -- with constraints of tangency.
154 -- An exception is raised if the length of tabP is different
155 -- from the length of tabVec2d.
157 returns MultiPointConstraint from AppDef
158 raises ConstructionError from Standard;
161 Create(tabP2d: Array1OfPnt2d;
162 tabVec2d: Array1OfVec2d;
163 tabCur2d: Array1OfVec2d)
164 ---Purpose: creates a MultiPointConstraint only composed of 2d points
165 -- with constraints of curvature.
166 -- An exception is raised if the length of tabP is different
167 -- from the length of tabVec2d or from tabCur2d.
169 returns MultiPointConstraint from AppDef
170 raises ConstructionError from Standard;
175 SetTang(me: in out; Index: Integer; Tang: Vec)
176 ---Purpose: sets the value of the tangency of the point of range
178 -- An exception is raised if Index <0 or if Index > number
180 -- An exception is raised if Tang has an incorrect number of
183 raises OutOfRange from Standard,
184 DimensionError from Standard
188 Tang(me; Index: Integer)
189 ---Purpose: returns the tangency value of the point of range Index.
190 -- An exception is raised if Index < 0 or if Index > number
194 raises OutOfRange from Standard
198 SetTang2d(me: in out; Index: Integer; Tang2d: Vec2d)
199 ---Purpose: sets the value of the tangency of the point of range
201 -- An exception is raised if Index <number of 3d points or if
202 -- Index > total number of Points
203 -- An exception is raised if Tang has an incorrect number of
206 raises OutOfRange from Standard,
207 DimensionError from Standard
211 Tang2d(me; Index: Integer)
212 ---Purpose: returns the tangency value of the point of range Index.
213 -- An exception is raised if Index < number of 3d points or
214 -- if Index > total number of points.
216 returns Vec2d from gp
217 raises OutOfRange from Standard
221 SetCurv(me: in out; Index: Integer; Curv: Vec)
222 ---Purpose: Vec sets the value of the normal vector at the
223 -- point of index Index. The norm of the normal
224 -- vector at the point of position Index is set to the normal curvature.
225 -- An exception is raised if Index <0 or if Index > number
227 -- An exception is raised if Curv has an incorrect number of
230 raises OutOfRange from Standard,
231 DimensionError from Standard
235 Curv(me; Index: Integer)
236 ---Purpose: returns the normal vector at the point of range Index.
237 -- An exception is raised if Index < 0 or if Index > number
241 raises OutOfRange from Standard
246 SetCurv2d(me: in out; Index: Integer; Curv2d: Vec2d)
247 ---Purpose: Vec sets the value of the normal vector at the
248 -- point of index Index. The norm of the normal
249 -- vector at the point of position Index is set to the normal curvature.
250 -- An exception is raised if Index <0 or if Index > number
252 -- An exception is raised if Curv has an incorrect number of
255 raises OutOfRange from Standard,
256 DimensionError from Standard
260 Curv2d(me; Index: Integer)
261 ---Purpose: returns the normal vector at the point of range Index.
262 -- An exception is raised if Index < 0 or if Index > number
265 returns Vec2d from gp
270 ---Purpose: returns True if the MultiPoint has a tangency value.
273 raises OutOfRange from Standard
277 ---Purpose: returns True if the MultiPoint has a curvature value.
280 raises OutOfRange from Standard
284 Dump(me; o: in out OStream)
285 ---Purpose: Prints on the stream o information on the current
286 -- state of the object.
287 -- Is used to redefine the operator <<.
295 ttabTang: TShared from MMgt;
296 ttabCurv: TShared from MMgt;
297 ttabTang2d: TShared from MMgt;
298 ttabCurv2d: TShared from MMgt;
301 end MultiPointConstraint from AppDef;