Salome HOME
Copyright update 2020
[modules/shaper.git] / src / ModuleBase / ModuleBase_ResultPrs.cpp
1 // Copyright (C) 2014-2020  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #include "ModuleBase_ResultPrs.h"
21 #include "ModuleBase_IViewer.h"
22
23 #include <GeomAPI_PlanarEdges.h>
24 #include <GeomAPI_Edge.h>
25
26 #include <ModelAPI_Events.h>
27 #include <ModelAPI_Tools.h>
28 #include <ModelAPI_ResultConstruction.h>
29 #include <ModelAPI_ResultBody.h>
30 #include <ModelAPI_AttributeIntArray.h>
31
32 #include "ModuleBase_Tools.h"
33 #include "ModuleBase_BRepOwner.h"
34
35 #include <Events_InfoMessage.h>
36 #include <Events_Loop.h>
37 #include <Config_PropManager.h>
38
39 #include <AIS_ColoredDrawer.hxx>
40 #include <AIS_InteractiveContext.hxx>
41 #include <AIS_Selection.hxx>
42 #include <BOPTools_AlgoTools3D.hxx>
43 #include <BRep_Builder.hxx>
44 #include <Graphic3d_AspectMarker3d.hxx>
45 #include <Prs3d_Drawer.hxx>
46 #include <Prs3d.hxx>
47 #include <Prs3d_PointAspect.hxx>
48 #include <Prs3d_IsoAspect.hxx>
49 #include <Prs3d_ShadingAspect.hxx>
50 #include <Prs3d_PlaneAspect.hxx>
51 #include <SelectMgr_SequenceOfOwner.hxx>
52 #include <SelectMgr_EntityOwner.hxx>
53 #include <SelectMgr_SelectionManager.hxx>
54 #include <StdPrs_WFShape.hxx>
55 #include <StdPrs_ShadedShape.hxx>
56 #include <StdSelect_BRepSelectionTool.hxx>
57 #include <TColStd_ListIteratorOfListOfInteger.hxx>
58 #include <TopExp_Explorer.hxx>
59 #include <TopoDS.hxx>
60 #include <TopoDS_Builder.hxx>
61 #include <TopoDS_Edge.hxx>
62 #include <BRepMesh_IncrementalMesh.hxx>
63
64 //*******************************************************************************************
65
66 IMPLEMENT_STANDARD_RTTIEXT(ModuleBase_ResultPrs, ViewerData_AISShape);
67
68
69
70 //********************************************************************
71 ModuleBase_ResultPrs::ModuleBase_ResultPrs(ResultPtr theResult)
72   : ViewerData_AISShape(TopoDS_Shape()), myResult(theResult), myAdditionalSelectionPriority(0),
73   myTransparency(1), myIsSubstituted(false)
74 {
75
76   GeomShapePtr aShapePtr = ModelAPI_Tools::shape(theResult);
77   TopoDS_Shape aShape = aShapePtr->impl<TopoDS_Shape>();
78   // Workaround for Sketch subshapes which has no discrete representation
79   // until sketch faces are built and displayed.
80   // Thus, perform discretization of such edges.
81   if (theResult->groupName() == ModelAPI_ResultConstruction::group() &&
82     aShape.ShapeType() == TopAbs_EDGE) {
83     GeomEdgePtr anEdgePtr = GeomEdgePtr(new GeomAPI_Edge(aShapePtr));
84     if (anEdgePtr->isCircle() || anEdgePtr->isArc()) {
85       TopoDS_Edge anEdge = TopoDS::Edge(aShape);
86       TopLoc_Location aLoc;
87       Handle(Poly_Polygon3D) aPoly3D = BRep_Tool::Polygon3D(anEdge, aLoc);
88       if (aPoly3D.IsNull()) {
89         double aDeflection = Config_PropManager::real("Visualization", "construction_deflection");
90         BRepMesh_IncrementalMesh(aShape, aDeflection);
91       }
92     }
93   }
94   Set(aShape);
95
96   // Activate individual repaintng if this is a part of compsolid
97   ResultBodyPtr aResOwner = ModelAPI_Tools::bodyOwner(myResult);
98   SetAutoHilight(aResOwner.get() == NULL);
99
100   // Set own free boundaries aspect in order to have free
101   // and unfree boundaries with different colors
102   Handle(Prs3d_Drawer) aDrawer = Attributes();
103   aDrawer->SetUnFreeBoundaryAspect(
104     new Prs3d_LineAspect(Quantity_NOC_YELLOW, Aspect_TOL_SOLID, 1));
105   aDrawer->SetFreeBoundaryAspect(new Prs3d_LineAspect(Quantity_NOC_GREEN, Aspect_TOL_SOLID, 1));
106   aDrawer->SetFaceBoundaryAspect(new Prs3d_LineAspect(Quantity_NOC_BLACK, Aspect_TOL_SOLID, 1));
107
108   Quantity_Color aColor;
109   Color(aColor);
110
111   std::vector<int> aIsoValues;
112   bool isIsoVisible;
113   ModelAPI_Tools::getIsoLines(myResult, isIsoVisible, aIsoValues);
114   if (isIsoVisible) {
115     if (aIsoValues.size() == 0) {
116       aIsoValues.push_back(1);
117       aIsoValues.push_back(1);
118     }
119   }
120   else {
121     aIsoValues.push_back(0);
122     aIsoValues.push_back(0);
123   }
124   myUIsoAspect = new Prs3d_IsoAspect(aColor, Aspect_TOL_SOLID, 1, aIsoValues[0]);
125   myVIsoAspect = new Prs3d_IsoAspect(aColor, Aspect_TOL_SOLID, 1, aIsoValues[1]);
126   aDrawer->SetUIsoAspect(myUIsoAspect);
127   aDrawer->SetVIsoAspect(myVIsoAspect);
128
129   if (aDrawer->HasOwnPointAspect())
130     aDrawer->PointAspect()->SetTypeOfMarker(Aspect_TOM_PLUS);
131   else
132     aDrawer->SetPointAspect(new Prs3d_PointAspect(Aspect_TOM_PLUS, Quantity_NOC_YELLOW, 1.));
133
134   aDrawer = DynamicHilightAttributes();
135   if (aDrawer.IsNull()) {
136     if (!ModuleBase_IViewer::DefaultHighlightDrawer.IsNull()) {
137       aDrawer = new Prs3d_Drawer(*ModuleBase_IViewer::DefaultHighlightDrawer);
138       aDrawer->SetUIsoAspect(myUIsoAspect);
139       aDrawer->SetVIsoAspect(myVIsoAspect);
140       SetDynamicHilightAttributes(aDrawer);
141     }
142   }
143
144   myHiddenSubShapesDrawer = new AIS_ColoredDrawer(myDrawer);
145   Handle(Prs3d_ShadingAspect) aShadingAspect = new Prs3d_ShadingAspect();
146   aShadingAspect->SetMaterial(Graphic3d_NOM_BRASS); //default value of context material
147   aShadingAspect->Aspect()->SetEdgeColor(Quantity_NOC_BLACK);
148   myHiddenSubShapesDrawer->SetShadingAspect(aShadingAspect);
149
150   ModuleBase_Tools::setPointBallHighlighting(this);
151
152   // Define colors for wireframe mode
153   setEdgesDefaultColor();
154
155   ModuleBase_Tools::setDefaultDeviationCoefficient(Shape(), DynamicHilightAttributes());
156   ModuleBase_Tools::setDefaultDeviationCoefficient(Shape(), Attributes());
157   Attributes()->UpdatePreviousDeviationCoefficient();
158 }
159
160 //********************************************************************
161 void ModuleBase_ResultPrs::setAdditionalSelectionPriority(const int thePriority)
162 {
163   myAdditionalSelectionPriority = thePriority;
164 }
165
166 //********************************************************************
167 void ModuleBase_ResultPrs::SetColor (const Quantity_Color& theColor)
168 {
169   ViewerData_AISShape::SetColor(theColor);
170   myHiddenSubShapesDrawer->ShadingAspect()->SetColor (theColor, myCurrentFacingModel);
171   setEdgesDefaultColor();
172   myUIsoAspect->SetColor(theColor);
173   myVIsoAspect->SetColor(theColor);
174 }
175
176 void ModuleBase_ResultPrs::setEdgesDefaultColor()
177 {
178   if (myResult.get()) {
179     AttributeIntArrayPtr aColorAttr = myResult->data()->intArray(ModelAPI_Result::COLOR_ID());
180     bool aHasColor = aColorAttr.get() && aColorAttr->isInitialized();
181
182     Handle(Prs3d_Drawer) aDrawer = Attributes();
183     aDrawer->SetFaceBoundaryDraw(Standard_True);
184     aDrawer->FaceBoundaryAspect()->SetColor(Quantity_NOC_BLACK);
185
186     if (!aHasColor) {
187       aDrawer->UnFreeBoundaryAspect()->SetColor(Quantity_NOC_YELLOW);
188       aDrawer->FreeBoundaryAspect()->SetColor(Quantity_NOC_GREEN);
189       aDrawer->WireAspect()->SetColor(Quantity_NOC_RED);
190
191       aDrawer->SetUnFreeBoundaryDraw(Standard_True);
192       aDrawer->SetFreeBoundaryDraw(Standard_True);
193       aDrawer->SetWireDraw(Standard_True);
194     }
195   }
196 }
197
198
199 //********************************************************************
200 void ModuleBase_ResultPrs::setSubShapeHidden(const TopoDS_ListOfShape& theShapes)
201 {
202   bool isModified = false;
203
204   TopoDS_Compound aCompound;
205   BRep_Builder aBBuilder;
206   aBBuilder.MakeCompound (aCompound);
207
208   myHiddenSubShapes = theShapes;
209   collectSubShapes(aBBuilder, aCompound, myOriginalShape, myHiddenSubShapes);
210   myVisibleCompound = aCompound;
211
212   aBBuilder.MakeCompound (aCompound);
213   TopoDS_ListOfShape::Iterator aIt(myHiddenSubShapes);
214   for (; aIt.More(); aIt.Next()) {
215     aBBuilder.Add(aCompound, aIt.Value());
216   }
217   myHiddenCompound = aCompound;
218 }
219
220 //********************************************************************
221 bool ModuleBase_ResultPrs::isSubShapeHidden(const TopoDS_Shape& theShape)
222 {
223   if (theShape.IsNull() || theShape.ShapeType() != TopAbs_FACE) // only face shape can be hidden
224     return false;
225
226   // orientation of parameter shape(come from selection) may be wrong, check isEqual() to be sure
227   TopoDS_ListOfShape::Iterator aShapeIt(myHiddenSubShapes);
228   for (; aShapeIt.More(); aShapeIt.Next()) {
229     if (theShape.IsSame(aShapeIt.Value()))
230       return true;
231   }
232
233   return true;
234 }
235
236 //********************************************************************
237 bool ModuleBase_ResultPrs::hasSubShapeVisible(
238   const TopoDS_ListOfShape& theShapesToSkip)
239 {
240   TopoDS_Compound aCompound;
241   BRep_Builder aBuilder;
242   aBuilder.MakeCompound (aCompound);
243   TopoDS_ListOfShape aShapesToSkip;
244   TopoDS_ListOfShape aHiddenCopy(myHiddenSubShapes);
245   aShapesToSkip.Append(aHiddenCopy);
246   for (TopoDS_ListOfShape::Iterator anIt(theShapesToSkip); anIt.More(); anIt.Next())
247     aShapesToSkip.Append(anIt.Value());
248
249   collectSubShapes(aBuilder, aCompound, myOriginalShape, aShapesToSkip);
250   return !BOPTools_AlgoTools3D::IsEmptyShape(aCompound);
251 }
252
253 //********************************************************************
254 bool ModuleBase_ResultPrs::setHiddenSubShapeTransparency(double theTransparency)
255 {
256   if (myTransparency == theTransparency || theTransparency > 1 || theTransparency < 0)
257     return false;
258
259   myTransparency = theTransparency;
260   myHiddenSubShapesDrawer->ShadingAspect()->SetTransparency (theTransparency, myCurrentFacingModel);
261   return true;
262 }
263
264 //********************************************************************
265 void ModuleBase_ResultPrs::Compute(
266           const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
267           const Handle(Prs3d_Presentation)& thePresentation,
268           const Standard_Integer theMode)
269 {
270   std::shared_ptr<GeomAPI_Shape> aShapePtr = myResult->shape();
271   bool aReadyToDisplay = aShapePtr.get();
272   if (aReadyToDisplay) {
273     myOriginalShape = aShapePtr->impl<TopoDS_Shape>();
274     if (myHiddenSubShapes.IsEmpty() || myOriginalShape.ShapeType() > TopAbs_FACE ) {
275       if (!myOriginalShape.IsNull()) {
276         Set(myOriginalShape);
277         myIsSubstituted = false;
278       }
279     }
280     else { // convert shape into SHELL
281       bool isEmptyShape = BOPTools_AlgoTools3D::IsEmptyShape(myVisibleCompound);
282       Set(myVisibleCompound);
283       myIsSubstituted = true;
284       if (isEmptyShape)
285         aReadyToDisplay = false;
286     }
287   }
288   // change deviation coefficient to provide more precise circle
289   try {
290     AIS_Shape::Compute(thePresentationManager, thePresentation, theMode);
291   }
292   catch (...) {
293     return;
294   }
295
296   // visualize hidden sub-shapes transparent
297   if (myResult.get()) {
298     if (myTransparency < 1 && !myHiddenSubShapes.IsEmpty())
299     {
300       StdPrs_ShadedShape::Add(thePresentation, myHiddenCompound, myHiddenSubShapesDrawer);
301       aReadyToDisplay = true;
302     }
303
304     if (!aReadyToDisplay) {
305       Events_InfoMessage("ModuleBase_ResultPrs",
306         "An empty AIS presentation: ModuleBase_ResultPrs").send();
307       static const Events_ID anEvent = Events_Loop::eventByName(EVENT_EMPTY_AIS_PRESENTATION);
308       ModelAPI_EventCreator::get()->sendUpdated(myResult, anEvent);
309     }
310   }
311 }
312
313 //********************************************************************
314 void ModuleBase_ResultPrs::collectSubShapes(BRep_Builder& theBuilder,
315   TopoDS_Shape& theCompound, const TopoDS_Shape& theShape,
316   const TopoDS_ListOfShape& theHiddenSubShapes)
317 {
318   switch (theShape.ShapeType()) {
319     case TopAbs_COMPSOLID:
320     case TopAbs_COMPOUND: {
321       for (TopoDS_Iterator aChildIter (theShape); aChildIter.More(); aChildIter.Next())
322         collectSubShapes(theBuilder, theCompound, aChildIter.Value(), theHiddenSubShapes);
323     }
324     break;
325     case TopAbs_SOLID:
326     case TopAbs_SHELL: {
327       for (TopExp_Explorer anExp (theShape, TopAbs_FACE); anExp.More(); anExp.Next()) {
328         collectSubShapes(theBuilder, theCompound, anExp.Current(), theHiddenSubShapes);
329       }
330     }
331     break;
332     case TopAbs_WIRE: {
333       for (TopExp_Explorer anExp (theShape, TopAbs_EDGE); anExp.More(); anExp.Next()) {
334         collectSubShapes(theBuilder, theCompound, anExp.Current(), theHiddenSubShapes);
335       }
336     }
337     break;
338     case TopAbs_FACE: {
339       if (theHiddenSubShapes.Contains(theShape))
340         return; // remove hidden shape
341       theBuilder.Add(theCompound, theShape);
342     }
343     break;
344     case TopAbs_EDGE:
345     case TopAbs_VERTEX: {
346       theBuilder.Add(theCompound, theShape);
347     }
348     default:
349       break;
350   }
351 }
352
353 //********************************************************************
354 void ModuleBase_ResultPrs::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
355                                             const Standard_Integer theMode)
356 {
357   if (appendVertexSelection(aSelection, theMode))
358     return;
359
360   if (theMode > TopAbs_SHAPE) {
361     // In order to avoid using custom selection modes
362     if (theMode == ModuleBase_ResultPrs::Sel_Result) {
363       AIS_Shape::ComputeSelection(aSelection, TopAbs_COMPOUND);
364     }
365     return;
366   }
367
368   // TODO: OCCT issue should be created for the COMPOUND processing
369   // before it is fixed, the next workaround in necessary
370   if (theMode == AIS_Shape::SelectionMode(TopAbs_COMPOUND)) {
371     const TopoDS_Shape& aShape = Shape();
372     TopExp_Explorer aCompExp(aShape, TopAbs_COMPOUND);
373     // do not activate in compound mode shapes which do not contain compounds
374     if (!aCompExp.More())
375       return;
376   }
377
378   // bug 2110: if (theMode == AIS_Shape::SelectionMode(TopAbs_COMPSOLID)) {
379   //  // Limit selection area only by actual object (Shape)
380   //  ResultCompSolidPtr aCompSolid = ModelAPI_Tools::compSolidOwner(myResult);
381   //  if (aCompSolid.get()) {
382   //    std::shared_ptr<GeomAPI_Shape> aShapePtr = ModelAPI_Tools::shape(aCompSolid);
383   //    if (aShapePtr.get()) {
384   //      TopoDS_Shape aShape = aShapePtr->impl<TopoDS_Shape>();
385   //   int aPriority = StdSelect_BRepSelectionTool::GetStandardPriority(aShape, TopAbs_COMPSOLID);
386   //     /// It is important to have priority for the shape of comp solid result less than priority
387   //      /// for the presentation shape which is a sub-result.
388   //      /// Reason is to select the sub-objects before: #1592
389   //      aPriority = aPriority - 1;
390   //      double aDeflection = Prs3d::GetDeflection(aShape, myDrawer);
391
392   //      Handle(ModuleBase_BRepOwner) aOwner = new ModuleBase_BRepOwner(aShape, aPriority);
393   //      StdSelect_BRepSelectionTool::ComputeSensitive(aShape, aOwner, aSelection,
394   //        aDeflection, myDrawer->HLRAngle(), 9, 500);
395
396   //      for (aSelection->Init(); aSelection->More(); aSelection->Next()) {
397   //        Handle(SelectMgr_EntityOwner) anOwner =
398   //          Handle(SelectMgr_EntityOwner)
399   //          ::DownCast(aSelection->Sensitive()->BaseSensitive()->OwnerId());
400   //        anOwner->Set(this);
401   //      }
402   //      return;
403   //    }
404   //  }
405   //}
406   AIS_Shape::ComputeSelection(aSelection, theMode);
407
408   if (myAdditionalSelectionPriority > 0) {
409     NCollection_Vector<Handle(SelectMgr_SensitiveEntity)> anEntities = aSelection->Entities();
410     for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator anIt(anEntities);
411          anIt.More();
412          anIt.Next()) {
413       Handle(SelectMgr_SensitiveEntity) anEntity = anIt.Value();
414       Handle(SelectBasics_EntityOwner) aBasicsOwner = anEntity->BaseSensitive()->OwnerId();
415       if (!aBasicsOwner.IsNull())
416         aBasicsOwner->Set(aBasicsOwner->Priority() + myAdditionalSelectionPriority);
417     }
418   }
419 }
420
421 //********************************************************************
422 bool ModuleBase_ResultPrs::appendVertexSelection(const Handle(SelectMgr_Selection)& aSelection,
423                                                  const Standard_Integer theMode)
424 {
425   if (Shape().ShapeType() == TopAbs_VERTEX) {
426     const TopoDS_Shape& aShape = Shape();
427
428     int aPriority = StdSelect_BRepSelectionTool::GetStandardPriority(aShape, TopAbs_VERTEX);
429     double aDeflection = Prs3d::GetDeflection(aShape, myDrawer);
430
431     /// The cause of this method is the last parameter of BRep owner setting into True.
432     /// That means that owner should behave like it comes from decomposition. (In this case, OCCT
433     /// visualizes it in Ring style) OCCT version is 7.0.0 with path for SHAPER module.
434     Handle(StdSelect_BRepOwner) aOwner = new StdSelect_BRepOwner(aShape, aPriority, Standard_True);
435     StdSelect_BRepSelectionTool::ComputeSensitive(aShape, aOwner, aSelection,
436                                                   aDeflection, myDrawer->HLRAngle(), 9, 500);
437
438
439     NCollection_Vector<Handle(SelectMgr_SensitiveEntity)> anEntities = aSelection->Entities();
440     for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator anIt(anEntities);
441          anIt.More();
442          anIt.Next()) {
443       Handle(SelectMgr_SensitiveEntity) anEntity = anIt.Value();
444       Handle(SelectMgr_EntityOwner) anOwner =
445         Handle(SelectMgr_EntityOwner)
446         ::DownCast(anEntity->BaseSensitive()->OwnerId());
447       anOwner->Set(this);
448     }
449
450     return true;
451   }
452   return false;
453 }
454
455 //********************************************************************
456 void ModuleBase_ResultPrs::HilightSelected(const Handle(PrsMgr_PresentationManager3d)& thePM,
457                                            const SelectMgr_SequenceOfOwner& theOwners)
458 {
459   Handle(SelectMgr_EntityOwner) anOwner;
460   Handle(ModuleBase_BRepOwner) aCompOwner;
461   for (int i = 1; i <= theOwners.Length(); i++) {
462     anOwner = theOwners.Value(i);
463     aCompOwner = Handle(ModuleBase_BRepOwner)::DownCast(anOwner);
464     if (aCompOwner.IsNull()) {
465       thePM->Color(anOwner->Selectable(), GetContext()->SelectionStyle());
466     }
467     else {
468       TopoDS_Shape aShape = aCompOwner->Shape();
469       Handle( Prs3d_Presentation ) aSelectionPrs = GetSelectPresentation( thePM );
470       aSelectionPrs->Clear();
471
472       StdPrs_WFShape::Add(aSelectionPrs, aShape, myDrawer);
473
474       aSelectionPrs->SetDisplayPriority(9);
475       aSelectionPrs->Highlight(GetContext()->SelectionStyle());
476       aSelectionPrs->Display();
477       thePM->Color(this, GetContext()->SelectionStyle());
478     }
479   }
480 }
481
482 //********************************************************************
483 void ModuleBase_ResultPrs::HilightOwnerWithColor(const Handle(PrsMgr_PresentationManager3d)& thePM,
484                                                  const Handle(Prs3d_Drawer)& theStyle,
485                                                  const Handle(SelectMgr_EntityOwner)& theOwner)
486 {
487   Handle(StdSelect_BRepOwner) aOwner = Handle(StdSelect_BRepOwner)::DownCast(theOwner);
488   if (aOwner.IsNull())
489     return;
490
491   TopoDS_Shape aShape = aOwner->Shape();
492   if (!aShape.IsNull()) {
493     thePM->Color(this, theStyle);
494
495     Handle( Prs3d_Presentation ) aHilightPrs = GetHilightPresentation( thePM );
496     aHilightPrs->Clear();
497
498     StdPrs_WFShape::Add(aHilightPrs, aShape, myDrawer);
499     aHilightPrs->Highlight(theStyle);
500
501     if (thePM->IsImmediateModeOn())
502       thePM->AddToImmediateList(aHilightPrs);
503   }
504 }
505
506
507 //********************************************************************
508 void ModuleBase_ResultPrs::updateIsoLines()
509 {
510   std::vector<int> aIsoValues;
511   bool isIsoVisible;
512   ModelAPI_Tools::getIsoLines(myResult, isIsoVisible, aIsoValues);
513   if (isIsoVisible) {
514     if (aIsoValues.size() == 0) {
515       aIsoValues.push_back(1);
516       aIsoValues.push_back(1);
517     }
518   }
519   else {
520     if (aIsoValues.size() == 0) {
521       aIsoValues.push_back(0);
522       aIsoValues.push_back(0);
523     }
524     else {
525       aIsoValues[0] = 0;
526       aIsoValues[1] = 0;
527     }
528   }
529   myUIsoAspect->SetNumber(aIsoValues[0]);
530   myVIsoAspect->SetNumber(aIsoValues[1]);
531 }