f8295ecf197447fdb184975b80d2be958fac6b68
[occt.git] / src / AppDef / AppDef_MultiLine.cdl
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
5 --
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.
10 --
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.
13 --
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.
20
21
22
23
24
25
26 class MultiLine from AppDef
27
28
29     ---Purpose: This class describes the organized set of points used in the
30     --          approximations. A MultiLine is composed of n 
31     --          MultiPointConstraints. 
32     --          The approximation of the MultiLine will be done in the order 
33     --          of the given n MultiPointConstraints. 
34     --
35     --
36     --      Example of a MultiLine composed of MultiPointConstraints:
37     -- 
38     --      P1______P2_____P3______P4________........_____PNbMult
39     --
40     --      Q1______Q2_____Q3______Q4________........_____QNbMult
41     --      .                                               .
42     --      .                                               .
43     --      .                                               .
44     --      R1______R2_____R3______R4________........_____RNbMult
45     --
46     --     
47     --      Pi, Qi, ..., Ri are points of dimension 2 or 3.
48     --      
49     --      (P1, Q1, ...R1), ...(Pn, Qn, ...Rn) n= 1,...NbMult are 
50     --      MultiPointConstraints.
51     --      There are NbPoints points in each MultiPointConstraint.
52
53
54
55 uses MultiPointConstraint              from AppDef,
56      HArray1OfMultiPointConstraint     from AppDef,
57      Array1OfMultiPointConstraint      from AppDef,
58      Array1OfPnt                       from TColgp,
59      Array1OfPnt2d                     from TColgp,
60      OStream                           from Standard
61
62
63 raises ConstructionError from Standard,
64        DimensionError    from Standard,
65        OutOfRange        from Standard
66
67 is
68
69
70     Create
71         ---Purpose: creates an undefined MultiLine.
72
73     returns MultiLine from AppDef;
74
75
76     Create(NbMult: Integer)
77         ---Purpose: given the number NbMult of MultiPointConstraints of this 
78         --          MultiLine , it initializes all the fields.SetValue must be
79         --  called in order for the values of the multipoint
80         --  constraint to be taken into account.
81         --          An exception is raised if NbMult < 0.
82     
83     returns MultiLine from AppDef
84     raises ConstructionError from Standard;
85     
86
87     Create(tabMultiP: Array1OfMultiPointConstraint)
88         ---Purpose: Constructs a MultiLine with an array of MultiPointConstraints.
89
90     returns MultiLine from AppDef
91     raises ConstructionError from Standard;
92     
93     
94     Create(tabP3d: Array1OfPnt)
95         ---Purpose: The MultiLine constructed will have one line of 
96         --          3d points without their tangencies.
97
98     returns MultiLine from AppDef
99     raises ConstructionError from Standard;
100
101     
102     Create(tabP2d: Array1OfPnt2d)
103         ---Purpose: The MultiLine constructed will have one line of 
104         --          2d points without their tangencies.
105
106     returns MultiLine from AppDef
107     raises ConstructionError from Standard;
108             
109     
110     NbMultiPoints(me)
111         ---Purpose: returns the number of MultiPointConstraints of the 
112         --          MultiLine.
113
114     returns Integer
115     is static;
116
117     
118     NbPoints(me)
119         ---Purpose: returns the number of Points from MultiPoints composing
120         --          the MultiLine.
121
122     returns Integer
123     is static;
124     
125     
126     SetParameter(me: in out; Index: Integer; U: Real)
127         ---Purpose: Sets the value of the parameter for the
128         -- MultiPointConstraint at position Index.
129         -- Exceptions
130         -- -   Standard_OutOfRange if Index is less
131         --   than 0 or Index is greater than the number
132         --   of Multipoint constraints in the MultiLine.
133     raises OutOfRange from Standard
134     is static;
135     
136     
137     SetValue(me: in out; Index: Integer; MPoint: MultiPointConstraint)
138         ---Purpose: It sets the MultiPointConstraint of range Index to the 
139         --          value MPoint.
140         --          An exception is raised if Index < 0 or Index> MPoint.
141         --          An exception is raised if the dimensions of the 
142         --          MultiPoints are different.
143
144     raises OutOfRange from Standard,
145            DimensionError from Standard
146     is static;
147
148
149     Value(me; Index: Integer)
150         ---Purpose: returns the MultiPointConstraint of range Index
151         --          An exception is raised if Index<0 or Index>MPoint.
152
153     returns MultiPointConstraint from AppDef
154     raises OutOfRange from Standard
155     is static;
156
157
158     Dump(me; o: in out OStream)
159         ---Purpose: Prints on the stream o information on the current 
160         --          state of the object.
161         --          Is used to redefine the operator <<.
162
163     is static;
164
165     
166 fields
167
168 tabMult: HArray1OfMultiPointConstraint from AppDef is protected;
169
170 end MultiLine from AppDef;