summaryrefslogtreecommitdiff
path: root/src/IGESToBRep/IGESToBRep_CurveAndSurface.cxx
blob: bd23bd4b7cc1676c97d7bc6f5b73d46afd429866 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
// 22.12.98 dce S3767
// 21.12.98 rln, gka S4054
//#74 rln,pdn 11.03.99 S4135: Setting minimum and maximum tolerances according to static parameters
// sln 13.06.2002 OCC448 : Correction in  method TransferGeometry to avoid transfering invisiable sub entities

#include <Standard_ErrorHandler.hxx>
#include <IGESToBRep_CurveAndSurface.ixx>
#include <Standard_Failure.hxx>

#include <IGESToBRep.hxx>
#include <IGESToBRep_TopoCurve.hxx>
#include <IGESToBRep_TopoSurface.hxx>
#include <IGESToBRep_BRepEntity.hxx>

#include <IGESBasic_Group.hxx>
#include <IGESBasic_GroupWithoutBackP.hxx>

#include <IGESBasic_SubfigureDef.hxx>
#include <IGESBasic_SingularSubfigure.hxx>

#include <IGESData_ToolLocation.hxx>

#include <BRep_Builder.hxx>

#include <BRepLib.hxx>

#include <gp_Trsf.hxx>
#include <gp_GTrsf.hxx>
#include <gp_Vec.hxx>
#include <Precision.hxx>

#include <Interface_Macros.hxx>
#include <Interface_Static.hxx>

#include <TopExp_Explorer.hxx>
#include <TopLoc_Location.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Shape.hxx>

#include <Transfer_TransientProcess.hxx>
#include <TransferBRep_ShapeBinder.hxx>
#include <TransferBRep_ShapeListBinder.hxx>
#include <stdio.h>

#include <Message_Msg.hxx>
#include <Message_Messenger.hxx>
#include <Message_ProgressSentry.hxx>
#include <GeomAdaptor_Surface.hxx>

//=======================================================================
//function : IGESToBRep_CurveAndSurface
//purpose  : 
//=======================================================================

IGESToBRep_CurveAndSurface::IGESToBRep_CurveAndSurface()
{
  Init();
}


//=======================================================================
//function : IGESToBRep_CurveAndSurface
//purpose  : 
//=======================================================================

IGESToBRep_CurveAndSurface::IGESToBRep_CurveAndSurface
  (const IGESToBRep_CurveAndSurface& other)
{  
  myEps        = other.GetEpsilon();
  myEpsCoeff   = other.GetEpsCoeff();
  myEpsGeom    = other.GetEpsGeom();
  myMaxTol     = other.GetMaxTol();
  myModeIsTopo = other.GetModeTransfer();
  myModeApprox = other.GetModeApprox();
  myContIsOpti = other.GetOptimized();
  myUnitFactor = other.GetUnitFactor();
  mySurfaceCurve = other.GetSurfaceCurve();
  myContinuity = other.GetContinuity();
  myModel      = other.GetModel();
  myTP         = other.GetTransferProcess();
  myMinTol     = other.GetMinTol();
  
  mySurface = other.Surface();
  myIsResolCom = other.myIsResolCom;
  myUVResolution = other.myUVResolution;
}


//=======================================================================
//function : IGESToBRep_CurveAndSurface
//purpose  : 
//=======================================================================

IGESToBRep_CurveAndSurface::IGESToBRep_CurveAndSurface
  (const Standard_Real    eps,
   const Standard_Real    epsCoeff,
   const Standard_Real    epsGeom,
   const Standard_Boolean mode,
   const Standard_Boolean modeapprox,
   const Standard_Boolean optimized)
{  
  myEps        = eps;
  myEpsCoeff   = epsCoeff;
  myEpsGeom    = epsGeom;
  myModeIsTopo = mode;
  myModeApprox = modeapprox;
  myContIsOpti = optimized;
  myUnitFactor = 1.;
  mySurfaceCurve = 0;
  myContinuity = 0;
  myTP         = new Transfer_TransientProcess();
  
  myIsResolCom = Standard_False;
  myUVResolution = 0.;
  UpdateMinMaxTol();
}

//=======================================================================
//function : Init
//purpose  : 
//=======================================================================

