## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
#=============================================================================
-IF(NOT DFBROWSER_FIND_QUIETLY)
- MESSAGE(STATUS "Try to find DFBrowser at $ENV{DFBROWSER_ROOT_DIR}...")
-ENDIF()
-
SET(DFBROWSER_ROOT_DIR $ENV{DFBROWSER_ROOT_DIR} CACHE PATH "Path to the DFBrowser directory")
IF(EXISTS ${DFBROWSER_ROOT_DIR})
SET(DFBROWSER_INCLUDE_DIR "${DFBROWSER_ROOT_DIR}/include")
## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
#=============================================================================
-IF(NOT VINSPECTOR_FIND_QUIETLY)
- MESSAGE(STATUS "Try to find VInspector at $ENV{VINSPECTOR_ROOT_DIR}...")
-ENDIF()
-
SET(VINSPECTOR_ROOT_DIR $ENV{VINSPECTOR_ROOT_DIR} CACHE PATH "Path to the VInspector directory")
IF(EXISTS $ENV{VINSPECTOR_ROOT_DIR})
SET(VINSPECTOR_INCLUDE_DIR "$ENV{VINSPECTOR_ROOT_DIR}/include")
aDimAIS->DimensionAspect()->SetCommonColor(aColor);
}
Handle(AIS_InteractiveContext) aContext = anAIS->GetContext();
- aContext->SetColor(anAIS, aColor, false);
+ if (!aContext.IsNull())
+ aContext->SetColor(anAIS, aColor, false);
+ else
+ anAIS->SetColor(aColor);
}
double GeomAPI_AISObject::width()
aDimAIS->DimensionAspect()->SetCommonColor(aColor);
}
Handle(AIS_InteractiveContext) aContext = anAIS->GetContext();
- aContext->SetColor(anAIS, aColor, false);
+ if (!aContext.IsNull())
+ aContext->SetColor(anAIS, aColor, false);
+ else
+ anAIS->SetColor(aColor);
return true;
}
if (aDrawer->HasOwnWireAspect()) {
aLineAspect = aDrawer->WireAspect();
}
- Quantity_Color aCurrentColor;
- Aspect_TypeOfLine aCurrentType;
- Standard_Real aCurrentWidth;
- aLineAspect->Aspect()->Values(aCurrentColor, aCurrentType, aCurrentWidth);
- isChanged = aType != aCurrentType;
- if (isChanged) {
- aLineAspect->SetTypeOfLine(aType);
+ if (!aLineAspect.IsNull()) {
+ Handle(Graphic3d_AspectLine3d) aGraphicAspect = aLineAspect->Aspect();
+ Aspect_TypeOfLine aCurrentType = aGraphicAspect->Type();
+ isChanged = aType != aCurrentType;
+ if (isChanged) {
+ aLineAspect->SetTypeOfLine(aType);
+ }
}
}
return isChanged;