0024624: Lost word in license statement in source files
[occt.git] / src / Aspect / Aspect_MarkerStyle.cxx
1 // Created on: 1995-01-14
2 // Created by: GG
3 // Copyright (c) 1995-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 // Modified     23/02/98 : FMN ; Remplacement PI par Standard_PI
18 // JR 02.01.100 : Implicit conversions
19
20
21 //-Version      
22
23 //-Design       Declaration des variables specifiques aux Type de markers
24
25 //-Warning      Un style est definie, soit par son type predefini TOM_...
26 //              soit par sa description dans l'espace -1,+1
27
28 //-References   
29
30 //-Language     C++ 2.0
31
32 //-Declarations
33
34 // for the class
35 #include <Aspect_MarkerStyle.ixx>
36
37 //-Aliases
38
39 //-Global data definitions
40
41 //      MyMarkerType            : TypeOfMarker from Aspect;
42 //      MyXpoint                : Array1OfShortReal from TShort;
43 //      MyYpoint                : Array1OfShortReal from TShort;
44 //      MySpoint                : Array1OfBoolean from TColStd;
45
46 //-Constructors
47
48 //-Destructors
49
50 //-Methods, in order
51
52 Aspect_MarkerStyle::Aspect_MarkerStyle () : MyMarkerType(Aspect_TOM_POINT) { 
53   SetPredefinedStyle();
54 }
55
56 Aspect_MarkerStyle::Aspect_MarkerStyle (
57                 const Aspect_TypeOfMarker aType) : MyMarkerType(aType) {
58   SetPredefinedStyle();
59 }
60
61 Aspect_MarkerStyle::Aspect_MarkerStyle (const TColStd_Array1OfReal& aXpoint,
62                                         const TColStd_Array1OfReal& aYpoint)
63                 : MyMarkerType(Aspect_TOM_USERDEFINED) {
64 Standard_Integer i,j=1;
65
66         MyXpoint = new TShort_HArray1OfShortReal(1,aXpoint.Length());
67         MyYpoint = new TShort_HArray1OfShortReal(1,aXpoint.Length());
68         MySpoint = new TColStd_HArray1OfBoolean(1,aXpoint.Length());
69
70         if( aXpoint.Length() != aYpoint.Length() ) {
71           Aspect_MarkerStyleDefinitionError::Raise ("Bad Descriptor length") ;
72         }
73
74         for( i=aXpoint.Lower() ; i<=aXpoint.Upper() ; i++,j++ ) {
75           Standard_ShortReal X = (Standard_ShortReal ) aXpoint(i);
76           Standard_ShortReal Y = (Standard_ShortReal ) aYpoint(i);
77           if( X < -1. || X > 1. || Y < -1. || Y > 1. ) {
78             Aspect_MarkerStyleDefinitionError::Raise ("Bad Descriptor value") ;
79           }
80           MyXpoint->SetValue(j,X);
81           MyYpoint->SetValue(j,Y);
82           MySpoint->SetValue(j,(j > 1) ? Standard_True : Standard_False);
83         }
84 }
85
86 Aspect_MarkerStyle::Aspect_MarkerStyle (const TColStd_Array1OfReal& aXpoint,
87                                         const TColStd_Array1OfReal& aYpoint,
88                                         const TColStd_Array1OfBoolean& aSpoint)
89                 : MyMarkerType(Aspect_TOM_USERDEFINED) {
90 Standard_Integer i,j=1;
91
92         MyXpoint = new TShort_HArray1OfShortReal(1,aXpoint.Length());
93         MyYpoint = new TShort_HArray1OfShortReal(1,aXpoint.Length());
94         MySpoint = new TColStd_HArray1OfBoolean(1,aXpoint.Length());
95
96         if( (aXpoint.Length() != aYpoint.Length()) ||
97                 (aXpoint.Length() != aSpoint.Length()) ) {
98           Aspect_MarkerStyleDefinitionError::Raise ("Bad Descriptor length") ;
99         }
100
101         for( i=aXpoint.Lower() ; i<=aXpoint.Upper() ; i++,j++ ) {
102           Standard_ShortReal X = (Standard_ShortReal ) aXpoint(i);
103           Standard_ShortReal Y = (Standard_ShortReal ) aYpoint(i);
104           Standard_Boolean S = aSpoint(i);
105           if( X < -1. || X > 1. || Y < -1. || Y > 1. ) {
106             Aspect_MarkerStyleDefinitionError::Raise ("Bad Descriptor value") ;
107           }
108           MyXpoint->SetValue(j,X);
109           MyYpoint->SetValue(j,Y);
110           MySpoint->SetValue(j,S);
111           MySpoint->SetValue(j,(j > 1) ? S : Standard_False);
112         }
113 }
114
115 Aspect_MarkerStyle& Aspect_MarkerStyle::Assign (const Aspect_MarkerStyle& Other) {
116
117         MyMarkerType = Other.MyMarkerType ;
118         MyXpoint = Other.MyXpoint ;
119         MyYpoint = Other.MyYpoint ;
120         MySpoint = Other.MySpoint ;
121
122         return (*this);
123
124 }
125
126 Aspect_TypeOfMarker Aspect_MarkerStyle::Type () const {
127
128         return MyMarkerType;
129 }
130
131 Standard_Integer Aspect_MarkerStyle::Length () const {
132
133         return MyXpoint->Length();
134 }
135
136 Standard_Boolean Aspect_MarkerStyle::Values (const Standard_Integer aRank,
137                                 Standard_Real &X,Standard_Real &Y) const {
138
139         if( aRank < 1 || aRank > Length() ) {
140           Aspect_MarkerStyleDefinitionError::Raise ("Bad Descriptor rank") ;
141         }
142
143         X = MyXpoint->Value(aRank);
144         Y = MyYpoint->Value(aRank);
145         return MySpoint->Value(aRank);
146 }
147
148 const TShort_Array1OfShortReal& Aspect_MarkerStyle::XValues () const {
149
150         return MyXpoint->Array1();
151 }
152
153 const TShort_Array1OfShortReal& Aspect_MarkerStyle::YValues () const {
154
155         return MyYpoint->Array1();
156 }
157
158 const TColStd_Array1OfBoolean& Aspect_MarkerStyle::SValues () const {
159
160         return MySpoint->Array1();
161 }
162
163 #define MAX_O_POINT 12
164 #define MAX_BALL_LINE 12
165 #ifndef AIX
166 #define FALSE Standard_False
167 #define TRUE  Standard_True
168 #endif
169
170 void Aspect_MarkerStyle::SetPredefinedStyle() {
171
172         switch ( MyMarkerType ) {
173             case Aspect_TOM_USERDEFINED :
174                 Aspect_MarkerStyleDefinitionError::Raise
175                         ("Bad Marker Type Style");
176                 break;
177             case Aspect_TOM_POINT :
178                 MyXpoint = new TShort_HArray1OfShortReal(1,5) ;
179                 MyYpoint = new TShort_HArray1OfShortReal(1,5) ;
180                 MySpoint = new TColStd_HArray1OfBoolean(1,5) ;
181
182                 MyXpoint->SetValue(1,-1.); 
183                 MyYpoint->SetValue(1,-1.); 
184                 MySpoint->SetValue(1,FALSE); 
185
186                 MyXpoint->SetValue(2,-1.);
187                 MyYpoint->SetValue(2,1.);
188                 MySpoint->SetValue(2,TRUE); 
189
190                 MyXpoint->SetValue(3,1.);
191                 MyYpoint->SetValue(3,1.);
192                 MySpoint->SetValue(3,TRUE); 
193
194                 MyXpoint->SetValue(4,1.);
195                 MyYpoint->SetValue(4,-1.);
196                 MySpoint->SetValue(4,TRUE); 
197
198                 MyXpoint->SetValue(5,-1.);
199                 MyYpoint->SetValue(5,-1.);
200                 MySpoint->SetValue(5,TRUE); 
201                 break ;
202             case Aspect_TOM_PLUS :
203                 MyXpoint = new TShort_HArray1OfShortReal(1,4) ;
204                 MyYpoint = new TShort_HArray1OfShortReal(1,4) ;
205                 MySpoint = new TColStd_HArray1OfBoolean(1,4) ;
206
207                 MyXpoint->SetValue(1, 0.);
208                 MyYpoint->SetValue(1,-1.);
209                 MySpoint->SetValue(1,FALSE); 
210
211                 MyXpoint->SetValue(2, 0.);
212                 MyYpoint->SetValue(2, 1.);
213                 MySpoint->SetValue(2,TRUE); 
214
215                 MyXpoint->SetValue(3,-1.);
216                 MyYpoint->SetValue(3, 0.);
217                 MySpoint->SetValue(3,FALSE); 
218
219                 MyXpoint->SetValue(4, 1.);
220                 MyYpoint->SetValue(4, 0.);
221                 MySpoint->SetValue(4,TRUE); 
222                 break ;
223             case Aspect_TOM_STAR :
224                 MyXpoint = new TShort_HArray1OfShortReal(1,8) ;
225                 MyYpoint = new TShort_HArray1OfShortReal(1,8) ;
226                 MySpoint = new TColStd_HArray1OfBoolean(1,8) ;
227
228                 MyXpoint->SetValue(1, 0.);
229                 MyYpoint->SetValue(1,-1.);
230                 MySpoint->SetValue(1,FALSE); 
231
232                 MyXpoint->SetValue(2, 0.);
233                 MyYpoint->SetValue(2, 1.);
234                 MySpoint->SetValue(2,TRUE); 
235
236                 MyXpoint->SetValue(3,-1.);
237                 MyYpoint->SetValue(3, 0.);
238                 MySpoint->SetValue(3,FALSE); 
239
240                 MyXpoint->SetValue(4, 1.);
241                 MyYpoint->SetValue(4, 0.);
242                 MySpoint->SetValue(4,TRUE); 
243
244                 MyXpoint->SetValue(5,(float ) -0.7);
245                 MyYpoint->SetValue(5,(float ) -0.7);
246                 MySpoint->SetValue(5,FALSE); 
247
248                 MyXpoint->SetValue(6,(float ) 0.7);
249                 MyYpoint->SetValue(6,(float ) 0.7);
250                 MySpoint->SetValue(6,TRUE); 
251
252                 MyXpoint->SetValue(7,(float ) 0.7);
253                 MyYpoint->SetValue(7,(float ) -0.7);
254                 MySpoint->SetValue(7,FALSE); 
255
256                 MyXpoint->SetValue(8,(float ) -0.7);
257                 MyYpoint->SetValue(8,(float ) 0.7);
258                 MySpoint->SetValue(8,TRUE); 
259                 break ;
260             case Aspect_TOM_O :
261                 MyXpoint = new TShort_HArray1OfShortReal(1,MAX_O_POINT+1) ;
262                 MyYpoint = new TShort_HArray1OfShortReal(1,MAX_O_POINT+1) ;
263                 MySpoint = new TColStd_HArray1OfBoolean(1,MAX_O_POINT+1) ;
264
265                 { Standard_Integer i;
266                   Standard_Real da = 2. * M_PI / MAX_O_POINT;
267                   Standard_Real a = 0.;
268                   for( i=1 ; i<= MAX_O_POINT+1 ; i++,a += da ) {
269                     MyXpoint->SetValue(i,(float ) Cos(a));
270                     MyYpoint->SetValue(i,(float ) Sin(a));
271                     MySpoint->SetValue(i,(i > 1) ? TRUE : FALSE);
272                   }
273                   i = MAX_O_POINT+1;
274                   MyXpoint->SetValue(i,1.);
275                   MyYpoint->SetValue(i,0.);
276                 }
277                 break ;
278             case Aspect_TOM_X :
279                 MyXpoint = new TShort_HArray1OfShortReal(1,4) ;
280                 MyYpoint = new TShort_HArray1OfShortReal(1,4) ;
281                 MySpoint = new TColStd_HArray1OfBoolean(1,4) ;
282
283                 MyXpoint->SetValue(1,(float ) -0.7);
284                 MyYpoint->SetValue(1,(float ) -0.7);
285                 MySpoint->SetValue(1,FALSE);
286
287                 MyXpoint->SetValue(2,(float ) 0.7);
288                 MyYpoint->SetValue(2,(float ) 0.7);
289                 MySpoint->SetValue(2,TRUE);
290                 
291                 MyXpoint->SetValue(3,(float ) 0.7);
292                 MyYpoint->SetValue(3,(float ) -0.7);
293                 MySpoint->SetValue(3,FALSE);
294                 
295                 MyXpoint->SetValue(4,(float ) -0.7);
296                 MyYpoint->SetValue(4,(float ) 0.7);
297                 MySpoint->SetValue(4,TRUE); 
298                 break ;
299             case Aspect_TOM_O_POINT :
300                 MyXpoint = new TShort_HArray1OfShortReal(1,MAX_O_POINT+6) ;
301                 MyYpoint = new TShort_HArray1OfShortReal(1,MAX_O_POINT+6) ;
302                 MySpoint = new TColStd_HArray1OfBoolean(1,MAX_O_POINT+6) ;
303                 { Standard_Integer i;
304                   Standard_Real da = 2. * M_PI / MAX_O_POINT;
305                   Standard_Real a = 0.;
306                   for( i=1 ; i<= MAX_O_POINT+1 ; i++,a += da ) {
307                     MyXpoint->SetValue(i,(float ) Cos(a));
308                     MyYpoint->SetValue(i,(float ) Sin(a));
309                     MySpoint->SetValue(i,(i > 1) ? TRUE : FALSE);
310                   }
311                   i = MAX_O_POINT+1;
312                   MyXpoint->SetValue(i,1.);
313                   MyYpoint->SetValue(i,0.);
314
315                   MyXpoint->SetValue(i+1,-0.25);
316                   MyYpoint->SetValue(i+1,-0.25);
317                   MySpoint->SetValue(i+1,FALSE);
318                 
319                   MyXpoint->SetValue(i+2,-0.25);
320                   MyYpoint->SetValue(i+2,0.25);
321                   MySpoint->SetValue(i+2,TRUE);
322                 
323                   MyXpoint->SetValue(i+3,0.25);
324                   MyYpoint->SetValue(i+3,0.25);
325                   MySpoint->SetValue(i+3,TRUE);
326                 
327                   MyXpoint->SetValue(i+4,0.25);
328                   MyYpoint->SetValue(i+4,-0.25);
329                   MySpoint->SetValue(i+4,TRUE);
330                 
331                   MyXpoint->SetValue(i+5,-0.25);
332                   MyYpoint->SetValue(i+5,-0.25);
333                   MySpoint->SetValue(i+5,TRUE);
334                 }
335                 break ;
336             case Aspect_TOM_O_PLUS :
337                 MyXpoint = new TShort_HArray1OfShortReal(1,MAX_O_POINT+5) ;
338                 MyYpoint = new TShort_HArray1OfShortReal(1,MAX_O_POINT+5) ;
339                 MySpoint = new TColStd_HArray1OfBoolean(1,MAX_O_POINT+5) ;
340
341                 { Standard_Integer i;
342                   Standard_Real da = 2. * M_PI / MAX_O_POINT;
343                   Standard_Real a = 0.;
344                   for( i=1 ; i<= MAX_O_POINT+1 ; i++,a += da ) {
345                     MyXpoint->SetValue(i,(float ) Cos(a));
346                     MyYpoint->SetValue(i,(float ) Sin(a));
347                     MySpoint->SetValue(i,(i > 1) ? TRUE : FALSE);
348                   }
349                   i = MAX_O_POINT+1;
350                   MyXpoint->SetValue(i,1.);
351                   MyYpoint->SetValue(i,0.);
352
353                   MyXpoint->SetValue(i+1,0.);
354                   MyYpoint->SetValue(i+1,-0.5);
355                   MySpoint->SetValue(i+1,FALSE);
356                 
357                   MyXpoint->SetValue(i+2,0.);
358                   MyYpoint->SetValue(i+2,0.5);
359                   MySpoint->SetValue(i+2,TRUE);
360                 
361                   MyXpoint->SetValue(i+3,-0.5);
362                   MyYpoint->SetValue(i+3,0.);
363                   MySpoint->SetValue(i+3,FALSE);
364                 
365                   MyXpoint->SetValue(i+4,0.5);
366                   MyYpoint->SetValue(i+4,0.);
367                   MySpoint->SetValue(i+4,TRUE);
368                 }
369                 break ;
370             case Aspect_TOM_O_STAR :
371                 MyXpoint = new TShort_HArray1OfShortReal(1,MAX_O_POINT+9) ;
372                 MyYpoint = new TShort_HArray1OfShortReal(1,MAX_O_POINT+9) ;
373                 MySpoint = new TColStd_HArray1OfBoolean(1,MAX_O_POINT+9) ;
374
375                 { Standard_Integer i;
376                   Standard_Real da = 2. * M_PI / MAX_O_POINT;
377                   Standard_Real a = 0.;
378                   for( i=1 ; i<= MAX_O_POINT+1 ; i++,a += da ) {
379                     MyXpoint->SetValue(i,(float ) Cos(a));
380                     MyYpoint->SetValue(i,(float ) Sin(a));
381                     MySpoint->SetValue(i,(i > 1) ? TRUE : FALSE);
382                   }
383                   i = MAX_O_POINT+1;
384                   MyXpoint->SetValue(i,1.);
385                   MyYpoint->SetValue(i,0.);
386
387                   MyXpoint->SetValue(i+1, 0.);
388                   MyYpoint->SetValue(i+1,-0.5);
389                   MySpoint->SetValue(i+1,FALSE);
390                 
391                   MyXpoint->SetValue(i+2, 0.);
392                   MyYpoint->SetValue(i+2,0.5);
393                   MySpoint->SetValue(i+2,TRUE);
394                 
395                   MyXpoint->SetValue(i+3,-0.5);
396                   MyYpoint->SetValue(i+3, 0.);
397                   MySpoint->SetValue(i+3,FALSE);
398                 
399                   MyXpoint->SetValue(i+4,0.5);
400                   MyYpoint->SetValue(i+4, 0.);
401                   MySpoint->SetValue(i+4,TRUE);
402                 
403                   MyXpoint->SetValue(i+5,(float ) -0.35);
404                   MyYpoint->SetValue(i+5,(float ) -0.35);
405                   MySpoint->SetValue(i+5,FALSE);
406                 
407                   MyXpoint->SetValue(i+6,(float ) 0.35);
408                   MyYpoint->SetValue(i+6,(float ) 0.35);
409                   MySpoint->SetValue(i+6,TRUE);
410                 
411                   MyXpoint->SetValue(i+7,(float ) 0.35);
412                   MyYpoint->SetValue(i+7,(float ) -0.35);
413                   MySpoint->SetValue(i+7,FALSE);
414                 
415                   MyXpoint->SetValue(i+8,(float ) -0.35);
416                   MyYpoint->SetValue(i+8,(float ) 0.35);
417                   MySpoint->SetValue(i+8,TRUE);
418                 }
419                 break ;
420             case Aspect_TOM_O_X :
421                 MyXpoint = new TShort_HArray1OfShortReal(1,MAX_O_POINT+5) ;
422                 MyYpoint = new TShort_HArray1OfShortReal(1,MAX_O_POINT+5) ;
423                 MySpoint = new TColStd_HArray1OfBoolean(1,MAX_O_POINT+5) ;
424
425                 { Standard_Integer i;
426                   Standard_Real da = 2. * M_PI / MAX_O_POINT;
427                   Standard_Real a = 0.;
428                   for( i=1 ; i<= MAX_O_POINT+1 ; i++,a += da ) {
429                     MyXpoint->SetValue(i,(float ) Cos(a));
430                     MyYpoint->SetValue(i,(float ) Sin(a));
431                     MySpoint->SetValue(i,(i > 1) ? TRUE : FALSE);
432                   }
433                   i = MAX_O_POINT+1;
434                   MyXpoint->SetValue(i,1.);
435                   MyYpoint->SetValue(i,0.);
436
437                   MyXpoint->SetValue(i+1,(float ) -0.35);
438                   MyYpoint->SetValue(i+1,(float ) -0.35);
439                   MySpoint->SetValue(i+1,FALSE);
440                 
441                   MyXpoint->SetValue(i+2,(float ) 0.35);
442                   MyYpoint->SetValue(i+2,(float ) 0.35);
443                   MySpoint->SetValue(i+2,TRUE);
444                 
445                   MyXpoint->SetValue(i+3,(float ) 0.35);
446                   MyYpoint->SetValue(i+3,(float ) -0.35);
447                   MySpoint->SetValue(i+3,FALSE);
448                 
449                   MyXpoint->SetValue(i+4,(float ) -0.35);
450                   MyYpoint->SetValue(i+4,(float ) 0.35);
451                   MySpoint->SetValue(i+4,TRUE); 
452                 }
453                 break ;
454             case Aspect_TOM_RING1 :
455                 MyXpoint = new TShort_HArray1OfShortReal(1,
456                                                 (MAX_BALL_LINE/4)*(MAX_O_POINT+1)) ;
457                 MyYpoint = new TShort_HArray1OfShortReal(1,
458                                                 (MAX_BALL_LINE/4)*(MAX_O_POINT+1)) ;
459                 MySpoint = new TColStd_HArray1OfBoolean(1,
460                                                 (MAX_BALL_LINE/4)*(MAX_O_POINT+1)) ;
461
462                 { Standard_Integer i,j,n = 0;
463                   Standard_Real da = 2. * M_PI / MAX_O_POINT;
464                   Standard_Real dr = 1./MAX_BALL_LINE;
465                   Standard_Real a,r = 1.;
466                   
467                   for( i=1 ; i<= MAX_BALL_LINE/4 ; i++ ) {
468                     a = 0.;
469                     for( j=1 ; j<= MAX_O_POINT+1 ; j++,a += da ) {
470                       n++;
471                       MyXpoint->SetValue(n,(float )( r*Cos(a)));
472                       MyYpoint->SetValue(n,(float )( r*Sin(a)));
473                       MySpoint->SetValue(n,(j > 1) ? TRUE : FALSE);
474                     }
475                     MyXpoint->SetValue(n,(float ) r);
476                     MyYpoint->SetValue(n,0.);
477                     r -= dr;
478                   }
479                 }
480                 break ;
481             case Aspect_TOM_RING2 :
482                 MyXpoint = new TShort_HArray1OfShortReal(1,
483                                                 (MAX_BALL_LINE/3)*(MAX_O_POINT+1)) ;
484                 MyYpoint = new TShort_HArray1OfShortReal(1,
485                                                 (MAX_BALL_LINE/3)*(MAX_O_POINT+1)) ;
486                 MySpoint = new TColStd_HArray1OfBoolean(1,
487                                                 (MAX_BALL_LINE/3)*(MAX_O_POINT+1)) ;
488
489                 { Standard_Integer i,j,n = 0;
490                   Standard_Real da = 2. * M_PI / MAX_O_POINT;
491                   Standard_Real dr = 1./MAX_BALL_LINE;
492                   Standard_Real a,r = 1.;
493                   
494                   for( i=1 ; i<= MAX_BALL_LINE/3 ; i++ ) {
495                     a = 0.;
496                     for( j=1 ; j<= MAX_O_POINT+1 ; j++,a += da ) {
497                       n++;
498                       MyXpoint->SetValue(n,(float )( r*Cos(a)));
499                       MyYpoint->SetValue(n,(float )( r*Sin(a)));
500                       MySpoint->SetValue(n,(j > 1) ? TRUE : FALSE);
501                     }
502                     MyXpoint->SetValue(n,(float ) r);
503                     MyYpoint->SetValue(n,0.);
504                     r -= dr;
505                   }
506                 }
507                 break ;
508             case Aspect_TOM_RING3 :
509                 MyXpoint = new TShort_HArray1OfShortReal(1,
510                                                 (MAX_BALL_LINE)/2*(MAX_O_POINT+1)) ;
511                 MyYpoint = new TShort_HArray1OfShortReal(1,
512                                                 (MAX_BALL_LINE)/2*(MAX_O_POINT+1)) ;
513                 MySpoint = new TColStd_HArray1OfBoolean(1,
514                                                 (MAX_BALL_LINE)/2*(MAX_O_POINT+1)) ;
515
516                 { Standard_Integer i,j,n = 0;
517                   Standard_Real da = 2. * M_PI / MAX_O_POINT;
518                   Standard_Real dr = 1./MAX_BALL_LINE;
519                   Standard_Real a,r = 1.;
520                   
521                   for( i=1 ; i<= MAX_BALL_LINE/2 ; i++ ) {
522                     a = 0.;
523                     for( j=1 ; j<= MAX_O_POINT+1 ; j++,a += da ) {
524                       n++;
525                       MyXpoint->SetValue(n,(float )( r*Cos(a)));
526                       MyYpoint->SetValue(n,(float )( r*Sin(a)));
527                       MySpoint->SetValue(n,(j > 1) ? TRUE : FALSE);
528                     }
529                     MyXpoint->SetValue(n,(float ) r);
530                     MyYpoint->SetValue(n,0.);
531                     r -= dr;
532                   }
533                 }
534                 break ;
535         }
536
537 }
538
539 Standard_Boolean Aspect_MarkerStyle::IsEqual(const Aspect_MarkerStyle& Other) const
540 {
541   return (
542           (MyMarkerType == Other.MyMarkerType) &&
543           (MyXpoint == Other.MyXpoint) &&
544           (MyYpoint == Other.MyYpoint) &&
545           (MySpoint == Other.MySpoint));
546 }
547
548 Standard_Boolean Aspect_MarkerStyle::IsNotEqual(const Aspect_MarkerStyle& Other) const
549 {
550   return !IsEqual(Other);
551 }