void IGESToBRep_CurveAndSurface::Init()
{  
  myEps        = 1.E-04;
  myEpsCoeff   = 1.E-06;
  myEpsGeom    = 1.E-04;
  myModeIsTopo = Standard_True;
  myModeApprox = Standard_False;
  myContIsOpti = Standard_False;
  myUnitFactor = 1.;
  mySurfaceCurve = 0;
  myContinuity = 0;
  myTP         = new Transfer_TransientProcess();
  
  mySurface.Nullify();
  myIsResolCom = Standard_False;
  myUVResolution = 0.;
  UpdateMinMaxTol();
}

//=======================================================================
//function : SetEpsGeom
//purpose  : 
//=======================================================================
void IGESToBRep_CurveAndSurface::SetEpsGeom(const Standard_Real eps)
{
  myEpsGeom = eps;
  UpdateMinMaxTol();
}


//=======================================================================
//function : UpdateMinMaxTol
//purpose  : 
//=======================================================================

void IGESToBRep_CurveAndSurface::UpdateMinMaxTol()
{
  //#74 rln 11.03.99 S4135: Setting maximum tolerances according to
  //static parameter
  myMaxTol = Max (Interface_Static::RVal ("read.maxprecision.val"), myEpsGeom * myUnitFactor);
  myMinTol = Precision::Confusion();
}

//=======================================================================
//function : SetModel
//purpose  : 
//=======================================================================
void IGESToBRep_CurveAndSurface::SetModel(const Handle(IGESData_IGESModel)& model)
{  
  myModel = model;  
  Standard_Real unitfactor = myModel->GlobalSection().UnitValue();
  if (unitfactor != 1.)
    {
      if ( myTP->TraceLevel() > 2 )
	myTP->Messenger() << "UnitFactor = "<< unitfactor << endl;
      myUnitFactor = unitfactor;
    }
  UpdateMinMaxTol();
}

//=======================================================================
//function : TransferCurveAndSurface
//purpose  : 
//=======================================================================

TopoDS_Shape IGESToBRep_CurveAndSurface::TransferCurveAndSurface
       (const Handle(IGESData_IGESEntity)& start)
{
  TopoDS_Shape res;
  if (start.IsNull()) {
    Message_Msg msg1005("IGES_1005");
    SendFail(start, msg1005);
    return res;
  }
  Handle(TCollection_HAsciiString) label = GetModel()->StringLabel(start);
//  Standard_Integer typeNumber = start->TypeNumber();
  
  if (IGESToBRep::IsTopoCurve(start)) {
    IGESToBRep_TopoCurve TC(*this);
    res = TC.TransferTopoCurve(start);
  }  
  else if (IGESToBRep::IsTopoSurface(start)) {
    IGESToBRep_TopoSurface TS(*this);
    res = TS.TransferTopoSurface(start);
  }
  else if (IGESToBRep::IsBRepEntity(start)) {
    IGESToBRep_BRepEntity TS(*this);
    res = TS.TransferBRepEntity(start);
  }
  else {
    Message_Msg msg1015("IGES_1015");
    SendFail(start, msg1015);
    // AddFail(start, "The IGESEntity is not a curve a Surface or a BRep Entity.");
  }
  // mjm le 12/09/96
/*
  if (!res.IsNull()) {
    try {
      OCC_CATCH_SIGNALS
      Standard_Real Eps = GetEpsGeom()*GetUnitFactor();
      BRepLib::SameParameter(res,Eps);
    }
    catch(Standard_Failure) {
    Message_Msg msg1010("IGES_1010");
      SendWarning (start,msg1010);
    }
  }
*/
  return res;
}



//=======================================================================
//function : TransferGeometry
//purpose  : 
//=======================================================================

