0024722: Move functionality of WOK command wgendoc to OCCT tool gendoc
[occt.git] / dox / user_guides / brep_wp / brep_wp.md
CommitLineData
ba06f8bb 1 BRep Format {#occt_user_guides__brep_wp}
bf62b306 2========================
3
4@tableofcontents
5
6@section occt_brep_format_1 Introduction
7
8 BREP format is used to store 3D models and allows to store a model which consists
9 of vertices, edges, wires, faces, shells, solids, compsolids, compounds, edge triangulations,
10 face triangulations, polylines on triangulations, space location and orientation.
11 Any set of such models may be stored as a single model which is a compound of the models.
12
13 The format is described in an order which is convenient for understanding
14 rather than in the order the format parts follow each other.
15 BNF-like definitions are used in this document.
16 Most of the chapters contain BREP format descriptions in the following order:
17
18 * format file fragment to illustrate the part;
19 * BNF-like definition of the part;
20 * detailed description of the part.
dd21889e 21
22**Note** that the format is a part of Open CASCADE Technology (OCCT).
23
24Some data fields of the format have additional values, which are used in OCCT.
25
26Some data fields of the format are specific for OCCT.
bf62b306 27
28@section occt_brep_format_2 Format Common Structure
29
30 ASCII encoding is used to read/write BREP format from/to file. The format data are stored in a file as text data.
31
32 BREP format uses the following BNF terms:
33
dd21889e 34 * \<\\n\>: It is the operating-system-dependent ASCII character sequence which separates ASCII text strings in the operating system used;
35 * \<_\\n\>: = " "*\<\\n\>;
36 * \<_\>: = " "+; It is a not empty sequence of space characters with ASCII code 21h;
37 * \<flag\>: = "0" | "1";
38 * \<int\>: It is an integer number from -2<sup>31</sup> to 2<sup>31</sup>-1 which is written in denary system;
39 * \<real\>: It is a real from -1.7976931348623158 @f$\cdot@f$ 10<sup>308</sup> to 1.7976931348623158 @f$\cdot@f$ 10<sup>308</sup> which is written in decimal or E form with base 10.The point is used as a delimiter of the integer and fractional parts;
40 * \<2D point\>: = \<real\>\<_\>\<real\>;
41 * \<3D point\>: = \<real\>(\<_\>\<real)\><sup>2</sup>;
42 * \<2D direction\>: It is a \<2D point\> *x y* so that *x<sup>2</sup> + y<sup>2</sup>* = 1;
43 * \<3D direction\>: It is a \<3D point\> *x y z* so that *x<sup>2</sup> + y<sup>2</sup> + z<sup>2</sup>* = 1;
44 * \<+\>: It is an arithmetic operation of addition.
45
bf62b306 46 The format consists of the following sections:
47
dd21889e 48 * \<content type\>;
49 * \<version\>;
50 * \<locations\>;
51 * \<geometry\>;
52 * \<shapes\>.
bf62b306 53
dd21889e 54 \<content type\> = "DBRep_DrawableShape" \<_\\n\>\<_\\n\>;
55 \<content type\> have other values [1].
bf62b306 56
dd21889e 57 \<version\> = ("CASCADE Topology V1, (c) Matra-Datavision" | "CASCADE Topology V2, (c) Matra-Datavision")\<_\\n\>;
bf62b306 58 The difference of the versions is described in the document.
59
dd21889e 60 Sections \<locations\>, \<geometry\> and \<shapes\> are described below in separate chapters of the document.
bf62b306 61
dd21889e 62@section occt_brep_format_3 Locations
bf62b306 63
64**Example**
65
66@verbatim
67 Locations 3
68 1
69               0               0               1               0
70               1               0               0               0
71               0               1               0               0
72 1
73               1               0               0               4
74               0               1               0               5
75               0               0               1               6
76 2  1 1 2 1 0
77@endverbatim
78
79**BNF-like Definition**
80
81@verbatim
dd21889e 82 <locations> = <location header> <_\n> <location records>;
83 <location header> = "Locations" <_> <location record count>;
84 <location record count> = <int>;
85 <location records> = <location record> ^ <location record count>;
86 <location record> = <location record 1> | <location record 2>;
87 <location record 1> = "1" <_\n> <location data 1>;
88 <location record 2> = "2" <_> <location data 2>;
89 <location data 1> = ((<_> <real>) ^ 4 <_\n>) ^ 3;
90 <location data 2> = (<int> <_> <int> <_>)* "0" <_\n>;
bf62b306 91@endverbatim
92
dd21889e 93**Description**
bf62b306 94
dd21889e 95\<location data 1\> is interpreted as a 3 x 4 matrix
96@f$Q =
97\begin{pmatrix}
98{q}_{1,1} &{q}_{1,2} &{q}_{1,3} &{q}_{1,4}\\
99{q}_{2,1} &{q}_{2,2} &{q}_{2,3} &{q}_{2,4}\\
100{q}_{3,1} &{q}_{3,2} &{q}_{3,3} &{q}_{3,4}
101\end{pmatrix}@f$ 
bf62b306 102which describes transformation of 3 dimensional space and satisfies the following constraints:
dd21889e 103 * @f$ d \neq 0@f$ where @f$d = |Q_{2}|@f$ where
104 @f$ Q_{2} = \begin{pmatrix}
105 {q}_{1,1} &{q}_{1,2} &{q}_{1,3} &{q}_{1,4}\\
106 {q}_{2,1} &{q}_{2,2} &{q}_{2,3} &{q}_{2,4}\\
107 {q}_{3,1} &{q}_{3,2} &{q}_{3,3} &{q}_{3,4}
108 \end{pmatrix}; @f$
109 * @f$ Q_{3}^{T} = Q_{3}^{-1}@f$ where @f$Q_{3} = Q_{2}/d^{1/3}. @f$
110
111The transformation transforms a point (x, y, z) to another point (u, v, w) by the rule:
112@f[ \begin{pmatrix}
113u \\ v \\ w
114\end{pmatrix} =
115Q\cdot(x\;y\;z\;1)^{T} =
116\begin{pmatrix}
117{q}_{1,1}\cdot x +{q}_{1,2}\cdot y +{q}_{1,3}\cdot z +{q}_{1,4}\\
118{q}_{2,1}\cdot x +{q}_{2,2}\cdot y +{q}_{2,3}\cdot z +{q}_{2,4}\\
119{q}_{3,1}\cdot x +{q}_{3,2}\cdot y +{q}_{3,3}\cdot z +{q}_{3,4}
120\end{pmatrix} . @f]
121
122*Q* may be a composition of matrices for the following elementary transformations:
123
124 * parallel translation –
125 @f$ \begin{pmatrix}
126 1 &0 &0 &{q}_{1,4}\\
127 0 &1 &0 &{q}_{2,4}\\
128 0 &0 &1 &{q}_{3,4}
129 \end{pmatrix}; @f$
130 * rotation around an axis with a direction *D(D<sub>x</sub>, D<sub>y</sub>, D<sub>z</sub>)* by an angle @f$ \varphi @f$ –
131
132 @f[ \begin{pmatrix}
133 D_{x}^{2} \cdot (1-cos(\varphi)) + cos(\varphi) &D_{x} \cdot D_{y} \cdot (1-cos(\varphi)) - D_{z} \cdot sin(\varphi) &D_{x} \cdot D_{z} \cdot (1-cos(\varphi)) + D_{y} \cdot sin(\varphi) &0\\
134 D_{x} \cdot D_{y} \cdot (1-cos(\varphi)) + D_{z} \cdot sin(\varphi) &D_{y}^{2} \cdot (1-cos(\varphi)) + cos(\varphi) &D_{y} \cdot D_{z} \cdot (1-cos(\varphi)) - D_{x} \cdot sin(\varphi) &0\\
135 D_{x} \cdot D_{z} \cdot (1-cos(\varphi)) - D_{y} \cdot sin(\varphi) &D_{y} \cdot D_{z} \cdot (1-cos(\varphi)) + D_{x} \cdot sin(\varphi) &D_{z}^{2} \cdot (1-cos(\varphi)) + cos(\varphi) &0
136 \end{pmatrix}; @f]
137
138 * scaling – @f$ \begin{pmatrix} s &0 &0 &0\\ 0 &s &0 &0\\ 0 &0 &s &0 \end{pmatrix} @f$ where @f$ S \in (-\infty,\; \infty)/\left \{ 0 \right \}; @f$
139 * central symmetry – @f$ \begin{pmatrix} -1 &0 &0 &0\\ 0 &-1 &0 &0\\ 0 &0 &-1 &0 \end{pmatrix}; @f$
140 * axis symmetry – @f$ \begin{pmatrix} -1 &0 &0 &0\\ 0 &-1 &0 &0\\ 0 &0 &1 &0 \end{pmatrix}; @f$
141 * plane symmetry – @f$ \begin{pmatrix} 1 &0 &0 &0\\ 0 &1 &0 &0\\ 0 &0 &-1 &0 \end{pmatrix}. @f$
142
143\<location data 2\> is interpreted as a composition of locations raised to a power and placed above this \<location data 2\> in the section \<locations\>. \<location data 2\> is a sequence @f$l_{1}p_{1} ... l_{n}p_{n}@f$ of @f$ n \geq 0 @f$ integer pairs @f$ l_{i}p_{i} \; (1 \leq i \leq n) @f$. \<flag\> 0 is the indicator of the sequence end. The sequence is interpreted as a composition @f$ L_{l_{1}}^{p_{1}} \cdot ... \cdot L_{l_{n}}^{p_{n}} @f$ where @f$ L_{l_{i}} @f$ is a location from @f$ l_{i} @f$-th \<location record\> in the section locations. \<location record\> numbering starts from 1.
144
145
146@section occt_brep_format_4 Geometry
147
148@verbatim
149 <geometry> =
150 <2D curves>
151 <3D curves>
152 <3D polygons>
153 <polygons on triangulations>
154 <surfaces>
155 <triangulations>;
bf62b306 156@endverbatim
157
dd21889e 158@subsection occt_brep_format_4_1 3D curves
bf62b306 159
160**Example**
161
162@verbatim
163 Curves 13
164 1 0 0 0 0 0 1
165 1 0 0 3 -0 1 0
166 1 0 2 0 0 0 1
167 1 0 0 0 -0 1 0
168 1 1 0 0 0 0 1
169 1 1 0 3 0 1 0
170 1 1 2 0 0 0 1
171 1 1 0 0 -0 1 0
172 1 0 0 0 1 0 -0
173 1 0 0 3 1 0 -0
174 1 0 2 0 1 0 -0
175 1 0 2 3 1 0 -0
176 1 1 0 0 1 0 0
177@endverbatim
178
179**BNF-like Definition**
180
181@verbatim
dd21889e 182 <3D curves> = <3D curve header> <_\n> <3D curve records>;
bf62b306 183
dd21889e 184 <3D curve header> = "Curves" <_> <3D curve count>;
bf62b306 185
dd21889e 186 <3D curve count> = <int>;
bf62b306 187
dd21889e 188 <3D curve records> = <3D curve record> ^ <3D curve count>;
bf62b306 189
dd21889e 190 <3D curve record> =
191 <3D curve record 1> |
192 <3D curve record 2> |
193 <3D curve record 3> |
194 <3D curve record 4> |
195 <3D curve record 5> |
196 <3D curve record 6> |
197 <3D curve record 7> |
198 <3D curve record 8> |
199 <3D curve record 9>;
200 @endverbatim
bf62b306 201
dd21889e 202@subsubsection occt_brep_format_4_1_1 Line - \<3D curve record 1\>
bf62b306 203
204**Example**
205
206@verbatim
207 1 1 0 3 0 1 0
208@endverbatim
209
210**BNF-like Definition**
211
212@verbatim
dd21889e 213 <3D curve record 1> = "1" <_> <3D point> <_> <3D direction> <_\n>;
bf62b306 214@endverbatim
215
216**Description**
217
dd21889e 218\<3D curve record 1\> describes a line. The line data consist of a 3D point *P* and a 3D direction *D*. The line passes through the point *P*, has the direction *D* and is defined by the following parametric equation:
bf62b306 219
dd21889e 220@f[ C(u)=P+u \cdot D, \; u \in (-\infty,\; \infty). @f]
bf62b306 221
dd21889e 222The example record is interpreted as a line which passes through a point *P*=(1, 0, 3), has a direction *D*=(0, 1, 0) and is defined by the following parametric equation: @f$ C(u)=(1,0,3)+u \cdot (0,1,0) @f$.
bf62b306 223
224
dd21889e 225@subsubsection occt_brep_format_4_1_2 Circle - \<3D curve record 2\>
bf62b306 226
227**Example**
228
229@verbatim
230 2 1 2 3 0 0 1 1 0 -0 -0 1 0 4
231@endverbatim
232
233**BNF-like Definition**
234
235@verbatim
dd21889e 236 <3D curve record 2> = "2" <_> <3D circle center> <_> <3D circle N> <_> <3D circle Dx> <_> <3D circle Dy> <_> <3D circle radius> <_\n>;
bf62b306 237
dd21889e 238 <3D circle center> = <3D point>;
bf62b306 239
dd21889e 240 <3D circle N> = <3D direction>;
bf62b306 241
dd21889e 242 <3D circle Dx> = <3D direction>;
bf62b306 243
dd21889e 244 <3D circle Dy> = <3D direction>;
bf62b306 245
dd21889e 246 <3D circle radius> = <real>;
bf62b306 247@endverbatim
248
249**Description**
250
dd21889e 251\<3D curve record 2\> describes a circle. The circle data consist of a 3D point *P*, pairwise orthogonal 3D directions *N*, *D<sub>x</sub>* and *D<sub>y</sub>* and a non-negative real *r*. The circle has a center *P* and is located in a plane with a normal *N*. The circle has a radius *r* and is defined by the following parametric equation:
bf62b306 252
dd21889e 253@f[ C(u)=P+r \cdot (cos(u) \cdot D_{x} + sin(u) \cdot D_{y}), \; u \in [o,\;2 \cdot \pi). @f]
bf62b306 254
dd21889e 255The example record is interpreted as a circle which has its center *P*=(1, 2, 3), is located in plane with a normal *N*=(0, 0 ,1). Directions for the circle are *D<sub>x</sub>*=(1, 0 ,0) and *D<sub>y</sub>*=(0, 1 ,0). The circle has a radius *r*=4 and is defined by the following parametric equation: @f$ C(u) = (1,2,3) + 4 \cdot ( cos(u) \cdot(1,0,0) + sin(u) \cdot (0,1,0) ) @f$.
bf62b306 256
257
dd21889e 258@subsubsection occt_brep_format_4_1_3 Ellipse - \<3D curve record 3\>
bf62b306 259
260**Example**
261
262@verbatim
263 3 1 2 3 0 0 1 1 0 -0 -0 1 0 5 4
264@endverbatim
265
266**BNF-like Definition**
267
268@verbatim
dd21889e 269 <3D curve record 3> = "3" <_> <3D ellipse center> <_> <3D ellipse N> <_> <3D ellipse Dmaj> <_> <3D ellipse Dmin> <_> <3D ellipse Rmaj> <_> <3D ellipse Rmin> <_\n>;
bf62b306 270
dd21889e 271 <3D ellipse center> = <3D point>;
bf62b306 272
dd21889e 273 <3D ellipse N> = <3D direction>;
bf62b306 274
dd21889e 275 <3D ellipse Dmaj> = <3D direction>;
bf62b306 276
dd21889e 277 <3D ellipse Dmin> = <3D direction>;
bf62b306 278
dd21889e 279 <3D ellipse Rmaj> = <real>;
bf62b306 280
dd21889e 281 <3D ellipse Rmin> = <real>;
bf62b306 282@endverbatim
283
284**Description**
285
dd21889e 286\<3D curve record 3\> describes an ellipse. The ellipse data consist of a 3D point *P*, pairwise orthogonal 3D directions *N*, *D<sub>maj</sub>* and *D<sub>min</sub>* and non-negative reals *r<sub>maj</sub>* and *r<sub>min</sub>* so that *r<sub>min</sub>* @f$ \leq @f$ *r<sub>maj</sub>*. The ellipse has its center *P*, is located in plane with the normal *N*, has major and minor axis directions *D<sub>maj</sub>* and *D<sub>min</sub>*, major and minor radii *r<sub>maj</sub>* and *r<sub>min</sub>* and is defined by the following parametric equation:
bf62b306 287
dd21889e 288@f[ C(u)=P+r_{maj} \cdot cos(u) \cdot D_{maj} + r_{min} \cdot sin(u) \cdot D_{min}, u \in [0, 2 \cdot \pi). @f]
bf62b306 289
dd21889e 290The example record is interpreted as an ellipse which has its center *P*=(1, 2, 3), is located in plane with a normal *N*=(0, 0, 1), has major and minor axis directions *D<sub>maj</sub>*=(1, 0, 0) and *D<sub>min</sub>*=(0, 1, 0), major and minor radii *r<sub>maj</sub>*=5 and *r<sub>min</sub>*=4 and is defined by the following parametric equation: @f$ C(u) = (1,2,3) + 5 \cdot cos(u) \cdot(1,0,0) + 4 \cdot sin(u) \cdot (0,1,0) @f$.
bf62b306 291
292
dd21889e 293@subsubsection occt_brep_format_4_1_4 Parabola - \<3D curve record 4\>
bf62b306 294
295**Example**
296
297@verbatim
298 4 1 2 3 0 0 1 1 0 -0 -0 1 0 16
299@endverbatim
300
301**BNF-like Definition**
302
303@verbatim
dd21889e 304 <3D curve record 4> = "4" <_> <3D parabola origin> <_> <3D parabola N> <_> <3D parabola Dx> <_> <3D parabola Dy> <_> <3D parabola focal length> <_\n>;
bf62b306 305
dd21889e 306 <3D parabola origin> = <3D point>;
bf62b306 307
dd21889e 308 <3D parabola N> = <3D direction>;
bf62b306 309
dd21889e 310 <3D parabola Dx> = <3D direction>;
bf62b306 311
dd21889e 312 <3D parabola Dy> = <3D direction>;
bf62b306 313
dd21889e 314 <3D parabola focal length> = <real>;
bf62b306 315@endverbatim
316
317**Description**
318
dd21889e 319\<3D curve record 4\> describes a parabola. The parabola data consist of a 3D point *P*, pairwise orthogonal 3D directions *N*, *D<sub>x</sub>* and *D<sub>y</sub>* and a non-negative real *f*. The parabola is located in plane which passes through the point *P* and has the normal *N*. The parabola has a focus length *f* and is defined by the following parametric equation:
bf62b306 320
dd21889e 321@f[ C(u)=P+\frac{u^{2}}{4 \cdot f} \cdot D_{x} + u \cdot D_{y}, u \in (-\infty,\; \infty) \Leftarrow f \neq 0; @f]
322@f[ C(u)=P+u \cdot D_{x}, u \in (-\infty,\; \infty) \Leftarrow f = 0\;(degenerated\;case). @f]
bf62b306 323
dd21889e 324The example record is interpreted as a parabola in plane which passes through a point *P*=(1, 2, 3) and has a normal *N*=(0, 0, 1). Directions for the parabola are *D<sub>x</sub>*=(1, 0, 0) and *D<sub>y</sub>*=(0, 1, 0). The parabola has a focus length *f*=16 and is defined by the following parametric equation: @f$ C(u) = (1,2,3) + \frac{u^{2}}{64} \cdot (1,0,0) + u \cdot (0,1,0) @f$.
bf62b306 325
326
dd21889e 327@subsubsection occt_brep_format_4_1_5 Hyperbola - \<3D curve record 5\>
bf62b306 328
329**Example**
330
331@verbatim
332 5 1 2 3 0 0 1 1 0 -0 -0 1 0 5 4
dd21889e 333@endverbatim
bf62b306 334
335**BNF-like Definition**
336
337@verbatim
dd21889e 338 <3D curve record 5> = "5" <_> <3D hyperbola origin> <_> <3D hyperbola N> <_> <3D hyperbola Dx> <_> <3D hyperbola Dy> <_> <3D hyperbola Kx> <_> <3D hyperbola Ky> <_\n>;
bf62b306 339
dd21889e 340 <3D hyperbola origin> = <3D point>;
bf62b306 341
dd21889e 342 <3D hyperbola N> = <3D direction>;
bf62b306 343
dd21889e 344 <3D hyperbola Dx> = <3D direction>;
bf62b306 345
dd21889e 346 <3D hyperbola Dy> = <3D direction>;
bf62b306 347
dd21889e 348 <3D hyperbola Kx> = <real>;
bf62b306 349
dd21889e 350 <3D hyperbola Ky> = <real>;
bf62b306 351@endverbatim
352
dd21889e 353**Descripton**
bf62b306 354
dd21889e 355\<3D curve record 5\> describes a hyperbola. The hyperbola data consist of a 3D point *P*, pairwise orthogonal 3D directions *N*, *D<sub>x</sub>* and *D<sub>y</sub>* and non-negative reals *k<sub>x</sub>* and *k<sub>y</sub>*. The hyperbola is located in plane which passes through the point *P* and has the normal *N*. The hyperbola is defined by the following parametric equation:
bf62b306 356
dd21889e 357@f[ C(u)=P+k_{x} \cdot cosh(u) \cdot D_{x}+k_{y} \cdot sinh(u) \cdot D_{y} , u \in (-\infty,\; \infty). @f]
bf62b306 358
dd21889e 359The example record is interpreted as a hyperbola in plane which passes through a point *P*=(1, 2, 3) and has a normal *N*=(0, 0, 1). Other hyperbola data are *D<sub>x</sub>*=(1, 0, 0), *D<sub>y</sub>*=(0, 1, 0), *k<sub>x</sub>*=5 and *k<sub>y</sub>*=4. The hyperbola is defined by the following parametric equation: @f$ C(u) = (1,2,3) + 5 \cdot cosh(u) \cdot (1,0,0) +4 \cdot sinh(u) \cdot (0,1,0) @f$.
bf62b306 360
361
dd21889e 362@subsubsection occt_brep_format_4_1_6 Bezier Curve - \<3D curve record 6\>
bf62b306 363
364**Example**
365
366@verbatim
367 6 1 2 0 1 0  4 1 -2 0  5 2 3 0  6
dd21889e 368@endverbatim
bf62b306 369
370**BNF-like Definition**
371
372@verbatim
dd21889e 373 <3D curve record 6> = "6" <_> <3D Bezier rational flag> <_> <3D Bezier degree>
374 <3D Bezier weight poles> <_\n>;
375
376 <3D Bezier rational flag> = <flag>;
377
378 <3D Bezier degree> = <int>;
379
380 3D Bezier weight poles> = (<_> <3D Bezier weight pole>) ^ (<3D Bezier degree> <+> "1");
381
382 <3D Bezier weight pole> = <3D point> [<_> <real>];
383@endverbatim
bf62b306 384
385**Description**
386
dd21889e 387\<3D curve record 6\> describes a Bezier curve. The curve data consist of a rational *r*, a degree @f$ m \leq 25 @f$ and weight poles.
bf62b306 388
dd21889e 389The weight poles are *m*+1 3D points *B<sub>0</sub> ... B<sub>m</sub>* if the flag *r* is 0. The weight poles are *m*+1 pairs *B<sub>0</sub>h<sub>0</sub> ... B<sub>m</sub>h<sub>m</sub>* if flag *r* is 1. Here *B<sub>i</sub>* is a 3D point and *h<sub>i</sub>* is a positive real @f$ (0 \leq i \leq m) @f$. @f$ h_{i}=1\; (0 \leq i \leq m) @f$ if the flag *r* is 0.
bf62b306 390
391The Bezier curve is defined by the following parametric equation:
392
dd21889e 393@f[ C(u) = \frac{\sum_{i=0}^{m}B_{i} \cdot h_{i} \cdot C_{m}^{i} \cdot u^{i} \cdot (1-u)^{m-i}}{\sum_{i=0}^{m}h_{i} \cdot C_{m}^{i} \cdot u^{i} \cdot (1-u)^{m-i}},\;u \in [0,\; 1] @f]
bf62b306 394
dd21889e 395where @f$ 0^{0} \equiv 1 @f$.
bf62b306 396
dd21889e 397The example record is interpreted as a Bezier curve with a rational flag *r*=1, degree *m*=2 and weight poles *B<sub>0</sub>*=(0, 1, 0), *h<sub>0</sub>*=4, *B<sub>1</sub>*=(1, -2, 0), *h<sub>1</sub>*=5 and *B<sub>2</sub>*=(2, 3, 0), *h<sub>2</sub>*=6. The Bezier curve is defined by the following parametric equation:
bf62b306 398
dd21889e 399@f[ C(u)=\frac{(0,1,0) \cdot 4 \cdot (1-u)^{2}+(1,-2,0) \cdot 5 \cdot 2 \cdot u \cdot (1-u) + (2,3,0) \cdot 6 \cdot u^{2} )}{4 \cdot (1-u)^{2}+5 \cdot 2 \cdot u \cdot (1-u)+6 \cdot u^{2}}. @f]
bf62b306 400
401
dd21889e 402@subsubsection occt_brep_format_4_1_7 B-spline Curve - \<3D curve record 7\>
bf62b306 403
404**Example**
405
406@verbatim
407 7 1 0  1 3 5  0 1 0  4 1 -2 0  5 2 3 0  6
408  0 1 0.25 1 0.5 1 0.75 1 1 1
409@endverbatim
410
411**BNF-like Definition**
412
413@verbatim
dd21889e 414 <3D curve record 7> = "7" <_> <3D B-spline rational flag> <_> "0" <_> <3D B-spline degree> <_>
415 <3D B-spline pole count> <_> <3D B-spline multiplicity knot count> <3D B-spline weight poles>
416 <_\n> <3D B-spline multiplicity knots> <_\n>;
417
418 <3D B-spline rational flag> = <flag>;
419
420 <3D B-spline degree> = <int>;
421
422 <3D B-spline pole count> = <int>;
423
424 <3D B-spline multiplicity knot count> = <int>;
425
426 <3D B-spline weight poles> = (<_> <3D B-spline weight pole>) ^ <3D B-spline pole count>;
427
428 <3D B-spline weight pole> = <3D point> [<_> <real>];
429
430 <3D B-spline multiplicity knots> = (<_> <3D B-spline multiplicity knot>) ^ <3D B-spline multiplicity knot count>;
431
432 <3D B-spline multiplicity knot> = <real> <_> <int>;
bf62b306 433@endverbatim
434
435**Description**
436
dd21889e 437\<3D curve record 7\> describes a B-spline curve. The curve data consist of a rational flag *r*, a degree @f$ m \leq 25 @f$, pole count @f$ n \geq 2 @f$, multiplicity knot count *k*, weight poles and multiplicity knots.
bf62b306 438
dd21889e 439The weight poles are *n* 3D points *B<sub>1</sub> ... B<sub>n</sub>* if the flag *r* is 0. The weight poles are *n* pairs *B<sub>1</sub>h<sub>1</sub> ... B<sub>n</sub>h<sub>n</sub>* if the flag *r* is 1. Here *B<sub>i</sub>* is a 3D point and *h<sub>i</sub>* is a positive real @f$ (1 \leq i \leq n) @f$. @f$ h_{i}=1\; (1 \leq i \leq n) @f$ if the flag *r* is 0.
bf62b306 440
dd21889e 441The multiplicity knots are *k* pairs *u<sub>1</sub>q<sub>1</sub> ... u<sub>k</sub>q<sub>k</sub>*. Here *u<sub>i</sub>* is a knot with a multiplicity @f$ q_{i} \geq 1 \; (1 \leq i \leq k) @f$ so that
bf62b306 442
dd21889e 443@f[ u_{i} < u_{i+1} (1 \leq i \leq k-1),@f]
444@f[ q_{1} \leq m+1,\; q_{k} \leq m+1,\; q_{i} \leq m\; (2 \leq i \leq k-1), \sum_{i=1}^{k}q_{i}=m+n+1. @f]
bf62b306 445
446The B-spline curve is defined by the following parametric equation:
447
dd21889e 448@f[ C(u) = \frac{\sum_{i=1}^{n}B_{i} \cdot h_{i} \cdot N_{i,m+1}(u)}{\sum_{i=1}^{n}h_{i} \cdot N_{i,m+1}(u)},\;u \in [u_{1},\; u_{k}] @f]
bf62b306 449
dd21889e 450where functions @f$ N_{i,j} @f$ have the following recursion definition by *j*:
451
452@f[ N_{i,1}(u)=\left\{\begin{matrix}
4531\Leftarrow \bar{u}_{i} \leq u \leq \bar{u}_{i+1}\\
4540\Leftarrow u < \bar{u}_{i} \vee \bar{u}_{i+1} \leq u \end{matrix} \right.,\;
455N_{i,j}(u)=\frac{(u-\bar{u}_{i}) \cdot N_{i,j-1}(u) }{\bar{u}_{i+j-1}-\bar{u}_{i}}+ \frac{(\bar{u}_{i+j}-u) \cdot N_{i+1,j-1}(u)}{\bar{u}_{i+j}-\bar{u}_{i+1}},\;(2 \leq j \leq m+1) @f]
bf62b306 456
dd21889e 457where
bf62b306 458
dd21889e 459@f[ \bar{u}_{i} = u_{j},\; (1 \leq j \leq k,\; \sum_{l=1}^{j-1}q_{l}+1 \leq i \leq \sum_{l=1}^{j}q_{l} ). @f]
bf62b306 460
dd21889e 461The example record is interpreted as a B-spline curve with a rational flag *r*=1, a degree *m*=1, pole count *n*=3, multiplicity knot count *k*=5, weight poles *B<sub>1</sub>*=(0,1,0), *h<sub>1</sub>*=4, *B<sub>2</sub>*=(1,-2,0), *h<sub>2</sub>*=5 and *B<sub>3</sub>*=(2,3,0), *h<sub>3</sub>*=6, multiplicity knots *u<sub>1</sub>*=0, *q<sub>1</sub>*=1, *u<sub>2</sub>*=0.25, *q<sub>2</sub>*=1, *u<sub>3</sub>*=0.5, *q<sub>3</sub>*=1, *u<sub>4</sub>*=0.75, *q<sub>4</sub>*=1 and *u<sub>5</sub>*=1, *q<sub>5</sub>*=1. The B-spline curve is defined by the following parametric equation:
bf62b306 462
dd21889e 463@f[ C(u)=\frac{(0,1,0) \cdot 4 \cdot N_{1,2}(u) + (1,-2,0) \cdot 5 \cdot N_{2,2}(u)+(2,3,0) \cdot 6 \cdot N_{3,2}(u)}{4 \cdot N_{1,2}(u)+5 \cdot N_{2,2}(u)+6 \cdot N_{3,2}(u)}. @f]
bf62b306 464
465
dd21889e 466@subsubsection occt_brep_format_4_1_8 Trimmed Curve - \<3D curve record 8\>
bf62b306 467
468**Example**
469
470@verbatim
471 8 4 -5
472 1 1 2 3 1 0 0
473@endverbatim
474
475**BNF-like Definition**
476
477@verbatim
dd21889e 478 <3D curve record 8> = "8" <_> <3D trimmed curve u min> <_> <3D trimmed curve u max> <_\n> <3D curve record>;
479
480 <3D trimmed curve u min> = <real>;
481
482 <3D trimmed curve u max> = <real>;
bf62b306 483@endverbatim
484
485**Description**
486
dd21889e 487\<3D curve record 8\> describes a trimmed curve. The trimmed curve data consist of reals *u<sub>min</sub>* and *u<sub>max</sub>* and \<3D curve record\> so that *u<sub>min</sub>* < *u<sub>max</sub>*. The trimmed curve is a restriction of the base curve *B* described in the record to the segment @f$ [u_{min},\;u_{max}]\subseteq domain(B) @f$. The trimmed curve is defined by the following parametric equation:
bf62b306 488
dd21889e 489@f[ C(u)=B(u),\; u \in [u_{min},\;u_{max}]. @f]
bf62b306 490
dd21889e 491The example record is interpreted as a trimmed curve with *u<sub>min</sub>*=-4 and *u<sub>max</sub>*=5 for the base curve @f$ B(u)=(1,2,3)+u \cdot (1,0,0) @f$. The trimmed curve is defined by the following parametric equation: @f$ C(u)=(1,2,3)+u \cdot (1,0,0),\; u \in [-4,\; 5] @f$.
bf62b306 492
493
dd21889e 494@subsubsection occt_brep_format_4_1_9 Offset Curve - \<3D curve record 9\>
bf62b306 495
496**Example**
497
498@verbatim
499 9 2
500 0 1 0
501 1 1 2 3 1 0 0
502@endverbatim
503
504**BNF-like Definition**
505
506@verbatim
dd21889e 507 <3D curve record 9> = "9" <_> <3D offset curve distance> <_\n>;
508 <3D offset curve direction> <_\n>;
509 <3D curve record>;
510
511 <3D offset curve distance> = <real>;
512
513 <3D offset curve direction> = <3D direction>;
bf62b306 514@endverbatim
515
516**Description**
517
dd21889e 518\<3D curve record 9\> describes an offset curve. The offset curve data consist of a distance *d*, a 3D direction *D* and a \<3D curve record\>. The offset curve is the result of offsetting the base curve *B* described in the record to the distance *d* along the vector @f$ [B'(u),\; D] \neq \vec{0} @f$. The offset curve is defined by the following parametric equation:
bf62b306 519
dd21889e 520@f[ C(u)=B(u)+d \cdot \frac{[B'(u),\; D]}{|[B'(u),\; D]|},\; u \in domain(B) . @f]
bf62b306 521
dd21889e 522The example record is interpreted as an offset curve with a distance *d*=2, direction *D*=(0, 1, 0), base curve @f$ B(u)=(1,2,3)+u \cdot (1,0,0) @f$ and defined by the following parametric equation: @f$ C(u)=(1,2,3)+u \cdot (1,0,0)+2 \cdot (0,0,1) @f$.
bf62b306 523
dd21889e 524@subsection occt_brep_format_4_2 Surfaces
bf62b306 525
526**Example**
527
528@verbatim
529 Surfaces 6
530 1 0 0 0 1 0 -0 0 0 1 0 -1 0
531 1 0 0 0 -0 1 0 0 0 1 1 0 -0
532 1 0 0 3 0 0 1 1 0 -0 -0 1 0
533 1 0 2 0 -0 1 0 0 0 1 1 0 -0
534 1 0 0 0 0 0 1 1 0 -0 -0 1 0
535 1 1 0 0 1 0 -0 0 0 1 0 -1 0
536@endverbatim
537
538**BNF-like Definition**
539
540@verbatim
dd21889e 541 <surfaces> = <surface header> <_\n> <surface records>;
542
543 <surface header> = “Surfaces” <_> <surface count>;
544
545 <surface records> = <surface record> ^ <surface count>;
546
547 <surface record> =
548 <surface record 1> |
549 <surface record 2> |
550 <surface record 3> |
551 <surface record 4> |
552 <surface record 5> |
553 <surface record 6> |
554 <surface record 7> |
555 <surface record 8> |
556 <surface record 9> |
557 <surface record 10> |
558 <surface record 11>;
559@endverbatim
bf62b306 560
dd21889e 561@subsubsection occt_brep_format_4_2_1 Plane - \< surface record 1 \>
562
bf62b306 563**Example**
564
565@verbatim
566 1 0 0 3 0 0 1 1 0 -0 -0 1 0
567@endverbatim
568
569**BNF-like Definition**
570
571@verbatim
dd21889e 572 <surface record 1> = "1" <_> <3D point> (<_> <3D direction>) ^ 3 <_\n>;
bf62b306 573@endverbatim
574
575**Description**
576
dd21889e 577\<surface record 1\> describes a plane. The plane data consist of a 3D point *P* and pairwise orthogonal 3D directions *N*, *D<sub>u</sub>* and *D<sub>v</sub>*. The plane passes through the point *P*, has the normal *N* and is defined by the following parametric equation:
bf62b306 578
dd21889e 579@f[ S(u,v)=P+u \cdot D_{u}+v \cdot D_{v},\; (u,\;v) \in (-\infty,\; \infty) \times (-\infty,\; \infty). @f]
bf62b306 580
dd21889e 581The example record is interpreted as a plane which passes through a point *P*=(0, 0, 3), has a normal *N*=(0, 0, 1) and is defined by the following parametric equation: @f$ S(u,v)=(0,0,3)+u \cdot (1,0,0) + v \cdot (0,1,0) @f$.
bf62b306 582
583
dd21889e 584@subsubsection occt_brep_format_4_2_2 Cylinder - \< surface record 2 \>
bf62b306 585
586**Example**
587
588@verbatim
589 2 1 2 3 0 0 1 1 0 -0 -0 1 0 4
590@endverbatim
591
592**BNF-like Definition**
593
594@verbatim
dd21889e 595 <surface record 2> = "2" <_> <3D point> (<_> <3D direction>) ^ 3 <_> <real> <_\n>;
bf62b306 596@endverbatim
597
598**Description**
599
dd21889e 600\<surface record 2\> describes a cylinder. The cylinder data consist of a 3D point *P*, pairwise orthogonal 3D directions *D<sub>v</sub>*, *D<sub>X</sub>* and *D<sub>Y</sub>* and a non-negative real *r*. The cylinder axis passes through the point *P* and has the direction *D<sub>v</sub>*. The cylinder has the radius *r* and is defined by the following parametric equation:
bf62b306 601
dd21889e 602@f[ S(u,v)=P+r \cdot (cos(u) \cdot D_{x}+sin(u) \cdot D_{y} )+v \cdot D_{v},\; (u,v) \in [0,\; 2 \cdot \pi) \times (-\infty,\; \infty) . @f]
bf62b306 603
dd21889e 604The example record is interpreted as a cylinder which axis passes through a point *P*=(1, 2, 3) and has a direction *D<sub>v</sub>*=(0, 0, 1). Directions for the cylinder are *D<sub>X</sub>*=(1,0,0) and *D<sub>Y</sub>*=(0,1,0). The cylinder has a radius *r*=4 and is defined by the following parametric equation: @f$ S(u,v)=(1,2,3)+4 \cdot ( cos(u) \cdot D_{X} + sin(u) \cdot D_{Y} ) + v \cdot D_{v}. @f$
bf62b306 605
606
dd21889e 607@subsubsection occt_brep_format_4_2_3 Cone - \< surface record 3 \>
bf62b306 608
609**Example**
610
611@verbatim
612 3 1 2 3 0 0 1 1 0 -0 -0 1 0 4
613 0.75
614@endverbatim
615
616
617**BNF-like Definition**
618
619@verbatim
dd21889e 620 <surface record 3> = "3" <_> <3D point> (<_> <3D direction>) ^ 3 (<_> <real>) ^ 2 <_\n>;
bf62b306 621@endverbatim
622
623**Description**
624
dd21889e 625\<surface record 3\> describes a cone. The cone data consist of a 3D point *P*, pairwise orthogonal 3D directions *D<sub>Z</sub>*, *D<sub>X</sub>* and *D<sub>Y</sub>*, a non-negative real *r* and a real @f$ \varphi \in (-\pi /2,\; \pi/2)/\left \{ 0 \right \} @f$. The cone axis passes through the point *P* and has the direction *D<sub>Z</sub>*. The plane which passes through the point *P* and is parallel to directions *D<sub>X</sub>* and *D<sub>Y</sub>* is the cone referenced plane. The cone section by the plane is a circle with the radius *r*. The direction from the point *P* to the cone apex is @f$ -sgn(\varphi) \cdot D_{Z} @f$. The cone has a half-angle @f$| \varphi | @f$ and is defined by the following parametric equation:
bf62b306 626
dd21889e 627@f[ S(u,v)=P+(r+v \cdot sin(\varphi)) \cdot (cos(u) \cdot D_{X}+sin(u) \cdot D_{Y})+v \cdot cos(\varphi) \cdot D_{Z}, (u,v) \in [0,\; 2 \cdot \pi) \times (-\infty,\; \infty) . @f]
bf62b306 628
dd21889e 629The example record is interpreted as a cone with an axis which passes through a point *P*=(1, 2, 3) and has a direction *D<sub>Z</sub>*=(0, 0, 1). Other cone data are *D<sub>X</sub>*=(1, 0, 0), *D<sub>Y</sub>*=(0, 1, 0), *r*=4 and @f$ \varphi = 0.75 @f$. The cone is defined by the following parametric equation:
630@f[ S(u,v)=(1,2,3)+( 4 + v \cdot sin(0.75)) \cdot ( cos(u) \cdot (1,0,0) + sin(u) \cdot (0,1,0) ) + v \cdot cos(0.75) \cdot (0,0,1) . @f]
bf62b306 631
632
dd21889e 633@subsubsection occt_brep_format_4_2_4 Sphere - \< surface record 4 \>
bf62b306 634
635**Example**
636
637@verbatim
638 4 1 2 3 0 0 1 1 0 -0 -0 1 0 4
639@endverbatim
640
641**BNF-like Definition**
642
643@verbatim
dd21889e 644 <surface record 4> = "4" <_> <3D point> (<_> <3D direction>) ^ 3 <_> <real> <_\n>;
bf62b306 645@endverbatim
646
647**Description**
648
dd21889e 649\<surface record 4\> describes a sphere. The sphere data consist of a 3D point *P*, pairwise orthogonal 3D directions *D<sub>Z</sub>*, *D<sub>X</sub>* and *D<sub>Y</sub>* and a non-negative real *r*. The sphere has the center *P*, radius *r* and is defined by the following parametric equation:
bf62b306 650
dd21889e 651@f[ S(u,v)=P+r \cdot cos(v) \cdot (cos(u) \cdot D_{x}+sin(u) \cdot D_{y} ) +r \cdot sin(v) \cdot D_{Z},\; (u,v) \in [0,\;2 \cdot \pi) \times [-\pi /2,\; \pi /2] . @f]
bf62b306 652
dd21889e 653The example record is interpreted as a sphere with its center *P*=(1, 2, 3). Directions for the sphere are *D<sub>Z</sub>*=(0, 0, 1), *D<sub>X</sub>*=(1, 0, 0) and *D<sub>Y</sub>*=(0, 1, 0). The sphere has a radius *r*=4 and is defined by the following parametric equation:
654@f[ S(u,v)=(1,2,3)+ 4 \cdot cos(v) \cdot ( cos(u) \cdot (1,0,0) + sin(u) \cdot (0,1,0) ) + 4 \cdot sin(v) \cdot (0,0,1) . @f]
bf62b306 655
656
dd21889e 657@subsubsection occt_brep_format_4_2_5 Torus - \< surface record 5 \>
bf62b306 658
659**Example**
660
661@verbatim
662 5 1 2 3 0 0 1 1 0 -0 -0 1 0 8 4
663@endverbatim
664
665**BNF-like Definition**
666
667@verbatim
dd21889e 668 <surface record 5> = "5" <_> <3D point> (<_> <3D direction>) ^ 3 (<_> <real>) ^ 2 <_\n>;
bf62b306 669@endverbatim
670
671**Description**
672
dd21889e 673\<surface record 5\> describes a torus. The torus data consist of a 3D point *P*, pairwise orthogonal 3D directions *D<sub>Z</sub>*, *D<sub>X</sub>* and *D<sub>Y</sub>* and non-negative reals *r<sub>1</sub>* and *r<sub>2</sub>*. The torus axis passes through the point *P* and has the direction *D<sub>Z</sub>*. *r<sub>1</sub>* is the distance from the torus circle center to the axis. The torus circle has the radius *r<sub>2</sub>*. The torus is defined by the following parametric equation:
bf62b306 674
dd21889e 675@f[ S(u,v)=P+(r_{1}+r_{2} \cdot cos(v)) \cdot (cos(u) \cdot D_{x}+sin(u) \cdot D_{y} ) +r_{2} \cdot sin(v) \cdot D_{Z},\; (u,v) \in [0,\;2 \cdot \pi) \times [0,\; 2 \cdot \pi) . @f]
bf62b306 676
dd21889e 677The example record is interpreted as a torus with an axis which passes through a point *P*=(1, 2, 3) and has a direction *D<sub>Z</sub>*=(0, 0, 1). *D<sub>X</sub>*=(1, 0, 0), *D<sub>Y</sub>*=(0, 1, 0), *r<sub>1</sub>*=8 and *r<sub>2</sub>*=4 for the torus. The torus is defined by the following parametric equation:
678@f[ S(u,v)=(1,2,3)+ (8+4 \cdot cos(v)) \cdot ( cos(u) \cdot (1,0,0) + sin(u) \cdot (0,1,0) ) + 4 \cdot sin(v) \cdot (0,0,1) . @f]
bf62b306 679
680
dd21889e 681@subsubsection occt_brep_format_4_2_6 Linear Extrusion - \< surface record 6 \>
bf62b306 682
683**Example**
684
685@verbatim
686 6 0 0.6 0.8
687 2 1 2 3 0 0 1 1 0 -0 -0 1 0 4
688@endverbatim
689
690**BNF-like Definition**
691
692@verbatim
dd21889e 693 <surface record 6> = "6" <_> <3D direction> <_\n> <3D curve record>;
bf62b306 694@endverbatim
695
696**Description**
697
dd21889e 698\<surface record 6\> describes a linear extrusion surface. The surface data consist of a 3D direction *D<sub>v</sub>* and a \<3D curve record\>. The linear extrusion surface has the direction *D<sub>v</sub>*, the base curve *C* described in the record and is defined by the following parametric equation:
bf62b306 699
dd21889e 700@f[ S(u,v)=C(u)+v \cdot D_{v},\; (u,v) \in domain(C) \times (-\infty,\; \infty) . @f]
bf62b306 701
dd21889e 702The example record is interpreted as a linear extrusion surface with a direction *D<sub>v</sub>*=(0, 0.6, 0.8). The base curve is a circle for the surface. The surface is defined by the following parametric equation:
703
704@f[ S(u,v)=(1,2,3)+4 \cdot (cos(u) \cdot (1,0,0)+sin(u) \cdot (0,1,0))+v \cdot (0, 0.6, 0.8),\; (u,v) \in [0,\; 2 \cdot \pi) \times (-\infty,\; \infty). @f]
bf62b306 705
706
dd21889e 707@subsubsection occt_brep_format_4_2_7 Revolution Surface - \< surface record 7 \>
bf62b306 708
709**Example**
710
711@verbatim
712 7 -4 0 3 0 1 0
713 2 1 2 3 0 0 1 1 0 -0 -0 1 0 4
714@endverbatim
715
716**BNF-like Definition**
717
718@verbatim
dd21889e 719 <surface record 7> = "7" <_> <3D point> <_> <3D direction> <_\n> <3D curve record>;
bf62b306 720@endverbatim
721
722**Description**
723
dd21889e 724\<surface record 7\> describes a revolution surface. The surface data consist of a 3D point *P*, a 3D direction *D* and a \<3D curve record\>. The surface axis passes through the point *P* and has the direction *D*. The base curve *C* described by the record and the axis are coplanar. The surface is defined by the following parametric equation:
725
726@f[ S(u,v)= P+V_{D}(v)+cos(u) \cdot (V(v)-V_{D}(v))+sin(u) \cdot [D,V(v)],\;(u,v) \in [0,\; 2 \cdot \pi)\times domain(C) @f]
bf62b306 727
dd21889e 728where @f$ V(v)=C(v)-P, V_{D}(v)=(D,V(v)) \cdot D @f$.
bf62b306 729
dd21889e 730The example record is interpreted as a revolution surface with an axis which passes through a point *P*=(-4, 0, 3) and has a direction *D*=(0, 1, 0). The base curve is a circle for the surface. The surface is defined by the following parametric equation:
731
732@f[ S(u,v)= (-4,0,3)+V_{D}(v)+cos(u) \cdot (V(v)-V_{D}(v))+sin(u) \cdot [(0,1,0),V(v)],\;(u,v) \in [0,\; 2 \cdot \pi)\times [0,\; 2 \cdot \pi) @f]
bf62b306 733
dd21889e 734where @f$ V(v)=(5,2,0)+4 \cdot (cos(v) \cdot (1,0,0)+sin(v) \cdot (0,1,0)), V_{D}(v)=((0,1,0),V(v)) \cdot (0,1,0) @f$.
bf62b306 735
736
dd21889e 737@subsubsection occt_brep_format_4_2_8 Bezier Surface - \< surface record 8 \>
bf62b306 738
739**Example**
740
741@verbatim
742 8 1 1 2 1 0 0 1  7 1 0 -4  10
743 0 1 -2  8 1 1 5  11
744 0 2 3  9 1 2 6  12
745@endverbatim
746
747**BNF-like Definition**
748
749@verbatim
dd21889e 750 <surface record 8> = "8" <_> <Bezier surface u rational flag> <_> <Bezier surface v rational flag> <_> <Bezier surface u degree> <_> <Bezier surface v degree> <_>
751 <Bezier surface weight poles>;
752
753 <Bezier surface u rational flag> = <flag>;
754
755 <Bezier surface v rational flag> = <flag>;
756
757 <Bezier surface u degree> = <int>;
758
759 <Bezier surface v degree> = <int>;
760
761 <Bezier surface weight poles> =
762 (<Bezier surface weight pole group> <_\n>) ^ (<Bezier surface u degree> <+> "1");
763
764 <Bezier surface weight pole group> = <Bezier surface weight pole>
765 (<_> <Bezier surface weight pole>) ^ <Bezier surface v degree>;
766
767 <Bezier surface weight pole> = <3D point> [<_> <real>];
768@endverbatim
bf62b306 769
770**Description**
771
dd21889e 772\<surface record 8\> describes a Bezier surface. The surface data consist of a u rational flag *r<sub>u</sub>*, v rational flag *r<sub>v</sub>*, u degree @f$ m_{u} \leq 25 @f$, v degree @f$ m_{v} \leq 25 @f$ and weight poles.
bf62b306 773
dd21889e 774The weight poles are @f$ (m_{u}+1) \cdot (m_{v}+1) @f$ 3D points @f$ B_{i,j}\; ((i,j) \in \left \{ 0,...,m_{u} \right \} \times \left \{ 0,...,m_{v} \right \}) @f$ if @f$ r_{u}+r_{v}=0 @f$. The weight poles are @f$ (m_{u}+1) \cdot (m_{v}+1) @f$ pairs @f$ B_{i,j}h_{i,j}\; ((i,j) \in \left \{ 0,...,m_{u} \right \} \times \left \{ 0,...,m_{v} \right \}) @f$ if @f$ r_{u}+r_{v} \neq 0 @f$. Here @f$ B_{i,j} @f$ is a 3D point and @f$ h_{i,j} @f$ is a positive real @f$ ((i,j) \in \left \{ 0,...,m_{u} \right \} \times \left \{ 0,...,m_{v} \right \}) @f$. @f$ h_{i,j}=1\; ((i,j) \in \left \{ 0,...,m_{u} \right \} \times \left \{ 0,...,m_{v} \right \}) @f$ if @f$ r_{u}+r_{v} = 0 @f$.
bf62b306 775
776The Bezier surface is defined by the following parametric equation:
777
dd21889e 778@f[ S(u,v)=\frac{\sum_{i=0}^{m_{u}} \sum_{j=0}^{m_{v}} B_{i,j} \cdot h_{i,j} \cdot C_{m_{u}}^{i} \cdot u^{i} \cdot (1-u)^{m_{u}-i} \cdot C_{m_{v}}^{j} \cdot v^{j} \cdot (1-v)^{m_{v}-j}}{\sum_{i=0}^{m_{u}} \sum_{j=0}^{m_{v}} h_{i,j} \cdot C_{m_{u}}^{i} \cdot u^{i} \cdot (1-u)^{m_{u}-i} \cdot C_{m_{v}}^{j} \cdot v^{j} \cdot (1-v)^{m_{v}-j}}, (u,v) \in [0,1] \times [0,1] @f]
bf62b306 779
dd21889e 780where @f$ 0^{0} \equiv 1 @f$.
bf62b306 781
dd21889e 782The example record is interpreted as a Bezier surface with a u rational flag *r<sub>u</sub>*=1, v rational flag *r<sub>v</sub>*=1, u degree *m<sub>u</sub>*=2, v degree *m<sub>v</sub>*=1, weight poles *B<sub>0,0</sub>*=(0, 0, 1), *h<sub>0,0</sub>*=7, *B<sub>0,1</sub>*=(1, 0, -4), *h<sub>0,1</sub>*=10, *B<sub>1,0</sub>*=(0, 1, -2), *h<sub>1,0</sub>*=8, *B<sub>1,1</sub>*=(1, 1, 5), *h<sub>1,1</sub>*=11, *B<sub>2,0</sub>*=(0, 2, 3), *h<sub>2,0</sub>*=9 and *B<sub>2,1</sub>*=(1, 2, 6), *h<sub>2,1</sub>*=12. The surface is defined by the following parametric equation:
bf62b306 783
dd21889e 784@f[ S(u,v)= [ (0,0,1) \cdot 7 \cdot (1-u)^{2} \cdot (1-v)+(1,0,-4) \cdot 10 \cdot (1-u)^{2} \cdot v+ \\
785(0,1,-2) \cdot 8 \cdot 2 \cdot u \cdot (1-u) \cdot (1-v)+(1,1,5) \cdot 11 \cdot 2 \cdot u \cdot (1-u) \cdot v+ \\
786(0,2,3) \cdot 9 \cdot u^{2} \cdot (1-v)+(1,2,6) \cdot 12 \cdot u^{2} \cdot v] \div \\
787[7 \cdot (1-u)^{2} \cdot (1-v)+10 \cdot (1-u)^{2} \cdot v+ \\
7888 \cdot 2 \cdot u \cdot (1-u) \cdot (1-v)+11 \cdot 2 \cdot u \cdot (1-u) \cdot v+ \\
7899 \cdot u^{2} \cdot (1-v)+12 \cdot u^{2} \cdot v ] @f]
bf62b306 790
791
dd21889e 792@subsubsection occt_brep_format_4_2_9 B-spline Surface - \< surface record 9 \>
bf62b306 793
794**Example**
795
796@verbatim
797 9 1 1 0 0 1 1 3 2 5 4 0 0 1  7 1 0 -4  10
798 0 1 -2  8 1 1 5  11
799 0 2 3  9 1 2 6  12
800
801 0 1
802 0.25 1
803 0.5 1
804 0.75 1
805 1 1
806
807 0 1
808 0.3 1
809 0.7 1
810 1 1
811@endverbatim
812
813**BNF-like Definition**
814
815@verbatim
dd21889e 816 <surface record 9> = "9" <_> <B-spline surface u rational flag> <_>
817 <B-spline surface v rational flag> <_> "0" <_> "0" <_> <B-spline surface u degree> <_>
818 <B-spline surface v degree> <_> <B-spline surface u pole count> <_>
819 <B-spline surface v pole count> <_> <B-spline surface u multiplicity knot count> <_>
820 <B-spline surface v multiplicity knot count> <_> <B-spline surface weight poles> <_\n>
821 <B-spline surface u multiplicity knots> <_\n> <B-spline surface v multiplicity knots>;
822
823 <B-spline surface u rational flag> = <flag>;
824
825 <B-spline surface v rational flag> = <flag>;
826
827 <B-spline surface u degree> = <int>;
828
829 <B-spline surface v degree> = <int>;
830
831 <B-spline surface u pole count> = <int>;
832
833 <B-spline surface v pole count> = <int>;
834
835 <B-spline surface u multiplicity knot count> = <int>;
836
837 <B-spline surface v multiplicity knot count> = <int>;
838
839 <B-spline surface weight poles> =
840 (<B-spline surface weight pole group> <_\n>) ^ <B-spline surface u pole count>;
841
842 <B-spline surface weight pole group> =
843 (<B-spline surface weight pole> <_>) ^ <B-spline surface v pole count>;
844
845 <B-spline surface weight pole> = <3D point> [<_> <real>];
846
847 <B-spline surface u multiplicity knots> =
848 (<B-spline surface u multiplicity knot> <_\n>) ^ <B-spline surface u multiplicity knot count>;
849
850 <B-spline surface u multiplicity knot> = <real> <_> <int>;
851
852 <B-spline surface v multiplicity knots> =
853 (<B-spline surface v multiplicity knot> <_\n>) ^ <B-spline surface v multiplicity knot count>;
854
855 <B-spline surface v multiplicity knot> = <real> <_> <int>;
bf62b306 856@endverbatim
857
858**Description**
859
dd21889e 860\<surface record 9\> describes a B-spline surface. The surface data consist of a u rational flag *r<sub>u</sub>*, v rational flag *r<sub>v</sub>*, u degree @f$ m_{u} \leq 25 @f$, v degree @f$ m_{v} \leq 25 @f$, u pole count @f$ n_{u} \geq 2 @f$, v pole count @f$ n_{v} \geq 2 @f$, u multiplicity knot count *k<sub>u</sub>*, v multiplicity knot count *k<sub>v</sub>*, weight poles, u multiplicity knots, v multiplicity knots.
bf62b306 861
dd21889e 862The weight poles are @f$ n_{u} \cdot n_{v} @f$ 3D points @f$ B_{i,j}\; ((i,j) \in \left \{ 1,...,n_{u} \right \} \times \left \{ 1,...,n_{v} \right \}) @f$ if @f$ r_{u}+r_{v}=0 @f$. The weight poles are @f$ n_{u} \cdot n_{v} @f$ pairs @f$ B_{i,j}h_{i,j}\; ((i,j) \in \left \{ 1,...,n_{u} \right \} \times \left \{ 1,...,n_{v} \right \}) @f$ if @f$ r_{u}+r_{v} \neq 0 @f$. Here @f$ B_{i,j} @f$ is a 3D point and @f$ h_{i,j} @f$ is a positive real @f$ ((i,j) \in \left \{ 1,...,n_{u} \right \} \times \left \{ 1,...,n_{v} \right \}) @f$. @f$ h_{i,j}=1\; ((i,j) \in \left \{ 1,...,n_{u} \right \} \times \left \{ 1,...,n_{v} \right \}) @f$ if @f$ r_{u}+r_{v} = 0 @f$.
bf62b306 863
dd21889e 864The u multiplicity knots are *k<sub>u</sub>* pairs @f$ u_{1}q_{1} ... u_{k_{u}}q_{k_{u}} @f$. Here @f$ u_{i} @f$ is a knot with multiplicity @f$ q_{i} \geq 1 \;(1\leq i\leq k_{u}) @f$ so that
bf62b306 865
dd21889e 866@f[ u_{i} < u_{i+1} \; (1\leq i\leq k_{u}-1), \\
867q_{1} \leq m_{u}+1,\; q_{k_{u}} \leq m_{u}+1,\; q_{i} \leq m_{u}\; (2\leq i\leq k_{u}-1),\; \sum_{i=1}^{k_{u}}q_{i}=m_{u}+n_{u}+1. @f]
bf62b306 868
dd21889e 869The v multiplicity knots are *k<sub>v</sub>* pairs @f$ v_{1}t_{1} ... v_{k_{v}}t_{k_{v}} @f$. Here @f$ v_{j} @f$ is a knot with multiplicity @f$ t_{i} \geq 1\;(1\leq i\leq k_{v}) @f$ so that
bf62b306 870
dd21889e 871@f[ v_{j} < v_{j+1} \; (1\leq j\leq k_{v}-1), \\
872t_{1} \leq m_{v}+1,\; t_{k_{v}} \leq m_{v}+1,\; t_{j} \leq m_{v}\; (2\leq j\leq k_{v}-1),\; \sum_{j=1}^{k_{v}}t_{j}=m_{v}+n_{v}+1. @f]
bf62b306 873
874The B-spline surface is defined by the following parametric equation:
875
dd21889e 876@f[ S(u,v)=\frac{\sum_{i=1}^{n_{u}} \sum_{j=1}^{n_{v}} B_{i,j} \cdot h_{i,j} \cdot N_{i,m_{u}+1}(u) \cdot M_{j,m_{v}+1}(v)}{\sum_{i=1}^{n_{u}} \sum_{j=1}^{n_{v}} h_{i,j} \cdot N_{i,m_{u}+1}(u) \cdot M_{j,m_{v}+1}(v)}, (u,v) \in [u_{1},u_{k_{u}}] \times [v_{1},v_{k_{v}}] @f]
bf62b306 877
dd21889e 878where functions *N<sub>i,j</sub>* and *M<sub>i,j</sub>* have the following recursion definition by *j*:
bf62b306 879
dd21889e 880@f[ N_{i,1}(u)=\left\{\begin{matrix}
8811\Leftarrow \bar{u}_{i} \leq u \leq \bar{u}_{i+1}\\
8820\Leftarrow u < \bar{u}_{i} \vee \bar{u}_{i+1} \leq u \end{matrix} \right.,\;
883N_{i,j}(u)=\frac{(u-\bar{u}_{i}) \cdot N_{i,j-1}(u) }{\bar{u}_{i+j-1}-\bar{u}_{i}}+ \frac{(\bar{u}_{i+j}-u) \cdot N_{i+1,j-1}(u)}{\bar{u}_{i+j}-\bar{u}_{i+1}},\;(2 \leq j \leq m_{u}+1); \\
884M_{i,1}(v)=\left\{\begin{matrix}
8851\Leftarrow \bar{v}_{i} \leq v \leq \bar{v}_{i+1}\\
8860\Leftarrow v < \bar{v}_{i} \vee \bar{v}_{i+1} \leq v \end{matrix} \right.,\;
887M_{i,j}(v)=\frac{(v-\bar{v}_{i}) \cdot M_{i,j-1}(v) }{\bar{v}_{i+j-1}-\bar{v}_{i}}+ \frac{(\bar{v}_{i+j}-v) \cdot M_{i+1,j-1}(v)}{\bar{v}_{i+j}-\bar{v}_{i+1}},\;(2 \leq j \leq m_{v}+1); @f]
888
889where
890@f[ \bar{u}_{i}=u_{j}\; (1 \leq j \leq k_{u},\; \sum_{l=1}^{j-1}q_{l} \leq i \leq \sum_{l=1}^{j}q_{l}), \\
891 \bar{v}_{i}=v_{j}\; (1 \leq j \leq k_{v},\; \sum_{l=1}^{j-1}t_{l} \leq i \leq \sum_{l=1}^{j}t_{l}); @f]
bf62b306 892
dd21889e 893The example record is interpreted as a B-spline surface with a u rational flag *r<sub>u</sub>*=1, v rational flag *r<sub>v</sub>*=1, u degree *m<sub>u</sub>*=1, v degree *m<sub>v</sub>*=1, u pole count *n<sub>u</sub>*=3, v pole count *n<sub>v</sub>*=2, u multiplicity knot count *k<sub>u</sub>*=5, v multiplicity knot count *k<sub>v</sub>*=4, weight poles *B<sub>1,1</sub>*=(0, 0, 1), *h<sub>1,1</sub>*=7, *B<sub>1,2</sub>*=(1, 0, -4), *h<sub>1,2</sub>*=10, *B<sub>2,1</sub>*=(0, 1, -2), *h<sub>2,1</sub>*=8, *B<sub>2,2</sub>*=(1, 1, 5), *h<sub>2,2</sub>*=11, *B<sub>3,1</sub>*=(0, 2, 3), *h<sub>3,1</sub>*=9 and *B<sub>3,2</sub>*=(1, 2, 6), *h<sub>3,2</sub>*=12, u multiplicity knots *u<sub>1</sub>*=0, *q<sub>1</sub>*=1, *u<sub>2</sub>*=0.25, *q<sub>2</sub>*=1, *u<sub>3</sub>*=0.5, *q<sub>3</sub>*=1, *u<sub>4</sub>*=0.75, *q<sub>4</sub>*=1 and *u<sub>5</sub>*=1, *q<sub>5</sub>*=1, v multiplicity knots *v<sub>1</sub>*=0, *r<sub>1</sub>*=1, *v<sub>2</sub>*=0.3, *r<sub>2</sub>*=1, *v<sub>3</sub>*=0.7, *r<sub>3</sub>*=1 and *v<sub>4</sub>*=1, *r<sub>4</sub>*=1. The B-spline surface is defined by the following parametric equation:
bf62b306 894
dd21889e 895@f[ S(u,v)= [ (0,0,1) \cdot 7 \cdot N_{1,2}(u) \cdot M_{1,2}(v)+(1,0,-4) \cdot 10 \cdot N_{1,2}(u) \cdot M_{2,2}(v)+ \\
896(0,1,-2) \cdot 8 \cdot N_{2,2}(u) \cdot M_{1,2}(v)+(1,1,5) \cdot 11 \cdot N_{2,2}(u) \cdot M_{2,2}(v)+ \\
897(0,2,3) \cdot 9 \cdot N_{3,2}(u) \cdot M_{1,2}(v)+(1,2,6) \cdot 12 \cdot N_{3,2}(u) \cdot M_{2,2}(v)] \div \\
898[7 \cdot N_{1,2}(u) \cdot M_{1,2}(v)+10 \cdot N_{1,2}(u) \cdot M_{2,2}(v)+ \\
8998 \cdot N_{2,2}(u) \cdot M_{1,2}(v)+11 \cdot N_{2,2}(u) \cdot M_{2,2}(v)+ \\
9009 \cdot N_{3,2}(u) \cdot M_{1,2}(v)+12 \cdot N_{3,2}(u) \cdot M_{2,2}(v) ] @f]
bf62b306 901
902
dd21889e 903@subsubsection occt_brep_format_4_2_10 Rectangular Trim Surface - \< surface record 10 \>
bf62b306 904
905**Example**
906
907@verbatim
908 10 -1 2 -3 4
909 1 1 2 3 0 0 1 1 0 -0 -0 1 0
910@endverbatim
911
912**BNF-like Definition**
913
914@verbatim
dd21889e 915 <surface record 10> = "10" <_> <trim surface u min> <_> <trim surface u max> <_>
916 <trim surface v min> <_> <trim surface v max> <_\n> <surface record>;
917
918 <trim surface u min> = <real>;
919
920 <trim surface u max> = <real>;
921
922 <trim surface v min> = <real>;
923
924 <trim surface v max> = <real>;
925@endverbatim
bf62b306 926
927**Description**
928
dd21889e 929\<surface record 10\> describes a rectangular trim surface. The surface data consist of reals *u<sub>min</sub>*, *u<sub>max</sub>*, *v<sub>min</sub>* and *v<sub>max</sub>* and a \<surface record\> so that *u<sub>min</sub>* < *u<sub>max</sub>* and *v<sub>min</sub>* < *v<sub>max</sub>*. The rectangular trim surface is a restriction of the base surface *B* described in the record to the set @f$ [u_{min},u_{max}] \times [v_{min},v_{max}] \subseteq domain(B) @f$. The rectangular trim surface is defined by the following parametric equation:
bf62b306 930
dd21889e 931@f[ S(u,v)=B(u,v),\; (u,v) \in [u_{min},u_{max}] \times [v_{min},v_{max}] . @f]
bf62b306 932
dd21889e 933The example record is interpreted as a rectangular trim surface to the set [-1, 2]x[-3, 4] for the base surface @f$ B(u,v)=(1,2,3)+u \cdot (1,0,0)+v \cdot (0,1,0) @f$. The rectangular trim surface is defined by the following parametric equation: @f$ B(u,v)=(1,2,3)+u \cdot (1,0,0)+ v \cdot (0,1,0),\; (u,v) \in [-1,2] \times [-3,4] @f$.
bf62b306 934
935
dd21889e 936@subsubsection occt_brep_format_4_2_11 Offset Surface - \< surface record 11 \>
bf62b306 937
938**Example**
939
940@verbatim
941 11 -2
942 1 1 2 3 0 0 1 1 0 -0 -0 1 0
dd21889e 943@endverbatim
bf62b306 944
945**BNF-like Definition**
946
947@verbatim
dd21889e 948 <surface record 11> = "11" <_> <surface record distance> <_\n> <surface record>;
949
950 <surface record distance> = <real>;
951@endverbatim
bf62b306 952
953**Description**
954
dd21889e 955\<surface record 11\> describes an offset surface.
956The offset surface data consist of a distance *d* and a \<surface record\>. The offset surface is the result of offsetting the base surface *B* described in the record to the distance *d* along the normal *N* of surface *B*. The offset surface is defined by the following parametric equation:
bf62b306 957
dd21889e 958@f[ S(u,v)=B(u,v)+d \cdot N(u,v),\; (u,v) \in domain(B) . \\
959N(u,v) = [S'_{u}(u,v),S'_{v}(u,v)] @f]
960if @f$ [S'_{u}(u,v),S'_{v}(u,v)] \neq \vec{0} @f$.
bf62b306 961
dd21889e 962The example record is interpreted as an offset surface with a distance *d*=-2 and base surface @f$ B(u,v)=(1,2,3)+u \cdot (1,0,0)+v \cdot (0,1,0) @f$. The offset surface is defined by the following parametric equation: @f$ S(u,v)=(1,2,3)+u \cdot (1,0,0)+v \cdot (0,1,0)-2 \cdot (0,0,1) @f$.
bf62b306 963
964
dd21889e 965@subsection occt_brep_format_4_3 2D curves
bf62b306 966
967**Example**
968
969@verbatim
970 Curve2ds 24
971 1 0 0 1 0
972 1 0 0 1 0
973 1 3 0 0 -1
974 1 0 0 0 1
975 1 0 -2 1 0
976 1 0 0 1 0
977 1 0 0 0 -1
978 1 0 0 0 1
979 1 0 0 1 0
980 1 0 1 1 0
981 1 3 0 0 -1
982 1 1 0 0 1
983 1 0 -2 1 0
984 1 0 1 1 0
985 1 0 0 0 -1
986 1 1 0 0 1
987 1 0 0 0 1
988 1 0 0 1 0
989 1 3 0 0 1
990 1 0 0 1 0
991 1 0 0 0 1
992 1 0 2 1 0
993 1 3 0 0 1
994 1 0 2 1 0
995@endverbatim
996
997**BNF-like Definition**
998
999@verbatim
dd21889e 1000 <2D curves> = <2D curve header> <_\n> <2D curve records>;
1001
1002 <2D curve header> = "Curve2ds" <_> <2D curve count>;
1003
1004 <2D curve count> = <int>;
1005
1006 <2D curve records> = <2D curve record> ^ <2D curve count>;
1007
1008 <2D curve record> =
1009 <2D curve record 1> |
1010 <2D curve record 2> |
1011 <2D curve record 3> |
1012 <2D curve record 4> |
1013 <2D curve record 5> |
1014 <2D curve record 6> |
1015 <2D curve record 7> |
1016 <2D curve record 8> |
1017 <2D curve record 9>;
bf62b306 1018@endverbatim
1019
dd21889e 1020@subsubsection occt_brep_format_4_3_1 Line - \<2D curve record 1\>
bf62b306 1021
1022**Example**
1023
1024@verbatim
1025 1 3 0 0 -1
1026@verbatim
1027
1028**BNF-like Definition**
1029
1030@verbatim
dd21889e 1031 <2D curve record 1> = "1" <_> <2D point> <_> <2D direction> <_\n>;
bf62b306 1032@endverbatim
1033
1034**Description**
1035
dd21889e 1036\<2D curve record 1\> describes a line. The line data consist of a 2D point *P* and a 2D direction *D*. The line passes through the point *P*, has the direction *D* and is defined by the following parametric equation:
bf62b306 1037
dd21889e 1038@f[ C(u)=P+u \cdot D, \; u \in (-\infty,\; \infty). @f]
bf62b306 1039
dd21889e 1040The example record is interpreted as a line which passes through a point *P*=(3,0), has a direction *D*=(0,-1) and is defined by the following parametric equation: @f$ C(u)=(3,0)+ u \cdot (0,-1) @f$.
bf62b306 1041
1042
dd21889e 1043@subsubsection occt_brep_format_4_3_2 Circle - \<2D curve record 2\>
bf62b306 1044
1045**Example**
1046
1047@verbatim
1048 2 1 2 1 0 -0 1 3
1049@endverbatim
1050
1051**BNF-like Definition**
1052
1053@verbatim
dd21889e 1054 <2D curve record 2> = "2" <_> <2D circle center> <_> <2D circle Dx> <_> <2D circle Dy> <_> <2D circle radius> <_\n>;
1055
1056 <2D circle center> = <2D point>;
1057
1058 <2D circle Dx> = <2D direction>;
1059
1060 <2D circle Dy> = <2D direction>;
1061
1062 <2D circle radius> = <real>;
bf62b306 1063@endverbatim
1064
1065**Description**
1066
dd21889e 1067\<2D curve record 2\> describes a circle. The circle data consist of a 2D point *P*, orthogonal 2D directions *D<sub>x</sub>* and *D<sub>y</sub>* and a non-negative real *r*. The circle has a center *P*. The circle plane is parallel to directions *D<sub>x</sub>* and *D<sub>y</sub>*. The circle has a radius *r* and is defined by the following parametric equation:
bf62b306 1068
dd21889e 1069@f[ C(u)=P+r \cdot (cos(u) \cdot D_{x} + sin(u) \cdot D_{y}),\; u \in [0,\; 2 \cdot \pi) . @f]
bf62b306 1070
dd21889e 1071The example record is interpreted as a circle which has a center *P*=(1,2). The circle plane is parallel to directions *D<sub>x</sub>*=(1,0) and *D<sub>y</sub>*=(0,1). The circle has a radius *r*=3 and is defined by the following parametric equation: @f$ C(u)=(1,2)+3 \cdot (cos(u) \cdot (1,0) + sin(u) \cdot (0,1)) @f$.
bf62b306 1072
1073
dd21889e 1074@subsubsection occt_brep_format_4_3_3 Ellipse - \<2D curve record 3\>
bf62b306 1075
1076**Example**
1077
1078@verbatim
1079 3 1 2 1 0 -0 1 4 3
1080@verbatim
1081
1082**BNF-like Definition**
1083
1084@verbatim
dd21889e 1085 <2D curve record 3> = "3" <_> <2D ellipse center> <_> <2D ellipse Dmaj> <_>
1086 <2D ellipse Dmin> <_> <2D ellipse Rmaj> <_> <2D ellipse Rmin> <_\n>;
1087
1088 <2D ellipse center> = <2D point>;
1089
1090 <2D ellipse Dmaj> = <2D direction>;
1091
1092 <2D ellipse Dmin> = <2D direction>;
1093
1094 <2D ellipse Rmaj> = <real>;
1095
1096 <2D ellipse Rmin> = <real>;
bf62b306 1097@endverbatim
1098
1099**Description**
1100
dd21889e 1101\<2D curve record 3\> describes an ellipse. The ellipse data are 2D point *P*, orthogonal 2D directions *D<sub>maj</sub>* and *D<sub>min</sub>* and non-negative reals *r<sub>maj</sub>* and *r<sub>min</sub>* that *r<sub>maj</sub>* @f$ \leq @f$ *r<sub>min</sub>*. The ellipse has a center *P*, major and minor axis directions *D<sub>maj</sub>* and *D<sub>min</sub>*, major and minor radii *r<sub>maj</sub>* and *r<sub>min</sub>* and is defined by the following parametric equation:
bf62b306 1102
dd21889e 1103@f[ C(u)=P+r_{maj} \cdot cos(u) \cdot D_{maj}+r_{min} \cdot sin(u) \cdot D_{min},\; u \in [0,\; 2 \cdot \pi) . @f]
bf62b306 1104
dd21889e 1105The example record is interpreted as an ellipse which has a center *P*=(1,2), major and minor axis directions *D<sub>maj</sub>*=(1,0) and *D<sub>min</sub>*=(0,1), major and minor radii *r<sub>maj</sub>*=4 and *r<sub>min</sub>*=3 and is defined by the following parametric equation: @f$ C(u)=(1,2)+4 \cdot cos(u) \cdot (1,0)+3 \cdot sin(u) \cdot (0,1) @f$.
bf62b306 1106
1107
dd21889e 1108@subsubsection occt_brep_format_4_3_4 Parabola - \<2D curve record 4\>
bf62b306 1109
1110**Example**
1111
1112@verbatim
1113 4 1 2 1 0 -0 1 16
1114@endverbatim
1115
1116**BNF-like Definition**
1117
1118@verbatim
dd21889e 1119 <2D curve record 4> = "4" <_> <2D parabola origin> <_> <2D parabola Dx> <_>
1120 <2D parabola Dy> <_> <2D parabola focal length> <_\n>;
1121
1122 <2D parabola origin> = <2D point>;
1123
1124 <2D parabola Dx> = <2D direction>;
1125
1126 <2D parabola Dy> = <2D direction>;
1127
1128 <2D parabola focal length> = <real>;
bf62b306 1129@endverbatim
1130
1131**Description**
1132
dd21889e 1133\<2D curve record 4\> describes a parabola. The parabola data consist of a 2D point *P*, orthogonal 2D directions *D<sub>x</sub>* and *D<sub>y</sub>* and a non-negative real *f*. The parabola coordinate system has its origin *P* and axis directions *D<sub>x</sub>* and *D<sub>y</sub>*. The parabola has a focus length *f* and is defined by the following parametric equation:
bf62b306 1134
dd21889e 1135@f[ C(u)=P+\frac{u^{2}}{4 \cdot f} \cdot D_{x}+u \cdot D_{y},\; u \in (-\infty,\; \infty) \Leftarrow f \neq 0;\\
1136C(u)=P+u \cdot D_{x},\; u \in (-\infty,\; \infty) \Leftarrow f = 0\; (degenerated\;case). @f]
bf62b306 1137
dd21889e 1138The example record is interpreted as a parabola in plane which passes through a point *P*=(1,2) and is parallel to directions *D<sub>x</sub>*=(1,0) and *D<sub>y</sub>*=(0,1). The parabola has a focus length *f*=16 and is defined by the following parametric equation: @f$ C(u)=(1,2)+ \frac{u^{2}}{64} \cdot (1,0)+u \cdot (0,1) @f$.
bf62b306 1139
bf62b306 1140
dd21889e 1141@subsubsection occt_brep_format_4_3_5 Hyperbola - \<2D curve record 5\>
bf62b306 1142**Example**
1143
11445 1 2 1 0 -0 1 3 4
1145
1146
1147**BNF-like Definition**
1148
1149@verbatim
dd21889e 1150 <2D curve record 5> = "5" <_> <2D hyperbola origin> <_> <2D hyperbola Dx> <_>
1151 <2D hyperbola Dy> <_> <2D hyperbola Kx> <_> <2D hyperbola Ky> <_\n>;
1152
1153 <2D hyperbola origin> = <2D point>;
1154
1155 <2D hyperbola Dx> = <2D direction>;
1156
1157 <2D hyperbola Dy> = <2D direction>;
1158
1159 <2D hyperbola Kx> = <real>;
1160
1161 <2D hyperbola Ky> = <real>;
bf62b306 1162@endverbatim
1163
1164**Description**
1165
dd21889e 1166\<2D curve record 5\> describes a hyperbola. The hyperbola data consist of a 2D point *P*, orthogonal 2D directions *D<sub>x</sub>* and *D<sub>y</sub>* and non-negative reals *k<sub>x</sub>* and *k<sub>y</sub>*. The hyperbola coordinate system has origin *P* and axis directions *D<sub>x</sub>* and *D<sub>y</sub>*. The hyperbola is defined by the following parametric equation:
bf62b306 1167
dd21889e 1168@f[ C(u)=P+k_{x} \cdot cosh(u) D_{x}+k_{y} \cdot sinh(u) \cdot D_{y},\; u \in (-\infty,\; \infty). @f]
bf62b306 1169
dd21889e 1170The example record is interpreted as a hyperbola with coordinate system which has origin *P*=(1,2) and axis directions *D<sub>x</sub>*=(1,0) and *D<sub>y</sub>*=(0,1). Other data for the hyperbola are *k<sub>x</sub>*=5 and *k<sub>y</sub>*=4. The hyperbola is defined by the following parametric equation: @f$ C(u)=(1,2)+3 \cdot cosh(u) \cdot (1,0)+4 \cdot sinh(u) \cdot (0,1) @f$.
bf62b306 1171
1172
dd21889e 1173@subsubsection occt_brep_format_4_3_6 Bezier Curve - \<2D curve record 6\>
bf62b306 1174
1175**Example**
1176
1177@verbatim
11786 1 2 0 1  4 1 -2  5 2 3  6
1179@endverbatim
1180
1181**BNF-like Definition**
1182
1183@verbatim
dd21889e 1184 <2D curve record 6> = "6" <_> <2D Bezier rational flag> <_> <2D Bezier degree>
1185 <2D Bezier weight poles> <_\n>;
1186
1187 <2D Bezier rational flag> = <flag>;
1188
1189 <2D Bezier degree> = <int>;
1190
1191 <2D Bezier weight poles> = (<_> <2D Bezier weight pole>) ^ (<2D Bezier degree> <+> “1”);
1192
1193 <2D Bezier weight pole> = <2D point> [<_> <real>];
bf62b306 1194@endverbatim
1195
1196**Description**
1197
dd21889e 1198\<2D curve record 6\> describes a Bezier curve. The curve data consist of a rational flag *r*, a degree @f$ m \leq 25 @f$ and weight poles.
bf62b306 1199
dd21889e 1200The weight poles are *m*+1 2D points *B<sub>0</sub> ... B<sub>m</sub>* if the flag *r* is 0. The weight poles are *m*+1 pairs *B<sub>0</sub>h<sub>0</sub> ... B<sub>m</sub>h<sub>m</sub>* if the flag *r* is 1. Here *B<sub>i</sub>* is a 2D point and *h<sub>i</sub>* is a positive real @f$ (0\leq i\leq m) @f$. *h<sub>i</sub>*=1 @f$(0\leq i\leq m) @f$ if the flag *r* is 0.
bf62b306 1201
1202The Bezier curve is defined by the following parametric equation:
1203
dd21889e 1204@f[ C(u)= \frac{\sum_{i=0}^{m} B_{i} \cdot h_{i} \cdot C_{m}^{i} \cdot u^{i} \cdot (1-u)^{m-i}}{\sum_{i=0}^{m} h_{i} \cdot C_{m}^{i} \cdot u^{i} \cdot (1-u)^{m-i}},\; u \in [0,1] @f]
bf62b306 1205
dd21889e 1206where @f$ 0^{0} \equiv 1 @f$.
bf62b306 1207
dd21889e 1208The example record is interpreted as a Bezier curve with a rational flag *r*=1, a degree *m*=2 and weight poles *B<sub>0</sub>*=(0,1), *h<sub>0</sub>*=4, *B<sub>1</sub>*=(1,-2), *h<sub>1</sub>*=5 and *B<sub>2</sub>*=(2,3), *h<sub>2</sub>*=6. The Bezier curve is defined by the following parametric equation:
bf62b306 1209
dd21889e 1210@f[ C(u)= \frac{(0,1) \cdot 4 \cdot (1-u)^{2}+(1,-2) \cdot 5 \cdot 2 \cdot u \cdot (1-u)+(2,3) \cdot 6 \cdot u^{2}}{ 4 \cdot (1-u)^{2}+5 \cdot 2 \cdot u \cdot (1-u)+6 \cdot u^{2}} . @f]
bf62b306 1211
1212
dd21889e 1213@subsubsection occt_brep_format_4_3_7 B-spline Curve - \<2D curve record 7\>
bf62b306 1214
1215**Example**
1216
1217@verbatim
12187 1 0  1 3 5  0 1  4 1 -2  5 2 3  6
1219 0 1 0.25 1 0.5 1 0.75 1 1 1
1220@endverbatim
1221
1222**BNF-like Definition**
1223
1224@verbatim
dd21889e 1225 <2D curve record 7> = "7" <_> <2D B-spline rational flag> <_> "0" <_> <2D B-spline degree> <_> <2D B-spline pole count> <_> <2D B-spline multiplicity knot count> <2D B-spline weight poles> <_\n> <2D B-spline multiplicity knots> <_\n>;
1226
1227 <2D B-spline rational flag> = <flag>;
1228
1229 <2D B-spline degree> = <int>;
1230
1231 <2D B-spline pole count> = <int>;
1232
1233 <2D B-spline multiplicity knot count> = <int>;
1234
1235 <2D B-spline weight poles> = <2D B-spline weight pole> ^ <2D B-spline pole count>;
1236
1237 <2D B-spline weight pole> = <_> <2D point> [<_> <real>];
1238
1239 <2D B-spline multiplicity knots> =
1240 <2D B-spline multiplicity knot> ^ <2D B-spline multiplicity knot count>;
1241
1242 <2D B-spline multiplicity knot> = <_> <real> <_> <int>;
bf62b306 1243@endverbatim
1244
1245**Description**
1246
dd21889e 1247\<2D curve record 7\> describes a B-spline curve. The curve data consist of a rational flag *r*, a degree @f$ m \leq 25 @f$, a pole count @f$ n \geq 2 @f$, a multiplicity knot count *k*, weight poles and multiplicity knots.
bf62b306 1248
dd21889e 1249The weight poles are *n* 2D points *B<sub>1</sub> ... B<sub>n</sub>* if the flag *r* is 0. The weight poles are *n* pairs *B<sub>1</sub>h<sub>1</sub> ... B<sub>n</sub>h<sub>n</sub>* if the flag *r* is 1. Here *B<sub>i</sub>* is a 2D point and *h<sub>i</sub>* is a positive real @f$ (1\leq i\leq n) @f$. *h<sub>i</sub>*=1 @f$(1\leq i\leq n) @f$ if the flag *r* is 0.
bf62b306 1250
dd21889e 1251The multiplicity knots are *k* pairs *u<sub>1</sub>q<sub>1</sub> ... u<sub>k</sub>q<sub>k</sub>*. Here *u<sub>i</sub>* is a knot with multiplicity @f$ q_{i} \geq 1\; (1 \leq i \leq k) @f$ so that
bf62b306 1252
dd21889e 1253@f[ u_{i} < u_{i+1}\; (1 \leq i \leq k-1), \\
1254q_{1} \leq m+1,\; q_{k} \leq m+1,\; q_{i} \leq m\; (2 \leq i \leq k-1),\; \sum_{i=1}^{k}q_{i}=m+n+1 . @f]
bf62b306 1255
1256The B-spline curve is defined by the following parametric equation:
1257
dd21889e 1258@f[ C(u)= \frac{\sum_{i=1}^{n} B_{i} \cdot h_{i} \cdot N_{i,m+1}(u) }{\sum_{i=1}^{n} h_{i} \cdot N_{i,m+1}(u)},\; u \in [u_{1},\; u_{k}] @f]
bf62b306 1259
dd21889e 1260where functions *N<sub>i,j</sub>* have the following recursion definition by *j*
bf62b306 1261
dd21889e 1262@f[ N_{i,1}(u)=\left\{\begin{matrix}
12631\Leftarrow \bar{u}_{i} \leq u \leq \bar{u}_{i+1}\\
12640\Leftarrow u < \bar{u}_{i} \vee \bar{u}_{i+1} \leq u \end{matrix} \right.,\;
1265N_{i,j}(u)=\frac{(u-\bar{u}_{i}) \cdot N_{i,j-1}(u) }{\bar{u}_{i+j-1}-\bar{u}_{i}}+ \frac{(\bar{u}_{i+j}-u) \cdot N_{i+1,j-1}(u)}{\bar{u}_{i+j}-\bar{u}_{i+1}},\;(2 \leq j \leq m+1) @f]
bf62b306 1266
1267where
1268
dd21889e 1269@f[ \bar{u}_{i}=u_{j}\; (1\leq j\leq k,\; \sum_{l=1}^{j-1}q_{l}+1 \leq i \leq \sum_{l=1}^{j}q_{l}) . @f]
bf62b306 1270
dd21889e 1271The example record is interpreted as a B-spline curve with a rational flag *r*=1, a degree *m*=1, a pole count *n*=3, a multiplicity knot count *k*=5, weight poles *B<sub>1</sub>*=(0,1), *h<sub>1</sub>*=4, *B<sub>2</sub>*=(1,-2), *h<sub>2</sub>*=5 and *B<sub>3</sub>*=(2,3), *h<sub>3</sub>*=6 and multiplicity knots *u<sub>1</sub>*=0, *q<sub>1</sub>*=1, *u<sub>2</sub>*=0.25, *q<sub>2</sub>*=1, *u<sub>3</sub>*=0.5, *q<sub>3</sub>*=1, *u<sub>4</sub>*=0.75, *q<sub>4</sub>*=1 and *u<sub>5</sub>*=1, *q<sub>5</sub>*=1. The B-spline curve is defined by the following parametric equation:
bf62b306 1272
dd21889e 1273@f[ C(u)= \frac{(0,1) \cdot 4 \cdot N_{1,2}(u)+(1,-2) \cdot 5 \cdot N_{2,2}(u)+(2,3) \cdot 6 \cdot N_{3,2}(u)}{ 4 \cdot N_{1,2}(u)+5 \cdot N_{2,2}(u)+6 \cdot N_{3,2}(u)} . @f]
bf62b306 1274
1275
dd21889e 1276@subsubsection occt_brep_format_4_3_8 Trimmed Curve - \<2D curve record 8\>
bf62b306 1277
1278**Example**
1279
1280@verbatim
1281 8 -4 5
1282 1 1 2 1 0
1283@endverbatim
1284
1285**BNF-like Definition**
1286
1287@verbatim
dd21889e 1288 <2D curve record 8> = "8" <_> <2D trimmed curve u min> <_> <2D trimmed curve u max> <_\n>
1289 <2D curve record>;
1290
1291 <2D trimmed curve u min> = <real>;
1292
1293 <2D trimmed curve u max> = <real>;
bf62b306 1294@endverbatim
1295
dd21889e 1296**Description**
bf62b306 1297
dd21889e 1298\<2D curve record 8\> describes a trimmed curve. The trimmed curve data consist of reals *u<sub>min</sub>* and *u<sub>max</sub>* and a \<2D curve record\> so that *u<sub>min</sub>* < *u<sub>max</sub>*. The trimmed curve is a restriction of the base curve *B* described in the record to the segment @f$ [u_{min},\;u_{max}]\subseteq domain(B) @f$. The trimmed curve is defined by the following parametric equation:
bf62b306 1299
dd21889e 1300@f[ C(u)=B(u),\; u \in [u_{min},\;u_{max}] . @f]
bf62b306 1301
dd21889e 1302The example record is interpreted as a trimmed curve with *u<sub>min</sub>*=-4, *u<sub>max</sub>*=5 and base curve @f$ B(u)=(1,2)+u \cdot (1,0) @f$. The trimmed curve is defined by the following parametric equation: @f$ C(u)=(1,2)+u \cdot (1,0),\; u \in [-4,5] @f$.
bf62b306 1303
1304
dd21889e 1305@subsubsection occt_brep_format_4_3_9 Offset Curve - \<2D curve record 9\>
bf62b306 1306
1307**Example**
1308
1309@verbatim
1310 9 2
1311 1 1 2 1 0
1312@endverbatim
1313
1314**BNF-like Definition**
1315
1316@verbatim
dd21889e 1317<2D curve record 9> = "9" <_> <2D offset curve distance> <_\n> <2D curve record>;
1318
1319<2D offset curve distance> = <real>;
bf62b306 1320@endverbatim
1321
1322**Description**
1323
dd21889e 1324\<2D curve record 9\> describes an offset curve. The offset curve data consist of a distance *d* and a \<2D curve record\>. The offset curve is the result of offsetting the base curve *B* described in the record to the distance *d* along the vector @f$ (B'_{Y}(u),\; -B'_{X}(u)) \neq \vec{0} @f$ where @f$ B(u)=(B'_{X}(u),\; B'_{Y}(u)) @f$. The offset curve is defined by the following parametric equation:
bf62b306 1325
dd21889e 1326@f[ C(u)=B(u)+d \cdot (B'_{Y}(u),\; -B'_{X}(u)),\; u \in domain(B) . @f]
bf62b306 1327
dd21889e 1328The example record is interpreted as an offset curve with a distance *d*=2 and base curve @f$ B(u)=(1,2)+u \cdot (1,0) @f$ and is defined by the following parametric equation: @f$ C(u)=(1,2)+u \cdot (1,0)+2 \cdot (0,-1) @f$.
bf62b306 1329
dd21889e 1330@subsection occt_brep_format_4_4 3D polygons
bf62b306 1331
1332**Example**
1333
1334@verbatim
1335 Polygon3D 1
1336 2 1
1337 0.1
1338 1 0 0 2 0 0
1339 0 1
1340@endverbatim
1341
1342**BNF-like Definition**
1343
1344@verbatim
dd21889e 1345 <3D polygons> = <3D polygon header> <_\n> <3D polygon records>;
1346
1347 <3D polygon header> = "Polygon3D" <_> <3D polygon record count>;
1348
1349 <3D polygon records> = <3D polygon record> ^ <3D polygon record count>;
1350
1351 <3D polygon record> =
1352 <3D polygon node count> <_> <3D polygon flag of parameter presence> <_\n>
1353 <3D polygon deflection> <_\n>
1354 <3D polygon nodes> <_\n>
1355 [<3D polygon parameters> <_\n>];
1356
1357 <3D polygon node count> = <int>;
1358
1359 <3D polygon flag of parameter presence> = <flag>;
1360
1361 <3D polygon deflection> = <real>;
1362
1363 <3D polygon nodes> = (<3D polygon node> <_>) ^ <3D polygon node count>;
1364
1365 <3D polygon node> = <3D point>;
1366
1367 <3D polygon u parameters> = (<3D polygon u parameter> <_>) ^ <3D polygon node count>;
1368
1369 <3D polygon u parameter> = <real>;
bf62b306 1370@endverbatim
1371
1372**Description**
1373
dd21889e 1374\<3D polygons\> record describes a 3D polyline *L* which approximates a 3D curve *C*. The polyline data consist of a node count @f$ m \geq 2 @f$, a parameter presence flag *p*, a deflection @f$ d \geq 0 @f$, nodes @f$ N_{i}\; (1\leq i \leq m) @f$ and parameters @f$ u_{i}\; (1\leq i \leq m) @f$. The parameters are present only if *p*=1. The polyline *L* passes through the nodes. The deflection *d* describes the deflection of polyline *L* from the curve *C*:
bf62b306 1375
dd21889e 1376@f[ \underset{P \in C}{max}\; \underset{Q \in L}{min}|Q-P| \leq d . @f]
bf62b306 1377
dd21889e 1378The parameter @f$ u_{i}\; (1\leq i \leq m) @f$ is the parameter of the node *N<sub>i</sub>* on the curve *C*:
bf62b306 1379
dd21889e 1380@f[ C(u_{i})=N_{i} . @f]
bf62b306 1381
dd21889e 1382The example record describes a polyline from *m*=2 nodes with a parameter presence flag *p*=1, a deflection *d*=0.1, nodes *N<sub>1</sub>*=(1,0,0) and *N<sub>2</sub>*=(2,0,0) and parameters *u<sub>1</sub>*=0 and *u<sub>2</sub>*=1.
bf62b306 1383
1384
dd21889e 1385@subsection occt_brep_format_4_5 Triangulations
bf62b306 1386
1387**Example**
1388
1389@verbatim
1390 Triangulations 6
1391 4 2 1 0
1392 0 0 0 0 0 3 0 2 3 0 2 0 0 0 3 0 3 -2 0 -2 2 4 3 2 1 4
1393 4 2 1 0
1394 0 0 0 1 0 0 1 0 3 0 0 3 0 0 0 1 3 1 3 0 3 2 1 3 1 4
1395 4 2 1 0
1396 0 0 3 0 2 3 1 2 3 1 0 3 0 0 0 2 1 2 1 0 3 2 1 3 1 4
1397 4 2 1 0
1398 0 2 0 1 2 0 1 2 3 0 2 3 0 0 0 1 3 1 3 0 3 2 1 3 1 4
1399 4 2 1 0
1400 0 0 0 0 2 0 1 2 0 1 0 0 0 0 0 2 1 2 1 0 3 2 1 3 1 4
1401 4 2 1 0
1402 1 0 0 1 0 3 1 2 3 1 2 0 0 0 3 0 3 -2 0 -2 2 4 3 2 1 4
1403@endverbatim
1404
1405**BNF-like Definition**
1406
1407@verbatim
dd21889e 1408 <triangulations> = <triangulation header> <_\n> <triangulation records>;
1409
1410 <triangulation header> = "Triangulations" <_> <triangulation count>;
1411
1412 <triangulation records> = <triangulation record> ^ <triangulation count>;
1413
1414 <triangulation record> = <triangulation node count> <_> <triangulation triangle count> <_> <triangulation parameter presence flag> <_> <triangulation deflection> <_\n>
1415 <triangulation nodes> [<_> <triangulation u v parameters>] <_> <triangulation triangles> <_\n>;
1416
1417 <triangulation node count> = <int>;
1418
1419 <triangulation triangle count> = <int>;
1420
1421 <triangulation parameter presence flag> = <flag>;
1422
1423 <triangulation deflection> = <real>;
1424
1425 <triangulation nodes> = (<triangulation node> <_>) ^ <triangulation node count>;
1426
1427 <triangulation node> = <3D point>;
1428
1429 <triangulation u v parameters> =
1430 (<triangulation u v parameter pair> <_>) ^ <triangulation node count>;
1431
1432 <triangulation u v parameter pair> = <real> <_> <real>;
1433
1434 <triangulation triangles> = (<triangulation triangle> <_>) ^ <triangulation triangle count>;
1435
1436 <triangulation triangle> = <int> <_> <int> <_> <int>.
bf62b306 1437@endverbatim
1438
1439**Description**
1440
dd21889e 1441\<triangulation record\> describes a triangulation *T* which approximates a surface *S*. The triangulation data consist of a node count @f$ m \geq 3 @f$, a triangle count @f$ k \geq 1 @f$, a parameter presence flag *p*, a deflection @f$ d \geq 0 @f$, nodes @f$ N_{i}\; (1\leq i \leq m) @f$, parameter pairs @f$ u_{i}\; v_{i}\; (1\leq i \leq m) @f$, triangles @f$ n_{j,1}\; n_{j,2}\; n_{j,3}\; (1\leq j \leq k,\; n_{j,l} \in \left \{1,...,m \right \}\; (1\leq l\leq 3)) @f$. The parameters are present only if *p*=1. The deflection describes the triangulation deflection from the surface:
bf62b306 1442
dd21889e 1443@f[ \underset{P \in S}{max}\; \underset{Q \in T}{min}|Q-P| \leq d . @f]
bf62b306 1444
dd21889e 1445The parameter pair @f$ u_{i}\; v_{i}\; (1\leq i \leq m) @f$ describes the parameters of node *N<sub>i</sub>* on the surface:
bf62b306 1446
dd21889e 1447@f[ S(u_{i},v_{i})=N_{i} . @f]
bf62b306 1448
dd21889e 1449The triangle @f$ n_{j,1}\; n_{j,2}\; n_{j,3}\; (1\leq j \leq k) @f$ is interpreted as a triangle of nodes @f$ N_{n_{j},1}\; N_{n_{j},2}@f$ and @f$ N_{n_{j},3} @f$ with circular traversal of the nodes in the order @f$ N_{n_{j},1}\; N_{n_{j},2}@f$ and @f$ N_{n_{j},3} @f$. From any side of the triangulation *T* all its triangles have the same direction of the node circular traversal: either clockwise or counterclockwise.
bf62b306 1450
1451Triangulation record
1452
1453@verbatim
1454 4 2 1 0
1455 0 0 0 0 0 3 0 2 3 0 2 0 0 0 3 0 3 -2 0 -2 2 4 3 2 1 4
1456@endverbatim
1457
dd21889e 1458describes a triangulation with *m*=4 nodes, *k*=2 triangles, parameter presence flag *p*=1, deflection *d*=0, nodes *N<sub>1</sub>*=(0,0,0), *N<sub>2</sub>*=(0,0,3), *N<sub>3</sub>*=(0,2,3) and *N<sub>4</sub>*=(0,2,0), parameters (*u<sub>1</sub>*, *v<sub>1</sub>*)=(0,0), (*u<sub>2</sub>*, *v<sub>2</sub>*)=(3,0), (*u<sub>3</sub>*, *v<sub>3</sub>*)=(3,-2) and (*u<sub>4</sub>*, *v<sub>4</sub>*)=(0,-2), and triangles (*n<sub>1,1</sub>*, *n<sub>1,2</sub>*, *n<sub>1,3</sub>*)=(2,4,3) and (*n<sub>2,1</sub>*, *n<sub>2,2</sub>*, *n<sub>2,3</sub>*)=(2,1,4). From the point (1,0,0) ((-1,0,0)) the triangles have clockwise (counterclockwise) direction of the node circular traversal.
bf62b306 1459
1460
dd21889e 1461@subsection occt_brep_format_4_6 Polygons on triangulations
bf62b306 1462
1463**Example**
1464
1465@verbatim
1466 PolygonOnTriangulations 24
1467 2 1 2
1468 p 0.1 1 0 3
1469 2 1 4
1470 p 0.1 1 0 3
1471 2 2 3
1472 p 0.1 1 0 2
1473 2 1 2
1474 p 0.1 1 0 2
1475 2 4 3
1476 p 0.1 1 0 3
1477 2 1 4
1478 p 0.1 1 0 3
1479 2 1 4
1480 p 0.1 1 0 2
1481 2 1 2
1482 p 0.1 1 0 2
1483 2 1 2
1484 p 0.1 1 0 3
1485 2 2 3
1486 p 0.1 1 0 3
1487 2 2 3
1488 p 0.1 1 0 2
1489 2 4 3
1490 p 0.1 1 0 2
1491 2 4 3
1492 p 0.1 1 0 3
1493 2 2 3
1494 p 0.1 1 0 3
1495 2 1 4
1496 p 0.1 1 0 2
1497 2 4 3
1498 p 0.1 1 0 2
1499 2 1 2
1500 p 0.1 1 0 1
1501 2 1 4
1502 p 0.1 1 0 1
1503 2 4 3
1504 p 0.1 1 0 1
1505 2 1 4
1506 p 0.1 1 0 1
1507 2 1 2
1508 p 0.1 1 0 1
1509 2 2 3
1510 p 0.1 1 0 1
1511 2 4 3
1512 p 0.1 1 0 1
1513 2 2 3
1514 p 0.1 1 0 1
1515@endverbatim
1516
1517**BNF-like Definition**
1518
1519@verbatim
dd21889e 1520 <polygons on triangulations> = <polygons on triangulations header> <_\n>
1521 <polygons on triangulations records>;
1522
1523 <polygons on triangulations header> =
1524 "PolygonOnTriangulations" <_> <polygons on triangulations record count>;
1525
1526 <polygons on triangulations record count> = <int>;
1527
1528 <polygons on triangulations records> =
1529 <polygons on triangulations record> ^ <polygons on triangulations record count>;
1530
1531 <polygons on triangulations record> =
1532 <polygons on triangulations node count> <_> <polygons on triangulations node numbers> <_\n>
1533 "p" <_> <polygons on triangulations deflection> <_>
1534 <polygons on triangulations parameter presence flag>
1535 [<_> <polygons on triangulations u parameters>] <_\n>;
1536
1537 <polygons on triangulations node count> = <int>;
1538
1539 <polygons on triangulations node numbers> =
1540 <polygons on triangulations node number> ^ <polygons on triangulations node count>;
1541
1542 <polygons on triangulations node number> = <int>;
1543
1544 <polygons on triangulations deflection> = <real>;
1545
1546 <polygons on triangulations parameter presence flag> = <flag>;
1547
1548 <polygons on triangulations u parameters> =
1549 (<polygons on triangulations u parameter> <_>) ^ <polygons on triangulations node count>;
1550
1551 <polygons on triangulations u parameter> = <real>;
bf62b306 1552@endverbatim
1553
1554**Description**
1555
dd21889e 1556\<polygons on triangulations\> describes a polyline *L* on a triangulation which approximates a curve *C*. The polyline data consist of a node count @f$ m \geq 2 @f$, node numbers @f$ n_{i} \geq 1 @f$, deflection @f$ d \geq 0 @f$, a parameter presence flag *p* and parameters @f$ u_{i}\; (1\leq i\leq m) @f$. The parameters are present only if *p*=1. The deflection *d* describes the deflection of polyline *L* from the curve *C*:
bf62b306 1557
dd21889e 1558@f[ \underset{P \in C}{max}\; \underset{Q \in L}{min}|Q-P| \leq d . @f]
bf62b306 1559
dd21889e 1560Parameter @f$ u_{i}\; (1\leq i\leq m) @f$ is *n<sub>i</sub>*-th node *C(u<sub>i</sub>)* parameter on curve *C*.
bf62b306 1561
1562
1563@subsection occt_brep_format_4_7 Geometric Sense of a Curve
1564
dd21889e 1565Geometric sense of curve *C* described above is determined by the direction of parameter *u* increasing.
bf62b306 1566
1567
dd21889e 1568@section occt_brep_format_5 Shapes
bf62b306 1569
1570An example of section shapes and a whole *.brep file are given in chapter 7 "Appendix".
1571
1572
1573**BNF-like Definition**
1574
1575@verbatim
dd21889e 1576 <shapes> = <shape header> <_\n> <shape records> <_\n> <shape final record>;
1577
1578 <shape header> = "TShapes" <_> <shape count>;
1579
1580 <shape count> = <int>;
1581
1582 <shape records> = <shape record> ^ <shape count>;
1583
1584 <shape record> = <shape subrecord> <_\n> <shape flag word> <_\n> <shape subshapes> <_\n>;
1585
1586 <shape flag word> = <flag> ^ 7;
1587
1588 <shape subshapes> = (<shape subshape> <_>)* "*";
1589
1590 <shape subshape> =
1591 <shape subshape orientation> <shape subshape number> <_> <shape location number>;
1592
1593 <shape subshape orientation> = "+" | "-" | "i" | "e";
1594
1595 <shape subshape number> = <int>;
1596
1597 <shape location number> = <int>;
1598
1599 <shape final record> = <shape subshape>;
1600
1601 <shape subrecord> =
1602 ("Ve" <_\n> <vertex data> <_\n>) |
1603 ("Ed" <_\n> <edge data> <_\n>) |
1604 ("Wi" <_\n> <_\n>) |
1605 ("Fa" <_\n> <face data>) |
1606 ("Sh" <_\n> <_\n>) |
1607 ("So" <_\n> <_\n>) |
1608 ("CS" <_\n> <_\n>) |
1609 ("Co" <_\n> <_\n>);
bf62b306 1610@endverbatim
1611
1612**Description**
1613
dd21889e 1614\<shape flag word\> @f$ f_{1}\; f_{2}\; f_{3}\; f_{4}\; f_{5}\; f_{6}\; f_{7} @f$ \<flag\>s @f$ f_{i}\;(1\leq i \leq 7) @f$ are interpreted as shape flags in the following way:
bf62b306 1615
dd21889e 1616 * @f$ f_{1} @f$ – free;
1617 * @f$ f_{2} @f$ – modified;
1618 * @f$ f_{3} @f$ – IGNORED(version 1) \\ checked (version 2);
1619 * @f$ f_{4} @f$ – orientable;
1620 * @f$ f_{5} @f$ – closed;
1621 * @f$ f_{6} @f$ – infinite;
1622 * @f$ f_{7} @f$ – convex.
bf62b306 1623
1624The flags are used in a special way [1].
1625
dd21889e 1626\<shape subshape orientation\> is interpreted in the following way:
bf62b306 1627
1628 * + – forward;
1629 * - – reversed;
1630 * i – internal;
1631 * e – external.
1632
dd21889e 1633\<shape subshape orientation\> is used in a special way [1].
bf62b306 1634
dd21889e 1635\<shape subshape number\> is the number of a \<shape record\> which is located in this section above the \<shape subshape number\>. \<shape record\> numbering is backward and starts from 1.
bf62b306 1636
dd21889e 1637\<shape subrecord\> types are interpreted in the following way:
bf62b306 1638
1639 * "Ve" – vertex;
1640 * "Ed" – edge;
1641 * "Wi" – wire;
1642 * "Fa" – face;
1643 * "Sh" – shell;
1644 * "So" – solid;
1645 * "CS" – compsolid;
1646 * "Co" – compound.
1647
dd21889e 1648\<shape final record\> determines the orientation and location for the whole model.
bf62b306 1649
1650@subsection occt_brep_format_5_1 Common Terms
1651
dd21889e 1652The terms below are used by \<vertex data\>, \<edge data\> and \<face data\>.
bf62b306 1653
1654
1655**BNF-like Definition**
1656
1657@verbatim
dd21889e 1658 <location number> = <int>;
1659
1660 <3D curve number> = <int>;
1661
1662 <surface number> = <int>;
1663
1664 <2D curve number> = <int>;
1665
1666 <3D polygon number> = <int>;
1667
1668 <triangulation number> = <int>;
1669
1670 <polygon on triangulation number> = <int>;
1671
1672 <curve parameter minimal and maximal values> = <real> <_> <real>;
1673
1674 <curve values for parameter minimal and maximal values> =
1675 real> <_> <real> <_> <real> <_> <real>;
bf62b306 1676@endverbatim
1677
1678**Description**
1679
dd21889e 1680\<location number\> is the number of \<location record\> from section locations. \<location record\> numbering starts from 1. \<location number\> 0 is interpreted as the identity location.
bf62b306 1681
dd21889e 1682\<3D curve number\> is the number of a \<3D curve record\> from subsection \<3D curves\> of section \<geometry\>. \<3D curve record\> numbering starts from 1.
bf62b306 1683
dd21889e 1684\<surface number\> is the number of a \<surface record\> from subsection \<surfaces\> of section \<geometry\>. \<surface record\> numbering starts from 1.
bf62b306 1685
dd21889e 1686\<2D curve number\> is the number of a \<2D curve record\> from subsection \<2D curves\> of section \<geometry\>. \<2D curve record\> numbering starts from 1.
bf62b306 1687
dd21889e 1688\<3D polygon number\> is the number of a \<3D polygon record\> from subsection \<3D polygons\> of section \<geometry\>. \<3D polygon record\> numbering starts from 1.
bf62b306 1689
dd21889e 1690\<triangulation number\> is the number of a \<triangulation record\> from subsection \<triangulations\> of section \<geometry\>. \<triangulation record\> numbering starts from 1.
bf62b306 1691
dd21889e 1692\<polygon on triangulation\> number is the number of a \<polygons on triangulations record\> from subsection \<polygons on triangulations\> of section \<geometry\>.
1693\<polygons on triangulations record\> numbering starts from 1.
bf62b306 1694
dd21889e 1695\<curve parameter minimal and maximal values\> *u<sub>min</sub>* and *u<sub>max</sub>* are the curve parameter *u* bounds: *u<sub>min</sub>* @f$ \leq @f$ *u* @f$ \leq @f$ *u<sub>max</sub>*.
bf62b306 1696
dd21889e 1697\<curve values for parameter minimal and maximal values\> *u<sub>min</sub>* and *u<sub>max</sub>* are real pairs *x<sub>min</sub> y<sub>min</sub>* and *x<sub>max</sub> y<sub>max</sub>* that (*x<sub>min</sub>*, *y<sub>min</sub>*)= *C* (*u<sub>min</sub>*) and (*x<sub>max</sub>*, *y<sub>max</sub>*)= *C* (*u<sub>max</sub>*) where *C* is a parametric equation of the curve.
bf62b306 1698
1699
dd21889e 1700@subsection occt_brep_format_5_2 Vertex data
bf62b306 1701
1702**BNF-like Definition**
1703
1704@verbatim
dd21889e 1705 <vertex data> = <vertex data tolerance> <_\n> <vertex data 3D representation> <_\n>
1706 <vertex data representations>;
1707
1708 <vertex data tolerance> = <real>;
1709
1710 <vertex data 3D representation> = <3D point>;
1711
1712 <vertex data representations> = (<vertex data representation> <_\n>)* "0 0";
1713
1714 <vertex data representation> = <vertex data representation u parameter> <_>
1715 <vertex data representation data> <_> <location number>;
1716
1717 <vertex data representation u parameter> = <real>;
1718
1719 <vertex data representation data> =
1720 ("1" <_> <vertex data representation data 1>) |
1721 ("2" <_> <vertex data representation data 2>) |
1722 ("3" <_> <vertex data representation data 3>);
1723
1724 <vertex data representation data 1> = <3D curve number>;
1725
1726 <vertex data representation data 2> = <2D curve number> <_> <surface number>;
1727
1728 <vertex data representation data 3> =
1729 <vertex data representation v parameter> <_> <surface number>;
1730
1731 <vertex data representation v parameter> = <real>;
bf62b306 1732@endverbatim
1733
1734**Description**
1735
dd21889e 1736The usage of \<vertex data representation u parameter\> *U* is described below.
bf62b306 1737
dd21889e 1738\<vertex data representation data 1\> and parameter *U* describe the position of the vertex *V* on a 3D curve *C*. Parameter *U* is a parameter of the vertex *V* on the curve *C*: *C(u)=V*.
bf62b306 1739
dd21889e 1740\<vertex data representation data 2\> and parameter *U* describe the position of the vertex *V* on a 2D curve *C* which is located on a surface. Parameter *U* is a parameter of the vertex *V* on the curve *C*: *C(u)=V*.
bf62b306 1741
dd21889e 1742\<vertex data representation data 3\> and parameter *u* describe the position of the vertex *V* on a surface *S* through \<vertex data representation v parameter\> *v*: *S(u,v)=V*.
bf62b306 1743
dd21889e 1744\<vertex data tolerance\> *t* describes the maximum distance from the vertex *V* to the set *R* of vertex *V* representations:
bf62b306 1745
dd21889e 1746@f[ \underset{P \in R }{max} |P-V| \leq t . @f]
bf62b306 1747
1748
dd21889e 1749@subsection occt_brep_format_5_3 Edge data
bf62b306 1750
1751**BNF-like Definition**
1752
1753@verbatim
dd21889e 1754 <edge data> = <_> <edge data tolerance> <_> <edge data same parameter flag> <_> edge data same range flag> <_> <edge data degenerated flag> <_\n> <edge data representations>;
1755
1756 <edge data tolerance> = <real>;
1757
1758 <edge data same parameter flag> = <flag>;
1759
1760 <edge data same range flag> = <flag>;
1761
1762 <edge data degenerated flag> = <flag>;
1763
1764 <edge data representations> = (<edge data representation> <_\n>)* "0";
1765
1766 <edge data representation> =
1767 "1" <_> <edge data representation data 1>
1768 "2" <_> <edge data representation data 2>
1769 "3" <_> <edge data representation data 3>
1770 "4" <_> <edge data representation data 4>
1771 "5" <_> <edge data representation data 5>
1772 "6" <_> <edge data representation data 6>
1773 "7" <_> <edge data representation data 7>;
1774
1775 <edge data representation data 1> = <3D curve number> <_> <location number> <_>
1776 <curve parameter minimal and maximal values>;
1777
1778 <edge data representation data 2> = <2D curve number> <_> <surface number> <_>
1779 <location number> <_> <curve parameter minimal and maximal values>
1780 [<_\n> <curve values for parameter minimal and maximal values>];
1781
1782 <edge data representation data 3> = (<2D curve number> <_>) ^ 2 <continuity order> <_> <surface number> <_> <location number> <_> <curve parameter minimal and maximal values> <\n> <curve values for parameter minimal and maximal values>];
1783
1784 <continuity order> = "C0" | "C1" | "C2" | "C3" | "CN" | "G1" | "G2".
1785
1786 <edge data representation data 4> =
1787 <continuity order> (<_> <surface number> <_> <location number>) ^ 2;
1788
1789 <edge data representation data 5> = <3D polygon number> <_> <location number>;
1790
1791 <edge data representation data 6> =
1792 <polygon on triangulation number> <_> <triangulation number> <_> <location number>;
1793
1794 <edge data representation data 7> = (<polygon on triangulation number> <_>) ^ 2
1795 <triangulation number> <_> <location number>;
bf62b306 1796@endverbatim
1797
1798**Description**
1799
dd21889e 1800Flags \<edge data same parameter flag\>, \<edge data same range flag\> and \<edge data degenerated flag\> are used in a special way [1].
bf62b306 1801
dd21889e 1802\<edge data representation data 1\> describes a 3D curve.
bf62b306 1803
dd21889e 1804\<edge data representation data 2\> describes a 2D curve on a surface.
1805\<curve values for parameter minimal and maximal values\> are used only in version 2.
bf62b306 1806
dd21889e 1807\<edge data representation data 3\> describes a 2D curve on a closed surface.
1808\<curve values for parameter minimal and maximal values\> are used only in version 2.
bf62b306 1809
dd21889e 1810\<edge data representation data 5\> describes a 3D polyline.
bf62b306 1811
dd21889e 1812\<edge data representation data 6\> describes a polyline on a triangulation.
bf62b306 1813
dd21889e 1814\<edge data tolerance\> *t* describes the maximum distance from the edge *E* to the set *R* of edge *E* representations:
bf62b306 1815
dd21889e 1816@f[ \underset{C \in R}{max}\;\underset{P \in E}{max}\;\underset{Q \in C}{min}|Q-P| \leq t @f]
bf62b306 1817
1818
dd21889e 1819@subsection occt_brep_format_5_4 Face data
bf62b306 1820
1821**BNF-like Definition**
1822
1823@verbatim
dd21889e 1824 <face data> = <face data natural restriction flag> <_> <face data tolerance> <_> <surface number> <_> <location number> <\n> ["2" <_> <triangulation number>];
1825
1826 <face data natural restriction flag> = <flag>;
1827
1828 <face data tolerance> = <real>;
bf62b306 1829@endverbatim
1830
1831**Description**
1832
dd21889e 1833\<face data\> describes a surface *S* of face *F* and a triangulation *T* of face *F*. The surface *S* may be empty: \<surface number\> = 0.
bf62b306 1834
dd21889e 1835\<face data tolerance\> *t* describes the maximum distance from the face *F* to the surface *S*:
bf62b306 1836
dd21889e 1837@f[ \underset{P \in F}{max}\;\underset{Q \in S}{min}|Q-P| \leq t @f]
bf62b306 1838
dd21889e 1839Flag \<face data natural restriction flag\> is used in a special way [1].
bf62b306 1840
dd21889e 1841
1842@section occt_brep_format_6 Appendix
bf62b306 1843
1844 This chapter contains a *.brep file example.
1845
1846@verbatim
1847 DBRep_DrawableShape
1848
1849 CASCADE Topology V1, (c) Matra-Datavision
1850 Locations 3
1851 1
1852               0               0               1               0
1853               1               0               0               0
1854               0               1               0               0
1855 1
1856               1               0               0               4
1857               0               1               0               5
1858               0               0               1               6
1859 2  1 1 2 1 0
1860 Curve2ds 24
1861 1 0 0 1 0
1862 1 0 0 1 0
1863 1 3 0 0 -1
1864 1 0 0 0 1
1865 1 0 -2 1 0
1866 1 0 0 1 0
1867 1 0 0 0 -1
1868 1 0 0 0 1
1869 1 0 0 1 0
1870 1 0 1 1 0
1871 1 3 0 0 -1
1872 1 1 0 0 1
1873 1 0 -2 1 0
1874 1 0 1 1 0
1875 1 0 0 0 -1
1876 1 1 0 0 1
1877 1 0 0 0 1
1878 1 0 0 1 0
1879 1 3 0 0 1
1880 1 0 0 1 0
1881 1 0 0 0 1
1882 1 0 2 1 0
1883 1 3 0 0 1
1884 1 0 2 1 0
1885 Curves 13
1886 1 0 0 0 0 0 1
1887 1 0 0 3 -0 1 0
1888 1 0 2 0 0 0 1
1889 1 0 0 0 -0 1 0
1890 1 1 0 0 0 0 1
1891 1 1 0 3 0 1 0
1892 1 1 2 0 0 0 1
1893 1 1 0 0 -0 1 0
1894 1 0 0 0 1 0 -0
1895 1 0 0 3 1 0 -0
1896 1 0 2 0 1 0 -0
1897 1 0 2 3 1 0 -0
1898 1 1 0 0 1 0 0
1899 Polygon3D 1
1900 2 1
1901 0.1
1902 1 0 0 2 0 0
1903 0 1
1904 PolygonOnTriangulations 24
1905 2 1 2
1906 p 0.1 1 0 3
1907 2 1 4
1908 p 0.1 1 0 3
1909 2 2 3
1910 p 0.1 1 0 2
1911 2 1 2
1912 p 0.1 1 0 2
1913 2 4 3
1914 p 0.1 1 0 3
1915 2 1 4
1916 p 0.1 1 0 3
1917 2 1 4
1918 p 0.1 1 0 2
1919 2 1 2
1920 p 0.1 1 0 2
1921 2 1 2
1922 p 0.1 1 0 3
1923 2 2 3
1924 p 0.1 1 0 3
1925 2 2 3
1926 p 0.1 1 0 2
1927 2 4 3
1928 p 0.1 1 0 2
1929 2 4 3
1930 p 0.1 1 0 3
1931 2 2 3
1932 p 0.1 1 0 3
1933 2 1 4
1934 p 0.1 1 0 2
1935 2 4 3
1936 p 0.1 1 0 2
1937 2 1 2
1938 p 0.1 1 0 1
1939 2 1 4
1940 p 0.1 1 0 1
1941 2 4 3
1942 p 0.1 1 0 1
1943 2 1 4
1944 p 0.1 1 0 1
1945 2 1 2
1946 p 0.1 1 0 1
1947 2 2 3
1948 p 0.1 1 0 1
1949 2 4 3
1950 p 0.1 1 0 1
1951 2 2 3
1952 p 0.1 1 0 1
1953 Surfaces 6
1954 1 0 0 0 1 0 -0 0 0 1 0 -1 0
1955 1 0 0 0 -0 1 0 0 0 1 1 0 -0
1956 1 0 0 3 0 0 1 1 0 -0 -0 1 0
1957 1 0 2 0 -0 1 0 0 0 1 1 0 -0
1958 1 0 0 0 0 0 1 1 0 -0 -0 1 0
1959 1 1 0 0 1 0 -0 0 0 1 0 -1 0
1960 Triangulations 6
1961 4 2 1 0
1962 0 0 0 0 0 3 0 2 3 0 2 0 0 0 3 0 3 -2 0 -2 2 4 3 2 1 4
1963 4 2 1 0
1964 0 0 0 1 0 0 1 0 3 0 0 3 0 0 0 1 3 1 3 0 3 2 1 3 1 4
1965 4 2 1 0
1966 0 0 3 0 2 3 1 2 3 1 0 3 0 0 0 2 1 2 1 0 3 2 1 3 1 4
1967 4 2 1 0
1968 0 2 0 1 2 0 1 2 3 0 2 3 0 0 0 1 3 1 3 0 3 2 1 3 1 4
1969 4 2 1 0
1970 0 0 0 0 2 0 1 2 0 1 0 0 0 0 0 2 1 2 1 0 3 2 1 3 1 4
1971 4 2 1 0
1972 1 0 0 1 0 3 1 2 3 1 2 0 0 0 3 0 3 -2 0 -2 2 4 3 2 1 4
1973
1974 TShapes 39
1975 Ve
1976 1e-007
1977 0 0 3
1978 0 0
1979
1980 0101101
1981 *
1982 Ve
1983 1e-007
1984 0 0 0
1985 0 0
1986
1987 0101101
1988 *
1989 Ed
1990  1e-007 1 1 0
1991 1  1 0 0 3
1992 2  1 1 0 0 3
1993 2  2 2 0 0 3
1994 6  1 1 0
1995 6  2 2 0
1996 0
1997
1998 0101000
1999 -39 0 +38 0 *
2000 Ve
2001 1e-007
2002 0 2 3
2003 0 0
2004
2005 0101101
2006 *
2007 Ed
2008  1e-007 1 1 0
2009 1  2 0 0 2
2010 2  3 1 0 0 2
2011 2  4 3 0 0 2
2012 6  3 1 0
2013 6  4 3 0
2014 0
2015
2016 0101000
2017 -36 0 +39 0 *
2018 Ve
2019 1e-007
2020 0 2 0
2021 0 0
2022
2023 0101101
2024 *
2025 Ed
2026  1e-007 1 1 0
2027 1  3 0 0 3
2028 2  5 1 0 0 3
2029 2  6 4 0 0 3
2030 6  5 1 0
2031 6  6 4 0
2032 0
2033
2034 0101000
2035 -36 0 +34 0 *
2036 Ed
2037  1e-007 1 1 0
2038 1  4 0 0 2
2039 2  7 1 0 0 2
2040 2  8 5 0 0 2
2041 6  7 1 0
2042 6  8 5 0
2043 0
2044
2045 0101000
2046 -34 0 +38 0 *
2047 Wi
2048
2049 0101000
2050 -37 0 -35 0 +33 0 +32 0 *
2051 Fa
2052 0  1e-007 1 0
2053 2  1
2054 0101000
2055 +31 0 *
2056 Ve
2057 1e-007
2058 1 0 3
2059 0 0
2060
2061 0101101
2062 *
2063 Ve
2064 1e-007
2065 1 0 0
2066 0 0
2067
2068 0101101
2069 *
2070 Ed
2071  1e-007 1 1 0
2072 1  5 0 0 3
2073 2  9 6 0 0 3
2074 2  10 2 0 0 3
2075 6  9 6 0
2076 6  10 2 0
2077 0
2078
2079 0101000
2080 -29 0 +28 0 *
2081 Ve
2082 1e-007
2083 1 2 3
2084 0 0
2085
2086 0101101
2087 *
2088 Ed
2089  1e-007 1 1 0
2090 1  6 0 0 2
2091 2  11 6 0 0 2
2092 2  12 3 0 0 2
2093 6  11 6 0
2094 6  12 3 0
2095 0
2096
2097 0101000
2098 -26 0 +29 0 *
2099 Ve
2100 1e-007
2101 1 2 0
2102 0 0
2103
2104 0101101
2105 *
2106 Ed
2107  1e-007 1 1 0
2108 1  7 0 0 3
2109 2  13 6 0 0 3
2110 2  14 4 0 0 3
2111 6  13 6 0
2112 6  14 4 0
2113 0
2114
2115 0101000
2116 -26 0 +24 0 *
2117 Ed
2118  1e-007 1 1 0
2119 1  8 0 0 2
2120 2  15 6 0 0 2
2121 2  16 5 0 0 2
2122 6  15 6 0
2123 6  16 5 0
2124 0
2125
2126 0101000
2127 -24 0 +28 0 *
2128 Wi
2129
2130 0101000
2131 -27 0 -25 0 +23 0 +22 0 *
2132 Fa
2133 0  1e-007 6 0
2134 2  6
2135 0101000
2136 +21 0 *
2137 Ed
2138  1e-007 1 1 0
2139 1  9 0 0 1
2140 2  17 2 0 0 1
2141 2  18 5 0 0 1
2142 6  17 2 0
2143 6  18 5 0
2144 0
2145
2146 0101000
2147 -28 0 +38 0 *
2148 Ed
2149  1e-007 1 1 0
2150 1  10 0 0 1
2151 2  19 2 0 0 1
2152 2  20 3 0 0 1
2153 6  19 2 0
2154 6  20 3 0
2155 0
2156
2157 0101000
2158 -29 0 +39 0 *
2159 Wi
2160
2161 0101000
2162 -19 0 -27 0 +18 0 +37 0 *
2163 Fa
2164 0  1e-007 2 0
2165 2  2
2166 0101000
2167 +17 0 *
2168 Ed
2169  1e-007 1 1 0
2170 1  11 0 0 1
2171 2  21 4 0 0 1
2172 2  22 5 0 0 1
2173 6  21 4 0
2174 6  22 5 0
2175 0
2176
2177 0101000
2178 -24 0 +34 0 *
2179 Ed
2180  1e-007 1 1 0
2181 1  12 0 0 1
2182 2  23 4 0 0 1
2183 2  24 3 0 0 1
2184 6  23 4 0
2185 6  24 3 0
2186 0
2187
2188 0101000
2189 -26 0 +36 0 *
2190 Wi
2191
2192 0101000
2193 -15 0 -23 0 +14 0 +33 0 *
2194 Fa
2195 0  1e-007 4 0
2196 2  4
2197 0101000
2198 +13 0 *
2199 Wi
2200
2201 0101000
2202 -32 0 -15 0 +22 0 +19 0 *
2203 Fa
2204 0  1e-007 5 0
2205 2  5
2206 0101000
2207 +11 0 *
2208 Wi
2209
2210 0101000
2211 -35 0 -14 0 +25 0 +18 0 *
2212 Fa
2213 0  1e-007 3 0
2214 2  3
2215 0101000
2216 +9 0 *
2217 Sh
2218
2219 0101100
2220 -30 0 +20 0 -16 0 +12 0 -10 0 +8 0 *
2221 So
2222
2223 0100000
2224 +7 0 *
2225 CS
2226
2227 0101000
2228 +6 3 *
2229 Ve
2230 1e-007
2231 1 0 0
2232 0 0
2233
2234 0101101
2235 *
2236 Ve
2237 1e-007
2238 2 0 0
2239 0 0
2240
2241 0101101
2242 *
2243 Ed
2244  1e-007 1 1 0
2245 1  13 0 0 1
2246 5  1 0
2247 0
2248
2249 0101000
2250 +4 0 -3 0 *
2251 Co
2252
2253 1100000
2254 +5 0 +2 0 *
2255
2256 +1 0
2257 0
2258@endverbatim