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