TopoDS_Shape IGESToBRep_CurveAndSurface::TransferGeometry
                               (const Handle(IGESData_IGESEntity)& start)
{
  // Declaration of messages// 
  // DCE 22/12/98
  //Message_Msg msg1005("IGES_1005");  //  Software error :  start IsNull.
  //Message_Msg msg1015("IGES_1015");  //  invalid type or execption raising (software error).
  //Message_Msg msg1010("IGES_1010");  //  Not sameparameter.
  //  Message_Msg msg1015("IGES_1015");
  //Message_Msg msg210 ("XSTEP_210");  
  //Message_Msg msg202 ("XSTEP_202");
  ////////////////////////////
  TopoDS_Shape res;
  gp_Trsf T408;
  if (start.IsNull()) {
    Message_Msg msg1005("IGES_1005");  //  Software error :  start IsNull.
    SendFail(start, msg1005);
    return res;
  }

  // Read of the DE number and the type number of the entity
  Handle(TCollection_HAsciiString) label = GetModel()->StringLabel(start);
  //Standard_Integer typeNumber = start->TypeNumber();
  
  // sln 13.06.2002 OCC448: Avoid transfering invisiable sub entities which
  // logicaly depend on the one
  Standard_Integer onlyvisible = Interface_Static::IVal("read.iges.onlyvisible");
  
  if (IGESToBRep::IsCurveAndSurface(start)) {
    if(onlyvisible && start->BlankStatus() == 1)
      return res;
    try {
      OCC_CATCH_SIGNALS
        res = TransferCurveAndSurface(start);
    }
    catch(Standard_Failure) {
      Message_Msg msg1015("IGES_1015");
      SendFail(start, msg1015);
    }
    return res;
  }

  //408 : SingularSubfigure
  if (start->IsKind(STANDARD_TYPE(IGESBasic_SingularSubfigure))) 
    {
      if(onlyvisible && start->BlankStatus() == 1)
        return res;
        
      DeclareAndCast(IGESBasic_SingularSubfigure, st408, start);
      Handle (IGESBasic_SubfigureDef) stsub = st408->Subfigure();
      gp_XYZ trans = st408->Translation();
      gp_Vec vectr(trans);
      Standard_Real scunit = GetUnitFactor();
      vectr.Multiply(scunit);
      T408.SetTranslation(vectr);
      if (st408->HasScaleFactor()) {
	  Standard_Real scalef = st408->ScaleFactor();
	  T408.SetScaleFactor(scalef);
	}
      if (HasShapeResult(stsub)) {
	res = GetShapeResult(stsub);
      }
      else {
	try {
	  OCC_CATCH_SIGNALS
	  res = TransferGeometry(stsub);
	}
	catch(Standard_Failure) {
	  res.Nullify();
          Message_Msg msg1015("IGES_1015");
	  SendFail( st408, msg1015);
	}
	if (!res.IsNull()) {
	  SetShapeResult(stsub,res);
	}
      }
    }
  
  // 308 : SubfigureDefinition
  else if (start->IsKind(STANDARD_TYPE(IGESBasic_SubfigureDef))) {
    DeclareAndCast(IGESBasic_SubfigureDef, st308, start);
    TopoDS_Compound group;
    BRep_Builder B;
    B.MakeCompound (group);
    if (st308->NbEntities() < 1) {
      Message_Msg msg210 ("XSTEP_210");  
      SendFail( st308, msg210);
      return res;
    }
    Message_ProgressSentry PS ( myTP->GetProgress(), "Subfigure item", 0, st308->NbEntities(), 1 );
    for (Standard_Integer i=1; i <= st308->NbEntities() && PS.More(); i++, PS.Next()) {
      TopoDS_Shape item;
      if (st308->AssociatedEntity(i).IsNull()) {
	Message_Msg msg1020("IGES_1020");
        msg1020.Arg(i);
	SendWarning( st308, msg1020);
	continue;
      }
      if(onlyvisible && st308->AssociatedEntity(i)->BlankStatus() == 1 )
        continue;      
        
      if (HasShapeResult(st308->AssociatedEntity(i)))
	{
	  item = GetShapeResult(st308->AssociatedEntity(i));
	}
      else {
	try {      
	  OCC_CATCH_SIGNALS
	  item = TransferGeometry(st308->AssociatedEntity(i));
	}
	catch(Standard_Failure) {
	  item.Nullify();
	  Message_Msg msg1015("IGES_1015");
	  SendFail( st308->AssociatedEntity(i), msg1015);
	}
      }
      if (item.IsNull()) {
	Message_Msg msg1025("IGES_1025");
        msg1025.Arg(i);
	SendWarning (start,msg1025);
      }
      else {
	B.Add(group, item);
	SetShapeResult (st308->AssociatedEntity(i),item);
      }
    }
    res = group;
  }
  else if (start->IsKind(STANDARD_TYPE(IGESBasic_Group))) {
    if(onlyvisible && start->BlankStatus() == 1)
      return res;      
    
    DeclareAndCast(IGESBasic_Group, st402f1, start);
    TopoDS_Compound group;
    BRep_Builder B;
    B.MakeCompound (group);
    if (st402f1->NbEntities() < 1) {
      Message_Msg msg202 ("XSTEP_202");
      msg202.Arg(st402f1->FormNumber());
      SendFail(st402f1, msg202);
      return res;
    }
    Message_ProgressSentry PS ( myTP->GetProgress(), "Group item", 0, st402f1->NbEntities(), 1 );
    Standard_Boolean ProblemInGroup = Standard_False;
    for (Standard_Integer i=1; i <= st402f1->NbEntities() && PS.More(); i++, PS.Next()) {
      TopoDS_Shape item;
      if (st402f1->Entity(i).IsNull()) {
	Message_Msg msg1020("IGES_1020");
	msg1020.Arg(i);
	SendFail( st402f1, msg1020);
	continue;
      }
      
      if(onlyvisible && st402f1->Entity(i)->BlankStatus() == 1)
        continue;      
      
      if (HasShapeResult(st402f1->Entity(i))) {
	item = GetShapeResult(st402f1->Entity(i));
      }
      else {
	try {
	  OCC_CATCH_SIGNALS
	  item = TransferGeometry(st402f1->Entity(i));
	}
	catch(Standard_Failure) {
	  item.Nullify();
	  Message_Msg msg1015("IGES_1015");
	  SendFail(st402f1->Entity(i),msg1015);
	}
      }
      if (item.IsNull()) {
	//Message_Msg msg1030("IGES_1030");
	//msg1030.Arg(st402f1->FormNumber());
	//msg1030.Arg(i);
	//SendWarning (st402f1,msg1030);
        ProblemInGroup = Standard_True;
      }
      else {
	B.Add(group, item);
	SetShapeResult (st402f1->Entity(i),item);
      }
    }
    res = group;
    if(ProblemInGroup) {
      Message_Msg msg1030("IGES_1030");
      msg1030.Arg(st402f1->FormNumber());
      SendWarning (st402f1,msg1030);
    }
  }
  else if (start->IsKind(STANDARD_TYPE(IGESBasic_GroupWithoutBackP))) {	
    
    if(onlyvisible && start->BlankStatus() == 1)
      return res;      
    
    DeclareAndCast(IGESBasic_GroupWithoutBackP, st402f7, start);
    TopoDS_Compound group;
//unused    Handle(TCollection_HAsciiString) label = GetModel()->StringLabel(st402f7);
    BRep_Builder B;
    B.MakeCompound (group);
    if (st402f7->NbEntities() < 1) {
      Message_Msg msg202 ("XSTEP_202");
      msg202.Arg(st402f7->FormNumber());
      SendFail(st402f7, msg202); 
      return res;
    }
    Message_ProgressSentry PS ( myTP->GetProgress(), "Group item", 0, st402f7->NbEntities(), 1 );
    Standard_Boolean ProblemInGroup = Standard_False;
    for (Standard_Integer i=1; i <= st402f7->NbEntities() && PS.More(); i++, PS.Next()) {
      TopoDS_Shape item;
      if (st402f7->Entity(i).IsNull()) {
	Message_Msg msg1020("IGES_1020");
	msg1020.Arg(i);
	SendFail( st402f7, msg1020);
	continue;
      }
      
      if(onlyvisible && st402f7->Entity(i)->BlankStatus() == 1 )
        continue;      

      if (HasShapeResult(st402f7->Entity(i))) {
	item = GetShapeResult(st402f7->Entity(i));
      }
      else {
	try {
	  OCC_CATCH_SIGNALS
	  item = TransferGeometry(st402f7->Entity(i));
	}
	catch(Standard_Failure) {
	  item.Nullify();
	  Message_Msg msg1015("IGES_1015");
	  SendFail(st402f7->Entity(i),msg1015);
	}
      }
      if (item.IsNull()) {
	//Message_Msg msg1030("IGES_1030");
	//msg1030.Arg(st402f7->FormNumber());
	//msg1030.Arg(i);
	//SendWarning (st402f7,msg1030);
        ProblemInGroup = Standard_True;
      }
      else {
	B.Add(group, item);
	SetShapeResult (st402f7->Entity(i),item);
      }
    }
    res = group;
    if(ProblemInGroup) {
      Message_Msg msg1030("IGES_1030");
      msg1030.Arg(st402f7->FormNumber());
      SendWarning (st402f7,msg1030);
    }
  }
  else {
    Message_Msg msg1001("IGES_1001");
    msg1001.Arg(start->FormNumber());
    SendFail (start,msg1001);
    return res;
  }
  
  if (start->HasTransf()) {
    gp_Trsf T;
    SetEpsilon(1.E-04);
    if (IGESData_ToolLocation::ConvertLocation(GetEpsilon(),start->CompoundLocation(),
                                               T,GetUnitFactor())) {
      if (start->IsKind(STANDARD_TYPE(IGESBasic_SingularSubfigure))) 
	{
	  gp_XYZ tra = T.TranslationPart();
	  gp_XYZ trans = T408.TranslationPart();
	  tra.Add(trans);
	  T.SetTranslationPart(tra);
	  Standard_Real sc = T.ScaleFactor();
	  Standard_Real scalef = T408.ScaleFactor();
	  sc = sc*scalef;
	  T.SetScaleFactor(sc);
	}
      TopLoc_Location L(T);
      res.Move(L);
    }
    else {
      Message_Msg msg1035("IGES_1035");
      SendWarning (start,msg1035);
    }
  }
  else {
    if (start->IsKind(STANDARD_TYPE(IGESBasic_SingularSubfigure))) {
      TopLoc_Location L(T408);
      res.Move(L);	  
    }
  }  
  return res;
}


