1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: XGUI_Displayer.cpp
4 // Created: 20 Apr 2014
5 // Author: Natalia ERMOLAEVA
7 #include "XGUI_Displayer.h"
8 #include "XGUI_Workshop.h"
9 #include "XGUI_ViewerProxy.h"
10 #include "XGUI_SelectionMgr.h"
11 #include "XGUI_Selection.h"
13 #include <AppElements_Viewer.h>
15 #include <ModelAPI_Document.h>
16 #include <ModelAPI_Data.h>
17 #include <ModelAPI_Object.h>
18 #include <ModelAPI_Tools.h>
20 #include <ModuleBase_ResultPrs.h>
22 #include <GeomAPI_Shape.h>
23 #include <GeomAPI_IPresentable.h>
24 #include <GeomAPI_ICustomPrs.h>
26 #include <AIS_InteractiveContext.hxx>
27 #include <AIS_LocalContext.hxx>
28 #include <AIS_ListOfInteractive.hxx>
29 #include <AIS_ListIteratorOfListOfInteractive.hxx>
30 #include <AIS_DimensionSelectionMode.hxx>
31 #include <AIS_Shape.hxx>
32 #include <AIS_Dimension.hxx>
33 #include <TColStd_ListIteratorOfListOfInteger.hxx>
34 #include <SelectMgr_ListOfFilter.hxx>
35 #include <SelectMgr_ListIteratorOfListOfFilter.hxx>
37 #include <TColStd_MapOfTransient.hxx>
38 #include <TColStd_MapIteratorOfMapOfTransient.hxx>
42 const int MOUSE_SENSITIVITY_IN_PIXEL = 10; ///< defines the local context mouse selection sensitivity
45 // Workaround for bug #25637
46 void displayedObjects(const Handle(AIS_InteractiveContext)& theAIS, AIS_ListOfInteractive& theList)
48 // Get from null point
49 theAIS->DisplayedObjects(theList, true);
50 if (theAIS->HasOpenedContext()) {
51 // get from local context
52 const Handle(AIS_LocalContext)& aLC = theAIS->LocalContext();
53 TColStd_MapOfTransient aMap;
54 int NbDisp = aLC->DisplayedObjects(aMap);
55 TColStd_MapIteratorOfMapOfTransient aIt(aMap);
57 Handle(AIS_InteractiveObject) curIO;
58 Handle(Standard_Transient) Tr;
59 for(; aIt.More(); aIt.Next()){
61 curIO = *((Handle(AIS_InteractiveObject)*) &Tr);
62 theList.Append(curIO);
68 XGUI_Displayer::XGUI_Displayer(XGUI_Workshop* theWorkshop)
69 : myWorkshop(theWorkshop)
71 enableUpdateViewer(true);
74 XGUI_Displayer::~XGUI_Displayer()
78 bool XGUI_Displayer::isVisible(ObjectPtr theObject) const
80 return myResult2AISObjectMap.contains(theObject);
83 void XGUI_Displayer::display(ObjectPtr theObject, bool isUpdateViewer)
85 if (isVisible(theObject)) {
86 redisplay(theObject, isUpdateViewer);
90 GeomPresentablePtr aPrs = std::dynamic_pointer_cast<GeomAPI_IPresentable>(theObject);
91 bool isShading = false;
92 if (aPrs.get() != NULL) {
93 anAIS = aPrs->getAISObject(AISObjectPtr());
95 ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(theObject);
96 if (aResult.get() != NULL) {
97 std::shared_ptr<GeomAPI_Shape> aShapePtr = ModelAPI_Tools::shape(aResult);
98 if (aShapePtr.get() != NULL) {
99 anAIS = AISObjectPtr(new GeomAPI_AISObject());
100 anAIS->setImpl(new Handle(AIS_InteractiveObject)(new ModuleBase_ResultPrs(aResult)));
101 //anAIS->createShape(aShapePtr);
107 display(theObject, anAIS, isShading, isUpdateViewer);
111 bool canBeShaded(Handle(AIS_InteractiveObject) theAIS)
113 Handle(AIS_Shape) aShapePrs = Handle(AIS_Shape)::DownCast(theAIS);
114 if (!aShapePrs.IsNull()) {
115 TopoDS_Shape aShape = aShapePrs->Shape();
116 TopAbs_ShapeEnum aType = aShape.ShapeType();
117 if ((aType == TopAbs_VERTEX) || (aType == TopAbs_EDGE) || (aType == TopAbs_WIRE))
120 // Check that the presentation is not a sketch
121 Handle(ModuleBase_ResultPrs) aPrs = Handle(ModuleBase_ResultPrs)::DownCast(theAIS);
123 return !aPrs->isSketchMode();
130 void XGUI_Displayer::display(ObjectPtr theObject, AISObjectPtr theAIS,
131 bool isShading, bool isUpdateViewer)
133 Handle(AIS_InteractiveContext) aContext = AISContext();
134 if (aContext.IsNull())
137 Handle(AIS_InteractiveObject) anAISIO = theAIS->impl<Handle(AIS_InteractiveObject)>();
138 if (!anAISIO.IsNull()) {
139 myResult2AISObjectMap[theObject] = theAIS;
140 bool aCanBeShaded = ::canBeShaded(anAISIO);
141 // In order to avoid extra closing/opening context
142 SelectMgr_IndexedMapOfOwner aSelectedOwners;
144 myWorkshop->selector()->selection()->selectedOwners(aSelectedOwners);
145 closeLocalContexts(false);
147 aContext->Display(anAISIO, false);
149 aContext->SetDisplayMode(anAISIO, isShading? Shading : Wireframe, false);
150 // Customization of presentation
151 FeaturePtr aFeature = ModelAPI_Feature::feature(theObject);
152 if (aFeature.get() != NULL) {
153 GeomCustomPrsPtr aCustPrs = std::dynamic_pointer_cast<GeomAPI_ICustomPrs>(aFeature);
154 if (aCustPrs.get() != NULL)
155 aCustPrs->customisePresentation(theAIS);
159 activateObjects(myActiveSelectionModes);
160 myWorkshop->selector()->setSelectedOwners(aSelectedOwners, false);
167 void XGUI_Displayer::erase(ObjectPtr theObject, const bool isUpdateViewer)
169 if (!isVisible(theObject))
172 Handle(AIS_InteractiveContext) aContext = AISContext();
173 if (aContext.IsNull())
175 AISObjectPtr anObject = myResult2AISObjectMap[theObject];
177 Handle(AIS_InteractiveObject) anAIS = anObject->impl<Handle(AIS_InteractiveObject)>();
178 if (!anAIS.IsNull()) {
179 aContext->Remove(anAIS, isUpdateViewer);
182 myResult2AISObjectMap.remove(theObject);
185 void XGUI_Displayer::redisplay(ObjectPtr theObject, bool isUpdateViewer)
187 if (!isVisible(theObject))
190 AISObjectPtr aAISObj = getAISObject(theObject);
191 Handle(AIS_InteractiveObject) aAISIO = aAISObj->impl<Handle(AIS_InteractiveObject)>();
193 GeomPresentablePtr aPrs = std::dynamic_pointer_cast<GeomAPI_IPresentable>(theObject);
195 AISObjectPtr aAIS_Obj = aPrs->getAISObject(aAISObj);
197 erase(theObject, isUpdateViewer);
200 if (aAIS_Obj != aAISObj) {
201 myResult2AISObjectMap[theObject] = aAIS_Obj;
203 aAISIO = aAIS_Obj->impl<Handle(AIS_InteractiveObject)>();
206 if (!aAISIO.IsNull()) {
207 Handle(AIS_InteractiveContext) aContext = AISContext();
208 if (aContext.IsNull())
210 // Check that the visualized shape is the same and the redisplay is not necessary
211 // Redisplay of AIS object leads to this object selection compute and the selection
212 // in the browser is lost
214 ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(theObject);
215 if (aResult.get() != NULL) {
216 Handle(AIS_Shape) aShapePrs = Handle(AIS_Shape)::DownCast(aAISIO);
217 if (!aShapePrs.IsNull()) {
218 std::shared_ptr<GeomAPI_Shape> aShapePtr = ModelAPI_Tools::shape(aResult);
219 if (aShapePtr.get()) {
220 const TopoDS_Shape& aShape = aShapePrs->Shape();
221 std::shared_ptr<GeomAPI_Shape> anAISShapePtr(new GeomAPI_Shape());
222 anAISShapePtr->setImpl(new TopoDS_Shape(aShape));
224 if (aShapePtr->isEqual(anAISShapePtr))
229 aContext->Redisplay(aAISIO, false);
235 void XGUI_Displayer::deactivate(ObjectPtr theObject)
237 if (isVisible(theObject)) {
238 Handle(AIS_InteractiveContext) aContext = AISContext();
239 if (aContext.IsNull())
242 AISObjectPtr anObj = myResult2AISObjectMap[theObject];
243 Handle(AIS_InteractiveObject) anAIS = anObj->impl<Handle(AIS_InteractiveObject)>();
244 aContext->Deactivate(anAIS);
248 void XGUI_Displayer::activate(ObjectPtr theFeature)
250 activate(theFeature, myActiveSelectionModes);
253 void XGUI_Displayer::activate(ObjectPtr theObject, const QIntList& theModes)
255 if (isVisible(theObject)) {
256 Handle(AIS_InteractiveContext) aContext = AISContext();
257 if (aContext.IsNull())
260 AISObjectPtr anObj = myResult2AISObjectMap[theObject];
261 Handle(AIS_InteractiveObject) anAIS = anObj->impl<Handle(AIS_InteractiveObject)>();
262 aContext->Deactivate(anAIS);
263 aContext->Load(anAIS, -1, true);
264 // In order to clear active modes list
265 if (theModes.size() > 0) {
266 foreach(int aMode, theModes) {
267 //aContext->Load(anAIS, aMode, true);
268 aContext->Activate(anAIS, aMode);
271 //aContext->Load(anAIS, 0, true);
272 aContext->Activate(anAIS);
277 void XGUI_Displayer::getModesOfActivation(ObjectPtr theObject, QIntList& theModes)
279 if (!isVisible(theObject))
282 Handle(AIS_InteractiveContext) aContext = AISContext();
283 if (aContext.IsNull())
286 AISObjectPtr aAISObj = getAISObject(theObject);
288 if (aAISObj.get() != NULL) {
289 Handle(AIS_InteractiveObject) anAISIO = aAISObj->impl<Handle(AIS_InteractiveObject)>();
290 TColStd_ListOfInteger aTColModes;
291 aContext->ActivatedModes(anAISIO, aTColModes);
292 TColStd_ListIteratorOfListOfInteger itr( aTColModes );
293 for (; itr.More(); itr.Next() ) {
294 theModes.append(itr.Value());
299 void XGUI_Displayer::activateObjects(const QIntList& theModes)
301 // In order to avoid doblications of selection modes
303 foreach (int aMode, theModes) {
304 if (!aNewModes.contains(aMode))
305 aNewModes.append(aMode);
307 myActiveSelectionModes = aNewModes;
308 Handle(AIS_InteractiveContext) aContext = AISContext();
309 if (aContext.IsNull())
311 // Open local context if there is no one
312 if (!aContext->HasOpenedContext())
315 //aContext->UseDisplayedObjects();
316 //myUseExternalObjects = true;
318 AIS_ListOfInteractive aPrsList;
319 ::displayedObjects(aContext, aPrsList);
321 Handle(AIS_Trihedron) aTrihedron;
322 AIS_ListIteratorOfListOfInteractive aLIt(aPrsList);
323 Handle(AIS_InteractiveObject) anAISIO;
324 for(aLIt.Initialize(aPrsList); aLIt.More(); aLIt.Next()){
325 anAISIO = aLIt.Value();
326 aContext->Load(anAISIO, -1, true);
327 aContext->Deactivate(anAISIO);
328 aTrihedron = Handle(AIS_Trihedron)::DownCast(anAISIO);
329 //Deactivate trihedron which can be activated in local selector
330 if (aTrihedron.IsNull()) {
331 //aContext->Load(anAISIO, -1, true);
332 // In order to clear active modes list
333 if (myActiveSelectionModes.size() == 0) {
334 //aContext->Load(anAISIO, 0, true);
335 aContext->Activate(anAISIO);
337 foreach(int aMode, myActiveSelectionModes) {
338 //aContext->Load(anAISIO, aMode, true);
339 aContext->Activate(anAISIO, aMode);
347 void XGUI_Displayer::deactivateObjects()
349 myActiveSelectionModes.clear();
350 Handle(AIS_InteractiveContext) aContext = AISContext();
351 // Open local context if there is no one
352 if (!aContext->HasOpenedContext())
355 //aContext->NotUseDisplayedObjects();
356 AIS_ListOfInteractive aPrsList;
357 ::displayedObjects(aContext, aPrsList);
359 AIS_ListIteratorOfListOfInteractive aLIt;
360 //Handle(AIS_Trihedron) aTrihedron;
361 Handle(AIS_InteractiveObject) anAISIO;
362 for(aLIt.Initialize(aPrsList); aLIt.More(); aLIt.Next()){
363 anAISIO = aLIt.Value();
364 aContext->Deactivate(anAISIO);
368 bool XGUI_Displayer::isActive(ObjectPtr theObject) const
370 Handle(AIS_InteractiveContext) aContext = AISContext();
371 if (aContext.IsNull())
373 if (!isVisible(theObject))
376 AISObjectPtr anObj = myResult2AISObjectMap[theObject];
377 Handle(AIS_InteractiveObject) anAIS = anObj->impl<Handle(AIS_InteractiveObject)>();
379 TColStd_ListOfInteger aModes;
380 aContext->ActivatedModes(anAIS, aModes);
381 return aModes.Extent() > 0;
384 void XGUI_Displayer::setSelected(const QObjectPtrList& theResults, const bool isUpdateViewer)
386 Handle(AIS_InteractiveContext) aContext = AISContext();
387 if (aContext.IsNull())
389 if (aContext->HasOpenedContext()) {
390 aContext->UnhilightSelected();
391 aContext->ClearSelected();
392 foreach(ObjectPtr aResult, theResults) {
393 if (isVisible(aResult)) {
394 AISObjectPtr anObj = myResult2AISObjectMap[aResult];
395 Handle(AIS_InteractiveObject) anAIS = anObj->impl<Handle(AIS_InteractiveObject)>();
397 aContext->SetSelected(anAIS, false);
401 aContext->UnhilightCurrents();
402 aContext->ClearCurrents();
403 foreach(ObjectPtr aResult, theResults) {
404 if (isVisible(aResult)) {
405 AISObjectPtr anObj = myResult2AISObjectMap[aResult];
406 Handle(AIS_InteractiveObject) anAIS = anObj->impl<Handle(AIS_InteractiveObject)>();
408 aContext->SetCurrentObject(anAIS, false);
417 void XGUI_Displayer::clearSelected()
419 Handle(AIS_InteractiveContext) aContext = AISContext();
421 aContext->UnhilightCurrents(false);
422 aContext->ClearSelected();
426 void XGUI_Displayer::eraseAll(const bool isUpdateViewer)
428 Handle(AIS_InteractiveContext) aContext = AISContext();
429 if (!aContext.IsNull()) {
430 foreach (AISObjectPtr aAISObj, myResult2AISObjectMap) {
432 Handle(AIS_InteractiveObject) anIO = aAISObj->impl<Handle(AIS_InteractiveObject)>();
434 aContext->Remove(anIO, false);
439 myResult2AISObjectMap.clear();
442 void XGUI_Displayer::openLocalContext()
444 Handle(AIS_InteractiveContext) aContext = myWorkshop->viewer()->AISContext();
445 if (aContext.IsNull())
447 // Open local context if there is no one
448 if (!aContext->HasOpenedContext()) {
449 // Preserve selected objects
450 //AIS_ListOfInteractive aAisList;
451 //for (aContext->InitCurrent(); aContext->MoreCurrent(); aContext->NextCurrent())
452 // aAisList.Append(aContext->Current());
454 // get the filters from the global context and append them to the local context
455 // a list of filters in the global context is not cleared and should be cleared here
456 SelectMgr_ListOfFilter aFilters;
457 aFilters.Assign(aContext->Filters());
458 // it is important to remove the filters in the global context, because there is a code
459 // in the closeLocalContex, which restore the global context filters
460 aContext->RemoveFilters();
462 //aContext->ClearCurrents();
463 aContext->OpenLocalContext();
464 //aContext->NotUseDisplayedObjects();
466 //myUseExternalObjects = false;
468 SelectMgr_ListIteratorOfListOfFilter aIt(aFilters);
469 for (;aIt.More(); aIt.Next()) {
470 aContext->AddFilter(aIt.Value());
473 //AIS_ListIteratorOfListOfInteractive aIt2(aAisList);
474 //for(; aIt2.More(); aIt2.Next()) {
475 // aContext->SetSelected(aIt2.Value(), false);
480 void XGUI_Displayer::closeLocalContexts(const bool isUpdateViewer)
482 Handle(AIS_InteractiveContext) aContext = AISContext();
483 if ( (!aContext.IsNull()) && (aContext->HasOpenedContext()) ) {
484 // Preserve selected objects
485 //AIS_ListOfInteractive aAisList;
486 //for (aContext->InitSelected(); aContext->MoreSelected(); aContext->NextSelected())
487 // aAisList.Append(aContext->SelectedInteractive());
489 // get the filters from the local context and append them to the global context
490 // a list of filters in the local context is cleared
491 SelectMgr_ListOfFilter aFilters;
492 aFilters.Assign(aContext->Filters());
494 //aContext->ClearSelected();
495 aContext->CloseAllContexts(false);
497 // Redisplay all object if they were displayed in localContext
498 Handle(AIS_InteractiveObject) aAISIO;
499 foreach (AISObjectPtr aAIS, myResult2AISObjectMap) {
500 aAISIO = aAIS->impl<Handle(AIS_InteractiveObject)>();
501 if (aContext->DisplayStatus(aAISIO) != AIS_DS_Displayed) {
502 aContext->Display(aAISIO, false);
503 aContext->SetDisplayMode(aAISIO, Shading, false);
507 // Append the filters from the local selection in the global selection context
508 SelectMgr_ListIteratorOfListOfFilter aIt(aFilters);
509 for (;aIt.More(); aIt.Next()) {
510 Handle(SelectMgr_Filter) aFilter = aIt.Value();
511 aContext->AddFilter(aFilter);
516 //myUseExternalObjects = false;
519 //AIS_ListIteratorOfListOfInteractive aIt2(aAisList);
520 //for(; aIt2.More(); aIt2.Next()) {
521 // if (aContext->IsDisplayed(aIt2.Value()))
522 // aContext->SetCurrentObject(aIt2.Value(), false);
527 AISObjectPtr XGUI_Displayer::getAISObject(ObjectPtr theObject) const
530 if (myResult2AISObjectMap.contains(theObject))
531 anIO = myResult2AISObjectMap[theObject];
535 ObjectPtr XGUI_Displayer::getObject(const AISObjectPtr& theIO) const
537 Handle(AIS_InteractiveObject) aRefAIS = theIO->impl<Handle(AIS_InteractiveObject)>();
538 return getObject(aRefAIS);
541 ObjectPtr XGUI_Displayer::getObject(const Handle(AIS_InteractiveObject)& theIO) const
544 foreach (ObjectPtr anObj, myResult2AISObjectMap.keys()) {
545 AISObjectPtr aAIS = myResult2AISObjectMap[anObj];
546 Handle(AIS_InteractiveObject) anAIS = aAIS->impl<Handle(AIS_InteractiveObject)>();
553 bool XGUI_Displayer::enableUpdateViewer(const bool isEnabled)
555 bool aWasEnabled = myEnableUpdateViewer;
557 myEnableUpdateViewer = isEnabled;
562 void XGUI_Displayer::updateViewer()
564 Handle(AIS_InteractiveContext) aContext = AISContext();
565 if (!aContext.IsNull() && myEnableUpdateViewer)
566 aContext->UpdateCurrentViewer();
569 Handle(AIS_InteractiveContext) XGUI_Displayer::AISContext() const
571 Handle(AIS_InteractiveContext) aContext = myWorkshop->viewer()->AISContext();
572 if ((!aContext.IsNull()) && (!aContext->HasOpenedContext())) {
573 aContext->OpenLocalContext();
578 Handle(SelectMgr_AndFilter) XGUI_Displayer::GetFilter()
580 Handle(AIS_InteractiveContext) aContext = AISContext();
581 if (myAndFilter.IsNull() && !aContext.IsNull()) {
582 myAndFilter = new SelectMgr_AndFilter();
583 aContext->AddFilter(myAndFilter);
588 void XGUI_Displayer::displayAIS(AISObjectPtr theAIS, bool isUpdate)
590 Handle(AIS_InteractiveContext) aContext = AISContext();
591 if (aContext.IsNull())
593 Handle(AIS_InteractiveObject) anAISIO = theAIS->impl<Handle(AIS_InteractiveObject)>();
594 if (!anAISIO.IsNull()) {
595 aContext->Display(anAISIO, isUpdate);
596 if (aContext->HasOpenedContext()) {
597 //if (myUseExternalObjects) {
598 if (myActiveSelectionModes.size() == 0)
599 aContext->Activate(anAISIO);
601 foreach(int aMode, myActiveSelectionModes) {
602 aContext->Activate(anAISIO, aMode);
610 void XGUI_Displayer::eraseAIS(AISObjectPtr theAIS, const bool isUpdate)
612 Handle(AIS_InteractiveContext) aContext = AISContext();
613 if (aContext.IsNull())
615 Handle(AIS_InteractiveObject) anAISIO = theAIS->impl<Handle(AIS_InteractiveObject)>();
616 if (!anAISIO.IsNull()) {
617 aContext->Remove(anAISIO, isUpdate);
622 void XGUI_Displayer::setDisplayMode(ObjectPtr theObject, DisplayMode theMode, bool toUpdate)
624 if (theMode == NoMode)
627 Handle(AIS_InteractiveContext) aContext = AISContext();
628 if (aContext.IsNull())
631 AISObjectPtr aAISObj = getAISObject(theObject);
635 Handle(AIS_InteractiveObject) aAISIO = aAISObj->impl<Handle(AIS_InteractiveObject)>();
636 bool aCanBeShaded = ::canBeShaded(aAISIO);
637 // In order to avoid extra closing/opening context
638 SelectMgr_IndexedMapOfOwner aSelectedOwners;
640 myWorkshop->selector()->selection()->selectedOwners(aSelectedOwners);
641 closeLocalContexts(false);
643 aContext->SetDisplayMode(aAISIO, theMode, false);
646 activateObjects(myActiveSelectionModes);
647 myWorkshop->selector()->setSelectedOwners(aSelectedOwners, false);
653 XGUI_Displayer::DisplayMode XGUI_Displayer::displayMode(ObjectPtr theObject) const
655 Handle(AIS_InteractiveContext) aContext = AISContext();
656 if (aContext.IsNull())
659 AISObjectPtr aAISObj = getAISObject(theObject);
663 Handle(AIS_InteractiveObject) aAISIO = aAISObj->impl<Handle(AIS_InteractiveObject)>();
664 return (XGUI_Displayer::DisplayMode) aAISIO->DisplayMode();
667 void XGUI_Displayer::addSelectionFilter(const Handle(SelectMgr_Filter)& theFilter)
669 Handle(AIS_InteractiveContext) aContext = AISContext();
670 if (aContext.IsNull())
672 const SelectMgr_ListOfFilter& aFilters = aContext->Filters();
673 SelectMgr_ListIteratorOfListOfFilter aIt(aFilters);
674 for (; aIt.More(); aIt.Next()) {
675 if (theFilter.Access() == aIt.Value().Access())
678 GetFilter()->Add(theFilter);
681 void XGUI_Displayer::removeSelectionFilter(const Handle(SelectMgr_Filter)& theFilter)
683 Handle(AIS_InteractiveContext) aContext = AISContext();
684 if (aContext.IsNull())
686 GetFilter()->Remove(theFilter);
689 void XGUI_Displayer::removeFilters()
691 Handle(AIS_InteractiveContext) aContext = AISContext();
692 if (aContext.IsNull())
694 GetFilter()->Clear();
697 void XGUI_Displayer::showOnly(const QObjectPtrList& theList)
699 QObjectPtrList aDispList = myResult2AISObjectMap.keys();
700 foreach(ObjectPtr aObj, aDispList) {
701 if (!theList.contains(aObj))
704 foreach(ObjectPtr aObj, theList) {
705 if (!isVisible(aObj))
706 display(aObj, false);
711 bool XGUI_Displayer::canBeShaded(ObjectPtr theObject) const
713 if (!isVisible(theObject))
716 AISObjectPtr aAISObj = getAISObject(theObject);
717 if (aAISObj.get() == NULL)
720 Handle(AIS_InteractiveObject) anAIS = aAISObj->impl<Handle(AIS_InteractiveObject)>();
721 return ::canBeShaded(anAIS);