0024023: Revamp the OCCT Handle -- ambiguity
[occt.git] / src / AIS / AIS_InteractiveObject.cxx
CommitLineData
b311480e 1// Created on: 1996-12-18
2// Created by: Robert COUBLANC
3// Copyright (c) 1996-1999 Matra Datavision
973c2be1 4// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5//
973c2be1 6// This file is part of Open CASCADE Technology software library.
b311480e 7//
d5f74e42 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
973c2be1 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.
b311480e 13//
973c2be1 14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
7fd59977 16
17// Modified : 22/03/04 ; SAN : OCC4895 High-level interface for controlling polygon offsets
18
7fd59977 19#include <AIS_InteractiveObject.ixx>
20
21#include <Aspect_PolygonOffsetMode.hxx>
22#include <Prs3d_ShadingAspect.hxx>
23#include <Prs3d_LineAspect.hxx>
24#include <Prs3d_PointAspect.hxx>
25#include <Prs3d_TextAspect.hxx>
26#include <Prs3d_Presentation.hxx>
27#include <Prs3d_Root.hxx>
28#include <PrsMgr_ModedPresentation.hxx>
29#include <PrsMgr_PresentationManager3d.hxx>
30#include <TColStd_ListIteratorOfListOfInteger.hxx>
31#include <AIS_GraphicTool.hxx>
32#include <Graphic3d_AspectFillArea3d.hxx>
3ddebf91 33#include <Graphic3d_AspectLine3d.hxx>
34#include <Graphic3d_AspectMarker3d.hxx>
35#include <Graphic3d_AspectText3d.hxx>
f751596e 36#include <Graphic3d_BndBox4f.hxx>
37#include <Graphic3d_CStructure.hxx>
7fd59977 38#include <Graphic3d_Group.hxx>
39#include <Graphic3d_Structure.hxx>
40
41
42//=======================================================================
43//function : AIS_InteractiveObject
44//purpose :
45//=======================================================================
46
47AIS_InteractiveObject::
48AIS_InteractiveObject(const PrsMgr_TypeOfPresentation3d aTypeOfPresentation3d):
49SelectMgr_SelectableObject(aTypeOfPresentation3d),
7fd59977 50myTransparency(0.),
51myOwnColor(Quantity_NOC_WHITE),
a0ed63ac 52myOwnMaterial(Graphic3d_NOM_DEFAULT),
7fd59977 53myHilightMode(-1),
54myOwnWidth(0.0),
55myInfiniteState(Standard_False),
56hasOwnColor(Standard_False),
57hasOwnMaterial(Standard_False),
a0ed63ac 58myCurrentFacingModel(Aspect_TOFM_BOTH_SIDE),
7fd59977 59myRecomputeEveryPrs(Standard_True),
a0ed63ac 60myCTXPtr(NULL),
7fd59977 61mySelPriority(-1),
62myDisplayMode (-1),
63mySelectionMode(0),
0717ddc1 64mystate(0)
7fd59977 65{
66 Handle (AIS_InteractiveContext) Bid;
67 myCTXPtr = Bid.operator->();
7fd59977 68 SetCurrentFacingModel();
7fd59977 69}
70
71//=======================================================================
72//function : Redisplay
36132a2e 73//purpose :
7fd59977 74//=======================================================================
36132a2e 75void AIS_InteractiveObject::Redisplay (const Standard_Boolean AllModes)
7fd59977 76{
36132a2e 77 if (myCTXPtr == NULL)
78 return;
79
80 myCTXPtr->Redisplay (this, Standard_False, AllModes);
7fd59977 81}
82
83//=======================================================================
84//function : Type
85//purpose :
86//=======================================================================
87
88AIS_KindOfInteractive AIS_InteractiveObject::Type() const
89{return AIS_KOI_None;}
90
91//=======================================================================
92//function : Signature
93//purpose :
94//=======================================================================
95
96Standard_Integer AIS_InteractiveObject::Signature() const
97{return -1;}
98
99//=======================================================================
100//function : RecomputeEveryPrs
101//purpose :
102//=======================================================================
103
104Standard_Boolean AIS_InteractiveObject::RecomputeEveryPrs() const
105{return myRecomputeEveryPrs;}
106
107//=======================================================================
108//function :
109//purpose :
110//=======================================================================
111Standard_Boolean AIS_InteractiveObject::HasInteractiveContext() const
112{
113 Handle (AIS_InteractiveContext) aNull;
114 return (myCTXPtr != aNull.operator->());
115}
116
117//=======================================================================
118//function :
119//purpose :
120//=======================================================================
121Handle(AIS_InteractiveContext) AIS_InteractiveObject::GetContext() const
122{
123 return myCTXPtr;
124}
125
126//=======================================================================
127//function :
128//purpose :
129//=======================================================================
130void AIS_InteractiveObject::SetContext(const Handle(AIS_InteractiveContext)& aCtx)
131{
132 myCTXPtr = aCtx.operator->();
da0e82aa 133 if( aCtx.IsNull())
134 return;
7fd59977 135 myDrawer->Link(aCtx->DefaultDrawer());
136}
137
138//=======================================================================
139//function :
140//purpose :
141//=======================================================================
142Standard_Boolean AIS_InteractiveObject::HasOwner() const
143{
144 return (!myOwner.IsNull());
145}
146
147
148
149//=======================================================================
150//function :
151//purpose :
152//=======================================================================
153void AIS_InteractiveObject::ClearOwner()
154{
155 myOwner.Nullify();
156}
157
158//=======================================================================
159//function :
160//purpose :
161//=======================================================================
162Standard_Boolean AIS_InteractiveObject::HasUsers() const
163{
164 return (!myUsers.IsEmpty());
165}
166
167
168//=======================================================================
169//function :
170//purpose :
171//=======================================================================
172void AIS_InteractiveObject::AddUser(const Handle(Standard_Transient)& aUser)
173{
174 myUsers.Append(aUser);
175}
176
177//=======================================================================
178//function :
179//purpose :
180//=======================================================================
181void AIS_InteractiveObject::ClearUsers()
182{
183 myUsers.Clear();
184}
185
186
187//=======================================================================
188//function :
189//purpose :
190//=======================================================================
191void AIS_InteractiveObject::SetDisplayMode(const Standard_Integer aMode)
192{
7fd59977 193 if( AcceptDisplayMode(aMode) )
7fd59977 194 myDisplayMode = aMode;
195}
196
197
198//=======================================================================
199//function :
200//purpose :
201//=======================================================================
202void AIS_InteractiveObject::SetSelectionMode(const Standard_Integer aMode)
203{
204 mySelectionMode = aMode;
205}
206
207
208
209//=======================================================================
210//function :
211//purpose :
212//=======================================================================
7fd59977 213void AIS_InteractiveObject::SetCurrentFacingModel(const Aspect_TypeOfFacingModel aModel) {
214 myCurrentFacingModel = aModel;
215}
216
217//=======================================================================
218//function : CurrentFacingModel
219//purpose :
220//=======================================================================
221
222Aspect_TypeOfFacingModel AIS_InteractiveObject::CurrentFacingModel() const {
223 return myCurrentFacingModel;
224}
7fd59977 225
226//=======================================================================
227//function : SetColor
228//purpose :
229//=======================================================================
230
231void AIS_InteractiveObject::SetColor(const Quantity_NameOfColor aColor)
7fd59977 232{
233 SetColor(Quantity_Color(aColor));
234}
235
236//=======================================================================
237//function : SetColor
238//purpose :
239//=======================================================================
240
241void AIS_InteractiveObject::SetColor(const Quantity_Color &aColor)
7fd59977 242{
243 myOwnColor = aColor;
244 hasOwnColor = Standard_True;
245}
246
247//=======================================================================
248//function : UnsetColor
249//purpose :
250//=======================================================================
251void AIS_InteractiveObject::UnsetColor()
252{
253 hasOwnColor = Standard_False;
254}
255
256//=======================================================================
257//function :
258//purpose :
259//=======================================================================
260void AIS_InteractiveObject::SetWidth(const Standard_Real aValue)
261{
262 myOwnWidth = aValue;
263}
264
265//=======================================================================
266//function :
267//purpose :
268//=======================================================================
269void AIS_InteractiveObject::UnsetWidth()
270{
271 myOwnWidth = 0.;
272}
273
274
275//=======================================================================
276//function :
277//purpose :
278//=======================================================================
7fd59977 279void AIS_InteractiveObject::SetMaterial(const Graphic3d_NameOfMaterial aName)
7fd59977 280{
281 if( HasColor() || IsTransparent() || HasMaterial() )
6262338c 282 {
283 myDrawer->ShadingAspect()->SetMaterial(aName);
284 }
285 else
286 {
287 myDrawer->SetShadingAspect(new Prs3d_ShadingAspect());
288 myDrawer->ShadingAspect()->SetMaterial(aName);
289 }
7fd59977 290 myOwnMaterial = aName;
291 hasOwnMaterial = Standard_True;
292}
189f85a3 293
7fd59977 294//=======================================================================
295//function : SetMaterial
296//purpose :
297//=======================================================================
189f85a3 298void AIS_InteractiveObject::SetMaterial (const Graphic3d_MaterialAspect& theMaterial)
7fd59977 299{
189f85a3 300 if (!HasColor() && !IsTransparent() && !HasMaterial())
6262338c 301 {
189f85a3 302 myDrawer->SetShadingAspect (new Prs3d_ShadingAspect);
6262338c 303 }
189f85a3 304
305 myDrawer->ShadingAspect()->SetMaterial (theMaterial);
306
7fd59977 307 hasOwnMaterial = Standard_True;
7fd59977 308}
189f85a3 309
7fd59977 310//=======================================================================
189f85a3 311//function : UnsetMaterial
312//purpose :
7fd59977 313//=======================================================================
314void AIS_InteractiveObject::UnsetMaterial()
315{
189f85a3 316 if (!HasMaterial())
317 {
318 return;
319 }
320
6262338c 321 if (HasColor() || IsTransparent())
322 {
323 if(myDrawer->HasLink())
324 {
325 myDrawer->ShadingAspect()->SetMaterial (AIS_GraphicTool::GetMaterial (myDrawer->Link()));
326 }
189f85a3 327
328 if (HasColor())
329 {
330 SetColor (myOwnColor);
331 }
332
333 if (IsTransparent())
334 {
335 SetTransparency (myTransparency);
336 }
7fd59977 337 }
189f85a3 338 else
339 {
340 Handle(Prs3d_ShadingAspect) anAspect;
341 myDrawer->SetShadingAspect (anAspect);
7fd59977 342 }
189f85a3 343
7fd59977 344 hasOwnMaterial = Standard_False;
345}
346
347//=======================================================================
348//function : SetTransparency
349//purpose :
350//=======================================================================
351void AIS_InteractiveObject::SetTransparency(const Standard_Real aValue)
352{
6262338c 353 if(!HasColor() && !IsTransparent() && !HasMaterial())
354 {
355 myDrawer->SetShadingAspect(new Prs3d_ShadingAspect());
356 if(myDrawer->HasLink())
357 myDrawer->ShadingAspect()->SetMaterial(AIS_GraphicTool::GetMaterial(myDrawer->Link()));
7fd59977 358 }
359 Graphic3d_MaterialAspect FMat = myDrawer->ShadingAspect()->Aspect()->FrontMaterial();
360 Graphic3d_MaterialAspect BMat = myDrawer->ShadingAspect()->Aspect()->BackMaterial();
361 FMat.SetTransparency(aValue); BMat.SetTransparency(aValue);
362 myDrawer->ShadingAspect()->Aspect()->SetFrontMaterial(FMat);
363 myDrawer->ShadingAspect()->Aspect()->SetBackMaterial(BMat);
7fd59977 364 myTransparency = aValue;
365}
366
367//=======================================================================
368//function : UnsetTransparency
369//purpose :
370//=======================================================================
371void AIS_InteractiveObject::UnsetTransparency()
372{
6262338c 373 if(HasColor() || HasMaterial() )
374 {
375 Graphic3d_MaterialAspect FMat = myDrawer->ShadingAspect()->Aspect()->FrontMaterial();
376 Graphic3d_MaterialAspect BMat = myDrawer->ShadingAspect()->Aspect()->BackMaterial();
377 FMat.SetTransparency(0.); BMat.SetTransparency(0.);
378 myDrawer->ShadingAspect()->Aspect()->SetFrontMaterial(FMat);
379 myDrawer->ShadingAspect()->Aspect()->SetBackMaterial(BMat);
380 }
7fd59977 381 else{
382 Handle (Prs3d_ShadingAspect) SA;
383 myDrawer->SetShadingAspect(SA);
384 }
385 myTransparency =0.0;
386}
387//=======================================================================
388//function : Transparency
389//purpose :
390//=======================================================================
391Standard_Real AIS_InteractiveObject::Transparency() const
392{
393 return (myTransparency<=0.05 ? 0 : myTransparency);
394// Graphic3d_MaterialAspect Mat = myDrawer->ShadingAspect()->Aspect()->FrontMaterial();
395// return Mat.Transparency();
396}
397
398//=======================================================================
7fd59977 399//function : UnsetAttributes
400//purpose :
401//=======================================================================
402void AIS_InteractiveObject::UnsetAttributes()
403{
6262338c 404 SelectMgr_SelectableObject::UnsetAttributes();
405
7fd59977 406 hasOwnColor = Standard_False;
407 hasOwnMaterial = Standard_False;
408 myOwnWidth = 0.0;
409 myTransparency = 0.0;
410}
411
412//=======================================================================
413//function :
414//purpose :
415//=======================================================================
416void AIS_InteractiveObject::MustRecomputePrs(const Standard_Integer ) const
417{}
418
419//=======================================================================
420//function :
421//purpose :
422//=======================================================================
423const TColStd_ListOfInteger& AIS_InteractiveObject::ListOfRecomputeModes() const
424{return myToRecomputeModes;}
425
426//=======================================================================
427//function :
428//purpose :
429//=======================================================================
430void AIS_InteractiveObject::SetRecomputeOk()
431{myToRecomputeModes.Clear();}
432
433
434//=======================================================================
435//function : AcceptDisplayMode
436//purpose :
437//=======================================================================
438
439Standard_Boolean AIS_InteractiveObject::AcceptDisplayMode(const Standard_Integer ) const
440{return Standard_True;}
441
442//=======================================================================
443//function : DefaultDisplayMode
444//purpose :
445//=======================================================================
446
447Standard_Integer AIS_InteractiveObject::DefaultDisplayMode() const
448{return 0;}
449
450
451//=======================================================================
452//function : SetInfiniteState
453//purpose :
454//=======================================================================
455void AIS_InteractiveObject::SetInfiniteState(const Standard_Boolean aFlag)
456{
457 myInfiniteState = aFlag;
458 Handle(Prs3d_Presentation) P;
459
5e5b6f81 460 for(Standard_Integer i =1; i<=myPresentations.Length();i++)
461 {
462 P = myPresentations(i).Presentation()->Presentation();
7fd59977 463 if(!P.IsNull())
5e5b6f81 464 P->SetInfiniteState(myInfiniteState);
465 }
7fd59977 466}
467
7fd59977 468//=======================================================================
7fd59977 469//function : HasPresentation
af324faa 470//purpose :
7fd59977 471//=======================================================================
af324faa 472Standard_Boolean AIS_InteractiveObject::HasPresentation() const
473{
474 return !GetContext().IsNull()
475 && GetContext()->MainPrsMgr()->HasPresentation (this, myDisplayMode);
7fd59977 476}
477
478//=======================================================================
479//function : Presentation
af324faa 480//purpose :
7fd59977 481//=======================================================================
af324faa 482Handle(Prs3d_Presentation) AIS_InteractiveObject::Presentation() const
483{
484 return HasPresentation()
485 ? GetContext()->MainPrsMgr()->Presentation (this, myDisplayMode)->Presentation()
486 : Handle(Prs3d_Presentation)();
7fd59977 487}
488
489//=======================================================================
490//function : SetAspect
491//purpose :
492//=======================================================================
493void AIS_InteractiveObject::SetAspect(const Handle(Prs3d_BasicAspect)& anAspect,
494 const Standard_Boolean globalChange) {
495
496 if( HasPresentation() ) {
497 Handle(Prs3d_Presentation) prs = Presentation();
498 { Handle(Prs3d_ShadingAspect) aspect =
499 Handle(Prs3d_ShadingAspect)::DownCast(anAspect);
500 if( !aspect.IsNull() ) {
501 if( globalChange ) prs->SetPrimitivesAspect(aspect->Aspect());
502 Prs3d_Root::CurrentGroup(prs)->SetGroupPrimitivesAspect(aspect->Aspect());
503 return;
504 }
505 }
506 { Handle(Prs3d_LineAspect) aspect =
507 Handle(Prs3d_LineAspect)::DownCast(anAspect);
508 if( !aspect.IsNull() ) {
509 if( globalChange ) prs->SetPrimitivesAspect(aspect->Aspect());
510 Prs3d_Root::CurrentGroup(prs)->SetGroupPrimitivesAspect(aspect->Aspect());
511 return;
512 }
513 }
514 { Handle(Prs3d_PointAspect) aspect =
515 Handle(Prs3d_PointAspect)::DownCast(anAspect);
516 if( !aspect.IsNull() ) {
517 if( globalChange ) prs->SetPrimitivesAspect(aspect->Aspect());
518 Prs3d_Root::CurrentGroup(prs)->SetGroupPrimitivesAspect(aspect->Aspect());
519 return;
520 }
521 }
522 { Handle(Prs3d_TextAspect) aspect =
523 Handle(Prs3d_TextAspect)::DownCast(anAspect);
524 if( !aspect.IsNull() ) {
525 if( globalChange ) prs->SetPrimitivesAspect(aspect->Aspect());
526 Prs3d_Root::CurrentGroup(prs)->SetGroupPrimitivesAspect(aspect->Aspect());
527 return;
528 }
529 }
530 }
531}
7fd59977 532
533//=======================================================================
534//function : SetPolygonOffsets
535//purpose :
536//=======================================================================
60be1f9b 537void AIS_InteractiveObject::SetPolygonOffsets(const Standard_Integer aMode,
538 const Standard_ShortReal aFactor,
539 const Standard_ShortReal aUnits)
7fd59977 540{
541 if ( !HasPolygonOffsets() )
542 myDrawer->SetShadingAspect(new Prs3d_ShadingAspect());
543
544 myDrawer->ShadingAspect()->Aspect()->SetPolygonOffsets( aMode, aFactor, aUnits );
545
546 // Modify existing presentations
af324faa 547 for (Standard_Integer aPrsIter = 1, n = myPresentations.Length(); aPrsIter <= n; ++aPrsIter)
548 {
549 const Handle(PrsMgr_Presentation)& aPrs3d = myPresentations (aPrsIter).Presentation();
7fd59977 550 if ( !aPrs3d.IsNull() ) {
af324faa 551 const Handle(Graphic3d_Structure)& aStruct = aPrs3d->Presentation();
3ddebf91 552 if( !aStruct.IsNull() ) {
7fd59977 553 aStruct->SetPrimitivesAspect( myDrawer->ShadingAspect()->Aspect() );
3ddebf91 554 // Workaround for issue 23115: Need to update also groups, because their
555 // face aspect ALWAYS overrides the structure's.
556 const Graphic3d_SequenceOfGroup& aGroups = aStruct->Groups();
b64d84be 557 for (Graphic3d_SequenceOfGroup::Iterator aGroupIter (aGroups); aGroupIter.More(); aGroupIter.Next())
558 {
559 Handle(Graphic3d_Group)& aGrp = aGroupIter.ChangeValue();
560 if (aGrp.IsNull()
561 || !aGrp->IsGroupPrimitivesAspectSet (Graphic3d_ASPECT_FILL_AREA))
562 {
563 continue;
3ddebf91 564 }
b64d84be 565
566 Handle(Graphic3d_AspectFillArea3d) aFaceAsp = new Graphic3d_AspectFillArea3d();
567 Handle(Graphic3d_AspectLine3d) aLineAsp = new Graphic3d_AspectLine3d();
568 Handle(Graphic3d_AspectMarker3d) aPntAsp = new Graphic3d_AspectMarker3d();
569 Handle(Graphic3d_AspectText3d) aTextAsp = new Graphic3d_AspectText3d();
570 // TODO: Add methods for retrieving individual aspects from Graphic3d_Group
571 aGrp->GroupPrimitivesAspect(aLineAsp, aTextAsp, aPntAsp, aFaceAsp);
572 aFaceAsp->SetPolygonOffsets(aMode, aFactor, aUnits);
573 aGrp->SetGroupPrimitivesAspect(aFaceAsp);
3ddebf91 574 }
575 }
7fd59977 576 }
577 }
578}
579
7fd59977 580//=======================================================================
581//function : HasPolygonOffsets
582//purpose :
583//=======================================================================
584Standard_Boolean AIS_InteractiveObject::HasPolygonOffsets() const
585{
586 return !( myDrawer->ShadingAspect().IsNull() ||
6262338c 587 ( myDrawer->HasLink() &&
7fd59977 588 myDrawer->ShadingAspect() == myDrawer->Link()->ShadingAspect() ) );
589}
590
591//=======================================================================
592//function : PolygonOffsets
593//purpose :
594//=======================================================================
60be1f9b 595void AIS_InteractiveObject::PolygonOffsets(Standard_Integer& aMode,
596 Standard_ShortReal& aFactor,
597 Standard_ShortReal& aUnits) const
7fd59977 598{
599 if( HasPolygonOffsets() )
600 myDrawer->ShadingAspect()->Aspect()->PolygonOffsets( aMode, aFactor, aUnits );
601}
f751596e 602
603//=======================================================================
604//function : BoundingBox
605//purpose : Returns bounding box of object correspondingly to its
606// current display mode
607//=======================================================================
608void AIS_InteractiveObject::BoundingBox (Bnd_Box& theBndBox)
609{
610 if (myDisplayMode == -1)
611 {
612 if (!myPresentations.IsEmpty())
613 {
614 const Handle(PrsMgr_Presentation)& aPrs3d = myPresentations.First().Presentation();
615 const Handle(Graphic3d_Structure)& aStruct = aPrs3d->Presentation();
616 const Graphic3d_BndBox4f& aBndBox = aStruct->CStructure()->BoundingBox();
b3c433fe 617
618 if (!aBndBox.IsValid())
619 {
620 theBndBox.SetVoid();
621 return;
622 }
623
f751596e 624 theBndBox.Update (static_cast<Standard_Real> (aBndBox.CornerMin().x()),
625 static_cast<Standard_Real> (aBndBox.CornerMin().y()),
626 static_cast<Standard_Real> (aBndBox.CornerMin().z()),
627 static_cast<Standard_Real> (aBndBox.CornerMax().x()),
628 static_cast<Standard_Real> (aBndBox.CornerMax().y()),
629 static_cast<Standard_Real> (aBndBox.CornerMax().z()));
630 return;
631 }
632 else
633 {
634 for (PrsMgr_ListOfPresentableObjectsIter aPrsIter (Children()); aPrsIter.More(); aPrsIter.Next())
635 {
c5f3a425 636 Handle(AIS_InteractiveObject) aChild (Handle(AIS_InteractiveObject)::DownCast (aPrsIter.Value()));
f751596e 637 if (aChild.IsNull())
638 {
639 continue;
640 }
641 Bnd_Box aBox;
642 aChild->BoundingBox (aBox);
643 theBndBox.Add (aBox);
644 }
645 return;
646 }
647 }
648 else
649 {
650 for (Standard_Integer aPrsIter = 1; aPrsIter <= myPresentations.Length(); ++aPrsIter)
651 {
652 if (myPresentations (aPrsIter).Mode() == myDisplayMode)
653 {
654 const Handle(PrsMgr_Presentation)& aPrs3d = myPresentations (aPrsIter).Presentation();
655 const Handle(Graphic3d_Structure)& aStruct = aPrs3d->Presentation();
656 const Graphic3d_BndBox4f& aBndBox = aStruct->CStructure()->BoundingBox();
b3c433fe 657
658 if (!aBndBox.IsValid())
659 {
660 theBndBox.SetVoid();
661 return;
662 }
663
f751596e 664 theBndBox.Update (static_cast<Standard_Real> (aBndBox.CornerMin().x()),
665 static_cast<Standard_Real> (aBndBox.CornerMin().y()),
666 static_cast<Standard_Real> (aBndBox.CornerMin().z()),
667 static_cast<Standard_Real> (aBndBox.CornerMax().x()),
668 static_cast<Standard_Real> (aBndBox.CornerMax().y()),
669 static_cast<Standard_Real> (aBndBox.CornerMax().z()));
670 return;
671 }
672 }
673 }
674}