//=======================================================================
//function : HasShapeResult
//purpose  : 
//=======================================================================

Standard_Boolean IGESToBRep_CurveAndSurface::HasShapeResult 
  (const Handle(IGESData_IGESEntity)& start) const
{
  DeclareAndCast(TransferBRep_ShapeBinder,binder,myTP->Find(start));
  if (binder.IsNull()) return Standard_False;
  return binder->HasResult();
}


//=======================================================================
//function : GetShapeResult
//purpose  : 
//=======================================================================

TopoDS_Shape IGESToBRep_CurveAndSurface::GetShapeResult 
  (const Handle(IGESData_IGESEntity)& start) const
{
  TopoDS_Shape res;

  DeclareAndCast(TransferBRep_ShapeBinder, binder, myTP->Find(start));
  if (binder.IsNull()) return res;
  if (binder->HasResult())
    res = binder->Result();
  return res;
}


//=======================================================================
//function : SetShapeResult
//purpose  : 
//=======================================================================

void IGESToBRep_CurveAndSurface::SetShapeResult 
  (const Handle(IGESData_IGESEntity)& start,
   const TopoDS_Shape& result)
{
  Handle(TransferBRep_ShapeBinder) binder = new TransferBRep_ShapeBinder;
  myTP->Bind(start,binder);
  binder->SetResult(result);
}

