7fd59977 |
1 | -- File: BRepAdaptor_CompCurve.cdl |
2 | -- Created: Thu Aug 20 10:53:03 1998 |
3 | -- Author: Philippe MANGIN |
4 | -- <pmn@sgi29> |
5 | ---Copyright: Matra Datavision 1998 |
6 | |
7 | |
8 | class CompCurve from BRepAdaptor |
9 | |
10 | inherits Curve from Adaptor3d |
11 | |
12 | ---Purpose: The Curve from BRepAdaptor allows to use a Wire |
13 | -- of the BRep topology like a 3D curve. |
14 | -- Warning: With this class of curve, C0 and C1 continuities |
15 | -- are not assumed. So be carful with some algorithm! |
16 | |
17 | uses |
18 | Wire from TopoDS, |
19 | Edge from TopoDS, |
20 | CurveType from GeomAbs, |
21 | Shape from GeomAbs, |
22 | HCurve from Adaptor3d, |
23 | HArray1OfCurve from BRepAdaptor, |
24 | BezierCurve from Geom, |
25 | BSplineCurve from Geom, |
26 | Array1OfReal from TColStd, |
27 | HArray1OfReal from TColStd, |
28 | Pnt from gp, |
29 | Vec from gp, |
30 | Circ from gp, |
31 | Elips from gp, |
32 | Hypr from gp, |
33 | Parab from gp, |
34 | Lin from gp |
35 | |
36 | raises |
37 | NullObject from Standard, |
38 | DomainError from Standard, |
39 | OutOfRange from Standard, |
40 | NoSuchObject from Standard |
41 | |
42 | is |
43 | Create returns CompCurve from BRepAdaptor; |
44 | ---Purpose: Creates an undefined Curve with no Wire loaded. |
45 | |
46 | Create(W : Wire from TopoDS; |
47 | KnotByCurvilinearAbcissa : Boolean = Standard_False) |
48 | returns CompCurve from BRepAdaptor; |
49 | |
50 | Create(W : Wire from TopoDS; |
51 | KnotByCurvilinearAbcissa : Boolean; |
52 | First, Last, Tol : Real) |
53 | returns CompCurve from BRepAdaptor; |
54 | ---Purpose: Creates a Curve to acces to the geometry of edge |
55 | -- <W>. |
56 | -- |
57 | |
58 | Initialize(me : in out; W : Wire from TopoDS; |
59 | KnotByCurvilinearAbcissa : Boolean) |
60 | ---Purpose: Sets the wire <W>. |
61 | |
62 | is static; |
63 | |
64 | Initialize(me : in out; W : Wire from TopoDS; |
65 | KnotByCurvilinearAbcissa : Boolean; |
66 | First, Last, Tol : Real ) |
67 | ---Purpose: Sets wire <W> and trimmed parameter. |
68 | is static; |
69 | |
70 | SetPeriodic(me: in out; Periodic : Boolean) |
71 | ---Purpose: Set the flag Periodic. |
72 | -- Warning: This method has no effect if the wire is not closed |
73 | is static; |
74 | |
75 | Wire(me) returns Wire from TopoDS |
76 | ---Purpose: Returns the wire. |
77 | -- |
78 | ---C++: return const & |
79 | is static; |
80 | |
81 | Edge(me; U : Real; |
82 | E : out Edge; |
83 | UonE : out Real) |
84 | ---Purpose: returns an edge and one parameter on them |
85 | -- corresponding to the parameter U. |
86 | is static; |
87 | |
88 | -- |
89 | -- Methods of Curve from GeomAdaptor. |
90 | -- |
91 | |
92 | FirstParameter(me) returns Real |
93 | is redefined static; |
94 | |
95 | LastParameter(me) returns Real |
96 | is redefined static; |
97 | |
98 | Continuity(me) returns Shape from GeomAbs |
99 | is redefined static; |
100 | |
101 | NbIntervals(me: in out; S : Shape from GeomAbs) returns Integer |
102 | ---Purpose: Returns the number of intervals for continuity |
103 | -- <S>. May be one if Continuity(me) >= <S> |
104 | is redefined static; |
105 | |
106 | Intervals(me: in out; T : in out Array1OfReal from TColStd; |
107 | S : Shape from GeomAbs) |
108 | ---Purpose: Stores in <T> the parameters bounding the intervals |
109 | -- of continuity <S>. |
110 | -- |
111 | -- The array must provide enough room to accomodate |
112 | -- for the parameters. i.e. T.Length() > NbIntervals() |
113 | raises |
114 | OutOfRange from Standard |
115 | is redefined static; |
116 | |
117 | Trim(me; First, Last, Tol : Real) returns HCurve from Adaptor3d |
118 | ---Purpose: Returns a curve equivalent of <me> between |
119 | -- parameters <First> and <Last>. <Tol> is used to |
120 | -- test for 3d points confusion. |
121 | raises |
122 | OutOfRange from Standard |
123 | ---Purpose: If <First> >= <Last> |
124 | is redefined static; |
125 | |
126 | IsClosed(me) returns Boolean |
127 | is redefined static; |
128 | |
129 | IsPeriodic(me) returns Boolean |
130 | is redefined static; |
131 | |
132 | Period(me) returns Real |
133 | raises |
134 | DomainError from Standard -- if the curve is not periodic |
135 | is redefined static; |
136 | |
137 | |
138 | Value(me; U : Real) returns Pnt from gp |
139 | --- Purpose : Computes the point of parameter U on the curve |
140 | is redefined static; |
141 | |
142 | D0 (me; U : Real; P : out Pnt from gp) |
143 | --- Purpose : Computes the point of parameter U. |
144 | is redefined static; |
145 | |
146 | D1 (me; U : Real; P : out Pnt from gp ; V : out Vec from gp) |
147 | --- Purpose : Computes the point of parameter U on the curve |
148 | -- with its first derivative. |
149 | |
150 | raises |
151 | DomainError from Standard |
152 | --- Purpose : Raised if the continuity of the current interval |
153 | -- is not C1. |
154 | is redefined static; |
155 | |
156 | D2 (me; U : Real; P : out Pnt from gp; V1, V2 : out Vec from gp) |
157 | --- Purpose : |
158 | -- Returns the point P of parameter U, the first and second |
159 | -- derivatives V1 and V2. |
160 | raises |
161 | DomainError from Standard |
162 | --- Purpose : Raised if the continuity of the current interval |
163 | -- is not C2. |
164 | is redefined static; |
165 | |
166 | D3 (me; U : Real; P : out Pnt from gp; V1, V2, V3 : out Vec from gp) |
167 | --- Purpose : |
168 | -- Returns the point P of parameter U, the first, the second |
169 | -- and the third derivative. |
170 | raises |
171 | DomainError from Standard |
172 | --- Purpose : Raised if the continuity of the current interval |
173 | -- is not C3. |
174 | is redefined static; |
175 | |
176 | DN (me; U : Real; N : Integer) returns Vec from gp |
177 | --- Purpose : |
178 | -- The returned vector gives the value of the derivative for the |
179 | -- order of derivation N. |
180 | raises |
181 | DomainError from Standard, |
182 | --- Purpose : Raised if the continuity of the current interval |
183 | -- is not CN. |
184 | OutOfRange from Standard |
185 | --- Purpose : Raised if N < 1. |
186 | is redefined static; |
187 | |
188 | |
189 | Resolution(me; R3d :Real) returns Real |
190 | ---Purpose : returns the parametric resolution |
191 | is redefined static; |
192 | |
193 | |
194 | GetType(me) returns CurveType from GeomAbs |
195 | is redefined static; |
196 | |
197 | Line(me) returns Lin from gp |
198 | raises NoSuchObject from Standard |
199 | is redefined static; |
200 | |
201 | Circle(me) returns Circ from gp |
202 | raises NoSuchObject from Standard |
203 | is redefined static; |
204 | |
205 | Ellipse(me) returns Elips from gp |
206 | raises NoSuchObject from Standard |
207 | is redefined static; |
208 | |
209 | Hyperbola(me) returns Hypr from gp |
210 | raises NoSuchObject from Standard |
211 | is redefined static; |
212 | |
213 | Parabola(me) returns Parab from gp |
214 | raises NoSuchObject from Standard |
215 | is redefined static; |
216 | |
217 | |
218 | Degree(me) returns Integer |
219 | raises NoSuchObject from Standard |
220 | is redefined static; |
221 | |
222 | IsRational(me) returns Boolean |
223 | raises |
224 | NoSuchObject from Standard |
225 | is redefined static; |
226 | |
227 | NbPoles(me) returns Integer |
228 | raises NoSuchObject from Standard |
229 | is redefined static; |
230 | |
231 | NbKnots(me) returns Integer |
232 | raises |
233 | NoSuchObject from Standard |
234 | is redefined static; |
235 | |
236 | |
237 | Bezier(me) returns BezierCurve from Geom |
238 | ---Warning : |
239 | -- This will make a copy of the Bezier Curve . |
240 | -- Be carefull when using this method |
241 | raises |
242 | NoSuchObject from Standard |
243 | is redefined static; |
244 | |
245 | BSpline(me) returns BSplineCurve from Geom |
246 | ---Warning : This will make a copy of the BSpline Curve. Be |
247 | -- carefull when using this method |
248 | |
249 | raises |
250 | NoSuchObject from Standard |
251 | is redefined static; |
252 | |
253 | Prepare(me; W, D: in out Real; ind : in out Integer) |
254 | is private; |
255 | |
256 | InvPrepare(me; ind : Integer; F, D: in out Real) |
257 | is private; |
258 | |
259 | fields |
260 | myWire : Wire from TopoDS; |
261 | TFirst, TLast, PTol, myPeriod : Real; |
262 | myCurves : HArray1OfCurve from BRepAdaptor; |
263 | myKnots : HArray1OfReal from TColStd; |
264 | CurIndex : Integer; |
265 | Forward : Boolean; |
266 | IsbyAC : Boolean; |
267 | Periodic : Boolean; |
268 | end CompCurve; |