//=======================================================================
//function : NbShapeResult
//purpose  : 
//=======================================================================

Standard_Integer IGESToBRep_CurveAndSurface::NbShapeResult 
  (const Handle(IGESData_IGESEntity)& start) const
{
  Standard_Integer nbres = 0;
  DeclareAndCast(TransferBRep_ShapeListBinder,binder,myTP->Find(start));
  if (binder.IsNull()) return nbres;
  nbres = binder->NbShapes();
  return nbres;
}


//=======================================================================
//function : GetShapeResult
//purpose  : 
//=======================================================================

TopoDS_Shape IGESToBRep_CurveAndSurface::GetShapeResult 
  (const Handle(IGESData_IGESEntity)& start, const Standard_Integer num) const
{
  TopoDS_Shape res;

  DeclareAndCast(TransferBRep_ShapeListBinder,binder,myTP->Find(start));
  if (binder.IsNull()) return res;
  
  if (num <= binder->NbShapes()) 
    res = binder->Shape(num);
  return res;
}


//=======================================================================
//function : AddShapeResult
//purpose  : 
//=======================================================================

void IGESToBRep_CurveAndSurface::AddShapeResult 
  (const Handle(IGESData_IGESEntity)& start,
   const TopoDS_Shape& result)
{
  DeclareAndCast(TransferBRep_ShapeListBinder,binder,myTP->Find(start));
  if (binder.IsNull()){
    binder = new TransferBRep_ShapeListBinder;
    myTP->Bind(start,binder);
  }
  binder->AddResult(result);
}

void IGESToBRep_CurveAndSurface::SetSurface(const Handle(Geom_Surface)& theSurface)
{
  if(mySurface!=theSurface) {
    mySurface = theSurface;
    myIsResolCom = Standard_False;
    myUVResolution = 0.;
  }
}

Handle(Geom_Surface) IGESToBRep_CurveAndSurface::Surface() const 
{
  return mySurface;
}

Standard_Real IGESToBRep_CurveAndSurface::GetUVResolution()
{
  if(!myIsResolCom && !mySurface.IsNull()) {
    myIsResolCom = Standard_True;
    GeomAdaptor_Surface aGAS(mySurface);
    myUVResolution = Min(aGAS.UResolution(1.), aGAS.VResolution(1.));
  }
  return myUVResolution;
}